diff options
author | Peter Korsgaard | 2021-11-26 16:38:57 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-12-12 23:34:43 +0100 |
commit | cb91a818c8f7730d8f3b30b5b4e75fd21496609f (patch) | |
tree | c0ec5abaee98272d40dcdbc2912d7b46b9e68a0d /libbb/duration.c | |
parent | e67b80f4739c4075b51b0a575701b73928fe0bf1 (diff) | |
download | busybox-cb91a818c8f7730d8f3b30b5b4e75fd21496609f.zip busybox-cb91a818c8f7730d8f3b30b5b4e75fd21496609f.tar.gz |
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>
Diffstat (limited to 'libbb/duration.c')
0 files changed, 0 insertions, 0 deletions