Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A mess with man pages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 4045
Location: Rasi, Finland

PostPosted: Fri Mar 21, 2025 4:11 pm    Post subject: A mess with man pages Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6263
Location: Dallas area

PostPosted: Fri Mar 21, 2025 5:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1987
Location: Germany

PostPosted: Fri Mar 21, 2025 5:21 pm    Post subject: Reply with quote

Quote:
man: outdated mandoc.db lacks emerge(1) entry, run makewhatis /usr/share/man

I do not get this error message.

Any specific man page viewed?
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 4045
Location: Rasi, Finland

PostPosted: Fri Mar 21, 2025 5:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 4045
Location: Rasi, Finland

PostPosted: Fri Mar 21, 2025 6:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6263
Location: Dallas area

PostPosted: Fri Mar 21, 2025 7:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 996
Location: The Village, Portmeirion

PostPosted: Sat Mar 22, 2025 12:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum