create standlone module dir to fix import error

(cherry picked from commit 42a15cf9e497349b8af5e10762966d748143021a)
This commit is contained in:
sherlock2010 2024-03-13 10:51:41 +00:00 committed by openeuler-sync-bot
parent 871c56a96b
commit 4996ba92c2
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From 55525b06f042488364844b8c3ba6b55df4a0a3d5 Mon Sep 17 00:00:00 2001
From: zhouyihang <zhouyihang3@h-partners.com>
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

View File

@ -1,6 +1,6 @@
Name: nftables Name: nftables
Version: 1.0.8 Version: 1.0.8
Release: 1 Release: 2
Epoch: 1 Epoch: 1
Summary: A subsystem of the Linux kernel processing network data Summary: A subsystem of the Linux kernel processing network data
License: GPLv2 License: GPLv2
@ -9,6 +9,7 @@ Source0: http://ftp.netfilter.org/pub/nftables/nftables-%{version}.tar.xz
Source1: nftables.service Source1: nftables.service
Source2: nftables.conf Source2: nftables.conf
Patch0001: create-standlone-module-dir.patch
BuildRequires: gcc flex bison libmnl-devel gmp-devel readline-devel libnftnl-devel docbook2X systemd BuildRequires: gcc flex bison libmnl-devel gmp-devel readline-devel libnftnl-devel docbook2X systemd
BuildRequires: iptables-devel jansson-devel python3-devel 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* %{_mandir}/man5/libnftables-json*
%files -n python3-nftables %files -n python3-nftables
%{python3_sitelib}/nftables-*.egg %{python3_sitelib}/nftables-*.egg-info
%{python3_sitelib}/nftables/
%changelog %changelog
* Wed Mar 13 2024 zhouyihang <zhouyihang3@h-partners.com> - 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 <zhanghao383@huawei.com> - 1:1.0.8-1 * Sat Jan 20 2024 zhanghao <zhanghao383@huawei.com> - 1:1.0.8-1
- Type: requirement - Type: requirement
- ID: NA - ID: NA