From 1083f0e66faba69e9e90999eda3fba95ffd4c874 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 23 Jan 2018 09:02:27 +0100 Subject: [PATCH] Use python2_sitearch and python2_sitelib macros Fixes: /usr/bin/python: can't open file '/usr/lib/rpm/python-macro-helper': [Errno 2] No such file or directory --- policycoreutils.spec | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/policycoreutils.spec b/policycoreutils.spec index 93a6b32..9d410e4 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -166,7 +166,7 @@ install -m 755 -p %{SOURCE15} %{buildroot}/%{_libexecdir}/selinux/ ln -s ../selinux-autorelabel-mark.service %{buildroot}/%{_unitdir}/basic.target.wants/ # change /usr/bin/python3 to /usr/bin/python in policycoreutils-python -find %{buildroot}%{python_sitelib} %{buildroot}%{python_sitearch} -type f | xargs \ +find %{buildroot}%{python2_sitelib} %{buildroot}%{python2_sitearch} -type f | xargs \ sed -i '1s%\(#! */usr/bin/python\)3%\1%' # change /usr/bin/python to %%{__python3} in policycoreutils-python3 @@ -289,20 +289,20 @@ The policycoreutils-python package contains the management tools use to manage an SELinux environment. %files -n python2-policycoreutils -%{python_sitearch}/seobject.py* -%{python_sitearch}/sepolgen -%dir %{python_sitelib}/sepolicy -%{python_sitelib}/sepolicy/templates -%{python_sitelib}/sepolicy/__init__.py* -%{python_sitelib}/sepolicy/booleans.py* -%{python_sitelib}/sepolicy/communicate.py* -%{python_sitelib}/sepolicy/generate.py* -%{python_sitelib}/sepolicy/interface.py* -%{python_sitelib}/sepolicy/manpage.py* -%{python_sitelib}/sepolicy/network.py* -%{python_sitelib}/sepolicy/transition.py* -%{python_sitelib}/sepolicy/sedbus.py* -%{python_sitelib}/sepolicy*.egg-info +%{python2_sitearch}/seobject.py* +%{python2_sitearch}/sepolgen +%dir %{python2_sitelib}/sepolicy +%{python2_sitelib}/sepolicy/templates +%{python2_sitelib}/sepolicy/__init__.py* +%{python2_sitelib}/sepolicy/booleans.py* +%{python2_sitelib}/sepolicy/communicate.py* +%{python2_sitelib}/sepolicy/generate.py* +%{python2_sitelib}/sepolicy/interface.py* +%{python2_sitelib}/sepolicy/manpage.py* +%{python2_sitelib}/sepolicy/network.py* +%{python2_sitelib}/sepolicy/transition.py* +%{python2_sitelib}/sepolicy/sedbus.py* +%{python2_sitelib}/sepolicy*.egg-info %package devel Summary: SELinux policy core policy devel utilities @@ -403,10 +403,10 @@ system-config-selinux is a utility for managing the SELinux environment %{_datadir}/system-config-selinux/system-config-selinux.py* %{_datadir}/system-config-selinux/*.glade %{_datadir}/system-config-selinux/*.ui -%{python_sitelib}/sepolicy/gui.py* -%{python_sitelib}/sepolicy/sepolicy.glade -%dir %{python_sitelib}/sepolicy/help -%{python_sitelib}/sepolicy/help/* +%{python2_sitelib}/sepolicy/gui.py* +%{python2_sitelib}/sepolicy/sepolicy.glade +%dir %{python2_sitelib}/sepolicy/help +%{python2_sitelib}/sepolicy/help/* %{python3_sitelib}/sepolicy/gui.py* %{python3_sitelib}/sepolicy/sepolicy.glade %{_datadir}/icons/hicolor/*/apps/sepolicy.png