Your message dated Wed, 31 Jul 2019 19:04:36 +0200
with message-id <[email protected]>
and subject line Re: Bug#931854: liblopsub: please make the output of lopsubgen
reproducible
has caused the Debian Bug report #931854,
regarding liblopsub: please make the output of lopsubgen reproducible
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.)
--
931854: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931854
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: liblopsub
Version: 1.0.2-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: toolchain timestamps
X-Debbugs-Cc: [email protected]
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that liblopsub generates output that is not reproducible. The
lopsubgen utility does not respect SOURCE_DATE_EPOCH [1] and thus
packages such as src:tfortune are rendered unreproducible as they
then encode the build date and time.
Patch attached.
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/specs/source-date-epoch/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff --git a/lsg.c b/lsg.c
index 54b7816..bbad187 100644
--- a/lsg.c
+++ b/lsg.c
@@ -626,12 +626,19 @@ static void gen_man(struct lls_parse_result *lpr, const
char *cmdline)
if (suite.commands[0].name.orig) {
char date[200];
const char *version_string;
-
if (!suite.date) {
- t = time(NULL);
- tmp = localtime(&t);
+ /* Assume that the SOURCE_DATE_EPOCH environment
+ * variable will contan a correct, positive integer in
+ * the time_t range. See:
+ *
<https://reproducible-builds.org/specs/source-date-epoch/>
+ * for more information */
+ char *source_date_epoch;
+ if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH"))
== NULL ||
+ (t = (time_t)strtoll(source_date_epoch, NULL,
10)) <= 0)
+ time(&t);
+ tmp = gmtime(&t);
if (tmp == NULL) {
- perror("localtime");
+ perror("gmtime");
exit(EXIT_FAILURE);
}
if (strftime(date, sizeof(date), "%B %Y", tmp) == 0) {
--- End Message ---
--- Begin Message ---
Fixed in upstream commit 0a8299dd8da7dba7437550d12bf180d9e10d512b.
--
Max Planck Institute for Developmental Biology
Max-Planck-Ring 5, 72076 Tübingen, Germany. Phone: (+49) 7071 601 829
http://people.tuebingen.mpg.de/maan/
signature.asc
Description: PGP signature
--- End Message ---