p7zip icon indicating copy to clipboard operation
p7zip copied to clipboard

p7zip fails when extracting XIP file/Xar archive (regression?)

Open KizzyCode opened this issue 5 years ago • 2 comments

Homebrew recently updated 7z to p7zip Version 17.03, and now it fails to extract XIP files which have worked flawlessly with the previous version.

Full output for 7z e Xcode_12.4.xip:

7-Zip [64] 17.03 : Copyright (c) 1999-2020 Igor Pavlov : 2017-08-28
p7zip Version 17.03 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64)

Scanning the drive for archives:
1 file, 11655535601 bytes (11 GiB)

Extracting archive: Xcode_12.4.xip
         
Content
ERRORS:
There are data after the end of archive

--
Path = Xcode_12.4.xip
Type = Xar
Physical Size = 11655535601
Headers Size = 3973
----
Path = Content
Size = 11655531068
Packed Size = 11655531068
Modified = 2021-01-09 01:51:35
Created = 2021-01-09 01:51:35
Accessed = 2021-01-09 01:25:24
Mode = -rw-r--r--
User = root
Group = wheel
Method = octet-stream
--
Path = Content
Type = xz
ERRORS:
There are data after the end of archive
Offset = 28
Physical Size = 3466672
Tail Size = 11652064368
Method = LZMA2:23
Streams = 1
Blocks = 1
Characteristics = BlockPackSize BlockUnpackSize

ERROR: There are some data after the end of the payload data : Content~

Sub items Errors: 1

Archives with Errors: 1

Open Errors: 1

Sub items Errors: 1

The file can be downloaded from https://developer.apple.com/download/more/ ; I sadly don't have another test file 😕

KizzyCode avatar Mar 09 '21 17:03 KizzyCode

I see that p7zip16.02 will report the same problem, but p7zip16.02 is handled as a warning, and p7zip17.03 is handled as an error. I want to confirm, is there any error in the decompressed file of p7zip17.03?

jinfeihan57 avatar Mar 13 '21 06:03 jinfeihan57

If I use p7zip16.02 from here, it fails with a different error message:


7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64)

Scanning the drive for archives:
1 file, 11655535601 bytes (11 GiB)

Extracting archive: /Volumes/macOS Data HDD/Xcode_12.4.xip
         
ERRORS:
There are data after the end of archive

--
Path = /Volumes/macOS Data HDD/Xcode_12.4.xip
Type = xz
ERRORS:
There are data after the end of archive
Offset = 4277
Physical Size = 3466672
Tail Size = 11652064652
Method = LZMA2:23
Streams = 1
Blocks = 1

ERROR: There are some data after the end of the payload data : Xcode_12.4

Sub items Errors: 1

Archives with Errors: 1

Open Errors: 1

Sub items Errors: 1

However in both cases it extracts only 16.777.216 bytes (which are the same for both 16.02 and 17.03). Does that answer your question?

KizzyCode avatar Mar 13 '21 14:03 KizzyCode