summaryrefslogtreecommitdiff
path: root/archivers/gcpio
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2013-06-09 14:35:12 +0000
committerryoon <ryoon@pkgsrc.org>2013-06-09 14:35:12 +0000
commit5e3142cace88c077cdeea23133def1cff1c75e72 (patch)
tree0d00e29052143f7050d3c6787aa0faf48e7fc33d /archivers/gcpio
parent6f9792305d41064f07d82f9c21b044ca31764234 (diff)
downloadpkgsrc-5e3142cace88c077cdeea23133def1cff1c75e72.tar.gz
Update to 2.11
* Update LICENSE to gnu-gpl-v3 Changelog: 2.11: Fix mt build. In copy-in mode, if directory attributes do not permit writing to it, setting them is delayed until the end of run. This allows to correctly extract files in such directories. In copy-in mode, permissions of a directory are restored if it appears in the file list after files in it (e.g. in listings produced by find . -depth). This fixes debian bug #458079. Fix possible memory overflow in the rmt client code (CVE-2010-0624). 2.10: Ensure record headers are properly packed (fix builds on ARM). Fix exit codes to reliably indicate success or failure of the operation. Fix large file support. Support MinGW builds. Minor bugfixes. 2.9: Licensed under the GPLv3. Bugfixes Honor umask when creating intermediate directories, not specified in the archive (debian bug #430053). 2.8: Option --owner can be used in copy-out mode, allowing to uniformly override the ownership of the files being added to the archive. Bugfixes: Symlinks were handled incorrectly in copy-out mode. Fix handling of large files. Fix setting the file permissions in copy-out mode. Fix CAN-2005-1111 2.7: Improved error checking and diagnostics Fixed CAN-1999-1572 Allow to use --sparse in both copy-in and copy-pass. Fix bug that eventually caused copying out the same hard-linked file several times to archive. Fix several LFS-related issues. Fix Debian bug #335580.
Diffstat (limited to 'archivers/gcpio')
-rw-r--r--archivers/gcpio/Makefile9
-rw-r--r--archivers/gcpio/PLIST17
-rw-r--r--archivers/gcpio/distinfo22
-rw-r--r--archivers/gcpio/patches/patch-ac10
-rw-r--r--archivers/gcpio/patches/patch-ae15
-rw-r--r--archivers/gcpio/patches/patch-ag14
-rw-r--r--archivers/gcpio/patches/patch-ah68
-rw-r--r--archivers/gcpio/patches/patch-ai174
-rw-r--r--archivers/gcpio/patches/patch-aj13
-rw-r--r--archivers/gcpio/patches/patch-ak22
-rw-r--r--archivers/gcpio/patches/patch-al26
-rw-r--r--archivers/gcpio/patches/patch-am13
-rw-r--r--archivers/gcpio/patches/patch-an31
-rw-r--r--archivers/gcpio/patches/patch-ao35
-rw-r--r--archivers/gcpio/patches/patch-ap549
-rw-r--r--archivers/gcpio/patches/patch-aq15
-rw-r--r--archivers/gcpio/patches/patch-lib_argp_fmtstream_h50
17 files changed, 10 insertions, 1073 deletions
diff --git a/archivers/gcpio/Makefile b/archivers/gcpio/Makefile
index b37b47a7b7b..61001289547 100644
--- a/archivers/gcpio/Makefile
+++ b/archivers/gcpio/Makefile
@@ -1,16 +1,15 @@
-# $NetBSD: Makefile,v 1.45 2012/12/06 11:38:19 jperkin Exp $
+# $NetBSD: Makefile,v 1.46 2013/06/09 14:35:12 ryoon Exp $
#
-DISTNAME= cpio-2.6
+DISTNAME= cpio-2.11
PKGNAME= g${DISTNAME}
-PKGREVISION= 10
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_GNU:=cpio/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/cpio/cpio.html
COMMENT= GNU copy-in/out (cpio) with remote magnetic tape (rmt) support
-LICENSE= gnu-gpl-v2
+LICENSE= gnu-gpl-v3
CONFLICTS+= gtar-base-[0-9]*
@@ -30,6 +29,8 @@ CONFIGURE_ARGS+= --program-prefix=g
PLIST_VARS+= rmt
+CHECK_FILES_SKIP+= lib/charset.alias
+
.include "../../mk/bsd.prefs.mk"
# don't include rmt if gtar won't build it
diff --git a/archivers/gcpio/PLIST b/archivers/gcpio/PLIST
index 2a50df373af..cc0d664513a 100644
--- a/archivers/gcpio/PLIST
+++ b/archivers/gcpio/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.11 2012/11/20 17:07:05 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.12 2013/06/09 14:35:12 ryoon Exp $
bin/gcpio
gnu/bin/cpio
gnu/man/man1/cpio.1
@@ -7,18 +7,3 @@ info/cpio.info
${PLIST.rmt}libexec/grmt
man/man1/gcpio.1
man/man1/gmt.1
-share/locale/da/LC_MESSAGES/cpio.mo
-share/locale/de/LC_MESSAGES/cpio.mo
-share/locale/es/LC_MESSAGES/cpio.mo
-share/locale/fr/LC_MESSAGES/cpio.mo
-share/locale/gl/LC_MESSAGES/cpio.mo
-share/locale/hu/LC_MESSAGES/cpio.mo
-share/locale/ko/LC_MESSAGES/cpio.mo
-share/locale/nl/LC_MESSAGES/cpio.mo
-share/locale/pl/LC_MESSAGES/cpio.mo
-share/locale/pt_BR/LC_MESSAGES/cpio.mo
-share/locale/ro/LC_MESSAGES/cpio.mo
-share/locale/ru/LC_MESSAGES/cpio.mo
-share/locale/sv/LC_MESSAGES/cpio.mo
-share/locale/tr/LC_MESSAGES/cpio.mo
-share/locale/zh_CN/LC_MESSAGES/cpio.mo
diff --git a/archivers/gcpio/distinfo b/archivers/gcpio/distinfo
index c48c451aa70..53a00c27b76 100644
--- a/archivers/gcpio/distinfo
+++ b/archivers/gcpio/distinfo
@@ -1,19 +1,5 @@
-$NetBSD: distinfo,v 1.13 2012/07/03 18:22:08 joerg Exp $
+$NetBSD: distinfo,v 1.14 2013/06/09 14:35:12 ryoon Exp $
-SHA1 (cpio-2.6.tar.gz) = 5a4ea156519909994fe05933dc823abcf07e3e21
-RMD160 (cpio-2.6.tar.gz) = 8246bdd08ab8727f9a8042d33ddfe3a6332476b8
-Size (cpio-2.6.tar.gz) = 556018 bytes
-SHA1 (patch-ac) = df24b60d612ac59ef82a5d09a16a8be5a6d674ec
-SHA1 (patch-ae) = c5f7d7f0574d37951caba9de05b9017c842c5980
-SHA1 (patch-ag) = 04364ee26f2301f6ddefd2a2bc2b1fff3686411f
-SHA1 (patch-ah) = f7e17682c2f6783e72310ef1d82a1bfca376e5ce
-SHA1 (patch-ai) = c3ad35aa4fe9c82e5110c52c61ca3405915e19ab
-SHA1 (patch-aj) = 1a4f796692cdad64297590acea33f371c903fa66
-SHA1 (patch-ak) = 9f795bf2f600ec31cf760ea0e5a0fc1c014fd143
-SHA1 (patch-al) = 3c1e71ad7a10c80e8ec82718ee44d138641eb18e
-SHA1 (patch-am) = d380ee141b218c568abc69ad90def03add91cde5
-SHA1 (patch-an) = 943fe81aba7846bd8349cc2e31ab9525e019e99f
-SHA1 (patch-ao) = 53c7b6bc1e00a0203665e12807b3388204f838c3
-SHA1 (patch-ap) = cf1ca21394e4e437e64fc83837e08b0aba26d41e
-SHA1 (patch-aq) = d1536000401bbe2d1d32833f5871242e3ba1ddf6
-SHA1 (patch-lib_argp_fmtstream_h) = 10e997a11d06cafd66e9644f69db61fef62097a9
+SHA1 (cpio-2.11.tar.gz) = 2c44a44195edf157060cb0b335a01ee0ece3169a
+RMD160 (cpio-2.11.tar.gz) = 1442c8dcf07d8ef9fcda0b7727aab52fe84161ba
+Size (cpio-2.11.tar.gz) = 1428330 bytes
diff --git a/archivers/gcpio/patches/patch-ac b/archivers/gcpio/patches/patch-ac
deleted file mode 100644
index 0cd310440ff..00000000000
--- a/archivers/gcpio/patches/patch-ac
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ac,v 1.4 2005/11/03 19:38:50 adrianp Exp $
-
---- src/filetypes.h.orig 2005-11-03 18:45:32.000000000 +0000
-+++ src/filetypes.h
-@@ -80,5 +80,3 @@
- #ifndef S_ISLNK
- #define lstat stat
- #endif
--int lstat ();
--int stat ();
diff --git a/archivers/gcpio/patches/patch-ae b/archivers/gcpio/patches/patch-ae
deleted file mode 100644
index f741d3983fe..00000000000
--- a/archivers/gcpio/patches/patch-ae
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2005/11/03 19:38:50 adrianp Exp $
-
---- lib/mkdir.c.orig 2005-11-03 18:48:32.000000000 +0000
-+++ lib/mkdir.c
-@@ -52,8 +52,8 @@ extern int errno;
-
- int
- mkdir (dpath, dmode)
-- char *dpath;
-- int dmode;
-+ const char *dpath;
-+ unsigned int dmode;
- {
- int cpid, status;
- struct stat statbuf;
diff --git a/archivers/gcpio/patches/patch-ag b/archivers/gcpio/patches/patch-ag
deleted file mode 100644
index 6d3360946f7..00000000000
--- a/archivers/gcpio/patches/patch-ag
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ag,v 1.2 2005/11/03 19:38:50 adrianp Exp $
-
---- lib/system.h.orig 2005-11-03 18:51:50.000000000 +0000
-+++ lib/system.h
-@@ -282,6 +282,9 @@ extern int errno;
-
- #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/gcpio/patches/patch-ah b/archivers/gcpio/patches/patch-ah
deleted file mode 100644
index 2fcc8523bcb..00000000000
--- a/archivers/gcpio/patches/patch-ah
+++ /dev/null
@@ -1,68 +0,0 @@
-$NetBSD: patch-ah,v 1.2 2005/11/03 19:38:50 adrianp Exp $
-
---- src/main.c.orig 2005-11-03 19:08:15.000000000 +0000
-+++ src/main.c
-@@ -41,6 +41,7 @@
-
- enum cpio_options {
- NO_ABSOLUTE_FILENAMES_OPTION=256,
-+ ABSOLUTE_FILENAMES_OPTION,
- NO_PRESERVE_OWNER_OPTION,
- ONLY_VERIFY_CRC_OPTION,
- RENAME_BATCH_FILE_OPTION,
-@@ -134,6 +135,8 @@ static struct argp_option options[] = {
- N_("In copy-in mode, read additional patterns specifying filenames to extract or list from FILE"), 210},
- {"no-absolute-filenames", NO_ABSOLUTE_FILENAMES_OPTION, 0, 0,
- N_("Create all files relative to the current directory"), 210},
-+ {"absolute-filenames", ABSOLUTE_FILENAMES_OPTION, 0, 0,
-+ N_("do not strip leading file name components that contain \"..\" and leading slashes from file names"), 210},
- {"only-verify-crc", ONLY_VERIFY_CRC_OPTION, 0, 0,
- N_("When reading a CRC format archive in copy-in mode, only verify the CRC's of each file in the archive, don't actually extract the files"), 210},
- {"rename", 'r', 0, 0,
-@@ -392,7 +395,11 @@ crc newc odc bin ustar tar (all-caps als
- break;
-
- case NO_ABSOLUTE_FILENAMES_OPTION: /* --no-absolute-filenames */
-- no_abs_paths_flag = true;
-+ abs_paths_flag = false;
-+ break;
-+
-+ case ABSOLUTE_FILENAMES_OPTION: /* --absolute-filenames */
-+ abs_paths_flag = true;
- break;
-
- case NO_PRESERVE_OWNER_OPTION: /* --no-preserve-owner */
-@@ -631,7 +638,7 @@ process_args (int argc, char *argv[])
- _("--append is used but no archive file name is given (use -F or -O options")));
-
- CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--create");
-- CHECK_USAGE(no_abs_paths_flag, "--no-absolute-pathnames", "--create");
-+ CHECK_USAGE(abs_paths_flag, "--absolute-pathnames", "--create");
- CHECK_USAGE(input_archive_name, "-I", "--create");
- if (archive_name && output_archive_name)
- USAGE_ERROR ((0, 0, _("Both -O and -F are used in copy-out mode")));
-@@ -658,7 +665,7 @@ process_args (int argc, char *argv[])
- CHECK_USAGE(rename_flag, "--rename", "--pass-through");
- CHECK_USAGE(append_flag, "--append", "--pass-through");
- CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--pass-through");
-- CHECK_USAGE(no_abs_paths_flag, "--no-absolute-pathnames",
-+ CHECK_USAGE(abs_paths_flag, "--absolute-pathnames",
- "--pass-through");
- CHECK_USAGE(to_stdout_option, "--to-stdout", "--pass-through");
-
-@@ -740,7 +747,6 @@ main (int argc, char *argv[])
- textdomain (PACKAGE);
-
- program_name = argv[0];
-- umask (0);
-
- #ifdef __TURBOC__
- _fmode = O_BINARY; /* Put stdin and stdout in binary mode. */
-@@ -751,6 +757,7 @@ main (int argc, char *argv[])
- #endif
-
- process_args (argc, argv);
-+ umask (0);
-
- initialize_buffers ();
-
diff --git a/archivers/gcpio/patches/patch-ai b/archivers/gcpio/patches/patch-ai
deleted file mode 100644
index e2ad456ea76..00000000000
--- a/archivers/gcpio/patches/patch-ai
+++ /dev/null
@@ -1,174 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2005/11/03 19:38:50 adrianp Exp $
-
---- src/copyin.c.orig 2005-11-03 19:08:29.000000000 +0000
-+++ src/copyin.c
-@@ -25,6 +25,7 @@
- #include "dstring.h"
- #include "extern.h"
- #include "defer.h"
-+#include "dirname.h"
- #include <rmt.h>
- #ifndef FNM_PATHNAME
- #include <fnmatch.h>
-@@ -389,19 +390,26 @@ create_final_defers ()
- continue;
- }
-
-- if (close (out_file_des) < 0)
-- error (0, errno, "%s", d->header.c_name);
--
-+ /*
-+ * Avoid race condition.
-+ * Set chown and chmod before closing the file desc.
-+ * pvrabec@redhat.com
-+ */
-+
- /* File is now copied; set attributes. */
- if (!no_chown_flag)
-- if ((chown (d->header.c_name,
-+ if ((fchown (out_file_des,
- set_owner_flag ? set_owner : d->header.c_uid,
- set_group_flag ? set_group : d->header.c_gid) < 0)
- && errno != EPERM)
- error (0, errno, "%s", d->header.c_name);
- /* chown may have turned off some permissions we wanted. */
-- if (chmod (d->header.c_name, (int) d->header.c_mode) < 0)
-+ if (fchmod (out_file_des, (int) d->header.c_mode) < 0)
- error (0, errno, "%s", d->header.c_name);
-+
-+ if (close (out_file_des) < 0)
-+ error (0, errno, "%s", d->header.c_name);
-+
- if (retain_time_flag)
- {
- times.actime = times.modtime = d->header.c_mtime;
-@@ -557,6 +565,25 @@ copyin_regular_file (struct new_cpio_hea
- write (out_file_des, "", 1);
- delayed_seek_count = 0;
- }
-+
-+ /*
-+ * Avoid race condition.
-+ * Set chown and chmod before closing the file desc.
-+ * pvrabec@redhat.com
-+ */
-+
-+ /* File is now copied; set attributes. */
-+ if (!no_chown_flag)
-+ if ((fchown (out_file_des,
-+ set_owner_flag ? set_owner : file_hdr->c_uid,
-+ set_group_flag ? set_group : file_hdr->c_gid) < 0)
-+ && errno != EPERM)
-+ error (0, errno, "%s", file_hdr->c_name);
-+
-+ /* chown may have turned off some permissions we wanted. */
-+ if (fchmod (out_file_des, (int) file_hdr->c_mode) < 0)
-+ error (0, errno, "%s", file_hdr->c_name);
-+
- if (close (out_file_des) < 0)
- error (0, errno, "%s", file_hdr->c_name);
-
-@@ -567,18 +594,6 @@ copyin_regular_file (struct new_cpio_hea
- file_hdr->c_name, crc, file_hdr->c_chksum);
- }
-
-- /* File is now copied; set attributes. */
-- if (!no_chown_flag)
-- if ((chown (file_hdr->c_name,
-- set_owner_flag ? set_owner : file_hdr->c_uid,
-- set_group_flag ? set_group : file_hdr->c_gid) < 0)
-- && errno != EPERM)
-- error (0, errno, "%s", file_hdr->c_name);
--
-- /* chown may have turned off some permissions we wanted. */
-- if (chmod (file_hdr->c_name, (int) file_hdr->c_mode) < 0)
-- error (0, errno, "%s", file_hdr->c_name);
--
- if (retain_time_flag)
- {
- struct utimbuf times; /* For setting file times. */
-@@ -589,7 +604,7 @@ copyin_regular_file (struct new_cpio_hea
- if (utime (file_hdr->c_name, &times) < 0)
- error (0, errno, "%s", file_hdr->c_name);
- }
--
-+
- tape_skip_padding (in_file_des, file_hdr->c_filesize);
- if (file_hdr->c_nlink > 1
- && (archive_format == arf_newascii || archive_format == arf_crcascii) )
-@@ -1335,6 +1350,53 @@ swab_array (char *ptr, int count)
- }
- }
-
-+/* Return a safer suffix of FILE_NAME, or "." if it has no safer
-+ suffix. Check for fully specified file names and other atrocities. */
-+
-+static const char *
-+safer_name_suffix (char const *file_name)
-+{
-+ char const *p;
-+
-+ /* Skip file system prefixes, leading file name components that contain
-+ "..", and leading slashes. */
-+
-+ size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (file_name);
-+
-+ for (p = file_name + prefix_len; *p;)
-+ {
-+ if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
-+ prefix_len = p + 2 - file_name;
-+
-+ do
-+ {
-+ char c = *p++;
-+ if (ISSLASH (c))
-+ break;
-+ }
-+ while (*p);
-+ }
-+
-+ for (p = file_name + prefix_len; ISSLASH (*p); p++)
-+ continue;
-+ prefix_len = p - file_name;
-+
-+ if (prefix_len)
-+ {
-+ char *prefix = alloca (prefix_len + 1);
-+ memcpy (prefix, file_name, prefix_len);
-+ prefix[prefix_len] = '\0';
-+
-+
-+ error (0, 0, _("Removing leading `%s' from member names"), prefix);
-+ }
-+
-+ if (!*p)
-+ p = ".";
-+
-+ return p;
-+}
-+
- /* Read the collection from standard input and create files
- in the file system. */
-
-@@ -1445,18 +1507,11 @@ process_copy_in ()
-
- /* Do we have to ignore absolute paths, and if so, does the filename
- have an absolute path? */
-- if (no_abs_paths_flag && file_hdr.c_name && file_hdr.c_name [0] == '/')
-+ if (!abs_paths_flag && file_hdr.c_name && file_hdr.c_name [0])
- {
-- char *p;
-+ const char *p = safer_name_suffix (file_hdr.c_name);
-
-- p = file_hdr.c_name;
-- while (*p == '/')
-- ++p;
-- if (*p == '\0')
-- {
-- strcpy (file_hdr.c_name, ".");
-- }
-- else
-+ if (p != file_hdr.c_name)
- {
- /* Debian hack: file_hrd.c_name is sometimes set to
- point to static memory by code in tar.c. This
diff --git a/archivers/gcpio/patches/patch-aj b/archivers/gcpio/patches/patch-aj
deleted file mode 100644
index 8f10edcce54..00000000000
--- a/archivers/gcpio/patches/patch-aj
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2005/11/03 19:38:50 adrianp Exp $
-
---- src/global.c.orig 2004-09-08 11:23:44.000000000 +0100
-+++ src/global.c
-@@ -100,7 +100,7 @@ int quiet_flag = false;
- int only_verify_crc_flag = false;
-
- /* If true, don't use any absolute paths, prefix them by `./'. */
--int no_abs_paths_flag = false;
-+int abs_paths_flag = false;
-
- #ifdef DEBUG_CPIO
- /* If true, print debugging information. */
diff --git a/archivers/gcpio/patches/patch-ak b/archivers/gcpio/patches/patch-ak
deleted file mode 100644
index 6ca5e745359..00000000000
--- a/archivers/gcpio/patches/patch-ak
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ak,v 1.2 2006/02/12 01:44:28 seb Exp $
-
---- src/extern.h.orig 2004-09-08 12:49:57.000000000 +0200
-+++ src/extern.h
-@@ -46,7 +46,7 @@ extern int no_chown_flag;
- extern int sparse_flag;
- extern int quiet_flag;
- extern int only_verify_crc_flag;
--extern int no_abs_paths_flag;
-+extern int abs_paths_flag;
- extern unsigned int warn_option;
-
- /* Values for warn_option */
-@@ -112,7 +112,7 @@ void long_format P_((struct new_cpio_hea
- void print_name_with_quoting P_((char *p));
-
- /* copyout.c */
--void write_out_header P_((struct new_cpio_header *file_hdr, int out_des));
-+int write_out_header P_((struct new_cpio_header *file_hdr, int out_des));
- void process_copy_out P_((void));
-
- /* copypass.c */
diff --git a/archivers/gcpio/patches/patch-al b/archivers/gcpio/patches/patch-al
deleted file mode 100644
index 1bca3685cd4..00000000000
--- a/archivers/gcpio/patches/patch-al
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-al,v 1.1 2005/11/03 19:38:50 adrianp Exp $
-
---- doc/cpio.info.orig 2004-02-27 12:42:01.000000000 +0000
-+++ doc/cpio.info
-@@ -203,7 +203,7 @@ extracted. *Note Options::.
- [--swap-halfwords] [--io-size=bytes] [--pattern-file=file]
- [--format=format] [--owner=[user][:.][group]]
- [--no-preserve-owner] [--message=message] [--help] [--version]
-- [-no-absolute-filenames] [--sparse] [-only-verify-crc] [-quiet]
-+ [--absolute-filenames] [--sparse] [-only-verify-crc] [-quiet]
- [--rsh-command=command] [pattern...] [< archive]
-
- 
-@@ -358,9 +358,9 @@ Options
- Show numeric UID and GID instead of translating them into names
- when using the `--verbose option'.
-
--`--no-absolute-filenames'
-- Create all files relative to the current directory in copy-in
-- mode, even if they have an absolute file name in the archive.
-+`--absolute-filenames'
-+ Do not strip leading file name components that contain ".."
-+ and leading slashes from file names in copy-in mode
-
- `--no-preserve-owner'
- Do not change the ownership of the files; leave them owned by the
diff --git a/archivers/gcpio/patches/patch-am b/archivers/gcpio/patches/patch-am
deleted file mode 100644
index 4fededdf6e6..00000000000
--- a/archivers/gcpio/patches/patch-am
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-am,v 1.1 2005/11/03 19:38:50 adrianp Exp $
-
---- doc/cpio.1.orig 2004-08-30 17:21:48.000000000 +0100
-+++ doc/cpio.1
-@@ -20,7 +20,7 @@ cpio \- copy files to and from archives
- [\-\-unconditional] [\-\-verbose] [\-\-block-size=blocks] [\-\-swap-halfwords]
- [\-\-io-size=bytes] [\-\-pattern-file=file] [\-\-format=format]
- [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
--[\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse]
-+[\-\-force\-local] [\-\-absolute\-filenames] [\-\-sparse]
- [\-\-only\-verify\-crc] [\-\-quiet] [\-\-rsh-command=command] [\-\-help]
- [\-\-version] [pattern...] [< archive]
-
diff --git a/archivers/gcpio/patches/patch-an b/archivers/gcpio/patches/patch-an
deleted file mode 100644
index 9fd3a70dddc..00000000000
--- a/archivers/gcpio/patches/patch-an
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-an,v 1.1 2005/11/03 19:38:50 adrianp Exp $
-
---- src/userspec.c.orig 2005-06-22 23:26:10.000000000 +0100
-+++ src/userspec.c
-@@ -72,7 +72,7 @@ extern struct group *getgrgid (gid_t gid
- otherwise return 0. */
-
- static int
--isnumber (const char *str)
-+cpio_isnumber (const char *str)
- {
- for (; *str; str++)
- if (!isdigit (*str))
-@@ -136,7 +136,7 @@ parse_user_spec (const char *spec_arg, u
- if (pwd == NULL)
- {
-
-- if (!isnumber (u))
-+ if (!cpio_isnumber (u))
- error_msg = _("invalid user");
- else
- {
-@@ -182,7 +182,7 @@ parse_user_spec (const char *spec_arg, u
- grp = getgrnam (g);
- if (grp == NULL)
- {
-- if (!isnumber (g))
-+ if (!cpio_isnumber (g))
- error_msg = _("invalid group");
- else
- *gid = atoi (g);
diff --git a/archivers/gcpio/patches/patch-ao b/archivers/gcpio/patches/patch-ao
deleted file mode 100644
index 253aa0a2c8f..00000000000
--- a/archivers/gcpio/patches/patch-ao
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-ao,v 1.1 2005/11/03 19:38:50 adrianp Exp $
-
---- src/copypass.c.orig 2004-09-06 13:09:04.000000000 +0100
-+++ src/copypass.c
-@@ -181,19 +181,25 @@ process_copy_pass ()
- }
- if (close (in_file_des) < 0)
- error (0, errno, "%s", input_name.ds_string);
-- if (close (out_file_des) < 0)
-- error (0, errno, "%s", output_name.ds_string);
--
-+ /*
-+ * Avoid race condition.
-+ * Set chown and chmod before closing the file desc.
-+ * pvrabec@redhat.com
-+ */
- /* Set the attributes of the new file. */
- if (!no_chown_flag)
-- if ((chown (output_name.ds_string,
-+ if ((fchown (out_file_des,
- set_owner_flag ? set_owner : in_file_stat.st_uid,
- set_group_flag ? set_group : in_file_stat.st_gid) < 0)
- && errno != EPERM)
- error (0, errno, "%s", output_name.ds_string);
- /* chown may have turned off some permissions we wanted. */
-- if (chmod (output_name.ds_string, in_file_stat.st_mode) < 0)
-+ if (fchmod (out_file_des, in_file_stat.st_mode) < 0)
-+ error (0, errno, "%s", output_name.ds_string);
-+
-+ if (close (out_file_des) < 0)
- error (0, errno, "%s", output_name.ds_string);
-+
- if (reset_time_flag)
- {
- times.actime = in_file_stat.st_atime;
diff --git a/archivers/gcpio/patches/patch-ap b/archivers/gcpio/patches/patch-ap
deleted file mode 100644
index 49b3502ae8e..00000000000
--- a/archivers/gcpio/patches/patch-ap
+++ /dev/null
@@ -1,549 +0,0 @@
-$NetBSD: patch-ap,v 1.1 2006/02/12 01:44:28 seb Exp $
-
---- src/copyout.c.orig 2004-10-14 09:14:03.000000000 +0000
-+++ src/copyout.c
-@@ -159,7 +159,7 @@ add_link_defer (struct new_cpio_header *
- }
-
- /* We are about to put a file into a newc or crc archive that is
-- multiply linked. We have already seen and defered all of the
-+ multiply linked. We have already seen and deferred all of the
- other links to the file but haven't written them into the archive.
- Write the other links into the archive, and remove them from the
- deferouts list. */
-@@ -231,8 +231,10 @@ writeout_defered_file (struct new_cpio_h
- file_hdr.c_filesize,
- header->c_name);
-
-- write_out_header (&file_hdr, out_file_des);
-- copy_files_disk_to_tape (in_file_des, out_file_des, file_hdr.c_filesize, header->c_name);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ return;
-+ copy_files_disk_to_tape (in_file_des, out_file_des, file_hdr.c_filesize,
-+ header->c_name);
- warn_if_file_changed(header->c_name, file_hdr.c_filesize, file_hdr.c_mtime);
-
- if (archive_format == arf_tar || archive_format == arf_ustar)
-@@ -288,153 +290,313 @@ writeout_final_defers (int out_des)
- }
- }
-
--
--/* Write out header FILE_HDR, including the file name, to file
-- descriptor OUT_DES. */
-+/* FIXME: These two defines should be defined in paxutils */
-+#define LG_8 3
-+#define LG_16 4
-+
-+/* FIXME: to_ascii could be used instead of to_oct() and to_octal() from tar,
-+ so it should be moved to paxutils too.
-+ Allowed values for logbase are: 1 (binary), 2, 3 (octal), 4 (hex) */
-+int
-+to_ascii (char *where, uintmax_t v, size_t digits, unsigned logbase)
-+{
-+ static char codetab[] = "0123456789ABCDEF";
-+ int i = digits;
-+
-+ do
-+ {
-+ where[--i] = codetab[(v & ((1 << logbase) - 1))];
-+ v >>= logbase;
-+ }
-+ while (i);
-+
-+ return v != 0;
-+}
-+
-+static void
-+field_width_error (const char *filename, const char *fieldname)
-+{
-+ error (0, 0, _("%s: field width not sufficient for storing %s"),
-+ filename, fieldname);
-+}
-+
-+static void
-+field_width_warning (const char *filename, const char *fieldname)
-+{
-+ if (warn_option & CPIO_WARN_TRUNCATE)
-+ error (0, 0, _("%s: truncating %s"), filename, fieldname);
-+}
-
- void
--write_out_header (struct new_cpio_header *file_hdr, int out_des)
-+to_ascii_or_warn (char *where, uintmax_t n, size_t digits,
-+ unsigned logbase,
-+ const char *filename, const char *fieldname)
- {
-- if (archive_format == arf_newascii || archive_format == arf_crcascii)
-+ if (to_ascii (where, n, digits, logbase))
-+ field_width_warning (filename, fieldname);
-+}
-+
-+int
-+to_ascii_or_error (char *where, uintmax_t n, size_t digits,
-+ unsigned logbase,
-+ const char *filename, const char *fieldname)
-+{
-+ if (to_ascii (where, n, digits, logbase))
- {
-- char ascii_header[112];
-- char *magic_string;
-+ field_width_error (filename, fieldname);
-+ return 1;
-+ }
-+ return 0;
-+}
-
-- if (archive_format == arf_crcascii)
-- magic_string = "070702";
-- else
-- magic_string = "070701";
-- sprintf (ascii_header,
-- "%6s%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx",
-- magic_string,
-- file_hdr->c_ino, file_hdr->c_mode, file_hdr->c_uid,
-- file_hdr->c_gid, file_hdr->c_nlink, file_hdr->c_mtime,
-- file_hdr->c_filesize, file_hdr->c_dev_maj, file_hdr->c_dev_min,
-- file_hdr->c_rdev_maj, file_hdr->c_rdev_min, file_hdr->c_namesize,
-- file_hdr->c_chksum);
-- tape_buffered_write (ascii_header, out_des, 110L);
--
-- /* Write file name to output. */
-- tape_buffered_write (file_hdr->c_name, out_des, (long) file_hdr->c_namesize);
-- tape_pad_output (out_des, file_hdr->c_namesize + 110);
-- }
-- else if (archive_format == arf_oldascii || archive_format == arf_hpoldascii)
-- {
-- char ascii_header[78];
-- dev_t dev;
-- dev_t rdev;
-+int
-+write_out_new_ascii_header (const char *magic_string,
-+ struct new_cpio_header *file_hdr, int out_des)
-+{
-+ char ascii_header[110];
-+ char *p;
-
-- if (archive_format == arf_oldascii)
-- {
-- dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
-- rdev = makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min);
-- }
-- else
-- {
-- /* HP/UX cpio creates archives that look just like ordinary archives,
-- but for devices it sets major = 0, minor = 1, and puts the
-- actual major/minor number in the filesize field. */
-- switch (file_hdr->c_mode & CP_IFMT)
-- {
-- case CP_IFCHR:
-- case CP_IFBLK:
-+ (void)strncpy(ascii_header, magic_string, sizeof(ascii_header) - 1);
-+ ascii_header[sizeof(ascii_header) -1] = '\0';
-+ p = ascii_header + strlen(ascii_header);
-+ to_ascii_or_warn (p, file_hdr->c_ino, 8, LG_16,
-+ file_hdr->c_name, _("inode number"));
-+ p += 8;
-+ to_ascii_or_warn (p, file_hdr->c_mode, 8, LG_16, file_hdr->c_name,
-+ _("file mode"));
-+ p += 8;
-+ to_ascii_or_warn (p, file_hdr->c_uid, 8, LG_16, file_hdr->c_name,
-+ _("uid"));
-+ p += 8;
-+ to_ascii_or_warn (p, file_hdr->c_gid, 8, LG_16, file_hdr->c_name,
-+ _("gid"));
-+ p += 8;
-+ to_ascii_or_warn (p, file_hdr->c_nlink, 8, LG_16, file_hdr->c_name,
-+ _("number of links"));
-+ p += 8;
-+ to_ascii_or_warn (p, file_hdr->c_mtime, 8, LG_16, file_hdr->c_name,
-+ _("modification time"));
-+ p += 8;
-+ if (to_ascii_or_error (p, file_hdr->c_filesize, 8, LG_16, file_hdr->c_name,
-+ _("file size")))
-+ return 1;
-+ p += 8;
-+ if (to_ascii_or_error (p, file_hdr->c_dev_maj, 8, LG_16, file_hdr->c_name,
-+ _("device major number")))
-+ return 1;
-+ p += 8;
-+ if (to_ascii_or_error (p, file_hdr->c_dev_min, 8, LG_16, file_hdr->c_name,
-+ _("device minor number")))
-+ return 1;
-+ p += 8;
-+ if (to_ascii_or_error (p, file_hdr->c_rdev_maj, 8, LG_16, file_hdr->c_name,
-+ _("rdev major")))
-+ return 1;
-+ p += 8;
-+ if (to_ascii_or_error (p, file_hdr->c_rdev_min, 8, LG_16, file_hdr->c_name,
-+ _("rdev minor")))
-+ return 1;
-+ p += 8;
-+ if (to_ascii_or_error (p, file_hdr->c_namesize, 8, LG_16, file_hdr->c_name,
-+ _("name size")))
-+ return 1;
-+ p += 8;
-+ to_ascii (p, file_hdr->c_chksum & 0xffffffff, 8, LG_16);
-+
-+ tape_buffered_write (ascii_header, out_des, sizeof ascii_header);
-+
-+ /* Write file name to output. */
-+ tape_buffered_write (file_hdr->c_name, out_des, (long) file_hdr->c_namesize);
-+ tape_pad_output (out_des, file_hdr->c_namesize + sizeof ascii_header);
-+ return 0;
-+}
-+
-+int
-+write_out_old_ascii_header (dev_t dev, dev_t rdev,
-+ struct new_cpio_header *file_hdr, int out_des)
-+{
-+ char ascii_header[76];
-+ char *p = ascii_header;
-+
-+ to_ascii (p, file_hdr->c_magic, 6, LG_8);
-+ p += 6;
-+ to_ascii_or_warn (p, dev, 6, LG_8, file_hdr->c_name, _("device number"));
-+ p += 6;
-+ to_ascii_or_warn (p, file_hdr->c_ino, 6, LG_8, file_hdr->c_name,
-+ _("inode number"));
-+ p += 6;
-+ to_ascii_or_warn (p, file_hdr->c_mode, 6, LG_8, file_hdr->c_name,
-+ _("file mode"));
-+ p += 6;
-+ to_ascii_or_warn (p, file_hdr->c_uid, 6, LG_8, file_hdr->c_name, _("uid"));
-+ p += 6;
-+ to_ascii_or_warn (p, file_hdr->c_gid, 6, LG_8, file_hdr->c_name, _("gid"));
-+ p += 6;
-+ to_ascii_or_warn (p, file_hdr->c_nlink, 6, LG_8, file_hdr->c_name,
-+ _("number of links"));
-+ p += 6;
-+ to_ascii_or_warn (p, rdev, 6, LG_8, file_hdr->c_name, _("rdev"));
-+ p += 6;
-+ to_ascii_or_warn (p, file_hdr->c_mtime, 11, LG_8, file_hdr->c_name,
-+ _("modification time"));
-+ p += 11;
-+ if (to_ascii_or_error (p, file_hdr->c_namesize, 6, LG_8, file_hdr->c_name,
-+ _("name size")))
-+ return 1;
-+ p += 6;
-+ if (to_ascii_or_error (p, file_hdr->c_filesize, 11, LG_8, file_hdr->c_name,
-+ _("file size")))
-+ return 1;
-+
-+ tape_buffered_write (ascii_header, out_des, sizeof ascii_header);
-+
-+ /* Write file name to output. */
-+ tape_buffered_write (file_hdr->c_name, out_des, file_hdr->c_namesize);
-+ return 0;
-+}
-+
-+void
-+hp_compute_dev (struct new_cpio_header *file_hdr, dev_t *pdev, dev_t *prdev)
-+{
-+ /* HP/UX cpio creates archives that look just like ordinary archives,
-+ but for devices it sets major = 0, minor = 1, and puts the
-+ actual major/minor number in the filesize field. */
-+ switch (file_hdr->c_mode & CP_IFMT)
-+ {
-+ case CP_IFCHR:
-+ case CP_IFBLK:
- #ifdef CP_IFSOCK
-- case CP_IFSOCK:
-+ case CP_IFSOCK:
- #endif
- #ifdef CP_IFIFO
-- case CP_IFIFO:
-+ case CP_IFIFO:
- #endif
-- file_hdr->c_filesize = makedev (file_hdr->c_rdev_maj,
-- file_hdr->c_rdev_min);
-- rdev = 1;
-- break;
-- default:
-- dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
-- rdev = makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min);
-- break;
-- }
-- }
-+ file_hdr->c_filesize = makedev (file_hdr->c_rdev_maj,
-+ file_hdr->c_rdev_min);
-+ *pdev = *prdev = makedev (0, 1);
-+ break;
-+
-+ default:
-+ *pdev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
-+ *prdev = makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min);
-+ break;
-+ }
-+}
-
-- if ((warn_option & CPIO_WARN_TRUNCATE) && (file_hdr->c_ino >> 16) != 0)
-- error (0, 0, _("%s: truncating inode number"), file_hdr->c_name);
-+int
-+write_out_binary_header (dev_t rdev,
-+ struct new_cpio_header *file_hdr, int out_des)
-+{
-+ struct old_cpio_header short_hdr;
-
-- /* Debian hack: The type of dev_t has changed in glibc. Fixed output
-- to ensure that a long int is passed to sprintf. This has been
-- reported to "bug-gnu-utils@prep.ai.mit.edu". (1998/5/26) -BEM */
-- sprintf (ascii_header,
-- "%06ho%06lo%06lo%06lo%06lo%06lo%06lo%06lo%011lo%06lo%011lo",
-- file_hdr->c_magic & 0xFFFF, (long) dev & 0xFFFF,
-- file_hdr->c_ino & 0xFFFF, file_hdr->c_mode & 0xFFFF,
-- file_hdr->c_uid & 0xFFFF, file_hdr->c_gid & 0xFFFF,
-- file_hdr->c_nlink & 0xFFFF, (long) rdev & 0xFFFF,
-- file_hdr->c_mtime, file_hdr->c_namesize & 0xFFFF,
-- file_hdr->c_filesize);
-- tape_buffered_write (ascii_header, out_des, 76L);
-+ short_hdr.c_magic = 070707;
-+ short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
-
-- /* Write file name to output. */
-- tape_buffered_write (file_hdr->c_name, out_des, (long) file_hdr->c_namesize);
-- }
-- else if (archive_format == arf_tar || archive_format == arf_ustar)
-- {
-- write_out_tar_header (file_hdr, out_des);
-- }
-- else
-- {
-- struct old_cpio_header short_hdr;
-+ if ((warn_option & CPIO_WARN_TRUNCATE) && (file_hdr->c_ino >> 16) != 0)
-+ error (0, 0, _("%s: truncating inode number"), file_hdr->c_name);
-
-- short_hdr.c_magic = 070707;
-- short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
-+ short_hdr.c_ino = file_hdr->c_ino & 0xFFFF;
-+ if (short_hdr.c_ino != file_hdr->c_ino)
-+ field_width_warning (file_hdr->c_name, _("inode number"));
-+
-+ short_hdr.c_mode = file_hdr->c_mode & 0xFFFF;
-+ if (short_hdr.c_mode != file_hdr->c_mode)
-+ field_width_warning (file_hdr->c_name, _("file mode"));
-+
-+ short_hdr.c_uid = file_hdr->c_uid & 0xFFFF;
-+ if (short_hdr.c_uid != file_hdr->c_uid)
-+ field_width_warning (file_hdr->c_name, _("uid"));
-+
-+ short_hdr.c_gid = file_hdr->c_gid & 0xFFFF;
-+ if (short_hdr.c_gid != file_hdr->c_gid)
-+ field_width_warning (file_hdr->c_name, _("gid"));
-+
-+ short_hdr.c_nlink = file_hdr->c_nlink & 0xFFFF;
-+ if (short_hdr.c_nlink != file_hdr->c_nlink)
-+ field_width_warning (file_hdr->c_name, _("number of links"));
-+
-+ short_hdr.c_rdev = rdev;
-+ short_hdr.c_mtimes[0] = file_hdr->c_mtime >> 16;
-+ short_hdr.c_mtimes[1] = file_hdr->c_mtime & 0xFFFF;
-+
-+ short_hdr.c_namesize = file_hdr->c_namesize & 0xFFFF;
-+ if (short_hdr.c_namesize != file_hdr->c_namesize)
-+ {
-+ field_width_error (file_hdr->c_name, _("name size"));
-+ return 1;
-+ }
-+
-+ short_hdr.c_filesize = file_hdr->c_filesize;
-+ if (short_hdr.c_filesize != file_hdr->c_filesize)
-+ {
-+ field_width_error (file_hdr->c_name, _("file size"));
-+ return 1;
-+ }
-+
-+ short_hdr.c_filesizes[0] = file_hdr->c_filesize >> 16;
-+ short_hdr.c_filesizes[1] = file_hdr->c_filesize & 0xFFFF;
-
-- if ((warn_option & CPIO_WARN_TRUNCATE) && (file_hdr->c_ino >> 16) != 0)
-- error (0, 0, _("%s: truncating inode number"), file_hdr->c_name);
-+ /* Output the file header. */
-+ tape_buffered_write ((char *) &short_hdr, out_des, 26);
-
-- short_hdr.c_ino = file_hdr->c_ino & 0xFFFF;
-- short_hdr.c_mode = file_hdr->c_mode & 0xFFFF;
-- short_hdr.c_uid = file_hdr->c_uid & 0xFFFF;
-- short_hdr.c_gid = file_hdr->c_gid & 0xFFFF;
-- short_hdr.c_nlink = file_hdr->c_nlink & 0xFFFF;
-- if (archive_format != arf_hpbinary)
-- short_hdr.c_rdev = makedev (file_hdr->c_rdev_maj, file_hdr->c_rdev_min);
-- else
-- {
-- switch (file_hdr->c_mode & CP_IFMT)
-- {
-- /* HP/UX cpio creates archives that look just like ordinary
-- archives, but for devices it sets major = 0, minor = 1, and
-- puts the actual major/minor number in the filesize field. */
-- case CP_IFCHR:
-- case CP_IFBLK:
--#ifdef CP_IFSOCK
-- case CP_IFSOCK:
--#endif
--#ifdef CP_IFIFO
-- case CP_IFIFO:
--#endif
-- file_hdr->c_filesize = makedev (file_hdr->c_rdev_maj,
-- file_hdr->c_rdev_min);
-- short_hdr.c_rdev = makedev (0, 1);
-- break;
-- default:
-- short_hdr.c_rdev = makedev (file_hdr->c_rdev_maj,
-- file_hdr->c_rdev_min);
-- break;
-- }
-- }
-- short_hdr.c_mtimes[0] = file_hdr->c_mtime >> 16;
-- short_hdr.c_mtimes[1] = file_hdr->c_mtime & 0xFFFF;
-+ /* Write file name to output. */
-+ tape_buffered_write (file_hdr->c_name, out_des, file_hdr->c_namesize);
-
-- short_hdr.c_namesize = file_hdr->c_namesize & 0xFFFF;
-+ tape_pad_output (out_des, file_hdr->c_namesize + 26);
-+ return 0;
-+}
-
-- short_hdr.c_filesizes[0] = file_hdr->c_filesize >> 16;
-- short_hdr.c_filesizes[1] = file_hdr->c_filesize & 0xFFFF;
-+
-+/* Write out header FILE_HDR, including the file name, to file
-+ descriptor OUT_DES. */
-
-- /* Output the file header. */
-- tape_buffered_write ((char *) &short_hdr, out_des, 26L);
-+int
-+write_out_header (struct new_cpio_header *file_hdr, int out_des)
-+{
-+ dev_t dev;
-+ dev_t rdev;
-+
-+ switch (archive_format)
-+ {
-+ case arf_newascii:
-+ return write_out_new_ascii_header ("070701", file_hdr, out_des);
-+
-+ case arf_crcascii:
-+ return write_out_new_ascii_header ("070702", file_hdr, out_des);
-+
-+ case arf_oldascii:
-+ return write_out_old_ascii_header (makedev (file_hdr->c_dev_maj,
-+ file_hdr->c_dev_min),
-+ makedev (file_hdr->c_rdev_maj,
-+ file_hdr->c_rdev_min),
-+ file_hdr, out_des);
-+
-+ case arf_hpoldascii:
-+ hp_compute_dev (file_hdr, &dev, &rdev);
-+ return write_out_old_ascii_header (dev, rdev, file_hdr, out_des);
-+
-+ case arf_tar:
-+ case arf_ustar:
-+ if (is_tar_filename_too_long (file_hdr->c_name))
-+ {
-+ error (0, 0, _("%s: file name too long"), file_hdr->c_name);
-+ return 1;
-+ }
-+ write_out_tar_header (file_hdr, out_des); /* FIXME: No error checking */
-+ return 0;
-
-- /* Write file name to output. */
-- tape_buffered_write (file_hdr->c_name, out_des, (long) file_hdr->c_namesize);
-+ case arf_binary:
-+ return write_out_binary_header (makedev (file_hdr->c_rdev_maj,
-+ file_hdr->c_rdev_min),
-+ file_hdr, out_des);
-+
-+ case arf_hpbinary:
-+ hp_compute_dev (file_hdr, &dev, &rdev);
-+ /* FIXME: dev ignored. Should it be? */
-+ return write_out_binary_header (rdev, file_hdr, out_des);
-
-- tape_pad_output (out_des, file_hdr->c_namesize + 26);
-+ default:
-+ abort ();
- }
- }
-
-@@ -593,14 +755,7 @@ process_copy_out ()
- file_hdr.c_namesize = strlen (p) + 1;
- }
- #endif
-- if ((archive_format == arf_tar || archive_format == arf_ustar)
-- && is_tar_filename_too_long (file_hdr.c_name))
-- {
-- error (0, 0, _("%s: file name too long"),
-- file_hdr.c_name);
-- continue;
-- }
--
-+
- /* Copy the named file to the output. */
- switch (file_hdr.c_mode & CP_IFMT)
- {
-@@ -613,8 +768,8 @@ process_copy_out ()
- file_hdr.c_dev_min)))
- {
- file_hdr.c_tar_linkname = otherfile;
-- write_out_header (&file_hdr, out_file_des);
-- break;
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- }
- }
- if ( (archive_format == arf_newascii || archive_format == arf_crcascii)
-@@ -643,7 +798,8 @@ process_copy_out ()
- file_hdr.c_filesize,
- input_name.ds_string);
-
-- write_out_header (&file_hdr, out_file_des);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- copy_files_disk_to_tape (in_file_des, out_file_des, file_hdr.c_filesize, input_name.ds_string);
- warn_if_file_changed(input_name.ds_string, file_hdr.c_filesize,
- file_hdr.c_mtime);
-@@ -673,7 +829,8 @@ process_copy_out ()
-
- case CP_IFDIR:
- file_hdr.c_filesize = 0;
-- write_out_header (&file_hdr, out_file_des);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- break;
-
- case CP_IFCHR:
-@@ -702,14 +859,16 @@ process_copy_out ()
- file_hdr.c_mode = (file_stat.st_mode & 07777);
- file_hdr.c_mode |= CP_IFREG;
- file_hdr.c_tar_linkname = otherfile;
-- write_out_header (&file_hdr, out_file_des);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- break;
- }
- add_inode (file_hdr.c_ino, file_hdr.c_name,
- file_hdr.c_dev_maj, file_hdr.c_dev_min);
- }
- file_hdr.c_filesize = 0;
-- write_out_header (&file_hdr, out_file_des);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- break;
-
- #ifdef CP_IFLNK
-@@ -738,12 +897,14 @@ process_copy_out ()
- {
- link_name[link_size] = '\0';
- file_hdr.c_tar_linkname = link_name;
-- write_out_header (&file_hdr, out_file_des);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- }
- }
- else
- {
-- write_out_header (&file_hdr, out_file_des);
-+ if (write_out_header (&file_hdr, out_file_des))
-+ continue;
- tape_buffered_write (link_name, out_file_des, link_size);
- tape_pad_output (out_file_des, link_size);
- }
diff --git a/archivers/gcpio/patches/patch-aq b/archivers/gcpio/patches/patch-aq
deleted file mode 100644
index cb83db1b8f9..00000000000
--- a/archivers/gcpio/patches/patch-aq
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aq,v 1.1 2010/03/23 22:42:17 tez Exp $
-fix CVE-2010-0624
-
---- lib/rtapelib.c.orig 2010-03-23 16:14:45.037892500 -0500
-+++ lib/rtapelib.c 2010-03-23 16:16:25.765812000 -0500
-@@ -573,6 +573,9 @@
- || (status = get_status (handle)) == SAFE_READ_ERROR)
- return SAFE_READ_ERROR;
-
-+ if (status > length)
-+ return SAFE_READ_ERROR;
-+
- for (counter = 0; counter < status; counter += rlen, buffer += rlen)
- {
- rlen = safe_read (READ_SIDE (handle), buffer, status - counter);
diff --git a/archivers/gcpio/patches/patch-lib_argp_fmtstream_h b/archivers/gcpio/patches/patch-lib_argp_fmtstream_h
deleted file mode 100644
index 6a2d9779196..00000000000
--- a/archivers/gcpio/patches/patch-lib_argp_fmtstream_h
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD: patch-lib_argp_fmtstream_h,v 1.2 2012/07/03 18:22:08 joerg Exp $
-
-Fix up gcc/c99 inline mess.
-
---- lib/argp-fmtstream.h.orig 2003-10-04 12:28:07.000000000 +0000
-+++ lib/argp-fmtstream.h
-@@ -143,6 +143,7 @@ extern ssize_t argp_fmtstream_printf (ar
- __const char *__fmt, ...)
- __attribute__ ((__format__ (printf, 2, 3)));
-
-+#if 0
- extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
- extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
-
-@@ -153,6 +154,7 @@ extern size_t __argp_fmtstream_write (ar
- __const char *__str, size_t __len);
- extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
- __const char *__str, size_t __len);
-+#endif
-
- /* Access macros for various bits of state. */
- #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
-@@ -162,6 +164,7 @@ extern size_t argp_fmtstream_write (argp
- #define __argp_fmtstream_rmargin argp_fmtstream_rmargin
- #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
-
-+#if 0
- /* Set __FS's left margin to LMARGIN and return the old value. */
- extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
- size_t __lmargin);
-@@ -183,6 +186,7 @@ extern size_t __argp_fmtstream_set_wmarg
- /* Return the column number of the current output point in __FS. */
- extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
- extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
-+#endif
-
- /* Internal routines. */
- extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
-@@ -206,7 +210,11 @@ extern int __argp_fmtstream_ensure (argp
- #endif
-
- #ifndef ARGP_FS_EI
-+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
- #define ARGP_FS_EI extern inline
-+#else
-+#define ARGP_FS_EI inline
-+#endif
- #endif
-
- ARGP_FS_EI size_t