Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 589072 - No manpage reader is installed by default by RAP.
Summary: No manpage reader is installed by default by RAP.
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 11:49 UTC by Martin Mokrejš
Modified: 2021-01-06 13:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2016-07-18 11:49:19 UTC
Hi,
  I see this issue on Gentoo::RAP install. I realzied I have no sys-apps/man installed and therefore, the /usr/bin/man does not look into the manpages in /scratch/mmorkejs/gentoo_rap prefix. although this is probably a samtools package issue, could this be caught in general by portage? Lets say raise QA issue if a package install *.[0-9] file into a path like "man/"?

$ USE="man doc" emerge -pv samtools

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sci-biology/samtools-1.3-r1::gentoo  USE="-examples" PYTHON_TARGETS="python2_7" 0 KiB
$
Comment 1 Mike Gilbert gentoo-dev 2016-07-18 16:01:39 UTC
Can you please better describe the issue you are reporting?

> I see this issue on Gentoo::RAP install

What is Gentoo::RAP?

> I realzied I have no sys-apps/man installed

Perhaps you have sys-apps/man-db installed instead?

> therefore, the /usr/bin/man does not look into the manpages in /scratch/mmorkejs/gentoo_rap prefix

What? I do not understand this conclusion.
Comment 2 Martin Mokrejš 2016-07-18 16:26:33 UTC
(In reply to Mike Gilbert from comment #1)
> Can you please better describe the issue you are reporting?
> 
> > I see this issue on Gentoo::RAP install
> 
> What is Gentoo::RAP?

An alternative to Getoo:Prefix, see https://wiki.gentoo.org/wiki/Prefix/libc .
In respect to this issue, one can install Gentoo Linux into "prefixed" location on another OS. I installed in on a Redhat system (providing the /usr/bin/man utility and obviously, unless the man utility installed in Gentoo:RAP is installed the RedHat'provided man binary has no way to know about the Gentoo installation and its own manpages.

Gentoo:RAP uses the main Gentoo portage tree (unlike Gentoo:Prefix).

> 
> > I realzied I have no sys-apps/man installed
> 
> Perhaps you have sys-apps/man-db installed instead?

No, not really:

$ emerge -pv sys-apps/man-db

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-text/manpager-1::gentoo  0 KiB
[ebuild  N     ] sys-apps/groff-1.22.3::gentoo  USE="X -examples" 0 KiB
[ebuild  N     ] dev-perl/SGMLSpm-1.1-r1::gentoo  0 KiB
[ebuild  N     ] app-text/opensp-1.5.2-r4::gentoo  USE="nls -doc -static-libs {-test}" 0 KiB
[ebuild  N     ] dev-perl/Text-CharWidth-0.40.0-r1::gentoo  0 KiB
[ebuild  N     ] dev-libs/libpipeline-1.4.1::gentoo  USE="-static-libs {-test}" 0 KiB
[ebuild  N     ] dev-perl/Text-WrapI18N-0.60.0-r1::gentoo  0 KiB
[ebuild  N     ] app-text/openjade-1.3.2-r6::gentoo  USE="-static-libs" 0 KiB
[ebuild  N     ] app-text/po4a-0.45-r3::gentoo  USE="{-test}" LINGUAS="cs -af -ca -da -de -eo -es -et -eu -fr -hr -id -it -ja -kn -ko -nb -nl -pl -pt -pt_BR -ru -sl -sv -uk -vi -zh_CN -zh_HK" 0 KiB
[ebuild  N     ] sys-apps/man-db-2.7.5::gentoo  USE="berkdb gdbm manpager nls zlib (-selinux) -static-libs" 0 KiB

Total: 10 packages (10 new), Size of downloads: 0 KiB
$

> 
> > therefore, the /usr/bin/man does not look into the manpages in /scratch/mmokrejs/gentoo_rap prefix
> 
> What? I do not understand this conclusion.

$ echo $PATH
/scratch/mmokrejs/gentoo_rap/usr/local/bin:/scratch/mmokrejs/gentoo_rap/usr/bin:/scratch/mmokrejs/gentoo_rap/bin:/scratch/mmokrejs/gentoo_rap/opt/bin:/scratch/mmokrejs/gentoo_rap/usr/sbin:/scratch/mmokrejs/gentoo_rap/sbin:/scratch/mmokrejs/gentoo_rap/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/usr/bin:/bin:/home/mmokrejs/bin
$

As you can see, the Gentoo Linux-provided binaries have precedence over the tools and libs (although now LD_LIBRARY_PATH is not shown here) provided by the host RedHat Linux(with 2.12 glibc, too old to compile apps against).


So, I could say sci-biology/samtools package needs to respect IUSE flag before "doman *.1" would be allowed and that something should ensure that there is a utility to actually read the manpages. However, I think emerge could ensure this by default - that there is sys-apps/man installed before any USE=man is accepted. Therefore, I don't think is actually a samtools package issue but a general DEPENDency issue.

I assume sys-apps/man is needed because I want the package with a man executable to be included in the DEPENDencies:

other_Gentoo_host # equery belongs /usr/bin/man
 * Searching for /usr/bin/man ... 
sys-apps/man-1.6g (/usr/bin/man)
other_Gentoo_host#

Surely, one could argue whether we want to require a manpage reader to be installed prior to any manpage file being qmerged, especially because some manpages are pre-formatted and do not need mandoc/troff/groff or whatever are the formatting utilities.
Comment 3 Mike Gilbert gentoo-dev 2016-07-18 22:10:18 UTC
I still don't understand what problem you are experiencing.
Comment 4 Benda Xu gentoo-dev 2016-07-19 00:37:08 UTC
Hi Martin,

I thi
Comment 5 Benda Xu gentoo-dev 2016-07-19 00:37:46 UTC
Hi Martin,

I don't think this
Comment 6 Benda Xu gentoo-dev 2016-07-19 00:53:26 UTC
Hi Martin,

I don't think this a valid issue.  Because:

  1. doman guarantees the manpages are installed into the correct directory.
  2. How you read the manpages is another story, it could be sys-apps/man-db, sys-apps/man, or emacs woman.
  3. sys-apps/man-db is in @system for Gentoo in general.  But I chose to remove man-db from @system because it is not essential for a RAP system to function.
  4. You can still use host /usr/bin/man to access Gentoo manpages.  Please env-update and inspect if MANPATH is set correctly.

Therefore I intend to close this bug as invalid. What do you think?


(In reply to Martin Mokrejš from comment #0)
> the /usr/bin/man does not look into the manpages in
> /scratch/mmorkejs/gentoo_rap prefix. 

I does look into gentoo if you have MANPATH environment variable set (in EPREFIX/etc/env.d).

> although this is probably a samtools
> package issue, could this be caught in general by portage? Lets say raise QA
> issue if a package install *.[0-9] file into a path like "man/"?

That unnecessarily complicates things, which I don't want.
 
> $ USE="man doc" emerge -pv samtools
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild   R    ] sci-biology/samtools-1.3-r1::gentoo  USE="-examples"
> PYTHON_TARGETS="python2_7" 0 KiB
> $

USE flags are not for this purpose.  USE=man does not guarantee you have a man reader.

(In reply to Martin Mokrejš from comment #2)

> So, I could say sci-biology/samtools package needs to respect IUSE flag
> before "doman *.1" would be allowed and that something should ensure that
> there is a utility to actually read the manpages. 

No it should not do that.

> However, I think emerge
> could ensure this by default - that there is sys-apps/man installed before
> any USE=man is accepted.

This cannot be done globally.

> Therefore, I don't think is actually a samtools
> package issue but a general DEPENDency issue.
> 
> Surely, one could argue whether we want to require a manpage reader to be
> installed prior to any manpage file being qmerged, especially because some
> manpages are pre-formatted and do not need mandoc/troff/groff or whatever
> are the formatting utilities.

And come on.  It just a package.  emerge sys-apps/man and everyone is happy.
Comment 7 Martin Mokrejš 2016-07-19 06:38:28 UTC
(In reply to Benda Xu from comment #6)
> Hi Martin,
> 
> I don't think this a valid issue.  Because:
> 
>   1. doman guarantees the manpages are installed into the correct directory.
>   2. How you read the manpages is another story, it could be
> sys-apps/man-db, sys-apps/man, or emacs woman.
>   3. sys-apps/man-db is in @system for Gentoo in general.  But I chose to
> remove man-db from @system because it is not essential for a RAP system to
> function.
>   4. You can still use host /usr/bin/man to access Gentoo manpages.  Please
> env-update and inspect if MANPATH is set correctly.

$ printenv | grep MANPATH
MANPATH=/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/modules/default/Modules/share/man
$

$ env-update
$ printenv | grep MANPATH
MANPATH=/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/modules/default/Modules/share/man
$

Something is wrong.

$ grep MANPATH /scratch/mmokrejs/gentoo_rap/etc/env.d/*
/scratch/mmokrejs/gentoo_rap/etc/env.d/00basic:MANPATH="/scratch/mmokrejs/gentoo_rap/usr/local/share/man:/scratch/mmokrejs/gentoo_rap/usr/share/man"
/scratch/mmokrejs/gentoo_rap/etc/env.d/04gcc-x86_64-pc-linux-gnu:MANPATH="/scratch/mmokrejs/gentoo_rap/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man"
/scratch/mmokrejs/gentoo_rap/etc/env.d/05binutils:MANPATH=/scratch/mmokrejs/gentoo_rap/usr/share/binutils-data/x86_64-pc-linux-gnu/2.26/man
/scratch/mmokrejs/gentoo_rap/etc/env.d/20java-config:MANPATH="/scratch/mmokrejs/gentoo_rap/etc/java-config-2/current-system-vm/man/"
...
$

So is none of the files sourced?

> 
> Therefore I intend to close this bug as invalid. What do you think?

If Gentoo:RAP setups MANPATH properly, I assume /usr/bin/man from Redhat will
start to find manpages installed through Gentoo:RAP, and that will be OK for
me.

> 
> 
> (In reply to Martin Mokrejš from comment #0)
> > the /usr/bin/man does not look into the manpages in
> > /scratch/mmorkejs/gentoo_rap prefix. 
> 
> I does look into gentoo if you have MANPATH environment variable set (in
> EPREFIX/etc/env.d).
> 
> > although this is probably a samtools
> > package issue, could this be caught in general by portage? Lets say raise QA
> > issue if a package install *.[0-9] file into a path like "man/"?
> 
> That unnecessarily complicates things, which I don't want.

Well it is the surprise. I installed apps with USE=man and "man samtools" just
does not find the manpage. ;-)

> > Surely, one could argue whether we want to require a manpage reader to be
> > installed prior to any manpage file being qmerged, especially because some
> > manpages are pre-formatted and do not need mandoc/troff/groff or whatever
> > are the formatting utilities.
> 
> And come on.  It just a package.  emerge sys-apps/man and everyone is happy.

Well, you know, I wanted to report the issue at first.

I do not know why sys-apps/man-db should be preferred over sys-apps/man, as you
see much less is needed to be installed for the latter:

$ emerge -pv sys-apps/man
...
Calculating dependencies... done!
[ebuild  N     ] sys-apps/groff-1.22.3::gentoo  USE="X -examples" 0 KiB
[ebuild  N     ] sys-apps/man-1.6g-r1::gentoo  USE="lzma nls (-selinux)" 251 KiB
$
Comment 8 Martin Mokrejš 2016-07-26 10:28:11 UTC
I just opened bug #589738 happening on this Gentoo:RAP host.
Comment 9 Martin Mokrejš 2016-08-24 08:13:59 UTC
Any chance MANPATH is setup automatically to include my ${EPREFIX} at the very front?
Comment 10 Benda Xu gentoo-dev 2016-08-25 01:29:22 UTC
(In reply to Martin Mokrejš from comment #9)
> Any chance MANPATH is setup automatically to include my ${EPREFIX} at the
> very front?

Hi Martin, this issue is of low priority to me.  If you would like to work out a patch, I am happy to incorporate it.
Comment 11 Benda Xu gentoo-dev 2018-07-02 04:32:23 UTC
What's the status of this bug?
Comment 12 Fabian Groffen gentoo-dev 2021-01-06 13:05:32 UTC
Is this still an issue?  man/man-db should be in @system, and presumably fixed for the Prefix MANPATHs.