From fc0738b10377d388631682d5ee52a394acad9044 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 10 May 2023 16:13:30 -0400 Subject: [PATCH] Remove trousers dependency from RHEL builds This is a forward port of the change in c9s: https://gitlab.com/redhat/centos-stream/rpms/swtpm/-/commit/a5a9b7805ea3981c068aa8c99aa88f8f3246f658 --- swtpm.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/swtpm.spec b/swtpm.spec index 7d7586e..964efa9 100644 --- a/swtpm.spec +++ b/swtpm.spec @@ -29,7 +29,9 @@ BuildRequires: expect BuildRequires: net-tools BuildRequires: openssl-devel BuildRequires: socat +%if %{undefined rhel} BuildRequires: trousers >= 0.3.9 +%endif BuildRequires: softhsm BuildRequires: json-glib-devel %if %{with gnutls} @@ -73,8 +75,8 @@ Include files for the TPM emulator's CUSE interface. Summary: Tools for the TPM emulator License: BSD Requires: swtpm = %{version}-%{release} -# trousers: for tss account -Requires: trousers >= 0.3.9 bash gnutls-utils +# trousers: for tss account (unsupported in RHEL) +Requires: %{!?rhel:trousers >= 0.3.9} bash gnutls-utils %description tools Tools for the TPM emulator from the swtpm package @@ -84,7 +86,7 @@ Summary: Tools for creating a local CA based on a TPM pkcs11 device License: BSD Requires: swtpm-tools = %{version}-%{release} Requires: tpm2-pkcs11 tpm2-pkcs11-tools tpm2-tools tpm2-abrmd -Requires: expect gnutls-utils trousers >= 0.3.9 +Requires: expect gnutls-utils %{!?rhel:trousers >= 0.3.9} %description tools-pkcs11 Tools for creating a local CA based on a pkcs11 device