diff --git a/mxml.changes b/mxml.changes index 2f53097..647939b 100644 --- a/mxml.changes +++ b/mxml.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 25 04:45:36 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to make build reproducible + ------------------------------------------------------------------- Fri Nov 11 14:50:28 UTC 2016 - mrueckert@suse.de diff --git a/mxml.spec b/mxml.spec index 590af55..e985844 100644 --- a/mxml.spec +++ b/mxml.spec @@ -27,6 +27,8 @@ Group: Development/Libraries/C and C++ Source: http://www.msweet.org/files/project3/%{name}-%{version}.tar.gz Source1: baselibs.conf Patch: mxml-2.3-nobinstrip.patch +# PATCH-FIX-UPSTREAM -- https://github.com/michaelrsweet/mxml/commit/b79d3e0f07495b4a113f1ad95ae08c19664ea5ac +Patch1: reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkgconfig @@ -69,6 +71,7 @@ This package holds the development files for mxml. %prep %setup %patch +%patch1 -p1 %build %configure --enable-shared --with-docdir=%{_docdir}/%{name} diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..e6beecc --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,41 @@ +From b79d3e0f07495b4a113f1ad95ae08c19664ea5ac Mon Sep 17 00:00:00 2001 +From: Michael Sweet +Date: Sun, 23 Apr 2017 12:49:40 -0400 +Subject: [PATCH] Add support for SOURCE_DATE_EPOCH environment variable (Issue + #193) + +--- + CHANGES.md | 2 ++ + doc/mxml.man | 2 +- + mxmldoc.c | 9 ++++++++- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/mxmldoc.c b/mxmldoc.c +index 7f475ef..4abe707 100644 +--- a/mxmldoc.c ++++ b/mxmldoc.c +@@ -5604,6 +5604,7 @@ write_man(const char *man_name, /* I - Name of manpage */ + *parent; /* Parent class */ + int inscope; /* Variable/method scope */ + char prefix; /* Prefix character */ ++ const char *source_date_epoch; /* SOURCE_DATE_EPOCH environment variable */ + time_t curtime; /* Current time */ + struct tm *curdate; /* Current date */ + char buffer[1024]; /* String buffer */ +@@ -5617,9 +5618,15 @@ write_man(const char *man_name, /* I - Name of manpage */ + + /* + * Standard man page... ++ * ++ * Get the current date, using the SOURCE_DATE_EPOCH environment variable, if ++ * present, for the number of seconds since the epoch - this enables ++ * reproducible builds (Issue #193). + */ + +- curtime = time(NULL); ++ if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || (curtime = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0) ++ curtime = time(NULL); ++ + curdate = localtime(&curtime); + strftime(buffer, sizeof(buffer), "%x", curdate); +