Your message dated Fri, 17 Jun 2016 16:35:57 +0000
with message-id <[email protected]>
and subject line Bug#827197: fixed in gnuplot 5.0.3+dfsg3-6
has caused the Debian Bug report #827197,
regarding gnuplot: please make the build reproducible 
(timestamps,username,environment)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
827197: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827197
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: gnuplot
Version: 5.0.3+dfsg3-5
Severity: wishlist
Tags: upstream
User: [email protected]
Usertags: timestamps username environment
X-Debbugs-Cc: [email protected]
Control: block -1 by 827187

Dear Maintainer,

While working on the "reproducible builds" effort [1], we have noticed
that gnuplot has following reproducibility issues :

* gnuplot embeds timestamps in its ps output. When the SOURCE_DATE_EPOCH
environment variable [2] is set, it can be used to make the output
reproducible. See 13_honour_SOURCE_DATE_EPOCH.patch

* gnuplot embeds the username in its ps output. I think the unix
username is not usefull in this output, and can be stripped. See
14_strip_username_from_output.patch - maybe it is possible to strip it
only if SOURCE_DATE_EPOCH is set if this username is considered to be
relevant here.

* The SHELL used when building gnuplot is recorded in the Makefiles
included in gnuplot-doc. I think /bin/sh can always be used instead. See
changes with override_dh_auto_configure

Once these patches are applied, and once https://bugs.debian.org/827187
is fixed, gnuplot can be built reproducibly in our current experimental
framework.

Regards,
Alexis Bienvenüe.

[1] https://wiki.debian.org/ReproducibleBuilds
[2] https://reproducible-builds.org/specs/source-date-epoch/


diff -Nru gnuplot-5.0.3+dfsg3/debian/changelog gnuplot-5.0.3+dfsg3/debian/changelog
--- gnuplot-5.0.3+dfsg3/debian/changelog	2016-06-10 20:03:10.000000000 +0200
+++ gnuplot-5.0.3+dfsg3/debian/changelog	2016-06-13 17:01:48.000000000 +0200
@@ -1,3 +1,9 @@
+gnuplot (5.0.3+dfsg3-5.0~reproducible1) UNRELEASED; urgency=medium
+
+  * Make the build reproducible.
+
+ -- Alexis Bienvenüe <[email protected]>  Mon, 13 Jun 2016 17:01:48 +0200
+
 gnuplot (5.0.3+dfsg3-5) unstable; urgency=medium
 
   [ Sven Joachim ]
diff -Nru gnuplot-5.0.3+dfsg3/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch gnuplot-5.0.3+dfsg3/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch
--- gnuplot-5.0.3+dfsg3/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch	1970-01-01 01:00:00.000000000 +0100
+++ gnuplot-5.0.3+dfsg3/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch	2016-06-13 17:00:49.000000000 +0200
@@ -0,0 +1,57 @@
+Description: Honour SOURCE_DATE_EPOCH
+ Get date from the environment variable SOURCE_DATE_EPOCH (when set),
+ to build output timestamps.
+ See https://reproducible-builds.org/specs/source-date-epoch/
+Author: Alexis Bienvenüe <[email protected]>
+
+--- gnuplot-5.0.3+dfsg3.orig/term/post.trm
++++ gnuplot-5.0.3+dfsg3/term/post.trm
+@@ -1657,15 +1657,45 @@ end\n\
+     int i;
+     time_t now;
+     char *timedate;
+-
++    char *source_date_epoch;
++    unsigned long long epoch;
++    char *endptr;
++ 
+     ps_common_uses_fonts = uses_fonts;
+     ps_common_xoff = xoff;
+     ps_common_yoff = yoff;
+ 
+     ps_page = 0;
+ 
+-    time(&now);
+-    timedate=asctime(localtime(&now));
++    /* get source date from environment variable SOURCE_DATE_EPOCH, if set.
++       See https://reproducible-builds.org/specs/source-date-epoch/ */
++    source_date_epoch = getenv("SOURCE_DATE_EPOCH");
++    if (source_date_epoch) {
++      errno = 0;
++      epoch = strtoull(source_date_epoch, &endptr, 10);
++      if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
++          || (errno != 0 && epoch == 0)) {
++        fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n", strerror(errno));
++        exit(EXIT_FAILURE);
++      }
++      if (endptr == source_date_epoch) {
++        fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n", endptr);
++        exit(EXIT_FAILURE);
++      }
++      if (*endptr != '\0') {
++        fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n", endptr);
++        exit(EXIT_FAILURE);
++      }
++      if (epoch > ULONG_MAX) {
++        fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to: %lu but was found to be: %llu \n", ULONG_MAX, epoch);
++        exit(EXIT_FAILURE);
++      }
++      now = epoch;
++      timedate=asctime(gmtime(&now));
++    } else {
++      time(&now);
++      timedate=asctime(localtime(&now));
++    }
+     timedate[strlen(timedate)-1]='\0';
+ 
+ #ifdef PSLATEX_DRIVER
diff -Nru gnuplot-5.0.3+dfsg3/debian/patches/14_strip_username_from_output.patch gnuplot-5.0.3+dfsg3/debian/patches/14_strip_username_from_output.patch
--- gnuplot-5.0.3+dfsg3/debian/patches/14_strip_username_from_output.patch	1970-01-01 01:00:00.000000000 +0100
+++ gnuplot-5.0.3+dfsg3/debian/patches/14_strip_username_from_output.patch	2016-06-13 17:00:49.000000000 +0200
@@ -0,0 +1,36 @@
+Description: Strip username from output
+ Strip username from output to make it reproducible.
+Author: Alexis Bienvenüe <[email protected]>
+
+Index: gnuplot-5.0.3+dfsg3/term/post.trm
+===================================================================
+--- gnuplot-5.0.3+dfsg3.orig/term/post.trm
++++ gnuplot-5.0.3+dfsg3/term/post.trm
+@@ -1644,7 +1644,6 @@ SDict begin [\n\
+   /Title (%s)\n\
+   /Subject (gnuplot plot)\n\
+   /Creator (gnuplot %s patchlevel %s)\n\
+-  /Author (%s)\n\
+ %%  /Producer (gnuplot)\n\
+ %%  /Keywords ()\n\
+   /CreationDate (%s)\n\
+@@ -1821,18 +1820,11 @@ end\n\
+ 
+     /* HH: print pdf information interpreted by ghostscript/acrobat */
+     {
+-	char *username=getusername();
+-	char *username2=PS_escape_string(username,"()\\");
+ 	char *outstr2=PS_escape_string(outstr,"()\\");
+ 	fprintf(gppsfile, psi3,
+ 		outstr2?outstr2:"",
+-		gnuplot_version, gnuplot_patchlevel,
+-		username2?username2:"", 
++		gnuplot_version, gnuplot_patchlevel, 
+ 		timedate);
+-	if (username)
+-	    free(username);
+-	if (username2)
+-	    free(username2);
+ 	if (outstr2)
+ 	    free(outstr2);
+     }
diff -Nru gnuplot-5.0.3+dfsg3/debian/patches/series gnuplot-5.0.3+dfsg3/debian/patches/series
--- gnuplot-5.0.3+dfsg3/debian/patches/series	2016-02-22 18:58:53.000000000 +0100
+++ gnuplot-5.0.3+dfsg3/debian/patches/series	2016-06-13 17:00:49.000000000 +0200
@@ -6,3 +6,5 @@
 10_removepicins.patch
 11_fix_linkage_wx.patch
 12_info.patch
+13_honour_SOURCE_DATE_EPOCH.patch
+14_strip_username_from_output.patch
diff -Nru gnuplot-5.0.3+dfsg3/debian/rules gnuplot-5.0.3+dfsg3/debian/rules
--- gnuplot-5.0.3+dfsg3/debian/rules	2016-06-09 22:22:41.000000000 +0200
+++ gnuplot-5.0.3+dfsg3/debian/rules	2016-06-13 17:00:49.000000000 +0200
@@ -35,11 +35,11 @@
 
 override_dh_auto_configure:
 	mkdir -p $(BUILDDIR_NOX)
-	cd $(BUILDDIR_NOX);  ./../../configure $(conf_opts) --with-qt=no --without-x --disable-wxwidgets
+	cd $(BUILDDIR_NOX); CONFIG_SHELL=/bin/sh ./../../configure $(conf_opts) --with-qt=no --without-x --disable-wxwidgets
 	mkdir -p $(BUILDDIR_X11)
-	cd $(BUILDDIR_X11); ../../configure $(conf_opts) --with-qt=no --with-tutorial
+	cd $(BUILDDIR_X11); CONFIG_SHELL=/bin/sh ../../configure $(conf_opts) --with-qt=no --with-tutorial
 	mkdir -p $(BUILDDIR_QT)
-	cd $(BUILDDIR_QT); ../../configure $(conf_opts)  --enable-qt
+	cd $(BUILDDIR_QT); CONFIG_SHELL=/bin/sh ../../configure $(conf_opts)  --enable-qt
 
 override_dh_auto_build:
 	dh_auto_build -a -- -C $(BUILDDIR_NOX)/src

--- End Message ---
--- Begin Message ---
Source: gnuplot
Source-Version: 5.0.3+dfsg3-6

We believe that the bug you reported is fixed in the latest version of
gnuplot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Anton Gladky <[email protected]> (supplier of updated gnuplot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 13 Jun 2016 22:06:57 +0200
Source: gnuplot
Binary: gnuplot gnuplot-doc gnuplot-nox gnuplot-qt gnuplot-x11 gnuplot-data
Architecture: source
Version: 5.0.3+dfsg3-6
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Team 
<[email protected]>
Changed-By: Anton Gladky <[email protected]>
Description:
 gnuplot    - Command-line driven interactive plotting program, version 5
 gnuplot-data - Command-line driven interactive plotting program. Data-files
 gnuplot-doc - Command-line driven interactive plotting program. Doc-package
 gnuplot-nox - Command-line driven interactive plotting program. No-X package
 gnuplot-qt - Command-line driven interactive plotting program. QT-package
 gnuplot-x11 - Command-line driven interactive plotting program. X-package
Closes: 827197
Changes:
 gnuplot (5.0.3+dfsg3-6) unstable; urgency=medium
 .
   [ Alexis Bienvenüe ]
   * [8487b29] Make the build reproducible. (Closes: #827197)
Checksums-Sha1:
 cd1ce629d92c874dc8e5ce6bfac7c65e2b465661 2706 gnuplot_5.0.3+dfsg3-6.dsc
 39e1b4099d3fc61b662ce35f28dffa10cc865647 29132 
gnuplot_5.0.3+dfsg3-6.debian.tar.xz
Checksums-Sha256:
 665a77f2cafa00bb38fe4e83c161fe0792aced3f653b3435f25e59ebdf9b5cf0 2706 
gnuplot_5.0.3+dfsg3-6.dsc
 c90841a300abeb58ef5161bc78e818734f9b42de182dda6bbec53608960f433e 29132 
gnuplot_5.0.3+dfsg3-6.debian.tar.xz
Files:
 02844d1f445d5d91fd7c4119359419d3 2706 math optional gnuplot_5.0.3+dfsg3-6.dsc
 36fbfcf2737a8b3dd5f3de91a405ca68 29132 math optional 
gnuplot_5.0.3+dfsg3-6.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJXZA9RAAoJENPhc4PPp/8G7EsP/2qY/XPPwlA5TVpoTAFUldSD
R7NnFhR9eXARCGbeg8b2Euje2KkczXoezMjJEFkW+ELiBXUF1IPqXw8hRdh5IjvR
bnNf3cpG7+zymdT2n0csBjmevMciLFn0PHvKPEaIWt7fLwvdwJ48rRNzbsfKcxOw
aQtypwXmDhXwF7foXoNRle5/22H44NsQnYTGXt4nvY/sjm1Yd+OL0t9bkQf0Vn7r
YWqyvJYG/9/LD185vCi2NLF4QJFDrT2KAoadOqREIQogbj7jD4an5SStQCYQzL6r
I2zUakyFHtzdeAOt4bhx7eOqvnrYeZG0ic3Xwdu5TZLWcWkDpuoMDgJGXri497CK
Sb/pwP6beQ59GgLbdlACaA5zbQ0z6G2wLec6cyT3psMj3Aw63AR+rKSLtyMAqlZq
H+hgMeP89WnGG4u/L93N0aF1W4vQmJt6TXWjp2yY/vb0rarWkK16PesbgXhjx2C/
rB/4lYBQXztQlePmMccSlV5c9XcoPw/WVfJSN1vzrDwaEVIuXWqKEqw3df9oOOWm
YUdS8RbR099KRPsiiMFsne2MLAljakhoGVSldXedAuqnKQ4vXU2rTbElatVEgJDc
SGD00lpUDVhVxZADQvAtcX0NyXkhJ9C2rN/lS81KsGUo77+QDev5gHyA5kHqjgiR
yDDJ+S9YFQj9tVI+rzFn
=UYIU
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to