From 8828873bbc91636edfc5f01ed14de5399db46ff8806a5aa2497fe50ee9bc14e6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 21 Mar 2023 12:51:07 +0000 Subject: [PATCH] Accepting request 1073545 from home:msmeissn:branches:security - swtpm-fix-build.patch: disable -Wstack-protector, it fails on s390x OBS-URL: https://build.opensuse.org/request/show/1073545 OBS-URL: https://build.opensuse.org/package/show/security/swtpm?expand=0&rev=33 --- swtpm-fix-build.patch | 19 +++++++++++++++++++ swtpm.changes | 5 +++++ swtpm.spec | 1 + 3 files changed, 25 insertions(+) create mode 100644 swtpm-fix-build.patch diff --git a/swtpm-fix-build.patch b/swtpm-fix-build.patch new file mode 100644 index 0000000..e0e0351 --- /dev/null +++ b/swtpm-fix-build.patch @@ -0,0 +1,19 @@ +Index: swtpm-0.8.0/configure.ac +=================================================================== +--- swtpm-0.8.0.orig/configure.ac ++++ swtpm-0.8.0/configure.ac +@@ -418,11 +418,11 @@ if test "x$enable_hardening" != "xno"; t + # Some versions of gcc fail with -Wstack-protector, + # some with -Wstack-protector-strong enabled + if ! $CC -fstack-protector-strong -Wstack-protector $srcdir/include/swtpm/tpm_ioctl.h 2>/dev/null; then +- if $CC -fstack-protector -Wstack-protector $srcdir/include/swtpm/tpm_ioctl.h 2>/dev/null; then +- HARDENING_CFLAGS="-fstack-protector -Wstack-protector" ++ if $CC -fstack-protector $srcdir/include/swtpm/tpm_ioctl.h 2>/dev/null; then ++ HARDENING_CFLAGS="-fstack-protector" + fi + else +- HARDENING_CFLAGS="-fstack-protector-strong -Wstack-protector" ++ HARDENING_CFLAGS="-fstack-protector-strong" + fi + + dnl Only support -D_FORTIFY_SOURCE=2 and have higher levels passed in by user diff --git a/swtpm.changes b/swtpm.changes index 75ad354..838a2bb 100644 --- a/swtpm.changes +++ b/swtpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 21 12:45:54 UTC 2023 - Marcus Meissner + +- swtpm-fix-build.patch: disable -Wstack-protector, it fails on s390x + ------------------------------------------------------------------- Mon Mar 6 20:21:50 UTC 2023 - Alberto Planas Dominguez diff --git a/swtpm.spec b/swtpm.spec index de2688a..b555a02 100644 --- a/swtpm.spec +++ b/swtpm.spec @@ -32,6 +32,7 @@ Group: System/Base URL: https://github.com/stefanberger/swtpm Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source100: swtpm-rpmlintrc +Patch0: swtpm-fix-build.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: expect