Hello community, here is the log from the commit of package xmgrace for openSUSE:Factory checked in at 2017-05-20 10:12:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xmgrace (Old) and /work/SRC/openSUSE:Factory/.xmgrace.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xmgrace" Sat May 20 10:12:04 2017 rev:8 rq:493058 version:5.1.25 Changes: -------- --- /work/SRC/openSUSE:Factory/xmgrace/xmgrace.changes 2015-03-18 13:04:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.xmgrace.new/xmgrace.changes 2017-05-20 10:12:13.716045674 +0200 @@ -1,0 +2,5 @@ +Thu May 4 12:42:19 UTC 2017 - [email protected] + +- Add reproducible.patch to make build fully reproducible + +------------------------------------------------------------------- New: ---- reproducible.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xmgrace.spec ++++++ --- /var/tmp/diff_new_pack.m8VOjo/_old 2017-05-20 10:12:14.263968257 +0200 +++ /var/tmp/diff_new_pack.m8VOjo/_new 2017-05-20 10:12:14.263968257 +0200 @@ -36,6 +36,7 @@ Patch0: xmgrace-null.patch Patch1: xmgrace-strip.patch Patch2: xmgrace-help.patch +Patch3: reproducible.patch Url: http://plasma-gate.weizmann.ac.il/Grace/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -63,6 +64,7 @@ %patch0 -p0 %patch1 %patch2 +%patch3 -p1 %build CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=/usr/%{_lib} --enable-grace-home=/usr/%{_lib}/xmgrace --bindir=/usr/bin --with-helpviewer="/usr/bin/desktop-launch %s" --mandir=%{_mandir} ++++++ reproducible.patch ++++++ PATCH-FIX-UPSTREAM -- ToDo Author: Bernhard M. Wiedemann <[email protected]> Date: Thu May 4 13:15:15 2017 +0200 Allow to override the build date using the SOURCE_DATE_EPOCH env var to make package builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. also use gmtime instead of localtime to not be dependent on locale Index: grace-5.1.25/src/buildinfo.c =================================================================== --- grace-5.1.25.orig/src/buildinfo.c +++ grace-5.1.25/src/buildinfo.c @@ -52,6 +52,7 @@ static void VersionInfo(FILE *outfile) struct utsname u_info; time_t time_info; char *ctime_string; + char *source_date_epoch; fprintf(outfile, "#define BI_VERSION_ID %d\n", MAJOR_REV*10000 + MINOR_REV*100 + PATCHLEVEL); @@ -104,8 +105,9 @@ static void VersionInfo(FILE *outfile) fprintf(outfile, "#define BI_SYSTEM \"%s %s %s %s\"\n", u_info.sysname, u_info.version, u_info.release, u_info.machine); - time_info = time(NULL); - ctime_string = ctime(&time_info); + if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || (time_info = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0) + time_info = time(NULL); + ctime_string = asctime(gmtime(&time_info)); if (ctime_string[strlen(ctime_string) - 1] == '\n') { ctime_string[strlen(ctime_string) - 1] = '\0'; }
