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 1/6] 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} \ From b218053e036ce208531b14e7b32b42b4a7b3b72dffbf66ab7c6d3252c9ac4424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 9 Oct 2017 09:10:11 +0000 Subject: [PATCH 2/6] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=5 --- libpgm-5.2.122.tar.bz2 | 4 ++-- openpgm.spec | 49 ++++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/libpgm-5.2.122.tar.bz2 b/libpgm-5.2.122.tar.bz2 index 3e97ca5..a90b93d 100644 --- a/libpgm-5.2.122.tar.bz2 +++ b/libpgm-5.2.122.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f6fcdad7fcf08368bce100db2598abdd57cb1e55869df68c0032a12ffe86d93 -size 821143 +oid sha256:acc1545fd8060aa66b17327110e2859e451cfc685ebd3b2211619728e3471b66 +size 583469 diff --git a/openpgm.spec b/openpgm.spec index ede999e..733fd5d 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -1,5 +1,8 @@ # vim: set sw=4 ts=4 et nu: - +# +# spec file for package openpgm +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2012 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -11,6 +14,10 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + # Please submit bugfixes or comments via http://bugs.opensuse.org/ %define major 5.2 @@ -18,22 +25,22 @@ %define soname 0 %define libname libpgm-%{mpkg}-%{soname} -Name: openpgm -Version: 5.2.122 -Release: 0 -Summary: OpenPGM implementation of the Reliable Multicast Protocol -URL: https://github.com/steve-o/openpgm -Group: Development/Libraries/C and C++ -License: LGPL-2.1+ -Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.gz#/libpgm-%{version}.tar.bz2 +Name: openpgm +Version: 5.2.122 +Release: 0 +Summary: OpenPGM implementation of the Reliable Multicast Protocol +License: LGPL-2.1+ +Group: Development/Libraries/C and C++ +Url: https://github.com/steve-o/openpgm +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++ -BuildRequires: make -BuildRequires: glibc-devel -BuildRequires: pkg-config +Patch0: libpgm-5.2.122-reproducible.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: gcc-c++ +BuildRequires: glibc-devel +BuildRequires: make +BuildRequires: pkg-config +BuildRequires: python-devel %description OpenPGM is an implementation of the Pragmatic General Multicast (PGM) @@ -42,8 +49,8 @@ that enables receivers to detect loss, request retransmission of lost data, or notify an application of unrecoverable loss. %package -n %{libname} -Summary: PGM Reliable Multicast Protocol library -Group: System/Libraries +Summary: PGM Reliable Multicast Protocol library +Group: System/Libraries %description -n %{libname} OpenPGM is an implementation of the Pragmatic General Multicast (PGM) @@ -52,9 +59,9 @@ that enables receivers to detect loss, request retransmission of lost data, or notify an application of unrecoverable loss. %package devel -Summary: Development files for the OpenPGM Reliable Multicast Protocol library -Group: Development/Libraries/C and C++ -Requires: %{libname} = %{version} +Summary: Development files for the OpenPGM Reliable Multicast Protocol library +Group: Development/Libraries/C and C++ +Requires: %{libname} = %{version} %description devel OpenPGM is an implementation of the Pragmatic General Multicast (PGM) From bc677a1b16f690f763c38d7936859a01de0eddf17fa43e642bcf8def77151c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 9 Oct 2017 09:14:11 +0000 Subject: [PATCH 3/6] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=6 --- libpgm-5.2.122.tar.bz2 => openpgm-release-5-2-122.tar.gz | 0 openpgm.spec | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename libpgm-5.2.122.tar.bz2 => openpgm-release-5-2-122.tar.gz (100%) diff --git a/libpgm-5.2.122.tar.bz2 b/openpgm-release-5-2-122.tar.gz similarity index 100% rename from libpgm-5.2.122.tar.bz2 rename to openpgm-release-5-2-122.tar.gz diff --git a/openpgm.spec b/openpgm.spec index 733fd5d..7eb2fc4 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -23,6 +23,7 @@ %define major 5.2 %define mpkg 5_2 %define soname 0 +%define tarball_version 5-2-122 %define libname libpgm-%{mpkg}-%{soname} Name: openpgm @@ -32,7 +33,7 @@ Summary: OpenPGM implementation of the Reliable Multicast Protocol License: LGPL-2.1+ Group: Development/Libraries/C and C++ Url: https://github.com/steve-o/openpgm -Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.gz#/libpgm-%{version}.tar.bz2 +Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.gz#/openpgm-release-%{tarball_version}.tar.gz # PATCH-FIX-UPSTREAM bmwiedemann https://github.com/steve-o/openpgm/pull/48 Patch0: libpgm-5.2.122-reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -72,7 +73,7 @@ notify an application of unrecoverable loss. This subpackage contains the header files for OpenPGM. %prep -%setup -q -n "libpgm-%{version}/openpgm/pgm" +%setup -q -n "%{name}-release-%{tarball_version}/openpgm/pgm" %patch0 -p1 %build From 244839fdb31c5a8d8bbb4a1aa675f7960ea51f345a93ac756a0154b72ed34270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 9 Oct 2017 09:19:02 +0000 Subject: [PATCH 4/6] - OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=7 --- libpgm-5.2.122-reproducible.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpgm-5.2.122-reproducible.patch b/libpgm-5.2.122-reproducible.patch index 638d4fb..96464f9 100644 --- a/libpgm-5.2.122-reproducible.patch +++ b/libpgm-5.2.122-reproducible.patch @@ -22,6 +22,6 @@ Index: pgm/version_generator.py +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 $") + build_rev = filter (str.isdigit, "$Revision$") print """ From 8cec9910ed87748922932bee1b8bf65781cd72ee2ee5e0c41fac5f206865981a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 9 Oct 2017 09:23:23 +0000 Subject: [PATCH 5/6] - OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=8 --- openpgm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpgm.spec b/openpgm.spec index 7eb2fc4..7c5617f 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -37,6 +37,8 @@ Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.g # PATCH-FIX-UPSTREAM bmwiedemann https://github.com/steve-o/openpgm/pull/48 Patch0: libpgm-5.2.122-reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf +BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: glibc-devel BuildRequires: make @@ -77,6 +79,7 @@ This subpackage contains the header files for OpenPGM. %patch0 -p1 %build +autoreconf -fi %{configure} \ --disable-static From 40826716a9a688007d33492e5023d4596a5d5a9817516932ad3cea62be3ae40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 9 Oct 2017 09:24:30 +0000 Subject: [PATCH 6/6] - OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=9 --- openpgm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/openpgm.spec b/openpgm.spec index 7c5617f..7f9ea95 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -41,6 +41,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: glibc-devel +BuildRequires: libtool BuildRequires: make BuildRequires: pkg-config BuildRequires: python-devel