From: Simon Wilkinson Date: Wed, 23 Mar 2011 15:35:35 +0000 (+0000) Subject: rpm: Build srpms without %dist in their name X-Git-Tag: upstream/1.8.0_pre1^2~4019 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b0921071dd1b4d460d406985bba9619561444055;p=packages%2Fo%2Fopenafs.git rpm: Build srpms without %dist in their name On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This leads to makesrpm.pl building SRPMS with .el6 in their release. As we endeavour to use the same SRPM on all of our Fedora platforms, this is less than ideal, so change makesrpm.pl to squash the setting of %dist before building the RPM. Change-Id: I5b5b9db7654ce21a269233e8950d4f4d1df81ad7 Reviewed-on: http://gerrit.openafs.org/4285 Reviewed-by: Alexander Ivan Redinger Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index 320ea0c64..fc372e9b3 100755 --- a/src/packaging/RedHat/makesrpm.pl +++ b/src/packaging/RedHat/makesrpm.pl @@ -150,7 +150,8 @@ if ($changelog) { } # Build an RPM -system("rpmbuild -bs --define \"_topdir $tmpdir/rpmdir\" ". +system("rpmbuild -bs --eval \"%undefine dist\" ". + "--define \"_topdir $tmpdir/rpmdir\" ". "$tmpdir/rpmdir/SPECS/openafs.spec > /dev/null") == 0 or die "rpmbuild failed : $!\n";