diff options
author | Petr Lautrbach <lautrbach@redhat.com> | 2025-05-30 08:09:14 +0000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-06-06 10:46:40 +0200 |
commit | d21bcd9f7c70d1be09a923ad366cdf883112e431 (patch) | |
tree | 249a5ac4b5fdd75a5a561c63be610a1f1d363935 | |
parent | 081df67d1fb28bf7a98f98c6c3417ec1d45ce6d7 (diff) | |
download | passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.tar passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.tar.gz passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.tar.bz2 passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.tar.lz passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.tar.xz passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.tar.zst passt-d21bcd9f7c70d1be09a923ad366cdf883112e431.zip |
fedora: Call %selinux_modules_* macros only once
%selinux_modules_* macros has `-i %*` so that it can be used for
multiple modules at once. This will improve the performace of the
package (un)installation.
$ sudo time -p rpm --reinstall passt-selinux-0\^20250512.g8ec1341-1.fc42.noarch.rpm
real 49.09
user 44.16
sys 4.37
$ sudo time -p rpm --reinstall results_passt/0\^20250512.g8ec1341/2.fc43/passt-selinux-0\^20250512.g8ec1341-2.fc43.noarch.rpm
real 17.03
user 15.06
sys 1.83
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Link: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/XYIZRIDTNKF5DJ5XULHDWDAFQSYOAOZC/
Link: https://src.fedoraproject.org/rpms/passt/pull-request/2
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | contrib/fedora/passt.spec | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec index 5aaf7ac..0abb2fa 100644 --- a/contrib/fedora/passt.spec +++ b/contrib/fedora/passt.spec @@ -89,15 +89,11 @@ popd %selinux_relabel_pre -s %{selinuxtype} %post selinux -%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/passt.pp -%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/pasta.pp -%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/passt-repair.pp +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/passt.pp %{_datadir}/selinux/packages/%{selinuxtype}/pasta.pp %{_datadir}/selinux/packages/%{selinuxtype}/passt-repair.pp %postun selinux if [ $1 -eq 0 ]; then - %selinux_modules_uninstall -s %{selinuxtype} passt - %selinux_modules_uninstall -s %{selinuxtype} pasta - %selinux_modules_uninstall -s %{selinuxtype} passt-repair + %selinux_modules_uninstall -s %{selinuxtype} passt pasta passt-repair fi %posttrans selinux |