head 1.17; access; symbols pkgsrc-2013Q2:1.17.0.8 pkgsrc-2013Q2-base:1.17 pkgsrc-2012Q4:1.17.0.6 pkgsrc-2012Q4-base:1.17 pkgsrc-2011Q4:1.17.0.4 pkgsrc-2011Q4-base:1.17 pkgsrc-2011Q2:1.17.0.2 pkgsrc-2011Q2-base:1.17 pkgsrc-2011Q1:1.16.0.4 pkgsrc-2011Q1-base:1.16 pkgsrc-2010Q4:1.16.0.2 pkgsrc-2010Q4-base:1.16 pkgsrc-2010Q3:1.13.0.6 pkgsrc-2010Q3-base:1.13 pkgsrc-2010Q2:1.13.0.4 pkgsrc-2010Q2-base:1.13 pkgsrc-2010Q1:1.13.0.2 pkgsrc-2010Q1-base:1.13 pkgsrc-2009Q4:1.12.0.18 pkgsrc-2009Q4-base:1.12 pkgsrc-2009Q3:1.12.0.16 pkgsrc-2009Q3-base:1.12 pkgsrc-2009Q2:1.12.0.14 pkgsrc-2009Q2-base:1.12 pkgsrc-2009Q1:1.12.0.12 pkgsrc-2009Q1-base:1.12 pkgsrc-2008Q4:1.12.0.10 pkgsrc-2008Q4-base:1.12 pkgsrc-2008Q3:1.12.0.8 pkgsrc-2008Q3-base:1.12 cube-native-xorg:1.12.0.6 cube-native-xorg-base:1.12 pkgsrc-2008Q2:1.12.0.4 pkgsrc-2008Q2-base:1.12 cwrapper:1.12.0.2 pkgsrc-2008Q1:1.11.0.12 pkgsrc-2008Q1-base:1.11 pkgsrc-2007Q4:1.11.0.10 pkgsrc-2007Q4-base:1.11 pkgsrc-2007Q3:1.11.0.8 pkgsrc-2007Q3-base:1.11 pkgsrc-2007Q2:1.11.0.6 pkgsrc-2007Q2-base:1.11 pkgsrc-2007Q1:1.11.0.4 pkgsrc-2007Q1-base:1.11 pkgsrc-2006Q4:1.11.0.2 pkgsrc-2006Q4-base:1.11 pkgsrc-2006Q3:1.10.0.14 pkgsrc-2006Q3-base:1.10 pkgsrc-2006Q2:1.10.0.12 pkgsrc-2006Q2-base:1.10 pkgsrc-2006Q1:1.10.0.10 pkgsrc-2006Q1-base:1.10 pkgsrc-2005Q4:1.10.0.8 pkgsrc-2005Q4-base:1.10 pkgsrc-2005Q3:1.10.0.6 pkgsrc-2005Q3-base:1.10 pkgsrc-2005Q2:1.10.0.4 pkgsrc-2005Q2-base:1.10 pkgsrc-2005Q1:1.10.0.2 pkgsrc-2005Q1-base:1.10 pkgsrc-2004Q4:1.9.0.2 pkgsrc-2004Q4-base:1.9 pkgsrc-2004Q3:1.8.0.10 pkgsrc-2004Q3-base:1.8 pkgsrc-2004Q2:1.8.0.8 pkgsrc-2004Q2-base:1.8 pkgsrc-2004Q1:1.8.0.6 pkgsrc-2004Q1-base:1.8 pkgsrc-2003Q4:1.8.0.4 pkgsrc-2003Q4-base:1.8 netbsd-1-6-1:1.8.0.2 netbsd-1-6-1-base:1.8 netbsd-1-6:1.7.0.8 netbsd-1-6-RELEASE-base:1.7 pkgviews:1.7.0.4 pkgviews-base:1.7 buildlink2:1.7.0.2 buildlink2-base:1.7 netbsd-1-5-PATCH003:1.7 netbsd-1-5-PATCH001:1.7 netbsd-1-5-RELEASE:1.6 netbsd-1-4-PATCH003:1.6 netbsd-1-4-PATCH002:1.6 comdex-fall-1999:1.6; locks; strict; comment @# @; 1.17 date 2011.05.11.07.49.59; author adam; state dead; branches; next 1.16; 1.16 date 2010.12.16.10.12.54; author wiz; state Exp; branches; next 1.15; 1.15 date 2010.12.15.22.16.25; author wiz; state dead; branches; next 1.14; 1.14 date 2010.12.12.13.10.40; author wiz; state Exp; branches; next 1.13; 1.13 date 2010.03.23.19.00.10; author tez; state Exp; branches; next 1.12; 1.12 date 2008.05.18.01.48.09; author tnn; state Exp; branches; next 1.11; 1.11 date 2006.12.03.15.21.20; author tron; state Exp; branches; next 1.10; 1.10 date 2005.01.09.22.52.14; author recht; state Exp; branches 1.10.14.1; next 1.9; 1.9 date 2004.09.27.16.12.04; author wiz; state Exp; branches; next 1.8; 1.8 date 2002.11.20.16.57.55; author bouyer; state Exp; branches; next 1.7; 1.7 date 2000.10.20.02.47.45; author hubertf; state Exp; branches 1.7.8.1; next 1.6; 1.6 date 99.09.18.14.52.22; author kim; state Exp; branches; next 1.5; 1.5 date 99.08.10.05.05.40; author christos; state dead; branches; next 1.4; 1.4 date 98.08.07.10.35.49; author agc; state dead; branches; next 1.3; 1.3 date 98.03.24.20.34.52; author tv; state dead; branches; next 1.2; 1.2 date 98.03.08.02.51.17; author tv; state dead; branches; next 1.1; 1.1 date 98.03.05.19.57.18; author tv; state dead; branches; next ; 1.10.14.1 date 2006.12.04.08.46.26; author ghen; state Exp; branches; next ; 1.7.8.1 date 2002.12.22.08.29.20; author agc; state Exp; branches; next ; desc @@ 1.17 log @Changes 1.26: * Fix the --verify option, which broke in version 1.24. * Fix storing long sparse file names in PAX archives. * Fix correctness of --atime-preserve=replace. * Work around POSIX incompatibilities on FreeBSD, NetBSD and Tru64. * Fix bug with --one-file-system --listed-incremental. @ text @$NetBSD: patch-ab,v 1.16 2010/12/16 10:12:54 wiz Exp $ Add two patches from upstream, fixing test 39: * src/extract.c (maybe_recoverable): Treat EMLINK like ELOOP, for FreeBSD. Problem reported by Christian Weisgerber in . Problem reported by Bruno Haible in . * src/extract.c (maybe_recoverable): Also treat EFTYPE (if defined) and ENOTSUP like ELOOP. --- src/extract.c.orig 2010-11-01 20:34:59.000000000 +0000 +++ src/extract.c @@@@ -609,6 +609,18 @@@@ maybe_recoverable (char *file_name, bool switch (e) { case ELOOP: + + /* With open ("symlink", O_NOFOLLOW|...), POSIX says errno == ELOOP, + but some operating systems do not conform to the standard. */ +#ifdef EFTYPE + /* NetBSD uses errno == EFTYPE; see . */ + case EFTYPE: +#endif + /* FreeBSD 8.1 uses errno == EMLINK. */ + case EMLINK: + /* Tru64 5.1B uses errno == ENOTSUP. */ + case ENOTSUP: + if (! regular || old_files_option != OVERWRITE_OLD_FILES || dereference_option) break; @ 1.16 log @Add patch from upstream fixing test 39. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.15 log @Remove two patches: one disabled a test that however succeeds on NetBSD-current and Solaris 10 (tested by tez@@), the other one was adding a --no-unlink-first option that was added because NetBSD's version of tar had made --unlink-first default. Since this default was changed quite some time ago and the option never was in upstream, remove it. Bump PKGREVISION. @ text @d1 1 a1 3 $NetBSD: patch-ab,v 1.14 2010/12/12 13:10:40 wiz Exp $ add --no-unlink-first option to negate --unlink-first option earlier patches made --unlink-first a default, but that was dropped years ago d3 26 a28 26 --- src/tar.c.orig 2010-10-24 18:07:55.000000000 +0000 +++ src/tar.c @@@@ -300,6 +300,7 @@@@ enum NO_RECURSION_OPTION, NO_SAME_OWNER_OPTION, NO_SAME_PERMISSIONS_OPTION, + NO_UNLINK_FIRST_OPTION, NO_SEEK_OPTION, NO_UNQUOTE_OPTION, NO_WILDCARDS_MATCH_SLASH_OPTION, @@@@ -505,6 +506,8 @@@@ static struct argp_option options[] = { N_("try extracting files with the same ownership as exists in the archive (default for superuser)"), GRID+1 }, {"no-same-owner", NO_SAME_OWNER_OPTION, 0, 0, N_("extract files as yourself (default for ordinary users)"), GRID+1 }, + {"no-unlink-first", NO_UNLINK_FIRST_OPTION, 0, 0, + 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"), GRID+1 }, {"preserve-permissions", 'p', 0, 0, @@@@ -1644,6 +1647,10 @@@@ parse_opt (int key, char *arg, struct ar set_subcommand_option (TEST_LABEL_SUBCOMMAND); break; + case NO_UNLINK_FIRST_OPTION: + old_files_option = DEFAULT_OLD_FILES; + break; d30 3 a32 3 case 'T': update_argv (arg, state); /* Indicate we've been given -T option. This is for backward @ 1.14 log @Update gtar to 1.25. version 1.25 - Sergey Poznyakoff, 2010-11-07 * Fix extraction of empty directories with the -C option in effect. * Fix extraction of device nodes. * Make sure name matching occurs before eventual name transformation. Tar 1.24 changed the ordering of name matching and name transformation so that the former saw already transformed file names. This made it impossible to match file names in certain cases. It is fixed now. * Fix the behavior of tar -x --overwrite on hosts lacking O_NOFOLLOW. * Improve the testsuite. * Alternative decompression programs. If extraction from a compressed archive fails because the corresponding compression program is not installed and the following two conditions are met, tar retries extraction using an alternative decompressor: 1. Another compression program supported by tar is able to handle this compression format. 2. The compression program was not explicitly requested in the command line by the use of such options as -z, -j, etc. For example, if `compress' is not available, tar will try `gzip'. version 1.24 - Sergey Poznyakoff, 2010-10-24 * The --full-time option. New command line option `--full-time' instructs tar to output file time stamps to the full resolution. * Bugfixes. ** More reliable directory traversal when creating archives Tar now checks for inconsistencies caused when a file system is modified while tar is creating an archive. In the new approach, tar maintains a cache of file descriptors to directories, so it uses more file descriptors than before, but it adjusts to system limits on the number of file descriptors. Tar also takes more care when a file system is modified while tar is extracting from an archive. The new checks are implemented via the openat and related calls standardized by POSIX.1-2008. On an older system where these calls do not exist or do not return useful results, tar emulates the calls at some cost in efficiency and reliability. ** Symbolic link attributes When extracting symbolic links, tar now restores attributes such as last-modified time and link permissions, if the operating system supports this. For example, recent versions of the Linux kernel support setting times on symlinks, and some BSD kernels also support symlink permissions. ** --dereference consistency The --dereference (-h) option now applies to files that are copied into or out of archives, independently of other options. For example, if F is a symbolic link and archive.tar contains a regular-file member also named F, "tar --overwrite -x -f archive.tar F" now overwrites F itself, rather than the file that F points to. (To overwrite the file that F points to, add the --dereference (-h) option.) Formerly, --dereference was intended to apply only when using the -c option, but the implementation was not consistent. Also, the --dereference option no longer affects accesses to other files, such as archives and time stamp files. Symbolic links to these files are always followed. Previously, the links were usually but not always followed. ** Spurious error diagnostics on broken pipe. When receiving SIGPIPE, tar would exit with error status and "write error" diagnostics. In particular, this occurred if invoked as in the example below: tar tf archive.tar | head -n 1 ** --remove-files `Tar --remove-files' failed to remove a directory which contained symlinks to another files within that directory. ** --test-label behavior In case of a mismatch, `tar --test-label LABEL' exits with code 1, not 2 as it did in previous versions. The `--verbose' option used with `--test-label' provides additional diagnostics. Several volume labels may be specified in a command line, e.g.: tar --test-label -f archive 'My volume' 'New volume' 'Test volume' In this case, tar exits with code 0 if any one of the arguments matches the actual volume label. ** --label used with --update The `--label' option can be used with `--update' to prevent accidental update of an archive: tar -rf archive --label 'My volume' . This did not work in previous versions, in spite of what the docs said. ** --record-size and --tape-length (-L) options Usual size suffixes are allowed for these options. For example, -L10k stands for a 10 kilobyte tape length. ** Fix dead loop on extracting existing symlinks with the -k option. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.13 2010/03/23 19:00:10 tez Exp $ @ 1.13 log @Update gtar to 1.23 - fixes CVE2010-0624 Also: # Improved record size autodetection # Use of lseek on seekable archives # New command line option --warning # New command line option --level # Improved behavior if some files were removed during incremental dumps # Modification times of PAX extended headers # Time references in the --pax-option argument # Augmented environment of the --to-command script # Bugfixes: * Fix handling of hard link targets by -c --transform * Fix hard links recognition with -c --remove-files * Fix restoring files from backup (debian bug #508199) * Correctly restore modes and permissions on existing directories * The --remove-files option removes files only if they were succesfully stored in the archive * Fix storing and listing of the volume labels in POSIX format * Improve algorithm for splitting long file names (ustar format) @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.12 2008/05/18 01:48:09 tnn Exp $ d5 3 a7 3 --- src/tar.c.orig 2010-03-23 12:11:49.133467100 -0500 +++ src/tar.c 2010-03-23 12:39:58.326191800 -0500 @@@@ -299,6 +299,7 @@@@ d15 1 a15 1 @@@@ -504,6 +505,8 @@@@ d24 2 a25 2 @@@@ -1642,6 +1645,10 @@@@ old_files_option = UNLINK_FIRST_OLD_FILES; d27 1 a27 1 d31 4 a34 4 + case UTC_OPTION: utc_option = true; break; @ 1.12 log @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. @ text @d1 3 a3 1 $NetBSD$ d5 3 a7 3 --- src/tar.c.orig 2008-04-14 14:03:13.000000000 +0200 +++ src/tar.c @@@@ -285,6 +286,7 @@@@ enum d12 1 d15 2 a16 3 NO_WILDCARDS_OPTION, @@@@ -483,6 +485,8 @@@@ static struct argp_option options[] = { N_("try extracting files with the same ownership"), GRID+1 }, d18 1 a18 1 N_("extract files as yourself"), GRID+1 }, d24 1 a24 1 @@@@ -1495,6 +1501,10 @@@@ parse_opt (int key, char *arg, struct ar d27 1 a27 1 d29 1 a29 1 + old_files_option = 0; d31 1 a31 1 + @ 1.11 log @Add Kees Cook's patch for CVE-2006-6097 taken from Ubuntu Linux. Bump package revision. @ text @d3 3 a5 11 --- 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 @@@@ d10 2 d13 2 a14 4 NO_WILDCARDS_MATCH_SLASH_OPTION, NULL_OPTION, @@@@ -340,6 +342,8 @@@@ N_("try extracting files with the same ownership"), 31 }, d16 1 a16 1 N_("extract files as yourself"), 31 }, d18 1 a18 1 + N_("don't remove each file prior to extracting"), 31 }, d20 1 a20 1 N_("always use numbers for user/group names"), 31 }, d22 1 a22 11 @@@@ -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': d25 1 a25 1 + d29 1 a29 1 a31 3 @@@@ -913,6 +923,10 @@@@ case 'Z': set_use_compress_program_option ("compress"); a32 7 + + case ALLOW_NAME_MANGLING_OPTION: + allow_name_mangling_option = true; + break; case ANCHORED_OPTION: args->exclude_options |= EXCLUDE_ANCHORED; @ 1.10 log @update to gtar 1.15.1 changes: - enable installation of grmt changes in gtar: version 1.15.1 - Sergey Poznyakoff, 2004-12-21 This version fixes a bug introduced in 1.15 which caused tar to refuse to extract files from standard input. version 1.15 - Sergey Poznyakoff, 2004-12-20 * Compressed archives are recognised automatically, it is no longer necessary to specify -Z, -z, or -j options to read them. Thus, you can now run `tar tf archive.tar.gz'. * When restoring incremental dumps, --one-file-system option prevents directory hierarchies residing on different devices from being purged. With the previous versions of tar it was dangerous to create incremental dumps with --one-file-system option, since they would recursively remove mount points when restoring from the back up. This change fixes the bug. * Renamed --strip-path to --strip-components for consistency with the GNU convention. * Skipping archive members is sped up if the archive media supports seeks. * Restore script starts restoring only if it is given --all (-a) option, or some patterns. This is to prevent accidental restores. * `tar --verify' prints a warning if during archive creation some of the file names had their prefixes stripped off. * New option --exclude-caches instructs tar to exclude cache directories automatically on archive creation. Cache directories are those containing a standardized tag file, as specified at: http://www.brynosaurus.com/cachedir/spec.html * New configure option --with-rmt allows to specify full path name to the `rmt' utility. This supercedes DEFAULT_RMT_COMMAND variable introduced in version 1.14 * New configure variable DEFAULT_RMT_DIR allows to specify the directory where to install `rmt' utility. This is necessary since modifying --libexecdir as was suggested for version 1.14 produced a side effect: it also modified installation prefix for backup scripts (if --enable-backup-scripts was given). * Bugfixes: ** Fixed flow in recognizing files to be included in incremental dumps. ** Correctly recognize sparse archive members when used with -T option. ** GNU multivolume headers cannot store filenames longer than 100 characters. Do not allow multivolume archives to begin with such filenames. ** If a member with link count > 2 was stored in the archive twice, previous versions of tar were not able to extract it, since they were trying to link the file to itself, which always failed and lead to removing the already extracted copy. Preserve the first extracted copy in such cases. ** Restore script was passing improper argument to tar --listed option (which didn't affect the functionality, but was logically incorrect). ** Fixed verification of created archives. ** Fixed unquoting of file names containing backslash escapes (previous versions failed to recognize \a and \v). ** When attempting to delete a non-existing member from the archive, previous versions of tar used to overwrite last archive block with zeroes. @ text @d3 11 a13 3 --- src/tar.c.orig Sat Dec 18 21:01:07 2004 +++ src/tar.c Sun Jan 9 18:21:37 2005 @@@@ -203,6 +203,7 @@@@ d21 1 a21 1 @@@@ -340,6 +341,8 @@@@ d30 10 a39 2 @@@@ -864,6 +867,10 @@@@ d42 1 a42 1 + break; d46 7 d54 4 d59 2 a60 1 case UTC_OPTION: @ 1.10.14.1 log @Pullup ticket 1929 - requested by tron security fix for gtar-base - pkgsrc/archivers/gtar-base/Makefile 1.55 - pkgsrc/archivers/gtar-base/distinfo 1.19 - pkgsrc/archivers/gtar-base/patches/patch-ab 1.11 - pkgsrc/archivers/gtar-base/patches/patch-ag 1.4 - pkgsrc/archivers/gtar-base/patches/patch-aj 1.1 Module Name: pkgsrc Committed By: tron Date: Sun Dec 3 15:21:20 UTC 2006 Modified Files: pkgsrc/archivers/gtar-base: Makefile distinfo pkgsrc/archivers/gtar-base/patches: patch-ab patch-ag Added Files: pkgsrc/archivers/gtar-base/patches: patch-aj Log Message: Add Kees Cook's patch for CVE-2006-6097 taken from Ubuntu Linux. Bump package revision. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.10 2005/01/09 22:52:14 recht Exp $ d3 3 a5 11 --- 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 @@@@ d13 1 a13 1 @@@@ -340,6 +342,8 @@@@ d22 2 a23 10 @@@@ -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 @@@@ d26 1 a26 1 break; d30 1 a30 1 + break; a32 12 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; @ 1.9 log @Update gtar packages to 1.14: XXX: man page not updated (didn't find new version of suse gtar man page which we're using in the package) version 1.14 - Sergey Poznyakoff, 2004-05-11 * Added support for POSIX.1-2001 and ustar archive formats. * New option --format allows to select the output archive format * The default output format can be selected at configuration time by presetting the environment variable DEFAULT_ARCHIVE_FORMAT. Allowed values are GNU, V7, OLDGNU and POSIX. * New option --strip-path allows to cut off a given number of path elements from the name of the file being extracted. * New options --index-file, --no-overwrite-dir. The --overwrite-dir option is now the default; use --no-overwrite-dir if you prefer the previous default behavior. * The semantics of -o option is changed. When extracting, it does the same as --no-same-owner GNU tar option. This is compatible with UNIX98 tar. Otherwise, its effect is the same as that of --old-archive option. This latter is deprecated and will be removed in future. * New option --check-links prints a message if not all links are dumped for a file being archived. This corresponds to the UNIX98 -l option. The current semantics of the -l option is retained for compatibility with previous releases, however such usage is strongly deprecated as the option will change to its UNIX98 semantics in the future releases. * New option --occurrence[=N] can be used in conjunction with one of the subcommands --delete, --diff, --extract or --list when a list of files is given either on the command line or via -T option. This option instructs tar to process only the Nth occurrence of each named file. N defaults to 1, so `tar -x -f archive --occurrence filename' extracts the first occurrence of `filename' from `archive' and terminates without scanning to the end of the archive. * New option --pax-option allows to control the handling of POSIX keywords in `pax' extended headers. It is equivalent to `pax' -o option. * --incremental and --listed-incremental options work correctly on individual files, as well as on directories. * New scripts: backup (replaces old level-0 and level-1) and restore. The scripts are compiled and installed if --enable-backup-scripts option is given to configure. * By default tar searches "rmt" utility in "$prefix/libexec/rmt", which is consistent with the location where the version of "rmt" included in the package is installed. Previous versions of tar used "/etc/rmt". To install "rmt" to its traditional location, run configure with option --libexecdir=/etc. Otherwise, if you already have rmt installed and wish to use it, instead of the shipped in version, set the variable DEFAULT_RMT_COMMAND to the full path name of the utility, e.g. ./configure DEFAULT_RMT_COMMAND=/etc/rmt. Notice also that the full path name of the "rmt" utility to use can be set at runtime, by giving option --rmt-command to tar. * Removed obsolete command line options: ** --absolute-paths superseded by --absolute-names ** --block-compress is not needed any longer ** --block-size superseded by --blocking-factor ** --modification-time superseded by --touch ** --read-full-blocks superseded by --read-full-records ** --record-number superseded by --block-number ** --version-control superseded by --backup * New message translations fi (Finnish), gl (Galician), hr (Croatian), hu (Hungarian), ms (Malaysian), nb (Norwegian), ro (Romanian), sk (Slovak), zh_CN (Chinese simplified), zh_TW (Chinese traditional). The code 'no' for Norwegian (Bokmål) has been withdrawn; use 'nb' instead. @ text @d3 6 a8 6 --- src/tar.c.orig 2004-05-10 13:49:19.000000000 +0200 +++ src/tar.c @@@@ -196,6 +196,7 @@@@ enum NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_OVERWRITE_DIR_OPTION, d13 14 a26 39 @@@@ -292,6 +293,7 @@@@ static struct option long_options[] = {"no-recursion", no_argument, &recursion_option, 0}, {"no-same-owner", no_argument, &same_owner_option, -1}, {"no-same-permissions", no_argument, &same_permissions_option, -1}, + {"no-unlink-first", no_argument, NULL, NO_UNLINK_FIRST_OPTION}, {"numeric-owner", no_argument, 0, NUMERIC_OWNER_OPTION}, {"occurrence", optional_argument, 0, OCCURRENCE_OPTION}, {"old-archive", no_argument, 0, 'o'}, @@@@ -327,6 +329,7 @@@@ static struct option long_options[] = {"touch", no_argument, 0, 'm'}, {"uncompress", no_argument, 0, 'Z'}, {"ungzip", no_argument, 0, 'z'}, + {"unlink", no_argument, 0, 'U'}, {"unlink-first", no_argument, 0, 'U'}, {"update", no_argument, 0, 'u'}, {"utc", no_argument, 0, UTC_OPTION }, @@@@ -390,6 +393,7 @@@@ Operation modifiers:\n\ --overwrite overwrite existing files when extracting\n\ --no-overwrite-dir preserve metadata of existing directories\n\ -U, --unlink-first remove each file prior to extracting over it\n\ + --no-unlink-first don't remove each file prior to extracting\n\ --recursive-unlink empty hierarchies prior to extracting directory\n\ -S, --sparse handle sparse files efficiently\n\ -O, --to-stdout extract files to standard output\n\ @@@@ -604,6 +608,7 @@@@ decode_options (int argc, char **argv) owner_option = -1; group_option = -1; + old_files_option = UNLINK_FIRST_OLD_FILES; backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); @@@@ -916,6 +921,10 @@@@ decode_options (int argc, char **argv) old_files_option = UNLINK_FIRST_OLD_FILES; break; + case NO_UNLINK_FIRST_OPTION: + old_files_option = 0; + break; d28 5 a32 3 case UTC_OPTION: utc_option = true; break; @ 1.8 log @Update gtar packages to 1.13.25, with security fixes from redhat. Summary of changes (see NEWS and Changelog from the distribution for details): - don't allow absolute paths, and path containing ../ * New option --overwrite-dir * New option --recursion (the default) that is the inverse of --no-recursion. * New options --anchored, --ignore-case, --wildcards, --wildcards-match-slash, and their negations (e.g., --no-anchored). Along with --recursion and --no-recursion, these options control how exclude patterns are interpreted. * The default interpretation of exclude patterns is now --no-anchored --no-ignore-case --recursion --wildcards --wildcards-match-slash. * The --no-recursion option now affects extraction too. * New options --no-same-owner, --no-same-permissions. * New option -y or --bzip2 for bzip2 compression, by popular request. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.7 2000/10/20 02:47:45 hubertf Exp $ d3 3 a5 4 --- src/tar.c.orig Fri Sep 21 02:11:27 2001 +++ src/tar.c Sun Nov 17 18:24:55 2002 @@@@ -136,6 +136,7 @@@@ NEWER_MTIME_OPTION, d8 1 d13 1 a13 1 @@@@ -233,6 +234,7 @@@@ d18 2 a19 1 {"numeric-owner", no_argument, &numeric_owner_option, 1}, d21 1 a21 2 {"one-file-system", no_argument, 0, 'l'}, @@@@ -266,6 +268,7 @@@@ d28 2 a29 2 {"use-compress-program", required_argument, 0, USE_COMPRESS_PROGRAM_OPTION}, @@@@ -327,6 +330,7 @@@@ d31 1 a31 1 --overwrite-dir overwrite directory metadata when extracting\n\ d37 1 a37 1 @@@@ -510,6 +514,7 @@@@ d45 3 a47 1 @@@@ -843,6 +848,10 @@@@ d49 2 a50 2 case 'U': old_files_option = UNLINK_FIRST_OLD_FILES; d53 2 a54 2 + case NO_UNLINK_FIRST_OPTION: + old_files_option = 0; a55 2 case 'v': @ 1.7 log @Do not use lchmod etc. on old systems that don't have that call. Patch submitted in PR 9628 by Jan-Hinrich Fessel @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.6 1999/09/18 14:52:22 kim Exp $ d3 14 a16 78 --- src/extract.c.orig Tue Apr 22 20:05:57 1997 +++ src/extract.c Fri Mar 6 14:33:05 1998 @@@@ -103,7 +103,11 @@@@ if (!keep_old_files_option || (stat_info->st_mode & (S_ISUID | S_ISGID | S_ISVTX))) +#if (defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2)) + if (lchmod (file_name, ~current_umask & (int) stat_info->st_mode) < 0) +#else if (chmod (file_name, ~current_umask & (int) stat_info->st_mode) < 0) +#endif ERROR ((0, errno, _("%s: Cannot change mode to %0.4o"), file_name, ~current_umask & (int) stat_info->st_mode)); } @@@@ -124,8 +128,10 @@@@ { struct utimbuf utimbuf; +#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2)) if (!symlink_flag) { +#endif /* We do the utime before the chmod because some versions of utime are broken and trash the modes of the file. */ @@@@ -137,6 +143,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 @@@@ -145,6 +152,19 @@@@ utimbuf.modtime = stat_info->st_mtime; if (utime (file_name, &utimbuf) < 0) +#else + struct timeval tv[2]; + + if (incremental_option) + tv[0].tv_sec = stat_info->st_atime; + else + tv[0].tv_sec = now; + 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 ERROR ((0, errno, _("%s: Could not change access and modification times"), file_name)); @@@@ -155,7 +175,9 @@@@ have to set permissions prior to possibly giving files away. */ set_mode (file_name, stat_info); +#ifndef __NetBSD__ } +#endif /* If we are root, set the owner and group of the extracted file, so we extract as the original owner. Or else, if we are running as a user, --- src/tar.c.orig Fri Apr 25 16:09:49 1997 +++ src/tar.c Sat Mar 7 21:43:15 1998 @@@@ -163,6 +163,7 @@@@ #define SUFFIX_OPTION 15 #define USE_COMPRESS_PROGRAM_OPTION 16 #define VOLNO_FILE_OPTION 17 +#define NO_UNLINK_FIRST_OPTION 20 /* Some cleanup is being made in GNU tar long options. Using old names is allowed for a while, but will also send a warning to stderr. Take old @@@@ -237,6 +238,8 @@@@ {"newer-mtime", required_argument, NULL, NEWER_MTIME_OPTION}, {"null", no_argument, NULL, NULL_OPTION}, {"no-recursion", no_argument, NULL, NO_RECURSE_OPTION}, + {"norecurse", no_argument, NULL, NO_RECURSE_OPTION}, d19 14 a32 16 {"old-archive", no_argument, NULL, 'o'}, {"one-file-system", no_argument, NULL, 'l'}, @@@@ -267,6 +270,7 @@@@ {"touch", no_argument, NULL, 'm'}, {"uncompress", no_argument, NULL, 'Z'}, {"ungzip", no_argument, NULL, 'z'}, + {"unlink", no_argument, NULL, 'U'}, {"unlink-first", no_argument, NULL, 'U'}, {"update", no_argument, NULL, 'u'}, {"use-compress-program", required_argument, NULL, USE_COMPRESS_PROGRAM_OPTION}, @@@@ -320,7 +324,8 @@@@ -W, --verify attempt to verify the archive after writing it\n\ --remove-files remove files after adding them to the archive\n\ -k, --keep-old-files don't overwrite existing files when extracting\n\ - -U, --unlink-first remove each file prior to extracting over it\n\ + -U, --unlink-first remove each file prior to extracting (default)\n\ d37 1 a37 1 @@@@ -487,6 +492,7 @@@@ d41 1 a41 1 + unlink_first_option = 1; d44 2 a45 2 version_control_string = getenv ("VERSION_CONTROL"); @@@@ -780,6 +786,10 @@@@ d48 1 a48 1 unlink_first_option = 1; d52 1 a52 1 + unlink_first_option = 0; @ 1.7.8.1 log @Update gtar* to 1.13.25 on the netbsd-1-6 pkgsrc branch, for security reasons. Requested by Manuel Bouyer. The files are synced with the following revisions, with changes necessary for the 1.6 pkgsrc environnement (USE_BUILDLINK2, USE_PKGLOCALEDIR). gtar/Makefile 1.17 gtar-base/Makefile 1.23 gtar-base/PLIST 1.3 gtar-base/distinfo 1.8 gtar-base/files/gtar.1 1.3 gtar-base/patches/patch-aa 1.5 gtar-base/patches/patch-ab 1.8 gtar-base/patches/patch-ac removed gtar-base/patches/patch-ad removed gtar-base/patches/patch-ae 1.4 gtar-base/patches/patch-af 1.1 (new file) gtar-base/patches/patch-ag 1.1 (new file) gtar-info/Makefile 1.8 gtar-info/PLIST 1.3 gtar-info/distinfo 1.3 @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.8 2002/11/20 16:57:55 bouyer Exp $ d3 78 a80 14 --- src/tar.c.orig Fri Sep 21 02:11:27 2001 +++ src/tar.c Sun Nov 17 18:24:55 2002 @@@@ -136,6 +136,7 @@@@ NEWER_MTIME_OPTION, NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, + NO_UNLINK_FIRST_OPTION, NO_WILDCARDS_OPTION, NO_WILDCARDS_MATCH_SLASH_OPTION, NULL_OPTION, @@@@ -233,6 +234,7 @@@@ {"no-recursion", no_argument, &recursion_option, 0}, {"no-same-owner", no_argument, &same_owner_option, -1}, {"no-same-permissions", no_argument, &same_permissions_option, -1}, d83 16 a98 14 {"old-archive", no_argument, 0, 'o'}, {"one-file-system", no_argument, 0, 'l'}, @@@@ -266,6 +268,7 @@@@ {"touch", no_argument, 0, 'm'}, {"uncompress", no_argument, 0, 'Z'}, {"ungzip", no_argument, 0, 'z'}, + {"unlink", no_argument, 0, 'U'}, {"unlink-first", no_argument, 0, 'U'}, {"update", no_argument, 0, 'u'}, {"use-compress-program", required_argument, 0, USE_COMPRESS_PROGRAM_OPTION}, @@@@ -327,6 +330,7 @@@@ --overwrite overwrite existing files when extracting\n\ --overwrite-dir overwrite directory metadata when extracting\n\ -U, --unlink-first remove each file prior to extracting over it\n\ d103 1 a103 1 @@@@ -510,6 +514,7 @@@@ d107 1 a107 1 + old_files_option = UNLINK_FIRST_OLD_FILES; d110 2 a111 2 @@@@ -843,6 +848,10 @@@@ d114 1 a114 1 old_files_option = UNLINK_FIRST_OLD_FILES; d118 1 a118 1 + old_files_option = 0; @ 1.6 log @Copied from patch-ab,v @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 1998/08/07 10:35:49 agc Exp $ d9 1 a9 1 +#ifdef __NetBSD__ d21 1 a21 1 +#ifndef __NetBSD__ d32 1 a32 1 +#ifndef __NetBSD__ @ 1.5 log @make this work under linux. - don't use gnumalloc - use lchmod only on NetBSD @ text @@ 1.4 log @Add NetBSD RCS Ids. @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 @@@@ -103,7 +103,7 @@@@ d9 1 a9 1 - if (chmod (file_name, ~current_umask & (int) stat_info->st_mode) < 0) d11 3 d17 1 a17 1 @@@@ -124,8 +124,10 @@@@ d28 1 a28 1 @@@@ -137,6 +139,7 @@@@ d36 1 a36 1 @@@@ -145,6 +148,19 @@@@ d56 1 a56 1 @@@@ -155,7 +171,9 @@@@ @ 1.3 log @fix for PR 5194 from augustss - no directory in patched file names @ text @d1 2 @ 1.2 log @gtar, in this pkg format, will never be called from pkg_add, so we won't even pretend that we support the --fast-read option as a no-op--we don't support it at all. (pax or the old in-tree tar does.) @ text @d1 2 a2 2 --- extract.c.orig Tue Apr 22 20:05:57 1997 +++ extract.c Fri Mar 6 14:33:05 1998 d61 2 a62 2 --- tar.c.orig Fri Apr 25 16:09:49 1997 +++ tar.c Sat Mar 7 21:43:15 1998 @ 1.1 log @Bring gtar up to date with the NetBSD changes to GNU tar: - use lutimes() and lchmod() in addition to lchown() - add --norecurse as an undocumented synonym for --no-recursion - add --fast-read as an undocumented nullop (this is _not_ necessary) - pre-set --unlink-first - add --unlink as an undocumented synonym for --unlink-first - add --no-unlink-first to allow turning --unlink-first off NetBSD's tar is based on GNU tar 1.11.2. This tar, 1.12, has much of the functionality NetBSD has added over time, so only the above changes were necessary. @ text @d1 2 a2 2 --- src/extract.c.orig Tue Apr 22 20:05:57 1997 +++ src/extract.c Thu Mar 5 13:59:52 1998 d61 2 a62 2 --- src/tar.c.orig Fri Apr 25 16:09:49 1997 +++ src/tar.c Thu Mar 5 14:32:19 1998 d71 1 a71 9 @@@@ -211,6 +212,7 @@@@ {"exclude", required_argument, NULL, EXCLUDE_OPTION}, {"exclude-from", required_argument, NULL, 'X'}, {"extract", no_argument, NULL, 'x'}, + {"fast-read", no_argument, NULL, 1}, {"file", required_argument, NULL, 'f'}, {"files-from", required_argument, NULL, 'T'}, {"force-local", no_argument, &force_local_option, 1}, @@@@ -237,6 +239,8 @@@@ d80 1 a80 1 @@@@ -267,6 +271,7 @@@@ d88 1 a88 1 @@@@ -320,7 +325,8 @@@@ d98 1 a98 1 @@@@ -487,6 +493,7 @@@@ d106 1 a106 1 @@@@ -780,6 +787,10 @@@@ @