Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

builder: Optionally compress man & info pages. Resolves #16 #26

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joebonrichie
Copy link
Contributor

@joebonrichie joebonrichie commented Sep 17, 2022

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

@joebonrichie
Copy link
Contributor Author

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.

@joebonrichie joebonrichie force-pushed the compress-man branch 2 times, most recently from efc0409 to 308df4b Compare January 14, 2023 11:22
@joebonrichie joebonrichie changed the title builder: Automatically compress man pages. Resolves #16 builder: Optionally compress man & info pages. Resolves #16 Jan 14, 2023
@joebonrichie joebonrichie force-pushed the compress-man branch 4 times, most recently from a2978d5 to d84f81a Compare January 15, 2023 09:32
@sunnyflunk
Copy link
Contributor

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.

@joebonrichie
Copy link
Contributor Author

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.

@joebonrichie
Copy link
Contributor Author

joebonrichie commented Jan 16, 2023

@joebonrichie
Copy link
Contributor Author

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

@joebonrichie
Copy link
Contributor Author

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

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants