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
This commit is contained in:
Johannes Segitz 2023-07-04 09:22:49 +00:00 committed by Git OBS Bridge
parent 18c38b5f6e
commit d1efca8160
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 4 08:32:49 UTC 2023 - Johannes Segitz <jsegitz@suse.com>
- Fix python packaging by setting the name to a fixed value
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 23 14:50:33 UTC 2023 - Matej Cepl <mcepl@suse.com> Fri Jun 23 14:50:33 UTC 2023 - Matej Cepl <mcepl@suse.com>

View File

@ -112,7 +112,7 @@ security contexts and to obtain security policy decisions.
This package contains the static development files, which are This package contains the static development files, which are
necessary to develop your own software using libselinux. necessary to develop your own software using libselinux.
%package -n python-%{name} %package -n python-selinux
%define oldpython python %define oldpython python
Summary: Python bindings for the SELinux runtime library Summary: Python bindings for the SELinux runtime library
Group: Development/Libraries/Python Group: Development/Libraries/Python
@ -125,7 +125,7 @@ Obsoletes: %{oldpython}-selinux < %{version}
Provides: %{oldpython}-selinux = %{version} Provides: %{oldpython}-selinux = %{version}
%endif %endif
%description -n python-%{name} %description -n python-selinux
libselinux provides an interface to get and set process and file libselinux provides an interface to get and set process and file
security contexts and to obtain security policy decisions. 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="%{_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-pywrap V=1
make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" PYTHON=$python LIBSEPOLA=%{_libdir}/libsepol.a install-rubywrap 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 mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon
@ -223,9 +221,10 @@ install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}/selinux-ready
%files devel-static %files devel-static
%{_libdir}/libselinux.a %{_libdir}/libselinux.a
%files %{python_files %{name}} %files %{python_files selinux}
%{python_sitearch}/selinux %{python_sitearch}/selinux
%{python_sitearch}/selinux-%{version}*-info %{python_sitearch}/selinux-%{version}*-info
%{python_sitearch}/_selinux*
%files -n ruby-selinux %files -n ruby-selinux
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so