Compare commits
10 Commits
a5d7c20f13
...
683cbfc4ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
683cbfc4ac | ||
|
|
0ba7d73db3 | ||
|
|
f1a6b0b3a7 | ||
|
|
cd5be61aa0 | ||
|
|
e709ae6beb | ||
|
|
d9173074de | ||
|
|
aae64d0324 | ||
|
|
83a38b8e22 | ||
|
|
0cdb3b0f93 | ||
|
|
fb3bb2d316 |
35
backport-Fix-the-syntax-error-in-cap-ng-c-50.patch
Normal file
35
backport-Fix-the-syntax-error-in-cap-ng-c-50.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 10ef4b05da8a46117b7ba65e01bf5367cc73777c Mon Sep 17 00:00:00 2001
|
||||
From: yixiangzhike <yixiangzhike007@163.com>
|
||||
Date: Wed, 20 Mar 2024 20:47:59 +0800
|
||||
Subject: [PATCH] Fix the syntax error in cap-ng.c (#50)
|
||||
|
||||
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
|
||||
---
|
||||
src/cap-ng.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cap-ng.c b/src/cap-ng.c
|
||||
index d178e35..ed7d718 100644
|
||||
--- a/src/cap-ng.c
|
||||
+++ b/src/cap-ng.c
|
||||
@@ -445,7 +445,7 @@ static int get_bounding_set(void)
|
||||
#ifdef HAVE_SYSCALL_H
|
||||
(int)syscall(__NR_gettid));
|
||||
#else
|
||||
- (int)getpid();
|
||||
+ (int)getpid());
|
||||
#endif
|
||||
f = fopen(buf, "re");
|
||||
if (f) {
|
||||
@@ -490,7 +490,7 @@ static int get_ambient_set(void)
|
||||
#ifdef HAVE_SYSCALL_H
|
||||
(int)syscall(__NR_gettid));
|
||||
#else
|
||||
- (int)getpid();
|
||||
+ (int)getpid());
|
||||
#endif
|
||||
f = fopen(buf, "re");
|
||||
if (f) {
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From 6a6f22d6e99c973bf2f9f400d52370107ae9396b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?H=C3=A5vard?= <havard.f.aasen@pfft.no>
|
||||
Date: Thu, 26 May 2022 21:26:55 +0000
|
||||
Subject: [PATCH] Make Python test script compatible with Python 2 and Python
|
||||
3. (#35)
|
||||
|
||||
The shebang line is still restricting it to Python 2.
|
||||
Removed end-of-line whitespace as well.
|
||||
---
|
||||
bindings/python/test/capng-test.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bindings/python/test/capng-test.py b/bindings/python/test/capng-test.py
|
||||
index 6688e77..e6350ec 100755
|
||||
--- a/bindings/python/test/capng-test.py
|
||||
+++ b/bindings/python/test/capng-test.py
|
||||
@@ -14,7 +14,7 @@ try:
|
||||
with open('/proc/sys/kernel/cap_last_cap', 'r') as f:
|
||||
last = int(f.readline())
|
||||
except IOError as e:
|
||||
- print "Error opening /proc/sys/kernel/cap_last_cap: {0}".format(e.strerror)
|
||||
+ print("Error opening /proc/sys/kernel/cap_last_cap: {0}".format(e.strerror))
|
||||
|
||||
print("Doing basic bit tests...")
|
||||
capng.capng_clear(capng.CAPNG_SELECT_BOTH)
|
||||
@@ -49,7 +49,7 @@ for i in range(last+1):
|
||||
if capng.capng_have_capabilities(capng.CAPNG_SELECT_CAPS) != capng.CAPNG_PARTIAL:
|
||||
print("Failed have capabilities test 1")
|
||||
sys.exit(1)
|
||||
-
|
||||
+
|
||||
capng.capng_fill(capng.CAPNG_SELECT_BOTH)
|
||||
rc = capng.capng_update(capng.CAPNG_DROP, capng.CAPNG_EFFECTIVE, i)
|
||||
if rc:
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Binary file not shown.
BIN
libcap-ng-0.8.3.tar.gz
Normal file
BIN
libcap-ng-0.8.3.tar.gz
Normal file
Binary file not shown.
@ -2,11 +2,15 @@
|
||||
|
||||
Summary: Libcap-ng is a library used for posix capabilities programming
|
||||
Name: libcap-ng
|
||||
Version: 0.8.1
|
||||
Release: 1
|
||||
Version: 0.8.3
|
||||
Release: 3
|
||||
License: LGPLv2+ and GPLv2+
|
||||
URL: http://people.redhat.com/sgrubb/libcap-ng
|
||||
Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch1: backport-Make-Python-test-script-compatible-with-Python2-and-Python3.patch
|
||||
Patch2: backport-Fix-the-syntax-error-in-cap-ng-c-50.patch
|
||||
|
||||
BuildRequires: gcc, kernel-headers >= 2.6.11, libattr-devel
|
||||
Provides: %{name}-utils = %{version}-%{release}
|
||||
Obsoletes: %{name}-utils < %{version}-%{release}
|
||||
@ -53,12 +57,15 @@ make CFLAGS="%{optflags}" %{?_smp_mflags}
|
||||
|
||||
# Move from %{_lib} to %{_libdir}
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/libdrop_ambient.so
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
|
||||
LIBNAME=$(basename $VLIBNAME)
|
||||
ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
|
||||
ln -s ../../%{_lib}/libdrop_ambient.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libdrop_ambient.so
|
||||
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
|
||||
mv $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a $RPM_BUILD_ROOT%{_libdir}
|
||||
mv $RPM_BUILD_ROOT/%{_lib}/libdrop_ambient.a $RPM_BUILD_ROOT%{_libdir}
|
||||
|
||||
%delete_la
|
||||
|
||||
@ -78,14 +85,13 @@ make check
|
||||
%attr(0644,root,root) %{_includedir}/cap-ng.h
|
||||
%{_libdir}/libcap-ng.so
|
||||
%{_libdir}/libcap-ng.a
|
||||
/%{_lib}/libdrop_ambient.so
|
||||
/%{_lib}/libdrop_ambient.a
|
||||
%{_libdir}/libdrop_ambient.so
|
||||
%{_libdir}/libdrop_ambient.a
|
||||
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
|
||||
%{_libdir}/pkgconfig/libcap-ng.pc
|
||||
|
||||
%files python3
|
||||
%attr(755,root,root) %{python3_sitearch}/*
|
||||
%{python3_sitearch}/capng.py*
|
||||
|
||||
%files help
|
||||
%attr(0644,root,root) %{_mandir}/man3/*
|
||||
@ -93,6 +99,36 @@ make check
|
||||
%attr(0644,root,root) %{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 04 2024 xuguangmin <xuguangmin@kylinos.cn> - 0.8.3-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: Remove duplicate listed file site-packages/capng.py
|
||||
|
||||
* Mon Apr 8 2024 yixiangzhike <yixiangzhike007@163.com> - 0.8.3-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:backport upstream patch to fix syntax error
|
||||
|
||||
* Sat Oct 29 2022 yixiangzhike <yixiangzhike007@163.com> - 0.8.3-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 0.8.3
|
||||
|
||||
* Wed Oct 19 2022 yixiangzhike <yixiangzhike007@163.com> - 0.8.2-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:make Python test script compatible with Python2 and Python3
|
||||
|
||||
* Fri Dec 24 2021 yixiangzhike <yixiangzhike007@163.com> - 0.8.2-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 0.8.2
|
||||
|
||||
* Fri Sep 24 2021 fuanan <fuanan3@huawei.com> - 0.8.1-1
|
||||
- update version to 0.8.1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user