mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
gtar uses -F for another purpose, so bsdtar no longer treats it as a
synonym for --format. Update the man page to reflect this. While I'm here, change the man page to document "tar" rather than "bsdtar," update some comments about -l compatibility and fix a few grammar nits.
This commit is contained in:
parent
e383b24041
commit
b757c8251b
3 changed files with 18 additions and 20 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PROG= bsdtar
|
||||
VERSION= 1.01
|
||||
VERSION= 1.01.011
|
||||
SRCS= bsdtar.c matching.c read.c util.c write.c
|
||||
WARNS?= 6
|
||||
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
.Dt BSDTAR 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm bsdtar
|
||||
.Nm tar
|
||||
.Nd manipulate tape archives
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
|
|
@ -123,7 +123,7 @@ In contrast,
|
|||
.Dl Nm Fl c Fl f Pa - Pa newfile Pa original.tar
|
||||
creates a new archive with only two entries.
|
||||
Similarly,
|
||||
.Dl Nm Fl czf Pa - Fl F Cm pax Cm @ Ns Pa -
|
||||
.Dl Nm Fl czf Pa - Fl -format Cm pax Cm @ Ns Pa -
|
||||
reads an archive from standard input (whose format will be determined
|
||||
automatically) and converts it into a gzip-compressed
|
||||
pax-format archive on stdout.
|
||||
|
|
@ -148,7 +148,7 @@ Do not process files or directories that match the
|
|||
specified pattern.
|
||||
Note that exclusions take precedence over patterns or filenames
|
||||
specified on the command line.
|
||||
.It Fl F Ar format
|
||||
.It Fl -format Ar format ( Fl W Cm format Ns = Ns Ar format )
|
||||
(c mode only)
|
||||
Use the specified format for the created archive.
|
||||
Supported formats include
|
||||
|
|
@ -480,9 +480,9 @@ are available to improve compatibility with other tar implementations.
|
|||
.Sh SECURITY
|
||||
Certain security issues are common to many archiving programs, including
|
||||
.Nm .
|
||||
In particular, carefully-crafted archives can request
|
||||
In particular, carefully-crafted archives can request that
|
||||
.Nm
|
||||
to extract files to locations outside of the target directory.
|
||||
extract files to locations outside of the target directory.
|
||||
This can potentially be used to cause unwitting users to overwrite
|
||||
files they did not intend to overwrite.
|
||||
If the archive is being extracted by the superuser, any file
|
||||
|
|
@ -576,17 +576,13 @@ The ustar and pax interchange file formats are defined by
|
|||
.St -p1003.1-2001
|
||||
for the pax command.
|
||||
.Sh BUGS
|
||||
The
|
||||
POSIX and GNU violently disagree about the meaning of the
|
||||
.Fl l
|
||||
and
|
||||
.Fl o
|
||||
options follow POSIX.
|
||||
GNU tar's
|
||||
option.
|
||||
Because of the potential for disaster if someone expects
|
||||
one behavior and gets the other, the
|
||||
.Fl l
|
||||
and
|
||||
.Fl o
|
||||
options do not.
|
||||
(This is, of course, a bug in GNU tar and not bsdtar.)
|
||||
option is deliberately broken in this implementation.
|
||||
.Pp
|
||||
The
|
||||
.Fl C Pa dir
|
||||
|
|
@ -619,7 +615,7 @@ and that generated by
|
|||
.Dl Nm Fl cf Pa - file | Nm gzip
|
||||
.Pp
|
||||
The default should be to read and write archives to the standard I/O paths,
|
||||
but tradition dictates otherwise.
|
||||
but tradition (and POSIX) dictates otherwise.
|
||||
.Pp
|
||||
The
|
||||
.Cm r
|
||||
|
|
@ -655,7 +651,8 @@ option is specified.
|
|||
There needs to be better support for file selection on both create
|
||||
and extract.
|
||||
.Pp
|
||||
There is not yet any support for multi-volume archives or sparse files.
|
||||
There is not yet any support for multi-volume archives or for archiving
|
||||
sparse files.
|
||||
.Pp
|
||||
Converting between dissimilar archive formats (such as tar and cpio) using the
|
||||
.Cm @ Ns Pa -
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ static const char *tar_opts = "+Bb:C:cF:f:HhjkLlmnOoPprtT:UuvW:wX:xyZz";
|
|||
#define OPTION_CHECK_LINKS 3
|
||||
#define OPTION_EXCLUDE 6
|
||||
#define OPTION_FAST_READ 9
|
||||
#define OPTION_FORMAT 10
|
||||
#define OPTION_HELP 12
|
||||
#define OPTION_INCLUDE 15
|
||||
#define OPTION_NODUMP 18
|
||||
|
|
@ -137,7 +138,7 @@ static const struct option tar_longopts[] = {
|
|||
{ "extract", no_argument, NULL, 'x' },
|
||||
{ "fast-read", no_argument, NULL, OPTION_FAST_READ },
|
||||
{ "file", required_argument, NULL, 'f' },
|
||||
{ "format", required_argument, NULL, 'F' },
|
||||
{ "format", required_argument, NULL, OPTION_FORMAT },
|
||||
{ "gunzip", no_argument, NULL, 'z' },
|
||||
{ "gzip", no_argument, NULL, 'z' },
|
||||
{ "help", no_argument, NULL, OPTION_HELP },
|
||||
|
|
@ -249,7 +250,7 @@ main(int argc, char **argv)
|
|||
bsdtar_errc(bsdtar, 1, 0,
|
||||
"Couldn't exclude %s\n", optarg);
|
||||
break;
|
||||
case 'F':
|
||||
case OPTION_FORMAT:
|
||||
bsdtar->create_format = optarg;
|
||||
break;
|
||||
case 'f': /* SUSv2 */
|
||||
|
|
@ -652,7 +653,7 @@ static const char *long_help_msg =
|
|||
"Create: %p -c [options] [<file> | <dir> | @<archive> | -C <dir> ]\n"
|
||||
" <file>, <dir> add these items to archive\n"
|
||||
" -z, -j Compress archive with gzip/bzip2\n"
|
||||
" -F {ustar|pax|cpio|shar} Select archive format\n"
|
||||
" --format {ustar|pax|cpio|shar} Select archive format\n"
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
" --exclude <pattern> Skip files that match pattern\n"
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue