From: Andrew Deason Date: Wed, 1 Sep 2010 15:18:17 +0000 (-0500) Subject: RedHat: Use git-version in makesrpm.pl X-Git-Tag: openafs-devel-1_5_77~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8ff34a177197e3b62847856c4c9e97e910dba9ab;p=packages%2Fo%2Fopenafs.git RedHat: Use git-version in makesrpm.pl We no longer have the OpenAFS version in the AM_INIT_AUTOMAKE. Get the version from the equivalent AC_INIT version, which is determined by running build-tools/git-version. So, run git-version to get the version. Change-Id: I5feb72ba35566315654ab88f2047be8a7ac6b40a Reviewed-on: http://gerrit.openafs.org/2640 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 346ccf51ddedadd7f6709276237c26b7871ffbaf) Reviewed-on: http://gerrit.openafs.org/2691 --- diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index be36c141d..7ab662161 100755 --- a/src/packaging/RedHat/makesrpm.pl +++ b/src/packaging/RedHat/makesrpm.pl @@ -30,7 +30,8 @@ if (! -f $srcball) { my $tmpdir = File::Temp::tempdir(CLEANUP => 1); system("tar -C $tmpdir -xvjf $srcball '\*/configure.ac' ". - "'\*/src/packaging/RedHat' > /dev/null")==0 + "'\*/src/packaging/RedHat' ". + "'\*/build-tools' > /dev/null")==0 or die "Unable to unpack src tar ball\n"; my $dirh = IO::Dir->new($tmpdir); @@ -65,6 +66,10 @@ while(<$fh>) { } undef $fh; +if (not defined($afsversion)) { + $afsversion = `"$srcdir/build-tools/git-version" "$srcdir"`; +} + # Build the RPM root print "Building version $afsversion\n";