[packages/libsemanage] - updated to 3.1 (20200710) - python2 no longer supported upstream since 3.0; python-semanage v2.9 c

qboosh qboosh at pld-linux.org
Fri Jun 11 06:28:46 CEST 2021


commit dced15db488ff23a2c6e274815188663b783cc59
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jun 11 06:31:36 2021 +0200

    - updated to 3.1 (20200710)
    - python2 no longer supported upstream since 3.0; python-semanage v2.9 copied to python-semanage.spec

 libsemanage.spec | 87 ++++++++++++--------------------------------------------
 1 file changed, 18 insertions(+), 69 deletions(-)
---
diff --git a/libsemanage.spec b/libsemanage.spec
index 7019017..2b144a0 100644
--- a/libsemanage.spec
+++ b/libsemanage.spec
@@ -1,36 +1,29 @@
 #
 # Conditional build:
-%bcond_without	python	# Python (any) bindings
-%bcond_without	python2	# Python 2 binding
-%bcond_without	python3	# Python 3 binding
+%bcond_without	python	# Python 3 bindings
 #
-%if %{without python}
-%undefine	with_python2
-%undefine	with_python3
-%endif
 Summary:	An interface for SELinux management
 Summary(pl.UTF-8):	Interfejs do zarządzania SELinuksem
 Name:		libsemanage
-Version:	2.9
-Release:	3
+Version:	3.1
+Release:	1
 License:	LGPL v2.1+
 Group:		Libraries
 #Source0Download: https://github.com/SELinuxProject/selinux/wiki/Releases
-Source0:	https://github.com/SELinuxProject/selinux/releases/download/20190315/%{name}-%{version}.tar.gz
-# Source0-md5:	25f086ff66175a0ca0e7b34dbe8586b7
+Source0:	https://github.com/SELinuxProject/selinux/releases/download/20200710/%{name}-%{version}.tar.gz
+# Source0-md5:	d16eee8c1dc8cf43f59957d575d6bd29
 Patch0:		%{name}-libexecdir.patch
 URL:		https://github.com/SELinuxProject/selinux/wiki
 BuildRequires:	bison
 BuildRequires:	bzip2-devel
 BuildRequires:	flex
-BuildRequires:	libselinux-devel >= 2.9
-BuildRequires:	libsepol-devel >= 2.9
-%{?with_python2:BuildRequires:	python-devel >= 2}
-%{?with_python3:BuildRequires:	python3-devel >= 1:3.2}
+BuildRequires:	libselinux-devel >= 3.1
+BuildRequires:	libsepol-devel >= 3.1
+%{?with_python:BuildRequires:	python3-devel >= 1:3.2}
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	libselinux >= 2.9
-Requires:	libsepol >= 2.9
+Requires:	libselinux >= 3.1
+Requires:	libsepol >= 3.1
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -63,25 +56,12 @@ Static version of libsemanage library.
 %description static -l pl.UTF-8
 Statyczna wersja biblioteki libsemanage.
 
-%package -n python-semanage
-Summary:	Python 2 binding for semanage library
-Summary(pl.UTF-8):	Wiązania Pythona 2 do biblioteki semanage
-Group:		Libraries/Python
-Requires:	%{name} = %{version}-%{release}
-Requires:	python-selinux >= 2.9
-
-%description -n python-semanage
-Python 2 binding for semanage library.
-
-%description -n python-semanage -l pl.UTF-8
-Wiązania Pythona 2 do biblioteki semanage.
-
 %package -n python3-semanage
 Summary:	Python 3 binding for semanage library
 Summary(pl.UTF-8):	Wiązania Pythona 3 do biblioteki semanage
 Group:		Libraries/Python
 Requires:	%{name} = %{version}-%{release}
-Requires:	python3-selinux >= 2.9
+Requires:	python3-selinux >= 3.1
 
 %description -n python3-semanage
 Python 3 binding for semanage library.
@@ -94,33 +74,23 @@ Wiązania Pythona 3 do biblioteki semanage.
 %patch0 -p1
 
 %build
-%{__make} -j1 all %{?with_python2:pywrap} \
-	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -fno-strict-aliasing" \
-	LIBDIR=%{_libdir} \
-	LIBEXECDIR=%{_libexecdir} \
-	PYPREFIX=python2 \
-	PYTHON=%{__python}
-
-%if %{with python3}
-%{__make} -j1 -C src pywrap \
+%{__make} -j1 all %{?with_python:pywrap} \
 	CC="%{__cc}" \
 	CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -fno-strict-aliasing" \
 	LIBDIR=%{_libdir} \
 	LIBEXECDIR=%{_libexecdir} \
 	PYPREFIX=python3 \
 	PYTHON=%{__python3}
-%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install %{?with_python2:install-pywrap} \
+%{__make} install %{?with_python:install-pywrap} \
 	LIBDIR=%{_libdir} \
 	LIBEXECDIR=%{_libexecdir} \
-	PYPREFIX=python2 \
+	PYPREFIX=python3 \
 	PYSITEDIR=%{py_sitedir} \
-	PYTHON=%{__python} \
+	PYTHON=%{__python3} \
 	DESTDIR=$RPM_BUILD_ROOT
 
 # changed in 2.4
@@ -130,21 +100,7 @@ install -d $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libsemanage.so.*) \
 	$RPM_BUILD_ROOT%{_libdir}/libsemanage.so
 
-%if %{with python2}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
-%endif
-
-%if %{with python3}
-%{__make} -C src install-pywrap \
-	LIBDIR=%{_libdir} \
-	LIBEXECDIR=%{_libexecdir} \
-	PYPREFIX=python3 \
-	PYSITEDIR=%{py3_sitedir} \
-	PYTHON=%{__python3} \
-	DESTDIR=$RPM_BUILD_ROOT
-
+%if %{with python}
 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
 %endif
@@ -175,18 +131,11 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/libsemanage.a
 
-%if %{with python2}
-%files -n python-semanage
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/_semanage.so
-%{py_sitedir}/semanage.py[co]
-%attr(755,root,root) %{_libexecdir}/selinux/semanage_migrate_store
-%endif
-
-%if %{with python3}
+%if %{with python}
 %files -n python3-semanage
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py3_sitedir}/_semanage.cpython-*.so
 %{py3_sitedir}/semanage.py
 %{py3_sitedir}/__pycache__/semanage.cpython-*.py[co]
+%attr(755,root,root) %{_libexecdir}/selinux/semanage_migrate_store
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libsemanage.git/commitdiff/dced15db488ff23a2c6e274815188663b783cc59



More information about the pld-cvs-commit mailing list