[packages/libcap] up to 2.73

atler atler at pld-linux.org
Mon Dec 2 13:55:03 CET 2024


commit 5d5c5cc573f4d646fd793dd33938d231d7d19b1b
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Dec 2 13:04:35 2024 +0100

    up to 2.73

 libcap-getdents64.patch | 67 -------------------------------------------------
 libcap.spec             |  6 ++---
 2 files changed, 2 insertions(+), 71 deletions(-)
---
diff --git a/libcap.spec b/libcap.spec
index 03bfa48..09f1ba2 100644
--- a/libcap.spec
+++ b/libcap.spec
@@ -9,14 +9,13 @@ Summary:	POSIX.1e capability suite
 Summary(pl.UTF-8):	Wsparcie dla standardu "capability" POSIX.1e
 Summary(pt_BR.UTF-8):	Biblioteca para leitura e configuração de capabilities.
 Name:		libcap
-Version:	2.72
+Version:	2.73
 Release:	1
 Epoch:		1
 License:	GPL v2 or BSD
 Group:		Applications/System
 Source0:	https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.xz
-# Source0-md5:	0d9dd20dbdc7a94942f0c43ae706e5ac
-Patch0:		%{name}-getdents64.patch
+# Source0-md5:	0e186df9de9b1e925593a96684fe2e32
 URL:		https://sites.google.com/site/fullycapable/
 BuildRequires:	attr-devel
 %{?with_golang:BuildRequires:	golang}
@@ -94,7 +93,6 @@ Moduł PAM capability wymuszający dziedziczone zbiory uprawnień.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 LDFLAGS="%{rpmldflags}" \
diff --git a/libcap-getdents64.patch b/libcap-getdents64.patch
deleted file mode 100644
index 395ec03..0000000
--- a/libcap-getdents64.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 304089b078f2f339cd7ccb030a0ad0194aea0a0f Mon Sep 17 00:00:00 2001
-From: Xi Ruoyao <xry111 at xry111.site>
-Date: Tue, 12 Nov 2024 11:44:56 +0800
-Subject: psx: use getdents64 instead of getdents
-
-On relatively new architectures (for example ARM64, RISC-V, and
-LoongArch), the kernel does not have a getdents syscall.  Use getdents64
-instead to fix the build on them.
-
-The getdents64 syscall was added in Linux 2.4 and I don't think we
-should still support older kernels today.
-
-Signed-off-by: Xi Ruoyao <xry111 at xry111.site>
-Signed-off-by: Andrew G. Morgan <morgan at kernel.org>
----
- psx/psx.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/psx/psx.c b/psx/psx.c
-index d66a7bf..bf7d69f 100644
---- a/psx/psx.c
-+++ b/psx/psx.c
-@@ -410,10 +410,11 @@ static long int __psx_immediate_syscall(long int syscall_nr,
- 
- #define BUF_SIZE 4096
- 
--struct psx_linux_dirent {
--    unsigned long d_ino;
--    off_t d_off;
-+struct psx_linux_dirent64 {
-+    long long d_ino;
-+    long long d_off;
-     unsigned short d_reclen;
-+    unsigned char d_type;
-     char d_name[];
- };
- 
-@@ -486,11 +487,11 @@ long int __psx_syscall(long int syscall_nr, ...) {
- 
- 	for (;;) {
- 	    char buf[BUF_SIZE];
--	    size_t nread = syscall(SYS_getdents, fd, buf, BUF_SIZE);
-+	    size_t nread = syscall(SYS_getdents64, fd, buf, BUF_SIZE);
- 	    if (nread == 0) {
- 		break;
- 	    } else if (nread < 0) {
--		perror("getdents failed");
-+		perror("getdents64 failed");
- 		kill(psx_tracker.pid, SIGKILL);
- 	    }
- 
-@@ -499,10 +500,10 @@ long int __psx_syscall(long int syscall_nr, ...) {
- 	    for (offset = 0; offset < nread; offset += reclen) {
- 		/* deal with potential unaligned reads */
- 		memcpy(&reclen, buf + offset +
--		       offsetof(struct psx_linux_dirent, d_reclen),
-+		       offsetof(struct psx_linux_dirent64, d_reclen),
- 		       sizeof(reclen));
- 		char *dir = (buf + offset +
--			     offsetof(struct psx_linux_dirent, d_name));
-+			     offsetof(struct psx_linux_dirent64, d_name));
- 		long tid = atoi(dir);
- 		if (tid == 0 || tid == self) {
- 		    continue;
--- 
-cgit 1.2.3-korg
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libcap.git/commitdiff/5d5c5cc573f4d646fd793dd33938d231d7d19b1b



More information about the pld-cvs-commit mailing list