boulder-d-legacy
boulder-d-legacy copied to clipboard
builder: Optionally compress man & info pages. Resolves #16
Compress any man or info page files found in the manifest with gzip, if enabled by the packager.
There are two considerations:-
- It will increase the size of the resulting .stone file(s),
- Updated symlinks not yet tested on a real install
Just need to find a file with man page symlinks now and should be good to go. There is also an annoying bug where formattedSize introduces some useless whitespace.
Just need to find a file with man page symlinks
Probably easier to add a symlink manually to test. But I'm pretty sure it won't work. The first check ensures only Regular files hit the NextFunction (i.e. so a Symlink will never hit compressPage).
Also with if ((fileInfo.type == FileType.Symlink) && (fileInfo.type != FileType.Directory)) the 2nd check is redundant as if it's a Symlink, then it will always not be a Directory.
This is borked with the new zstd pledged size stuff. With the initial move to zstdoubledee it was working okay. Just hangs forever when emitting the packages. Don't really know what's going on.
Bisected to here: https://github.com/serpent-os/moss-format/commit/641c047c3c602881c6900735f4735e6bfb7c32e0
Seems to be failing to flush (remaining never decreases)
[12:57:12] TRACE FLUSHING remaining 18446744073709551544
from here: https://github.com/serpent-os/moss-format/blob/main/source/moss/format/binary/writer/zstd_token.d#L117
Switched to gzip compression and it's now working, meaning mandb can correctly display the resulting files! Switching to zstd in the future when the high level API is a bit more fleshed out is an option but I don't really want to use the low-level bindings for something like this.
Updated symlinks is now seemingly working (with the xz pkg) but I need to find a package I can safely remove and reinstall in the rootfs to fully test it, which is the last blocker.
[Man] Updated symlink /usr/share/man/ro/man1/unxz.1 to xz.1.gz