From cd5be61aa0a4063dbadab2c2eacdd3528f03ae5e Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Mon, 8 Apr 2024 09:26:47 +0800 Subject: [PATCH] Backport upstream patch to fix syntax error (cherry picked from commit f5acabf59a2a35d5fdaa40e98502f57df40cd4d4) --- ...-Fix-the-syntax-error-in-cap-ng-c-50.patch | 35 +++++++++++++++++++ libcap-ng.spec | 9 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 backport-Fix-the-syntax-error-in-cap-ng-c-50.patch diff --git a/backport-Fix-the-syntax-error-in-cap-ng-c-50.patch b/backport-Fix-the-syntax-error-in-cap-ng-c-50.patch new file mode 100644 index 0000000..48c35ed --- /dev/null +++ b/backport-Fix-the-syntax-error-in-cap-ng-c-50.patch @@ -0,0 +1,35 @@ +From 10ef4b05da8a46117b7ba65e01bf5367cc73777c Mon Sep 17 00:00:00 2001 +From: yixiangzhike +Date: Wed, 20 Mar 2024 20:47:59 +0800 +Subject: [PATCH] Fix the syntax error in cap-ng.c (#50) + +Signed-off-by: yixiangzhike +--- + 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 + diff --git a/libcap-ng.spec b/libcap-ng.spec index c02364c..2e407ac 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -3,12 +3,13 @@ Summary: Libcap-ng is a library used for posix capabilities programming Name: libcap-ng Version: 0.8.3 -Release: 1 +Release: 2 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} @@ -99,6 +100,12 @@ make check %attr(0644,root,root) %{_mandir}/man8/* %changelog +* Mon Apr 8 2024 yixiangzhike - 0.8.3-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:backport upstream patch to fix syntax error + * Sat Oct 29 2022 yixiangzhike - 0.8.3-1 - Type:enhancement - ID:NA -- Gitee