From: Minh Diep Date: Wed, 6 Jul 2022 18:15:09 +0000 (-0700) Subject: LU-15997 build: add Red Hat 9 rpm support X-Git-Tag: v1.46.5.wc1~3 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=1ea74e9afb0400677e2d60c9be479be0a2684e88;p=tools%2Fe2fsprogs.git 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 --- 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 34a6426..9cb8347 100755 --- a/configure +++ b/configure @@ -12697,7 +12697,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 58e222d..6248c09 100644 --- a/configure.ac +++ b/configure.ac @@ -1820,7 +1820,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