Re: Altering the MANPATH in RPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Riku Meskanen wrote:

>On Mon, 29 Apr 2002, Thomas Dodd wrote:
>
>>So the package needs to drop a file in /etc/profile.d
>>that sets the executable path to /opt/foo/bin
>>and man will aututomatically add /opt/foo/man
>>to the MANPATH. It will also look for /opt/foo/bin/man
>>if you don't want seperate bin and man dirs for each package.
>>
>>I losty the exact layout you wanted to use, but I think these
>>options should do what you need.
>>
>I agree, provided that you have the PATH included
>all applications bin directories there, but that's
>unfortunately the weak point too because you don't
>have PATH populated with all software you have insalled.
>
>As you build a servers of your own or work on some that
>someone else has built you may find that there are few
>options how to set up software. Some styles are simple,
>some not but work better when you have lot of software.
>
>Some of the ways to work out environment for /opt
>applications are
>
> a) You add PATH, MANPATH, LD_LIBRARY_PATH etc to all
>
Handled by man by default with AUTOPATH so
MANPATH can be left alone. Just fix PATH

>
> b) You create and maintain shell function or aliases
>
This could also add MANPATH at import time.

> c) You set up link- and/or shellscript farm to /opt/bin
>    which is only /opt entry included in PATH variable.
>    When user references the applicatinon the shell script,
>    is invoked from /opt/bin which then sets the environment
>    before launching the application from /opt/application/bin.
>
So add a man link farm as /opt/man to match those in
/opt/bin

>One very important thing that I have learned past years,
>"One size fits for all" does not work for all for all
>and it's very good to have options how to set up software.
>
>IMO, the man.config.d and MANPATH globbing serves b) and
>c) very well :)
>
The man.config.d idea is nice. But solutions already exist.
The question related to a way for RPM to do this.

The solution is if RPM installs executables in <somepath>
then put manpages in either <somepath>/man/man* or
in <somepath>/../man/man*, and either drops something into
/etc/profile.d (prefered) or the users add <somepath> to
their login scripts.

This works with man on recent linux distributions
like Red Hat 7+ at least, probably older ones.

    -Thomas




_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux