diff --git a/swtpm.spec b/swtpm.spec index 1758173498d138fc9ee066da3d15f880ba856b59..a7622e8ef19e7e04492e1be6df03815353161e4d 100644 --- a/swtpm.spec +++ b/swtpm.spec @@ -8,7 +8,7 @@ Summary: TPM Emulator Name: swtpm Version: 0.8.0 -Release: 1 +Release: 2 License: BSD Url: https://github.com/stefanberger/swtpm Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz @@ -37,6 +37,7 @@ BuildRequires: selinux-policy-devel BuildRequires: gcc BuildRequires: libseccomp-devel BuildRequires: tpm2-tools +BuildRequires: chrpath Requires: %{name}-libs = %{version}-%{release} Requires: libtpms >= 0.6.0 @@ -94,12 +95,18 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.{a,la,so} rm -f $RPM_BUILD_ROOT%{_mandir}/man8/swtpm-create-tpmca.8* rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/swtpm-create-tpmca +chrpath -d %{buildroot}/%{_bindir}/swtpm +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf + %post for pp in /usr/share/selinux/packages/swtpm.pp \ /usr/share/selinux/packages/swtpm_svirt.pp; do %selinux_modules_install -s %{selinuxtype} ${pp} done +/sbin/ldconfig + %postun if [ $1 -eq 0 ]; then for p in swtpm swtpm_svirt; do @@ -113,6 +120,8 @@ fi %ldconfig_post libs %ldconfig_postun libs +/sbin/ldconfig + %files %license LICENSE %doc README @@ -120,6 +129,7 @@ fi %{_mandir}/man8/swtpm.8* %{_datadir}/selinux/packages/swtpm.pp %{_datadir}/selinux/packages/swtpm_svirt.pp +%config(noreplace) /etc/ld.so.conf.d/* %files libs %license LICENSE @@ -162,6 +172,9 @@ fi %attr( 750, tss, root) %{_localstatedir}/lib/swtpm-localca %changelog +* Tue Mar 07 2023 jiangfangjie - 0.8.0-2 +- Remove rpath + * Fri Feb 03 2023 yezengruan - 0.8.0-1 - update to version 0.8.0