--- /dev/null
- tar (1.22-3) unstable; urgency=low
++tar (1.23-1) unstable; urgency=low
+
++ * new upstream version, fixes security issue in rmt (CVE-2010-0624)
+ * add suggests for lzma and xz-utils, closes: #523499
+
- -- Bdale Garbee <bdale@gag.com> Tue, 26 Jan 2010 15:21:30 -0700
++ -- Bdale Garbee <bdale@gag.com> Wed, 10 Mar 2010 09:51:37 -0700
+
+tar (1.22-2) unstable; urgency=low
+
+ * Add Carl Worth as an uploader.
+ * Fix to allow parallel build (-j2), closes: #535319
+ * Don't close file stream before EOF, closes: #525818
+ * Preserve hard links with --remove-files, closes: #188663
+ Thanks to Ted T'so for the idea and Sergey Poznyakoff for
+ cleaning up my original implementation.
+ * Respect DEB_BUILD_OPTIONS=nocheck to conform with Policy 3.8.2
+
+ -- Carl Worth <cworth@cworth.org> Tue, 04 Aug 2009 12:07:06 -0700
+
+tar (1.22-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Set SIGPIPE to default action, patch from upstream. (closes: #532570)
+
+ -- Bastian Blank <waldi@debian.org> Tue, 30 Jun 2009 22:23:48 +0200
+
+tar (1.22-1) unstable; urgency=low
+
+ * new upstream version
+ * version the Replaces entry for cpio, closes: #483355
+ * move config.* update to configure target, yields a smaller diff that
+ doesn't clash with git-buildpackage... already had autotools-dev build dep!
+ * script debian/tarman contributed by Marcus Watts now used to create tar.1
+ by processing usage text in source code! Partial fix for #473328.
+ closes: #515578, #429776, #411707,
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 03 Apr 2009 01:33:52 -0600
+
+tar (1.20-1) unstable; urgency=low
+
+ * new upstream version
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 16 Apr 2008 19:24:39 -0600
+
+tar (1.19-3) unstable; urgency=low
+
+ * upstream patch to remove error message when updating a non-existing archive
+ * patch from Phil Hands for man page prevents URL splitting, closes: #463215
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 18 Mar 2008 14:25:33 -0600
+
+tar (1.19-2) unstable; urgency=low
+
+ * patch from Ubuntu to fix FTBFS with gcc-4.3, closes: #452096, #441606
+ * more descriptive short description in control, closes: #406301
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 22 Feb 2008 18:17:50 -0700
+
+tar (1.19-1) unstable; urgency=low
+
+ * new upstream version
+ * no need to deliver license text, as GPL-3 is in common-licenses now
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 21 Oct 2007 11:47:17 -0600
+
+tar (1.18-3) unstable; urgency=high
+
+ * fix build with gcc-4.3, closes: #441606
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 13 Sep 2007 00:37:36 +0200
+
+tar (1.18-2) unstable; urgency=high
+
+ * patch from Neil Moore improving the man page, closes: #439916
+ * patch from Justin Pryzby improving the man page, closes: #433553
+ * patch from upstream to fix directory traversal concern on extraction
+ documented in (CVE-2007-4131), closes: #439335
+ * urgency to high since preceding bug has having security implications
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 05 Sep 2007 10:20:45 +0100
+
+tar (1.18-1) unstable; urgency=low
+
+ * new upstream version, closes: #429417, #426808
+ * include COPYING file containing GPLv3 until base-file is updated
+ * fix filename of NEWS.Debian so that it actually gets delivered
+ * patch from Wim De Smet to document --strip in the man page, closes: #417810
+ * patch from upstream CVS to fix --verify on large files, closes: #422718
+ * add suggest of ncompress mirroring suggest of bzip2 to enable optional
+ functionality, closes: #122451
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 09 Aug 2007 20:52:32 -0600
+
+tar (1.16.1-1) unstable; urgency=low
+
+ * new upstream version, closes: #402179
+ * updated Russian translation from Yuriy Talakan, closes: #411613
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 2 Apr 2007 22:10:24 -0600
+
+tar (1.16-2) unstable; urgency=high
+
+ * patch from Kees Cook via upstream to disable handling of GNUTYPE_NAMES
+ by default and add a new command-line switch --allow-name-mangling to
+ re-enable it, as a fix for directory traversal bug (CVE-2006-6097),
+ closes: #399845
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 1 Dec 2006 09:19:02 -0700
+
+tar (1.16-1) unstable; urgency=medium
+
+ * new upstream version, closes: #376816, #363943, #377124, #377330
+ * fix for buffer overflow in test suite, closes: #377557
+ * force a clean in the tests directory before running the test suite, seems
+ to work around test suite repeatability problems, closes: #377330, #379393
+ * accept patch from Raphael Bossek to zero nanoseconds, closes: #329843
+ * update man page to reflect change in -l definition and other misc changes
+ to options since man page was last updated,
+ closes: #384508, #391718, 361932, #315506
+ * stop delivering upstream README, closes: #323232
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 24 Oct 2006 17:41:51 -0600
+
+tar (1.15.91-2) unstable; urgency=low
+
+ * add a NEWS.Debian file that communicates the change in wildcard processing
+ * re-institute the patch for filenames that are exactly 100 characters in
+ length originally reported in #230910, closes: #376909
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 6 Jul 2006 19:30:46 -0600
+
+tar (1.15.91-1) unstable; urgency=low
+
+ * new upstream version, retrieved from alpha.gnu.org
+ * update date in tar.1, closes: #367290
+ * support rollbacks in maintainer scripts, drop removal of info since this
+ package no longer delivers an info doc, closes: #374461
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 22 Jun 2006 16:05:21 -0600
+
+tar (1.15.1dfsg-3) unstable; urgency=low
+
+ * revert to upstream auto* products and take a different approach to eliding
+ doc/ contents, since I'm clearly just not smart enough to use auto* tools
+ without breaking more than I fix, closes: #362249
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 15 Apr 2006 00:18:42 -0600
+
+tar (1.15.1dfsg-2) unstable; urgency=low
+
+ * run aclocal and automake to get last reference to doc subdir out of
+ Makefile.in, closes: #361931
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 13 Apr 2006 07:33:20 +0900
+
+tar (1.15.1dfsg-1) unstable; urgency=low
+
+ * remove the documentation source from this package, since it is licensed
+ under the GFDL with invariant cover texts that upstream is unwilling or
+ unable to to remove, closes: #357259
+ * remove install-info call from postinst, since it is no longer relevant
+ * include URL for the online version of the tar documentation in the man page
+ * run make with same env vars set as configure to avoid situation where
+ make re-running configure causes rsh to not be found, etc, closes: #356657
+ * another patch from Goswin to fix test failures on amd64, closes: #354847
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 11 Apr 2006 17:18:12 +0900
+
+tar (1.15.1-6) unstable; urgency=low
+
+ * patch from upstream to fix incorrect listing of a non-existing section as
+ invariant in the GFDL license header, closes: #357259
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 17 Mar 2006 19:09:14 +0100
+
+tar (1.15.1-5) unstable; urgency=low
+
+ * patch from Goswin von Brederlow to sort tar output in test suite to
+ compensate for different file order when ext3 option dir_index is enabled
+ on build system, first seen on amd64 autobuilder, closes: #354847
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 17 Mar 2006 16:02:13 +0100
+
+tar (1.15.1-4) unstable; urgency=low
+
+ * change section from base to utils to resolve override disparity
+ * add build dependency on autoconf, closes: #354194
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 24 Feb 2006 20:09:21 -0700
+
+tar (1.15.1-3) unstable; urgency=high
+
+ * patch for src/xheader.c suggested by Martin Pitt, to fix exploitable
+ buffer overflow [CVE-2006-0300], closes: #354091, #314805
+ * change default path for rmt in lib/localedir.h to be correct for Debian
+ systems, closes: #319635
+ * updated Italian translation from Marco d'Itri, closes: #286978
+ * patch from Loic Minier fixing wrong matching of file names when special
+ characters are present, closes: #272888
+ * patch suggested by Stephen Frost to convert fatal error to warning when
+ an archive spanning multiple volumes contains a filename longer than
+ 100 characters, closes: #330187
+ * patch from Peter Samuelson to fix hard link handling in the presence
+ of the --strip-components option, closes: #343062
+ * update debhelper compat level to 5
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 23 Feb 2006 13:02:09 -0600
+
+tar (1.15.1-2) unstable; urgency=low
+
+ * patch from LaMont to fix gcc-4.0 error in the test suite,
+ closes: #308815, #310830
+ * patch for de.po from Jens Seidel, closes: #313900
+ * fix amanda upstream URL in the info pages, closes: #310158
+ * patch from NIIBE Yutaka to support cross builds, closes: #283723
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 14 Jun 2005 23:42:40 -0600
+
+tar (1.15.1-1) unstable; urgency=low
+
+ * new upstream version, closes: #292255, #287251, #255067
+ * fetch tests/append.at from CVS since it was omitted from the 1.15.1
+ tarball, and update the regression test invocation in debian/rules
+ * tweaks to man page, closes: #265615
+ * add --libexecdir definition to configure call, closes: #307070, #291068
+ * stop trying to link /sbin/rmt, closes: #287217, #156550
+ * add --owner to man page, closes: #204848
+ * only mention --totals once in man page, closes: #288002
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 8 May 2005 22:41:15 -0600
+
+tar (1.14-2) unstable; urgency=low
+
+ * patch from Paul Eggert that does a better job of eliminating the
+ dependency on (buggy) valloc, closes: #234422, #248897
+ * patch for typo in upstream po/de.po, closes: #154511
+ * switch from dh_installmanpages to dh_installman
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 3 Aug 2004 08:22:17 -0600
+
+tar (1.14-1) unstable; urgency=low
+
+ * new upstream version, closes: #252491, #242231
+ * eliminate autoconf and automake build dependencies
+ * fix a bash-ism in the prerm for POSIX shell users
+ * change valloc to malloc when allocating record_start, closes: #234422
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 2 Aug 2004 08:02:18 -0700
+
+tar (1.13.93-4) unstable; urgency=high
+
+ * patch to stop issuing lone zero block warnings, closes: #235820
+ * patch to clean up hyphenation in man page, closes: #185670
+ * clean up manpage discussion of exclude and exclude-from, closes: #146196
+ * turn on regression tests in the build process
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 24 Apr 2004 15:38:32 -0600
+
+tar (1.13.93-3) unstable; urgency=high
+
+ * patch from upstream converts lone zero block errors to warnings,
+ closes: #235821
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 12 Mar 2004 17:02:47 -0700
+
+tar (1.13.93-2) unstable; urgency=high
+
+ * recover portion of patch from Ingo Saitz included in 1.13.92-4 that got
+ lost when merging 1.13.93 upstream (argh!), closes: 230910
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 3 Mar 2004 13:22:49 -0700
+
+tar (1.13.93-1) unstable; urgency=low
+
+ * new upstream version
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 28 Feb 2004 20:10:13 -0700
+
+tar (1.13.92-5) unstable; urgency=low
+
+ * patch from Paul Eggert to revert bogus behavior where POSIXLY_CORRECT
+ set in the environment forced 'pax' format archives, closes: #230872
+ * add a lintian override for rmt's man page, since delivering it as an
+ alternative makes the filename no longer match the script and symlink
+ delivered for the binary
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 15 Feb 2004 16:03:20 -0700
+
+tar (1.13.92-4) unstable; urgency=low
+
+ * patch from Ingo Saitz to avoid creating archives with shortnames of 100
+ characters, since it can cause dpkg problems, closes: #230910
+ * fix typo in info page, closes: #222569
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 12 Feb 2004 01:17:10 -0700
+
+tar (1.13.92-3) unstable; urgency=low
+
+ * freshen build dependencies to use automaken
+ * lose /usr/share/info/dir*gz, closes: #230418
+ * reinstate content for mime-support, closes: #111893
+ * implement alternatives for rmt, the version provided with dump will get
+ higher priority than the one in tar since it's better - see #183901
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 31 Jan 2004 16:55:29 -0700
+
+tar (1.13.92-2) unstable; urgency=low
+
+ * patches from CVS to stop stripping './' prefix from filenames, and to fix
+ --no-recursion, closes: #230431, #230434
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 31 Jan 2004 01:11:04 -0700
+
+tar (1.13.92-1) unstable; urgency=low
+
+ * new upstream version, closes: #229827
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 30 Jan 2004 02:02:08 -0700
+
+tar (1.13.25-6) unstable; urgency=low
+
+ * accept patch from Goswin Brederlow to hard-code RSH definition in rules
+ file, eliminating rsh-client from build deps, closes: #185594, #200042
+ * patch from Marc SCHAEFER <schaefer@alphanet.ch> to fix symlink extraction
+ as empty files, closes: #149532
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 14 Sep 2003 10:55:42 -0600
+
+tar (1.13.25-5) unstable; urgency=low
+
+ * include fresher config.sub/guess, update in debian/rules, closes: #165778
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 22 Oct 2002 16:09:43 -0600
+
+tar (1.13.25-4) unstable; urgency=high
+
+ * apply patch for path vulnerabilities documented in CVE CAN-2002-0399,
+ make urgency high since this is a security issue, closes: #163152
+ * include improved tar.1 man page from Andrew Moise <moise@nauticom.net>
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 16 Oct 2002 11:16:44 -0600
+
+tar (1.13.25-3) unstable; urgency=low
+
+ * apply patch to the Debian-originated tar manpage from Pedro Zorzenon Neto
+ <pzn@terra.com.br> to clarify the value of using --bzip2 in scripts instead
+ of -j to ensure compatibility with both old and new versions of tar.
+ closes: #142242, #83233
+ * fix capitalization concern in the control file, closes: #125629
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 10 Apr 2002 14:14:40 -0600
+
+tar (1.13.25-2) unstable; urgency=medium
+
+ * add a README.Debian that clarifies the situation with respect to 'compress'
+ in Debian and the impact on the -Z and related options, closes: #122336
+ * patch from Mark Eichin to fix archive corruption in special cases, which
+ has been accepted upstream for next release. closes: #126274
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 1 Feb 2002 08:49:26 -0700
+
+tar (1.13.25-1) unstable; urgency=medium
+
+ * new upstream version (bug fixes), closes: #113531
+ * start having tar provide rmt, which means conflicting with and replacing
+ cpio versions prior to the cutover, closes: #94257, #90794
+ * make medium urgency, since we really want this and the associated cpio
+ upload to both be in woody!
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 23 Nov 2001 09:20:40 -0700
+
+tar (1.13.22-1) unstable; urgency=medium
+
+ * new upstream version, released specifically to help close bugs in woody
+ upstream (Paul Eggert) says:
+ regarding 1.13.22
+ This fixes Debian bug 92106, in addition to the bug fixes I already
+ reported to you for GNU tar 1.13.20 and 1.13.21. It also fixes a
+ core-dump bug for tar 1.13.19 and later, reported to bug-tar.
+ regarding 1.13.21
+ This fixes Debian bug 95984, in addition to the bug fixes I already
+ reported to you for 1.13.20. It also upgrades tar to use gettext
+ 0.10.39.
+ regarding 1.13.20
+ I haven't had time to fix all or even most of the bugs, but I suggest
+ closing out or modifying the following bug reports:
+ 13312 I changed tar to avoid the problem (I hope; I can't test it).
+ 52092 Fixed.
+ 58890 Fixed, I think -- at least, I can't reproduce it now.
+ 65719 Not a bug? last message in that bug report says it works for him.
+ 77664 Not a bug. In that context FOO:BAR means 'file BAR on host FOO'.
+ 78179 Sorry, I don't follow this report. Tar does strip leading '/'s
+ for me.
+ 83458 Fixed.
+ 83735 Fixed.
+ 85400 Fixed for the info page only. The man page is not part of
+ tar-1.13.20.
+ 90794 This partly seems to be a Debian packaging problem; see 94257.
+ 94287 Fixed.
+ 95344 Fixed.
+ 95984 Not fixed in 1.13.20, but will be fixed in next version.
+ 99655 Fixed.
+ 100883 This bug report applies to the Debian distribution only.
+ 100885 Not a bug; see its last message.
+ 105744 Not a bug; see its last message.
+ closes: #92106, #95984, #13312, #52092, #58890, #65719, #77664, #78179
+ closes: #83458, #83735, #94287, #95344, #99655, #100885, #105744
+ * add documentation for --rsh-command to the Debian-provided man page,
+ closes: #85400
+ * fix Debian-provided man page's reference to --exclude, closes: #100883
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 31 Aug 2001 01:13:49 -0600
+
+tar (1.13.19-1) unstable; urgency=low
+
+ * new upstream version, -I no longer a valid option, closes: #81556
+ * freshen debian/copyright
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 23 Jan 2001 09:42:13 -0700
+
+tar (1.13.18-2) unstable; urgency=low
+
+ * update (Debian-only, not part of upstream release) man page for tar to
+ reflect change from -I to -j for bzip2 support, closes: #80331
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 22 Dec 2000 14:18:51 -0700
+
+tar (1.13.18-1) unstable; urgency=low
+
+ * new upstream version, closes: #57436, #51889
+ * add suggestion for bzip2, closes: #64279
+ * this package is pristine upstream source plus the debian/ directory, so
+ there should be no issues compiling on any platform, closes: #58171
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 20 Dec 2000 13:09:44 -0700
+
+tar (1.13.17-2) frozen unstable; urgency=low
+
+ * reconfigure, recompile to fix compile from source problem, closes: #60824
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 23 Mar 2000 09:27:16 -0700
+
+tar (1.13.17-1) unstable; urgency=low
+
+ * new upstream source from alpha.gnu.org recommended by uptream maintainer
+ Paul Eggert.
+ * this version should handle multibyte encoded filenames, closes: #25140
+ * upstream says the problem reported with -g is unreproducible in this
+ version, closes: #23511
+ * this version excludes sockets when building archives, closes: #51064
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 7 Jan 2000 22:57:34 -0700
+
+tar (1.13.15-1) unstable; urgency=low
+
+ * new upstream source from alpha.gnu.org recommended by uptream maintainer
+ Paul Eggert.
+ * update to current policy
+ * can't reproduce problem with remote host access reported in 1.13.11-2,
+ assuming it's fixed, closes: #45647
+ * upstream has not picked up our tar.1 manpage, so we'll try to keep it
+ up to date, closes: #50856
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 3 Dec 1999 13:29:41 -0700
+
+tar (1.13.14-5) unstable; urgency=low
+
+ * minor tweaks to clean up our diff, pointed out by the upstream maintainer
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 23 Nov 1999 09:23:56 -0700
+
+tar (1.13.14-4) unstable; urgency=low
+
+ * update upstream maintainer and copyright references, etc
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 21 Nov 1999 09:56:26 -0700
+
+tar (1.13.14-3) unstable; urgency=low
+
+ * fix default device in man page, closes: 50856
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 21 Nov 1999 09:45:32 -0700
+
+tar (1.13.14-2) unstable; urgency=low
+
+ * fold in Torsten's work that closes: #50553
+ * upstream folks indicate that $TAPE does not override -f in 1.13.14,
+ closes: #47664
+ * 1.13.14 has an updated man page that closes: #48603
+ * the -X stuff has supposedly been fixed since 1.13.12, closes: #43826
+ * rename upstream ChangeLog to changelog in the Debian package to satisfy
+ lintian/policy
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 20 Nov 1999 22:07:46 -0700
+
+tar (1.13.14-1.1) unstable; urgency=low
+
+ * Non maintainer upload.
+ * Moved the AC_LINK_FILES in configure.in inside the if (closes: #50553)
+
+ -- Torsten Landschoff <torsten@debian.org> Sun, 21 Nov 1999 04:25:10 +0100
+
+tar (1.13.14-1) unstable; urgency=low
+
+ * new upstream source from alpha.gnu.org recommended by uptream maintainer
+ Paul Eggert.
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 11 Nov 1999 01:56:54 -0700
+
+tar (1.13.11-2) unstable; urgency=low
+
+ * fix error in man page, closes: #44610
+ * patch from upstream that closes: #44827
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 14 Sep 1999 20:58:23 -0600
+
+tar (1.13.11-1) unstable; urgency=low
+
+ * new upstream source from alpha.gnu.org recommended by uptream maintainer
+ Paul Eggert.
+ * move to FHS compliance with new debhelper
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 6 Sep 1999 16:49:51 -0600
+
+tar (1.13.6-1) unstable; urgency=medium
+
+ * new upstream source from alpha.gnu.org recommended by uptream maintainer
+ Paul Eggert.
+ * bzip2 support is back, now with option '-y' instead of '-I'... rejoice!
+ Closes: #42428, #42562, #42572, #42661, #42772
+ * Paul claims that the -X option is fixed again, Closes: #42552
+ * add mime-support goo, Closes: #26706
+ * close bug reports I forgot to close last time, Closes: #33134, #37659
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 11 Aug 1999 09:20:48 -0600
+
+tar (1.13-3) unstable; urgency=low
+
+ * include more docs in /usr/doc/tar, closes 33134
+ * minor tweak to tar.1, closes 37659
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 2 Aug 1999 00:48:44 -0600
+
+tar (1.13-2) unstable; urgency=low
+
+ * back out hacks we had made to 1.12 that seem to be causing problems in
+ 1.13, getting essentially to pristine 1.13 source plus debian control files
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 2 Aug 1999 00:26:49 -0600
+
+tar (1.13-1) unstable; urgency=low
+
+ * new upstream source
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 1 Aug 1999 23:33:29 -0600
+
+tar (1.12-9) unstable; urgency=low
+
+ * fix some issues with the contest of the po directory in my CVS repository
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 1 Aug 1999 18:02:35 -0600
+
+tar (1.12-8) unstable; urgency=low
+
+ * update to handle changes in automake
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 9 Jun 1999 20:15:15 -0600
+
+tar (1.12-7) frozen unstable; urgency=low
+
+ * merge new version of Italian translation, closes 30284
+ * merge README.debian with copyright, closes 22370
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 6 Jan 1999 23:56:47 -0700
+
+tar (1.12-6) frozen unstable; urgency=low
+
+ * update manpage to document -I, closes 21224
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 17 Apr 1998 23:37:02 -0600
+
+tar (1.12-5) frozen unstable; urgency=low
+
+ * fix for erroneous time reports from --totals from Rob Browning,
+ closes 18345
+ * add --numeric-owner to man page, closes 20801
+ * add some examples to the man page, closes 20290
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 10 Apr 1998 00:30:17 -0600
+
+tar (1.12-4) unstable; urgency=low
+
+ * move from debmake to debhelper
+ * address lintian error reports
+ * apply patch from amanda distribution to fix read errors on sparse files.
+ This should close 16694.
+ * updated dds2tar patch to restore proper operation of 'v' option. This was
+ causing corrupted archives when stdout was used. Closes 17857, 17916.
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 9 Feb 1998 23:52:05 -0700
+
+tar (1.12-3) unstable; urgency=low
+
+ * apply patch to support dds2tar-2.4.15, closes bug 10774
+ * apply patch to support use of bzip2, closes bugs 16280, 17221
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 4 Feb 1998 04:05:43 -0700
+
+tar (1.12-2) unstable; urgency=low
+
+ * libc6
+ * Folded in some of Michael Dorman's changes for alpha, which are really
+ libc6 changes. Closes bug 8823.
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 5 Sep 1997 00:13:00 -0600
+
+tar (1.12-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 25 Apr 1997 21:15:44 -0600
+
+tar (1.11.8-11) stable frozen unstable; urgency=low
+
+ * back out the change made for 1.11.8-8, since it isn't really effective,
+ and caused several folks grief. Closes bug 8040.
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 18 Mar 1997 01:38:10 -0700
+
+tar (1.11.8-10) stable frozen unstable; urgency=low
+
+ * rework debian/rules for CFLAGS as per policy. Closes bug 8065.
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 14 Mar 1997 21:22:50 -0700
+
+tar (1.11.8-9) unstable; urgency=medium
+
+ * debmake shoved a man page for a porting utility (ansi2knr) that
+ is in the tar source tree into the package. Fixes bug 7408.
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 27 Feb 1997 01:30:56 -0700
+
+tar (1.11.8-8) unstable; urgency=medium
+
+ * patch from the net for a quasi-security issue. changes the behavior
+ during extracts, so that tar won't create inappropriate setuid files
+ from nonexistent users.
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 6 Feb 1997 23:06:17 -0700
+
+tar (1.11.8-7) unstable; urgency=medium
+
+ * updated to current package standards
+ * patch from the net that fixes sporadic multi-vol seg faults
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 17 Nov 1996 19:37:43 -0700
+
+Fri May 24 08:05:55 MDT 1996 Bdale Garbee <bdale@gag.com>
+
+ * fold in changes from 1.11.9 configure.in so that we properly
+ recognize that it's ok to build 'rmt'
+ * administrivia
+
+Sun Apr 14 21:50:21 MDT 1996 Bdale Garbee <bdale@gag.com>
+
+ * add architecture and section fields to the control file
+ * add a man page to squelch the frequent bug reports
+
+Wed Dec 27 00:29:37 MST 1995 Bdale Garbee <bdale@gag.com>
+
+ * fixed a null pointer dereference when the username on a remote
+ tape reference was omitted... this closes several essentially
+ duplicate bug reports about segmentation violation core dumps.
+
+Sun Dec 3 01:13:19 MST 1995 Bdale Garbee <bdale@gag.com>
+
+ * ELF build
+ * add libc5 dependency
+ * new maintainer
+
+Local variables:
+mode: debian-changelog
+End:
/* Create a tar archive.
Copyright (C) 1985, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001,
- 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by John Gilmore, on 1985-08-25.
const char *message)
{
if (verbose_option)
- WARN ((0, 0,
- _("%s: contains a cache directory tag %s; %s"),
- quotearg_colon (dirname),
- quotearg_n (1, tagname),
- message));
+ WARNOPT (WARN_CACHEDIR,
+ (0, 0,
+ _("%s: contains a cache directory tag %s; %s"),
+ quotearg_colon (dirname),
+ quotearg_n (1, tagname),
+ message));
}
enum exclusion_tag_type
- check_exclusion_tags (char *dirname, const char **tag_file_name)
+ check_exclusion_tags (const char *dirname, const char **tag_file_name)
{
static char *tagname;
static size_t tagsize;
struct exclusion_tag *tag;
size_t dlen = strlen (dirname);
- int addslash = dirname[dlen-1] != '/';
- char *nptr = NULL;
+ int addslash = !ISSLASH (dirname[dlen-1]);
+ size_t noff = 0;
for (tag = exclusion_tags; tag; tag = tag->next)
{
tagname = xrealloc (tagname, tagsize);
}
- if (!nptr)
+ if (noff == 0)
{
strcpy (tagname, dirname);
- nptr = tagname + dlen;
+ noff = dlen;
if (addslash)
- *nptr++ = '/';
+ tagname[noff++] = '/';
}
- strcpy (nptr, tag->name);
+ strcpy (tagname + noff, tag->name);
if (access (tagname, F_OK) == 0
&& (!tag->predicate || tag->predicate (tagname)))
{
&& S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC
&& archive_format != POSIX_FORMAT
&& archive_format != USTAR_FORMAT
- && archive_format != GNU_FORMAT
- && archive_format != OLDGNU_FORMAT)
+ && archive_format != GNU_FORMAT)
{
negative = v < 0;
u = v;
/* Write a "private" header */
union block *
- start_private_header (const char *name, size_t size)
+ start_private_header (const char *name, size_t size, time_t t)
{
- time_t t;
union block *header = find_next_block ();
memset (header->buffer, 0, sizeof (union block));
tar_name_copy_str (header->header.name, name, NAME_FIELD_SIZE);
OFF_TO_CHARS (size, header->header.size);
- time (&t);
TIME_TO_CHARS (t, header->header.mtime);
MODE_TO_CHARS (S_IFREG|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH, header->header.mode);
UID_TO_CHARS (getuid (), header->header.uid);
union block *header;
char *tmpname;
- header = start_private_header ("././@LongLink", size);
- FILL(header->header.mtime, '0');
- FILL(header->header.mode, '0');
- FILL(header->header.uid, '0');
- FILL(header->header.gid, '0');
- FILL(header->header.devmajor, 0);
- FILL(header->header.devminor, 0);
+ header = start_private_header ("././@LongLink", size, time (NULL));
+ FILL (header->header.mtime, '0');
+ FILL (header->header.mode, '0');
+ FILL (header->header.uid, '0');
+ FILL (header->header.gid, '0');
+ FILL (header->header.devmajor, 0);
+ FILL (header->header.devminor, 0);
uid_to_uname (0, &tmpname);
UNAME_TO_CHARS (tmpname, header->header.uname);
free (tmpname);
{
size_t i;
- if (length > PREFIX_FIELD_SIZE)
+ if (length > PREFIX_FIELD_SIZE + 1)
length = PREFIX_FIELD_SIZE + 1;
+ else if (ISSLASH (name[length - 1]))
+ length--;
for (i = length - 1; i > 0; i--)
if (ISSLASH (name[i]))
break;
write_ustar_long_name (const char *name)
{
size_t length = strlen (name);
- size_t i;
+ size_t i, nlen;
union block *header;
-
+
if (length > PREFIX_FIELD_SIZE + NAME_FIELD_SIZE + 1)
{
ERROR ((0, 0, _("%s: file name is too long (max %d); not dumped"),
}
i = split_long_name (name, length);
- if (i == 0 || length - i - 1 > NAME_FIELD_SIZE)
+ if (i == 0 || (nlen = length - i - 1) > NAME_FIELD_SIZE || nlen == 0)
{
ERROR ((0, 0,
_("%s: file name is too long (cannot be split); not dumped"),
union block *header, hp;
char *p;
int type;
-
+ time_t t;
+
if (st->xhdr.buffer || st->xhdr.stk == NULL)
return old_header;
{
type = XGLTYPE;
p = xheader_ghdr_name ();
+ time (&t);
}
else
{
type = XHDTYPE;
p = xheader_xhdr_name (st);
+ t = st->stat.st_mtime;
}
- xheader_write (type, p, &st->xhdr);
+ xheader_write (type, p, t, &st->xhdr);
free (p);
header = find_next_block ();
memcpy (header, &hp.buffer, sizeof (hp.buffer));
return write_short_name (st);
}
else if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT)
- < strlen (st->file_name))
+ <= strlen (st->file_name))
return write_long_name (st);
else
return write_short_name (st);
&& header->header.typeflag != XHDTYPE
&& header->header.typeflag != XGLTYPE)
{
- /* These globals are parameters to print_header, sigh. */
-
- current_header = header;
+ /* FIXME: This global is used in print_header, sigh. */
current_format = archive_format;
- print_header (st, block_ordinal);
+ print_header (st, header, block_ordinal);
}
header = write_extended (false, st, header);
{
char buf[UINTMAX_STRSIZE_BOUND];
memset (blk->buffer + count, 0, bufsize - count);
- WARN ((0, 0,
- ngettext ("%s: File shrank by %s byte; padding with zeros",
- "%s: File shrank by %s bytes; padding with zeros",
- size_left),
- quotearg_colon (st->orig_file_name),
- STRINGIFY_BIGINT (size_left, buf)));
+ WARNOPT (WARN_FILE_SHRANK,
+ (0, 0,
+ ngettext ("%s: File shrank by %s byte; padding with zeros",
+ "%s: File shrank by %s bytes; padding with zeros",
+ size_left),
+ quotearg_colon (st->orig_file_name),
+ STRINGIFY_BIGINT (size_left, buf)));
if (! ignore_failed_read_option)
- exit_status = TAREXIT_DIFFERS;
+ set_exit_status (TAREXIT_DIFFERS);
pad_archive (size_left - (bufsize - count));
return dump_status_short;
}
\f
static void
dump_dir0 (char *directory,
- struct tar_stat_info *st, int top_level, dev_t parent_device)
+ struct tar_stat_info *st, bool top_level, dev_t parent_device)
{
dev_t our_device = st->stat.st_dev;
const char *tag_file_name;
-
- if (!is_avoided_name (st->orig_file_name))
- {
- union block *blk = NULL;
- off_t block_ordinal = current_block_ordinal ();
- st->stat.st_size = 0; /* force 0 size on dir */
+ union block *blk = NULL;
+ off_t block_ordinal = current_block_ordinal ();
- blk = start_header (st);
- if (!blk)
- return;
+ st->stat.st_size = 0; /* force 0 size on dir */
+
+ blk = start_header (st);
+ if (!blk)
+ return;
- if (incremental_option && archive_format != POSIX_FORMAT)
- blk->header.typeflag = GNUTYPE_DUMPDIR;
- else /* if (standard_option) */
- blk->header.typeflag = DIRTYPE;
+ if (incremental_option && archive_format != POSIX_FORMAT)
+ blk->header.typeflag = GNUTYPE_DUMPDIR;
+ else /* if (standard_option) */
+ blk->header.typeflag = DIRTYPE;
- /* If we're gnudumping, we aren't done yet so don't close it. */
+ /* If we're gnudumping, we aren't done yet so don't close it. */
- if (!incremental_option)
- finish_header (st, blk, block_ordinal);
- else if (gnu_list_name->dir_contents)
+ if (!incremental_option)
+ finish_header (st, blk, block_ordinal);
+ else if (gnu_list_name->directory)
+ {
+ if (archive_format == POSIX_FORMAT)
{
- if (archive_format == POSIX_FORMAT)
- {
- xheader_store ("GNU.dumpdir", st, gnu_list_name->dir_contents);
- finish_header (st, blk, block_ordinal);
- }
- else
+ xheader_store ("GNU.dumpdir", st,
+ safe_directory_contents (gnu_list_name->directory));
+ finish_header (st, blk, block_ordinal);
+ }
+ else
+ {
+ off_t size_left;
+ off_t totsize;
+ size_t bufsize;
+ ssize_t count;
+ const char *buffer, *p_buffer;
+
+ block_ordinal = current_block_ordinal ();
+ buffer = safe_directory_contents (gnu_list_name->directory);
+ totsize = dumpdir_size (buffer);
+ OFF_TO_CHARS (totsize, blk->header.size);
+ finish_header (st, blk, block_ordinal);
+ p_buffer = buffer;
+ size_left = totsize;
+
+ mv_begin (st);
+ mv_total_size (totsize);
+ while (size_left > 0)
{
- off_t size_left;
- off_t totsize;
- size_t bufsize;
- ssize_t count;
- const char *buffer, *p_buffer;
-
- block_ordinal = current_block_ordinal ();
- buffer = gnu_list_name->dir_contents;
- if (buffer)
- totsize = dumpdir_size (buffer);
- else
- totsize = 0;
- OFF_TO_CHARS (totsize, blk->header.size);
- finish_header (st, blk, block_ordinal);
- p_buffer = buffer;
- size_left = totsize;
-
- mv_begin (st);
- mv_total_size (totsize);
- while (size_left > 0)
+ mv_size_left (size_left);
+ blk = find_next_block ();
+ bufsize = available_space_after (blk);
+ if (size_left < bufsize)
{
- mv_size_left (size_left);
- blk = find_next_block ();
- bufsize = available_space_after (blk);
- if (size_left < bufsize)
- {
- bufsize = size_left;
- count = bufsize % BLOCKSIZE;
- if (count)
- memset (blk->buffer + size_left, 0, BLOCKSIZE - count);
- }
- memcpy (blk->buffer, p_buffer, bufsize);
- size_left -= bufsize;
- p_buffer += bufsize;
- set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
+ bufsize = size_left;
+ count = bufsize % BLOCKSIZE;
+ if (count)
+ memset (blk->buffer + size_left, 0, BLOCKSIZE - count);
}
- mv_end ();
+ memcpy (blk->buffer, p_buffer, bufsize);
+ size_left -= bufsize;
+ p_buffer += bufsize;
+ set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
}
- return;
+ mv_end ();
}
+ return;
}
if (!recursion_option)
&& parent_device != st->stat.st_dev)
{
if (verbose_option)
- WARN ((0, 0,
- _("%s: file is on a different filesystem; not dumped"),
- quotearg_colon (st->orig_file_name)));
+ WARNOPT (WARN_XDEV,
+ (0, 0,
+ _("%s: file is on a different filesystem; not dumped"),
+ quotearg_colon (st->orig_file_name)));
}
else
{
}
strcpy (name_buf + name_len, entry);
if (!excluded_name (name_buf))
- dump_file (name_buf, 0, our_device);
+ dump_file (name_buf, false, our_device);
}
free (name_buf);
name_buf = xmalloc (name_size);
strcpy (name_buf, st->orig_file_name);
strcat (name_buf, tag_file_name);
- dump_file (name_buf, 0, our_device);
+ dump_file (name_buf, false, our_device);
free (name_buf);
break;
}
static bool
- dump_dir (int fd, struct tar_stat_info *st, int top_level, dev_t parent_device)
+ dump_dir (int fd, struct tar_stat_info *st, bool top_level,
+ dev_t parent_device)
{
char *directory = fdsavedir (fd);
if (!directory)
void
create_archive (void)
{
- const char *p;
+ struct name const *p;
open_archive (ACCESS_WRITE);
buffer_write_global_xheader ();
collect_and_sort_names ();
while ((p = name_from_list ()) != NULL)
- if (!excluded_name (p))
- dump_file (p, -1, (dev_t) 0);
+ if (!excluded_name (p->name))
+ dump_file (p->name, p->cmdline, (dev_t) 0);
blank_name_list ();
while ((p = name_from_list ()) != NULL)
- if (!excluded_name (p))
+ if (!excluded_name (p->name))
{
- size_t plen = strlen (p);
+ size_t plen = strlen (p->name);
if (buffer_size <= plen)
{
while ((buffer_size *= 2) <= plen)
continue;
buffer = xrealloc (buffer, buffer_size);
}
- memcpy (buffer, p, plen);
+ memcpy (buffer, p->name, plen);
if (! ISSLASH (buffer[plen - 1]))
- buffer[plen++] = '/';
- q = gnu_list_name->dir_contents;
+ buffer[plen++] = DIRECTORY_SEPARATOR;
+ q = directory_contents (gnu_list_name->directory);
if (q)
while (*q)
{
buffer = xrealloc (buffer, buffer_size);
}
strcpy (buffer + plen, q + 1);
- dump_file (buffer, -1, (dev_t) 0);
+ dump_file (buffer, false, (dev_t) 0);
}
q += qlen + 1;
}
}
else
{
- while ((p = name_next (1)) != NULL)
- if (!excluded_name (p))
- dump_file (p, 1, (dev_t) 0);
+ const char *name;
+ while ((name = name_next (1)) != NULL)
+ if (!excluded_name (name))
+ dump_file (name, true, (dev_t) 0);
}
write_eot ();
close_archive ();
-
+ finish_deferred_unlinks ();
if (listed_incremental_option)
write_directory_file ();
}
static void
unknown_file_error (char const *p)
{
- WARN ((0, 0, _("%s: Unknown file type; file ignored"),
- quotearg_colon (p)));
+ WARNOPT (WARN_FILE_IGNORED,
+ (0, 0, _("%s: Unknown file type; file ignored"),
+ quotearg_colon (p)));
if (!ignore_failed_read_option)
- exit_status = TAREXIT_FAILURE;
+ set_exit_status (TAREXIT_FAILURE);
}
\f
block_ordinal = current_block_ordinal ();
assign_string (&st->link_name, link_name);
if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT)
- < strlen (link_name))
+ <= strlen (link_name))
write_long_link (st);
st->stat.st_size = 0;
blk->header.typeflag = LNKTYPE;
finish_header (st, blk, block_ordinal);
- if (remove_files_option && unlink (st->orig_file_name) != 0)
- unlink_error (st->orig_file_name);
+ if (remove_files_option)
+ queue_deferred_unlink (st->orig_file_name, false);
return true;
}
if (st->stat.st_nlink > 1)
{
struct link *duplicate;
- struct link *lp = xmalloc (offsetof (struct link, name)
- + strlen (st->orig_file_name) + 1);
+ char *linkname = NULL;
+ struct link *lp;
+
+ assign_string (&linkname, st->orig_file_name);
+ transform_name (&linkname, XFORM_LINK);
+
+ lp = xmalloc (offsetof (struct link, name)
+ + strlen (linkname) + 1);
lp->ino = st->stat.st_ino;
lp->dev = st->stat.st_dev;
lp->nlink = st->stat.st_nlink;
- strcpy (lp->name, st->orig_file_name);
-
+ strcpy (lp->name, linkname);
+ free (linkname);
+
if (! ((link_table
|| (link_table = hash_initialize (0, 0, hash_link,
compare_links, 0)))
&& (duplicate = hash_insert (link_table, lp))))
xalloc_die ();
-
+
if (duplicate != lp)
abort ();
lp->nlink--;
}
}
-
/* Dump a single file, recursing on directories. P is the file name
to dump. TOP_LEVEL tells whether this is a top-level call; zero
means no, positive means yes, and negative means the top level
static void
dump_file0 (struct tar_stat_info *st, const char *p,
- int top_level, dev_t parent_device)
+ bool top_level, dev_t parent_device)
{
union block *header;
char type;
if (deref_stat (dereference_option, p, &st->stat) != 0)
{
- stat_diag (p);
+ file_removed_diag (p, top_level, stat_diag);
return;
}
st->archive_file_size = original_size = st->stat.st_size;
/* See if we want only new files, and check if this one is too old to
put in the archive.
-
+
This check is omitted if incremental_option is set *and* the
requested file is not explicitely listed in the command line. */
-
+
if (!(incremental_option && !is_individual_file (p))
&& !S_ISDIR (st->stat.st_mode)
&& OLDER_TAR_STAT_TIME (*st, m)
&& (!after_date_option || OLDER_TAR_STAT_TIME (*st, c)))
{
if (!incremental_option && verbose_option)
- WARN ((0, 0, _("%s: file is unchanged; not dumped"),
- quotearg_colon (p)));
+ WARNOPT (WARN_FILE_UNCHANGED,
+ (0, 0, _("%s: file is unchanged; not dumped"),
+ quotearg_colon (p)));
return;
}
/* See if we are trying to dump the archive. */
if (sys_file_is_archive (st))
{
- WARN ((0, 0, _("%s: file is the archive; not dumped"),
- quotearg_colon (p)));
+ WARNOPT (WARN_IGNORE_ARCHIVE,
+ (0, 0, _("%s: file is the archive; not dumped"),
+ quotearg_colon (p)));
return;
}
- if (is_avoided_name (p))
- return;
-
is_dir = S_ISDIR (st->stat.st_mode) != 0;
if (!is_dir && dump_hard_link (st))
: 0)));
if (fd < 0)
{
- if (!top_level && errno == ENOENT)
- WARN ((0, 0, _("%s: File removed before we read it"),
- quotearg_colon (p)));
- else
- open_diag (p);
+ file_removed_diag (p, top_level, open_diag);
return;
}
}
{
exclusion_tag_warning (st->orig_file_name, tag_file_name,
_("directory not dumped"));
+ if (fd >= 0)
+ close (fd);
return;
}
: fstat (fd, &final_stat))
!= 0)
{
- stat_diag (p);
+ file_removed_diag (p, top_level, stat_diag);
ok = false;
}
}
&& !(remove_files_option && is_dir))
|| original_size < final_stat.st_size)
{
- WARN ((0, 0, _("%s: file changed as we read it"),
- quotearg_colon (p)));
- if (exit_status == TAREXIT_SUCCESS)
- exit_status = TAREXIT_DIFFERS;
+ WARNOPT (WARN_FILE_CHANGED,
+ (0, 0, _("%s: file changed as we read it"),
+ quotearg_colon (p)));
+ set_exit_status (TAREXIT_DIFFERS);
}
else if (atime_preserve_option == replace_atime_preserve
&& set_file_atime (fd, p, restore_times) != 0)
}
if (ok && remove_files_option)
- {
- if (is_dir)
- {
- if (rmdir (p) != 0 && errno != ENOTEMPTY)
- rmdir_error (p);
- }
- else
- {
- if (unlink (p) != 0)
- unlink_error (p);
- }
- }
+ queue_deferred_unlink (p, is_dir);
return;
}
size = readlink (p, buffer, linklen + 1);
if (size < 0)
{
- readlink_diag (p);
+ file_removed_diag (p, top_level, readlink_diag);
return;
}
buffer[size] = '\0';
/* nothing more to do to it */
if (remove_files_option)
- {
- if (unlink (p) == -1)
- unlink_error (p);
- }
+ queue_deferred_unlink (p, false);
+
file_count_links (st);
return;
}
type = FIFOTYPE;
else if (S_ISSOCK (st->stat.st_mode))
{
- WARN ((0, 0, _("%s: socket ignored"), quotearg_colon (p)));
+ WARNOPT (WARN_FILE_IGNORED,
+ (0, 0, _("%s: socket ignored"), quotearg_colon (p)));
return;
}
else if (S_ISDOOR (st->stat.st_mode))
{
- WARN ((0, 0, _("%s: door ignored"), quotearg_colon (p)));
+ WARNOPT (WARN_FILE_IGNORED,
+ (0, 0, _("%s: door ignored"), quotearg_colon (p)));
return;
}
else
finish_header (st, header, block_ordinal);
if (remove_files_option)
- {
- if (unlink (p) == -1)
- unlink_error (p);
- }
+ queue_deferred_unlink (p, false);
}
void
- dump_file (const char *p, int top_level, dev_t parent_device)
+ dump_file (const char *p, bool top_level, dev_t parent_device)
{
struct tar_stat_info st;
tar_stat_init (&st);
/* List a tar archive, with support routines for reading a tar archive.
Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000,
- 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2001, 2003, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
Written by John Gilmore, on 1985-08-26.
union block *recent_long_link; /* likewise, for long link */
size_t recent_long_name_blocks; /* number of blocks in recent_long_name */
size_t recent_long_link_blocks; /* likewise, for long link */
+ union block *recent_global_header; /* Recent global header block */
static uintmax_t from_header (const char *, size_t, const char *,
uintmax_t, uintmax_t, bool, bool);
prev_status = status;
tar_stat_destroy (¤t_stat_info);
- status = read_header (false);
+ status = read_header (¤t_header, ¤t_stat_info,
+ read_header_auto);
switch (status)
{
case HEADER_STILL_UNREAD:
{
char buf[UINTMAX_STRSIZE_BOUND];
- status = read_header (false);
+ status = read_header (¤t_header, ¤t_stat_info,
+ read_header_auto);
if (status == HEADER_ZERO_BLOCK)
break;
- WARN ((0, 0, _("A lone zero block at %s"),
- STRINGIFY_BIGINT (current_block_ordinal (), buf)));
+ /*
+ * According to POSIX tar specs, this is wrong, but on the web
+ * there are some tar specs that can trigger this, and some tar
+ * implementations create tars according to that spec. For now,
+ * let's not be pedantic about issuing the warning.
+ */
+#if 0
+ WARNOPT (WARN_ALONE_ZERO_BLOCK,
+ (0, 0, _("A lone zero block at %s"),
+ STRINGIFY_BIGINT (current_block_ordinal (), buf)));
+#endif
break;
}
status = prev_status;
list_archive (void)
{
off_t block_ordinal = current_block_ordinal ();
- /* Print the header block. */
+ /* Print the header block. */
+
decode_header (current_header, ¤t_stat_info, ¤t_format, 0);
if (verbose_option)
- print_header (¤t_stat_info, block_ordinal);
+ print_header (¤t_stat_info, current_header, block_ordinal);
if (incremental_option)
{
}
/* Read a block that's supposed to be a header block. Return its
- address in "current_header", and if it is good, the file's size
- and names (file name, link name) in *info.
+ address in *RETURN_BLOCK, and if it is good, the file's size
+ and names (file name, link name) in *INFO.
- Return 1 for success, 0 if the checksum is bad, EOF on eof, 2 for a
- block full of zeros (EOF marker).
+ Return one of enum read_header describing the status of the
+ operation.
- If RAW_EXTENDED_HEADERS is nonzero, do not automagically fold the
- GNU long name and link headers into later headers.
+ The MODE parameter instructs read_header what to do with special
+ header blocks, i.e.: extended POSIX, GNU long name or long link,
+ etc.:
- You must always set_next_block_after(current_header) to skip past
+ read_header_auto process them automatically,
+ read_header_x_raw when a special header is read, return
+ HEADER_SUCCESS_EXTENDED without actually
+ processing the header,
+ read_header_x_global when a POSIX global header is read,
+ decode it and return HEADER_SUCCESS_EXTENDED.
+
+ You must always set_next_block_after(*return_block) to skip past
the header which this routine reads. */
enum read_header
- read_header_primitive (bool raw_extended_headers, struct tar_stat_info *info)
+ read_header (union block **return_block, struct tar_stat_info *info,
+ enum read_header_mode mode)
{
union block *header;
union block *header_copy;
enum read_header status;
header = find_next_block ();
- current_header = header;
+ *return_block = header;
if (!header)
return HEADER_END_OF_FILE;
|| header->header.typeflag == XGLTYPE
|| header->header.typeflag == SOLARIS_XHDTYPE)
{
- if (raw_extended_headers)
+ if (mode == read_header_x_raw)
return HEADER_SUCCESS_EXTENDED;
else if (header->header.typeflag == GNUTYPE_LONGNAME
|| header->header.typeflag == GNUTYPE_LONGLINK)
else if (header->header.typeflag == XGLTYPE)
{
struct xheader xhdr;
+
+ if (!recent_global_header)
+ recent_global_header = xmalloc (sizeof *recent_global_header);
+ memcpy (recent_global_header, header,
+ sizeof *recent_global_header);
memset (&xhdr, 0, sizeof xhdr);
xheader_read (&xhdr, header,
OFF_FROM_HEADER (header->header.size));
xheader_decode_global (&xhdr);
xheader_destroy (&xhdr);
+ if (mode == read_header_x_global)
+ return HEADER_SUCCESS_EXTENDED;
}
/* Loop! */
else
{
char const *name;
- struct posix_header const *h = ¤t_header->header;
+ struct posix_header const *h = &header->header;
char namebuf[sizeof h->prefix + 1 + NAME_FIELD_SIZE + 1];
if (recent_long_name)
}
}
- enum read_header
- read_header (bool raw_extended_headers)
- {
- return read_header_primitive (raw_extended_headers, ¤t_stat_info);
- }
-
static char *
decode_xform (char *file_name, void *data)
{
enum archive_format *format_pointer, int do_user_group)
{
enum archive_format format;
-
+ unsigned hbits; /* high bits of the file mode. */
+ mode_t mode = MODE_FROM_HEADER (header->header.mode, &hbits);
+
if (strcmp (header->header.magic, TMAGIC) == 0)
{
if (header->star_header.prefix[130] == 0
format = USTAR_FORMAT;
}
else if (strcmp (header->header.magic, OLDGNU_MAGIC) == 0)
- format = OLDGNU_FORMAT;
+ format = hbits ? OLDGNU_FORMAT : GNU_FORMAT;
else
format = V7_FORMAT;
*format_pointer = format;
- stat_info->stat.st_mode = MODE_FROM_HEADER (header->header.mode);
+ stat_info->stat.st_mode = mode;
stat_info->mtime.tv_sec = TIME_FROM_HEADER (header->header.mtime);
stat_info->mtime.tv_nsec = 0;
assign_string (&stat_info->uname,
{
if (type && !silent)
ERROR ((0, 0,
- /* TRANSLATORS: %s is type of the value (gid_t, uid_t, etc.) */
+ /* TRANSLATORS: %s is type of the value (gid_t, uid_t,
+ etc.) */
_("Blanks in header where numeric %s value expected"),
type));
return -1;
(uintmax_t) TYPE_MAXIMUM (minor_t), false, false);
}
+ /* Convert P to the file mode, as understood by tar.
+ Store unrecognized mode bits (from 10th up) in HBITS. */
mode_t
- mode_from_header (const char *p, size_t s)
+ mode_from_header (const char *p, size_t s, unsigned *hbits)
{
- /* Do not complain about unrecognized mode bits. */
unsigned u = from_header (p, s, "mode_t",
- (uintmax_t) TYPE_MINIMUM (mode_t),
TYPE_MAXIMUM (uintmax_t), false, false);
- return ((u & TSUID ? S_ISUID : 0)
- | (u & TSGID ? S_ISGID : 0)
- | (u & TSVTX ? S_ISVTX : 0)
- | (u & TUREAD ? S_IRUSR : 0)
- | (u & TUWRITE ? S_IWUSR : 0)
- | (u & TUEXEC ? S_IXUSR : 0)
- | (u & TGREAD ? S_IRGRP : 0)
- | (u & TGWRITE ? S_IWGRP : 0)
- | (u & TGEXEC ? S_IXGRP : 0)
- | (u & TOREAD ? S_IROTH : 0)
- | (u & TOWRITE ? S_IWOTH : 0)
- | (u & TOEXEC ? S_IXOTH : 0));
+ mode_t mode = ((u & TSUID ? S_ISUID : 0)
+ | (u & TSGID ? S_ISGID : 0)
+ | (u & TSVTX ? S_ISVTX : 0)
+ | (u & TUREAD ? S_IRUSR : 0)
+ | (u & TUWRITE ? S_IWUSR : 0)
+ | (u & TUEXEC ? S_IXUSR : 0)
+ | (u & TGREAD ? S_IRGRP : 0)
+ | (u & TGWRITE ? S_IWGRP : 0)
+ | (u & TGEXEC ? S_IXGRP : 0)
+ | (u & TOREAD ? S_IROTH : 0)
+ | (u & TOWRITE ? S_IWOTH : 0)
+ | (u & TOEXEC ? S_IXOTH : 0));
+ *hbits = mode ^ u;
+ return mode;
}
off_t
they shouldn't. Unix tar is pretty random here anyway. */
- /* FIXME: Note that print_header uses the globals HEAD, HSTAT, and
- HEAD_STANDARD, which must be set up in advance. Not very clean.. */
-
/* Width of "user/group size", with initial value chosen
heuristically. This grows as needed, though this may cause some
stairstepping in the output. Make it too small and the output will
USGWIDTH, some stairstepping may occur. */
static int datewidth = sizeof "YYYY-MM-DD HH:MM" - 1;
- void
- print_header (struct tar_stat_info *st, off_t block_ordinal)
+ static bool volume_label_printed = false;
+
+ static void
+ simple_print_header (struct tar_stat_info *st, union block *blk,
+ off_t block_ordinal)
{
char modes[11];
char const *time_stamp;
int pad;
int sizelen;
- if (test_label_option && current_header->header.typeflag != GNUTYPE_VOLHDR)
- return;
-
if (show_transformed_names_option)
temp_name = st->file_name ? st->file_name : st->orig_file_name;
else
/* File type and modes. */
modes[0] = '?';
- switch (current_header->header.typeflag)
+ switch (blk->header.typeflag)
{
case GNUTYPE_VOLHDR:
+ volume_label_printed = true;
modes[0] = 'V';
break;
/* Try parsing it as an unsigned integer first, and as a
uid_t if that fails. This method can list positive user
ids that are too large to fit in a uid_t. */
- uintmax_t u = from_header (current_header->header.uid,
- sizeof current_header->header.uid, 0,
+ uintmax_t u = from_header (blk->header.uid,
+ sizeof blk->header.uid, 0,
(uintmax_t) 0,
(uintmax_t) TYPE_MAXIMUM (uintmax_t),
false, false);
else
{
sprintf (uform, "%ld",
- (long) UID_FROM_HEADER (current_header->header.uid));
+ (long) UID_FROM_HEADER (blk->header.uid));
user = uform;
}
}
/* Try parsing it as an unsigned integer first, and as a
gid_t if that fails. This method can list positive group
ids that are too large to fit in a gid_t. */
- uintmax_t g = from_header (current_header->header.gid,
- sizeof current_header->header.gid, 0,
+ uintmax_t g = from_header (blk->header.gid,
+ sizeof blk->header.gid, 0,
(uintmax_t) 0,
(uintmax_t) TYPE_MAXIMUM (uintmax_t),
false, false);
else
{
sprintf (gform, "%ld",
- (long) GID_FROM_HEADER (current_header->header.gid));
+ (long) GID_FROM_HEADER (blk->header.gid));
group = gform;
}
}
/* Format the file size or major/minor device numbers. */
- switch (current_header->header.typeflag)
+ switch (blk->header.typeflag)
{
case CHRTYPE:
case BLKTYPE:
fprintf (stdlis, " %s", quotearg (temp_name));
- switch (current_header->header.typeflag)
+ switch (blk->header.typeflag)
{
case SYMTYPE:
fprintf (stdlis, " -> %s\n", quotearg (st->link_name));
default:
{
char type_string[2];
- type_string[0] = current_header->header.typeflag;
+ type_string[0] = blk->header.typeflag;
type_string[1] = '\0';
fprintf (stdlis, _(" unknown file type %s\n"),
quote (type_string));
case GNUTYPE_MULTIVOL:
strcpy (size,
STRINGIFY_BIGINT
- (UINTMAX_FROM_HEADER (current_header->oldgnu_header.offset),
+ (UINTMAX_FROM_HEADER (blk->oldgnu_header.offset),
uintbuf));
fprintf (stdlis, _("--Continued at byte %s--\n"), size);
break;
fflush (stdlis);
}
+
+ void
+ print_volume_label ()
+ {
+ struct tar_stat_info vstat;
+ union block vblk;
+ enum archive_format dummy;
+
+ memset (&vblk, 0, sizeof (vblk));
+ vblk.header.typeflag = GNUTYPE_VOLHDR;
+ if (recent_global_header)
+ memcpy (vblk.header.mtime, recent_global_header->header.mtime,
+ sizeof vblk.header.mtime);
+ tar_stat_init (&vstat);
+ assign_string (&vstat.file_name, ".");
+ decode_header (&vblk, &vstat, &dummy, 0);
+ assign_string (&vstat.file_name, volume_label);
+ simple_print_header (&vstat, &vblk, 0);
+ tar_stat_destroy (&vstat);
+ }
+
+ void
+ print_header (struct tar_stat_info *st, union block *blk,
+ off_t block_ordinal)
+ {
+ if (current_format == POSIX_FORMAT && !volume_label_printed && volume_label)
+ {
+ print_volume_label ();
+ volume_label_printed = true;
+ }
+
+ simple_print_header (st, blk, block_ordinal);
+ }
+
/* Print a similar line when we make a directory automatically. */
void
print_for_mkdir (char *dirname, int length, mode_t mode)
mv_end ();
}
}
+
+ void
+ test_archive_label ()
+ {
+ base64_init ();
+ name_gather ();
+
+ open_archive (ACCESS_READ);
+ if (read_header (¤t_header, ¤t_stat_info, read_header_auto)
+ == HEADER_SUCCESS)
+ {
+ char *s = NULL;
+
+ decode_header (current_header,
+ ¤t_stat_info, ¤t_format, 0);
+ if (current_header->header.typeflag == GNUTYPE_VOLHDR)
+ assign_string (&volume_label, current_header->header.name);
+
+ if (volume_label
+ && (name_match (volume_label)
+ || (multi_volume_option
+ && (s = drop_volume_label_suffix (volume_label))
+ && name_match (s))))
+ if (verbose_option)
+ print_volume_label ();
+ free (s);
+ }
+ close_archive ();
+ names_notfound ();
+ }