Opened 3 months ago
Closed 2 months ago
#20977 closed enhancement (fixed)
Consider archiving unzip and provide it as a symlink to bsdunzip (from libarchive)
Reported by: | Xi Ruoyao | Owned by: | Xi Ruoyao |
---|---|---|---|
Priority: | elevated | Milestone: | 12.3 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
I cannot see any advantage of the old and unmaintained unzip comparing to bsdunzip.
Change History (27)
comment:1 by , 3 months ago
follow-up: 3 comment:2 by , 3 months ago
I can do some testing myself in a bit for packages like Firefox and Thunderbird. I want to test the Node.js dependency anyway.
comment:3 by , 3 months ago
Replying to zeckma:
I can do some testing myself in a bit for packages like Firefox and Thunderbird. I want to test the Node.js dependency anyway.
Firefox, Thunderbird, and Seamonkey built fine after deleting the UnZip binaries, then making unzip symlink pointing to bsdunzip from libarchive.
comment:4 by , 3 months ago
Some git tests fails with the symlink, I'll investigate it later once I set up my working environment in the newly built system (I'm typing this in Lynx). Those tests can be suppressed with GIT_UNZIP=nonexist
. And now out Git page does not list unzip as a dependency at all...
comment:6 by , 3 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Going to do this (also adding GIT_UNZIP=nonexist
for Git test suite) if no further objection, considering we have a security issue here.
follow-up: 8 comment:7 by , 3 months ago
That sounds good to me, but please test building Libreoffice with the symlink, as it uses unzip very heavily throughout it's build process to unzip it's downloaded tarballs. I can test this instead if you'd like, just let me know since I'll probably update Libreoffice at the same time as testing it if we do this :)
comment:8 by , 3 months ago
Replying to Douglas R. Reno:
That sounds good to me, but please test building Libreoffice with the symlink, as it uses unzip very heavily throughout it's build process to unzip it's downloaded tarballs. I can test this instead if you'd like, just let me know since I'll probably update Libreoffice at the same time as testing it if we do this :)
I just finished a test build of libreoffice-25.2.0.3 with the symlink and there were no issues.
comment:9 by , 3 months ago
The progress:
Tested:
- Mozilla trios
- libreoffice
- Git (test only, need to be disabled)
- unzip -a is documented as "auto-convert any text files" but bsdunzip -a is documented as "convert DOS‐style line endings to Unix‐style line endings" (i.e. old Mac style isn't converted).
- fontconfig (test only)
- docbook-45-xml
- docbook5
- perl-archive-zip (test)
- sqlite (doc)
- docbook-4.5-dtd
- docbook-3.1-dtd
- ark
- file-roller
- lynx
- openjdk
- mc
- opencv
- gucharmap
Need to be adapted:
- xarchiver (make 7zip the default, change the dependency to external)
- libgsf (test only, change the dependency to external)
Help needed for testing the remaining packages and/or providing the method to test them.
follow-up: 11 comment:10 by , 3 months ago
mc, libgsf, opencv, gucharmap, and lynx all build fine using the symlink.
With libgsf I saw no mention of unzip at all in the logs and in the make check 2 valgrind tests were skipped instead of failing. It happens if valgrind is installed or not.
comment:11 by , 3 months ago
Replying to Joe Locash:
mc, libgsf, opencv, gucharmap, and lynx all build fine using the symlink.
With libgsf I saw no mention of unzip at all in the logs and in the make check 2 valgrind tests were skipped instead of failing. It happens if valgrind is installed or not.
libgsf needs both p7zip and unzip or these tests won't run.
The problem with lynx is unzip is used at runtime (for the "directory editor") so we need to manually test it. Similarly for things like xarchiver or file-roller.
comment:12 by , 2 months ago
Getting lynx to do this required a bit of configuration
- Edit /etc/lynx/lynx.cfg
- Run something like "lynx file:///sources/sqlite/"
- Select sqlite-doc-{something}.zip and then press F
- Press Enter on Uncompress
That being said, lynx works with the symbolic link. I'm testing the others on another system while I wait on Libreoffice to finish on my main one.
comment:14 by , 2 months ago
file-roller and Ark work well.
xarchiver on the other hand has some issues. It returns an error message saying "Zipinfo mode needs additional options".
comment:15 by , 2 months ago
I ran xarchiver from a terminal and it looks like it's running the following command:
/usr/bin/unzip -Z -l /home/renodr/sqlite-doc-3370200.zip
comment:17 by , 2 months ago
That sounds good, I think after that the archival and then replacement symlink should be good to go
comment:18 by , 2 months ago
If I read the xarchiver code correctly, when 7za (from p7zip or 7zip, see also #21047) is available it's preferred over unzip for the zip files. Thus maybe we can recommend p7zip/7zip for xarchiver for zip files.
Another option is adapting xarchiver to support bsdtar --list --verbose -f
instead of unzip -Z -l
but it would be more difficult.
follow-up: 20 comment:19 by , 2 months ago
It looks like users will need to uncheck the "Prefer unzip for zip files (requires restart)" option in Preferences, but after doing that and restarting xarchiver, it now works with p7zip!
comment:20 by , 2 months ago
Replying to Douglas R. Reno:
It looks like users will need to uncheck the "Prefer unzip for zip files (requires restart)" option in Preferences, but after doing that and restarting xarchiver, it now works with p7zip!
I also tried 7zip and it works as well. But I need to figure out how to make the default of this option off...
comment:22 by , 2 months ago
libgsf test suite wants the "zipinfo" command, which won't be available with the symlink.
comment:23 by , 2 months ago
mc checks if unzip
supports the -Z
flag at the build time, and it falls back to unzip -qq -v
if -Z
is not usable. bsdunzip supports the latter properly.
comment:24 by , 2 months ago
opencv tested. It seems only used for extracting a download file at build time.
I'm in fair of doing this as well, but we'll need to do some testing for packages like libreoffice which use it during it's build process.