Drop with_python3 and use python2_sitearch macros
Fixes: error: File not found: /home/user/rpmbuild/BUILDROOT/libsemanage-2.7-6.fc28.x86_64/_semanage.so error: File not found: /home/user/rpmbuild/BUILDROOT/libsemanage-2.7-6.fc28.x86_64/semanage.py*
This commit is contained in:
parent
b590caa247
commit
9be262bc6e
@ -1,6 +1,3 @@
|
|||||||
%global with_python3 1
|
|
||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")}
|
|
||||||
|
|
||||||
%define libsepolver 2.7-3
|
%define libsepolver 2.7-3
|
||||||
%define libselinuxver 2.7-6
|
%define libselinuxver 2.7-6
|
||||||
|
|
||||||
@ -24,10 +21,8 @@ BuildRequires: libsepol-devel >= %{libsepolver}
|
|||||||
BuildRequires: audit-libs-devel
|
BuildRequires: audit-libs-devel
|
||||||
BuildRequires: python2 python2-devel bison flex bzip2-devel
|
BuildRequires: python2 python2-devel bison flex bzip2-devel
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%endif # if with_python3
|
|
||||||
|
|
||||||
Requires: bzip2-libs audit-libs
|
Requires: bzip2-libs audit-libs
|
||||||
|
|
||||||
@ -79,7 +74,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
The libsemanage-python package contains the python bindings for developing
|
The libsemanage-python package contains the python bindings for developing
|
||||||
SELinux management applications.
|
SELinux management applications.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-libsemanage
|
%package -n python3-libsemanage
|
||||||
Summary: semanage python 3 bindings for libsemanage
|
Summary: semanage python 3 bindings for libsemanage
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -94,7 +88,6 @@ Obsoletes: %{name}-python3 < %{version}-%{release}
|
|||||||
%description -n python3-libsemanage
|
%description -n python3-libsemanage
|
||||||
The libsemanage-python3 package contains the python 3 bindings for developing
|
The libsemanage-python3 package contains the python 3 bindings for developing
|
||||||
SELinux management applications.
|
SELinux management applications.
|
||||||
%endif # if with_python3
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n libsemanage-%{version} -p 1
|
%autosetup -n libsemanage-%{version} -p 1
|
||||||
@ -123,10 +116,8 @@ make CFLAGS="%{optflags}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" all
|
|||||||
BuildPythonWrapper \
|
BuildPythonWrapper \
|
||||||
%{__python}
|
%{__python}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildPythonWrapper \
|
BuildPythonWrapper \
|
||||||
%{__python3}
|
%{__python3}
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
InstallPythonWrapper() {
|
InstallPythonWrapper() {
|
||||||
@ -149,11 +140,9 @@ InstallPythonWrapper \
|
|||||||
%{__python} \
|
%{__python} \
|
||||||
.so
|
.so
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
InstallPythonWrapper \
|
InstallPythonWrapper \
|
||||||
%{__python3} \
|
%{__python3} \
|
||||||
$(python3-config --extension-suffix)
|
$(python3-config --extension-suffix)
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
cp %{SOURCE1} ${RPM_BUILD_ROOT}/etc/selinux/semanage.conf
|
cp %{SOURCE1} ${RPM_BUILD_ROOT}/etc/selinux/semanage.conf
|
||||||
ln -sf %{_libdir}/libsemanage.so.1 ${RPM_BUILD_ROOT}/%{_libdir}/libsemanage.so
|
ln -sf %{_libdir}/libsemanage.so.1 ${RPM_BUILD_ROOT}/%{_libdir}/libsemanage.so
|
||||||
@ -193,17 +182,15 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
%files -n python2-libsemanage
|
%files -n python2-libsemanage
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{python_sitearch}/_semanage.so
|
%{python2_sitearch}/_semanage.so
|
||||||
%{python_sitearch}/semanage.py*
|
%{python2_sitearch}/semanage.py*
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-libsemanage
|
%files -n python3-libsemanage
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{python3_sitearch}/*.so
|
%{python3_sitearch}/*.so
|
||||||
%{python3_sitearch}/semanage.py*
|
%{python3_sitearch}/semanage.py*
|
||||||
%{python3_sitearch}/__pycache__/semanage*
|
%{python3_sitearch}/__pycache__/semanage*
|
||||||
%{_libexecdir}/selinux/semanage_migrate_store
|
%{_libexecdir}/selinux/semanage_migrate_store
|
||||||
%endif # if with_python3
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.7-6
|
* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.7-6
|
||||||
|
Loading…
Reference in New Issue
Block a user