You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/05/04 04:45:19 UTC
[couchdb-ci] 03/04: Use Rocky Linux instead of CentOS 8
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch update-ci-images-rocky-8-and-latest-otp-versions
in repository https://gitbox.apache.org/repos/asf/couchdb-ci.git
commit ecb43cadb2c3b2187eac574283bb0ad144e0be88
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Wed May 4 00:37:00 2022 -0400
Use Rocky Linux instead of CentOS 8
Make sure VERSION_ID stays as a major version as it may not always be true
---
bin/detect-os.sh | 6 +++++-
bin/install-dependencies.sh | 2 +-
bin/source-erlang.sh | 2 +-
build.sh | 2 +-
dockerfiles/rockylinux-8 | 2 +-
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/bin/detect-os.sh b/bin/detect-os.sh
index 8359d24..a1c6a10 100755
--- a/bin/detect-os.sh
+++ b/bin/detect-os.sh
@@ -68,13 +68,17 @@ case "${OSTYPE}" in
# and finally some rough heuristics
if [[ -f /etc/redhat-release ]]; then
# /etc/redhat-release is so inconsistent, we use rpm instead
- rhelish=$(rpm -qa '(redhat|sl|slf|centos|centos-linux|oraclelinux)-release(|-server|-workstation|-client|-computenode)' 2>/dev/null | head -1)
+ rhelish=$(rpm -qa '(redhat|sl|slf|centos|centos-linux|oraclelinux|rocky)-release(|-server|-workstation|-client|-computenode)' 2>/dev/null | head -1)
if [[ $rhelish ]]; then
ID=${ID:-$(echo ${rhelish} | awk -F'-' '{print tolower($1)}')}
VERSION_ID=${VERSION_ID:-$(echo ${rhelish} | sed -E 's/([^[:digit:]]+)([[:digit:]]+)(.*)/\2/' )}
VERSION_CODENAME=${VERSION_CODENAME:-${VERSION_ID}}
DISTRIB_CODENAME=${VERSION_CODENAME:-${VERSION_ID}}
fi
+ # We expect VERSION_ID for RPM distros to be major version only (and as read
+ # from /etc/os-release it might not be) so we ensure that below
+ VERSION_ID=$(echo ${VERSION_ID} | cut -d. -f1)
+
elif [[ -f /etc/debian_version ]]; then
# Ubuntu keeps changing the format of /etc/os-release's VERSION, and
# it's numeric, not the codename. Boo.
diff --git a/bin/install-dependencies.sh b/bin/install-dependencies.sh
index 90e4c0e..e670871 100755
--- a/bin/install-dependencies.sh
+++ b/bin/install-dependencies.sh
@@ -83,7 +83,7 @@ arms='(aarch64)'
case "${OSTYPE}" in
linux*)
- redhats='(rhel|centos|fedora)'
+ redhats='(rhel|centos|fedora|rocky)'
debians='(debian|ubuntu)'
latest='(stretch|buster|bionic)'
diff --git a/bin/source-erlang.sh b/bin/source-erlang.sh
index 0914cf6..46fffaa 100755
--- a/bin/source-erlang.sh
+++ b/bin/source-erlang.sh
@@ -38,7 +38,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${SCRIPTPATH}/detect-os.sh
-redhats='(rhel|centos|fedora)'
+redhats='(rhel|centos|fedora|rocky)'
debians='(debian|ubuntu)'
echo "Erlang source build started @ $(date)"
diff --git a/build.sh b/build.sh
index 2089c77..b921eaa 100755
--- a/build.sh
+++ b/build.sh
@@ -44,7 +44,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# also https://endoflife.software/operating-systems/linux/centos
DEBIANS="debian-stretch debian-buster debian-bullseye"
UBUNTUS="ubuntu-bionic ubuntu-focal"
-CENTOSES="centos-7 centos-8"
+CENTOSES="centos-7 rockylinux-8"
ERLANGALL_BASE="debian-bullseye"
XPLAT_BASE="debian-bullseye"
XPLAT_ARCHES="arm64v8 ppc64le"
diff --git a/dockerfiles/rockylinux-8 b/dockerfiles/rockylinux-8
index 6423867..4f7482d 100644
--- a/dockerfiles/rockylinux-8
+++ b/dockerfiles/rockylinux-8
@@ -17,7 +17,7 @@
# NOTE: These are intended to be built using the arguments as
# described in ../build.sh. See that script for more details.
-FROM centos:8
+FROM rockylinux:8
# Choose whether to install SpiderMonkey 1.8.5, default yes
ARG js=js