Initial commit

This commit is contained in:
domenico
2025-06-24 13:14:22 +02:00
commit 4002f145fc
9002 changed files with 1731834 additions and 0 deletions

31
tools/tar/Makefile Normal file
View File

@@ -0,0 +1,31 @@
#
# 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.34
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/tar
PKG_HASH:=63bebd26879c5e1eea4352f0d03c991f966aeb3ddeb3c7445c902568d5411d28
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
$(eval $(call HostBuild))

View 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
@@ -543,17 +543,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);

View File

@@ -0,0 +1,10 @@
--- a/src/create.c
+++ b/src/create.c
@@ -1844,6 +1844,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)
{