Accepting request 1137257 from security:netfilter

OBS-URL: https://build.opensuse.org/request/show/1137257
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nftables?expand=0&rev=34
This commit is contained in:
Dominique Leuenberger 2024-01-07 20:39:05 +00:00 committed by Git OBS Bridge
commit dc64a191ac
3 changed files with 27 additions and 5 deletions

View File

@ -3,6 +3,17 @@ Thu Jan 4 08:04:39 UTC 2024 - Dirk Müller <dmueller@suse.com>
- buildrequire setuptools explicitly as pip drops the dependency
-------------------------------------------------------------------
Wed Jan 3 10:05:39 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Fix the python bindings subpackages
* The PEP517 python build requires setuptools
* Actually use the rpm subpackage definition
* The version is actually python3dist(nftables) = 0.1
* is noarch and requires libnftables1 through dlopen, tell
rpmlint
* remove unused shebang
-------------------------------------------------------------------
Thu Oct 19 23:42:57 UTC 2023 - Jan Engelhardt <jengelh@inai.de>

2
nftables.rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# dlopen of python package not recognized by rpm requirements generator
addFilter("explicit-lib-dependency libnftables1")

View File

@ -16,6 +16,11 @@
#
# configure subpackage rewriter for the python3XX-nftables bindings
%define python_subpackage_only 1
# check py/src/nftable.py:NFTABLES_VERSION
%define pyversion 0.1
Name: nftables
Version: 1.0.9
Release: 0
@ -28,6 +33,7 @@ URL: https://netfilter.org/projects/nftables/
Source: http://ftp.netfilter.org/pub/%name/%name-%version.tar.xz
Source2: http://ftp.netfilter.org/pub/%name/%name-%version.tar.xz.sig
Source3: %name.keyring
Source4: nftables.rpmlintrc
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
@ -79,15 +85,17 @@ This package contains the header files for the library.
%package -n python-nftables
Summary: Python bindings for nftables
Group: Development/Languages/Python
Conflicts: python3-nftables
# uses dlopen
Requires: libnftables1
BuildArch: noarch
%description -n python-nftables
Python bindings for nftables
%prep
%autosetup -p1
# remove unused shebang
sed -i '1{/bin/d}' py/src/nftables.py
%build
autoreconf -fi
@ -120,7 +128,7 @@ mv -v "$b/%_datadir/nftables"/*.nft "$b/%_docdir/%name/examples/"
%post -n libnftables1 -p /sbin/ldconfig
%postun -n libnftables1 -p /sbin/ldconfig
%files -n nftables
%files
%license COPYING
%_sysconfdir/nftables/
%_sbindir/nft
@ -131,13 +139,14 @@ mv -v "$b/%_datadir/nftables"/*.nft "$b/%_docdir/%name/examples/"
%files -n libnftables1
%_libdir/libnftables.so.1*
%files -n nftables-devel
%files devel
%_includedir/%name/
%_libdir/libnftables.so
%_libdir/pkgconfig/*.pc
%_mandir/man3/*.3*
%files %{python_files}
%{python_sitelib}/nftables*
%files %{python_files nftables}
%{python_sitelib}/nftables
%{python_sitelib}/nftables-%{pyversion}.dist-info
%changelog