Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From a0594387565e1e6b4a8a8ba04ad13b135cc1f0b5 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Thu, 1 Apr 2021 07:49:46 +0200
|
||||
Subject: [PATCH] lib/getrandom.c: fix build with uclibc < 1.0.35
|
||||
|
||||
Fix the following build failure with uclibc < 1.0.35 which is raised
|
||||
since the addition of getrandom module in
|
||||
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=682cc4e678aceff32dea2a84b6e5147bdf5a20a7:
|
||||
|
||||
In file included from ./sys/random.h:40,
|
||||
from getrandom.c:22:
|
||||
/tmp/instance-0/output-1/per-package/tar/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name 'size_t'
|
||||
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
|
||||
| ^~~~~~
|
||||
/tmp/instance-0/output-1/per-package/tar/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:8:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
|
||||
7 | #include <features.h>
|
||||
+++ |+#include <stddef.h>
|
||||
8 |
|
||||
|
||||
This patch is not upstreamable as it is only a workaround for
|
||||
uclibc < 1.0.35, upstream uclibc has been patched with
|
||||
https://github.com/wbx-github/uclibc-ng/commit/00972c02c2b6e0a95d5def4a71bdfb188e091782
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/f40e09d621ab5ba66dd97138dec174acfb7fda2a
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
gnu/getrandom.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gnu/getrandom.c b/gnu/getrandom.c
|
||||
index 41212fb32..0ad3f9648 100644
|
||||
--- a/gnu/getrandom.c
|
||||
+++ b/gnu/getrandom.c
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#include <stddef.h>
|
||||
#include <sys/random.h>
|
||||
|
||||
#include <errno.h>
|
||||
--
|
||||
2.30.2
|
||||
|
||||
28
package/tar/0002-Fix-savannah-bug-#64441.patch
Normal file
28
package/tar/0002-Fix-savannah-bug-#64441.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 8632df398b2f548465ebe68b8f494c0d6f8d913d Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Poznyakoff <gray@gnu.org>
|
||||
Date: Tue, 18 Jul 2023 17:02:23 +0300
|
||||
Subject: Fix savannah bug #64441
|
||||
|
||||
* src/Makefile.am (tar_LDADD): Add libiconv libraries.
|
||||
|
||||
[yann.morin.1998@free.fr: backport from upstream]
|
||||
Upstream: https://git.savannah.gnu.org/cgit/tar.git/commit/?id=8632df398b2f548465ebe68b8f494c0d6f8d913d
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
src/Makefile.am | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 36c9543..e2ec58d 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -52,4 +52,5 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\
|
||||
$(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
|
||||
$(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\
|
||||
- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
|
||||
+ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
|
||||
+ $(LIBINTL) $(LIBICONV)
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
30
package/tar/0003-tests-fix-LDADD.patch
Normal file
30
package/tar/0003-tests-fix-LDADD.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 71530f72d21d9af00b5688948111666f62f5ec4b Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Wed, 19 Jul 2023 15:48:25 -0700
|
||||
Subject: tests: fix LDADD
|
||||
|
||||
Problem reported by Christian Weisgerber <naddy@mips.inka.de> in:
|
||||
https://lists.gnu.org/r/bug-tar/2023-07/msg00015.html
|
||||
* tests/Makefile.am (LDADD): Add $(LIBINTL), $(LIBICONV).
|
||||
|
||||
[yann.morin.1998@free.fr: backport from upstream]
|
||||
Upstream: https://git.savannah.gnu.org/cgit/tar.git/commit/?id=71530f72d21d9af00b5688948111666f62f5ec4b
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
tests/Makefile.am | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 1884b72..b696f01 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -337,4 +337,5 @@ AM_CPPFLAGS = \
|
||||
LDADD = ../gnu/libgnu.a\
|
||||
$(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
|
||||
$(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\
|
||||
- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
|
||||
+ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
|
||||
+ $(LIBINTL) $(LIBICONV)
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
104
package/tar/0004-Avoid-acl_-prefix-for-functions.patch
Normal file
104
package/tar/0004-Avoid-acl_-prefix-for-functions.patch
Normal file
@@ -0,0 +1,104 @@
|
||||
From 08c3fc2e9337094aff01a511170fd35fdb8f1ee3 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: https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=08c3fc2e9337094aff01a511170fd35fdb8f1ee3
|
||||
|
||||
[Bernd: backported to version 1.35]
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
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
|
||||
@@ -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 @@
|
||||
/* 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 @@ 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
|
||||
|
||||
16
package/tar/Config.in
Normal file
16
package/tar/Config.in
Normal file
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_TAR
|
||||
bool "tar"
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
help
|
||||
A program that saves many files together into a single tape
|
||||
or disk archive, and can restore individual files from the
|
||||
archive.
|
||||
|
||||
http://www.gnu.org/software/tar/
|
||||
|
||||
comment "tar needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
4
package/tar/tar.hash
Normal file
4
package/tar/tar.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# Locally calculated after checking signature
|
||||
sha256 4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16 tar-1.35.tar.xz
|
||||
sha256 c77a38fcf25b21fd8209d20d35638744344ded239cfc7df80138bf46d3c6b16d tar-1.35.cpio.gz
|
||||
sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 COPYING
|
||||
82
package/tar/tar.mk
Normal file
82
package/tar/tar.mk
Normal file
@@ -0,0 +1,82 @@
|
||||
################################################################################
|
||||
#
|
||||
# tar
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TAR_VERSION = 1.35
|
||||
TAR_SOURCE = tar-$(TAR_VERSION).tar.xz
|
||||
TAR_SITE = $(BR2_GNU_MIRROR)/tar
|
||||
TAR_LICENSE = GPL-3.0+
|
||||
TAR_LICENSE_FILES = COPYING
|
||||
TAR_CPE_ID_VENDOR = gnu
|
||||
TAR_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
|
||||
TAR_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
|
||||
# 0002-Fix-savannah-bug-#64441.patch
|
||||
# 0003-tests-fix-LDADD.patch
|
||||
TAR_AUTORECONF = YES
|
||||
|
||||
# The package is a dependency to ccache so ccache cannot be a dependency
|
||||
HOST_TAR_ADD_CCACHE_DEPENDENCY = NO
|
||||
|
||||
# busybox installs in /bin, so we need tar to install as well in /bin
|
||||
# so that we don't end up with two different tar
|
||||
#
|
||||
# --disable-year2038: tells the configure script to not abort if the
|
||||
# system is not Y2038 compliant. tar will support year2038 if the
|
||||
# system is compliant even with this option passed
|
||||
TAR_CONF_OPTS = \
|
||||
--exec-prefix=/ \
|
||||
--disable-year2038
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
TAR_DEPENDENCIES += acl
|
||||
TAR_CONF_OPTS += --with-posix-acls
|
||||
else
|
||||
TAR_CONF_OPTS += --without-posix-acls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ATTR),y)
|
||||
TAR_DEPENDENCIES += attr
|
||||
TAR_CONF_OPTS += --with-xattrs
|
||||
else
|
||||
TAR_CONF_OPTS += --without-xattrs
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
# host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem
|
||||
# of needing tar to build tar.
|
||||
HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz
|
||||
|
||||
define HOST_TAR_EXTRACT_CMDS
|
||||
mkdir -p $(@D)
|
||||
cd $(@D) && \
|
||||
$(call suitable-extractor,$(HOST_TAR_SOURCE)) $(TAR_DL_DIR)/$(HOST_TAR_SOURCE) | cpio -i --preserve-modification-time
|
||||
mv $(@D)/tar-$(HOST_TAR_VERSION)/* $(@D)
|
||||
rmdir $(@D)/tar-$(HOST_TAR_VERSION)
|
||||
endef
|
||||
|
||||
HOST_TAR_CONF_OPTS = --without-selinux
|
||||
|
||||
# we are built before ccache
|
||||
HOST_TAR_CONF_ENV = \
|
||||
CC="$(HOSTCC_NOCCACHE)" \
|
||||
CXX="$(HOSTCXX_NOCCACHE)"
|
||||
|
||||
# Patches 0002-Fix-savannah-bug-#64441.patch and
|
||||
# 0003-tests-fix-LDADD.patch are patching Makefile.am, so they do
|
||||
# require TAR_AUTORECONF = YES above. However, for the host-tar
|
||||
# package we can't do this: we can't have host-tar depend on
|
||||
# host-{autoconf,automake,libtool} as those in turn might depend on
|
||||
# host-tar. Since the patches 0002 and 0003 are only related to
|
||||
# linking against libiconv, which is only an issue for the target tar,
|
||||
# we do not autoreconf, and touch the corresponding Makefile.in to
|
||||
# prevent them from being re-generated.
|
||||
HOST_TAR_AUTORECONF = NO
|
||||
define HOST_TAR_NO_AUTORECONF
|
||||
touch $(@D)/src/Makefile.in $(@D)/tests/Makefile.in
|
||||
endef
|
||||
HOST_TAR_POST_PATCH_HOOKS += HOST_TAR_NO_AUTORECONF
|
||||
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user