summaryrefslogtreecommitdiff
path: root/archival/tar.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '1_23_0' into mergeTIG_1_23_0Ron Yorston2015-01-231-5/+3
|\ | | | | | | | | Conflicts: libbb/lineedit.c
| * randomconfig fixesDenys Vlasenko2014-12-221-5/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-12-141-40/+30
|\| | | | | | | | | | | | | Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
| * tar: fix "tar -cJ" ignoring -J option. closes 7706Denys Vlasenko2014-12-111-38/+28
| | | | | | | | | | | | | | | | | | function old new delta tar_main 895 938 +43 vfork_compressor 206 191 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 43/-15) Total: 28 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: add capability to unpack to mem.bufferDenys Vlasenko2014-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance and number of processes for a "depmod -a" with gzipped modules was abysmal. This patch adds a code path without fork, benefiting all users of xmalloc_open_zipped_read_close. "modinfo radeon.ko.gz", a single-file reader, got 30% faster. "depmod -a", which used to fork over 800 times, got 20% faster. Heavily based on a patch by Lauri Kasanen <curaga@operamail.com> function old new delta setup_transformer_on_fd - 159 +159 transformer_write - 122 +122 fork_transformer - 112 +112 xmalloc_open_zipped_read_close 63 118 +55 read_bunzip 1866 1896 +30 xtransformer_write - 19 +19 unzip_main 2449 2462 +13 bbunpack 755 766 +11 unpack_lzma_stream 2717 2723 +6 unpack_xz_stream 2393 2397 +4 unpack_Z_stream 1173 1175 +2 inflate_unzip 111 105 -6 check_signature16 70 63 -7 unpack_bz2_stream 359 349 -10 unpack_unxz 12 - -12 unpack_unlzma 12 - -12 unpack_uncompress 12 - -12 unpack_gunzip 12 - -12 unpack_bunzip2 12 - -12 open_transformer 106 92 -14 inflate_unzip_internal 1945 1916 -29 unpack_gz_stream 693 655 -38 open_zipped 89 47 -42 setup_unzip_on_fd 142 53 -89 ------------------------------------------------------------------------------ (add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295) Total: 238 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rename transformer_aux_data_t -> transformer_state_tDenys Vlasenko2014-12-071-1/+1
| | | | | | | | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Move definition of bb_got_signal to mingw.cRon Yorston2014-11-291-4/+0
| | | | | | | | | | On POSIX platforms bb_got_signal is defined in libbb/signals.c; for MinGW put the definition in win32/mingw.c. This is better than the
* | Merge branch 'busybox' into mergeRon Yorston2014-03-111-1/+1
|\|
| * zcat: complain if input is not compressedDenys Vlasenko2014-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta buffer_fill_and_print 178 191 +13 varvalue 735 743 +8 bbunpack 747 755 +8 open_zipped 85 89 +4 xmalloc_open_zipped_read_close 61 63 +2 get_addr_1 240 242 +2 fbsplash_main 1228 1230 +2 pstree_main 322 321 -1 builtin_type 121 119 -2 do_load 954 926 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Define bb_got_signal for use in tar on mingw32Ron Yorston2014-01-021-0/+4
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-021-4/+113
|\| | | | | | | | | | | Conflicts: archival/Config.src shell/ash.c
| * tar: prevent empty file to be treated as valid tarballDenys Vlasenko2013-11-191-3/+10
| | | | | | | | | | | | | | function old new delta tar_main 879 895 +16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival/*: move "config:" snippets into .c filesDenys Vlasenko2013-11-141-1/+100
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival/*: move "applet:" snippets into .c filesDenys Vlasenko2013-11-141-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * archival/*: move "kbuild:" snippets into .c filesDenys Vlasenko2013-11-141-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-08-271-4/+2
|\|
| * tar: fix tar -T to add entries in the exact order as the input listSASAKI Suguru2013-08-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes tar to order files in tarball correctly in this case: $ touch 1 2 3; echo -e '1\n2\n3' | tar -T- -c | tar t 1 2 3 Signed-off-by: SASAKI Suguru <suguru@sonik.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: change execl sentinels from NULL to (char*)0Rich Felker2013-06-301-1/+1
| | | | | | | | | | Signed-off-by: Rich Felker <dalias@aerifal.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-02-071-7/+7
|\|
| * whitespace fixes. no code changesDenys Vlasenko2013-01-141-7/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-09-071-9/+27
|\| | | | | | | | | | | Conflicts: include/libbb.h shell/ash.c
| * tar: support -J, --xz explicit compression optionBoris Reisig2012-05-241-2/+15
| | | | | | | | | | | | | | | | | | | | function old new delta tar_main 868 881 +13 tar_longopts 285 290 +5 packed_usage 29267 29270 +3 Signed-off-by: Boris Reisig <boris@boris.ca> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: implement --no-recursionNatanael Copa2012-05-181-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta tar_longopts 259 274 +15 .rodata 5757 5772 +15 tar_main 1038 1052 +14 writeTarFile 362 353 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 44/-9) Total: 35 bytes text data bss dec hex filename 81457 1706 8344 91507 16573 busybox_old 81477 1706 8344 91527 16587 busybox_unstripped Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: remove seamless compression from default configRon Yorston2012-04-291-2/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2012-03-231-67/+36
|\| | | | | | | | | Conflicts: Makefile.flags
| * tar,rpm2cpio: check that child decompressor did not error outDenys Vlasenko2012-03-061-31/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * update seamless uncompression codeDenys Vlasenko2012-03-061-40/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into mergeRon Yorston2012-03-231-1/+1
|\| | | | | | | | | | | Conflicts: Makefile.flags scripts/basic/fixdep.c
| * rename archive.h to bb_archive.h. no code changesDenys Vlasenko2011-09-221-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'd84b175cb6948eb17f847313bf912174e2f934e1' into mergeRon Yorston2012-03-221-1/+1
|\| | | | | | | | | Conflicts: include/platform.h
| * randomconfig fixesDenys Vlasenko2011-08-101-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into mergeRon Yorston2012-03-221-1/+0
|\| | | | | | | | | Conflicts: procps/ps.c
| * *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | | | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '56a3b82e9692a25ef9c9269e88feac0d579ce8e8' into mergeRon Yorston2012-03-221-4/+32
|\| | | | | | | | | | | | | Conflicts: coreutils/ls.c include/platform.h libbb/bb_basename.c
| * tar: store negative mtime as 0; pack very large files using base-256 encodingDenys Vlasenko2011-05-041-4/+32
| | | | | | | | | | | | | | function old new delta writeTarHeader 841 979 +138 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '19311bfa7b8e8c6effa9c375de9b0eb4338bee12' into mergeRon Yorston2012-03-221-11/+3
|\| | | | | | | | | | | Conflicts: coreutils/ls.c shell/ash.c
| * use user's shell instead of hardwired "/bin/sh" (android needs this)Denys Vlasenko2011-03-081-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: skip leading / and handle names like abc/..////def -> def (not ///def)Denys Vlasenko2011-03-021-11/+2
| | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'da4441c44f6efccb6f7b7588404d9c6bfb7b6af8' into mergeRon Yorston2012-03-221-11/+18
|\| | | | | | | | | | | | | Conflicts: libbb/vfork_daemon_rexec.c networking/wget.c procps/ps.c
| * tar: fix a bug where autodetection messes up -z on extractDenys Vlasenko2011-02-061-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: support -T - and -X -Denys Vlasenko2011-02-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: add -h and -T to help textDenys Vlasenko2011-01-311-8/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge remote-tracking branch 'upstream/master'Nguyễn Thái Ngọc Duy2011-01-041-2/+20
|\|
| * tar: add a note about -C and symlink-in-tarball attackDenys Vlasenko2011-01-041-0/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modprobe: add support for --show-dependsSerj Kalichev2010-12-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * rename archival/libunarchive -> archival/libarchive; move bz/ into itDenys Vlasenko2010-11-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: tar: do not check for archiving the target archive itselfNguyễn Thái Ngọc Duy2010-09-201-0/+2
|/ | | | | | While it is generally a good thing to do, st_dev and st_ino on Windows is unreliable (i.e. always zero). This makes tar think every file is the archive it is creating, thus refuse to add them to the archive.
* libbb: add xfstat functionDenys Vlasenko2010-08-311-2/+1
| | | | | | | | | | | | | | | | function old new delta xfstat - 25 +25 mkfs_ext2_main 2421 2423 +2 mkfs_reiser_main 1197 1194 -3 next 312 307 -5 ar_main 533 522 -11 mkfs_minix_main 2938 2924 -14 mkfs_vfat_main 1511 1495 -16 writeTarFile 272 255 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66) Total: -39 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-2/+2
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixesDenys Vlasenko2010-07-061-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>