Accepting request 887268 from home:mgerstner:branches:network:ha-clustering:Factory

- 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).

OBS-URL: https://build.opensuse.org/request/show/887268
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=104
This commit is contained in:
nick wang 2021-04-22 06:13:10 +00:00 committed by Git OBS Bridge
parent 01fd92d3ee
commit 57de389ffb
3 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Apr 21 10:15:08 UTC 2021 - Matthias Gerstner <matthias.gerstner@suse.com>
- 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 <lnussel@suse.de>

View File

@ -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

13
pie-fix.patch Normal file
View File

@ -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@