mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-18 11:55:32 -04:00
Make the build reproducible
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093201: Whilst working on the Reproducible Builds effort [0], we noticed that rsync could not be built reproducibly. This is because the date in the manual page can vary depending on whether there is a .git directory and the modification time of version.h and Mafile, which might get modified when patching via quilt. A patch is attached that makes this use SOURCE_DATE_EPOCH, which will always be reliable.
This commit is contained in:
committed by
Andrew Tridgell
parent
9994933c8c
commit
1c5ebdc4e5
@@ -248,6 +248,9 @@ def find_man_substitutions():
|
||||
|
||||
env_subs['date'] = time.strftime('%d %b %Y', time.gmtime(mtime + tz_offset)).lstrip('0')
|
||||
|
||||
if 'SOURCE_DATE_EPOCH' in os.environ:
|
||||
env_subs['date'] = time.strftime('%d %b %Y', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
|
||||
|
||||
|
||||
def html_via_commonmark(txt):
|
||||
return commonmark.HtmlRenderer().render(commonmark.Parser().parse(txt))
|
||||
|
||||
Reference in New Issue
Block a user