bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Do not store build time in MODULES.html


From: Bruno Haible
Subject: Re: [PATCH] Do not store build time in MODULES.html
Date: Sun, 22 Mar 2020 18:17:16 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-174-generic; KDE/5.18.0; x86_64; ; )

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  <address@hidden>

        MODULES.html.sh: Add support for reproducible builds.
        Reported by Bernhard M. Wiedemann <address@hidden> 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
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]