From 437c1f575c512065c11b9723e3c82eb6b655cdc18eb5c67de525ac1803dce50a Mon Sep 17 00:00:00 2001 From: Robert Frohl Date: Fri, 25 Feb 2022 11:04:58 +0000 Subject: [PATCH 1/2] Accepting request 957563 from home:rfrohl:branches:hardware usbguard: fix build with older gcc versions OBS-URL: https://build.opensuse.org/request/show/957563 OBS-URL: https://build.opensuse.org/package/show/hardware/usbguard?expand=0&rev=38 --- usbguard.changes | 5 +++++ usbguard.spec | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/usbguard.changes b/usbguard.changes index d50f866..4c7f8e6 100644 --- a/usbguard.changes +++ b/usbguard.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 25 10:43:56 UTC 2022 - Robert Frohl + +- Fix build for Leap and SLE by using newer gcc version + ------------------------------------------------------------------- Thu Feb 24 14:49:05 UTC 2022 - Robert Frohl diff --git a/usbguard.spec b/usbguard.spec index eba3608..801d125 100644 --- a/usbguard.spec +++ b/usbguard.spec @@ -39,7 +39,11 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: bash-completion-devel BuildRequires: dbus-1-glib-devel +%if 0%{?suse_version} == 1500 +BuildRequires: gcc9-c++ +%else BuildRequires: gcc-c++ +%endif BuildRequires: libcap-ng-devel BuildRequires: libqb-devel BuildRequires: libseccomp-devel @@ -94,6 +98,9 @@ software framework. %patch0 -p1 %build +%if 0%{?suse_version} == 1500 +export CXX=g++-9 +%endif mkdir -p ./m4 autoreconf -i -s --no-recursive ./ From 0913b59d2dbe2b15687aa37bdf472679d23971adef444eab4792b31c4023460e Mon Sep 17 00:00:00 2001 From: Robert Frohl Date: Fri, 25 Feb 2022 14:28:17 +0000 Subject: [PATCH 2/2] Accepting request 957609 from home:rfrohl:branches:hardware usbguard: use gcc10 instead, manual PIE OBS-URL: https://build.opensuse.org/request/show/957609 OBS-URL: https://build.opensuse.org/package/show/hardware/usbguard?expand=0&rev=39 --- usbguard.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usbguard.spec b/usbguard.spec index 801d125..12b320e 100644 --- a/usbguard.spec +++ b/usbguard.spec @@ -40,7 +40,7 @@ BuildRequires: automake BuildRequires: bash-completion-devel BuildRequires: dbus-1-glib-devel %if 0%{?suse_version} == 1500 -BuildRequires: gcc9-c++ +BuildRequires: gcc10-c++ %else BuildRequires: gcc-c++ %endif @@ -99,7 +99,10 @@ software framework. %build %if 0%{?suse_version} == 1500 -export CXX=g++-9 +export CXX=g++-10 +# gcc10 has no gcc10-PIE yet, enforce manually (see boo#1195628 for progress) +export CPPFLAGS='-fPIE' +export LDFLAGS='-pie' %endif mkdir -p ./m4 autoreconf -i -s --no-recursive ./