Switch to new download format and fix building against acl 2.4.0

This commit is contained in:
2026-07-30 13:20:08 +03:00
parent 143283628c
commit 8856984536
3 changed files with 108 additions and 8 deletions
+6 -1
View File
@@ -1,7 +1,7 @@
name: tar
description: GNU tar archive creation and mofication tools
version: "1.35"
revision: 4
revision: 5
url: https://www.gnu.org/software/tar/
license: GPL3
maintainers:
@@ -13,3 +13,8 @@ depends:
- glibc
make_depends:
- attr
downloads:
- url: https://ftpmirror.gnu.org/gnu/tar/tar-${BPM_PKG_VERSION}.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16
+6 -7
View File
@@ -2,20 +2,19 @@
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
DOWNLOAD="https://ftpmirror.gnu.org/gnu/tar/tar-${BPM_PKG_VERSION}.tar.xz"
FILENAME="${DOWNLOAD##*/}"
# The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
cd "$BPM_SOURCE"
patch -Np1 -i "$BPM_WORKDIR"/tar-1.35-acl-2.4.0.patch
autoreconf -fi
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr
./configure --prefix=/usr
make
}
+96
View File
@@ -0,0 +1,96 @@
From f1ecf60ea59c1503e63e887e455756b68db04806 Mon Sep 17 00:00:00 2001
From: Pavel Cahyna <[email protected]>
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 86a7e59..c872ae3 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,10 +299,10 @@ 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 "
+ _("tar_acl_delete_def_file_at: Cannot drop default POSIX ACLs "
"for file '%s'"),
file_name));
return;
@@ -316,11 +316,11 @@ 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,
- _ ("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 @@ 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;
}