From 36879de26176fa57bbb707b3a3e5f5e3b2b42338 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Tue, 19 Dec 2017 21:13:21 +0100 Subject: [PATCH] texi2txt: Use ChangeLog date instead of build date in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good. This date call works with GNU date and BSD date. Without this patch, /usr/share/doc/packages/WindowMaker/README.i18n will differ in the line An alternative solution could use the $SOURCE_DATE_EPOCH variable defined in https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Carlos R. Mafra --- script/generate-txt-from-texi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/generate-txt-from-texi.sh b/script/generate-txt-from-texi.sh index 3800c72c..ee4e8603 100755 --- a/script/generate-txt-from-texi.sh +++ b/script/generate-txt-from-texi.sh @@ -822,7 +822,7 @@ function execute_commands(line, replaced_line, command) { } else if (command == "today") { # Make sure the date will be in english (we use "C" because it not certain # that the English locale is enabled on the machine of the user) - replaced_line = replaced_line "'"`LANG=C date '+%d %B %Y' | sed -e 's,^0,,' `"'"; + replaced_line = replaced_line "'"`LANG=C date -u -r ../../ChangeLog '+%d %B %Y' | sed -e 's,^0,,' `"'"; # Commands to display text in a special style ############################## } else if (command == "asis") {