Age | Commit message (Collapse) | Author |
|
|
|
A tar file created by toybox tar with values large enough to need
base-256 rather than ASCII octal caused a tar reader to crash, and
caused GNU tar to complain.
I note from the docs at
https://github.com/libarchive/libarchive/blob/master/libarchive/tar.5#L326
that they imply that only the top *bit* should be set to indicate this
format, not the whole top byte, to give a 95-bit or 63-bit field. But I
don't think we can hit that in practice?
Bug: http://issuetracker.google.com/181683612
|
|
|
|
This also changes the other compression options (such as -j) so that we
pass no arguments for compression and just -d for decompression, which
is what -I does to its filter and which appears sufficient. (I think I
used -dc before just out of habit, since that's what I've been typing on
the command line for decades.)
|
|
|
|
|
|
(Also fix -v output going to stderr when it shouldn't.)
|
|
|
|
|
|
Used by the Linux kernel build when copying kernel headers to
kernel-headers.tar.gz.
Bug: http://b/152244851
|
|
|
|
In case I'm not yet in the running for the most pedantic change of this
release, I think the "days of the week are written with initial capitals
in English" subset of this patch is a strong contender.
(Found via `toybox help -a | ispell -l | sort | uniq`.)
|
|
This only touches 24 of the 68 toys/posix/ files --- the others were
already canonical.
Potentially contentious, so worth stating explicitly, is that there
were 8 matches for "COMMAND..." amongst all existing help output,
with 7 matches for various inconsistent variants involving something
with "ARG", so I resolved that in favor of using "COMMAND..." (which
is also shorter overall, and avoids nested []s).
|
|
|
|
Clear the last byte of the allocated buffer.
|
|
|
|
but --restrict checking should run on the path up to the last component
before unlinking so tar can't be tricked into deleting random files off
the system.
|
|
|
|
|
|
The "gratuitous extra entry" is only gratuitous when there isn't a hole. (Which
we can detect and not include but then we wouldn't match other implementations.)
|
|
|
|
length of sparse files properly.
|
|
Used by build/make/tools/mktarball.sh in AOSP. (Which is why today's
switch to toybox tar got reverted.)
|
|
|
|
|
|
out of scope), but the AOSP build airlock doesn't provide bzcat and friends.
So tar needs to be able to use both: check for *zcat first, and fall back to
"compressor -d" if it's not there.
|
|
Found trying to build the aosp_cf_x86_phone-userdebug target. The good
news is that the targets that I knew were using tar with sparse files
all pass now.
|
|
|
|
|
|
|
|
There's no possible use for this, but debian's tar produces it, so...
|
|
And fix tar cv to produce output to stderr when archive going to stdout.
|
|
|
|
|
|
|
|
|
|
This is what GNU tar does, so Android's build system jail allows
bzip2, gzip, and xz, but not bzcat, zcat, and xzcat.
Why the function? Because auto-detection works by setting toyflags, so
we need to make sure we test the flags late, so it's either two copies
of this or a function.
|
|
There's probably more to do, but it seems usable at this point.
|