forked from pool/libseccomp
Accepting request 986224 from security
- fix build of python3 bindings so that the debug* package names do not overlay with the main package - Use multibuild to get python3 support back OBS-URL: https://build.opensuse.org/request/show/986224 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libseccomp?expand=0&rev=38
This commit is contained in:
commit
faee3dad8e
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<flavor>python3</flavor>
|
||||||
|
</multibuild>
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 1 11:33:22 UTC 2022 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- fix build of python3 bindings so that the debug* package names do
|
||||||
|
not overlay with the main package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 29 13:05:06 UTC 2022 - Robert Frohl <rfrohl@suse.com>
|
||||||
|
|
||||||
|
- Use multibuild to get python3 support back
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 30 16:42:48 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
Sat Apr 30 16:42:48 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libseccomp
|
# spec file for package python3-seccomp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -16,17 +16,26 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define lname libseccomp2
|
%global pname libseccomp
|
||||||
|
%global lname libseccomp2
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
|
||||||
|
%if "%{flavor}" == "python3"
|
||||||
|
Name: python3-seccomp
|
||||||
|
Summary: Python 3 bindings for seccomp
|
||||||
|
Group: Development/Tools/Debuggers
|
||||||
|
%else
|
||||||
Name: libseccomp
|
Name: libseccomp
|
||||||
|
Summary: A Seccomp (mode 2) helper library
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
%endif
|
||||||
Version: 2.5.4
|
Version: 2.5.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Seccomp (mode 2) helper library
|
|
||||||
License: LGPL-2.1-only
|
License: LGPL-2.1-only
|
||||||
Group: Development/Libraries/C and C++
|
|
||||||
URL: https://github.com/seccomp/libseccomp
|
URL: https://github.com/seccomp/libseccomp
|
||||||
Source: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz
|
Source: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz
|
||||||
Source2: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz.asc
|
Source2: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz.asc
|
||||||
Source3: %name.keyring
|
Source3: %pname.keyring
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
Patch1: make-python-build.patch
|
Patch1: make-python-build.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -34,8 +43,7 @@ BuildRequires: automake >= 1.11
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libtool >= 2
|
BuildRequires: libtool >= 2
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
%bcond_with python
|
%if "%{flavor}" == "python3"
|
||||||
%if 0%{?with python}
|
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Cython >= 0.29
|
BuildRequires: python3-Cython >= 0.29
|
||||||
%endif
|
%endif
|
||||||
@ -46,6 +54,10 @@ syscall filtering mechanism, seccomp. The libseccomp API abstracts
|
|||||||
away the underlying BPF-based syscall filter language and presents a
|
away the underlying BPF-based syscall filter language and presents a
|
||||||
more conventional function-call based filtering interface.
|
more conventional function-call based filtering interface.
|
||||||
|
|
||||||
|
%if "%{flavor}" == "python3"
|
||||||
|
This subpackage contains the python3 bindings for seccomp.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n %lname
|
%package -n %lname
|
||||||
Summary: An enhanced Seccomp (mode 2) helper library
|
Summary: An enhanced Seccomp (mode 2) helper library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
@ -79,19 +91,8 @@ syscall filtering mechanism, seccomp.
|
|||||||
|
|
||||||
This subpackage contains debug utilities for the seccomp interface.
|
This subpackage contains debug utilities for the seccomp interface.
|
||||||
|
|
||||||
%package -n python3-seccomp
|
|
||||||
Summary: Python 3 bindings for seccomp
|
|
||||||
Group: Development/Tools/Debuggers
|
|
||||||
Requires: python3-Cython >= 0.29
|
|
||||||
|
|
||||||
%description -n python3-seccomp
|
|
||||||
The libseccomp library provides an interface to the Linux Kernel's
|
|
||||||
syscall filtering mechanism, seccomp.
|
|
||||||
|
|
||||||
This subpackage contains the python3 bindings for seccomp.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1 -n %{pname}-%{version}
|
||||||
|
|
||||||
%if 0%{?qemu_user_space_build}
|
%if 0%{?qemu_user_space_build}
|
||||||
# The qemu linux-user emulation does not allow executing
|
# The qemu linux-user emulation does not allow executing
|
||||||
@ -103,8 +104,8 @@ echo 'int main () { return 0; }' >tests/52-basic-load.c
|
|||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
%configure \
|
%configure \
|
||||||
--includedir="%_includedir/%name" \
|
--includedir="%_includedir/%pname" \
|
||||||
%if %{with python}
|
%if "%{flavor}" == "python3"
|
||||||
--enable-python \
|
--enable-python \
|
||||||
%endif
|
%endif
|
||||||
--disable-static \
|
--disable-static \
|
||||||
@ -116,6 +117,13 @@ autoreconf -fiv
|
|||||||
%make_install
|
%make_install
|
||||||
find "%buildroot/%_libdir" -type f -name "*.la" -delete
|
find "%buildroot/%_libdir" -type f -name "*.la" -delete
|
||||||
rm -fv %buildroot/%python3_sitearch/install_files.txt
|
rm -fv %buildroot/%python3_sitearch/install_files.txt
|
||||||
|
%if "%{flavor}" == "python3"
|
||||||
|
rm %buildroot/%_libdir/%pname.so*
|
||||||
|
rm -r %buildroot/%_mandir/
|
||||||
|
rm -r %buildroot/%_includedir/%pname/
|
||||||
|
rm -r %buildroot/%_libdir/pkgconfig
|
||||||
|
rm -r %buildroot/%_bindir/
|
||||||
|
%endif
|
||||||
%fdupes %buildroot/%_prefix
|
%fdupes %buildroot/%_prefix
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -125,24 +133,25 @@ make check
|
|||||||
%post -n %lname -p /sbin/ldconfig
|
%post -n %lname -p /sbin/ldconfig
|
||||||
%postun -n %lname -p /sbin/ldconfig
|
%postun -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if "%{flavor}" == "python3"
|
||||||
|
%files
|
||||||
|
%python3_sitearch/seccomp-%version-py*.egg-info
|
||||||
|
%python3_sitearch/seccomp.cpython*.so
|
||||||
|
%else
|
||||||
|
|
||||||
%files -n %lname
|
%files -n %lname
|
||||||
%_libdir/%name.so.2*
|
%_libdir/%pname.so.2*
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%_mandir/man3/seccomp_*.3*
|
%_mandir/man3/seccomp_*.3*
|
||||||
%_includedir/%name/
|
%_includedir/%pname/
|
||||||
%_libdir/%name.so
|
%_libdir/%pname.so
|
||||||
%_libdir/pkgconfig/%name.pc
|
%_libdir/pkgconfig/%pname.pc
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%_bindir/scmp_sys_resolver
|
%_bindir/scmp_sys_resolver
|
||||||
%_mandir/man1/scmp_sys_resolver.1*
|
%_mandir/man1/scmp_sys_resolver.1*
|
||||||
|
|
||||||
%if %{with python}
|
|
||||||
%files -n python3-seccomp
|
|
||||||
%python3_sitearch/seccomp-%version-py*.egg-info
|
|
||||||
%python3_sitearch/seccomp.cpython*.so
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user