From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 03/45] acl: upgrade 2.3.2 -> 2.4.0
Date: Mon, 6 Jul 2026 19:16:17 +0200 [thread overview]
Message-ID: <20260706171701.70536-3-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20260706171701.70536-1-alex.kanavin@gmail.com>
From: Alexander Kanavin <alex@linutronix.de>
Backport a patch to tar to avoid name clashes.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
...0001-Avoid-acl_-prefix-for-functions.patch | 90 +++++++++++++++++++
meta/recipes-extended/tar/tar_1.35.bb | 22 ++---
...t_uid-fix-memory-wasting-loop-if-use.patch | 49 ----------
...isc.test-Don-t-mix-stdout-and-stderr.patch | 35 --------
.../attr/{acl_2.3.2.bb => acl_2.4.0.bb} | 4 +-
5 files changed, 102 insertions(+), 98 deletions(-)
create mode 100644 meta/recipes-extended/tar/tar/0001-Avoid-acl_-prefix-for-functions.patch
delete mode 100644 meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch
delete mode 100644 meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch
rename meta/recipes-support/attr/{acl_2.3.2.bb => acl_2.4.0.bb} (90%)
diff --git a/meta/recipes-extended/tar/tar/0001-Avoid-acl_-prefix-for-functions.patch b/meta/recipes-extended/tar/tar/0001-Avoid-acl_-prefix-for-functions.patch
new file mode 100644
index 0000000000..a736d5f229
--- /dev/null
+++ b/meta/recipes-extended/tar/tar/0001-Avoid-acl_-prefix-for-functions.patch
@@ -0,0 +1,90 @@
+From 78a6e620515a0ca7e3481a9d8277225c800262a7 Mon Sep 17 00:00:00 2001
+From: Pavel Cahyna <pcahyna@redhat.com>
+Date: Wed, 24 Jun 2026 18:45:30 +0200
+Subject: [PATCH] Avoid acl_ prefix for functions
+
+The acl.h header from libacl uses acl_ prefix for its functions. Avoid
+defining functions with the same name in order to protect its namespace.
+
+Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=08c3fc2e9337094aff01a511170fd35fdb8f1ee3]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/xattrs.c | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/xattrs.c b/src/xattrs.c
+index 86a7e59..bf2c4f0 100644
+--- a/src/xattrs.c
++++ b/src/xattrs.c
+@@ -139,13 +139,13 @@ static struct
+ #ifdef HAVE_POSIX_ACLS
+
+ /* acl-at wrappers, TODO: move to gnulib in future? */
+-static acl_t acl_get_file_at (int, const char *, acl_type_t);
+-static int acl_set_file_at (int, const char *, acl_type_t, acl_t);
++static acl_t tar_acl_get_file_at (int, const char *, acl_type_t);
++static int tar_acl_set_file_at (int, const char *, acl_type_t, acl_t);
+ static int file_has_acl_at (int, char const *, struct stat const *);
+-static int acl_delete_def_file_at (int, char const *);
++static int tar_acl_delete_def_file_at (int, char const *);
+
+-/* acl_get_file_at */
+-#define AT_FUNC_NAME acl_get_file_at
++/* tar_acl_get_file_at */
++#define AT_FUNC_NAME tar_acl_get_file_at
+ #define AT_FUNC_RESULT acl_t
+ #define AT_FUNC_FAIL (acl_t)NULL
+ #define AT_FUNC_F1 acl_get_file
+@@ -159,8 +159,8 @@ static int acl_delete_def_file_at (int, char const *);
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
+ #undef AT_FUNC_POST_FILE_ARGS
+
+-/* acl_set_file_at */
+-#define AT_FUNC_NAME acl_set_file_at
++/* tar_acl_set_file_at */
++#define AT_FUNC_NAME tar_acl_set_file_at
+ #define AT_FUNC_F1 acl_set_file
+ #define AT_FUNC_POST_FILE_PARAM_DECLS , acl_type_t type, acl_t acl
+ #define AT_FUNC_POST_FILE_ARGS , type, acl
+@@ -170,8 +170,8 @@ static int acl_delete_def_file_at (int, char const *);
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
+ #undef AT_FUNC_POST_FILE_ARGS
+
+-/* acl_delete_def_file_at */
+-#define AT_FUNC_NAME acl_delete_def_file_at
++/* tar_acl_delete_def_file_at */
++#define AT_FUNC_NAME tar_acl_delete_def_file_at
+ #define AT_FUNC_F1 acl_delete_def_file
+ #define AT_FUNC_POST_FILE_PARAM_DECLS
+ #define AT_FUNC_POST_FILE_ARGS
+@@ -299,7 +299,7 @@ xattrs__acls_set (struct tar_stat_info const *st,
+ /* No "default" IEEE 1003.1e ACL set for directory. At this moment,
+ FILE_NAME may already have inherited default acls from parent
+ directory; clean them up. */
+- if (acl_delete_def_file_at (chdir_fd, file_name))
++ if (tar_acl_delete_def_file_at (chdir_fd, file_name))
+ WARNOPT (WARN_XATTR_WRITE,
+ (0, errno,
+ _("acl_delete_def_file_at: Cannot drop default POSIX ACLs "
+@@ -316,7 +316,7 @@ xattrs__acls_set (struct tar_stat_info const *st,
+ return;
+ }
+
+- if (acl_set_file_at (chdir_fd, file_name, type, acl) == -1)
++ if (tar_acl_set_file_at (chdir_fd, file_name, type, acl) == -1)
+ /* warn even if filesystem does not support acls */
+ WARNOPT (WARN_XATTR_WRITE,
+ (0, errno,
+@@ -357,10 +357,10 @@ acls_get_text (int parentfd, const char *file_name, acl_type_t type,
+ char *val = NULL;
+ acl_t acl;
+
+- if (!(acl = acl_get_file_at (parentfd, file_name, type)))
++ if (!(acl = tar_acl_get_file_at (parentfd, file_name, type)))
+ {
+ if (errno != ENOTSUP)
+- call_arg_warn ("acl_get_file_at", file_name);
++ call_arg_warn ("tar_acl_get_file_at", file_name);
+ return;
+ }
+
diff --git a/meta/recipes-extended/tar/tar_1.35.bb b/meta/recipes-extended/tar/tar_1.35.bb
index d15e7f8a4e..eb71863231 100644
--- a/meta/recipes-extended/tar/tar_1.35.bb
+++ b/meta/recipes-extended/tar/tar_1.35.bb
@@ -6,7 +6,17 @@ SECTION = "base"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
-SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
+ file://run-ptest \
+ file://0001-tests-fix-TESTSUITE_AT.patch \
+ file://0002-tests-check-for-recently-fixed-bug.patch \
+ file://0003-Exclude-VCS-directory-with-writing-from-an-archive.patch \
+ file://CVE-2026-5704-dependent_p1.patch \
+ file://CVE-2026-5704-dependent_p2.patch \
+ file://CVE-2026-5704.patch \
+ file://CVE-2026-5704-regression.patch \
+ file://0001-Avoid-acl_-prefix-for-functions.patch \
+ "
SRC_URI[sha256sum] = "7edb8886a3dc69420a1446e1e2d061922b642f1cf632d2cd0f9ee7e690775985"
@@ -37,16 +47,6 @@ do_install:append:class-target() {
}
# add for ptest support
-SRC_URI += " \
- file://run-ptest \
- file://0001-tests-fix-TESTSUITE_AT.patch \
- file://0002-tests-check-for-recently-fixed-bug.patch \
- file://0003-Exclude-VCS-directory-with-writing-from-an-archive.patch \
- file://CVE-2026-5704-dependent_p1.patch \
- file://CVE-2026-5704-dependent_p2.patch \
- file://CVE-2026-5704.patch \
- file://CVE-2026-5704-regression.patch \
-"
inherit ptest
diff --git a/meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch b/meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch
deleted file mode 100644
index 5052bdaa2f..0000000000
--- a/meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 56abe432b65801f31277fb9a3bca0f9e31502315 Mon Sep 17 00:00:00 2001
-From: Matthias Gerstner <matthias.gerstner@suse.de>
-Date: Thu, 25 Apr 2024 12:43:49 +0200
-Subject: [PATCH] libmisc: __acl_get_uid(): fix memory wasting loop if user
- does not exist
-
-I noticed that `acl_from_text()` unexpectedly returns ENOMEM for invalid
-user names. The reason for this is a missing break statement in the for
-loop in `__acl_get_uid()`, which causes the loop to act as if ERANGE was
-returned from `getpwnam_r()`, thereby exponentially increasing the
-buffer size to (in my case) multiple gigabytes, until `grow_buffer()`
-reports ENOMEM, which terminates the `__acl_get_uid()` function.
-
-This is a pretty costly "no such user" lookup that can disturb a
-process's heap memory management, but can also cause a process to fail
-e.g. if it is multithreaded and other threads encounter an ENOMEM,
-before `__acl_get_uid()` frees the gigantic heap buffer and returns.
-The allocated memory isn't actually used. Therefore on Linux it should
-not affect other processes by default, due to its overcommit memory
-and lazy memory allocation strategy.
-
-Fix this by properly terminating the for loop on any conditions except
-an ERANGE error being reported. The same break statement correctly
-exists in `__acl_get_gid()` already.
-
-Fixes: 3737f00 ("use thread-safe getpwnam_r and getgrnam_r")
-Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
----
- libmisc/uid_gid_lookup.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libmisc/uid_gid_lookup.c b/libmisc/uid_gid_lookup.c
-index a4f21f6..74baab4 100644
---- a/libmisc/uid_gid_lookup.c
-+++ b/libmisc/uid_gid_lookup.c
-@@ -91,6 +91,7 @@ __acl_get_uid(const char *token, uid_t *uid_p)
- if (err == ERANGE)
- continue;
- errno = err ? err : EINVAL;
-+ break;
- }
- free(buffer);
- return result ? 0 : -1;
---
-2.43.0
-
diff --git a/meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch b/meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch
deleted file mode 100644
index 5aa3f3224c..0000000000
--- a/meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 47f8039ec9bd08b629775c8e788d11e41fa95f14 Mon Sep 17 00:00:00 2001
-From: Andreas Gruenbacher <agruenba@redhat.com>
-Date: Mon, 24 Mar 2025 21:14:09 +0100
-Subject: [PATCH] test/misc.test: Don't mix stdout and stderr
-
-In different environments, we may not get the stdout and stderr output
-in the order the run script expects, so check both separately.
-
-Fixes: https://savannah.nongnu.org/bugs/?66944
-Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
----
- test/misc.test | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/test/misc.test b/test/misc.test
-index 06b3136..57c02e5 100644
---- a/test/misc.test
-+++ b/test/misc.test
-@@ -440,8 +440,9 @@ Dangling symlink test https://savannah.nongnu.org/bugs/?28131
- > other::r-x
- >
- $ setfacl -R -m u:bin:rw d
-- $ getfacl -RL d
-+ $ getfacl -RL d > /dev/null
- > getfacl: d/b: No such file or directory
-+ $ getfacl -RL d 2> /dev/null
- > # file: d
- > # owner: %TUSER
- > # group: %TGROUP
---
-2.43.0
-
diff --git a/meta/recipes-support/attr/acl_2.3.2.bb b/meta/recipes-support/attr/acl_2.4.0.bb
similarity index 90%
rename from meta/recipes-support/attr/acl_2.3.2.bb
rename to meta/recipes-support/attr/acl_2.4.0.bb
index a405cc2692..ef9ee492a0 100644
--- a/meta/recipes-support/attr/acl_2.3.2.bb
+++ b/meta/recipes-support/attr/acl_2.4.0.bb
@@ -16,11 +16,9 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
DEPENDS = "attr"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \
- file://0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch \
- file://0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch \
file://run-ptest \
"
-SRC_URI[sha256sum] = "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c"
+SRC_URI[sha256sum] = "73c853c3d44e1f693e5a96a986f1bd19d3d0dac2c7d453e796177774bc4e5f6a"
inherit autotools gettext ptest
--
2.47.3
next prev parent reply other threads:[~2026-07-06 17:17 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 17:16 [PATCH 01/45] selftest/locales: opt out of ptests in DISTRO_FEATURES Alexander Kanavin
2026-07-06 17:16 ` [PATCH 02/45] files/common-licenses/MIT-with-fmt-exception: add a custom license Alexander Kanavin
2026-07-06 17:16 ` Alexander Kanavin [this message]
2026-07-06 17:16 ` [PATCH 04/45] appstream: upgrade 1.1.2 -> 1.1.3 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 05/45] at-spi2-core: upgrade 2.60.4 -> 2.60.5 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 06/45] attr: upgrade 2.5.2 -> 2.6.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 07/45] barebox-tools: upgrade 2026.06.0 -> 2026.06.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 08/45] cmake: upgrade 4.3.3 -> 4.3.4 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 09/45] expat: upgrade 2.8.1 -> 2.8.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 10/45] fmt: upgrade 12.1.0 -> 12.2.0 Alexander Kanavin
2026-07-09 16:35 ` [OE-core] " Khem Raj
2026-07-06 17:16 ` [PATCH 11/45] git: upgrade 2.54.0 -> 2.55.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 12/45] glib-2.0: upgrade 2.88.1 -> 2.88.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 13/45] gnu-config: upgrade to latest revision Alexander Kanavin
2026-07-06 17:16 ` [PATCH 14/45] gn: " Alexander Kanavin
2026-07-06 17:16 ` [PATCH 15/45] gtk-doc: upgrade 1.35.1 -> 1.36.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 16/45] iproute2: upgrade 7.0.0 -> 7.1.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 17/45] json-c: upgrade 0.18 -> 0.19 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 18/45] libarchive: upgrade 3.8.7 -> 3.8.8 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 19/45] libffi: upgrade 3.5.2 -> 3.6.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 20/45] libical: upgrade 3.0.20 -> 4.0.3 Alexander Kanavin
2026-07-08 5:52 ` [OE-core] " Mathieu Dubois-Briand
2026-07-08 12:04 ` Alexander Kanavin
2026-07-06 17:16 ` [PATCH 21/45] libpsl: upgrade 0.21.5 -> 0.22.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 22/45] lighttpd: upgrade 1.4.83 -> 1.4.84 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 23/45] lttng-modules: upgrade 2.15.1 -> 2.15.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 24/45] opkg: upgrade 0.9.0 -> 0.10.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 25/45] piglit: upgrade to latest revision Alexander Kanavin
2026-07-06 17:16 ` [PATCH 26/45] python3-click: upgrade 8.4.1 -> 8.4.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 27/45] python3-hypothesis: upgrade 6.155.2 -> 6.155.7 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 28/45] python3-pdm: upgrade 2.27.0 -> 2.28.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 29/45] python3-pytest: upgrade 9.1.0 -> 9.1.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 30/45] python3-setuptools-rust: upgrade 1.12.1 -> 1.13.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 31/45] python3-setuptools-scm: upgrade 10.0.5 -> 10.2.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 32/45] python3-vcs-versioning: upgrade 1.1.1 -> 2.2.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 33/45] python3-wcwidth: upgrade 0.8.1 -> 0.8.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 34/45] qemu: upgrade 11.0.1 -> 11.0.2 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 35/45] shared-mime-info: upgrade 2.4 -> 2.5.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 36/45] socat: upgrade 1.8.1.1 -> 1.8.1.3 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 37/45] sqlite3: upgrade 3.53.2 -> 3.53.3 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 38/45] strace: upgrade 7.0 -> 7.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 39/45] tcl: upgrade 9.0.3 -> 9.0.4 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 40/45] ttyrun: upgrade 2.42.1 -> 2.43.0 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 41/45] vulkan-samples: upgrade to latest revision Alexander Kanavin
2026-07-06 17:16 ` [PATCH 42/45] vulkan: upgrade 1.4.350.0 -> 1.4.350.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 43/45] waffle: upgrade 1.8.2 -> 1.8.3 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 44/45] wic: upgrade 0.3.0 -> 0.3.1 Alexander Kanavin
2026-07-06 17:16 ` [PATCH 45/45] xkeyboard-config: upgrade 2.47 -> 2.48 Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260706171701.70536-3-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.