diff --git a/drbd-utils.changes b/drbd-utils.changes index 4afa157..422741f 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Apr 21 10:15:08 UTC 2021 - Matthias Gerstner + +- add pie-fix.patch: explicitly pass -pie linker flag when building drbdmon. + The Makefile explicitly passes -fPIC, thereby breaking our gcc-PIE profile. + In addition the Makefile also ignores CXXFLAGS and LDFLAGS passed via the + environment. Therefore fix it with this patch. This makes drbdmon a PIE + binary (bsc#1184122). + ------------------------------------------------------------------- Tue Nov 17 16:01:34 UTC 2020 - Ludwig Nussel diff --git a/drbd-utils.spec b/drbd-utils.spec index b2161bd..04b6c33 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -1,7 +1,7 @@ # # spec file for package drbd-utils # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %if !0%{?usrmerged} %define sbindir /sbin %else @@ -39,6 +40,7 @@ Patch3: fence-after-pacemaker-down.patch # PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142) Patch4: 0001-Disable-quorum-in-default-configuration-bsc-1032142.patch Patch5: move_fencing_from_disk_to_net_in_example.patch +Patch6: pie-fix.patch Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -88,6 +90,7 @@ raid 1. It is a building block for setting up clusters. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build export WANT_DRBD_REPRODUCIBLE_BUILD=1 diff --git a/pie-fix.patch b/pie-fix.patch new file mode 100644 index 0000000..e074ed7 --- /dev/null +++ b/pie-fix.patch @@ -0,0 +1,13 @@ +Index: drbd-utils-9.14.0/user/drbdmon/Makefile.in +=================================================================== +--- drbd-utils-9.14.0.orig/user/drbdmon/Makefile.in ++++ drbd-utils-9.14.0/user/drbdmon/Makefile.in +@@ -1,6 +1,7 @@ + CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror --pedantic-errors -fPIC -O2 \ + -Wsign-compare -Wpointer-arith -Wswitch-default -Wswitch-enum -Wtype-limits \ +--Wmissing-declarations -Wshadow ++-Wmissing-declarations -Wshadow \ ++-pie + CXX = @CXX@ + LIBS = @LIBS@ +