rstudio / r-builds

an opinionated environment for compiling R
GNU General Public License v3.0
101 stars 19 forks source link

Add builds for Fedora 37 and 38 #181

Closed rundel closed 1 year ago

rundel commented 1 year ago

This is an attempt at adding builds for the current versions of Fedora. The dockerfiles and package files are almost entirely based on the rhel-9 implementation.

I believe I have included all necessary changes as described in the readme and a test run was successful on the forked branch (https://github.com/rundel/r-builds/actions/runs/5662060100)

glin commented 1 year ago

Hi @rundel, thanks for the PR. So the builds here are only meant to cover the platforms that Posit supports, and we don't have Fedora there. We're talking about whether it would be useful to offer Fedora R binaries without officially supporting Fedora, and whether it's worth the additional maintenance effort. So far we're not seeing much customer/user demand and seem to have more requests for Amazon Linux (AL2023 is based on Fedora), and may go for Amazon Linux builds directly if the Fedora need is more for AL2023 support.

Could you explain a bit about your use case for Fedora support, or if you know of other communities that would benefit from Fedora builds? Is the Fedora support for running R on Amazon Linux by any chance?

And also, since we have no immediate plans to officially support Fedora, would it be feasible to either 1) fork this repo, build and upload Fedora binaries yourself, or 2) merge Fedora support here but not officially support it or publicize it in our documentation?

rundel commented 1 year ago

Thanks for taking the time to respond and look things over. This is based on a need for my department (Statistical Science at Duke) - our use of Fedora is largely due to historical reasons (we were originally on Scientific linux which then progressed to RHEL / Centos -> Fedora). RHEL hasn't been viable for us due to the exceedingly slow rate of updates for system libraries which made managing our R package ecosystem painful (maybe this is better now w/ package manager). If I had my way we would have switch to Ubuntu awhile ago but that hasnt been a viable option due to our limited IT support and other more pressing needs.

I would be reluctant to try to support the builds myself because I don't feel like I have my head fully wrapped around the whole build process and toolchain (getting this to work was based on cribbing heavily from the existing rhel builds). I'm sure I can get it to work for our specific systems but I would certainly benefit from the fedora builds "automatically" inheriting from updates and changes that are made more generally for this repo.

I'm very much of aware of the direct and indirect costs involved with adding support for another distro and don't want to add any unnecessary extra burden on you or posit. I would be more than happy with the "unofficial" support option you've suggested if that also works for you all.

glin commented 1 year ago

I'll merge this when the CI is done, and then it might take another few hours to deploy, build, and publish all the Fedora R binaries.

glin commented 1 year ago

These should be up on the CDN now. I tested a couple R versions briefly like:

R_VERSION=4.3.1
curl -O https://cdn.rstudio.com/r/fedora-37/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
dnf install -y R-${R_VERSION}-1-1.x86_64.rpm

R_VERSION=4.3.1
curl -O https://cdn.rstudio.com/r/fedora-38/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
dnf install -y R-${R_VERSION}-1-1.x86_64.rpm
rundel commented 1 year ago

@glin I was just able to install these and everything looks good on our system - able to swap between the versions and everything works. Thanks for helping shepherd this through.

For some reason workbench is defaulting to 4.1.3 vs 4.3.1 when both are installed - setting rsession-which-r in /etc/rstudio/rserver.conf and/or r-version in /etc/rstudio/profiles does not seem to change this behavior. We're using launcher with a local config if that matters.

Happy to follow up with this is community if that is a better place.

glin commented 1 year ago

@rundel That's odd, but I know there are a ton of different ways to configure R in Workbench, e.g. described at Configuring the Default Version of R. Maybe check the R on the PATH or if users have an IDE override? Besides that, I can't really help much though, so you could try Community. Or since you're a Workbench customer, you can also open a professional support ticket.

gaborcsardi commented 1 year ago

IDK if you already know this, but we don't seem to have Fedora builds:

❯ R_VERSION=4.3.1 curl -LOf https://cdn.posit.co/r/fedora-38/pkgs/r-${R_VERSION}_1_amd64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 403

❯ R_VERSION=3.6.1 curl -LOf https://cdn.posit.co/r/fedora-38/pkgs/r-${R_VERSION}_1_amd64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 403

❯ R_VERSION=3.6.1 curl -LOf https://cdn.posit.co/r/fedora-37/pkgs/r-${R_VERSION}_1_amd64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 403
gaborcsardi commented 1 year ago

Ah, never mind, only a copy paste error in the README.

gaborcsardi commented 1 year ago

Btw. https://github.com/r-hub/R/releases now also has arm64 R builds for Fedora, and Fedora support is also to r-lib/rig soon.