acl: 2.3.2 -> 2.4.0 (#536757)

This commit is contained in:
Vladimír Čunát 2026-07-05 08:23:14 +00:00 committed by GitHub
commit 206fd6070d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 98 additions and 5 deletions

View file

@ -0,0 +1,85 @@
diff --git a/src/xattrs.c b/src/xattrs.c
index 86a7e59cbc..c872ae308d 100644
--- a/src/xattrs.c
+++ b/src/xattrs.c
@@ -139,13 +139,13 @@
#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 @@
#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 @@
#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,10 +299,10 @@
/* 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 "
+ _("tar_acl_delete_def_file_at: Cannot drop default POSIX ACLs "
"for file '%s'"),
file_name));
return;
@@ -316,11 +316,11 @@
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,
- _ ("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);
@@ -357,10 +357,10 @@
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;
}

View file

@ -24,9 +24,17 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "sha256-TWL/NzQux67XSFNTI5MMfPlKz3HDWRiCsmp+pQ8+3BY=";
};
# GNU tar fails to link libiconv even though the configure script detects it.
# https://savannah.gnu.org/bugs/index.php?64441
patches = [ ./link-libiconv.patch ];
patches = [
# GNU tar fails to link libiconv even though the configure script detects it.
# https://savannah.gnu.org/bugs/index.php?64441
./link-libiconv.patch
# acl 2.4.0 adds functions that have name conflicts with internal
# (`static`) functions from GNU tar. we prefix `tar_` to these names to
# avoid this, matching the approach from
# https://lists.gnu.org/archive/html/bug-tar/2026-06/msg00013.html
./acl-2.4.0-name-conflicts.patch
];
# gnutar tries to call into gettext between `fork` and `exec`,
# which is not safe on darwin.

View file

@ -13,11 +13,11 @@
stdenv.mkDerivation (finalAttrs: {
pname = "acl";
version = "2.3.2";
version = "2.4.0";
src = fetchurl {
url = "mirror://savannah/acl/acl-${finalAttrs.version}.tar.gz";
hash = "sha256-XyvbrWKXB6p9hcYj+ZSqih0t7FWnPeUgW6wL9gWKL3w=";
hash = "sha256-c8hTw9ROH2k+WpaphvG9GdPQ2sLH1FPnlhd3dLxOX2o=";
};
outputs = [