Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,32 @@
Ensure the XATTR_NAME_CAPS is defined when it is used
Upstream-Status: Pending
VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
libcap-native in old release, like CentOS release 6.7 (Final), with the blow
error:
cap_file.c: In function cap_get_fd:
cap_file.c:199: error: XATTR_NAME_CAPS undeclared (first use in this function)
cap_file.c:199: error: (Each undeclared identifier is reported only once
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
libcap/cap_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcap/cap_file.c b/libcap/cap_file.c
index 40756ea..e27ca80 100644
--- a/libcap/cap_file.c
+++ b/libcap/cap_file.c
@@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *);
#include "libcap.h"
-#ifdef VFS_CAP_U32
+#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS)
#if VFS_CAP_U32 != __CAP_BLKS
# error VFS representation of capabilities is not the same size as kernel
--
2.8.1
@@ -0,0 +1,34 @@
From 709aa8e156415215b0bb034d05b2aa2f44be044e Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 14 Oct 2021 15:57:36 +0800
Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
and lengths as well as ld.so.cache path in the dynamic loader to specific
sections in memory. The sections that contain paths have been allocated a 4096
byte section, which is the maximum path length in linux. This will allow the
relocating script to parse the ELF binary, detect the section and easily replace
the strings in a certain path.
Upstream-Status: Inappropriate [SDK specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
libcap/execable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcap/execable.h b/libcap/execable.h
index fee17b4..5bb0c55 100644
--- a/libcap/execable.h
+++ b/libcap/execable.h
@@ -23,7 +23,7 @@
#endif
#define __EXECABLE_H
-const char __execable_dl_loader[] __attribute((section(".interp"))) =
+const char __execable_dl_loader[4096] __attribute((section(".interp"))) =
SHARED_LOADER ;
static void __execable_parse_args(int *argc_p, char ***argv_p)
@@ -0,0 +1,30 @@
From 10212b6d4e8843feffbeab5336342d97f3a46bb2 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 20 Dec 2019 16:54:05 +0100
Subject: [PATCH] tests: do not run target executables
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
tests/Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index ecb7d1b..8950c73 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -61,13 +61,11 @@ endif
# unprivileged
run_psx_test: psx_test
- ./psx_test
psx_test: psx_test.c $(DEPS)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB)
run_libcap_psx_test: libcap_psx_test
- ./libcap_psx_test
libcap_psx_test: libcap_psx_test.c $(DEPS)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB)