aboutsummaryrefslogtreecommitdiff
path: root/archival
AgeCommit message (Collapse)Author
2017-01-26link: new appletDenys Vlasenko
coreutils grew itself a tiny simplistic alternative to ln: Usage: link FILE LINK Create hard LINK to FILE function old new delta link_main - 75 +75 packed_usage 31114 31131 +17 applet_names 2564 2569 +5 applet_main 1480 1484 +4 applet_install_loc 185 186 +1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 102/0) Total: 102 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-10Big cleanup in config help and descriptionDenys Vlasenko
Redundant help texts (one which only repeats the description) are deleted. Descriptions and help texts are trimmed. Some config options are moved, even across menus. No config option _names_ are changed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09unlzma: expand comments, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09unlzma: fix erroneous "while" instead of "if". Closes 4682Denys Vlasenko
These parts of the code essentially check whether stepping back by rep0 goes negative or not. LZMA SDK from lzma1604.7z has the following in the corresponding places: ... = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)] Clearly, not loop here. Technically, "while" here works: if condition is false (because pos underflowed), it iterates once, adds header.dict_size (a.k.a. dicBufSize), this makes pos positive but smaller than header.dict_size, and loop exits. Now we'll just check for negative result of subtraction, which is less code: function old new delta unpack_lzma_stream 2659 2641 -18 (I hope 2 Gbyte+ dictionaries won't be in use soon). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09unzip: match "Defl:?" display with info-zip; cosmetic code shufflingDenys Vlasenko
Large nested indented code blocks made more sane with a few gotos. function old new delta unzip_main 2491 2519 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09unzip: optional support for xzDenys Vlasenko
function old new delta unzip_main 2476 2491 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09unzip: optional support for bzip2 and lzmaDenys Vlasenko
function old new delta unzip_main 2376 2476 +100 bbunpack 750 745 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-09Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2Kang-Che Sung
Idea copied from the "ip" applet. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-08bunzip2: fix code bloat caused by zcat's seamless magicKang-Che Sung
This example single-applet configuration would trigger the bloat: CONFIG_FEATURE_SEAMLESS_XZ=y CONFIG_FEATURE_SEAMLESS_LZMA=y CONFIG_FEATURE_SEAMLESS_BZ2=y CONFIG_FEATURE_SEAMLESS_GZ=y CONFIG_BUNZIP2=y # CONFIG_ZCAT is not set # All other applets disabled Here, the resulting "busybox-bunzip2" binary would contain unpack_gz_stream, unpack_lzma_stream and unpack_xz_stream functions code. In other words, the gzip, lzma and xz decompressors' code are linked into the binary unnecessarily. This happens because SEAMLESS_MAGIC != 0 and compiler is unable to figure out that SEAMLESS_MAGIC bit is never set. Fix this by disabling SEAMLESS_MAGIC option flag (setting its value to 0) when zcat is disabled. This will help the compiler optimize out bbunpack() and no longer generate open_zipped() function call. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-08unzip: do not use CDF.extra_len, read local file header. Closes 9536Denys Vlasenko
While at it, shorten many field and variable names. function old new delta unzip_main 2334 2376 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-05unzip: remove now-pointless lseek which returns current positionCristian Ionescu-Idbohrn
archival/unzip.c: In function 'read_next_cdf': archival/unzip.c:271:8: warning: variable 'org' set but not used [-Wunused-but-set-variable] off_t org; ^~~ Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-05typo fix in config help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-05unzip: properly use CDF to find compressed files. Closes 9536Denys Vlasenko
function old new delta unzip_main 2437 2350 -87 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-23Make DPKG=y and DPKG_DEB=y by defaultDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-23fix breakage found by mass one-applet buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-08randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-27dpkg-deb: shorten code, improve help textDenys Vlasenko
function old new delta packed_usage 30261 30236 -25 dpkg_deb_main 437 401 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-61) Total: -61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-27dpkg-deb: remove unused FEATURE_DPKG_DEB_EXTRACT_ONLY config optionDenys Vlasenko
Its usage in C code was removed in 2004. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-16Make bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-11tar: handle pax-encoded utf8 filenames and link names. Closes 9406Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-12cpio: fix restoration of file ownership, closes 9306Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-08-15gzip: fix compression level bug. Closes 9131Natanael Copa
fix broken logic to get the gzip_level_config value from options -1 to -9. This fixes an off-by-one bug that caused gzip -9 output bigger files than the other compression levels. It fixes so that compression level 1 to 3 are actually mapped to level 4 as comments say. It also fixes that levels -4 to -9 is mapped to correct level and avoids out-of-bounds access. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-07-08cpio: tweak help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-07-06getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko
In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-21libarchive: fix xmalloc_open_zipped_read_close()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-20typo fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-20libarchive: fix open_zipped()Denys Vlasenko
Last commit broke it (on both MMU and NOMMU) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-20libarchive: fix xmalloc_open_zipped_read_close() on NOMMUDenys Vlasenko
The somewhat new "unpack in memory" code was broken for xmalloc_open_zipped_read_close() on NOMMU: we seek back over signature, but then expect it to be already consumed. Stop seeking back in this case. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-20randomconfig fixes 4Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-19randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22*: slap on a few ALIGN1/2s where appropriateDenys Vlasenko
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" text data bss dec hex filename 829901 4086 1904 835891 cc133 busybox_before 829665 4086 1904 835655 cc047 busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21*: hopefully all setup_common_bufsiz() are in placeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21*: add most of the required setup_common_bufsiz() callsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko
The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-18unzip: shorter code for date/time generationDenys Vlasenko
function old new delta unzip_main 2426 2414 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-18unzip: better match for "standard" unzip's output; string shrinkageDenys Vlasenko
function old new delta unzip_main 2490 2426 -64 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-64) Total: -64 bytes text data bss dec hex filename 924008 906 17160 942074 e5ffa busybox_old 923846 906 17160 941912 e5f58 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-18unzip: fix percent overflow; show "stored" files properlyDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-17unzip: fix a case where we find wrong CDE. Closes 8821Denys Vlasenko
function old new delta unzip_main 2472 2490 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-01libbb: two new functions: wait_for_exitstatus(pid), xfchdir(fd)Denys Vlasenko
Bartosz Golaszewski proposed xfchdir() Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-30[g]unzip: fix recent breakage.Denys Vlasenko
Also, do emit error message we so painstakingly pass from gzip internals Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-28lzop: eliminate variable, use "int" as return typeDenys Vlasenko
Based on patch by Maxin B. John <maxin.john@intel.com> function old new delta pack_lzop 870 859 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-27gzip: add support for --no-name long optionAaro Koskinen
Add support for --no-name long option. Just silently ignore it like the short -n option. This allows to use busybox gzip with Lynx browser. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-27gunzip: add support for long optionsAaro Koskinen
Add support for long options. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-26unzip: test for bad archive SEGVingDenys Vlasenko
function old new delta huft_build 1296 1300 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-25tweak defconfigDenys Vlasenko
MONOTONIC_SYSCALL=y by default FEATURE_LAST_SMALL is gone: now FEATURE_LAST_FANCY is a "bool", not a "choice". Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-25inetd: make FEATURE_INETD_RPC off by defaultDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-22tar: fix files skipped with --strip_components not resetting selinux contextDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-22tar: shrink hardlink name handling codeDenys Vlasenko
function old new delta data_extract_all 1069 1040 -29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-22tar: implement --version for buildrootDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-22tar: add support for --strip-components=NDenys Vlasenko
function old new delta data_extract_all 882 995 +113 tar_longopts 290 309 +19 tar_main 938 942 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 136/0) Total: 136 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>