From 4b61a221e4e2f53dc7df3137fc34f418c3f3b879 Mon Sep 17 00:00:00 2001 From: Justin Caratzas Date: Tue, 21 Sep 2021 10:09:43 -0400 Subject: [PATCH] add centos9 --- ceph-build/config/definitions/ceph-build.yml | 3 +- ceph-dev-build/build/setup_rpm | 2 +- .../config/definitions/ceph-dev-build.yml | 4 +- .../config/definitions/ceph-dev-new-build.yml | 1 + .../config/definitions/ceph-dev-new.yml | 2 +- ceph-dev/config/definitions/ceph-dev.yml | 2 +- ceph-release-rpm/build/build | 4 ++ ceph/config/definitions/ceph.yml | 2 +- kernel/config/definitions/kernel.yml | 3 +- scripts/build_utils.sh | 44 ++++++++----------- 10 files changed, 34 insertions(+), 33 deletions(-) mode change 100644 => 100755 ceph-dev-build/build/setup_rpm mode change 100644 => 100755 ceph-release-rpm/build/build mode change 100644 => 100755 scripts/build_utils.sh diff --git a/ceph-build/config/definitions/ceph-build.yml b/ceph-build/config/definitions/ceph-build.yml index 6436ed1e..0acfd118 100644 --- a/ceph-build/config/definitions/ceph-build.yml +++ b/ceph-build/config/definitions/ceph-build.yml @@ -35,6 +35,7 @@ - focal - centos7 - centos8 + - centos9 - jessie - stretch - buster @@ -65,7 +66,7 @@ regex: (mimic|nautilus|octopus|pacific|quincy) label: '${BRANCH}' - condition-kind: regex-match - regex: (xenial|bionic|focal|centos7|centos8|buster|bullseye) + regex: (xenial|bionic|focal|centos7|centos8|centos9|buster|bullseye) label: '${DIST}' on-evaluation-failure: dont-run steps: diff --git a/ceph-dev-build/build/setup_rpm b/ceph-dev-build/build/setup_rpm old mode 100644 new mode 100755 index c63763e3..c52bf290 --- a/ceph-dev-build/build/setup_rpm +++ b/ceph-dev-build/build/setup_rpm @@ -18,7 +18,7 @@ if test $(id -u) != 0 ; then fi export LC_ALL=C # the following is vulnerable to i18n -$SUDO yum install -y redhat-lsb-core yum-utils +$SUDO yum install -y yum-utils get_rpm_dist diff --git a/ceph-dev-build/config/definitions/ceph-dev-build.yml b/ceph-dev-build/config/definitions/ceph-dev-build.yml index 2e81fb0d..b2287c6a 100644 --- a/ceph-dev-build/config/definitions/ceph-dev-build.yml +++ b/ceph-dev-build/config/definitions/ceph-dev-build.yml @@ -27,7 +27,7 @@ execution-strategy: combination-filter: | DIST == AVAILABLE_DIST && ARCH == AVAILABLE_ARCH && - (ARCH == "x86_64" || (ARCH == "arm64" && ["xenial", "bionic", "centos7", "centos8"].contains(DIST))) + (ARCH == "x86_64" || (ARCH == "arm64" && ["xenial", "bionic", "centos7", "centos8", "centos9"].contains(DIST))) axes: - axis: type: label-expression @@ -50,6 +50,7 @@ - focal - centos7 - centos8 + - centos9 - jessie - precise - centos6 @@ -150,4 +151,3 @@ password: DOCKER_HUB_PASSWORD - build-name: name: "#${BUILD_NUMBER} ${BRANCH}, ${SHA1}, ${DISTROS}, ${FLAVOR}" - diff --git a/ceph-dev-new-build/config/definitions/ceph-dev-new-build.yml b/ceph-dev-new-build/config/definitions/ceph-dev-new-build.yml index 97da4080..efd0c469 100644 --- a/ceph-dev-new-build/config/definitions/ceph-dev-new-build.yml +++ b/ceph-dev-new-build/config/definitions/ceph-dev-new-build.yml @@ -53,6 +53,7 @@ - centos6 - centos7 - centos8 + - centos9 - leap15 - windows - axis: diff --git a/ceph-dev-new/config/definitions/ceph-dev-new.yml b/ceph-dev-new/config/definitions/ceph-dev-new.yml index bdb0f723..914d1836 100644 --- a/ceph-dev-new/config/definitions/ceph-dev-new.yml +++ b/ceph-dev-new/config/definitions/ceph-dev-new.yml @@ -25,7 +25,7 @@ - string: name: DISTROS - description: "A list of distros to build for. Available options are: centos8, centos7, centos6, focal, bionic, xenial, trusty, precise, wheezy, jessie, and windows" + description: "A list of distros to build for. Available options are: centos9, centos8, centos7, centos6, focal, bionic, xenial, trusty, precise, wheezy, jessie, and windows" default: "focal bionic centos7 centos8 windows" - string: diff --git a/ceph-dev/config/definitions/ceph-dev.yml b/ceph-dev/config/definitions/ceph-dev.yml index 464a5609..a2fb944b 100644 --- a/ceph-dev/config/definitions/ceph-dev.yml +++ b/ceph-dev/config/definitions/ceph-dev.yml @@ -25,7 +25,7 @@ - string: name: DISTROS - description: "A list of distros to build for. Available options are: centos7, centos6, focal, bionic, xenial, trusty, precise, wheezy, jessie, and windows" + description: "A list of distros to build for. Available options are: centos9, centos8, centos7, centos6, focal, bionic, xenial, trusty, precise, wheezy, jessie, and windows" default: "focal bionic centos7 centos8" - string: diff --git a/ceph-release-rpm/build/build b/ceph-release-rpm/build/build old mode 100644 new mode 100755 index 6a9d117b..82566801 --- a/ceph-release-rpm/build/build +++ b/ceph-release-rpm/build/build @@ -33,6 +33,10 @@ if [ "$target" = "centos8" ] ; then target=el8 chacra_baseurl="ceph-release/${chacra_ref}/HEAD/centos/8" fi +if [ "$target"= "centos9" ] ; then + target=el9 + chacra_baseurl="ceph-release/${chacra_ref}/HEAD/centos/9" +fi if [ "$target" = "sles11sp2" ] ; then target=sles11 chacra_baseurl="ceph-release/${chacra_ref}/HEAD/sles/11" diff --git a/ceph/config/definitions/ceph.yml b/ceph/config/definitions/ceph.yml index 9dfd5558..7a605536 100644 --- a/ceph/config/definitions/ceph.yml +++ b/ceph/config/definitions/ceph.yml @@ -78,7 +78,7 @@ SECURITY: Builds from BRANCH-release branch in ceph-private.git (private repo)." - string: name: DISTROS - description: "A list of distros to build for. Available options are: centos8, centos7, centos6, focal, bionic, xenial, trusty, precise, wheezy, jessie, buster, bullseye" + description: "A list of distros to build for. Available options are: centos9, centos8, centos7, centos6, focal, bionic, xenial, trusty, precise, wheezy, jessie, buster, bullseye" default: "focal bionic centos8 buster bullseye" - string: diff --git a/kernel/config/definitions/kernel.yml b/kernel/config/definitions/kernel.yml index a38acc23..0a648665 100644 --- a/kernel/config/definitions/kernel.yml +++ b/kernel/config/definitions/kernel.yml @@ -16,7 +16,7 @@ - string: name: DISTROS - description: "A list of distros to build for. Available options are: centos8, focal, bionic, xenial, and trusty" + description: "A list of distros to build for. Available options are: centos9, centos8, focal, bionic, xenial, and trusty" default: "centos8 trusty xenial bionic focal" - string: @@ -59,6 +59,7 @@ If this is checked, then the binaries will be built and pushed to chacra even if type: label-expression name: AVAILABLE_DIST values: + - centos9 - centos8 - trusty - xenial diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh old mode 100644 new mode 100755 index fd93666c..be813346 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -256,40 +256,27 @@ get_rpm_dist() { # creates a DISTRO_VERSION and DISTRO global variable for # use in constructing chacra urls for rpm distros - LSB_RELEASE=/usr/bin/lsb_release - [ ! -x $LSB_RELEASE ] && echo unknown && exit + source /etc/os-release - ID=`$LSB_RELEASE --short --id` + RELEASE=$VERSION_ID + DISTRO=$ID case $ID in - RedHatEnterpriseServer) - RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1` + rhel) DIST=rhel$RELEASE - DISTRO=rhel ;; - CentOS|CentOSStream) - RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1` + centos) DIST=el$RELEASE - DISTRO=centos ;; - Fedora) - RELEASE=`$LSB_RELEASE --short --release` + fedora) DIST=fc$RELEASE - DISTRO=fedora ;; - SUSE\ LINUX|openSUSE) - DESC=`$LSB_RELEASE --short --description` - RELEASE=`$LSB_RELEASE --short --release` - case $DESC in - *openSUSE*) - DIST=opensuse$RELEASE - DISTRO=opensuse - ;; - *Enterprise*) - DIST=sles$RELEASE - DISTRO=sles - ;; - esac + sles) + DIST=sles$RELEASE + ;; + opensuse) + DIST=opensuse$RELEASE + DISTRO=opensuse ;; *) DIST=unknown @@ -1356,6 +1343,13 @@ setup_rpm_build_deps() { $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save + elif [ "$RELEASE" = 9 ]; then + $SUDO dnf -y copr enable ceph/el9 + $SUDO dnf -y install epel-next-release + + $SUDO dnf config-manager --add-repo http://mirror.stream.centos.org/9-stream/CRB/x86_64/os/ + + $SUDO dnf -y install javapackages-tools fi DIR=/tmp/install-deps.$$ -- 2.39.5