i use mandoc as my man renderer, and as a result, want man pages that aren't bzip2'd. So in my make.conf, i have: PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="[1-9] n [014]p [1357]ssl 3pcap [1-9]bsd" This doesn't seem to be respected by the gawk ebuild; its man pages are still bzip2'd on install. i can, of course, manually uncompress any man pages in this situation, but i'm wondering if there's something i need to be doing / not doing, or whether this is a bug? Will attach `emerge --info`. Reproducible: Always
Created attachment 913904 [details] Output of `emerge --info`
Ping? i've just had occasion to need to check the OpenRC man pages, and noticed that they're affected by this issue as well.
I think you may need to do some more analysis here. I don't see the gawk ebuild doing anything wrong, nor it compressing w/ bzip2 in the build system, which means it has to be either misconfiguration on your part, or a Portage bug (which is not at all impossible). Especially so if it affects sys-apps/openrc too.
Well, i'm not sure what i need to do to analyse this further, particularly if it's a Portage bug. i certainly didn't have this issue on my previous laptop, which i stopped using around the middle of last year. i was using the same value for PORTAGE_COMPRESS_EXCLUDE_SUFFIXES, which i'd set up as a result of the discussion in https://bugs.gentoo.org/836367, which itself led me to create the Mandoc page on the wiki, and to create the script at https://wiki.gentoo.org/wiki/User:Flexibeast/guides/Making_man_pages_usable_after_switching_from_man-db_to_mandoc (which i ran after installing Gentoo on this box). i'll upload a diff of the old make.conf and my current make.conf as soon as i post this. i've just done `emerge -1 file`, and that seemed to respect PORTAGE_COMPRESS_EXCLUDE_SUFFIXES, in that file.1 was re-installed uncompressed. Can you suggest what i should look into in order to work out whether it's PEBKAC or Portage or something else .... ?
Created attachment 920456 [details, diff] Diff of make.conf from previous system vs make.conf from current system
If you could try make a minimal ebuild that demonstrates the problem (and calls either `doman` or `cp`s something into /usr/share/man/whatever in case `doman` works and emulating-something-installed-by-the-build-system doesn't), and then confirm that it does the wrong thing (with just some environment variable like PORTAGE_COMPRESS_EXCLUDE_SUFFIXES exported) in, say, a clean stage3 unpacked to /tmp/whatever, that'd be very helpful.
Okay, thanks, i'll see what i can do.
I just tried the reproduce this myself. It looks like several manpages are installed with the suffix ".3am". > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man1 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man1/pm-gawk.1 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man1/gawkbug.1 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man1/gawk.1 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/time.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/rwarray.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/revtwoway.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/readfile.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/revoutput.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/readdir.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/ordchr.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/inplace.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/fork.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/fnmatch.3am.bz2 > /x/portage/sys-apps/gawk-5.3.1/image/usr/share/man/man3/filefuncs.3am.bz2 This pattern is not covered by your PORTAGE_COMPRESS_EXCLUDE_SUFFIXES setting.
I will also note that you could instead set PORTAGE_COMPRESS=gzip to have the manpages compressed in a format that mandoc can process.
i've not been trying to look at the .3am files, but as a test, i just added '3am' to PORTAGE_COMPRESS_EXCLUDE_SUFFIXES, and re-emerged gawk, to see if that influenced what happened with e.g. gawk.1. It was still installed bz2-compressed. However, looking at the file lists for both the 'gawk' package and the 'openrc' packages, to check for other extensions i might need to add to the list of suffix patterns, the man pages are listed as _already bzip2-compressed_: ``` ... /usr/share/man/man1/gawk.1.bz2 /usr/share/man/man1/gawkbug.1.bz2 /usr/share/man/man1/pm-gawk.1.bz2 ... ``` ``` ... /usr/share/man/man8/openrc-init.8.bz2 /usr/share/man/man8/openrc-run.8.bz2 /usr/share/man/man8/openrc-shutdown.8.bz2 ... ``` Whereas, for example, the man pages for `file` are not: ``` ... /usr/share/man/man1/file.1 /usr/share/man/man3 /usr/share/man/man3/libmagic.3 /usr/share/man/man5 /usr/share/man/man5/magic.5 ... ``` So to me, that explains what i'm observing. However, i believe that the above raises a new issue: setting PORTAGE_COMPRESS=gzip doesn't have any effect on 'pre-compressed' man pages. i just added that setting to my make.conf and re-emerged both gawk and openrc; unsurprisingly, the man pages were still installed bzip2-compressed. If others can confirm this behaviour, it suggests to me that Portage's compression logic needs to be modified to handle 'pre-compressed' pages. Presumably this would mean the value of PORTAGE_COMPRESS_EXCLUDE_SUFFIXES would then be honoured. (As an aside: Yes, i'm aware of the possibility of setting PORTAGE_COMPRESS to 'gzip', as was noted in https://bugs.gentoo.org/836367. i made some comments about that in https://bugs.gentoo.org/836367#c11, but also, as someone who spends a lot of time working on man pages - cf. https://wiki.gentoo.org/wiki/User:Flexibeast#The_s6_ecosystem - and who therefore regularly wants to examine man page sources, i'd much rather the man pages not be compressed. Particularly as space savings of a few dozen megabytes, as described in #836367, are not something i'm bothered about in the context of my 500G SSD. Since PORTAGE_COMPRESS_EXCLUDE_SUFFIXES has been made available, i want to make use of it.)
I'm not convinced by this still. We have QA warnings for pre-compressed man pages. I also use PORTAGE_COMPRESS=xz and my gawk man pages are .xz. I also don't see where such pre-compression would be occurring for gawk or openrc.
i'd assumed it was being done by upstream somehow. But doing e.g. `ebuild gawk-5.3.1.ebuild unpack` and looking in the doc/ directory shows gawk.1, not gawk.1.bz2; and manually installing via `./configure; make; make install` shows the installation of /usr/local/share/man/man1/gawk.1, not .../gawk.1.bz2. Well, i guess i'll just have to dig around and see what's going on in my system for PORTAGE_COMPRESS to not be having any effect. If i find a solution, i'll report back here (acknowledging that this bug has been closed as RESOLVED INVALID).
My guess is that your PORTAGE_COMPRESS_EXCLUDE_SUFFIXES setting is getting overridden via bashrc or package.env. The gawk and openrc packages do not install pre-compressed man pages.
(In reply to Alexis from comment #12) > acknowledging that this bug has been closed as RESOLVED INVALID. The bug can be reopened in the event that we find a real problem, of course.
It seems like the issue is using binhost packages: i have getbinpkg in FEATURES, and both gawk and openrc are being installed from the Gentoo binhost, thus bypassing the ebuilds. If i force local compilation via e.g. `emerge -1 --usepkg-exclude=gawk gawk` (is there a better way of doing this?), then PORTAGE_COMPRESS_EXCLUDE_SUFFIXES is indeed honoured. i guess i should add a comment about this on the Mandoc wiki page ....
(In reply to Alexis from comment #15) You probably shouldn't use the binhost at all since any package that has manpages will have the same issue; the compression takes place before the binpkg is created.
Yeah. But the benefits of using the binhost are much greater for me than the cost of running my `decompress-man-pages` shell script at the end of my (system) `update` script / after a manual package install, so i'll just go with that. :-)