From 9810272594c845b51ecf141ea421773f93b79145fa4cca582332ab44098d0cdf Mon Sep 17 00:00:00 2001 From: Alberto Planas Dominguez Date: Thu, 7 Jul 2022 15:38:12 +0000 Subject: [PATCH 1/5] Accepting request 987481 from home:aplanas:branches:security - Disable LTO for 5.2, to fix tpm2_makecredential with "-T none" (bsc#1201291) OBS-URL: https://build.opensuse.org/request/show/987481 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=87 --- tpm2.0-tools.changes | 6 ++++++ tpm2.0-tools.spec | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tpm2.0-tools.changes b/tpm2.0-tools.changes index 1008ce4..b82a824 100644 --- a/tpm2.0-tools.changes +++ b/tpm2.0-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 7 15:14:37 UTC 2022 - Alberto Planas Dominguez + +- Disable LTO for 5.2, to fix tpm2_makecredential with "-T none" + (bsc#1201291) + ------------------------------------------------------------------- Wed Dec 8 16:37:28 UTC 2021 - Alberto Planas Dominguez diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index 095704b..c5d8f82 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -1,7 +1,7 @@ # # spec file for package tpm2.0-tools # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%define _lto_cflags %{nil} %bcond_with test Name: tpm2.0-tools Version: 5.2 From 4e86bd25438e53d8704d08a84e1945f8656753d6f15a94df0c4d7653bfd8c4bf Mon Sep 17 00:00:00 2001 From: Alberto Planas Dominguez Date: Fri, 8 Jul 2022 08:32:19 +0000 Subject: [PATCH 2/5] Accepting request 987836 from home:aplanas:branches:security - Add missing dependencies for testing, and enable test bcond (bsc#1188085) - Add patch to properly skip getekcertificate if curl is missing 0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch OBS-URL: https://build.opensuse.org/request/show/987836 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=88 --- ...ficate.sh-Skip-the-test-if-curl-is-n.patch | 23 +++++++++++++++++++ tpm2.0-tools.changes | 8 +++++++ tpm2.0-tools.spec | 8 ++++--- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch diff --git a/0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch b/0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch new file mode 100644 index 0000000..31f5562 --- /dev/null +++ b/0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch @@ -0,0 +1,23 @@ +From a10fd03a8d62226e798b8338c6caf73195e64557 Mon Sep 17 00:00:00 2001 +From: Alberto Planas +Date: Fri, 8 Jul 2022 10:09:24 +0200 +Subject: [PATCH 1/1] tests/getekcertificate.sh: Skip the test if curl is not + present + +Signed-off-by: Alberto Planas +--- + test/integration/tests/getekcertificate.sh | 1 + + 1 file changed, 1 insertion(+) + +Index: tpm2-tools-5.2/test/integration/tests/getekcertificate.sh +=================================================================== +--- tpm2-tools-5.2.orig/test/integration/tests/getekcertificate.sh ++++ tpm2-tools-5.2/test/integration/tests/getekcertificate.sh +@@ -19,6 +19,7 @@ start_up + # Check connectivity + if [ -z "$(curl -V 2>/dev/null)" ]; then + echo "curl is not not installed. Skipping connection check." ++ exit 077 + else + if [ "$(curl --silent --output /dev/null --write-out %{http_code} \ + 'https://ekop.intel.com/')" != '200' ]; then diff --git a/tpm2.0-tools.changes b/tpm2.0-tools.changes index b82a824..b58ded7 100644 --- a/tpm2.0-tools.changes +++ b/tpm2.0-tools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jul 8 07:51:37 UTC 2022 - Alberto Planas Dominguez + +- Add missing dependencies for testing, and enable test bcond + (bsc#1188085) +- Add patch to properly skip getekcertificate if curl is missing + 0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch + ------------------------------------------------------------------- Thu Jul 7 15:14:37 UTC 2022 - Alberto Planas Dominguez diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index c5d8f82..7a308bc 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -17,7 +17,7 @@ %define _lto_cflags %{nil} -%bcond_with test +%bcond_without test Name: tpm2.0-tools Version: 5.2 Release: 0 @@ -30,6 +30,8 @@ Source1: https://github.com/tpm2-software/tpm2-tools/releases/download/%{ # git show william-roberts-pub javier-martinez-pub joshua-lock-pub idesai-pub > tpm2-tools.keyring Source2: tpm2-tools.keyring Patch0: fix_bogus_warning.patch +# PATCH-FIX-UPSTREAM 0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch -- based on PR#3041 +Patch1: 0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch BuildRequires: gcc-c++ BuildRequires: libcurl-devel BuildRequires: libopenssl-devel @@ -53,8 +55,10 @@ BuildRequires: pandoc %endif %if %{with test} # requirements for unit test suite (configure --enable-unit) +BuildRequires: dbus-1-daemon BuildRequires: expect BuildRequires: ibmswtpm2 +BuildRequires: iproute2 BuildRequires: libcmocka-devel BuildRequires: python3-PyYAML BuildRequires: tpm2.0-abrmd @@ -95,8 +99,6 @@ find %{buildroot} -type f -name "*.la" -delete -print %{_datadir}/bash-completion/completions/* %if %{with test} -# the test suite does not currently work, because it conflicts with our LTO -# linking (see bsc#1188085). %check %make_build check %endif From 45c31e04025bd5e57969986b76f8f40606f0e440c40f5b07f3eab712ca430819 Mon Sep 17 00:00:00 2001 From: Alberto Planas Dominguez Date: Fri, 8 Jul 2022 09:39:21 +0000 Subject: [PATCH 3/5] Accepting request 987873 from home:aplanas:branches:security OBS-URL: https://build.opensuse.org/request/show/987873 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=89 --- tpm2.0-tools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index 7a308bc..89561bf 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -17,7 +17,7 @@ %define _lto_cflags %{nil} -%bcond_without test +%bcond_with test Name: tpm2.0-tools Version: 5.2 Release: 0 From f3e46a0f5aa17ab55c141ea8d8fb00fd65a08bade8878a58948f1f535b5f88f8 Mon Sep 17 00:00:00 2001 From: Alberto Planas Dominguez Date: Fri, 8 Jul 2022 11:40:48 +0000 Subject: [PATCH 4/5] Accepting request 987892 from home:aplanas:branches:security Run tests sequentially OBS-URL: https://build.opensuse.org/request/show/987892 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=90 --- tpm2.0-tools.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index 89561bf..1bfeca5 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -17,7 +17,7 @@ %define _lto_cflags %{nil} -%bcond_with test +%bcond_without test Name: tpm2.0-tools Version: 5.2 Release: 0 @@ -100,7 +100,9 @@ find %{buildroot} -type f -name "*.la" -delete -print %if %{with test} %check -%make_build check +# Do the tests sequentially to kill all tpm_server instances +# https://github.com/tpm2-software/tpm2-tools/issues/3042 +%make_build -j1 check %endif %changelog From d946dab0caea91419906e014f7b052cee0e59ef94eb204aac3c5709a019330cb Mon Sep 17 00:00:00 2001 From: Alberto Planas Dominguez Date: Fri, 8 Jul 2022 13:36:19 +0000 Subject: [PATCH 5/5] Accepting request 987920 from home:aplanas:branches:security - Add missing dependencies for testing. OBS-URL: https://build.opensuse.org/request/show/987920 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=91 --- tpm2.0-tools.changes | 3 +-- tpm2.0-tools.spec | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tpm2.0-tools.changes b/tpm2.0-tools.changes index b58ded7..81da56c 100644 --- a/tpm2.0-tools.changes +++ b/tpm2.0-tools.changes @@ -1,8 +1,7 @@ ------------------------------------------------------------------- Fri Jul 8 07:51:37 UTC 2022 - Alberto Planas Dominguez -- Add missing dependencies for testing, and enable test bcond - (bsc#1188085) +- Add missing dependencies for testing. - Add patch to properly skip getekcertificate if curl is missing 0001-tests-getekcertificate.sh-Skip-the-test-if-curl-is-n.patch diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index 1bfeca5..8cf3e5f 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -17,7 +17,7 @@ %define _lto_cflags %{nil} -%bcond_without test +%bcond_with test Name: tpm2.0-tools Version: 5.2 Release: 0