From d0822f32be5e6168ed75fa5e2e70d466be7dcb8dbd03bd6c7d8b029020f3d9f5 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 28 Jan 2019 12:11:51 +0000 Subject: [PATCH 1/5] Accepting request 668567 from home:bluca:branches:devel:libraries:c_c++ Backport patches from upstream to avoid adding a non-existing foo/lib/pgm-5.2/include directory to pkg-config's CFLAGS which breaks applications using strict compiler flags, and to make the build reproducible regardless of the reported system/architecture OBS-URL: https://build.opensuse.org/request/show/668567 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=17 --- ...-not-add-I-to-non-existing-directory.patch | 13 +++++++++ ...gm-5.2.122-reproducible-architecture.patch | 29 +++++++++++++++++++ openpgm.spec | 6 ++++ 3 files changed, 48 insertions(+) create mode 100644 libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch create mode 100644 libpgm-5.2.122-reproducible-architecture.patch diff --git a/libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch b/libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch new file mode 100644 index 0000000..4756e76 --- /dev/null +++ b/libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch @@ -0,0 +1,13 @@ +Author: Luca Boccassi +Description: pkg-config: do not add -I to non-existing directory + foo/lib/pgm-5.2/include does not exist, so applications using strict + compiler flags will fail to build due to this -I flag +Origin: https://github.com/steve-o/openpgm/pull/57 +--- pgm.orig/openpgm-5.2.pc.in ++++ pgm/openpgm-5.2.pc.in +@@ -9,4 +9,4 @@ Version: @PACKAGE_VERSION@ + # packagers may wish to move @LIBS@ to Libs.private for platforms with + # versions of pkg-config that support static linking. + Libs: -L${libdir} -lpgm @LIBS@ +-Cflags: -I${includedir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@ -I${libdir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@/include ++Cflags: -I${includedir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@ diff --git a/libpgm-5.2.122-reproducible-architecture.patch b/libpgm-5.2.122-reproducible-architecture.patch new file mode 100644 index 0000000..95b0c4b --- /dev/null +++ b/libpgm-5.2.122-reproducible-architecture.patch @@ -0,0 +1,29 @@ +Author: Luca Boccassi +Description: version_generator.py: make build reproducible + If SOURCE_DATE_EPOCH is defined then the user is most likely interested + in building the library in a reproducible way. So in that case use fixed + "BuildSystem" and "BuildMachine" strings instead of the operating system + and architecture. +Origin: https://github.com/steve-o/openpgm/pull/58 +--- pgm.orig/version_generator.py ++++ pgm/version_generator.py +@@ -8,6 +8,11 @@ timestamp = time.gmtime (int (os.getenv + build_date = time.strftime ("%Y-%m-%d", timestamp) + build_time = time.strftime ("%H:%M:%S", timestamp) + build_rev = filter (str.isdigit, "$Revision$") ++build_system = platform.system() ++build_machine = platform.machine() ++if 'SOURCE_DATE_EPOCH' in os.environ: ++ build_system = 'BuildSystem' ++ build_machine = 'BuildMachine' + + print """ + /* vim:ts=8:sts=8:sw=4:noai:noexpandtab +@@ -51,6 +56,6 @@ const char* pgm_build_revision = "%s"; + + + /* eof */ +-"""%(build_date, build_time, platform.system(), platform.machine(), build_rev) ++"""%(build_date, build_time, build_system, build_machine, build_rev) + + # end of file diff --git a/openpgm.spec b/openpgm.spec index dd5d652..a87574a 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -35,6 +35,10 @@ Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.g Source99: baselibs.conf # PATCH-FIX-UPSTREAM bmwiedemann https://github.com/steve-o/openpgm/pull/48 Patch0: libpgm-5.2.122-reproducible.patch +# PATCH-FIX-UPSTREAM bluca https://github.com/steve-o/openpgm/pull/58 +Patch1: libpgm-5.2.122-reproducible-architecture.patch +# PATCH-FIX-UPSTREAM bluca https://github.com/steve-o/openpgm/pull/57 +Patch2: libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -76,6 +80,8 @@ This subpackage contains the header files for OpenPGM. %prep %setup -q -n "%{name}-release-%{tarball_version}/openpgm/pgm" %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build mkdir -p m4 From aa41d941bfd3792ef7371aabce95db8a8cbba2dd45451548fc70218ea8535c8c Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 28 Jan 2019 13:37:00 +0000 Subject: [PATCH 2/5] Accepting request 669077 from home:bluca:branches:devel:libraries:c_c++ Add entry to opengpm.changes for recent patches OBS-URL: https://build.opensuse.org/request/show/669077 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=18 --- openpgm.changes | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openpgm.changes b/openpgm.changes index 44f6445..b8aa45c 100644 --- a/openpgm.changes +++ b/openpgm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jan 28 12:51:34 UTC 2019 - luca.boccassi@gmail.com + +- Backport patches from upstream to avoid adding a non-existing + foo/lib/pgm-5.2/include directory to pkg-config's CFLAGS which + breaks applications using strict compiler flags, and to make the + build reproducible regardless of the reported system/architecture + ------------------------------------------------------------------- Fri Jul 13 07:39:53 UTC 2018 - dimstar@opensuse.org From 74543176be340c1806cad965373cfecb28f6f46730b69dadae588a171f0f8477 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 28 Jan 2019 13:39:36 +0000 Subject: [PATCH 3/5] fix changes OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=19 --- openpgm.changes | 4 ++++ openpgm.spec | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openpgm.changes b/openpgm.changes index b8aa45c..e7b4682 100644 --- a/openpgm.changes +++ b/openpgm.changes @@ -6,6 +6,10 @@ Mon Jan 28 12:51:34 UTC 2019 - luca.boccassi@gmail.com breaks applications using strict compiler flags, and to make the build reproducible regardless of the reported system/architecture +Added: +libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch +llibpgm-5.2.122-reproducible.patchibpgm-5.2.122-reproducible-architecture.patch + ------------------------------------------------------------------- Fri Jul 13 07:39:53 UTC 2018 - dimstar@opensuse.org diff --git a/openpgm.spec b/openpgm.spec index a87574a..5d54e83 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -2,7 +2,7 @@ # # spec file for package openpgm # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2012 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -14,7 +14,7 @@ # 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 https://bugs.opensuse.org/ # From 2a7bc4072644e4acc99ef78ca4a19f4470502b3458fff1fb5bb7ef971a1b168b Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 28 Jan 2019 13:45:58 +0000 Subject: [PATCH 4/5] log :/ OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=20 --- openpgm.changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpgm.changes b/openpgm.changes index e7b4682..31226fb 100644 --- a/openpgm.changes +++ b/openpgm.changes @@ -7,8 +7,8 @@ Mon Jan 28 12:51:34 UTC 2019 - luca.boccassi@gmail.com build reproducible regardless of the reported system/architecture Added: -libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch -llibpgm-5.2.122-reproducible.patchibpgm-5.2.122-reproducible-architecture.patch +- libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch +- libpgm-5.2.122-reproducible.patch ------------------------------------------------------------------- Fri Jul 13 07:39:53 UTC 2018 - dimstar@opensuse.org From 7c24cafe44f77328e7b4f1c7c81967a71eb79233c8fd26927aa3ab40112b8b00 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 28 Jan 2019 13:52:25 +0000 Subject: [PATCH 5/5] cursed .changes .... we should limit patch file length to one or two words! OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/openpgm?expand=0&rev=21 --- openpgm.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpgm.changes b/openpgm.changes index 31226fb..a959f2c 100644 --- a/openpgm.changes +++ b/openpgm.changes @@ -8,7 +8,7 @@ Mon Jan 28 12:51:34 UTC 2019 - luca.boccassi@gmail.com Added: - libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch -- libpgm-5.2.122-reproducible.patch +- libpgm-5.2.122-reproducible-architecture.patch ------------------------------------------------------------------- Fri Jul 13 07:39:53 UTC 2018 - dimstar@opensuse.org