r15838 - in packages/trunk/slashem/debian: . patches

Vincent Cheng vcheng at moszumanska.debian.org
Mon Jul 11 05:44:44 UTC 2016


Author: vcheng
Date: 2016-07-11 05:44:44 +0000 (Mon, 11 Jul 2016)
New Revision: 15838

Added:
   packages/trunk/slashem/debian/patches/reproducible-build.patch
Modified:
   packages/trunk/slashem/debian/changelog
   packages/trunk/slashem/debian/patches/series
Log:
slashem: make build reproducible


Modified: packages/trunk/slashem/debian/changelog
===================================================================
--- packages/trunk/slashem/debian/changelog	2016-07-08 08:30:42 UTC (rev 15837)
+++ packages/trunk/slashem/debian/changelog	2016-07-11 05:44:44 UTC (rev 15838)
@@ -1,8 +1,9 @@
 slashem (0.0.7E7F3-8) UNRELEASED; urgency=medium
 
   * Add pt_BR debconf template translation. (Closes: #811517)
+  * Make the build reproducible. (Closes: #829262)
 
- -- Vincent Cheng <vcheng at debian.org>  Mon, 11 Apr 2016 23:29:41 -0700
+ -- Vincent Cheng <vcheng at debian.org>  Sun, 10 Jul 2016 22:41:17 -0700
 
 slashem (0.0.7E7F3-7) unstable; urgency=medium
 

Added: packages/trunk/slashem/debian/patches/reproducible-build.patch
===================================================================
--- packages/trunk/slashem/debian/patches/reproducible-build.patch	                        (rev 0)
+++ packages/trunk/slashem/debian/patches/reproducible-build.patch	2016-07-11 05:44:44 UTC (rev 15838)
@@ -0,0 +1,58 @@
+Author: Reiner Herrmann <reiner at reiner-h.de>
+Description: Enable reproducible builds
+ - Use C locale for sorting files while creating archive with dlb
+ - Honour SOURCE_DATE_EPOCH for embedded timestamp
+Origin: based on patch in src:nethack 3.6.0-2
+
+--- a/sys/unix/Makefile.top
++++ b/sys/unix/Makefile.top
+@@ -273,8 +273,8 @@
+ 
+ dlb:
+ 	( cd util ; $(MAKE) dlb )
+-	( cd dat ; ../util/dlb cf nhshare $(SHARE_DATDLB) )
+-	( cd dat ; ../util/dlb cf nhushare $(UNSHARE_DATDLB) )
++	( cd dat ; LC_ALL=C ../util/dlb cf nhshare $(SHARE_DATDLB) )
++	( cd dat ; LC_ALL=C ../util/dlb cf nhushare $(UNSHARE_DATDLB) )
+ 
+ # recover can be used when INSURANCE is defined in include/config.h
+ # and the checkpoint option is true
+--- a/util/makedefs.c
++++ b/util/makedefs.c
+@@ -598,7 +598,7 @@
+ do_date()
+ {
+ 	long clocktim = 0;
+-	char *c,  *cbuf, buf[BUFSZ];
++	char *c,  *cbuf, buf[BUFSZ], *source_date_epoch;
+ 	const char *ul_sfx;
+ 
+ 	cbuf = malloc(600);
+@@ -614,13 +614,12 @@
+ 	Fprintf(ofp,"/*\tSCCS Id: @(#)date.h\t3.4\t2002/02/03 */\n\n");
+ 	Fprintf(ofp,Dont_Edit_Code);
+ 
+-#ifdef KR1ED
+ 	(void) time(&clocktim);
+-	Strcpy(cbuf, ctime(&clocktim));
+-#else
+-	(void) time((time_t *)&clocktim);
+-	Strcpy(cbuf, ctime((time_t *)&clocktim));
+-#endif
++	source_date_epoch = getenv("SOURCE_DATE_EPOCH");
++	if (source_date_epoch)
++		clocktim = strtoull(source_date_epoch, NULL, 10);
++	Strcpy(cbuf, asctime(gmtime(&clocktim)));
++
+ 	for (c = cbuf; *c; c++) if (*c == '\n') break;
+ 	*c = '\0';	/* strip off the '\n' */
+ #ifdef NHSTDC
+@@ -649,7 +648,7 @@
+ 		version_id_string(buf, cbuf));
+ #ifdef AMIGA
+ 	{
+-	struct tm *tm = localtime((time_t *) &clocktim);
++	struct tm *tm = gmtime((time_t *) &clocktim);
+ 	Fprintf(ofp,"#define AMIGA_VERSION_STRING ");
+ 	Fprintf(ofp,"\"\\0$VER: NetHack %d.%d.%d (%d.%d.%d)\"\n",
+ 		VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL,

Modified: packages/trunk/slashem/debian/patches/series
===================================================================
--- packages/trunk/slashem/debian/patches/series	2016-07-08 08:30:42 UTC (rev 15837)
+++ packages/trunk/slashem/debian/patches/series	2016-07-11 05:44:44 UTC (rev 15838)
@@ -2,3 +2,4 @@
 spelling-error.patch
 slashem-debian.patch
 clang_FTBFS_Wreturn-type.patch
+reproducible-build.patch




More information about the Pkg-games-commits mailing list