Created attachment 211204 [details] Sample script to build ZIP-files with LZMA-compressed entries Any entry in a ZIP-file, that was compressed using LZMA, can be listed, but cannot be extracted. This is true for both unzip(1) and tar: unzip: lzma unknown error 1 and x core.26303.txt: lzma unknown error 1 tar: Error exit delayed from previous errors. Unzip installed by archivers/unzip cannot handle such entries either, but 7za can. Both tar and unzip already link with liblzma, so it should be working, but does not -- and with the same message. Which suggests, the problem is with libarchive... Attaching a Python-script, with which such ZIP-files can be created: ./ziplzma.py foo.zip file1 file2 ...
Reproduces on CURRENT.
I was also able to reproduce the problem. It seems this was fixed in libarchive commit c8d40b27 issue #1257. use the program above to create a test.zip file $ echo "test" > test.txt $ python3.6 ziplzma.py test.zip test.txt $ rm test.txt $ unzip -o test.zip unzip: lzma unknown error 1 $ cd /tmp $ git clone https://github.com/libarchive/libarchive.git $ cd libarchive $ git checkout c8d40b27 $ build/autogen.sh $ ./configure $ make $ LD_PRELOAD="/tmp/libarchive/.libs/libarchive.so" unzip -o test.zip This fix should be part of r356212. So instead of the above procedure, you should be able make lib/archive and LD_PRELOAD the generated library. In my testing environment that's currently in /usr/obj/... $ LD_PRELOAD="/usr/obj/.../amd64.amd64/lib/libarchive/libarchive.so" unzip -o test.zip
Libarchive 3.4.2 will be merged to 12-STABLE, 11-STABLE and 10-STABLE in about 1 week.
I noticed an upgrade to src/contrib/libarchive, rebuilt my 11.x world and voila, both unzip(1) and tar(1) can now extract files put together with my sample Python-script. Thank you. The libarchive commit didn't mention this ticket, can it be closed or must something else happen (like 10.x update)?
10.x is an EOL branch. Given the fix in 11, I think this can be resolved.