From 08f6726088ef07641c171be68e76f551051f16d7c4573f9f4fc0426bba849b99 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Mon, 6 Dec 2021 12:27:09 +0000 Subject: [PATCH] Accepting request 934693 from home:aplanas:branches:security - Fix python3-PyYAML requirement - Move the tests inside a bcond. Disabled by default. OBS-URL: https://build.opensuse.org/request/show/934693 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=85 --- tpm2.0-tools.changes | 6 ++++++ tpm2.0-tools.spec | 31 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/tpm2.0-tools.changes b/tpm2.0-tools.changes index f5c2450..72b2829 100644 --- a/tpm2.0-tools.changes +++ b/tpm2.0-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 29 10:27:08 UTC 2021 - Alberto Planas Dominguez + +- Fix python3-PyYAML requirement +- Move the tests inside a bcond. Disabled by default. + ------------------------------------------------------------------- Wed Oct 20 08:53:37 UTC 2021 - Alberto Planas Dominguez diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index 6814b8b..095704b 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -16,6 +16,7 @@ # +%bcond_with test Name: tpm2.0-tools Version: 5.2 Release: 0 @@ -33,7 +34,11 @@ BuildRequires: libcurl-devel BuildRequires: libopenssl-devel BuildRequires: libtool BuildRequires: libuuid-devel +BuildRequires: pkgconfig +BuildRequires: tpm2-0-tss-devel +BuildRequires: tpm2.0-abrmd-devel BuildRequires: pkgconfig(efivar) +Recommends: tpm2.0-abrmd # Pandoc is used for generating the man pages, but since 3.0.4 prebuilt man # pages are shipped with the distribution tarball and we don't need to generate # them any more. Pandoc is only available on openSUSE (not 32-bit x86) and not @@ -45,18 +50,16 @@ BuildRequires: pandoc %endif %endif %endif -BuildRequires: pkgconfig -BuildRequires: tpm2-0-tss-devel -BuildRequires: tpm2.0-abrmd-devel +%if %{with test} # requirements for unit test suite (configure --enable-unit) BuildRequires: expect BuildRequires: ibmswtpm2 BuildRequires: libcmocka-devel -BuildRequires: python38-pyaml +BuildRequires: python3-PyYAML BuildRequires: tpm2.0-abrmd # for xxd, which is also required by the tests BuildRequires: vim -Recommends: tpm2.0-abrmd +%endif %description Trusted Computing is a set of specifications published by the Trusted @@ -71,28 +74,30 @@ associated interfaces. %build # help configure find required executables for testing export PATH=$PATH:/usr/sbin:/usr/libexec/ibmtss -%configure --disable-static --enable-unit -make %{?_smp_mflags} +%configure --disable-static \ + %{?with_test: --enable-unit} +%make_build %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%make_install find %{buildroot} -type f -name "*.la" -delete -print %files -%defattr(-,root,root) %doc doc/README.md doc/CHANGELOG.md %license doc/LICENSE -/usr/bin/tpm2* -/usr/bin/tss2* +%{_bindir}/tpm2* +%{_bindir}/tss2* %{_mandir}/man1/tpm2* %{_mandir}/man1/tss2* %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_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 check +%check +%make_build check +%endif %changelog