View previous topic :: View next topic |
Author |
Message |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 4045 Location: Rasi, Finland
|
Posted: Fri Mar 21, 2025 4:11 pm Post subject: A mess with man pages |
|
|
On most of my systems I get this error messages when trying to view a man page: Code: | man: outdated mandoc.db lacks emerge(1) entry, run makewhatis /usr/share/man | ... ewww. Isn't a filesystem already good enough of a database for man pages? (Running the command does not change anything.)
Anyway. less does try to show the man page despite this error, but all I see is binary data. I quickly noticed that the binary data shown was compressed roff markup (aka man page syntax?). So in addition to some man database shenanigans I also have broken decompressor of man pages.
Questions: - Can I get rid of any databases related to man pages?
- How do I fix this compression issue?
- I'd prefer zstd or lzip compression, but there's no point compressing files that have size less than the filesystem block size.
... also anyone else having these problems? _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6263 Location: Dallas area
|
Posted: Fri Mar 21, 2025 5:12 pm Post subject: |
|
|
Do you have mandoc installed? if so, why? man runs perfectly fine without it.
Edit to add: switch to man-db
From the man virtual
Code: | RDEPEND="
|| (
sys-apps/man-db
>=app-text/mandoc-1.14.5-r1[system-man]
)
" |
So either/or, I've never used mandoc _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Last edited by Anon-E-moose on Fri Mar 21, 2025 5:44 pm; edited 1 time in total |
|
Back to top |
|
 |
Banana Moderator


Joined: 21 May 2004 Posts: 1987 Location: Germany
|
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 4045 Location: Rasi, Finland
|
Posted: Fri Mar 21, 2025 5:54 pm Post subject: |
|
|
Anon-E-moose wrote: | Do you have mandoc installed? if so, why? man runs perfectly fine without it. |
Code: | M710q ~ # equery d mandoc
* These packages depend on mandoc:
sys-libs/efivar-39-r1 (app-text/mandoc)
virtual/man-0-r4 (>=app-text/mandoc-1.14.5-r1[system-man]) |
Code: | M710q ~ # equery u mandoc
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for app-text/mandoc-1.14.6:
U I
- - cgi : build man.cgi web plugin for viewing man pages
+ + system-man : set as the default man provider
- - test : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test
but can be toggled independently) | Ok. Apparently I've misconfigured my systems by setting system-man globally, as I thought it would make sure programs wouldn't bring their own man... Like the opposite of bundled-* -flags.
I'll sort this out first.
Banana wrote: | Any specific man page viewed? | Any. None specific. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 4045 Location: Rasi, Finland
|
Posted: Fri Mar 21, 2025 6:26 pm Post subject: |
|
|
Anon-E-moose wrote: | Edit to add: switch to man-db
From the man virtual
Code: | RDEPEND="
|| (
sys-apps/man-db
>=app-text/mandoc-1.14.5-r1[system-man]
)
" |
So either/or, I've never used mandoc | I was just digging into that too.
But: Code: | NBLK-WAX9X ~ # qsearch man-db
sys-apps/man-db: A man replacement that utilizes dbm instead of flat files | :'(
I guess I'll take the database then, but can't I just have compressed man files? :(
I mean, it can't be very complex to- locate the right man page from filesystem
- uncompress it
- pipe it to roff formatter
- pipe to a pager
I mean this cannot be a place where a database brings any significant advantages? Right? Am I missing something? _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6263 Location: Dallas area
|
Posted: Fri Mar 21, 2025 7:04 pm Post subject: |
|
|
I don't use a db, despite the name, all man pages are bz2 compressed files
I think man-db will allow you to use a database, but doesn't require it, and man <>, always uses less for viewing, although settable.
Edit to add: I guess it does do a database, but it's transparent to me (end user)
Code: | $ file /var/cache/man/index.db
/var/cache/man/index.db: GNU dbm 1.x or ndbm database, little endian, 64-bit |
These are the flags I use, although I suppose only one db type is needed
Code: | * Found these USE flags for sys-apps/man-db-2.9.4-r1:
U I
+ + berkdb : Add support for sys-libs/db (Berkeley DB for MySQL)
+ + gdbm : Add support for sys-libs/gdbm (GNU database libraries)
+ + manpager : Enable manpager wrapper for colorizing output
- - nls : Add Native Language Support (using gettext - GNU locale utilities)
+ + seccomp : Enable seccomp (secure computing mode) to perform system call filtering at runtime to increase
security of programs
- - static-libs : Build static versions of dynamic libraries as well
+ + zlib : Add support for zlib compression |
The logic of the ebuild selects either gdbm or db and if neither flag is set forces gdbm (which is a real light weight db) _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
 |
skellr l33t


Joined: 18 Jun 2005 Posts: 996 Location: The Village, Portmeirion
|
Posted: Sat Mar 22, 2025 12:12 am Post subject: |
|
|
Anon-E-moose wrote: | all man pages are bz2 compressed files |
Yeah they/documentation are compressed with bz2 by default.
I remember "back in the day" a slight lag decompressing a bz2 man page on a pentium4 and was triggered by it. I mean, how big is a man page anyway? I'm thankfull I started on this journey with i686...
PORTAGE_COMPRESS="" in make.conf will disable compression. There are other compression options in make.conf.5
Code: | PORTAGE_COMPRESS = "bzip2"
This variable contains the command used to compress documentation during the install phase.
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES = "gif htm[l]? jp[e]?g pdf png"
This variable contains a space delimited list of file suffixes for which matching files are excluded when the PORTAGE_COMPRESS command is called. Regular expressions are supported and the match is performed only against the portion of the file name which follows the last period character.
PORTAGE_COMPRESS_FLAGS = "-9"
This variable contains flags for the PORTAGE_COMPRESS command. |
And then, everything in /usr/share/doc is also compressed. Try browsing a local HTML doc in a web browser when it's compressed... |
|
Back to top |
|
 |
|