!21 Add system call of setns at sw_64

From: @zhangxianting 
Reviewed-by: @xiyuanwang, @han-guangyu 
Signed-off-by: @han-guangyu
This commit is contained in:
openeuler-ci-bot 2023-10-24 02:50:18 +00:00 committed by Gitee
commit 11d0a2846d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 29 additions and 2 deletions

View File

@ -0,0 +1,23 @@
From 7032edd940adb65b3c61f8dc97759d77847b509e Mon Sep 17 00:00:00 2001
From: zhangxianting <zhangxianting@uniontech.com>
Date: Thu, 19 Oct 2023 16:03:10 +0800
Subject: [PATCH] add system call of setns at sw_64
---
pyroute2/netns/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyroute2/netns/__init__.py b/pyroute2/netns/__init__.py
index da48e34..ffae53b 100644
--- a/pyroute2/netns/__init__.py
+++ b/pyroute2/netns/__init__.py
@@ -108,6 +108,7 @@ __NR = {
'aarc': {'32bit': 375, '64bit': 268}, # FIXME: EABI vs. OABI?
'ppc6': {'64bit': 350},
's390': {'64bit': 339},
+ 'sw_6': {'64bit': 501},
}
__NR_setns = __NR.get(config.machine[:4], {}).get(config.arch, 308)
--
2.31.1

View File

@ -2,12 +2,13 @@
%global srcname pyroute2 %global srcname pyroute2
Name: python-pyroute2 Name: python-pyroute2
Version: 0.7.9 Version: 0.7.9
Release: 1 Release: 2
Summary: Python Netlink library Summary: Python Netlink library
License: GPL-2.0-or-later and Apache-2.0 License: GPL-2.0-or-later and Apache-2.0
URL: https://github.com/svinota/pyroute2 URL: https://github.com/svinota/pyroute2
Source0: https://files.pythonhosted.org/packages/f9/f4/5aa161de059353367a3505a8647f475d11f5ce2af4d2375651a2166a1ef3/pyroute2-0.7.9.tar.gz Source0: https://files.pythonhosted.org/packages/f9/f4/5aa161de059353367a3505a8647f475d11f5ce2af4d2375651a2166a1ef3/pyroute2-0.7.9.tar.gz
BuildArch: noarch BuildArch: noarch
Patch1: 0001-add-system-call-of-setns-at-sw_64.patch
%description %description
Pyroute2 is a pure Python **netlink** library. The core requires only Python Pyroute2 is a pure Python **netlink** library. The core requires only Python
@ -36,7 +37,7 @@ Provides: python3-pyroute2-doc
Development documents and examples for pyroute2. Development documents and examples for pyroute2.
%prep %prep
%autosetup -n pyroute2-%{version} %autosetup -n pyroute2-%{version} -p1
%build %build
%pyproject_build %pyproject_build
@ -64,6 +65,9 @@ if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
%{_docdir}/* %{_docdir}/*
%changelog %changelog
* Thu Oct 19 2023 zhangxianting <zhangxianting@uniontech.com> - 0.7.9-2
- Add system call of setns at sw_64
* Mon Jul 17 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.7.9-1 * Mon Jul 17 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.7.9-1
- Update package to version 0.7.9 - Update package to version 0.7.9