Whamcloud - gitweb
LU-16391 build: update version to 1.46.6-wc1 21/49421/7 v1.46.6-wc1
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Dec 2022 01:34:07 +0000 (18:34 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 10 Jan 2023 21:44:16 +0000 (21:44 +0000)
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 <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/49421
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
configure
configure.ac
contrib/build-rpm
e2fsprogs-RHEL-6.spec.in
e2fsprogs-RHEL-7+.spec.in
e2fsprogs-SUSE_LINUX-11+.spec.in
util/gen-tarball.in
version.h

index 9f57a77..c50ab00 100755 (executable)
--- 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
 
index 29d9928..9470795 100644 (file)
@@ -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
index 45312c9..d9018ef 100644 (file)
@@ -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}" \
index 562c2a4..d82d0f7 100644 (file)
@@ -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
index a94e369..c930a1f 100644 (file)
@@ -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
index 744d1a6..2d5370b 100644 (file)
@@ -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
index 997bd93..b2b2a86 100644 (file)
@@ -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"
index 4402e8d..0d752cb 100644 (file)
--- 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"