summaryrefslogtreecommitdiff
path: root/archival (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix POSIX buildFRP-4621-gf3c5e8bc3Ron Yorston2022-02-271-2/+2
| | | | | Commit e6238530e (cpio: code shrink with !FEATURE_EXTRA_FILE_DATA) broke the POSIX build by incorrectly excluding chunks of code.
* cpio: code shrink with !FEATURE_EXTRA_FILE_DATARon Yorston2022-02-101-1/+5
| | | | | | | | | | | | | | The new --renumber-inodes option won't work if FEATURE_EXTRA_FILE_DATA is disabled. Don't allow it to be selected in that case. In fact, if FEATURE_EXTRA_FILE_DATA is disabled all the code to handle hardlinks can be #ifdef'ed out. The new --ignore-devno option need do nothing if FEATURE_EXTRA_FILE_DATA is disabled, as in that case the device ids will already be zero. It can still be selected, cpio will just always behave as though the option was provided on the command line. This doesn't affect the size of the default build.
* Merge busybox into mergeRon Yorston2022-02-092-1/+3
|\ | | | | | | | | | | | | | | Fix conflicts in reset and ash. Redefine the new safe_read_key() as a reference to read_key(). Disable SHA256_HWACCEL.
| * libbb: shrink lineedit_read_key()Denys Vlasenko2022-01-181-1/+1
| | | | | | | | | | | | | | function old new delta lineedit_read_key 237 231 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix "defined but not used" warningsDenys Vlasenko2022-01-171-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge busybox into mergeRon Yorston2021-12-272-1/+57
|\| | | | | | | Fix merge conflict in coreutils/timeout.c.
| * libarchive/get_header_ar.c: fix extraction of archives from binutils in ↵Peter Korsgaard2021-12-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deterministic mode GNU binutils in deterministic mode (ar rD or built with --enable-deterministic-archives) hard codes file mode to 0644 (NOT 0100644) since https://github.com/bminor/binutils-gdb/commit/36e4dce69dd2 This confuses busybox ar x (data_extract_all): touch a; ar rD a.ar a ar: creating a.ar busybox ar x a.ar ar: unrecognized file type hexdump -C a.ar 00000000 21 3c 61 72 63 68 3e 0a 61 2f 20 20 20 20 20 20 |!<arch>.a/ | 00000010 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 | 0 | 00000020 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20 | 0 0 | 00000030 36 34 34 20 20 20 20 20 30 20 20 20 20 20 20 20 |644 0 | 00000040 20 20 60 0a | `.| As a workaround, force the mode bits to S_IFREG, as nothing else makes sense for ar. function old new delta get_header_ar 539 542 +3 Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: add support for --renumber-inodes like GNU cpioAriadne Conill2021-10-131-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --renumber-inodes option renumbers the inodes starting from 1, so that the sequence of inodes is always stable. This helps with reproducibility. function old new delta cpio_o 961 1045 +84 .rodata 78422 78440 +18 bbconfig_config_bz2 6168 6164 -4 packed_usage 25764 25756 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 102/-12) Total: 90 bytes Signed-off-by: Ariadne Conill <ariadne@dereferenced.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: add support for --ignore-devno like GNU cpioAriadne Conill2021-10-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --ignore-devno option is used to set device numbers to (0, 0). This can be useful in verifying whether a CPIO archive is reproducible. function old new delta cpio_o 922 961 +39 .rodata 78407 78422 +15 bbconfig_config_bz2 6161 6167 +6 packed_usage 25770 25764 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 60/-6) Total: 54 bytes Signed-off-by: Ariadne Conill <ariadne@dereferenced.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | rpm: code shrinkRon Yorston2021-11-141-0/+4
| | | | | | | | | | | | | | Since the WIN32 implementation of chown(2) does nothing there's no point in calling it. Saves 112 bytes.
* | Merge branch 'busybox' into mergeRon Yorston2021-10-133-5/+11
|\|
| * tar: prevent malicious archives with enormous long name sizes OOMing the machineDenys Vlasenko2021-10-111-3/+8
| | | | | | | | | | | | | | function old new delta get_header_tar 1707 1752 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: add more beneficial NOINLINEsDenys Vlasenko2021-10-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta dec_main - 1729 +1729 -41 bytes fallbackQSort3 - 671 +671 -70 bytes verify_sun - 481 +481 -107 bytes verify 1330 742 -588 fallbackSort 1469 728 -741 unpack_xz_stream 2306 536 -1770 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/3 up/down: 2881/-3099) Total: -218 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: improve comments, add FIXMEs. no code changesDenys Vlasenko2021-10-081-2/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-09-212-3/+5
|\|
| * libbb: eliminate a static data array in bb_mode_string()Denys Vlasenko2021-09-172-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta print_stat 861 869 +8 header_verbose_list_ar 73 77 +4 display_single 975 979 +4 header_verbose_list 237 239 +2 bb_mode_string 124 115 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 18/-9) Total: 9 bytes text data bss dec hex filename 1043136 559 5052 1048747 1000ab busybox_old 1043153 559 5020 1048732 10009c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-08-304-10/+12
|\|
| * bzip: make ftab[] and crc32table[] member arrays of EState, do not allocateDenys Vlasenko2021-08-292-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta mainSort 941 986 +45 fallbackSort 1471 1469 -2 add_pair_to_block 194 188 -6 compressStream 543 515 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 45/-36) Total: 9 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar,smemcap: silence compiler warningRon Yorston2021-08-221-1/+1
| | | | | | | | | | | | | | | | | | gcc 11.2.1 complains that the tar header checksum might overflow the checksum field. It won't and using an unsigned int for the calculation seems to convince the compiler too. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Regularize "NUL terminated input" --help textsDenys Vlasenko2021-08-221-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-08-222-29/+37
|\|
| * tar,smemcap: commonalyze checksumming code for tar headerDenys Vlasenko2021-08-202-29/+37
| | | | | | | | | | | | | | | | | | | | | | function old new delta chksum_and_xwrite_tar_header - 99 +99 writeheader 280 199 -81 chksum_and_xwrite 102 - -102 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/1 up/down: 99/-183) Total: -84 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-08-171-11/+12
|\|
| * tar: exclude files before updating hardlink info listHarald van Dijk2021-08-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | When excluding one file, and including another file that is a hardlink of the excluded file, it should be stored as an ordinary file. function old new delta writeFileToTarball 489 493 +4 Signed-off-by: Harald van Dijk <harald@gigawatt.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: simplify addition of --exclude=GLOB to the expansion of -X EXCLFILEDenys Vlasenko2021-08-021-6/+7
| | | | | | | | | | | | | | function old new delta tar_main 1115 1105 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-06-288-10/+23
|\|
| * cpio: fix sscanf on unterminated bufferS Harris2021-06-231-1/+2
| | | | | | | | | | Signed-off-by: S Harris <S.E.Harris@kent.ac.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unlzma: fix a case where we could read before beginning of bufferDenys Vlasenko2021-06-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testcase: 21 01 01 00 00 00 00 00 e7 01 01 01 ef 00 df b6 00 17 02 10 11 0f ff 00 16 00 00 Unfortunately, the bug is not reliably causing a segfault, the behavior depends on what's in memory before the buffer. function old new delta unpack_lzma_stream 2762 2768 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: more --help tweaksDenys Vlasenko2021-06-151-1/+1
| | | | | | | | | | | | | | function old new delta packed_usage 33552 33541 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: --help tweaksDenys Vlasenko2021-06-144-5/+14
| | | | | | | | | | | | | | function old new delta packed_usage 33589 33552 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: more --help tweaks, mostly expanding ts --helpDenys Vlasenko2021-06-131-1/+1
| | | | | | | | | | | | | | function old new delta packed_usage 33554 33596 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: --help tweaksDenys Vlasenko2021-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | function old new delta .rodata 103190 103189 -1 packed_usage 33590 33566 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-25) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-06-071-1/+7
|\|
| * cpio: fix "cpio -d -p A/B/C"Denys Vlasenko2021-06-031-1/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-05-142-7/+38
|\|
| * decompress_gunzip: simplify ERR_RET bit clearingDenys Vlasenko2021-05-031-3/+2
| | | | | | | | | | | | My gcc is in fact clever enough to do it itself, but let's be explicit Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: add -tDenys Vlasenko2021-04-141-3/+9
| | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 33584 33598 +14 .rodata 103218 103219 +1 unzip_main 2665 2656 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 15/-9) Total: 6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix for .zip archives with >4GB fileDenys Vlasenko2021-04-141-2/+20
| | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2644 2665 +21 input_tab 926 927 +1 bb_banner 46 47 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 23/0) Total: 23 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * decompress_gunzip: Fix DoS if gzip is corruptSamuel Sapalski2021-03-121-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On certain corrupt gzip files, huft_build will set the error bit on the result pointer. If afterwards abort_unzip is called huft_free might run into a segmentation fault or an invalid pointer to free(p). In order to mitigate this, we check in huft_free if the error bit is set and clear it before the linked list is freed. Signed-off-by: Samuel Sapalski <samuel.sapalski@nokia.com> Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: implement symlink(2)Ron Yorston2021-02-121-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide an implementation of symlink(2). Calls to symlink(2) will fail in default Windows installations unless running with elevated privileges. Failure to create a symlink when extracting files from an archive is therefore treated as a non-fatal error. There are two ways to permit the creation of symlinks: - Edit security policy to give users the 'Create symbolic links' privilege. Unfortunately this doesn't work for users who are an Administrator. - Enable developer mode, which is available in later versions of Windows 10. The ability to create symlinks is not available in Windows XP or ReactOS.
* | tar: changes to conditional compilationRon Yorston2021-01-251-4/+6
| | | | | | | | Mostly just cosmetic.
* | ar: only free temporary filename if requiredRon Yorston2021-01-251-2/+3
| |
* | libarchive: allow extraction of hard linksRon Yorston2021-01-192-7/+8
| | | | | | | | | | | | | | | | Allow create_or_remember_link() to create hardlinks. As a result tar and cpio can now extract hard links. Since unzip only supports symlinks it sees no improvement. As before, attempts to extract symlinks result in a warning.
* | Merge branch 'busybox' into mergeRon Yorston2021-01-1414-60/+74
|\|
| * tar: add TODO about a bug with non-writable directories on extractDenys Vlasenko2021-01-011-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * help text tweaksDenys Vlasenko2020-12-184-35/+38
| | | | | | | | | | | | | | function old new delta packed_usage 33570 33502 -68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: add and use infrastructure for fixed page size optimizationDenys Vlasenko2020-12-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1121 1118 -3 getpagesize 6 - -6 rpm_main 1037 1027 -10 rpm2cpio_main 120 110 -10 ptok 38 21 -17 time_main 1282 1261 -21 mkswap_main 317 278 -39 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/6 up/down: 0/-106) Total: -106 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: create and use mmap() helpersDenys Vlasenko2020-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta mmap_anon - 22 +22 mmap_read - 21 +21 xmmap_anon - 16 +16 rpm_gettags 465 447 -18 bb_full_fd_action 498 480 -18 uevent_main 337 310 -27 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/3 up/down: 59/-63) Total: -4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * help text tweaksDenys Vlasenko2020-12-132-2/+2
| | | | | | | | | | | | | | function old new delta packed_usage 33547 33545 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: expand --helpDenys Vlasenko2020-12-081-11/+16
| | | | | | | | | | | | | | function old new delta packed_usage 33486 33590 +104 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>