Your message dated Fri, 15 Apr 2016 12:32:26 +0000
with message-id <[email protected]>
and subject line Bug#819911: fixed in transfig 1:3.2.5.e-6
has caused the Debian Bug report #819911,
regarding transfig: please honour SOURCE_DATE_EPOCH
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.)


-- 
819911: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819911
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: transfig
Version: 1:3.2.5.e-5
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: toolchain
X-Debbugs-Cc: [email protected]

Dear Maintainer,

While working on the “reproducible builds” effort [1], we have noticed
that some packages (like kannel) use fig2dev in their building process,
resulting in timestamps in postscript files that break reproducibility.

To solve this kind of issues, it would be nice to have transfig support
the SOURCE_DATE_EPOCH environment variable [2].

See the attached patch for a solution to this issue.

Regards,
Alexis Bienvenüe.

[1] https://wiki.debian.org/ReproducibleBuilds
[2] https://reproducible-builds.org/specs/source-date-epoch/
diff -Nru transfig-3.2.5.e/debian/changelog transfig-3.2.5.e/debian/changelog
--- transfig-3.2.5.e/debian/changelog	2016-01-30 11:49:30.000000000 +0100
+++ transfig-3.2.5.e/debian/changelog	2016-04-03 16:42:27.000000000 +0200
@@ -1,3 +1,9 @@
+transfig (1:3.2.5.e-5.0~reproducible1) unstable; urgency=medium
+
+  * Honour SOURCE_DATE_EPOCH environment variable
+
+ -- Alexis Bienvenüe <[email protected]>  Sun, 03 Apr 2016 16:42:27 +0200
+
 transfig (1:3.2.5.e-5) unstable; urgency=medium
 
   * Upgrade to Standards-Version 3.9.6 (no changes).
diff -Nru transfig-3.2.5.e/debian/patches/33_honour_SOURCE_DATE_EPOCH.patch transfig-3.2.5.e/debian/patches/33_honour_SOURCE_DATE_EPOCH.patch
--- transfig-3.2.5.e/debian/patches/33_honour_SOURCE_DATE_EPOCH.patch	1970-01-01 01:00:00.000000000 +0100
+++ transfig-3.2.5.e/debian/patches/33_honour_SOURCE_DATE_EPOCH.patch	2016-04-03 19:11:44.000000000 +0200
@@ -0,0 +1,147 @@
+Description: Honour SOURCE_DATE_EPOCH variable
+ Honour SOURCE_DATE_EPOCH environment variable when creating
+ PS and pictex files.
+Author: Alexis Bienvenüe <[email protected]>
+
+Index: transfig-3.2.5.e/fig2dev/dev/genpictex.c
+===================================================================
+--- transfig-3.2.5.e.orig/fig2dev/dev/genpictex.c
++++ transfig-3.2.5.e/fig2dev/dev/genpictex.c
+@@ -125,7 +125,6 @@ genpictex_start(objects)
+ F_compound	*objects;
+ {
+ 	char		host[256];
+-	time_t		when;
+ 	struct passwd	*who;
+ 
+ 	texfontsizes[0] = texfontsizes[1] = 
+@@ -135,12 +134,11 @@ F_compound	*objects;
+ 
+ 	/* announce filename, version etc */
+ 
+-	(void) time(&when);
+ 	fprintf(tfp, "%%Title: %s\n",
+ 		(name? name: ((from) ? from : "stdin")));
+ 	fprintf(tfp, "%%%%Created by: %s Version %s Patchlevel %s\n",
+ 		prog, VERSION, PATCHLEVEL);
+-	fprintf(tfp, "%%%%CreationDate: %s", ctime(&when));
++	fprintf(tfp, "%%%%CreationDate: %s", creation_date());
+ 	if (gethostname(host, sizeof(host)) == -1)
+ 	    (void)strcpy(host, "unknown-host!?!?");
+ 	if ( !anonymous) {
+Index: transfig-3.2.5.e/fig2dev/dev/genps.c
+===================================================================
+--- transfig-3.2.5.e.orig/fig2dev/dev/genps.c
++++ transfig-3.2.5.e/fig2dev/dev/genps.c
+@@ -456,7 +456,6 @@ F_compound	*objects;
+ {
+ 	char		 host[256];
+ 	struct passwd	*who;
+-	time_t		 when;
+ 	int		 itmp, jtmp;
+ 	int 		 i;
+ 	int		 cliplx, cliply, clipux, clipuy;
+@@ -626,12 +625,11 @@ F_compound	*objects;
+ 
+ 	if (gethostname(host, sizeof(host)) == -1)
+ 	    (void)strcpy(host, "unknown-host!?!?");
+-	(void) time(&when);
+ 	fprintf(tfp, "%%%%Title: %s\n",
+ 	    (name? name: ((from) ? from : "stdin")));
+ 	fprintf(tfp, "%%%%Creator: %s Version %s Patchlevel %s\n",
+ 		prog, VERSION, PATCHLEVEL);
+-	fprintf(tfp, "%%%%CreationDate: %s", ctime(&when));
++	fprintf(tfp, "%%%%CreationDate: %s", creation_date());
+ 	if ( !anonymous) {
+ 	    who = getpwuid(getuid());
+ 	    if (who)
+Index: transfig-3.2.5.e/fig2dev/dev/readjpg.c
+===================================================================
+--- transfig-3.2.5.e.orig/fig2dev/dev/readjpg.c
++++ transfig-3.2.5.e/fig2dev/dev/readjpg.c
+@@ -92,7 +92,6 @@ void
+ JPEGtoPS(char *jpegfile, FILE *PSfile) {
+   imagedata	*JPEG;
+   size_t	 n;
+-  time_t	 t;
+   int		 i, filtype;
+   char		 realname[PATH_MAX];
+ 
+@@ -101,13 +100,11 @@ JPEGtoPS(char *jpegfile, FILE *PSfile) {
+   /* reopen the file */
+   JPEG->fp = open_picfile(jpegfile, &filtype, True, realname);
+ 
+-  time(&t);
+-
+   /* produce EPS header comments */
+   fprintf(PSfile, "%%!PS-Adobe-3.0 EPSF-3.0\n");
+   fprintf(PSfile, "%%%%Creator: jpeg2ps %s by Thomas Merz\n", VERSION);
+   fprintf(PSfile, "%%%%Title: %s\n", JPEG->filename);
+-  fprintf(PSfile, "%%%%CreationDate: %s", ctime(&t));
++  fprintf(PSfile, "%%%%CreationDate: %s", creation_date());
+   fprintf(PSfile, "%%%%BoundingBox: %d %d %d %d\n", 
+                    0, 0, JPEG->width, JPEG->height);
+   fprintf(PSfile, "%%%%DocumentData: %s\n", 
+Index: transfig-3.2.5.e/fig2dev/fig2dev.c
+===================================================================
+--- transfig-3.2.5.e.orig/fig2dev/fig2dev.c
++++ transfig-3.2.5.e/fig2dev/fig2dev.c
+@@ -31,6 +31,8 @@
+ #include "drivers.h"
+ #include "bound.h"
+ #include "read.h"
++#include <errno.h>
++#include <limits.h>
+ 
+ extern	int	 fig_getopt();
+ extern	char	*optarg;
+@@ -889,3 +891,40 @@ gs_broken_pipe(int sig)
+   exit(1);
+ }
+ 
++char*
++creation_date()
++{
++  struct tm *build_time;
++  time_t now;
++  char *source_date_epoch;
++  unsigned long long epoch;
++  char *endptr;
++
++  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;
++    return(asctime(gmtime(&now)));
++  } else {
++    time(&now);
++    return(ctime(&now));
++  }
++}
+Index: transfig-3.2.5.e/fig2dev/fig2dev.h
+===================================================================
+--- transfig-3.2.5.e.orig/fig2dev/fig2dev.h
++++ transfig-3.2.5.e/fig2dev/fig2dev.h
+@@ -229,3 +229,4 @@ typedef struct _point
+     int x,y;
+ } Point;
+ 
++extern char* creation_date();
diff -Nru transfig-3.2.5.e/debian/patches/series transfig-3.2.5.e/debian/patches/series
--- transfig-3.2.5.e/debian/patches/series	2014-08-26 10:06:06.000000000 +0200
+++ transfig-3.2.5.e/debian/patches/series	2016-04-01 17:00:02.000000000 +0200
@@ -18,3 +18,4 @@
 30_fprintf_format.patch
 31_index_not_static.patch
 32_dev_Imake_typo.patch
+33_honour_SOURCE_DATE_EPOCH.patch

--- End Message ---
--- Begin Message ---
Source: transfig
Source-Version: 1:3.2.5.e-6

We believe that the bug you reported is fixed in the latest version of
transfig, 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.
Roland Rosenfeld <[email protected]> (supplier of updated transfig 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: SHA256

Format: 1.8
Date: Wed, 06 Apr 2016 09:19:18 +0200
Source: transfig
Binary: transfig
Architecture: source amd64
Version: 1:3.2.5.e-6
Distribution: unstable
Urgency: medium
Maintainer: Roland Rosenfeld <[email protected]>
Changed-By: Roland Rosenfeld <[email protected]>
Description:
 transfig   - Utilities for converting XFig figure files
Closes: 819911
Changes:
 transfig (1:3.2.5.e-6) unstable; urgency=medium
 .
   * 33_honour_SOURCE_DATE_EPOCH: Honour SOURCE_DATE_EPOCH environment
     variable. Thanks to Alexis Bienvenüe (Closes: #819911).
   * Use -std=c99 to make the former patch buildable on jessie.
   * Add -p to QUILT_DIFF_OPTS.
   * Upgrade to Standards-Version 3.9.8 (no changes).
   * Make copyright DEP-5 compliant.
Checksums-Sha1:
 9349960b9c093bb4d146e1d6520e0930e738af38 1945 transfig_3.2.5.e-6.dsc
 016a13ba175ee3a8e766fc55c26ac4a0e46421be 226316 
transfig_3.2.5.e-6.debian.tar.xz
 3e03e8cf60b360fe3ef0bbfafd3d85afd19677d2 487888 
transfig-dbgsym_3.2.5.e-6_amd64.deb
 50e0c2c39ffd7f5421670ef22d3511fed5952157 635236 transfig_3.2.5.e-6_amd64.deb
Checksums-Sha256:
 a4b7578cd51feef0dfc4adea4997a3791a717d4b06a7f52be83ca3bd1e60ef59 1945 
transfig_3.2.5.e-6.dsc
 26da30088fc60cd5cb61ddca1e6dbd206a6623df340d66c2c386996951c3aacf 226316 
transfig_3.2.5.e-6.debian.tar.xz
 baf30370cc9a99a14fcef401cf837ce3f37e0499b798a50d207c8809a40851e0 487888 
transfig-dbgsym_3.2.5.e-6_amd64.deb
 aa4d81314c4a7fc929d4346f3f693a5daec7eaa4306b416050271c7c2c9a10e6 635236 
transfig_3.2.5.e-6_amd64.deb
Files:
 5453ef5377beb0ad0e30fc93541b84a9 1945 graphics optional transfig_3.2.5.e-6.dsc
 cac6f20f8cfbbc629db95361952e6f05 226316 graphics optional 
transfig_3.2.5.e-6.debian.tar.xz
 9fe9ffbe1dde885bab6a981bec1156ea 487888 debug extra 
transfig-dbgsym_3.2.5.e-6_amd64.deb
 778bd0008efb8652374dcd71f9e77477 635236 graphics optional 
transfig_3.2.5.e-6_amd64.deb

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

iQIcBAEBCAAGBQJXEMqTAAoJEAJxO8/KVBCypuUP/RDp3pb3A3a4an+2ycqqncuT
IG/HtzRDt7xx/zvOYqsJ6MFRf4jKcWKX9XvxAMe8t4G2Tyc5enwZ5aBMc39bHgE1
gJpYNsJppqDY4Xs/uv4bN8Qum8J5kWPKefHUnDn//A7pn2n2G7K1mzMzxf1ilm6U
ZRMdzY36NgUC3ZwZkzD8nM3lZIQ296AE+byKKO5u2QDQWusZitacUM20Et4fYtja
q6WHAaL9Y8+Pxe86xLATYw0rOf17nMxXoQ2CaLv2EaIbu14rkxoBwQCz0yEggRdR
I4quwgDTlCTXNMy3SBW6MrDscFCXGfoA94aXhif/mdVNBQytJc/Lo/V0LScZ3hHw
BGlgiU05fEsThO56lO6u318w/4MhYDR5CwnCn2CMh4CbCCzWeilDMIpEMGB4agZo
rIVZP8+6Yq9IXDyR0fuVLrltgPJgK+ZRrhtvokd8QsH29BHFS9TmMhH/KX+CvuBc
5PGINIRG3teutb2Da8mgyo969uihfnD+ukH6FAi+dzs8D5nbYD+Jcu2kulpxJH7O
YpM0MGByVm8mPqay8Dj9bfjQW5ic7cQQv6a/Ew/QjGyA+sxZd0f6TBPOFmyNLngF
wTeLJogvx0ftml+OVAu3GdUcY13pqx+yuONoO8YQtB5g/WDKqQQMUOAgjgPTDh8E
Ah3+s0nrArbCnym38DvG
=Se87
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to