head 1.7; access; symbols pkgsrc-2013Q2:1.7.0.8 pkgsrc-2013Q2-base:1.7 pkgsrc-2012Q4:1.7.0.6 pkgsrc-2012Q4-base:1.7 pkgsrc-2011Q4:1.7.0.4 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q2:1.7.0.2 pkgsrc-2011Q2-base:1.7 pkgsrc-2010Q3:1.6.0.6 pkgsrc-2010Q3-base:1.6 pkgsrc-2010Q2:1.6.0.4 pkgsrc-2010Q2-base:1.6 pkgsrc-2010Q1:1.6.0.2 pkgsrc-2010Q1-base:1.6 pkgsrc-2009Q4:1.5.0.18 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.16 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.5.0.14 pkgsrc-2009Q2-base:1.5 pkgsrc-2009Q1:1.5.0.12 pkgsrc-2009Q1-base:1.5 pkgsrc-2008Q4:1.5.0.10 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.8 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.6 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.4 pkgsrc-2008Q2-base:1.5 cwrapper:1.5.0.2 pkgsrc-2008Q1:1.4.0.12 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.10 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.8 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.6 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.4 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.2 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.3.0.14 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.12 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.10 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.8 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.6 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.4 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.2 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.2.0.2 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.1.0.12 pkgsrc-2004Q3-base:1.1 pkgsrc-2004Q2:1.1.0.10 pkgsrc-2004Q2-base:1.1 pkgsrc-2004Q1:1.1.0.8 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.6 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.4 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.2; locks; strict; comment @# @; 1.7 date 2010.12.14.09.18.51; author wiz; state dead; branches; next 1.6; 1.6 date 2010.03.23.19.00.10; author tez; state Exp; branches; next 1.5; 1.5 date 2008.05.18.01.48.09; author tnn; state Exp; branches; next 1.4; 1.4 date 2006.12.03.15.21.20; author tron; state Exp; branches; next 1.3; 1.3 date 2005.01.09.22.52.14; author recht; state Exp; branches 1.3.14.1; next 1.2; 1.2 date 2004.09.27.16.12.04; author wiz; state Exp; branches; next 1.1; 1.1 date 2002.11.20.16.57.55; author bouyer; state Exp; branches 1.1.2.1; next ; 1.3.14.1 date 2006.12.04.08.46.26; author ghen; state Exp; branches; next ; 1.1.2.1 date 2002.11.20.16.57.55; author agc; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2002.12.22.08.29.20; author agc; state Exp; branches; next ; desc @@ 1.7 log @Remove patch that should have been removed with gtar-1.25 update. @ text @$NetBSD: patch-ag,v 1.6 2010/03/23 19:00:10 tez Exp $ --- src/extract.c.orig 2010-03-23 13:15:18.015134100 -0500 +++ src/extract.c 2010-03-23 13:21:52.818991900 -0500 @@@@ -188,13 +188,21 @@@@ mode = cur_info->st_mode ^ invert_permissions; } +#if (defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2)) + failed = lchmod (file_name, mode) != 0; +#else failed = chmod (file_name, mode) != 0; +#endif if (failed && errno == EPERM) { /* On Solaris, chmod may fail if we don't have PRIV_ALL. */ if (priv_set_restore_linkdir () == 0) { +#if (defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2)) + failed = lchmod (file_name, mode) != 0; +#else failed = chmod (file_name, mode) != 0; +#endif priv_set_remove_linkdir (); } } @ 1.6 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-ag,v 1.5 2008/05/18 01:48:09 tnn Exp $ @ 1.5 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 1 a1 1 $NetBSD$ d3 3 a5 3 --- 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, d10 1 a10 1 + if (lchmod (file_name, mode) != 0) d12 1 a12 1 if (chmod (file_name, mode) != 0) d14 13 a26 3 chmod_error_details (file_name, mode); } @ 1.4 log @Add Kees Cook's patch for CVE-2006-6097 taken from Ubuntu Linux. Bump package revision. @ text @d3 3 a5 3 --- 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 @@@@ a16 53 @@@@ -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: @ 1.3 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 2 a4 2 --- src/extract.c.orig Mon Sep 13 10:12:04 2004 +++ src/extract.c Sun Jan 9 18:26:07 2005 d55 15 @ 1.3.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-ag,v 1.3 2005/01/09 22:52:14 recht Exp $ d3 2 a4 2 --- src/extract.c.orig 2004-12-21 09:55:12.000000000 +0000 +++ src/extract.c 2006-12-03 15:13:25.000000000 +0000 a54 15 @@@@ -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: @ 1.2 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 3 a5 3 --- src/extract.c.orig 2004-04-05 09:23:51.000000000 +0200 +++ src/extract.c @@@@ -182,7 +182,11 @@@@ set_mode (char const *file_name, d17 1 a17 1 @@@@ -222,7 +226,12 @@@@ set_stat (char const *file_name, d30 1 a30 1 @@@@ -235,6 +244,7 @@@@ set_stat (char const *file_name, d38 1 a38 1 @@@@ -243,6 +253,16 @@@@ set_stat (char const *file_name, @ 1.1 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 2 $NetBSD: $ This include tar-1.13.19-absolutenames.patch, from RedHat tar-1.13.25-4.7.1.src.rpm d3 4 a6 4 --- src/extract.c.orig Sun Nov 17 18:35:32 2002 +++ src/extract.c Sun Nov 17 18:35:09 2002 @@@@ -180,7 +180,11 @@@@ mode = current_stat_info->st_mode ^ invert_permissions; d17 1 a17 1 @@@@ -216,7 +220,12 @@@@ d30 1 a30 1 @@@@ -229,6 +238,7 @@@@ d38 1 a38 1 @@@@ -237,6 +247,16 @@@@ a54 21 @@@@ -1019,10 +1039,19 @@@@ { struct stat st1, st2; int e; + size_t skiplinkcrud; + + if (absolute_names_option) + skiplinkcrud = 0; + else { + skiplinkcrud = FILESYSTEM_PREFIX_LEN (current_link_name); + while (ISSLASH (current_link_name[skiplinkcrud])) + skiplinkcrud++; + } /* MSDOS does not implement links. However, djgpp's link() actually copies the file. */ - status = link (current_link_name, CURRENT_FILE_NAME); + status = link (current_link_name + skiplinkcrud, CURRENT_FILE_NAME); if (status == 0) { @ 1.1.2.1 log @file patch-ag was added on branch netbsd-1-6 on 2002-12-22 08:29:20 +0000 @ text @d1 76 @ 1.1.2.2 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 @a0 76 $NetBSD: patch-ag,v 1.1.2.1 2002/12/22 08:29:20 agc Exp $ This include tar-1.13.19-absolutenames.patch, from RedHat tar-1.13.25-4.7.1.src.rpm --- src/extract.c.orig Sun Nov 17 18:35:32 2002 +++ src/extract.c Sun Nov 17 18:35:09 2002 @@@@ -180,7 +180,11 @@@@ mode = current_stat_info->st_mode ^ invert_permissions; } +#if (defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2)) + if (lchmod (file_name, mode) != 0) +#else if (chmod (file_name, mode) != 0) +#endif chmod_error_details (file_name, mode); } @@@@ -216,7 +220,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. */ @@@@ -229,6 +238,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 @@@@ -237,6 +247,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 { @@@@ -1019,10 +1039,19 @@@@ { struct stat st1, st2; int e; + size_t skiplinkcrud; + + if (absolute_names_option) + skiplinkcrud = 0; + else { + skiplinkcrud = FILESYSTEM_PREFIX_LEN (current_link_name); + while (ISSLASH (current_link_name[skiplinkcrud])) + skiplinkcrud++; + } /* MSDOS does not implement links. However, djgpp's link() actually copies the file. */ - status = link (current_link_name, CURRENT_FILE_NAME); + status = link (current_link_name + skiplinkcrud, CURRENT_FILE_NAME); if (status == 0) { @