Monday, September 07, 2026

Re: NEW: archivers/7zip

I attach a port of archivers/7zip 26.03 with extra features. This port is a work in progress. It can't be imported as is, because it replaces p7zip, but I didn't make the diff to add a quirk and change deps from p7zip to 7zip. I am running it on amd64 and macppc, but "7z b" is claiming 8 cpus on my 4-core amd64, so I might want to fix that. On Wed, 2 Sep 2026 15:56:39 +0100 Stuart Henderson <stu@spacehopper.org> wrote: > On 2026/09/01 22:33, George Koehler wrote: > > My port of 24.08 also downloaded the linux-arm binary to install its > > HTML manual. (The HTML came with the binaries, but not with the > > source.) This is less than useful, because browsers like firefox > > don't unveil /usr/local/share/doc/7zip/MANUAL/ (but I was reading it > > with emacs M-x eww). A manpage would be more useful. > > they generally do have /usr/local/share unveiled read-only? I didn't know that. It just works to paste /usr/local/share/doc/7zip/MANUAL/start.htm into my firefox-esr. The extra features in this port (versus the port of 26.02) are: - Change version to 26.03, released last week. - Set MAINTAINER to me. - Change the build from standalone 7zz to modular 7z. - Move RAR decompression to a module in the 7zip-rar subpackage. - Add 7zCon.sfx for self-extracting archives. - Add patches for pledge(), adapted from our p7zip patches. - Add the HTML manual. - Add a new 7z.1 manual. The hard part is the RAR decompression. I want to decompress .rar, but other people want to avoid the unRAR license restriction. Other distros in repology like to build 7zip with DISABLE_RAR_COMPRESS=1 which disables the unRAR code: you can list a .rar file, and you might extract a file if it wasn't compressed, but you can't decompress. The .rar handler can decompress with codecs from an external module. p7zip built Rar.so, and we put it in our p7zip-rar subpackage. Debian patched 7zip to add a makefile for Rar.so, and put it in their 7zip-rar package. I tried to follow Debian's example, but my Rar.so (for 7zip 24.08) failed to extract my old .rar file. It got, "ERROR: Unsupported Method", while writing a partly correct extract. Last Friday, I found the problem. I forgot CRC.o. My Rar.so had the files from DISABLE_RAR_COMPRESS=1, plus some .o files to fill in undefined symbols, but missed CRC.o. It needs CRC.o to run a C++ global constructor to initialize crc32. Some .rar files don't need crc32, but mine did. CRC.o fixed it. (I checked by extracting the same .rar with archivers/unrar and archivers/libarchive.) Upstream defines 4 variants of 7z: 7z modular 7zz standalone, all formats 7za standalone, fewer formats 7zr standalone, fewest formats Debian builds all 4, though their 7zz can't decompress .rar because it doesn't load Rar.so. My port builds only 7z, and symlinks 7z[zar] to 7z. I build 7z so Rar.so can be a module. If I didn't want a module, I would build 7zz and link 7z to 7zz. Either way, this port would replace p7zip, as this 7z replaces p7zip's 7z. The port now fetches 2 files, 7z2603-src.tar.xz and 7z2603-linux-arm.tar.xz; there is no DIST_SUBDIR. It installs the HTML manual from linux-arm. I also wrote a new 7z.1, just so I can "man 7z" instead of opening the HTML; but my 7z.1 lists fewer than half of 7z's many flags. --gkoehler

No comments:

Post a Comment