RedHat: Add RPM_RELNOTES, RPM_CHANGELOG, and RPM_CELLSERVDB

Currently, when building the source RPM with make, the release notes and
change log are empty, and the CellServDB file is downloaded from
grand.central.org.

Instead, by default, package the NEWS file for the release notes, the
ChangeLog generated by the 'make-release' script, and a CellServDB file
in the source tree.

Add the RPM_RELNOTES and RPM_CHANGELOG makefile variables so we can
override the defaults if builders want to provide their own release
notes and change log files.  Builders can specify empty values on the
make command line to fallback to empty files for the RELNOTES and
ChangeLog (which was the old behavior before this change).

Add the RPM_CELLSERVDB makefile variable to specify the local CellServDB
file to be packaged. By default, package src/afsd/CellServDB from the
working tree (which matches the one specified in the openafs.spec.in
used to build the source rpm).  Builders can specify an empty
RPM_CELLSERVDB on the make command line to have makesrpm.pl download the
CellServDB file from grand.central.org (which was the old behavior
before this change).

Change-Id: Idf1afd1683d87d882d2c7e49058cbf18839e5c9e
Reviewed-on: https://gerrit.openafs.org/15406
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Michael Meffie 2023-04-12 17:11:47 -04:00
parent d3bbd0bda6
commit 86d9e3368d

View File

@ -761,10 +761,17 @@ clean2:
dist:
./build-tools/make-release --dir=packages HEAD
RPM_RELNOTES = NEWS
RPM_CHANGELOG = packages/ChangeLog
RPM_CELLSERVDB = src/afsd/CellServDB
srpm: dist
./src/packaging/RedHat/makesrpm.pl --dir=packages \
./src/packaging/RedHat/makesrpm.pl \
--dir=packages \
packages/openafs-*-src.tar.bz2 \
packages/openafs-*-doc.tar.bz2
packages/openafs-*-doc.tar.bz2 \
"$(RPM_RELNOTES)" \
"$(RPM_CHANGELOG)" \
"$(RPM_CELLSERVDB)"
rpm: srpm
rpmbuild --rebuild --define "_topdir @TOP_OBJDIR@/packages/rpmbuild" \