[asymptote] 01/01: Honour SOURCE_DATE_EPOCH, to make the build reproducible. (Closes: #823824)
This is an automated email from the git hooks/post-receive script.
preining pushed a commit to branch master
in repository asymptote.
commit 7c1e77402144bdb30c7cb2a07ce4d7f9f83f9c18
Author: Norbert Preining <norbert@preining.info>
Date: Tue May 10 15:40:10 2016 +0900
Honour SOURCE_DATE_EPOCH, to make the build reproducible. (Closes: #823824)
---
debian/changelog | 10 ++++++
debian/patches/honour-source-date-epoch | 62 +++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 73 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index b3e3117..d3a3841 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+asymptote (2.37.real-2) UNRELEASED; urgency=medium
+
+ [ Alexis Bienvenüe ]
+ * Honour SOURCE_DATE_EPOCH, to make the build reproducible. (Closes: #823824)
+
+ [ Norbert Preining ]
+ * ...
+
+ -- Norbert Preining <preining@debian.org> Tue, 10 May 2016 15:40:01 +0900
+
asymptote (2.37.real-1) unstable; urgency=medium
* Imported Upstream version 2.37.real - the previous 2.37 was only
diff --git a/debian/patches/honour-source-date-epoch b/debian/patches/honour-source-date-epoch
new file mode 100644
index 0000000..81d60b3
--- /dev/null
+++ b/debian/patches/honour-source-date-epoch
@@ -0,0 +1,62 @@
+Description: Honour SOURCE_DATE_EPOCH.
+ Honour the SOURCE_DATE_EPOCH environment variable to get documentation date
+ from last debian changelog entry.
+ This makes the build reproducible.
+ See https://reproducible-builds.org/specs/source-date-epoch/.
+Author: Alexis Bienvenüe <pado@passoire.fr>
+
+Index: asymptote-2.37.real/doc/FAQ/m-html.pl
+===================================================================
+--- asymptote-2.37.real.orig/doc/FAQ/m-html.pl
++++ asymptote-2.37.real/doc/FAQ/m-html.pl
+@@ -34,8 +34,8 @@ sub html_init {
+ print HTML "<html>\n";
+ $html_needpara= -1;
+ $html_end='';
+- chop($html_date=`date '+%d %B %Y'`);
+- chop($html_year=`date '+%Y'`);
++ $html_date=time2str("%d %B %Y", $ENV{SOURCE_DATE_EPOCH} || time, "UTC");
++ $html_year=time2str("%Y", $ENV{SOURCE_DATE_EPOCH} || time, "UTC");
+ }
+
+ sub html_startup {
+Index: asymptote-2.37.real/doc/FAQ/m-lout.pl
+===================================================================
+--- asymptote-2.37.real.orig/doc/FAQ/m-lout.pl
++++ asymptote-2.37.real/doc/FAQ/m-lout.pl
+@@ -23,7 +23,7 @@
+
+ sub lout_init {
+ open(LOUT,">$prefix.lout");
+- chop($dprint= `date '+%d %B %Y'`);
++ $dprint = time2str("%d %B %Y", $ENV{SOURCE_DATE_EPOCH} || time, "UTC");
+ $dprint =~ s/^0//;
+ }
+
+Index: asymptote-2.37.real/doc/FAQ/bfnnconv.pl
+===================================================================
+--- asymptote-2.37.real.orig/doc/FAQ/bfnnconv.pl
++++ asymptote-2.37.real/doc/FAQ/bfnnconv.pl
+@@ -21,6 +21,8 @@
+ # by the GPL. However, I would appreciate it if you credited me if
+ # appropriate in any documents you format using BFNN.)
+
++use Date::Format;
++
+ @outputs=('ascii','info','html');
+
+ while ($ARGV[0] =~ m/^\-/) {
+@@ -135,7 +137,12 @@ while (<>) {
+ m/([^\\])\`/ || warn "`$_'";
+ $_= $';
+ $cmd= $`.$1;
+- $it= `$cmd`; chop $it;
++ if($cmd =~ /date [\"\']\+(.*?)[\"\']/) {
++ my $format=$1;
++ $it=time2str($format, $ENV{SOURCE_DATE_EPOCH} || time, "UTC");
++ } else {
++ $it= `$cmd`; chop $it;
++ }
+ print $fh $it;
+ }
+ print $fh $_;
diff --git a/debian/patches/series b/debian/patches/series
index 2fcbe01..f673579 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
#old-gs-use-epswrite
#upstream-gsl2
#upstream-fix-mips-build-failure
+honour-source-date-epoch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/asymptote.git
Reply to: