From 346ccf51ddedadd7f6709276237c26b7871ffbaf Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 1 Sep 2010 10:18:17 -0500 Subject: [PATCH] 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 --- src/packaging/RedHat/makesrpm.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index be36c14..7ab6621 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"; -- 1.9.4