aboutsummaryrefslogtreecommitdiff
path: root/archival (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | win32: stat(2) succeeds if fetching extra metadata failsRon Yorston2019-02-191-3/+5
| | | | | | | | | | | | | | | | | | Some files can't be opened to fetch additional metadata. When that happens allow stat(2) to successfully return what data it has. In a few cases where the inode number is used to determine if files are identical ignore invalid inode numbers.
* | win32: make stat(2) fetch additional metadataRon Yorston2019-02-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the WIN32 implementation of stat(2) to fetch inode number, device id and number of hardlinks. This requires opening a handle to the target file so it will be slower. A number of features can be enabled or start to work: - tar can detect if an archive is being stored in itself; - find can support the -inum and -links options; - ls can display inode numbers; - diff can detect attempts to compare a file with itself; - du has better support for hardlinked files; - cp can detect attempts to copy a file over itself.
* | libarchive: remove more symlink codeRon Yorston2019-02-142-4/+6
| | | | | | | | | | | | | | Since symlinks aren't supported in busybox-w32 remove more of the code that handles them. Saves 64 bytes.
* | Merge branch 'busybox' into mergeRon Yorston2019-01-1011-17/+17
|\|
| * config: dpkg_deb should be dpkg-debDenys Vlasenko2018-12-281-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: more tweaksDenys Vlasenko2018-12-281-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: update size informationDenys Vlasenko2018-12-289-15/+15
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2018-12-271-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | tar: return correct exit code for empty tar fileRon Yorston2019-01-061-5/+0
| | | | | | | | | | The WIN32 implementation of check_errors_in_children shouldn't have reset bb_got_signal as it's used to signal an error.
* | win32: emulate SIGPIPERon Yorston2018-12-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to check whether a write error is due to a broken pipe can now either: - return with error EPIPE; - cause the process to exit with code 128+SIGPIPE. The default is the latter but the behaviour can be changed by issuing signal(SIGPIPE, SIG_IGN) and signal(SIGPIPE, SIG_DFL) calls. No actual signal is involved so kill can't send SIGPIPE and handlers other than SIG_IGN and SIG_DFL aren't supported. This does, however, avoid unsightly 'broken pipe' errors from commands like the example in GitHub issue #99: dd if=/dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
* | Merge branch 'busybox' into mergeRon Yorston2018-11-286-15/+60
|\|
| * hush: allow hush to run embedded scriptsRon Yorston2018-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Embedded scripts require a shell to be present in the BusyBox binary. Allow either ash or hush to be used for this purpose. If both are enabled ash takes precedence. The size of the binary is unchanged in the default configuration: both ash and hush are present but support for embedded scripts isn't compiled into hush. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: skip 'V' headers (GNU volume label), closes 11526Denys Vlasenko2018-11-271-1/+2
| | | | | | | | | | | | | | function old new delta get_header_tar 1696 1690 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlzma: fix too-eager corruption checkDenys Vlasenko2018-11-271-7/+13
| | | | | | | | | | | | | | function old new delta unpack_lzma_stream 2686 2674 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: fix too eager autodetection, closes 11531Denys Vlasenko2018-11-272-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_suffixed_with - 54 +54 tar_main 1006 1026 +20 open_transformer 92 79 -13 config_file_action 478 458 -20 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/2 up/down: 74/-33) Total: 41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * remove FAST_FUNC on a static functionDenys Vlasenko2018-11-021-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: add a function to unpack embedded dataRon Yorston2018-11-021-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar code to unpack embedded data is used to decompress usage messages, embedded scripts and the config file (in the non-default bbconfig applet). Moving this code to a common function reduces the size of the default build and hides more of the internals of libarchive. function old new delta unpack_bz2_data - 135 +135 bb_show_usage 137 157 +20 get_script_content 32 47 +15 unpack_scripts 119 - -119 unpack_usage_messages 124 - -124 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/0 up/down: 170/-243) Total: -73 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allow shell scripts to be embedded in the binaryDenys Vlasenko2018-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To assist in the deployment of shell scripts it may be convenient to embed them in the BusyBox binary. 'Embed scripts in the binary' takes any files in the directory 'embed', concatenates them with null separators, compresses them and embeds them in the binary. When scripts are embedded in the binary, scripts can be run as 'busybox SCRIPT [ARGS]' or by usual (sym)link mechanism. embed/nologin is provided as an example. function old new delta packed_scripts - 123 +123 unpack_scripts - 87 +87 ash_main 1103 1171 +68 run_applet_and_exit 78 128 +50 get_script_content - 32 +32 script_names - 10 +10 expmeta 663 659 -4 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 2/1 up/down: 370/-4) Total: 366 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-10-081-20/+37
|\|
| * unzip: use printable_string() for printing filenamesDenys Vlasenko2018-09-301-20/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2726 2792 +66 printable_string2 - 57 +57 identify 4329 4336 +7 expmeta 659 663 +4 add_interface 99 103 +4 beep_main 286 289 +3 changepath 192 194 +2 builtin_type 115 117 +2 devmem_main 469 470 +1 input_tab 1076 1074 -2 create_J 1821 1819 -2 poplocalvars 314 311 -3 doCommands 2222 2214 -8 do_load 918 902 -16 printable_string 57 9 -48 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 8/6 up/down: 146/-79) Total: 67 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-09-101-38/+42
|\|
| * tar: fix a thinko in prev commit - we need to copy to _unused_ fdDenys Vlasenko2018-08-041-2/+1
| | | | | | | | | | | | | | function old new delta vfork_compressor 257 246 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: handle the case when opened created tarball happens to have fd#0Denys Vlasenko2018-08-041-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | Reproducer: exec 0>&- exec 1>&- tar czf z.tar.gz FILE function old new delta vfork_compressor 229 257 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: make source code a bit more terse, no logic changesDenys Vlasenko2018-08-041-32/+25
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox'Ron Yorston2018-07-259-36/+43
|\|
| * gzip: unbreak FEATURE_GZIP_LEVELS, closes 11171Denys Vlasenko2018-07-241-6/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: if longopts are enabled, accept --null (synonym for -0)Denys Vlasenko2018-07-061-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tweak help textsDenys Vlasenko2018-07-061-3/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * restore documentation on the build config languageKartik Agaram2018-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | Kconfig-language.txt was deleted in commit 4fa499a17b52b back in 2006. Move to docs/ as suggested by Xabier Oneca: http://lists.busybox.net/pipermail/busybox/2014-May/080914.html Also update references to it everywhere. Signed-off-by: Kartik Agaram <akkartik@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlzma: close another SEGV possibilityDenys Vlasenko2018-05-251-1/+5
| | | | | | | | | | | | | | function old new delta unpack_lzma_stream 2669 2686 +17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: fix interaction of delayed symlink and hardlink creationHarald van Dijk2018-05-226-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta create_or_remember_link - 106 +106 create_links_from_list - 93 +93 find_applet_by_name 124 128 +4 unzip_main 2724 2726 +2 data_extract_all 891 873 -18 create_symlinks_from_list 64 - -64 create_or_remember_symlink 94 - -94 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 2/1 up/down: 205/-176) Total: 29 bytes Signed-off-by: Harald van Dijk <harald@gigawatt.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-05-132-14/+23
|\|
| * unlzma: do emit the error message on bad input, when we exit with 1Denys Vlasenko2018-04-241-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlzma: fix another SEGV caseDenys Vlasenko2018-04-191-2/+7
| | | | | | | | | | | | | | function old new delta unpack_lzma_stream 1705 1717 +12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ar: stop using static dataDenys Vlasenko2018-04-151-11/+7
| | | | | | | | | | | | | | | | | | | | | | function old new delta static.ar_long_names 4 - -4 static.ar_long_name_size 4 - -4 get_header_ar 546 532 -14 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-22) Total: -22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dpkg: fix symlink creation, closes 10941Denys Vlasenko2018-04-131-1/+3
| | | | | | | | | | | | | | function old new delta get_header_ar 434 442 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-04-095-245/+280
|\|
| * unlzma: fix segfault on bad archiveDenys Vlasenko2018-04-081-0/+11
| | | | | | | | | | | | | | function old new delta unpack_lzma_stream 2647 2653 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bzip2: fix two crashes on corrupted archivesDenys Vlasenko2018-04-082-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it turns out, longjmp'ing into freed stack is not healthy... function old new delta unpack_usage_messages - 97 +97 unpack_bz2_stream 369 409 +40 get_next_block 1667 1677 +10 get_bits 156 155 -1 start_bunzip 212 183 -29 bb_show_usage 181 120 -61 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/3 up/down: 147/-91) Total: 56 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: remove method checks which are always true/falseDenys Vlasenko2018-04-081-15/+22
| | | | | | | | | | | | | | | | | | | | function old new delta do_lzo_compress 232 224 -8 lzo_compress 531 488 -43 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-51) Total: -51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: buffer several 32-bit writes when we start a new compressed blockDenys Vlasenko2018-04-081-11/+21
| | | | | | | | | | | | | | function old new delta lzo_compress 483 531 +48 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: reuse stringsDenys Vlasenko2018-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta lzo_compress 470 483 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes text data bss dec hex filename 940011 477 7284 947772 e763c busybox_old 939976 477 7284 947737 e7619 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: checksum reads do not need to be checksummedDenys Vlasenko2018-04-081-3/+3
| | | | | | | | | | | | | | | | function old new delta do_lzo_decompress 404 427 +23 f_read32 22 - -22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: don't support ancient versions < 0.94 (15 Oct 1997)Denys Vlasenko2018-04-081-52/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0.94 came only 2 months after initial 0.90: 0.90 (10 Aug 1997): First public release of lzop ... 0.94 (15 Oct 1997): Header format change function old new delta do_lzo_decompress 411 404 -7 f_read8 24 - -24 f_read16 31 - -31 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-62) Total: -62 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: code shrink by using header_t matching on-disk layoutDenys Vlasenko2018-04-081-177/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta add_bytes_to_chksum 37 47 +10 lzo_decompress 524 532 +8 init_chksum 14 21 +7 chksum_getresult 13 17 +4 f_read 33 28 -5 f_write8 20 - -20 f_write32 22 - -22 f_write16 25 - -25 f_write 36 - -36 do_lzo_compress 328 232 -96 do_lzo_decompress 526 411 -115 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 4/3 up/down: 29/-319) Total: -290 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: trim help textDenys Vlasenko2018-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]... Create, extract, or list files from a tar file Operation: <============== DELETED c Create x Extract t List -f FILE Name of TARFILE ('-' for stdin/out) -C DIR Change to DIR before operation -v Verbose -O Extract to stdout -m Don't restore mtime -o Don't restore user:group -k Don't replace existing files -Z (De)compress using compress -z (De)compress using gzip -J (De)compress using xz -j (De)compress using bzip2 -a (De)compress using lzma -h Follow symlinks -T FILE File with names to include -X FILE File with glob patterns to exclude --exclude PATTERN Glob pattern to exclude Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | libarchive: failure to extract symlink isn't fatalRon Yorston2018-04-091-1/+9
| | | | | | | | | | | | | | | | Recent upstream changes made the failure of symlink(2) when extracting from an archive a fatal error. The busybox-w32 implementation of symlink(2) always fails. Just issue a warning and move on.
* | Merge branch 'busybox' into mergeRon Yorston2018-04-023-9/+11
|\|
| * libbb: new function bb_die_memory_exhaustedDenys Vlasenko2018-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_die_memory_exhausted - 10 +10 xstrdup 28 23 -5 xsetenv 27 22 -5 xrealloc 32 27 -5 xputenv 22 17 -5 xmalloc 30 25 -5 xfdopen_helper 40 35 -5 xasprintf 44 39 -5 wget_main 2387 2382 -5 open_socket 54 49 -5 glob_brace 419 414 -5 bb_get_chunk_from_file 146 141 -5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/11 up/down: 10/-55) Total: -45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: extract "unsafe" symlinks the same way tar/unzip doesNatanael Copa2018-03-301-0/+2
| | | | | | | | | | | | | | | | function old new delta cpio_main 588 596 +8 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>