From 1e3001a9e276b4a074f3061de0b7fa1cf7950ed3 Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Wed, 6 Jul 2022 11:15:09 -0700 Subject: [PATCH] LU-15997 build: add Red Hat 9 rpm support Build RPMS on Red Hat 9 Change-Id: I17264e2790287dfa7a4a0b26347b5c6d7533a174 Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/47891 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- .gitignore | 2 +- Makefile.in | 6 +++--- configure | 2 +- configure.ac | 2 +- contrib/build-rpm | 25 ++++++++++++++-------- ...HEL-7+8.spec.in => e2fsprogs-RHEL-7+8+9.spec.in | 0 6 files changed, 22 insertions(+), 15 deletions(-) rename e2fsprogs-RHEL-7+8.spec.in => e2fsprogs-RHEL-7+8+9.spec.in (100%) diff --git a/.gitignore b/.gitignore index 5908be0..2f41ff2 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,7 @@ e2fsck/tst_refcount e2fsck/tst_region e2fsprogs-RHEL-6.spec e2fsprogs-SUSE_LINUX-11+12+15.spec -e2fsprogs-RHEL-7+8.spec +e2fsprogs-RHEL-7+8+9.spec ext2ed/ext2ed.conf ext2ed/ext2ed.8 intl/charset.alias diff --git a/Makefile.in b/Makefile.in index a6cc91f..7a5c003 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,10 +59,10 @@ e2fsprogs-RHEL-6.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-6.spec.in e2fsprogs-SUSE_LINUX-11+12+15.spec: $(DEP_SUBSTITUTE) e2fsprogs-SUSE_LINUX-11+12+15.spec.in cd $(top_builddir); CONFIG_FILES=./e2fsprogs-SUSE_LINUX-11+12+15.spec ./config.status -e2fsprogs-RHEL-7+8.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-7+8.spec.in - cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-7+8.spec ./config.status +e2fsprogs-RHEL-7+8+9.spec: $(DEP_SUBSTITUTE) e2fsprogs-RHEL-7+8+9.spec.in + cd $(top_builddir); CONFIG_FILES=./e2fsprogs-RHEL-7+8+9.spec ./config.status -rpm: e2fsprogs-RHEL-6.spec e2fsprogs-SUSE_LINUX-11+12+15.spec e2fsprogs-RHEL-7+8.spec +rpm: e2fsprogs-RHEL-6.spec e2fsprogs-SUSE_LINUX-11+12+15.spec e2fsprogs-RHEL-7+8+9.spec sh contrib/build-rpm docs: diff --git a/configure b/configure index 19fb2ad..8068e87 100755 --- a/configure +++ b/configure @@ -12687,7 +12687,7 @@ fi for i in MCONFIG Makefile \ e2fsprogs-RHEL-6.spec \ e2fsprogs-SUSE_LINUX-11+12+15.spec \ - e2fsprogs-RHEL-7+8.spec \ + e2fsprogs-RHEL-7+8+9.spec \ util/Makefile util/subst.conf util/gen-tarball util/install-symlink \ lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \ lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \ diff --git a/configure.ac b/configure.ac index 681f48c..bb85ab5 100644 --- a/configure.ac +++ b/configure.ac @@ -1806,7 +1806,7 @@ fi for i in MCONFIG Makefile \ e2fsprogs-RHEL-6.spec \ e2fsprogs-SUSE_LINUX-11+12+15.spec \ - e2fsprogs-RHEL-7+8.spec \ + e2fsprogs-RHEL-7+8+9.spec \ util/Makefile util/subst.conf util/gen-tarball util/install-symlink \ lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \ lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \ diff --git a/contrib/build-rpm b/contrib/build-rpm index 95c2a50..1a2cc32 100644 --- a/contrib/build-rpm +++ b/contrib/build-rpm @@ -46,6 +46,9 @@ if [ -z "$DISTRO" ]; then if grep "SUSE Linux Enterprise Server " /etc/issue; then DISTRO="SUSE LINUX" fi + if grep "Red Hat Enterprise Linux" /etc/system-release; then + DISTRO="RedHatEnterprise" + fi fi if [ -z "$DISTRO" ]; then echo "Could not determine the distribution. Please install the lsb_release binary" @@ -60,6 +63,9 @@ if [ -z "$RELEASE" ]; then SUSE\ LINUX) RELEASE=$(grep SUSE /etc/issue | sed -e 's/SUSE Linux Enterprise Server //' -e 's/ .*//') ;; + RedHatEnterprise) + RELEASE=$(grep 'Red Hat' /etc/system-release | sed -e 's/Red Hat Enterprise Linux release //' -e 's/ .*//') + ;; esac fi if [ -z "$RELEASE" ]; then @@ -70,17 +76,18 @@ case "$DISTRO-$RELEASE" in Scientific-6*) DISTRO=RHEL; RELEASE=6;; Scientific-7*) DISTRO=RHEL; RELEASE=7+8;; RedHatEnterpriseServer-6*) DISTRO=RHEL; RELEASE=6;; - RedHatEnterpriseServer-7*) DISTRO=RHEL; RELEASE=7+8;; - RedHatEnterprise-8*) DISTRO=RHEL; RELEASE=7+8;; + RedHatEnterpriseServer-7*) DISTRO=RHEL; RELEASE=7+8+9;; + RedHatEnterprise-8*) DISTRO=RHEL; RELEASE=7+8+9;; + RedHatEnterprise-9*) DISTRO=RHEL; RELEASE=7+8+9;; CentOS-6*) DISTRO=RHEL; RELEASE=6;; - CentOS-7*) DISTRO=RHEL; RELEASE=7+8;; - CentOS-8*) DISTRO=RHEL; RELEASE=7+8;; - Rocky-8*) DISTRO=RHEL; RELEASE=7+8;; - AlmaLinux-8*) DISTRO=RHEL; RELEASE=7+8;; + CentOS-7*) DISTRO=RHEL; RELEASE=7+8+9;; + CentOS-8*) DISTRO=RHEL; RELEASE=7+8+9;; + Rocky-8*) DISTRO=RHEL; RELEASE=7+8+9;; + AlmaLinux-8*) DISTRO=RHEL; RELEASE=7+8+9;; Fedora-1[1-4]) DISTRO=RHEL; RELEASE=6;; # use the same .spec for now - Fedora-1[5-9]) DISTRO=RHEL; RELEASE=7+8;; - Fedora-2[0-9]) DISTRO=RHEL; RELEASE=7+8;; - Fedora-3[0-9]) DISTRO=RHEL; RELEASE=7+8;; + Fedora-1[5-9]) DISTRO=RHEL; RELEASE=7+8+9;; + Fedora-2[0-9]) DISTRO=RHEL; RELEASE=7+8+9;; + Fedora-3[0-9]) DISTRO=RHEL; RELEASE=7+8+9;; SUSE\ LINUX-1[1-5]* | SUSE-12* | SUSE-15*) DISTRO=SUSE_LINUX; RELEASE=11+12+15;; esac diff --git a/e2fsprogs-RHEL-7+8.spec.in b/e2fsprogs-RHEL-7+8+9.spec.in similarity index 100% rename from e2fsprogs-RHEL-7+8.spec.in rename to e2fsprogs-RHEL-7+8+9.spec.in -- 1.8.3.1