From e80502a79ca417b59f9fb5c3b9dd2bb161fe8451 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Wed, 14 Dec 2022 18:34:07 -0700 Subject: [PATCH] LU-16391 build: update version to 1.46.6-wc1 Update configure.ac to separate Version from Release in the .spec.in files so that RPM building doesn't choke if a '-' is in the version. Add these changes into configure also, so they are immediately used. Change-Id: I6cbf6efa25175f9cebeb349d28e1e8a565b4cb74 Signed-off-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/49421 Tested-by: jenkins Tested-by: Maloo --- configure | 17 +++++++++-------- configure.ac | 18 ++++++++++-------- contrib/build-rpm | 5 +++++ e2fsprogs-RHEL-6.spec.in | 2 +- e2fsprogs-RHEL-7+.spec.in | 2 +- e2fsprogs-SUSE_LINUX-11+.spec.in | 2 +- util/gen-tarball.in | 6 +++--- version.h | 4 ++-- 8 files changed, 32 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 9f57a77..c50ab00 100755 --- a/configure +++ b/configure @@ -823,6 +823,7 @@ build_vendor build_cpu build E2FSPROGS_DATE +E2FSPROGS_PKGREL E2FSPROGS_PKGVER E2FSPROGS_VERSION E2FSPROGS_DAY @@ -4581,11 +4582,9 @@ fi MCONFIG=./MCONFIG BINARY_TYPE=bin -E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \ - | awk '{print $3}' | tr \" " " | awk '{print $1}'` -E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \ - | tr \" " " | awk '{print $1}'` -E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[1-9]$/s/^/0/') +E2FSPROGS_VERSION=`awk -F\" '/E2FSPROGS_VER/ { print $2 }' ${srcdir}/version.h` +E2FSPROGS_DATE=`awk -F\" '/E2FSPROGS_DATE/ { print $2 }' ${srcdir}/version.h` +E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{ printf "%02d", $1 }') MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'` YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'` @@ -4614,17 +4613,19 @@ Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;; printf "%s\n" "$as_me: WARNING: Unknown month $MONTH??" >&2;} ;; esac -base_ver=`echo $E2FSPROGS_VERSION | \ - sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'` +base_ver=`echo $E2FSPROGS_VERSION | sed -e 's/pre-//' -e 's/-.*//'` +base_rel=`echo $E2FSPROGS_VERSION | awk -F- '{ print $2 }'` date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY} case $E2FSPROGS_VERSION in *-WIP|pre-*) - E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec" + E2FSPROGS_PKGVER="$base_ver" + E2FSPROGS_PKGREL="WIP.$date_spec" ;; *) E2FSPROGS_PKGVER="$base_ver" + E2FSPROGS_PKGREL="$base_rel" ;; esac diff --git a/configure.ac b/configure.ac index 29d9928..9470795 100644 --- a/configure.ac +++ b/configure.ac @@ -11,11 +11,9 @@ BINARY_TYPE=bin dnl dnl This is to figure out the version number and the date.... dnl -E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \ - | awk '{print $3}' | tr \" " " | awk '{print $1}'` -E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \ - | tr \" " " | awk '{print $1}'` -E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[[1-9]]$/s/^/0/') +E2FSPROGS_VERSION=`awk -F\" '/E2FSPROGS_VER/ { print $2 }' ${srcdir}/version.h` +E2FSPROGS_DATE=`awk -F\" '/E2FSPROGS_DATE/ { print $2 }' ${srcdir}/version.h` +E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{ printf "%02d", $1 }') MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'` YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'` @@ -43,28 +41,32 @@ Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;; *) AC_MSG_WARN([Unknown month $MONTH??]) ;; esac -base_ver=`echo $E2FSPROGS_VERSION | \ - sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'` +base_ver=`echo $E2FSPROGS_VERSION | sed -e 's/pre-//' -e 's/-.*//'` +base_rel=`echo $E2FSPROGS_VERSION | awk -F- '{ print $2 }'` date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY} case $E2FSPROGS_VERSION in *-WIP|pre-*) - E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec" + E2FSPROGS_PKGVER="$base_ver" + E2FSPROGS_PKGREL="WIP.$date_spec" ;; *) E2FSPROGS_PKGVER="$base_ver" + E2FSPROGS_PKGREL="$base_rel" ;; esac unset DATE MONTH YEAR base_ver pre_vers date_spec AC_MSG_RESULT([Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION]) +AC_MSG_RESULT([Package version ${E2FSPROGS_PKGVER} release ${E2FSPROGS_PKGREL}]) AC_MSG_RESULT([Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}]) AC_SUBST(E2FSPROGS_YEAR) AC_SUBST(E2FSPROGS_MONTH) AC_SUBST(E2FSPROGS_DAY) AC_SUBST(E2FSPROGS_VERSION) AC_SUBST(E2FSPROGS_PKGVER) +AC_SUBST(E2FSPROGS_PKGREL) AC_SUBST(E2FSPROGS_DATE) dnl dnl Use diet libc diff --git a/contrib/build-rpm b/contrib/build-rpm index 45312c9..d9018ef 100644 --- a/contrib/build-rpm +++ b/contrib/build-rpm @@ -11,6 +11,7 @@ pwd=`pwd` currdir=`basename $pwd` pkgname=`grep Name: e2fsprogs.spec | awk '{print $2;}'` pkgvers=`grep Version: e2fsprogs.spec | awk '{print $2;}'` +pkgrel=`grep Release: e2fsprogs.spec | awk '{print $2;}'` builddir=${pkgname}-${pkgvers} # ensure that $TMP is set to something @@ -89,6 +90,10 @@ if [ ! -f "$SPECFILE" ]; then SPECFILE="$currdir/e2fsprogs.spec" fi echo "using SPECFILE=$SPECFILE" +grep VERSION $currdir/version.h +grep Version: $SPECFILE +grep Release: $SPECFILE + $RPM --define "_sourcedir $tmpdir" \ --define "_topdir ${RPM_TOPDIR:-$(rpm -E %_topdir)}" \ --define "_tmpdir ${RPM_TMPDIR:-$TMP}" \ diff --git a/e2fsprogs-RHEL-6.spec.in b/e2fsprogs-RHEL-6.spec.in index 562c2a4..d82d0f7 100644 --- a/e2fsprogs-RHEL-6.spec.in +++ b/e2fsprogs-RHEL-6.spec.in @@ -4,7 +4,7 @@ Summary: Utilities for managing ext2, ext3, and ext4 file systems Name: e2fsprogs Version: @E2FSPROGS_PKGVER@ -Release: 0%{?dist} +Release: @E2FSPROGS_PKGREL@%{?dist} # License tags based on COPYING file distinctions for various components License: GPLv2 diff --git a/e2fsprogs-RHEL-7+.spec.in b/e2fsprogs-RHEL-7+.spec.in index a94e369..c930a1f 100644 --- a/e2fsprogs-RHEL-7+.spec.in +++ b/e2fsprogs-RHEL-7+.spec.in @@ -1,7 +1,7 @@ Summary: Utilities for managing ext2, ext3, and ext4 file systems Name: e2fsprogs Version: @E2FSPROGS_PKGVER@ -Release: 0%{?dist} +Release: @E2FSPROGS_PKGREL@%{?dist} # License tags based on COPYING file distinctions for various components License: GPLv2 diff --git a/e2fsprogs-SUSE_LINUX-11+.spec.in b/e2fsprogs-SUSE_LINUX-11+.spec.in index 744d1a6..2d5370b 100644 --- a/e2fsprogs-SUSE_LINUX-11+.spec.in +++ b/e2fsprogs-SUSE_LINUX-11+.spec.in @@ -64,7 +64,7 @@ Conflicts: libcom_err-mini-devel %endif # Version: @E2FSPROGS_PKGVER@ -Release: 0%{_vendor} +Release: @E2FSPROGS_PKGREL@.%{_vendor} Summary: Utilities for the Second Extended File System License: GPL-2.0 Group: System/Filesystems diff --git a/util/gen-tarball.in b/util/gen-tarball.in index 997bd93..b2b2a86 100644 --- a/util/gen-tarball.in +++ b/util/gen-tarball.in @@ -5,7 +5,7 @@ srcdir=@srcdir@ top_srcdir=@top_srcdir@ top_dir=`cd $top_srcdir; pwd` -base_ver=`echo @E2FSPROGS_VERSION@ | sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'` +base_ver=`echo @E2FSPROGS_PKGVER@` base_e2fsprogs=`basename $top_dir` exclude=/tmp/exclude$$ GZIP=gzip @@ -16,12 +16,12 @@ GZIP=gzip # using a non-standard directory name for WIP releases. dpkg-source # complains, but life goes on. # -deb_pkgver=`echo @E2FSPROGS_PKGVER@ | sed -e 's/~/-/g'` +deb_pkgver=`echo @E2FSPROGS_PKGVER@-@E2FSPROGS_PKGREL@` case $1 in debian|ubuntu) SRCROOT="e2fsprogs-$deb_pkgver" - tarout="e2fsprogs_@E2FSPROGS_PKGVER@.orig.tar.gz" + tarout="e2fsprogs_@E2FSPROGS_PKGVER@-@E2FSPROGS_PKGREL@.orig.tar.gz" ;; all|*) SRCROOT="e2fsprogs-$base_ver" diff --git a/version.h b/version.h index 4402e8d..0d752cb 100644 --- a/version.h +++ b/version.h @@ -7,5 +7,5 @@ * file may be redistributed under the GNU Public License v2. */ -#define E2FSPROGS_VERSION "1.46.6" -#define E2FSPROGS_DATE "20-Dec-2022" +#define E2FSPROGS_VERSION "1.46.6-wc1" +#define E2FSPROGS_DATE "10-Jan-2023" -- 1.8.3.1