* [PATCH] Do not store build time in MODULES.html
@ 2020-03-11 4:55 Bernhard M. Wiedemann
2020-03-22 17:17 ` Bruno Haible
0 siblings, 1 reply; 2+ messages in thread
From: Bernhard M. Wiedemann @ 2020-03-11 4:55 UTC (permalink / raw)
To: bug-gnulib; +Cc: Bernhard M. Wiedemann
This allows for reproducible builds.
See https://reproducible-builds.org/ for why that matters.
This patch was done while working on reproducible builds for openSUSE.
---
MODULES.html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 7eab5e547..dce6c67f6 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -3695,7 +3695,7 @@ func_echo '<LI>A POT file and some PO files'
func_end UL
func_echo '<HR>'
-func_echo 'Generated from <CODE>MODULES.html.sh</CODE> on '`LC_ALL=C date +"%e %B %Y"`.
+func_echo 'Generated from <CODE>MODULES.html.sh</CODE>'.
func_end BODY
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Do not store build time in MODULES.html
2020-03-11 4:55 [PATCH] Do not store build time in MODULES.html Bernhard M. Wiedemann
@ 2020-03-22 17:17 ` Bruno Haible
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2020-03-22 17:17 UTC (permalink / raw)
To: bug-gnulib; +Cc: Bernhard M. Wiedemann
Hi Bernhard,
> func_echo '<HR>'
> -func_echo 'Generated from <CODE>MODULES.html.sh</CODE> on '`LC_ALL=C date +"%e %B %Y"`.
> +func_echo 'Generated from <CODE>MODULES.html.sh</CODE>'.
>
The date is important, so that readers of
<https://www.gnu.org/software/gnulib/MODULES.html> know whether it is up-to-date
or not.
However, you are right that picking the current date is inappropriate.
If a distro does a checkout of gnulib and then keeps packaging it
unmodified for one year, the date of the packaging is irrelevantl; it's
the date of the last git commit that matters.
2020-03-22 Bruno Haible <bruno@clisp.org>
MODULES.html.sh: Add support for reproducible builds.
Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00024.html>.
* MODULES.html.sh: Print the date of the last gnulib commit, not the
current date.
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 7eab5e5..b1638da 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -3695,7 +3695,9 @@ func_echo '<LI>A POT file and some PO files'
func_end UL
func_echo '<HR>'
-func_echo 'Generated from <CODE>MODULES.html.sh</CODE> on '`LC_ALL=C date +"%e %B %Y"`.
+git_checkout_date=`git log -n 1 --date=iso --format=fuller | sed -n -e 's/^CommitDate: //p'`
+pretty_date=`LC_ALL=C date +"%e %B %Y" --date="$git_checkout_date"`
+func_echo "Generated by <CODE>MODULES.html.sh</CODE> from a git checkout as of ${pretty_date}."
func_end BODY
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-22 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 4:55 [PATCH] Do not store build time in MODULES.html Bernhard M. Wiedemann
2020-03-22 17:17 ` Bruno Haible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).