tools/tar: update to 1.30

update GNU tar to 1.30

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
Hannu Nyman 2018-01-19 18:55:28 +02:00 committed by Hauke Mehrtens
parent a30370bbf1
commit e787ad5c96
4 changed files with 16 additions and 36 deletions

View File

@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tar
PKG_CPE_ID:=cpe:/a:gnu:tar
PKG_VERSION:=1.29
PKG_VERSION:=1.30
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@GNU/tar
PKG_HASH:=236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2
PKG_HASH:=87592b86cb037c554375f5868bdd3cc57748aef38d6cb741c81065f0beac63b7
HOST_BUILD_PARALLEL := 1

View File

@ -1,25 +0,0 @@
--- a/gnu/vasnprintf.c
+++ b/gnu/vasnprintf.c
@@ -4858,7 +4858,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if ! (((__GLIBC__ > 2 \
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
+ && !defined __UCLIBC__) \
+ || (defined __APPLE__ && defined __MACH__) \
+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';
@@ -4872,6 +4876,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
in format strings in writable memory may crash the program
(if compiled with _FORTIFY_SOURCE=2), so we should avoid it
in this situation. */
+ /* macOS 10.13 High Sierra behaves like glibc with
+ _FORTIFY_SOURCE=2, and older macOS releases
+ presumably do not need %n. */
/* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,

View File

@ -5,16 +5,21 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/create.c
+++ b/src/create.c
@@ -545,12 +545,8 @@ write_gnu_long_link (struct tar_stat_inf
char *tmpname;
@@ -544,17 +544,8 @@ write_gnu_long_link (struct tar_stat_inf
union block *header;
header = start_private_header ("././@LongLink", size, 0);
- uid_to_uname (0, &tmpname);
- UNAME_TO_CHARS (tmpname, header->header.uname);
- free (tmpname);
- gid_to_gname (0, &tmpname);
- GNAME_TO_CHARS (tmpname, header->header.gname);
- free (tmpname);
- 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);

View File

@ -1,6 +1,6 @@
--- a/src/create.c
+++ b/src/create.c
@@ -1851,6 +1851,7 @@ dump_file0 (struct tar_stat_info *st, ch
@@ -1853,6 +1853,7 @@ dump_file0 (struct tar_stat_info *st, ch
#ifdef HAVE_READLINK
else if (S_ISLNK (st->stat.st_mode))
{