Hi,
Whilst working on the "reproducible builds" effort [0], we noticed that
the gettextize tool generates ChangeLog files and entries which include
the current date, rendering generated builds unreproducible (eg. avahi
et al). The timestamps are also additionally timezone-specific.
The attached patch modifies gettextize to respect SOURCE_DATE_EPOCH[1]
if available. I have a GNU contributor agreement ([email protected])
[0] https://wiki.debian.org/ReproducibleBuilds
[1] https://reproducible-builds.org/specs/source-date-epoch/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff --git a/gettext-tools/misc/gettextize.in b/gettext-tools/misc/gettextize.in
index a4a77f4..0d40d29 100644
--- a/gettext-tools/misc/gettextize.in
+++ b/gettext-tools/misc/gettextize.in
@@ -398,7 +398,7 @@ please=
# Variable:
# - date current date, for use in ChangeLog entries.
-date=`date --utc +%Y-%m-%d`
+date=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
# func_copy from to
# copies a file.