characters. Use quad conversion functions rather then long conversion
where appropriate to handle the available range. Mainly fixes time_t
but there was also a st_size ulong conversion in there that has to be
quad or cpio cannot be used to copy files > 2G.
MFC after: 1 day
are:
* Implement cpio compatibility mode when pax is invoked as cpio
* Extend tar compatibility mode to cover many of the GNU tar single-letter
options (bzip2 mode, aka -y/-j is not present in OpenBSD). When
invoked as tar, pax is now full-featured enough for use by the ports
collection to extract distfiles and create packages.
* Many bug fixes to the operation of pax and the tar compatibility modes
* Code fixes for things like correct string buffer termination.
I tried to preserve existing FreeBSD fixes to this utility; please let me
know if I have inadvertently spammed something.
and compress) to pax when used in tar mode (invoked as 'tar') for
compatibility with GNU tar.
bzip2 functionality for further GNU tar compatibility will be added at a
later date.
Note in the manpage that -z is non-standard.
Obtained from: OpenBSD
Reviewed by: -hackers
MFC after: 2 weeks
: LC_TIME This variable shall determine the format and
: contents of date and time strings when the -v
: option is specified.
Developers took this wrong. LC_TIME specifies the locale
name, not the ``format'' argument of strftime().
Oops:
pax -w -f /tmp/foo /dev/null
LC_TIME=de_DE.ISO_8859-1 pax -v -f /tmp/foo
pattern matches will occur at offset zero of the source string. The bug causes
the input source string pointer to be incremented by the offset of the end of
the match, instead of it's length. The fix is to only increment the pointer by
the length of the pattern match (eo-so).
Of course, the one example in the man page shows a situation where the match
occurs at offset 0.
Submitted by: John W. DeBoskey <jwd@unx.sas.com>
Obtained from: freebsd-current@freebsd.org
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
oo
Turns out, it's pretty important if you use PAX for backup. In the man
page for PAX, there is an error (OK, we could call it a "potentially
catastrophic incompleteness"). It reads:
> The command:
>
> pax -r -v -f filename
>
> gives the verbose table of contents for an archive stored in filename.
Yup, it does do that. With a side effect: it also _replaces_ all the
files that come in from the archive. As is my custom, I did my
backup-validation real soon after the backup was written. Precisely
because I've seen the same sort of thing happen on other systems. So all
that file-restoring didn't do a lot of damage. Probably helped my
fragmentation somewhat (aha, an online defragger?) It did confuse one
hapless user, who lost an email message he _knew_ he hadn't deleted.
Apparently the system restored the file as of just before that critical
message came in.
The correct entry should read:
> The command:
>
> pax -v -f filename
>
> gives the verbose table of contents for an archive stored in filename.
Submitted by: John Beckett <jbeckett@southern.edu> via the BSDI mailing list
cpio/copyout.c:
Don't output a file if the major, minor or totality of its rdev would be
truncated. Print a message about the skipped files to stderr but don't
report the error in the exit status. cpio's abysmal error handling doesn't
allow continuing after an error, and the rdev checks had to be misplaced
to avoid the problem of returning an error code from routines that return
void.
pax/pax.h:
Use the system macros for major(), minor() and makedev().
pax already checks _all_ output conversions for overflow. This has the
undesirable effect that failure to convert relatively useless fields
such as st_dev for regular files causes files not to be output. pax
doesn't report exactly which fields couldn't be converted.
tar/create.c:
Don't output a file if the major or minor its rdev would be truncated.
Print a message about the skipped files to stderr and report the error
in the exit status.
tar/tar.c:
For not immediately fatal errors, exit with status 1, not the error count
(mod 256).
All:
Minor numbers are limited to 21 bits in pax's ustar format and to 18
bits in archives created by gnu tar (gnu tar wastes 3 bits for padding).
pax's and cpio's ustar format is incompatible with gnu tar's ustar
format for other reasons (see cpio/README).
/usr/src/bin. Note that some patches are still needed in that directory.
I (Joerg) finished most of Philippe's cleanup. /bin/sh will still
need *allot* of work, however.
Submitted by: charnier@lirmm.fr (Philippe Charnier)