[Bug 221349] When COMPRESS_EXT is anything other than .gz, plist may break
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Sep 5 18:14:54 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221349
Mikhail Teterin <mi at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Closed |Open
Resolution|Works As Intended |---
CC| |mi at FreeBSD.org
--- Comment #2 from Mikhail Teterin <mi at FreeBSD.org> ---
If it is possible to specify a different extension for the compressed man-pages
-- if the COMPRESS_EXT knob is exposed -- then it should be respected. The
truth of this statement seems self-evident.
And it is respected in the src/ part of FreeBSD -- and has been for many years.
The ports/ part, however, ignores the knob. The ".gz" is hardcoded in multiple
parts of bsd.port.mk. This is wrong regardless of whether or not mandoc -- who
calls it directly anyway? -- can or cannot read files compressed by anything
other than libz itself.
> While man itself can still work with other compression formats due to the
> fact we do still use the shell wrapper on top of mandoc, other tools
> cannot, so supporting anything else than .gz in ports as no sense.
I'm not sure, what "other tools" you have in mind here, but chances are, by the
time we replace the man-script with anything else (what? why?), that something
else will be able to read the other formats the way zcat already can.
Since filing this ticket two years ago, I switched all my machines to compress
man-pages with "xz -9" (COMPRESS_CMD), while still using the ".gz" extension
(COMPRESS_EXT). This creates strangely-named (perhaps MISnamed) files:
% file /opt/man/man1/pkg_glob.1.gz /usr/share/man/man1/ls.1.gz
/opt/man/man1/pkg_glob.1.gz: XZ compressed data
/usr/share/man/man1/ls.1.gz: XZ compressed data
but otherwise works fine -- the texts are compressed most efficiently, while
working around the bug in bsd.port.mk.
I understand, that fixing it is not trivial, because some of the ported
software compresses man-pages (with gzip) on its own. Ideally, these would be
uncompressed and then redone with the specified COMPRESS_CMD.
Alternatively, you could declare, that COMPRESS_CMD (and COMPRESS_EXT) are not
applicable to and ignored by the ports/ world. But then you'll need to
change/patch the few ports, that currently respect the two knobs (or try to) --
ports-mgmt/pkg itself included. (I do not like this option, but it would, at
least, be consistent.)
At any rate, the resolution "Works As Intended" is wrong -- because it does
not. If portmgr@ does not want to fix this -- but still wishes the ticket
closed for some reason -- something like "Not Accepted" should be the
resolution.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ports-bugs
mailing list