Package: hevea Version: 2.29-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps toolchain
Hi, currently, latex sources which include statements like \today and thus have to be built with '-exec xxdate.exe' do not respect the timestamp set via the environment variable SOURCE_DATE_EPOCH. Thus, source packages using hevea in this way are currently not reproducible. A quick check revealed that this affects at least src:dose3 and src:whizzytex. Since xxdate.exe is just a shell script, the fix is simple. Please consider applying the patch at the bottom of this email to make packages using hevea build reproducibly. Thanks! cheers, josch diff --git a/xxdate.exe b/xxdate.exe index 31e48a4..2b86087 100755 --- a/xxdate.exe +++ b/xxdate.exe @@ -1,17 +1,18 @@ #! /bin/sh +SDE="@${SOURCE_DATE_EPOCH:-$(date +%s)}" cat <<EOF %% TeX counters -\newcounter{year}\setcounter{year}{`date +"%Y" 2> /dev/null || date | awk '{print $NF}'`} -\newcounter{month}\setcounter{month}{`date +"%m"`} -\newcounter{day}\setcounter{day}{`date +"%d"`} -\newcounter{time}\setcounter{time}{60 * `date +"%H"` + `date +"%M"`} +\newcounter{year}\setcounter{year}{`date --utc --date=$SDE +"%Y" 2> /dev/null || date --utc --date=$SDE | awk '{print $NF}'`} +\newcounter{month}\setcounter{month}{`date --utc --date=$SDE +"%m"`} +\newcounter{day}\setcounter{day}{`date --utc --date=$SDE +"%d"`} +\newcounter{time}\setcounter{time}{60 * `date --utc --date=$SDE +"%H"` + `date --utc --date=$SDE +"%M"`} %% Extras -\newcounter{hour}\setcounter{hour}{`date +"%H"`} +\newcounter{hour}\setcounter{hour}{`date --utc --date=$SDE +"%H"`} \newcounter{Hour}\setcounter{Hour}{\value{hour}-(\value{hour}/12)*12} -\newcounter{weekday}\setcounter{weekday}{`date +"%w"`} -\newcounter{minute}\setcounter{minute}{`date +"%M"`} -\newcounter{second}\setcounter{second}{`date +"%S"`} +\newcounter{weekday}\setcounter{weekday}{`date --utc --date=$SDE +"%w"`} +\newcounter{minute}\setcounter{minute}{`date --utc --date=$SDE +"%M"`} +\newcounter{second}\setcounter{second}{`date --utc --date=$SDE +"%S"`} \def\ampm{\ifthenelse{\value{hour}>12}{PM}{AM}} -\def\timezone{`date +"%Z" 2> /dev/null || date | awk '{print $5}'`} -\def\heveadate{`date`} +\def\timezone{`date --utc --date=$SDE +"%Z" 2> /dev/null || date --utc --date=$SDE | awk '{print $5}'`} +\def\heveadate{`date --utc --date=$SDE`} EOF \ No newline at end of file