From 1f28d7077b685049b270d5f7a91ce9d521d72762ed53ce470f3d8f2d1eb54d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 9 Oct 2017 09:02:55 +0000 Subject: [PATCH] Accepting request 532268 from home:bmwiedemann:branches:devel:libraries:c_c++ Add libpgm-5.2.122-reproducible.patch to make build reproducible (boo#1047218) OBS-URL: https://build.opensuse.org/request/show/532268 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=4 --- libpgm-5.2.122-reproducible.patch | 27 +++++++++++++++++++++++++++ openpgm.changes | 6 ++++++ openpgm.spec | 7 +++++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 libpgm-5.2.122-reproducible.patch diff --git a/libpgm-5.2.122-reproducible.patch b/libpgm-5.2.122-reproducible.patch new file mode 100644 index 0000000..638d4fb --- /dev/null +++ b/libpgm-5.2.122-reproducible.patch @@ -0,0 +1,27 @@ +commit f4debdce3de8da1bd401d8542c5acbfaa0982b76 +Author: Bernhard M. Wiedemann +Date: Wed Jan 25 03:52:14 2017 +0000 + + allow to override build date + + to enable reproducible builds. + 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. + +Index: pgm/version_generator.py +=================================================================== +--- pgm.orig/version_generator.py ++++ pgm/version_generator.py +@@ -4,8 +4,9 @@ import os + import platform + import time + +-build_date = time.strftime ("%Y-%m-%d") +-build_time = time.strftime ("%H:%M:%S") ++timestamp = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) ++build_date = time.strftime ("%Y-%m-%d", timestamp) ++build_time = time.strftime ("%H:%M:%S", timestamp) + build_rev = filter (str.isdigit, "$Revision: 1487 $") + + print """ diff --git a/openpgm.changes b/openpgm.changes index d7f2f88..eab5567 100644 --- a/openpgm.changes +++ b/openpgm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 6 13:22:06 UTC 2017 - bwiedemann@suse.com + +- Add libpgm-5.2.122-reproducible.patch to make build reproducible + (boo#1047218) + ------------------------------------------------------------------- Tue Feb 3 14:11:33 UTC 2015 - jengelh@inai.de diff --git a/openpgm.spec b/openpgm.spec index 442a0ea..ede999e 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -22,10 +22,12 @@ Name: openpgm Version: 5.2.122 Release: 0 Summary: OpenPGM implementation of the Reliable Multicast Protocol -URL: https://code.google.com/p/openpgm/ +URL: https://github.com/steve-o/openpgm Group: Development/Libraries/C and C++ License: LGPL-2.1+ -Source: https://openpgm.googlecode.com/files/libpgm-%{version}.tar.bz2 +Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.gz#/libpgm-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM bmwiedemann https://github.com/steve-o/openpgm/pull/48 +Patch0: libpgm-5.2.122-reproducible.patch BuildRoot: %{_tmppath}/build-%{name}-%{version} BuildRequires: python-devel BuildRequires: gcc-c++ @@ -64,6 +66,7 @@ This subpackage contains the header files for OpenPGM. %prep %setup -q -n "libpgm-%{version}/openpgm/pgm" +%patch0 -p1 %build %{configure} \