From d1efca8160cea9b73f484a46e2786371c86b7ef824eab1d6ce1e3f7463d031ca Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Tue, 4 Jul 2023 09:22:49 +0000 Subject: [PATCH] Accepting request 1096707 from home:jsegitz:branches:security:SELinux - Fix python packaging by setting the name to a fixed value OBS-URL: https://build.opensuse.org/request/show/1096707 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libselinux?expand=0&rev=160 --- libselinux.changes | 5 +++++ libselinux.spec | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libselinux.changes b/libselinux.changes index f49b74a..d40e2ac 100644 --- a/libselinux.changes +++ b/libselinux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 4 08:32:49 UTC 2023 - Johannes Segitz + +- Fix python packaging by setting the name to a fixed value + ------------------------------------------------------------------- Fri Jun 23 14:50:33 UTC 2023 - Matej Cepl diff --git a/libselinux.spec b/libselinux.spec index f76a133..144d098 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -112,7 +112,7 @@ security contexts and to obtain security policy decisions. This package contains the static development files, which are necessary to develop your own software using libselinux. -%package -n python-%{name} +%package -n python-selinux %define oldpython python Summary: Python bindings for the SELinux runtime library Group: Development/Libraries/Python @@ -125,7 +125,7 @@ Obsoletes: %{oldpython}-selinux < %{version} Provides: %{oldpython}-selinux = %{version} %endif -%description -n python-%{name} +%description -n python-selinux libselinux provides an interface to get and set process and file security contexts and to obtain security policy decisions. @@ -165,8 +165,6 @@ mkdir -p %{buildroot}%{_sbindir} make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" PYTHON=$python BINDIR="%{_sbindir}" install make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" PYTHON=$python LIBSEPOLA=%{_libdir}/libsepol.a install-pywrap V=1 make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" PYTHON=$python LIBSEPOLA=%{_libdir}/libsepol.a install-rubywrap V=1 -# Remove unnecessary copy of the Python C extension -rm -v %{buildroot}%{$python_sitearch}/_selinux.*.so } mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon @@ -223,9 +221,10 @@ install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}/selinux-ready %files devel-static %{_libdir}/libselinux.a -%files %{python_files %{name}} +%files %{python_files selinux} %{python_sitearch}/selinux %{python_sitearch}/selinux-%{version}*-info +%{python_sitearch}/_selinux* %files -n ruby-selinux %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so