diff --git a/create-standlone-module-dir.patch b/create-standlone-module-dir.patch new file mode 100644 index 0000000000000000000000000000000000000000..5349ef414c3973697111526561c7036fe23fe563 --- /dev/null +++ b/create-standlone-module-dir.patch @@ -0,0 +1,25 @@ +From 55525b06f042488364844b8c3ba6b55df4a0a3d5 Mon Sep 17 00:00:00 2001 +From: zhouyihang +Date: Wed, 13 Mar 2024 10:59:34 +0000 +Subject: [PATCH] create standlone module dir + +--- + py/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/py/Makefile.in b/py/Makefile.in +index ebf0962..b30b2ef 100644 +--- a/py/Makefile.in ++++ b/py/Makefile.in +@@ -459,7 +459,7 @@ all-local: + install-exec-local: + cd $(srcdir) && \ + $(PYTHON_BIN) setup.py build --build-base $(abs_builddir) \ +- install --prefix $(DESTDIR)$(prefix) ++ install --prefix $(DESTDIR)$(prefix) --root / --single-version-externally-managed + + uninstall-local: + rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables +-- +2.33.0 + diff --git a/nftables.spec b/nftables.spec index a7f7ec55cd26e269608bb1ed9e903bdf1e783a59..1787a61d1b8f9f06a569129c826f3b54d8903f31 100644 --- a/nftables.spec +++ b/nftables.spec @@ -1,6 +1,6 @@ Name: nftables Version: 1.0.8 -Release: 1 +Release: 2 Epoch: 1 Summary: A subsystem of the Linux kernel processing network data License: GPLv2 @@ -9,6 +9,7 @@ Source0: http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.xz Source1: nftables.service Source2: nftables.conf +Patch0001: create-standlone-module-dir.patch BuildRequires: gcc flex bison libmnl-devel gmp-devel readline-devel libnftnl-devel docbook2X systemd BuildRequires: iptables-devel jansson-devel python3-devel @@ -104,9 +105,16 @@ echo "%{_libdir}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_mandir}/man5/libnftables-json* %files -n python3-nftables -%{python3_sitelib}/nftables-*.egg +%{python3_sitelib}/nftables-*.egg-info +%{python3_sitelib}/nftables/ %changelog +* Wed Mar 13 2024 zhouyihang - 1:1.0.8-2 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: create standlone module dir to fix import error + * Sat Jan 20 2024 zhanghao - 1:1.0.8-1 - Type: requirement - ID: NA