Porteus-v3.2.2 bug reports here

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
port
Samurai
Samurai
Posts: 131
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Porteus-v3.2.2 bug reports here

Post#211 by port » 08 Aug 2017, 17:38

Possible bug with man configuration...

When I activate a module with man pages in a folder other than /usr/man porteus cannot find the page and launch a lynx search over internet.

This is what /usr/local/bin/man does, check for man page existence and open it with /usr/bin/man if exist or looking for it in internet if not

But the problem is /usr/bin/man only look for man pages in /usr/man and /usr/local/man, whatever it is stated in /etc/man.conf

In /etc/man.conf file I can see:

Code: Select all

#
MANPATH /usr/man
MANPATH /usr/share/man
MANPATH /usr/local/man
MANPATH /usr/local/share/man
MANPATH /usr/X11R6/man
#
# Uncomment if you want to include one of these by default
#
# MANPATH       /opt/*/man
# MANPATH       /usr/lib/*/man
# MANPATH       /usr/share/*/man
# MANPATH       /usr/kerberos/man
#
MANPATH_MAP     /bin                    /usr/share/man
MANPATH_MAP     /sbin                   /usr/share/man
MANPATH_MAP     /usr/bin                /usr/share/man
MANPATH_MAP     /usr/sbin               /usr/share/man
MANPATH_MAP     /usr/local/bin          /usr/local/share/man
MANPATH_MAP     /usr/local/sbin         /usr/local/share/man
MANPATH_MAP     /usr/X11R6/bin          /usr/X11R6/man
MANPATH_MAP     /usr/bin/X11            /usr/X11R6/man
MANPATH_MAP     /usr/bin/mh             /usr/share/man
So man should look for man pages in /usr/man, /usr/share/manm /usr/local/man, /usr/local/share/man and /usr/X11R6/man but it doesn't:

Code: Select all

# ls /usr/share/man/man1/
rnm.1.gz

# /usr/bin/man -d rnm
Reading config file /etc/man.conf
Looked whether there exists a message catalog man, but there is none
(and for English messages none is needed)

found man directory /usr/man
found man directory /usr/share/man
found man directory /usr/local/man
found man directory /usr/local/share/man
found man directory /usr/X11R6/man
found manpath map /bin --> /usr/share/man
found manpath map /sbin --> /usr/share/man
found manpath map /usr/bin --> /usr/share/man
found manpath map /usr/sbin --> /usr/share/man
found manpath map /usr/local/bin --> /usr/local/share/man
found manpath map /usr/local/sbin --> /usr/local/share/man
found manpath map /usr/X11R6/bin --> /usr/X11R6/man
found manpath map /usr/bin/X11 --> /usr/X11R6/man
found manpath map /usr/bin/mh --> /usr/share/man

using /usr/bin/less -is as pager

using /usr/bin/lynx as browser

using /usr/bin/lynx -dump to dump HTML pages as text
adding /usr/local/man to manpath
adding /usr/man to manpath
No manual entry for rnm
As you can see from debug info, man is reading the proper config file /etc/man.conf and is parsing the mapath info but for any reason it doesn't init properly the MANPATH env var
I think the problem is the last 3 lines of debug info, specially those adding paths to manpath, they only add /usr/man and /usr/localman

I didn't find any place where MANPATH env variable were set, so there's only to possibilities: setting in /etc/man.conf or hardcoded in binary man

whatever it should set MANPATH env according /etc/man.conf

donald
Full of knowledge
Full of knowledge
Posts: 1125
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Porteus-v3.2.2 bug reports here

Post#212 by donald » 08 Aug 2017, 20:31

I had the same problem with some man files (nvidia)
I could read them if i did a "export MANPATH=/usr/share/man/" for example.

But because this is only a temporary solution, i added the needed path in:
/etc/profile at the "export MANPATH=" line

port
Samurai
Samurai
Posts: 131
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Porteus-v3.2.2 bug reports here

Post#213 by port » 09 Aug 2017, 07:00

yes, that's a solution, thanks to point it out. But the bug itself is man seems not to follow the settings in its own config file etc.conf. You shouldn't have to use that workaround because man should read properly etc.conf and update MANPATH consistently

donald
Full of knowledge
Full of knowledge
Posts: 1125
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Porteus-v3.2.2 bug reports here

Post#214 by donald » 09 Aug 2017, 15:21

Hello port

Out of curiosity i commented out the MANPATH line in /etc/profile > log out/in >
"echo $MANPATH" shows nothing now > copied some man files (folder) into /usr/local/share, and BINGO they were displayed.
(and also the nvidia man files which were not displayed previously)

Please test by yourself - It looks like the MANPATH setting in /etc/profile is the culprit.

port
Samurai
Samurai
Posts: 131
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Porteus-v3.2.2 bug reports here

Post#215 by port » 09 Aug 2017, 17:12

donald wrote:
09 Aug 2017, 15:21
Out of curiosity i commented out the MANPATH line in /etc/profile > log out/in >
"echo $MANPATH" shows nothing now > copied some man files (folder) into /usr/local/share, and BINGO they were displayed.
(and also the nvidia man files which were not displayed previously)

Please test by yourself - It looks like the MANPATH setting in /etc/profile is the culprit.
bingo! culprit located! thanks donald! now man reads properly the man.conf file and sets up MANPATH according to it.

Program man has a priority when looking for man pages and one of the highest one is environment var MANPATH, if it is set it will use whatever it points to. Since MANPATH was being setting up in /etc/profile it doesn't matter what /etc/man.conf established, even when man was correctly reading /etc/man.conf and adding paths and maps stated there, as there was a MANPATH env var stablished man only used that

so, with current /etc/profile setting up MANPATH you always has the path for man pages hardcoded:

Code: Select all

guest@porteus:~$ /usr/bin/man -w
/usr/local/man:/usr/man
while commenting it out you get what is stablished in /etc/man.conf:

Code: Select all

guest@porteus:~$ /usr/bin/man -w
/opt/jdk/man:/usr/share/man:/usr/man:/usr/local/man:/usr/X11R6/man
Probably there would be a good reason to setting MANPATH hardcoded in /etc/profile but I cannot see it, the right place to set man paths and maps is /etc/man.conf so I recommend to comment or remove the setting of MANPATH in /etc/profile, unless somebody give a reason not to do it

Post Reply