public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tar] rawhide: Fix build with libacl 2.4.0
@ 2026-07-16 19:17 Pavel Cahyna
0 siblings, 0 replies; only message in thread
From: Pavel Cahyna @ 2026-07-16 19:17 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/tar
Branch : rawhide
Commit : ba02ea3aa2c364b62dd7f019cbaff449cbc6b6c6
Author : Pavel Cahyna <pcahyna@redhat.com>
Date : 2026-07-16T19:44:21+02:00
Stats : +102/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/tar/c/ba02ea3aa2c364b62dd7f019cbaff449cbc6b6c6?branch=rawhide
Log:
Fix build with libacl 2.4.0
Upstream commit 08c3fc2e
Related: bz2494174
---
diff --git a/tar-1.35-Avoid-acl_-prefix-for-functions.patch b/tar-1.35-Avoid-acl_-prefix-for-functions.patch
new file mode 100644
index 0000000..98f6208
--- /dev/null
+++ b/tar-1.35-Avoid-acl_-prefix-for-functions.patch
@@ -0,0 +1,99 @@
+From f1ecf60ea59c1503e63e887e455756b68db04806 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.
+---
+ src/xattrs.c | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/src/xattrs.c b/src/xattrs.c
+index 4f5872c1..f98e8e0f 100644
+--- a/src/xattrs.c
++++ b/src/xattrs.c
+@@ -133,13 +133,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
+@@ -153,8 +153,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
+@@ -164,8 +164,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
+@@ -294,10 +294,10 @@ xattrs__acls_set (struct tar_stat_info const *st,
+ FILE_NAME may already have inherited default acls from parent
+ directory; clean them up. */
+ struct fdbase f1 = fdbase (file_name);
+- if (f1.fd == BADFD || acl_delete_def_file_at (f1.fd, f1.base))
++ if (f1.fd == BADFD || tar_acl_delete_def_file_at (f1.fd, f1.base))
+ WARNOPT (WARN_XATTR_WRITE,
+ (0, errno,
+- _("acl_delete_def_file_at: Cannot drop default POSIX ACLs "
++ _("tar_acl_delete_def_file_at: Cannot drop default POSIX ACLs "
+ "for file '%s'"),
+ file_name));
+ return;
+@@ -311,11 +311,11 @@ xattrs__acls_set (struct tar_stat_info const *st,
+ }
+
+ struct fdbase f = fdbase (file_name);
+- if (f.fd == BADFD || acl_set_file_at (f.fd, f.base, type, acl) == -1)
++ if (f.fd == BADFD || tar_acl_set_file_at (f.fd, f.base, type, acl) == -1)
+ /* warn even if filesystem does not support acls */
+ WARNOPT (WARN_XATTR_WRITE,
+ (0, errno,
+- _ ("acl_set_file_at: Cannot set POSIX ACLs for file '%s'"),
++ _ ("tar_acl_set_file_at: Cannot set POSIX ACLs for file '%s'"),
+ file_name));
+
+ acl_free (acl);
+@@ -351,10 +351,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;
+ }
+
+--
+2.47.3
+
diff --git a/tar.spec b/tar.spec
index 79a712e..5af1223 100644
--- a/tar.spec
+++ b/tar.spec
@@ -58,6 +58,9 @@ Patch22: tar-1.35-no-overwrite-dir-no-overwrite-even-temporarily.patch
# d1aeb7388926e045bdec0f7934c5522c4745f02c
# 45b6e6898d1f931bfca41d961289bd6ac33238e5
Patch23: tar-1.35-CVE-2025-45582.patch
+# Source: https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=08c3fc2e9337094aff01a511170fd35fdb8f1ee3
+# Fixes build with acl 2.4.0
+Patch25: tar-1.35-Avoid-acl_-prefix-for-functions.patch
BuildRequires: autoconf
BuildRequires: automake
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-16 19:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16 19:17 [rpms/tar] rawhide: Fix build with libacl 2.4.0 Pavel Cahyna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox