aboutsummaryrefslogtreecommitdiff
path: root/archival (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | unzip: omit special treatment of non-GNU getoptRon Yorston2017-07-301-1/+1
| | | | | | | | | | | | MinGW's getopt is sufficiently similar to GNU's getopt that the code to handle '-x' in the option string isn't required. This doesn't change the behaviour, which was already correct, but saves a few bytes.
* | Merge branch 'busybox' into mergeRon Yorston2017-07-294-24/+72
|\|
| * unzip: fix regression on big-endian machinesNatanael Copa2017-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes a regression which was introduced with commit 2a0867a5 ("unzip: optional support for bzip2 and lzma") and causes unzip to exit with error when extracting archives: unzip: unsupported method 2048 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: postpone creation of symlinks with "suspicious" targets. Closes 8411Denys Vlasenko2017-07-243-24/+71
| | | | | | | | | | | | | | | | | | | | | | function old new delta data_extract_all 968 1038 +70 tar_main 952 986 +34 scan_tree 258 262 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 108/0) Total: 108 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-07-2413-212/+278
|\|
| * config: deindent all help textsDenys Vlasenko2017-07-2113-117/+117
| | | | | | | | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: FEATURE_LZMA_FAST should be visible if FEATURE_SEAMLESS_LZMADenys Vlasenko2017-07-204-21/+10
| | | | | | | | | | | | While at it, tweak some config help texts. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: sanitize filename length: malloc(1234mb) is not funnyDenys Vlasenko2017-07-201-2/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: implement -j, closes 9126Denys Vlasenko2017-07-201-16/+30
| | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2642 2703 +61 packed_usage 31747 31770 +23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 84/0) Total: 84 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: robustify overwrite checksDenys Vlasenko2017-07-201-31/+53
| | | | | | | | | | | | | | | | | | | | function old new delta get_lstat_mode - 55 +55 unzip_main 2667 2642 -25 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 55/-25) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: support symlinks. Closes 10031Denys Vlasenko2017-07-201-13/+48
| | | | | | | | | | | | | | function old new delta unzip_main 2519 2667 +148 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bzcat,zcat: simplify code if gunzip/bunzip2 is not selectedDenys Vlasenko2017-07-201-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-1811-21/+21
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-07-188-69/+140
|\|
| * Move get_unaligned_le32() macros to platform.hDenys Vlasenko2017-07-151-5/+11
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * 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>
* | Merge branch 'busybox' into mergeRon Yorston2017-05-296-23/+23
|\|
| * 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>
* | Merge branch 'busybox' into mergeRon Yorston2017-02-0813-315/+394
|\|
| * 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: use data from local header rather than CDFRon Yorston2017-01-081-1/+1
| | | | | | | | | | | | | | | | The zip file referenced in this bug report: https://bugs.busybox.net/show_bug.cgi?id=9536 isn't extracted correctly with the upstream fix.
* | Merge branch 'busybox' into mergeRon Yorston2017-01-081-123/+163
|\|
| * 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>
* | Merge branch 'busybox' into mergeRon Yorston2017-01-044-4/+20
|\|
| * 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>
* | Merge branch 'busybox' into mergeRon Yorston2016-11-295-95/+141
|\|
| * 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>