[Rpm-maint] [rpm-software-management/rpm] Increment build date every release (PR #2677)
Jan Zerebecki
notifications at github.com
Fri Sep 22 11:27:43 UTC 2023
for %source_date_epoch_from_changelog to avoid breaking rsync without --checksum or anything else that relies on modification time stamp of files to detect changes. Only use the number at the start of the string for this. To ensure clamping mtime still works the date needs to be in the past, so a day is substracted.
Because the release is a string with multiple version components, it could be much bigger than a unix time stamp. E.g. in Fedora 3.fc40 is common. And there are packages that are not touched for years. So even only including the 40 would reduce the available numbers for rebuilds too much, e.g. for 3*40, then one day of SOURCE_DATE_EPOCH only leaves space for a release up to 2160.fc40 ( =60*60*24/40 ). So only use the 3 in this example to increment the date.
SOURCE_DATE_EPOCH (see
https://reproducible-builds.org/docs/source-date-epoch/ ) should be increased every time the build output changes. Rebuilds with different build dependencies do not necessarily have a new changelog entry. To ensure that it increases increment the SOURCE_DATE_EPOCH by the release number.
The reason for it is that when it does not increase there may be complications. When %clamp_mtime_to_source_date_epoch and %source_date_epoch_from_changelog are enabled and a rebuild is done with different build dependencies a file may have different content but with the same mtime. When two releases of this rpm are extracted after each other at the same location and the extracted files are synced with rsync without --checksum, then the resulting copy will contain a mix of files from the old and new build. This can happen on installed systems due to updates when it is then backed up with rsync. While it is not safe generally safe to rely on mtimes and thus nor to backup systems without --checksum, we should not unnecessarily break things. We came across this problem because this happens for rpm repos from OpenSUSE that have extracted files used for installing from a repo, which get broken when mirroring with rsync, see
https://bugzilla.suse.com/show_bug.cgi?id=1148824 .
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/2677
-- Commit Summary --
* Increment build date every release
-- File Changes --
M build/build.c (34)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/2677.patch
https://github.com/rpm-software-management/rpm/pull/2677.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2677
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2677 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230922/36a1a368/attachment.html>
More information about the Rpm-maint
mailing list