[Reproducible-builds] Bug#788752: analog: please make the build reproducible
Dhole
dhole at openmailbox.org
Sun Jun 14 18:17:26 UTC 2015
Source: analog
Version: 2:6.0-20
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that analog could not be built reproducibly.
The attached patch removes extra timestamps from the build system.
Specifically, the patch avoids the the usage of the __DATE__ and
__TIME__ C macro which embed timestamps during the compilation and make
the package build unreproducible.
Once applied, analog can be built reproducibly in our current
experimental framework.
[1]: https://wiki.debian.org/ReproducibleBuilds
--
Dhole
-------------- next part --------------
diff -u analog-6.0/debian/changelog analog-6.0/debian/changelog
--- analog-6.0/debian/changelog
+++ analog-6.0/debian/changelog
@@ -1,3 +1,10 @@
+analog (2:6.0-22) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Remove timestamp from outxml.c to make package build reproducibly
+
+ -- Dhole <dhole at openmailbox.org> Sat, 13 Jun 2015 21:05:32 +0200
+
analog (2:6.0-20) unstable; urgency=low
* QA upload.
only in patch2:
unchanged:
--- analog-6.0.orig/src/outxml.c
+++ analog-6.0/src/outxml.c
@@ -54,7 +54,6 @@
extern timecode_t starttimec;
unsigned int year, month, day, i;
- struct tm temptime;
char *xmlversion = "1.0";
char *encoding = "UTF-8";
@@ -85,15 +84,10 @@
xml_defaults( opts );
// extract a build timestamp from __DATE__ and __TIME__ -- locale dependent?! need to force "C" locale ?
- strptime( __DATE__" "__TIME__, "%b%n%d%n%Y%n%T", &temptime );
-
- sprintf( buffer, "%04d%02d%02d%02d%02d",
- temptime.tm_year+1900, temptime.tm_mon+1, temptime.tm_mday, temptime.tm_hour, temptime.tm_min );
code2date( starttimec/1440, &day, &month, &year);
-
+
XML_OUT( XMLDBG "<property name=\"version\" content=\"%s\"/>", VERSION );
- XML_OUT( XMLDBG "<property name=\"built\" content=\"%s\"/>", buffer );
XML_OUT( XMLDBG "<property name=\"starttime\" content=\"%04d%02d%02d%02d%02d\"/> ",
year, month+1, day, (int)((starttimec%1440)/60), (int)(starttimec%60) );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150614/b8c44592/attachment.sig>
More information about the Reproducible-builds
mailing list