aboutsummaryrefslogtreecommitdiff
path: root/archival (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* unzip: TODO for symlink supportDenys Vlasenko2017-07-111-0/+21
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dpkg: fix CONFIG_FEATURE_CLEAN_UP handlingPeter Korsgaard2017-07-051-4/+0
| | | | | | | | | | | | | dpkg moved to away from dynamically allocating the hashtables in commit c87339d584 (dpkg: trivial code shrinkage, and redo G trick correctly) almost ten years ago, but the cleanup code was never adjusted to match. Glibc loudly complains about this: *** Error in `dpkg': free(): invalid pointer: 0x0000007fac3478c0 *** Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bzcat: compile bunzip2_main() if BZCAT.Denys Vlasenko2017-07-041-1/+1
| | | | | | | | Currently, BZCAT (and BUNZIP2) selects FEATURE_BZIP2_DECOMPRESS, thus, "#if ENABLE_FEATURE_BZIP2_DECOMPRESS" around bunzip2_main() is sufficient. But let's robustify it. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fixes for bugs found by make_single_applets.shDenys Vlasenko2017-07-031-3/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival: add option -k "keep" to gzip/bzip2/lzop, add -U "nokeep" to lzopDenys Vlasenko2017-06-154-43/+81
| | | | | | | | | | | | function old new delta bbunpack 745 779 +34 lzop_main 93 121 +28 do_lzo_compress 320 328 +8 packed_usage 31685 31653 -32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 70/-32) Total: 38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix "ifdef ENABLE_foo": should always be "#if ENABLE_foo"Denys Vlasenko2017-06-151-4/+4
| | | | | | | | | | | | function old new delta pack_gzip 1729 1789 +60 fill_window 220 216 -4 static.gzip_level_config 24 - -24 gzip_main 275 192 -83 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/2 up/down: 60/-111) Total: -51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: add IF_FEATURE_* checksMing Liu2017-06-131-10/+15
| | | | | | | | | | | | | | | | | | | A following linking error was observed: | ========== | archival/lib.a(tar.o): In function `tar_main': | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined | ld: final link failed: Bad value this happened with clang compiler, with the following configs: | CONFIG_TAR=y | # CONFIG_FEATURE_SEAMLESS_Z is not set which can be fixed by adding IF_FEATURE_* checks in. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko2017-04-174-18/+18
| | | | | | By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixDenys Vlasenko2017-03-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix FEATURE_{GZIP,BZIP2}_DECOMPRESS link errorKang-Che Sung2017-02-171-4/+4
| | | | | | | | | | | ... when gzip is selected but not gunzip nor zcat, or when bzip2 is selected but not bunzip2 nor bzcat. This regression is introduced in b130f9f758b6404c6d0911a1c120937ae6ab47f8 ("Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2") Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Replace int -> uint to avoid signed integer overflowRostislav Skudnov2017-02-041-3/+3
| | | | | | | | | | An example of such an error (should be compiled with DEBUG_SANITIZE): runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add comment about APPLET_ODDNAME formatDenys Vlasenko2017-01-292-23/+28
| | | | | | It confused me more than once Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* link: new appletDenys Vlasenko2017-01-261-2/+4
| | | | | | | | | | | | | | | | | | | 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>
* Big cleanup in config help and descriptionDenys Vlasenko2017-01-106-42/+17
| | | | | | | | | | | | | 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>
* unlzma: expand comments, no code changesDenys Vlasenko2017-01-091-0/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlzma: fix erroneous "while" instead of "if". Closes 4682Denys Vlasenko2017-01-091-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* unzip: match "Defl:?" display with info-zip; cosmetic code shufflingDenys Vlasenko2017-01-091-102/+109
| | | | | | | | | 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>
* unzip: optional support for xzDenys Vlasenko2017-01-092-0/+14
| | | | | | | function old new delta unzip_main 2476 2491 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: optional support for bzip2 and lzmaDenys Vlasenko2017-01-093-36/+61
| | | | | | | | function old new delta unzip_main 2376 2476 +100 bbunpack 750 745 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Allow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2Kang-Che Sung2017-01-093-19/+41
| | | | | | | Idea copied from the "ip" applet. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bunzip2: fix code bloat caused by zcat's seamless magicKang-Che Sung2017-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* unzip: do not use CDF.extra_len, read local file header. Closes 9536Denys Vlasenko2017-01-081-114/+122
| | | | | | | | | 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>
* unzip: remove now-pointless lseek which returns current positionCristian Ionescu-Idbohrn2017-01-051-5/+0
| | | | | | | | | | | 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>
* typo fix in config help textDenys Vlasenko2017-01-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: properly use CDF to find compressed files. Closes 9536Denys Vlasenko2017-01-051-120/+165
| | | | | | | function old new delta unzip_main 2437 2350 -87 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make DPKG=y and DPKG_DEB=y by defaultDenys Vlasenko2016-12-232-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix breakage found by mass one-applet buildsDenys Vlasenko2016-12-231-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2016-12-082-2/+14
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dpkg-deb: shorten code, improve help textDenys Vlasenko2016-11-271-43/+34
| | | | | | | | | | 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>
* dpkg-deb: remove unused FEATURE_DPKG_DEB_EXTRACT_ONLY config optionDenys Vlasenko2016-11-271-10/+1
| | | | | | Its usage in C code was removed in 2004. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectableDenys Vlasenko2016-11-163-35/+81
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: handle pax-encoded utf8 filenames and link names. Closes 9406Denys Vlasenko2016-11-111-7/+25
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cpio: fix restoration of file ownership, closes 9306Denys Vlasenko2016-10-121-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* gzip: fix compression level bug. Closes 9131Natanael Copa2016-08-151-4/+1
| | | | | | | | | | | | | | | | | 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>
* cpio: tweak help textDenys Vlasenko2016-07-081-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-061-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libarchive: fix xmalloc_open_zipped_read_close()Denys Vlasenko2016-06-211-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixDenys Vlasenko2016-06-201-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix open_zipped()Denys Vlasenko2016-06-201-7/+12
| | | | | | Last commit broke it (on both MMU and NOMMU) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix xmalloc_open_zipped_read_close() on NOMMUDenys Vlasenko2016-06-204-24/+19
| | | | | | | | | 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>
* randomconfig fixes 4Denys Vlasenko2016-06-201-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2016-06-192-9/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: slap on a few ALIGN1/2s where appropriateDenys Vlasenko2016-04-223-3/+3
| | | | | | | | | | 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>
* *: hopefully all setup_common_bufsiz() are in placeDenys Vlasenko2016-04-211-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-213-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-214-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* unzip: shorter code for date/time generationDenys Vlasenko2016-04-181-6/+6
| | | | | | | function old new delta unzip_main 2426 2414 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: better match for "standard" unzip's output; string shrinkageDenys Vlasenko2016-04-181-29/+33
| | | | | | | | | | | | 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>
* unzip: fix percent overflow; show "stored" files properlyDenys Vlasenko2016-04-181-6/+29
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: fix a case where we find wrong CDE. Closes 8821Denys Vlasenko2016-04-171-8/+35
| | | | | | | function old new delta unzip_main 2472 2490 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>