Commit Graph

268 Commits

Author SHA1 Message Date
christos 5820cbfaf6 Welcome to WARNS=3 2004-05-11 17:12:26 +00:00
grant 4fc8c484c7 - remove an extraneous word
- it's "backward compatibility" not "backwards compatibility"
2004-05-04 13:20:46 +00:00
grant dced68e86f --unlink is the default, the argument is ignored and only accepted for
compatibility with other tar(1) implementations.
2004-05-04 13:13:01 +00:00
christos 69c89ea8a0 Don't exit with 1 on broken archives that mark directories as files for
the benefit of pkgsrc. I would have prefered that people fixed their
archivers instead.
2004-05-03 02:22:54 +00:00
matt 5864f65684 Set the chflags *after* the rename, not before. 2004-04-30 05:14:23 +00:00
christos 78b5033e6d PR/25350: Alan Barrett: Treat the sticky bit specially as non-superusers
cannot set it on non-directories (elvis-2.2_0 extraction failed)
2004-04-27 13:45:45 +00:00
christos 04d1f5de72 PR/25188: Thomas Klausner: pax-as-tar problem with trailing slashes
The problem is with the program that generates the tar file:
-rwxrwxrwx  1 root     wheel          0 Feb  8 16:46 faad2/aacDECdrop/
It creates directory nodes without the 'd' bit set, so that pax thinks
they are files and does the temporary name and dance with them. Added
code to detect this condition, warn about it, and work around it.
2004-04-25 16:20:24 +00:00
christos 57c1f1cfd7 PR/25299: grant beattie: 1.5.3/i386 kernel set archives confuse -current pax
PR/25310: Juan RP: tar can't unpack MS-DOS gzip files correctly
2004-04-25 15:52:30 +00:00
christos af4f4c568a PR/25207: Hubert Feyrer: tar cores on certain archive contents
Don't forget to cleanup xtmp_name when we fail to create the temporary file.
2004-04-20 20:00:37 +00:00
christos 1f747cc909 PR/25207: Hubert Feyrer: tar cores on certain archive contents
- On ustar archives with a specified prefix directory, arcn->nlen was not
computed properly.
- While I am here cast some snprintf's() to void.
2004-04-20 19:59:54 +00:00
christos 7fb1726a27 remove misplaced semi-colons. 2004-04-16 22:46:28 +00:00
christos 25afd895c0 PR/25200: Alan Barrett: bug in pax append mode. This problem was introduced
while trying to fix the tar append mode. Restore the correct 2 null blocks
at the end of file, and disable the old bug compatible mode for gnutar.
2004-04-16 22:45:56 +00:00
mrg fa97f05587 fix bugs in the previous. use snprintf(). fixes the problem reported
in PR#25131.
2004-04-12 14:41:09 +00:00
keihan 27b3f59c96 Revert last, revision 1.46. 2004-04-02 12:53:05 +00:00
keihan 6898598891 ".../newdir" --> "../newdir" 2004-04-02 11:14:24 +00:00
mrg 0ade019d3f redo GNU tar --exclude emulation to actually work the same. unfortunately,
because alternation (|) isn't available in "pax -s" RE's, we have to pass
four (yes 4!) different patterns:
	.*\/<pattern>$
	.*\/<pattern>\/.*
	^<pattern>$
	^<pattern>\/.*
instead of the more elegant
	(^|.*\/)<pattern>($|\/.*)

fixes a problem reported by simonb.
2004-04-01 14:54:39 +00:00
uebayasi d59e9104ff Tar(1)'s -s option needs an argument. Correct option string (s -> s:).
Reported and tested by Tomoaki Imamura.
2004-02-20 05:16:54 +00:00
snj 4aff9cba1e s/nonmathing/nonmatching/ 2004-02-13 23:25:01 +00:00
matt 8fbcc555cf When pax catches a signal and cleans up, make sure to remove any temporary
file that was being extracted to.  This will prevent pax from leaving
droppings when you hit ^C.
2004-02-13 23:10:14 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
matt 1106d0b028 Nuke extra mkstemp. Use name, not tmp_name with chk_path. 2004-02-13 08:27:12 +00:00
matt b2e2f282bd Back out last change. Since the name is the entire path, prefixing it
with a '.' will not have the desired effect.
2004-02-13 00:11:30 +00:00
matt 272d78cb06 When creating the temporary file, prefix the name with a '.' 2004-02-13 00:07:55 +00:00
matt 99b5d86a5f When restoring files from an archive, initially restore to a temp-file and
once it has been instantiated correctly, rename it to desired name.  This
prevents the problem of partially created files being accessed before they
are complete.  If said file is a shared library, that can cause ramdon core
dumps.
2004-02-12 22:19:18 +00:00
christos e7827bbe92 recognize -k [--keep-old-files] short option. From hubertf. 2004-02-06 18:59:14 +00:00
christos 92ffc695bf While the comment is not correct anymore, this fixes the problem of tar -rf
where tar would skip backwards too much, corrupting the current tar archive
on append.
2004-01-30 20:46:12 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
jmmv b9173dc41c Rewrite the loop in printflg(): if passing -Z to pax with syntax errors
(like executing "pax -Z" by itself), this caused a shr of 32 bits, which is
undefined behavior (C99) if the variable is 32 bits wide, too.  Also solves
a problem where the flgch array could be indexed out of bounds.

Thanks to uwe@ and lha@ for their suggestions... I just found the bug :p
2004-01-05 17:27:46 +00:00
matt 2d72f72583 Don't emit any warnings when tar is trying to figure out if the file is
really tar format.  valid CPIO files should not trigger a warning from tar.c
2003-11-24 23:48:47 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
fvdl cf96462927 Don't pass an integer as NULL. 2003-10-21 02:08:14 +00:00
agc ed6ed8e698 Move Keith Muller's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22397 by Joel Baker, confirmed
to the board by Keith Muller.
2003-10-13 07:41:22 +00:00
grant 0faf575771 wait for compression program to finish before exiting.
fix races condition resulting in a zero length archive after pax
exits.

patch from OpenBSD, provided by Joerg Sonnenberger in PR bin/22740.
2003-09-18 09:18:24 +00:00
agc b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
mrg 2512e501f0 note -z is an extention. 2003-07-19 05:43:54 +00:00
lukem 82541d904a doc2html works here now, so remove NOHTML=
(not that it worked here, because NOHTML= was provided *after* <bsd.own.mk>...)
2003-07-18 02:18:49 +00:00
wiz b65146bf4a Bump date for -O change. 2003-07-09 14:42:16 +00:00
simonb 1301238ab7 Add support for gnutar's -O "extract to stdout" option. 2003-07-08 06:00:48 +00:00
christos d1a05abed1 Revert previous change, and fix the -T problem differently: When the options
of the second argument are exhausted, call the appropriate getopt() routine
to process the rest of the arguments instead of finishing option processing.
Fixes:
	tar cf - -T foo
2003-06-24 16:23:31 +00:00
grant a47ed375c9 backout previous; it was a missing prototype elsewhere.
noted by mrg.
2003-06-24 08:27:30 +00:00
grant 8560ab3c2b add cast to fix an integer -> pointer warning. 2003-06-24 06:41:51 +00:00
grant d884498b98 no need for HAVE_LCHOWN and HAVE_LCHMOD anymore. 2003-06-23 13:33:15 +00:00
christos 051ff2c46c Simplify the way we deal with old argument style. Old way was broken when
tar cf - -T dir
2003-06-23 13:15:15 +00:00
christos 6ebfa08f43 spelling 2003-06-23 13:14:43 +00:00
grant 9432809ee1 consistently use "cannot" instead of "can not". 2003-06-23 13:06:53 +00:00
lukem 826a14607a Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
lukem 17887a5d2c #ifdef HOSTPROG then explicitly use {major,minor,makedev}_netbsd
macros from pack_dev.h instead of the native versions.
Fixes [toolchain/20051] by Valeriy E. Ushakov.
2003-05-09 01:09:13 +00:00
itojun f703f13276 use sizeof for safety 2003-05-09 00:56:56 +00:00
wiz dcc13ddb7d Some grammar and punctuation fixes from jmc@openbsd. 2003-05-01 13:50:58 +00:00
christos d0fa76e947 PR/21253: Manuel Bouyer: cpio should never descend on a directory; even on
the first one.
2003-04-21 22:10:10 +00:00