add selinux_relabel_pre

Add the selinux_relabel_pre macro in the %pre phrase, and the
selinux policy can be refreshed when swtpm is installed.

Signed-off-by: imxcc <xingchaochao@huawei.com>
This commit is contained in:
imxcc 2021-11-16 12:05:47 +08:00
parent 3bf960771a
commit f217c74a57

View File

@ -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
@ -75,6 +75,7 @@ Tools for the TPM emulator from the swtpm package
%prep
%autosetup -n %{name}-%{gitcommit}
%selinux_relabel_pre -s %{selinuxtype}
%build
@ -163,6 +164,9 @@ fi
%attr( 755, tss, tss) %{_localstatedir}/lib/swtpm-localca
%changelog
* Tue Nov 16 2021 imxcc <xingchaochao@huawei.com> - 0.3.3-3
- add selinux_relabel_pre
* Tue Sep 15 2020 jiangfangjie <jiangfangjie@huawei.com> - 0.3.3-2
- update spec file and disable test case pkcs11