From be865fcbea858517cb06c102e6b7ba68b2f64b81d33d2283034e72ca1c92a20e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 20 Oct 2023 01:20:25 +0000 Subject: [PATCH 1/2] - Update to release 1.0.9 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/nftables?expand=0&rev=82 --- ...py-replace-distutils-with-setuptools.patch | 24 -------------- nftables-1.0.8.tar.xz | 3 -- nftables-1.0.8.tar.xz.sig | Bin 566 -> 0 bytes nftables-1.0.9.tar.xz | 3 ++ nftables-1.0.9.tar.xz.sig | Bin 0 -> 566 bytes nftables.changes | 15 +++++++++ nftables.spec | 31 ++++++++++-------- 7 files changed, 35 insertions(+), 41 deletions(-) delete mode 100644 0001-Revert-py-replace-distutils-with-setuptools.patch delete mode 100644 nftables-1.0.8.tar.xz delete mode 100644 nftables-1.0.8.tar.xz.sig create mode 100644 nftables-1.0.9.tar.xz create mode 100644 nftables-1.0.9.tar.xz.sig diff --git a/0001-Revert-py-replace-distutils-with-setuptools.patch b/0001-Revert-py-replace-distutils-with-setuptools.patch deleted file mode 100644 index 915e3ed..0000000 --- a/0001-Revert-py-replace-distutils-with-setuptools.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2125091e724c399d653790af854d9daba0218b99 Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Mon, 17 Jul 2023 12:13:05 +0200 -Subject: [PATCH] Revert "py: replace distutils with setuptools" - -This reverts commit 1acc2fd48c755a8931fa87b8d0560b750316059f. ---- - py/setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/py/setup.py b/py/setup.py -index 8ad73e7b..72fc8fd9 100755 ---- a/py/setup.py -+++ b/py/setup.py -@@ -1,5 +1,5 @@ - #!/usr/bin/env python --from setuptools import setup -+from distutils.core import setup - from nftables import NFTABLES_VERSION - - setup(name='nftables', --- -2.41.0 - diff --git a/nftables-1.0.8.tar.xz b/nftables-1.0.8.tar.xz deleted file mode 100644 index 5879930..0000000 --- a/nftables-1.0.8.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9373740de41a82dbc98818e0a46a073faeb8a8d0689fa4fa1a74399c32bf3d50 -size 882980 diff --git a/nftables-1.0.8.tar.xz.sig b/nftables-1.0.8.tar.xz.sig deleted file mode 100644 index 4307b2911ec3f05b29892671cf48451a1ccedcc177cac9033685228fdfc59706..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SW*e79j*T*<`H1NrA^z0Q;NOU6+cA6d>dU0%WlzasUbm5Y=6m zii#8<3FZCF>rL90GT0_%fJH76iEOS{Kl z;qR29G08|*fvb0TXC2!ZkbJ>f_Q^DEAA&AIXkia<_>hY>Ee%k3i#YvN`^)+mD3z2K zGZg{XYWvJWRS+*BK>ea8M_CkkIA7mxSArOJ6MBAu4VI_`GU^w<^#9lNV}F8!5Lgus zGgRADJ^WQO2X0YUiQBr{om{agEQpjX%MmXVTu4N7iTCp9_8(ulB>$XGIxB}ay7Nz; z18gCFJX)W>zHDB$!{XTNf#DD?-@MBchk=fJX;)(1I?#sr+wK0_?p~8A&%@;?cuMp6 ze6!|@zCJvyT~A$YLp@+IM3%FORR#7Hheg)O#Gv|*n5klfb3-|tlQwr&vkHK{>ED!3 z1w){wipIidSzK_YJFz648Punl#koI8#&II^RB2@Ai|JVNDIb_d1y$Cdu_LvU3BNSS z9=KZ3HKKw{U}ZIC1x%tundq=Jg!hdX$vYmDi=o2{z>% diff --git a/nftables-1.0.9.tar.xz b/nftables-1.0.9.tar.xz new file mode 100644 index 0000000..e33cbe0 --- /dev/null +++ b/nftables-1.0.9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3c304cd9ba061239ee0474f9afb938a9bb99d89b960246f66f0c3a0a85e14cd +size 971968 diff --git a/nftables-1.0.9.tar.xz.sig b/nftables-1.0.9.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..4c19dc4ed4946aac17302b61cf18f1a4d71e63c4a4c70529199da69803f71f9e GIT binary patch literal 566 zcmV-60?GY}0y6{v0SW*e79j*T*<`H1NrA^z0Q;NOU6+cA6d>dU0%b7+LI4U05Y=6m zii#8<A1o2FJZ?jYb)Y?d9x!v($?6*IU*hQJL}*?8M%!w+5}H4chT7tlDZDJj z0a+cLp?tf{hDK(NF}{?gmsAlD3Y1d-SmBGjA`r!ZkX$`twamIvSr~7vhw%E zz=-GkL>f_kcTj5yEZcEshBoK$yRUu6glNXL^y$(=ndq72$z?Hp!NNHDT1}}d5=RYR zC>T&)&~pLj1*h(*;hO`dKX8n>eC-L_Z}(dnu5GuX|FmeHsg$NW}3E|sC0 zhn6x|w6uUgM970pIycv-`eqp8mpgcF5%+vaIHz~#2`w*diugiI9Z@k?wNIe<$rEQn zQE;49LVi??){Cd!J4r_7o5HuLBt1G0qv(E$Ya<;@Gn4-(h7)MwWm0?nD`5^`DbwCg zbEY{}(pT3Rh2aTzTMyk%p8s!3vOVK^8s@Wyji3QU>^}ROfi_d;)p(31K*^nH%22Gp E*wnNSNdN!< literal 0 HcmV?d00001 diff --git a/nftables.changes b/nftables.changes index c042f13..5572991 100644 --- a/nftables.changes +++ b/nftables.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Oct 19 23:42:57 UTC 2023 - Jan Engelhardt + +- Update to release 1.0.9 + * Custom conntrack timeouts can use time specification with + units other than seconds. + * Allow combination of dnat with numgen. + * Allow for using constants as key in dynamic sets. + * Support for matching on the target address of a IPv6 neighbour + solicitation/advertisement. + * Restore bitwise operations in combination with maps, e.g. jump + to chain depending on bitwise operation on packet mark. + * Fix crash with log prefix longer that 127 bytes. +- Drop merged 0001-Revert-py-replace-distutils-with-setuptools.patch + ------------------------------------------------------------------- Fri Jul 14 11:56:43 UTC 2023 - Jan Engelhardt diff --git a/nftables.spec b/nftables.spec index 2334328..79fc487 100644 --- a/nftables.spec +++ b/nftables.spec @@ -17,7 +17,7 @@ Name: nftables -Version: 1.0.8 +Version: 1.0.9 Release: 0 Summary: Userspace utility to access the nf_tables packet filter License: GPL-2.0-only @@ -28,19 +28,22 @@ 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 -Patch1: 0001-Revert-py-replace-distutils-with-setuptools.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} BuildRequires: asciidoc BuildRequires: bison +BuildRequires: fdupes BuildRequires: flex BuildRequires: gmp-devel BuildRequires: libtool BuildRequires: pkg-config >= 0.21 -BuildRequires: python3-base +BuildRequires: python-rpm-macros BuildRequires: pkgconfig(jansson) BuildRequires: pkgconfig(libedit) BuildRequires: pkgconfig(libmnl) >= 1.0.4 BuildRequires: pkgconfig(libnftnl) >= 1.2.6 BuildRequires: pkgconfig(xtables) >= 1.6.1 +%python_subpackages %description nf_tables is a firewalling mechanism in the Linux kernel, running @@ -72,13 +75,6 @@ library. This package contains the header files for the library. -%package -n python3-nftables -Summary: Python interface for nftables -Group: Development/Languages/Python - -%description -n python3-nftables -A Python module for nftables. - %prep %autosetup -p1 @@ -95,10 +91,17 @@ pushd obj/ --enable-python --with-python-bin="$(which python3)" %make_build popd +pushd py +%pyproject_wheel +popd %install b="%buildroot" %make_install -C obj +pushd py +%pyproject_install +%python_expand %fdupes %buildroot/%{$python_sitelib} +popd rm -f "%buildroot/%_libdir"/*.la mkdir -p "$b/%_docdir/%name/examples" mv -v "$b/%_datadir/nftables"/*.nft "$b/%_docdir/%name/examples/" @@ -106,7 +109,7 @@ mv -v "$b/%_datadir/nftables"/*.nft "$b/%_docdir/%name/examples/" %post -n libnftables1 -p /sbin/ldconfig %postun -n libnftables1 -p /sbin/ldconfig -%files +%files -n nftables %license COPYING %_sysconfdir/nftables/ %_sbindir/nft @@ -117,13 +120,13 @@ mv -v "$b/%_datadir/nftables"/*.nft "$b/%_docdir/%name/examples/" %files -n libnftables1 %_libdir/libnftables.so.1* -%files devel +%files -n nftables-devel %_includedir/%name/ %_libdir/libnftables.so %_libdir/pkgconfig/*.pc %_mandir/man3/*.3* -%files -n python3-nftables -%python3_sitelib/nftables* +%files %{python_files} +%{python_sitelib}/nftables* %changelog From 7b20b81e3f5d82bf07d339bcf1f0f929ab414182d172437d079a06b6cd8882a9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 20 Oct 2023 02:06:23 +0000 Subject: [PATCH 2/2] add upgrade markers from single-py nftables OBS-URL: https://build.opensuse.org/package/show/security:netfilter/nftables?expand=0&rev=83 --- nftables.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nftables.spec b/nftables.spec index 79fc487..37eafec 100644 --- a/nftables.spec +++ b/nftables.spec @@ -75,6 +75,16 @@ library. 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 + +%description -n python-nftables +Python bindings for nftables + %prep %autosetup -p1