Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion ci/etc/rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ local({
rspm_template <- "https://packagemanager.rstudio.com/cran/__linux__/%s/latest"
# See https://github.com/rstudio/r-docker#releases-and-tags,
# but note that RSPM still uses "centos8"
supported_os <- c("bionic", "focal", "jammy", "centos7", "centos8", "opensuse153")
supported_os <- c("bionic", "focal", "jammy", "centos7", "centos8", "opensuse153", "rhel9")
# Amazon Linux 2023 is compatible with RHEL 9 binaries
amzn_to_rhel <- c("2023" = "rhel9")

if (nzchar(Sys.which("lsb_release"))) {
os <- tolower(system("lsb_release -cs", intern = TRUE))
Expand All @@ -28,6 +30,13 @@ local({
return(sprintf(rspm_template, os))
}
}
# Amazon Linux: map to compatible RHEL version
if (gsub('"', '', vals["ID"]) == "amzn") {
version <- gsub('"', '', vals["VERSION_ID"])
if (version %in% names(amzn_to_rhel)) {
return(sprintf(rspm_template, amzn_to_rhel[version]))
}
}
}
}
if (file.exists("/etc/system-release")) {
Expand Down
Loading