summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authortnn <tnn>2008-05-18 01:48:09 +0000
committertnn <tnn>2008-05-18 01:48:09 +0000
commit2af09cf472d7a2b68cd22e2dad19ce1e126d6548 (patch)
treee32d8c8e0323eec35af22ba73879284783ba85e4 /archivers
parentf841ddcb3a8ab1212b5a9ad7b2f1915e3e843390 (diff)
downloadpkgsrc-2af09cf472d7a2b68cd22e2dad19ce1e126d6548.tar.gz
Update to GNU tar 1.20.
All self-tests pass under NetBSD-current. Changes: 3.5 years worth of development; too much to list here.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/gtar-base/Makefile12
-rw-r--r--archivers/gtar-base/PLIST8
-rw-r--r--archivers/gtar-base/distinfo24
-rw-r--r--archivers/gtar-base/patches/patch-aa16
-rw-r--r--archivers/gtar-base/patches/patch-ab56
-rw-r--r--archivers/gtar-base/patches/patch-ac14
-rw-r--r--archivers/gtar-base/patches/patch-ad10
-rw-r--r--archivers/gtar-base/patches/patch-ae10
-rw-r--r--archivers/gtar-base/patches/patch-af12
-rw-r--r--archivers/gtar-base/patches/patch-ag61
-rw-r--r--archivers/gtar-base/patches/patch-ah21
-rw-r--r--archivers/gtar-base/patches/patch-ai134
-rw-r--r--archivers/gtar-base/patches/patch-aj14
-rw-r--r--archivers/gtar-base/patches/patch-ak19
14 files changed, 57 insertions, 354 deletions
diff --git a/archivers/gtar-base/Makefile b/archivers/gtar-base/Makefile
index 7dff607c5bb..228afdf1c0b 100644
--- a/archivers/gtar-base/Makefile
+++ b/archivers/gtar-base/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.62 2008/04/12 22:42:57 jlam Exp $
+# $NetBSD: Makefile,v 1.63 2008/05/18 01:48:09 tnn Exp $
-DISTNAME= tar-1.15.1
-PKGNAME= gtar-base-1.15.1
-PKGREVISION= 6
+DISTNAME= tar-1.20
+PKGNAME= gtar-base-1.20
SVR4_PKGNAME= gtarb
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_GNU:=tar/}
@@ -56,6 +55,11 @@ PLIST.gtar= yes
PLIST.rmt= yes
.endif
+# XXX see similar hack in coreutils.
+.if ${OPSYS} != "Linux"
+CONFIGURE_ENV+= gt_cv_func_gnugettext3_libintl=yes
+.endif
+
post-install:
${INSTALL_MAN} ${FILESDIR}/gtar.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/${GTAR_PROGRAM_PREFIX}tar.1
diff --git a/archivers/gtar-base/PLIST b/archivers/gtar-base/PLIST
index 8283733b3b7..ad2cd95730b 100644
--- a/archivers/gtar-base/PLIST
+++ b/archivers/gtar-base/PLIST
@@ -1,14 +1,16 @@
-@comment $NetBSD: PLIST,v 1.12 2008/04/12 22:42:57 jlam Exp $
+@comment $NetBSD: PLIST,v 1.13 2008/05/18 01:48:09 tnn Exp $
bin/${GTAR_PROGRAM_PREFIX}tar
${PLIST.gtar}bin/gtar
${PLIST.rmt}libexec/${GTAR_PROGRAM_PREFIX}rmt
man/man1/${GTAR_PROGRAM_PREFIX}tar.1
+share/locale/bg/LC_MESSAGES/tar.mo
share/locale/cs/LC_MESSAGES/tar.mo
share/locale/da/LC_MESSAGES/tar.mo
share/locale/de/LC_MESSAGES/tar.mo
share/locale/el/LC_MESSAGES/tar.mo
share/locale/es/LC_MESSAGES/tar.mo
share/locale/et/LC_MESSAGES/tar.mo
+share/locale/eu/LC_MESSAGES/tar.mo
share/locale/fi/LC_MESSAGES/tar.mo
share/locale/fr/LC_MESSAGES/tar.mo
share/locale/ga/LC_MESSAGES/tar.mo
@@ -19,10 +21,10 @@ share/locale/id/LC_MESSAGES/tar.mo
share/locale/it/LC_MESSAGES/tar.mo
share/locale/ja/LC_MESSAGES/tar.mo
share/locale/ko/LC_MESSAGES/tar.mo
+share/locale/ky/LC_MESSAGES/tar.mo
share/locale/ms/LC_MESSAGES/tar.mo
share/locale/nb/LC_MESSAGES/tar.mo
share/locale/nl/LC_MESSAGES/tar.mo
-share/locale/no/LC_MESSAGES/tar.mo
share/locale/pl/LC_MESSAGES/tar.mo
share/locale/pt/LC_MESSAGES/tar.mo
share/locale/pt_BR/LC_MESSAGES/tar.mo
@@ -32,5 +34,7 @@ share/locale/sk/LC_MESSAGES/tar.mo
share/locale/sl/LC_MESSAGES/tar.mo
share/locale/sv/LC_MESSAGES/tar.mo
share/locale/tr/LC_MESSAGES/tar.mo
+share/locale/uk/LC_MESSAGES/tar.mo
+share/locale/vi/LC_MESSAGES/tar.mo
share/locale/zh_CN/LC_MESSAGES/tar.mo
share/locale/zh_TW/LC_MESSAGES/tar.mo
diff --git a/archivers/gtar-base/distinfo b/archivers/gtar-base/distinfo
index 4ca26d2022f..995d6d9830a 100644
--- a/archivers/gtar-base/distinfo
+++ b/archivers/gtar-base/distinfo
@@ -1,16 +1,10 @@
-$NetBSD: distinfo,v 1.21 2008/04/02 22:03:07 tonnerre Exp $
+$NetBSD: distinfo,v 1.22 2008/05/18 01:48:09 tnn Exp $
-SHA1 (tar-1.15.1.tar.gz) = 21574ae5d39b698f7f577e2cecc91a5ec89b659c
-RMD160 (tar-1.15.1.tar.gz) = 83f35ee090d05f0865ebd9915bbd1b649a6555c5
-Size (tar-1.15.1.tar.gz) = 2204322 bytes
-SHA1 (patch-aa) = adbd252113bfb131de80bbcf8150b2a955e17058
-SHA1 (patch-ab) = 59e75a2051738076ad948ebc4db1240d47e7d366
-SHA1 (patch-ac) = 072a7eaff685093b86289e0b45281c41ae06f4fc
-SHA1 (patch-ad) = 8f109cbc150cb7db48b7a59dcba9eefb654875e0
-SHA1 (patch-ae) = 6518ab82e19c831f16bc772136fafc037a592df4
-SHA1 (patch-af) = be20dafd1c65db4ca60a5aedbc7a972117cd7072
-SHA1 (patch-ag) = 39fd6e84665a632258c722a35359713a1e194287
-SHA1 (patch-ah) = d8532a99bf2bd0c35a9d994101fbd722f52c9ead
-SHA1 (patch-ai) = 9e065a4bbe3fcaee7e08a53b64e863b8fbd0d32a
-SHA1 (patch-aj) = 409760785d3a0e12175760f2f71e192c3dd1ef52
-SHA1 (patch-ak) = 0bc0bae9d39eafdc6a54a59708e01063b9e41497
+SHA1 (tar-1.20.tar.gz) = 1bc0731a00f2483f381c48e0b3f359877ddff910
+RMD160 (tar-1.20.tar.gz) = 6ac6847b4d0f4fcd61408f63df18b503699f2fb9
+Size (tar-1.20.tar.gz) = 2822777 bytes
+SHA1 (patch-ab) = bc2cb4547a0df1d1877a3d09a6e3969123ddecab
+SHA1 (patch-ad) = c5106ba2d0a0414ccbc55dfbf71c95280080b190
+SHA1 (patch-ae) = 99323cf270e3e60dd21db42aea3556dd9255cef2
+SHA1 (patch-af) = 8e57e09e3b1a79310dc343c3741fc94916788b79
+SHA1 (patch-ag) = 8e1f6d2b6d38a029485cd7a1987cc6acb6a4cc84
diff --git a/archivers/gtar-base/patches/patch-aa b/archivers/gtar-base/patches/patch-aa
deleted file mode 100644
index ea491230fb7..00000000000
--- a/archivers/gtar-base/patches/patch-aa
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-aa,v 1.8 2005/01/16 04:44:50 tv Exp $
-
---- configure.orig 2004-12-21 08:30:30.000000000 -0500
-+++ configure
-@@ -19553,9 +19553,9 @@ if test `eval echo '${'$as_ac_Header'}'`
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-- SYSEXITS_H=sysexits.h
--else
- SYSEXITS_H=
-+else
-+ SYSEXITS_H=sysexits.h
- fi
-
- done
diff --git a/archivers/gtar-base/patches/patch-ab b/archivers/gtar-base/patches/patch-ab
index 812ca478105..648d50ad733 100644
--- a/archivers/gtar-base/patches/patch-ab
+++ b/archivers/gtar-base/patches/patch-ab
@@ -1,60 +1,32 @@
-$NetBSD: patch-ab,v 1.11 2006/12/03 15:21:20 tron Exp $
+$NetBSD: patch-ab,v 1.12 2008/05/18 01:48:09 tnn Exp $
---- src/tar.c.orig 2004-12-21 14:11:26.000000000 +0000
-+++ src/tar.c 2006-12-03 15:13:25.000000000 +0000
-@@ -181,6 +181,7 @@
- enum
- {
- ANCHORED_OPTION = CHAR_MAX + 1,
-+ ALLOW_NAME_MANGLING_OPTION,
- ATIME_PRESERVE_OPTION,
- BACKUP_OPTION,
- CHECKPOINT_OPTION,
-@@ -203,6 +204,7 @@
+--- src/tar.c.orig 2008-04-14 14:03:13.000000000 +0200
++++ src/tar.c
+@@ -285,6 +286,7 @@ enum
NO_RECURSION_OPTION,
NO_SAME_OWNER_OPTION,
NO_SAME_PERMISSIONS_OPTION,
+ NO_UNLINK_FIRST_OPTION,
- NO_WILDCARDS_OPTION,
+ NO_UNQUOTE_OPTION,
NO_WILDCARDS_MATCH_SLASH_OPTION,
- NULL_OPTION,
-@@ -340,6 +342,8 @@
- N_("try extracting files with the same ownership"), 31 },
+ NO_WILDCARDS_OPTION,
+@@ -483,6 +485,8 @@ static struct argp_option options[] = {
+ N_("try extracting files with the same ownership"), GRID+1 },
{"no-same-owner", NO_SAME_OWNER_OPTION, 0, 0,
- N_("extract files as yourself"), 31 },
+ N_("extract files as yourself"), GRID+1 },
+ {"no-unlink-first", NO_UNLINK_FIRST_OPTION, 0, 0,
-+ N_("don't remove each file prior to extracting"), 31 },
++ N_("don't remove each file prior to extracting"), GRID+1 },
{"numeric-owner", NUMERIC_OWNER_OPTION, 0, 0,
- N_("always use numbers for user/group names"), 31 },
+ N_("always use numbers for user/group names"), GRID+1 },
{"preserve-permissions", 'p', 0, 0,
-@@ -528,6 +532,8 @@
-
- {NULL, 'o', 0, 0,
- N_("when creating, same as --old-archive. When extracting, same as --no-same-owner"), 91 },
-+ {"allow-name-mangling", ALLOW_NAME_MANGLING_OPTION, 0, 0,
-+ N_("when creating, allow GNUTYPE_NAMES mangling -- considered dangerous"), 91 },
-
- {NULL, 0, NULL, 0,
- N_("Other options:"), 100 },
-@@ -865,6 +871,10 @@
- case 'U':
+@@ -1495,6 +1501,10 @@ parse_opt (int key, char *arg, struct ar
old_files_option = UNLINK_FIRST_OLD_FILES;
break;
-+
+
+ case NO_UNLINK_FIRST_OPTION:
+ old_files_option = 0;
+ break;
-
++
case UTC_OPTION:
utc_option = true;
-@@ -913,6 +923,10 @@
- case 'Z':
- set_use_compress_program_option ("compress");
break;
-+
-+ case ALLOW_NAME_MANGLING_OPTION:
-+ allow_name_mangling_option = true;
-+ break;
-
- case ANCHORED_OPTION:
- args->exclude_options |= EXCLUDE_ANCHORED;
diff --git a/archivers/gtar-base/patches/patch-ac b/archivers/gtar-base/patches/patch-ac
deleted file mode 100644
index da95f92cf52..00000000000
--- a/archivers/gtar-base/patches/patch-ac
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ac,v 1.6 2005/01/09 22:52:14 recht Exp $
-
---- lib/system.h.orig Mon Sep 6 15:49:42 2004
-+++ lib/system.h Sun Jan 9 18:25:02 2005
-@@ -282,6 +282,9 @@
-
- #if MAJOR_IN_MKDEV
- # include <sys/mkdev.h>
-+# if !defined(makedev) && defined(mkdev)
-+# define makedev(a,b) mkdev((a),(b))
-+# endif
- # define GOT_MAJOR
- #endif
-
diff --git a/archivers/gtar-base/patches/patch-ad b/archivers/gtar-base/patches/patch-ad
index 1f739a6ce38..f8b6e348059 100644
--- a/archivers/gtar-base/patches/patch-ad
+++ b/archivers/gtar-base/patches/patch-ad
@@ -1,9 +1,9 @@
-$NetBSD: patch-ad,v 1.7 2005/01/09 22:52:14 recht Exp $
+$NetBSD: patch-ad,v 1.8 2008/05/18 01:48:09 tnn Exp $
---- Makefile.in.orig Mon Dec 20 12:06:01 2004
-+++ Makefile.in Sun Jan 9 19:30:11 2005
-@@ -247,7 +247,7 @@
- target_alias = @target_alias@
+--- Makefile.in.orig 2008-04-14 14:04:01.000000000 +0200
++++ Makefile.in
+@@ -532,7 +532,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = ChangeLog.1 PORTS
-SUBDIRS = doc lib rmt src scripts po tests
diff --git a/archivers/gtar-base/patches/patch-ae b/archivers/gtar-base/patches/patch-ae
index 41e38124ba5..0bee1e86e3d 100644
--- a/archivers/gtar-base/patches/patch-ae
+++ b/archivers/gtar-base/patches/patch-ae
@@ -1,9 +1,9 @@
-$NetBSD: patch-ae,v 1.7 2005/01/09 22:52:14 recht Exp $
+$NetBSD: patch-ae,v 1.8 2008/05/18 01:48:09 tnn Exp $
---- lib/Makefile.in.orig Sun Jan 9 18:41:01 2005
-+++ lib/Makefile.in Sun Jan 9 18:42:35 2005
-@@ -668,7 +668,6 @@
- all-am: Makefile $(LIBRARIES) $(HEADERS) all-local
+--- lib/Makefile.in.orig 2008-04-14 14:03:58.000000000 +0200
++++ lib/Makefile.in
+@@ -980,7 +980,6 @@ check: $(BUILT_SOURCES)
+ all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local
installdirs:
install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
diff --git a/archivers/gtar-base/patches/patch-af b/archivers/gtar-base/patches/patch-af
index 5753f498296..4bf81944be2 100644
--- a/archivers/gtar-base/patches/patch-af
+++ b/archivers/gtar-base/patches/patch-af
@@ -1,13 +1,13 @@
-$NetBSD: patch-af,v 1.3 2005/02/09 16:00:42 tv Exp $
+$NetBSD: patch-af,v 1.4 2008/05/18 01:48:09 tnn Exp $
---- tests/testsuite.orig 2004-12-21 08:36:33.000000000 -0500
+--- tests/testsuite.orig 2008-04-14 14:11:06.000000000 +0200
+++ tests/testsuite
-@@ -303,7 +303,7 @@ at_times_file=$at_suite_dir/at-times
+@@ -620,7 +620,7 @@ at_times_file=$at_suite_dir/at-times
# List of the tested programs.
at_tested='tar'
# List of the all the test groups.
--at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37'
-+at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37'
- # As many dots as there are digits in the last test group number.
+-at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74'
++at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74'
+ # As many question marks as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
diff --git a/archivers/gtar-base/patches/patch-ag b/archivers/gtar-base/patches/patch-ag
index 581ff3d3533..b6d5e63cda5 100644
--- a/archivers/gtar-base/patches/patch-ag
+++ b/archivers/gtar-base/patches/patch-ag
@@ -1,8 +1,8 @@
-$NetBSD: patch-ag,v 1.4 2006/12/03 15:21:20 tron Exp $
+$NetBSD: patch-ag,v 1.5 2008/05/18 01:48:09 tnn Exp $
---- src/extract.c.orig 2004-12-21 09:55:12.000000000 +0000
-+++ src/extract.c 2006-12-03 15:13:25.000000000 +0000
-@@ -195,7 +195,11 @@
+--- src/extract.c.orig 2007-08-26 10:56:55.000000000 +0200
++++ src/extract.c
+@@ -186,7 +186,11 @@ set_mode (char const *file_name,
mode = cur_info->st_mode ^ invert_permissions;
}
@@ -14,56 +14,3 @@ $NetBSD: patch-ag,v 1.4 2006/12/03 15:21:20 tron Exp $
chmod_error_details (file_name, mode);
}
-@@ -235,7 +239,12 @@
- {
- struct utimbuf utimbuf;
-
-+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
- if (typeflag != SYMTYPE)
-+#else
-+ struct timeval tv[2];
-+#endif
-+
- {
- /* We do the utime before the chmod because some versions of utime are
- broken and trash the modes of the file. */
-@@ -248,6 +257,7 @@
-
- /* FIXME: incremental_option should set ctime too, but how? */
-
-+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
- if (incremental_option)
- utimbuf.actime = stat_info->st_atime;
- else
-@@ -256,6 +266,16 @@
- utimbuf.modtime = stat_info->st_mtime;
-
- if (utime (file_name, &utimbuf) < 0)
-+#else
-+ if (incremental_option)
-+ tv[0].tv_sec = stat_info->st_atime;
-+ else
-+ tv[0].tv_sec = start_time;
-+ tv[0].tv_usec = 0;
-+ tv[1].tv_sec = stat_info->st_mtime;
-+ tv[1].tv_usec = 0;
-+ if (lutimes (file_name, tv) < 0)
-+#endif
- utime_error (file_name);
- else
- {
-@@ -1101,7 +1121,13 @@
- break;
-
- case GNUTYPE_NAMES:
-- extract_mangle ();
-+ if (allow_name_mangling_option) {
-+ extract_mangle ();
-+ }
-+ else {
-+ ERROR ((0, 0, _("GNUTYPE_NAMES mangling ignored")));
-+ skip_member ();
-+ }
- break;
-
- case GNUTYPE_MULTIVOL:
diff --git a/archivers/gtar-base/patches/patch-ah b/archivers/gtar-base/patches/patch-ah
deleted file mode 100644
index bbabf1ccd77..00000000000
--- a/archivers/gtar-base/patches/patch-ah
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-ah,v 1.3 2006/01/28 02:03:58 rillig Exp $
-
-MIPSpro does not like non-constant initializers.
-
---- lib/argp-help.c.orig 2004-10-04 11:36:16.000000000 +0200
-+++ lib/argp-help.c 2006-01-28 02:58:23.000000000 +0100
-@@ -1055,7 +1055,13 @@ hol_entry_help (struct hol_entry *entry,
- int old_wm = __argp_fmtstream_wmargin (stream);
- /* PEST is a state block holding some of our variables that we'd like to
- share with helper functions. */
-- struct pentry_state pest = { entry, stream, hhstate, 1, state };
-+ struct pentry_state pest;
-+
-+ pest.entry = entry;
-+ pest.stream = stream;
-+ pest.hhstate = hhstate;
-+ pest.first = 1;
-+ pest.state = state;
-
- if (! odoc (real))
- for (opt = real, num = entry->num; num > 0; opt++, num--)
diff --git a/archivers/gtar-base/patches/patch-ai b/archivers/gtar-base/patches/patch-ai
deleted file mode 100644
index 5ea30a93ec0..00000000000
--- a/archivers/gtar-base/patches/patch-ai
+++ /dev/null
@@ -1,134 +0,0 @@
-$NetBSD: patch-ai,v 1.2 2006/11/27 22:05:34 tv Exp $
-
---- src/xheader.c.orig 2004-09-06 07:31:14.000000000 -0400
-+++ src/xheader.c
-@@ -24,6 +24,10 @@
- #include <stpcpy.h>
- #include <xstrtol.h>
-
-+#ifndef SIZE_MAX
-+# define SIZE_MAX ((size_t) -1)
-+#endif
-+
- #include "common.h"
-
- #define obstack_chunk_alloc xmalloc
-@@ -783,6 +787,32 @@ code_num (uintmax_t value, char const *k
- xheader_print (xhdr, keyword, sbuf);
- }
-
-+static bool
-+decode_num (uintmax_t *num, char const *arg, uintmax_t maxval,
-+ char const *keyword)
-+{
-+ uintmax_t u;
-+ char *arg_lim;
-+
-+ if (! (ISDIGIT (*arg)
-+ && (errno = 0, u = strtoumax (arg, &arg_lim, 10), !*arg_lim)))
-+ {
-+ ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"),
-+ keyword, arg));
-+ return false;
-+ }
-+
-+ if (! (u <= maxval && errno != ERANGE))
-+ {
-+ ERROR ((0, 0, _("Extended header %s=%s is out of range"),
-+ keyword, arg));
-+ return false;
-+ }
-+
-+ *num = u;
-+ return true;
-+}
-+
- static void
- dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)),
- char const *keyword __attribute__ ((unused)),
-@@ -821,7 +851,7 @@ static void
- gid_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid"))
- st->stat.st_gid = u;
- }
-
-@@ -903,7 +933,7 @@ static void
- size_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size"))
- st->archive_file_size = st->stat.st_size = u;
- }
-
-@@ -918,7 +948,7 @@ static void
- uid_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid"))
- st->stat.st_uid = u;
- }
-
-@@ -946,7 +976,7 @@ static void
- sparse_size_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size"))
- st->stat.st_size = u;
- }
-
-@@ -962,10 +992,10 @@ static void
- sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks"))
- {
- st->sparse_map_size = u;
-- st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0]));
-+ st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]);
- st->sparse_map_avail = 0;
- }
- }
-@@ -982,8 +1012,14 @@ static void
- sparse_offset_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset"))
-+ {
-+ if (st->sparse_map_avail < st->sparse_map_size)
- st->sparse_map[st->sparse_map_avail].offset = u;
-+ else
-+ ERROR ((0, 0, _("Malformed extended header: excess %s=%s"),
-+ "GNU.sparse.offset", arg));
-+ }
- }
-
- static void
-@@ -998,15 +1034,13 @@ static void
- sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg)
- {
- uintmax_t u;
-- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK)
-+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes"))
- {
- if (st->sparse_map_avail == st->sparse_map_size)
-- {
-- st->sparse_map_size *= 2;
-- st->sparse_map = xrealloc (st->sparse_map,
-- st->sparse_map_size
-- * sizeof st->sparse_map[0]);
-- }
-+ st->sparse_map = x2nrealloc (st->sparse_map,
-+ &st->sparse_map_size,
-+ sizeof st->sparse_map[0]);
-+
- st->sparse_map[st->sparse_map_avail++].numbytes = u;
- }
- }
diff --git a/archivers/gtar-base/patches/patch-aj b/archivers/gtar-base/patches/patch-aj
deleted file mode 100644
index 559b4e5c9c4..00000000000
--- a/archivers/gtar-base/patches/patch-aj
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2006/12/03 15:21:20 tron Exp $
-
---- src/common.h.orig 2004-12-21 14:31:58.000000000 +0000
-+++ src/common.h 2006-12-03 15:13:25.000000000 +0000
-@@ -124,6 +124,9 @@
-
- GLOBAL bool absolute_names_option;
-
-+/* Allow GNUTYPE_NAMES type? */
-+GLOBAL bool allow_name_mangling_option;
-+
- /* Display file times in UTC */
- GLOBAL bool utc_option;
-
diff --git a/archivers/gtar-base/patches/patch-ak b/archivers/gtar-base/patches/patch-ak
deleted file mode 100644
index 4829916bb5c..00000000000
--- a/archivers/gtar-base/patches/patch-ak
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-ak,v 1.2 2008/04/02 22:03:07 tonnerre Exp $
-
-Fix directory traversal vulnerability (CVE-2007-4131).
-
---- src/names.c.orig 2004-09-06 13:30:54.000000000 +0200
-+++ src/names.c
-@@ -1152,11 +1152,10 @@ contains_dot_dot (char const *name)
- if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
- return 1;
-
-- do
-+ while (! ISSLASH (*p))
- {
- if (! *p++)
- return 0;
- }
-- while (! ISSLASH (*p));
- }
- }