Split out fapi subpackage

In particular, tpm2-tss does not require libcurl:

$ rpm -qpR x86_64/tpm2-tss-4.0.1-6.fc40.x86_64.rpm
/bin/sh
...
libcrypto.so.3()(64bit)
libcrypto.so.3(OPENSSL_3.0.0)(64bit)
libjson-c.so.5()(64bit)
libjson-c.so.5(JSONC_0.14)(64bit)
libtss2-esys.so.0()(64bit)
libtss2-mu.so.0()(64bit)
libtss2-sys.so.1()(64bit)
libtss2-tctildr.so.0()(64bit)
libuuid.so.1()(64bit)
shadow-utils
...

$ rpm -qpR x86_64/tpm2-tss-fapi-4.0.1-6.fc40.x86_64.rpm
...
libcrypto.so.3()(64bit)
libcrypto.so.3(OPENSSL_3.0.0)(64bit)
libcurl.so.4()(64bit)
libjson-c.so.5()(64bit)
libjson-c.so.5(JSONC_0.14)(64bit)
libtss2-esys.so.0()(64bit)
libtss2-mu.so.0()(64bit)
libtss2-sys.so.1()(64bit)
libtss2-tctildr.so.0()(64bit)
libuuid.so.1()(64bit)
libuuid.so.1(UUID_1.0)(64bit)
tpm2-tss(x86-64) = 4.0.1-6.fc40
...

I don't think we need to do self-Obsoletes to install the new subpackage on
upgrades: packages that are linked to libtss2-fapi.so.1 will pull in the
new subpackage automatically.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-12-02 11:04:51 +01:00
parent f87bcc1524
commit 6bfc28c84f

View File

@ -5,7 +5,7 @@
Name: tpm2-tss
Version: 4.0.1
Release: 5%{?candidate:.%{candidate}}%{?dist}
Release: 6%{?candidate:.%{candidate}}%{?dist}
Summary: TPM2.0 Software Stack
# The entire source code is under BSD except implementation.h and tpmb.h which
@ -44,6 +44,17 @@ tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
APIs. It sits between TPM driver and applications, providing TPM2.0 specified
APIs for applications to access TPM module through kernel TPM drivers.
%package fapi
Summary: High-level TPM2.0 Software Stack
Requires: %{name}%{_isa} = %{version}-%{release}
%description fapi
tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
APIs. It sits between TPM driver and applications, providing TPM2.0 specified
APIs for applications to access TPM module through kernel TPM drivers.
This package provides the high-level "Feature API" library.
%prep
%autosetup -n %{name}-%{version}%{?candidate:-%{candidate}} -p1
@ -78,7 +89,6 @@ exit 0
%{_libdir}/libtss2-mu.so.0*
%{_libdir}/libtss2-sys.so.1*
%{_libdir}/libtss2-esys.so.0*
%{_libdir}/libtss2-fapi.so.1*
%{_libdir}/libtss2-policy.so.0*
%{_libdir}/libtss2-rc.so.0*
%{_libdir}/libtss2-tctildr.so.0*
@ -89,12 +99,16 @@ exit 0
%{_libdir}/libtss2-tcti-spi-helper.so.0*
%{_libdir}/libtss2-tcti-swtpm.so.0*
%{_sysusersdir}/tpm2-tss.conf
%{_tmpfilesdir}/tpm2-tss-fapi.conf
%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules
%files fapi
%{_libdir}/libtss2-fapi.so.1*
%{_tmpfilesdir}/tpm2-tss-fapi.conf
%package devel
Summary: Headers and libraries for building apps that use tpm2-tss
Requires: %{name}%{_isa} = %{version}-%{release}
Requires: %{name}-fapi%{_isa} = %{version}-%{release}
%description devel
This package contains headers and libraries required to build applications that
@ -134,6 +148,10 @@ use tpm2-tss.
%changelog
* Sat Dec 2 2023 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 4.0.1-6
- Split out fapi subpackage
Resolves: rhbz#2252535
* Tue Sep 26 2023 Štěpán Horáček <shoracek@redhat.com> - 4.0.1-5
- Migrate license to SPDX