OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_16pre1-1-g1ef1cf3
Gerrit Code Review
gerrit@openafs.org
Wed, 13 May 2026 23:33:04 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit 1ef1cf3b31c1c2452227cc49c551d0f50c07bc60
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Apr 11 12:13:44 2026 -0400
RedHat: Set source_date_epoch to the current system time
Modern versions of rpmbuild (since 2016) support reproducible builds by
extracting the timestamp of the last entry of the changelog to use as a
build timestamp, called `source_date_epoch`. The `source_date_epoch`
timestamp is used to clamp the modification times of the files generated
(instead of the current system time), to set timestamps in the package
metadata (e.g., BUILDTIME), and to set the SOURCE_DATE_EPOCH environment
variable during the build. The SOURCE_DATE_EPOCH environment variable is
honored by the OpenAFS build system by embedding a timestamp in the
version string displayed by `rxdebug -version`.
Extracting the `source_date_epoch` timestamp from the %changelog works
well for downstream packaging, but is not ideal for our in-tree spec
file. Since this is used for development and as a reference for
packagers, the %changelog is not updated for each release. As a result,
the packages built with the in-tree spec file contain very old build
dates.
This change modifies our in-tree spec file to disable the default
behavior of extracting the `source_date_epoch` timestamp from the
changelog. Instead, set the `source_date_epoch` to the current system
time by default. Support is also added to allow the builder to specify
the `source_date_epoch` on the command line or in a macro file (e.g.,
~/.rpmmacros).
For example, to specify the timestamp from a tag name:
$ rpmbuild --define "source_date_epoch $(git log -1 --format=%ct openafs-stable-1_9_3pre1)" ...
To specify the timestamp from the mtime of a file:
$ rpmbuild --define "source_date_epoch $(date +%s -r path/to/filename)" ...
Include a comment to encourage downstream packagers to set the
`source_date_epoch_from_changelog` to 1 and update the %changelog on each
release.
Reviewed-on: https://gerrit.openafs.org/16772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit ece5b1727a940e8185f0386b66e874ed0640909b)
Change-Id: I08100fcb2c5fc7547de416026f790c9735e9bbaf
Reviewed-on: https://gerrit.openafs.org/16780
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/packaging/RedHat/openafs.spec.in | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
--
OpenAFS Master Repository