Denys Vlasenko
d29c946f93
fix trivial bug in unpack_gz_stream (wrong fd used in read)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:46:25 +01:00
Denys Vlasenko
b5d6ae9a33
Don't compile get_header_tar_FOO function if they are not needed
...
Now get_header_tar_gz, get_header_tar_bz2, get_header_tar_lzma
are only used if dpkg is built.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:34:23 +01:00
Denys Vlasenko
faac1d3e6e
tar,rpm2cpio: check that child decompressor did not error out
...
function old new delta
check_errors_in_children - 57 +57
tar_main 833 848 +15
get_header_tar 1720 1733 +13
rpm2cpio_main 147 140 -7
handle_SIGCHLD 41 - -41
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/1 up/down: 85/-48) Total: 37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:33:42 +01:00
Denys Vlasenko
02c3c38420
Move seamless .Z support into unpack_gz_stream
...
unpack_gz_stream 566 643 +77
unpack_gunzip 123 12 -111
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:32:06 +01:00
Denys Vlasenko
8a6a2f9c9c
update seamless uncompression code
...
This change makes "tar tf hello_world.txz" work without
adding special-casing for ".txz" extension. It also removes
ever-growing magic checking code in rpm2cpio and get_header_tar -
we reuse one which lives in setup_unzip_on_fd.
function old new delta
unpack_gz_stream 7 566 +559
check_signature16 - 70 +70
setup_unzip_on_fd 99 142 +43
handle_SIGCHLD - 41 +41
unpack_bz2_stream 342 376 +34
unzip_main 2352 2385 +33
bbunpack 503 533 +30
open_transformer 74 102 +28
unpack_Z_stream 1278 1304 +26
unpack_gunzip 101 123 +22
init_transformer_aux_data - 18 +18
unpack_xz_stream 2388 2402 +14
open_zipped 131 141 +10
rpm_main 1358 1363 +5
get_header_tar_lzma 52 57 +5
get_header_tar_bz2 52 57 +5
unpack_lzma_stream 2698 2702 +4
hash_find 234 233 -1
get_header_tar 1759 1733 -26
get_header_tar_gz 92 57 -35
unpack_uncompress 51 12 -39
rpm2cpio_main 201 147 -54
unpack_unxz 67 12 -55
unpack_bz2_stream_prime 55 - -55
get_header_tar_Z 86 - -86
unpack_gz_stream_with_info 539 - -539
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:27:48 +01:00
Denys Vlasenko
774bce8e8b
archival/libarchive/decompress_unzip.c -> decompress_gunzip.c. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:26:20 +01:00
Denys Vlasenko
59655077c5
preparatory cleanups for seamless uncompression improvements
...
unpack_gz_stream_with_info: fix buggy error check
man: fix possible accesses past the end of a string
move seamless uncompression helpers from read_printf.c to open_transformer.c
function old new delta
show_manpage 153 212 +59
unpack_gz_stream_with_info 520 539 +19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:23:50 +01:00
Denys Vlasenko
6111f967f5
tar: add support for PAX-encoded path=LONGFILENAME
...
function old new delta
get_header_tar 1478 1759 +281
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-23 13:45:18 +01:00
Denys Vlasenko
d6f5000c13
*: style fixes. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-15 12:39:25 +01:00
Denys Vlasenko
d2277e262f
nommu: fix cases where we mangle argv[0][0]
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-22 17:19:26 +01:00
Denys Vlasenko
c531b9a3e4
bzcat: fix unpacking of more than one file, and unpacking of zero-size bz2. Closes 4393
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-31 01:05:16 +01:00
Denys Vlasenko
f74f280a14
get_header_tar: shrink 6->64 sign extension code
...
function old new delta
getOctal 125 107 -18
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19 14:51:12 +02:00
Denys Vlasenko
d184a728cf
rename archive.h to bb_archive.h. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 12:45:14 +02:00
Denys Vlasenko
522041ee7b
regularize options which control size/speed trade
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-10 13:25:57 +02:00
Ian Wienand
c2a06db69d
gzip: new GZIP_BIG_MEM option
...
Enabling the config option on my standard linux box and zipping a
random 250mb file:
small mem: 21.85user 0.44system 0:22.35elapsed
big mem: 13.45user 0.46system 0:13.94elapsed
Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-09 20:19:35 +02:00
Denys Vlasenko
831756bac4
unzip: fflush stdout before reading interative y/n answer from stdin
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-09 17:30:55 +02:00
Denys Vlasenko
a04e4c2266
uncompress: die on read errors
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-22 04:59:41 +02:00
Denys Vlasenko
251fc70e97
uncompress: fix buffer underrun by corrupted input
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-18 14:29:41 +02:00
Denys Vlasenko
b47b3ce1bd
randomconfig fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-10 00:51:29 +02:00
Ian Wienand
954dbd3a00
tar: ignore file size (assume 0) for hardlinks
...
Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-29 08:33:47 +02:00
Denys Vlasenko
66426760be
*: remove "Options:" string from help texts
...
function old new delta
packed_usage 28706 28623 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Cristian Ionescu-Idbohrn
ea137aa931
warning removal
...
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-20 03:52:36 +02:00
Denys Vlasenko
60a9414cad
fix "variable 'foo' set but not used" warnings
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 20:57:01 +02:00
Denys Vlasenko
9180c6045e
tar: store negative mtime as 0; pack very large files using base-256 encoding
...
function old new delta
writeTarHeader 841 979 +138
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-04 21:14:12 +02:00
Marek Polacek
b0b8884009
Fix double words in comments. No code changes
...
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 17:33:43 +02:00
Pere Orga
1f4447b2d4
move help text from include/usage.src.h to archival/*.c
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 22:40:30 +02:00
Denys Vlasenko
681efe20d3
use user's shell instead of hardwired "/bin/sh" (android needs this)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 21:00:36 +01:00
Denys Vlasenko
b80acf58f1
tar: skip leading / and handle names like abc/..////def -> def (not ///def)
...
function old new delta
strip_unsafe_prefix - 105 +105
writeFileToTarball 557 520 -37
get_header_tar 1545 1462 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-02 01:21:02 +01:00
Denys Vlasenko
5e29e26388
tar: on extract, everything up to and including last ".." is stripped
...
function old new delta
get_header_tar 1493 1545 +52
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-01 17:21:07 +01:00
Denys Vlasenko
aef441cb4d
tar: fix a bug where autodetection messes up -z on extract
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-06 20:01:11 +01:00
Denys Vlasenko
3237f5c307
tar: support -T - and -X -
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 04:00:23 +01:00
Denys Vlasenko
b7c9fb27cb
whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
b5233f8556
tar: add -h and -T to help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-31 05:35:23 +01:00
Denys Vlasenko
b9f2d9f7d9
mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
df1689138e
remove a few aliasing warnings
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-16 01:25:34 +01:00
Denys Vlasenko
a116552869
tar: add a note about -C and symlink-in-tarball attack
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-04 08:46:26 +01:00
Denys Vlasenko
ed9b08d1c1
bzip2: plug memory leak on every processed file
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-30 04:43:35 +01:00
Denys Vlasenko
1f937d6468
cpio: allow cpio -i to take params - names of files to extract
...
Also, improve help text
function old new delta
packed_usage 28028 28035 +7
cpio_main 542 532 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-10) Total: -3 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-26 02:22:51 +01:00
Serj Kalichev
e4e911e712
modprobe: add support for --show-depends
...
function old new delta
modprobe_longopts - 16 +16
packed_usage 28018 28028 +10
modprobe_main 648 653 +5
do_modprobe 580 536 -44
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 31/-44) Total: -13 bytes
Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-26 01:56:19 +01:00
Denys Vlasenko
833d4e7f84
rename archival/libunarchive -> archival/libarchive; move bz/ into it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
5e9934028a
*: move lzo compressor code to archival/libunarchive/. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:27:49 +01:00
Denys Vlasenko
4d4d1a015f
whitespace fix
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-01 02:19:47 +01:00
Denys Vlasenko
8531c43b50
decompress_bunzip2: reinstate erroneously deleted RETVAL_SHORT_WRITE
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-01 01:38:54 +01:00
Denys Vlasenko
f16727ebbb
decompress_bunzip2: code shrink ~5 bytes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-30 00:55:02 +02:00
Denys Vlasenko
0c576975c8
decompress_bunzip2: code shrink ~10 bytes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-30 00:54:10 +02:00
Denys Vlasenko
5d49b72f1a
decompress_bunzip2: add profiling data to comment. no code changes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 19:26:38 +02:00
Denys Vlasenko
1014a9adbf
decompress_bunzip2: relieve register pressure in hot function read_bunzip
...
function old new delta
unpack_bz2_stream 318 329 +11
read_bunzip 268 262 -6
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 19:01:58 +02:00
Denys Vlasenko
bf3bec51fc
decompress_bunzip2: keep bd->writeCRC in CPU reg in the hot loop
...
-5 bytes on 64-bit, +7 bytes on 32-bit.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 18:16:29 +02:00
Denys Vlasenko
36ef0a677e
decompress_bunzip2: code shrink
...
function old new delta
get_next_block 1828 1827 -1
get_bits 164 156 -8
read_bunzip 304 261 -43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52) Total: -52 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 16:05:05 +02:00
Denys Vlasenko
fb132e4737
whitespace cleanup
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00