Make changes according to Fedora Packaging Guidelines for Python
- drop python{,3} from BuildRequires - use %{__python3} instead of python3 https://fedoraproject.org/wiki/Packaging:Python
This commit is contained in:
parent
6d99bda7c6
commit
fbd38097f4
@ -9,7 +9,7 @@
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.6
|
||||
Release: 1.1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
# https://github.com/SELinuxProject/selinux/wiki/Releases
|
||||
@ -40,7 +40,7 @@ Provides: /sbin/restorecon
|
||||
|
||||
BuildRequires: pam-devel libcgroup-devel libsepol-static >= %{libsepolver} libsemanage-static >= %{libsemanagever} libselinux-devel >= %{libselinuxver} libcap-devel audit-libs-devel >= %{libauditver} gettext
|
||||
BuildRequires: desktop-file-utils dbus-devel dbus-glib-devel
|
||||
BuildRequires: python python-devel python3 python3-devel
|
||||
BuildRequires: python-devel python3-devel
|
||||
BuildRequires: systemd
|
||||
Requires: util-linux grep gawk diffutils rpm sed
|
||||
Requires: libsepol >= %{libsepolver} coreutils libselinux-utils >= %{libselinuxver}
|
||||
@ -88,13 +88,13 @@ mkdir -p %{buildroot}%{_mandir}/man8
|
||||
%{__mkdir} -p %{buildroot}/%{_usr}/share/doc/%{name}/
|
||||
|
||||
make -C policycoreutils-%{version} LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" SEMODULE_PATH="/usr/sbin" install
|
||||
make -C policycoreutils-%{version} PYTHON=python3 LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" SEMODULE_PATH="/usr/sbin" install
|
||||
make -C policycoreutils-%{version} PYTHON=%{__python3} LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" SEMODULE_PATH="/usr/sbin" install
|
||||
|
||||
# Systemd
|
||||
rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/restorecond
|
||||
|
||||
make -C sepolgen-%{version} DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install
|
||||
make -C sepolgen-%{version} PYTHON=python3 DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install
|
||||
make -C sepolgen-%{version} PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install
|
||||
|
||||
tar -jxf %{SOURCE2} -C %{buildroot}/
|
||||
rm -f %{buildroot}/usr/share/man/ru/man8/genhomedircon.8.gz
|
||||
@ -137,12 +137,12 @@ ln -s ../selinux-autorelabel-mark.service %{buildroot}/%{_unitdir}/basic.target.
|
||||
find %{buildroot}%{python_sitelib} %{buildroot}%{python_sitearch} -type f | xargs \
|
||||
sed -i '1s%\(#! */usr/bin/python\)3%\1%'
|
||||
|
||||
# change /usr/bin/python to /usr/bin/python3 in policycoreutils-python3
|
||||
# change /usr/bin/python to %{__python3} in policycoreutils-python3
|
||||
find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} -type f | xargs \
|
||||
sed -i '1s%\(#! */usr/bin/python\)\([^3].*\|\)$%\13\2%'
|
||||
sed -i '1s%\(#! *\)/usr/bin/python\([^3].*\|\)$%\1%{__python3}\2%'
|
||||
|
||||
# change /usr/bin/python to /usr/bin/python3 in python-utils
|
||||
sed -i '1s%\(#! */usr/bin/python\)\([^3].*\|\)$%\13\2%' \
|
||||
sed -i '1s%\(#! *\)/usr/bin/python\([^3].*\|\)$%\1%{__python3}\2%' \
|
||||
%{buildroot}%{_sbindir}/semanage \
|
||||
%{buildroot}%{_bindir}/chcat \
|
||||
%{buildroot}%{_bindir}/sandbox \
|
||||
@ -445,6 +445,9 @@ The policycoreutils-restorecond package contains the restorecond service.
|
||||
%systemd_postun_with_restart restorecond.service
|
||||
|
||||
%changelog
|
||||
* Thu Feb 23 2017 Petr Lautrbach <plautrba@redhat.com> - 2.6-2
|
||||
- Use %{__python3} instead of python3
|
||||
|
||||
* Mon Feb 20 2017 Petr Lautrbach <plautrba@redhat.com> - 2.6-1.1
|
||||
- Fix pp crash when processing base module (#1417200)
|
||||
- Update to upstream release 2016-10-14
|
||||
|
Loading…
Reference in New Issue
Block a user