aboutsummaryrefslogtreecommitdiff
path: root/archival (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * gzip -d with zcat enabled but gunzip disabled was misbehavingDenys Vlasenko2020-06-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2020-06-241-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeFRP-3466-g53c09d0e1Ron Yorston2020-05-291-1/+7
|\|
| * unzip: -d should create the dirLauri Kasanen2020-04-291-1/+7
| | | | | | | | | | | | | | The official Info-Zip unzip creates the dir if it doesn't exist. Signed-off-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-01-086-115/+152
|\|
| * unxz: show -t in --helpDenys Vlasenko2019-11-081-0/+2
| | | | | | | | | | | | | | function old new delta packed_usage 33236 33247 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gunzip: fix incorrect decoding of "fixed" inflate blocksDenys Vlasenko2019-10-261-10/+20
| | | | | | | | | | | | | | | | | | | | function old new delta huft_build 1008 1022 +14 inflate_block 1253 1256 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 17/0) Total: 17 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: fix fallout of: change -a from meaning "lzma" to mean "autodetect by ↵Denys Vlasenko2019-10-251-1/+1
| | | | | | | | | | | | extension" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gunzip: code shrink by using int-, not short-sized struct memberDenys Vlasenko2019-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | function old new delta inflate_block 1254 1253 -1 inflate_codes 629 621 -8 huft_build 1054 1008 -46 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-55) Total: -55 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-10-191-29/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | huft_build() still has way too many params function old new delta lit - 94 +94 dist - 94 +94 huft_build 1058 1054 -4 inflate_block 1281 1254 -27 cpdext 30 - -30 cplext 31 - -31 cpdist 60 - -60 cplens 62 - -62 ------------------------------------------------------------------------------ (add/remove: 2/4 grow/shrink: 0/2 up/down: 188/-214) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-10-191-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | huft_build() has way too many params function old new delta inflate_block 1293 1281 -12 huft_build 1085 1058 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-39) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dpkg-deb: work around bogus error message when working with XZ compressed ↵Denys Vlasenko2019-10-112-2/+20
| | | | | | | | | | | | | | | | | | | | packages function old new delta unpack_xz_stream 2309 2317 +8 bb_full_fd_action 464 472 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-09-061-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converted a few 16-bit variables and small arrays to 32-bit. Stopped pulling desc->FOO members into temporary local variables in gen_bitlen(): on register-starved arches, this is a loss, temporaries go into stack slots. Sprinkled a few "const" on pointer arguments. function old new delta pack_gzip 742 745 +3 gen_codes 101 97 -4 build_tree 886 833 -53 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-57) Total: -54 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-09-051-9/+9
| | | | | | | | | | | | | | function old new delta gzip_main 267 264 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: set default compression level to 6 when CONFIG_FEATURE_GZIP_LEVELS=nDaniel Edgecumbe2019-09-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, GNU gzip -n and BusyBox gzip now produce identical output assuming that CONFIG_GZIP_FAST=2. >> Excuse me, but I wonder one thing: Why should we follow >> strictly with gzip on the no-options default behavior? > First, the default 6 compression level is a de-facto standard. BSD gzip > and Apple gzip (on macOS) use this default as well. So there is a > reasonable expectation that different gzip implementations act the same. > For instance, if the default for busybox gzip becomes 9, then someone > writing a script using busybox gzip could reasonably expect that the > compression level will still be 9 when the same script is run on another > system. That would be wrong. Implementations should not deviate from > de-facto standards without a strong reason. > > Second, the inherent reason for this default has not gone away. While > processor speeds have exploded since the default was set, so has the > typical size of compressed files. Multiple gigabytes are nothing unusual > these days. And gzip is often used for compression on the fly, precisely > because it offers a good compromise between speed and compression ratio. > So I believe 6 continues to be a reasonable default. function old new delta deflate 939 927 -12 Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: set compression flags correctly as per standardDaniel Edgecumbe2019-09-051-8/+18
| | | | | | | | | | | | | | | | | | | | With this change and CONFIG_GZIP_FAST=2, CONFIG_FEATURE_GZIP_LEVELS=y, GNU gzip and BusyBox gzip now produce identical output at each compression level (excluding 1..3, as BusyBox does not implement these levels). Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: default level with ENABLE_FEATURE_GZIP_LEVELS should be 6Daniel Edgecumbe2019-09-051-1/+1
| | | | | | | | | | | | | | Fixes an off-by-one that actually resulted in level 7 being used Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-08-1620-106/+131
|\|
| * tar: change -a from meaning "lzma" to mean "autodetect by extension"Denys Vlasenko2019-08-021-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta tar_main 1026 1100 +74 packed_usage 33311 33329 +18 tar_longopts 309 325 +16 vfork_compressor 246 210 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 108/-36) Total: 72 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: code shrinkDenys Vlasenko2019-08-011-12/+13
| | | | | | | | | | | | | | | | | | | | function old new delta writeLongname 226 228 +2 static.prefilled 48 - -48 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 2/-48) Total: -46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-0220-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-05-272-18/+28
|\|
| * comment fixDenys Vlasenko2019-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: treat one "FIXME: avoid seek", take 2Denys Vlasenko2019-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: treat one "FIXME: avoid seek"Denys Vlasenko2019-05-241-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta xmalloc_read_with_initial_buf - 205 +205 setup_transformer_on_fd 154 150 -4 xmalloc_open_zipped_read_close 143 135 -8 xmalloc_read 201 10 -191 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 205/-203) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bunzip2: the correct condition is "n < groupCount", not "n <= groupCount". ↵Denys Vlasenko2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | Closes 11896 function old new delta get_next_block 1677 1681 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: interpret absolute paths as relative to %SYSTEMDRIVE%Ron Yorston2019-03-282-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BusyBox contains hardcoded references to absolute paths which are unique in the *nix world but on Microsoft Windows are interpreted as being on the current drive. To make these unique again consider them to be relative to %SYSTEMDRIVE%. Support this by adding functions to: - determine the system drive (not using the environment variable); - change a process's current directory to the root of the system drive; - make relative paths absolute before changing directory (if needed). The following applications have been modified: - ash references /etc/profile from the system drive; - dpkg places its data store on and installs files to the system drive; - rpm installs files to the system drive; - man looks for configuration files and man pages on the system drive. See GitHub issue #158.
* | win32: fix POSIX build (again)Ron Yorston2019-03-121-1/+3
| | | | | | | | | | Some faulty logic with ENABLE_FEATURE_EXTRA_FILE_DATA broke the POSIX build.
* | dpkg: enable in the default configurationRon Yorston2019-02-221-0/+5
| | | | | | | | | | | | | | | | | | | | BusyBox's dpkg is marginally more useful than rpm because it maintains package status. Run the following commands to initialise the filesystem: mkdir -p /var/lib/dpkg/info touch /var/lib/dpkg/status
* | 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
|\|