From 4e41531a49ea9dd647ed3deccde06b3aad1942fd Mon Sep 17 00:00:00 2001 From: caodongxia <315816521@qq.com> Date: Fri, 10 Sep 2021 15:47:33 +0800 Subject: [PATCH] remove rpath --- swtpm.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/swtpm.spec b/swtpm.spec index c1ca157..aeecd97 100644 --- a/swtpm.spec +++ b/swtpm.spec @@ -12,7 +12,7 @@ Summary: TPM Emulator Name: swtpm Version: 0.3.3 -Release: 2 +Release: 3 License: BSD Url: http://github.com/stefanberger/swtpm Source0: %{url}/archive/%{gitcommit}/%{name}-%{gitshortcommit}.tar.gz @@ -41,6 +41,7 @@ BuildRequires: libtasn1 BuildRequires: selinux-policy-devel BuildRequires: gcc BuildRequires: libseccomp-devel +BuildRequires: chrpath Requires: %{name}-libs = %{version}-%{release} Requires: libtpms >= 0.6.0 @@ -97,12 +98,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 @@ -116,6 +123,8 @@ fi %ldconfig_post libs %ldconfig_postun libs +/sbin/ldconfig + %files %license LICENSE %doc README @@ -123,6 +132,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 @@ -163,6 +173,9 @@ fi %attr( 755, tss, tss) %{_localstatedir}/lib/swtpm-localca %changelog +* Wed Sep 9 2021 caodongxia - 0.3.3-3 +- Remove rpath + * Tue Sep 15 2020 jiangfangjie - 0.3.3-2 - update spec file and disable test case pkcs11 -- Gitee