[Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)
Zbigniew Jędrzejewski-Szmek
notifications at github.com
Fri Feb 23 19:10:59 UTC 2024
When %autosetup -S git is used, a bunch of git commits are created. Without an override, their metadata will include the current time. Many projects include the git hash of HEAD in the build information, which means that the build result is not reproducible. Since we're creating a scratch repo ourselves, this hash doesn't have any meaning outside of the build. If $SOURCE_DATE_EPOCH is set, use that as the commit timestamp instead. (If $SOURCE_DATE_EPOCH is _not_ set, use the current timestamp as before. When $GIT_{COMMITTER,AUTHOR}_DATE are empty, git ignores them.)
For projects which somehow make use of the git commit information, this fixes an irreproducibility. For projects which don't care about the git hash, this should make no difference.
Fixes https://pagure.io/fedora-reproducible-builds/project/issue/9.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/2930
-- Commit Summary --
* Set git commit dates based on $SOURCE_DATE_EPOCH
-- File Changes --
M macros.in (11)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/2930.patch
https://github.com/rpm-software-management/rpm/pull/2930.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2930
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2930 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240223/8e7cc26a/attachment.html>
More information about the Rpm-maint
mailing list