Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
35
tools/tar/Makefile
Normal file
35
tools/tar/Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tar
|
||||
PKG_CPE_ID:=cpe:/a:gnu:tar
|
||||
PKG_VERSION:=1.35
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/tar
|
||||
PKG_HASH:=14d55e32063ea9526e057fbf35fcabd53378e769787eff7919c3755b02d2b57e
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
HOSTCXX := $(HOSTCXX_NOCACHE)
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--without-posix-acls \
|
||||
--without-selinux \
|
||||
--without-xattrs \
|
||||
--disable-acl \
|
||||
--disable-nls
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
35
tools/tar/patches/0001-Fix-savannah-bug-64441.patch
Normal file
35
tools/tar/patches/0001-Fix-savannah-bug-64441.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 6bec1e7e7fe0ae5bbeb66fc9f32b0b1dd156957d Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Poznyakoff <gray@gnu.org>
|
||||
Date: Tue, 18 Jun 2024 14:31:17 +0200
|
||||
Subject: [PATCH] Fix savannah bug #64441
|
||||
|
||||
* src/Makefile.am (tar_LDADD): Add libiconv libraries.
|
||||
|
||||
Adapted upstream commit 8632df398b2f548465ebe68b8f494c0d6f8d913d to patch
|
||||
the pregenerated Makefile.in instead of Makefile.am to avoid invoking
|
||||
automake which requires m4.
|
||||
|
||||
This is required for macOS, as otherwise it will fail with:
|
||||
Undefined symbols for architecture arm64:
|
||||
"_iconv", referenced from:
|
||||
_utf8_convert in utf8.o
|
||||
"_iconv_open", referenced from:
|
||||
_utf8_convert in utf8.o
|
||||
ld: symbol(s) not found for architecture arm64
|
||||
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
||||
---
|
||||
src/Makefile.in | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -1793,7 +1793,8 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLA
|
||||
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)
|
||||
|
||||
all: all-am
|
||||
|
||||
27
tools/tar/patches/100-symlink-force-root-name.patch
Normal file
27
tools/tar/patches/100-symlink-force-root-name.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
Force root/root as names for uid0/gid0 instead of using the system
|
||||
names. This helps make packed download tarballs more reproducible
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/src/create.c
|
||||
+++ b/src/create.c
|
||||
@@ -544,17 +544,8 @@ write_gnu_long_link (struct tar_stat_inf
|
||||
union block *header;
|
||||
|
||||
header = start_private_header ("././@LongLink", size, 0);
|
||||
- if (! numeric_owner_option)
|
||||
- {
|
||||
- static char *uname, *gname;
|
||||
- if (!uname)
|
||||
- {
|
||||
- uid_to_uname (0, &uname);
|
||||
- gid_to_gname (0, &gname);
|
||||
- }
|
||||
- UNAME_TO_CHARS (uname, header->header.uname);
|
||||
- GNAME_TO_CHARS (gname, header->header.gname);
|
||||
- }
|
||||
+ UNAME_TO_CHARS ("root", header->header.uname);
|
||||
+ GNAME_TO_CHARS ("root", header->header.gname);
|
||||
|
||||
strcpy (header->buffer + offsetof (struct posix_header, magic),
|
||||
OLDGNU_MAGIC);
|
||||
10
tools/tar/patches/110-symlink-force-permissions.patch
Normal file
10
tools/tar/patches/110-symlink-force-permissions.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/src/create.c
|
||||
+++ b/src/create.c
|
||||
@@ -1855,6 +1855,7 @@ dump_file0 (struct tar_stat_info *st, ch
|
||||
#ifdef HAVE_READLINK
|
||||
else if (S_ISLNK (st->stat.st_mode))
|
||||
{
|
||||
+ st->stat.st_mode |= 0777; /* make permissions portable */
|
||||
st->link_name = areadlinkat_with_size (parentfd, name, st->stat.st_size);
|
||||
if (!st->link_name)
|
||||
{
|
||||
Reference in New Issue
Block a user