Skip to content

feat: Add Amazon Linux 2023 support#322

Open
grantmcdermott wants to merge 1 commit intor-lib:mainfrom
grantmcdermott:al2023
Open

feat: Add Amazon Linux 2023 support#322
grantmcdermott wants to merge 1 commit intor-lib:mainfrom
grantmcdermott:al2023

Conversation

@grantmcdermott
Copy link
Copy Markdown

@grantmcdermott grantmcdermott commented Apr 2, 2026

Closes #311

Adds AL2023 as a supported distro. The RHEL 9 R builds from Posit are binary-compatible with AL2023, so this maps the platform for version resolution while keeping AL2023 as its own distro for install tooling and repo setup. As discussed in #311 (comment), this uses the P3M "manylinux" binary repo, rather than distro-specific RHEL 9 PPM binaries, to avoid the EPEL dependency problem.

Changes

  • src/common.rs: Map linux-amzn-2023 to linux-rhel-9 for the r-hub API version resolution
  • src/linux.rs: Add "amzn" branch in select_linux_tools() with simple dnf install, no EPEL
  • src/data/repos.json: Enable P3M-manylinux (manylinux_2_28) binaries for "amzn" on both x86_64 and aarch64

Testing

Tested on amazonlinux:2023 (aarch64) in Docker:

docker run -it --rm --privileged -v $(pwd):/work amazonlinux:2023 bash
dnf install -y /work/r-rig-0.8.00.1.2.rpm

After setup:

$ rig system detect-platform
Distribution: amzn
Version:      2023

$ rig resolve release
4.5.3 https://cdn.posit.co/r/rhel-9/pkgs/R-4.5.3-1-1.aarch64.rpm

$ rig add release
[INFO] Running "dnf install -y /tmp/rig/R-4.5.3-1-1.aarch64.rpm"
[INFO] Installing pak for R 4.5.3

Start R

R

P3M manylinux repo is configured automatically, and installing R packages correctly pulls in binaries, e.g.:

> getOption('repos')
P3M  https://packagemanager.posit.co/cran/__linux__/manylinux_2_28/latest

> install.packages('magick')
* installing *binary* package 'magick' ...
* DONE (magick)

> library(magick)
Linking to ImageMagick 6.9.13.25
Enabled features: cairo, fontconfig, freetype, ghostscript, lcms, pango, raw, rsvg, webp, x11

> install.packages('tidyverse')
# all deps install as *binary*

P.S. Some R packages with heavy system library dependencies (e.g. sf) don't have manylinux binaries (only on aarch64?) yet and will fall back to source compilation. But this is a PPM coverage gap, not a rig issue. (E.g., See amazonlinux/amazon-linux-2023#129 (comment))

Add AL2023 as a supported distro, resolving r-lib#311. Changes:

- Map amzn/2023 to rhel-9 for R version resolution (common.rs)
- Add amzn install tooling with simple dnf install (linux.rs)
- Enable P3M manylinux_2_28 binaries for amzn (repos.json)

Closes r-lib#311
@grantmcdermott
Copy link
Copy Markdown
Author

Some of the CI runs are failing, but AFAICT these are pre-existing issues (e.g. broken bats install on macOS, fedora-41 aarch64) unrelated to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AmazonLinux-2023 as alias for RHEL-9

1 participant