Compare commits

..

No commits in common. "683cbfc4ac12376c456baddb6ad6cf93a6bb7df6" and "a5d7c20f131bbfa40d1cf67a9e363910892f08c5" have entirely different histories.

5 changed files with 5 additions and 113 deletions

View File

@ -1,35 +0,0 @@
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

View File

@ -1,37 +0,0 @@
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

BIN
libcap-ng-0.8.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -2,15 +2,11 @@
Summary: Libcap-ng is a library used for posix capabilities programming
Name: libcap-ng
Version: 0.8.3
Release: 3
Version: 0.8.1
Release: 1
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}
@ -57,15 +53,12 @@ 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
@ -85,13 +78,14 @@ make check
%attr(0644,root,root) %{_includedir}/cap-ng.h
%{_libdir}/libcap-ng.so
%{_libdir}/libcap-ng.a
%{_libdir}/libdrop_ambient.so
%{_libdir}/libdrop_ambient.a
/%{_lib}/libdrop_ambient.so
/%{_lib}/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/*
@ -99,36 +93,6 @@ 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