busybox/archival
Peter Korsgaard cb91a818c8 libarchive/get_header_ar.c: fix extraction of archives from binutils in 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>
2021-12-12 23:34:43 +01:00
..
libarchive libarchive/get_header_ar.c: fix extraction of archives from binutils in deterministic mode 2021-12-12 23:34:43 +01:00
ar.c libbb: eliminate a static data array in bb_mode_string() 2021-09-17 01:18:31 +02:00
bbunzip_test2.sh
bbunzip_test3.sh
bbunzip_test.sh
bbunzip.c *: --help tweaks 2021-06-14 20:47:20 +02:00
bzip2.c *: --help tweaks 2021-06-14 20:47:20 +02:00
chksum_and_xwrite_tar_header.c tar,smemcap: silence compiler warning 2021-08-22 15:44:57 +02:00
Config.src restore documentation on the build config language 2018-06-06 15:16:48 +02:00
cpio.c cpio: add support for --renumber-inodes like GNU cpio 2021-10-13 17:56:17 +02:00
dpkg_deb.c help text tweaks 2020-12-18 04:12:51 +01:00
dpkg.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
gzip.c *: --help tweaks 2021-06-14 20:47:20 +02:00
Kbuild.src
lzop.c *: --help tweaks 2021-06-14 20:47:20 +02:00
rpm.c libbb: add and use infrastructure for fixed page size optimization 2020-12-14 18:54:30 +01:00
rpm.h
tar_symlink_attack tar: postpone creation of symlinks with "suspicious" targets. Closes 8411 2017-07-24 17:20:13 +02:00
tar.c tar,smemcap: commonalyze checksumming code for tar header 2021-08-20 17:58:49 +02:00
unzip.c *: more --help tweaks 2021-06-15 10:00:18 +02:00