[openwrt/openwrt] tools/tar: update to 1.30

LEDE Commits lede-commits at lists.infradead.org
Sat Jan 20 12:13:50 PST 2018


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/e787ad5c9658deb1baae7ebb1f86bfbe219cb13f

commit e787ad5c9658deb1baae7ebb1f86bfbe219cb13f
Author: Hannu Nyman <hannu.nyman at iki.fi>
AuthorDate: Fri Jan 19 18:55:28 2018 +0200

    tools/tar: update to 1.30
    
    update GNU tar to 1.30
    
    Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>
---
 tools/tar/Makefile                                 |  4 ++--
 tools/tar/patches/001-fix-macos-vasnprintf.patch   | 25 ----------------------
 .../tar/patches/100-symlink-force-root-name.patch  | 21 +++++++++++-------
 .../patches/110-symlink-force-permissions.patch    |  2 +-
 4 files changed, 16 insertions(+), 36 deletions(-)

diff --git a/tools/tar/Makefile b/tools/tar/Makefile
index 10a4a89..baa431e 100644
--- a/tools/tar/Makefile
+++ b/tools/tar/Makefile
@@ -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
 
diff --git a/tools/tar/patches/001-fix-macos-vasnprintf.patch b/tools/tar/patches/001-fix-macos-vasnprintf.patch
deleted file mode 100644
index c7dfbf7..0000000
--- a/tools/tar/patches/001-fix-macos-vasnprintf.patch
+++ /dev/null
@@ -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,
diff --git a/tools/tar/patches/100-symlink-force-root-name.patch b/tools/tar/patches/100-symlink-force-root-name.patch
index 896b472..93f8897 100644
--- a/tools/tar/patches/100-symlink-force-root-name.patch
+++ b/tools/tar/patches/100-symlink-force-root-name.patch
@@ -5,16 +5,21 @@ Signed-off-by: Felix Fietkau <nbd at 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);
  
diff --git a/tools/tar/patches/110-symlink-force-permissions.patch b/tools/tar/patches/110-symlink-force-permissions.patch
index 83dbda6..6fb799b 100644
--- a/tools/tar/patches/110-symlink-force-permissions.patch
+++ b/tools/tar/patches/110-symlink-force-permissions.patch
@@ -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))
      {



More information about the lede-commits mailing list