little trap for those compiling own source - Slackware

This is a discussion on little trap for those compiling own source - Slackware ; Hi there, Just updated iptables on slack-11, no 'man iptables' afterwards, where'd it go? /usr/local/share/man ... Doh! So I added this to .bashrc: MANPATH=/usr/local/share/man:$MANPATH Dunno why /usr/local/man is on the nose these days. Grant. -- http://bugsplatter.id.au/...

+ Reply to Thread
Results 1 to 16 of 16

Thread: little trap for those compiling own source

  1. little trap for those compiling own source

    Hi there,

    Just updated iptables on slack-11, no 'man iptables' afterwards,
    where'd it go?

    /usr/local/share/man ... Doh!

    So I added this to .bashrc:
    MANPATH=/usr/local/share/man:$MANPATH

    Dunno why /usr/local/man is on the nose these days.

    Grant.
    --
    http://bugsplatter.id.au/

  2. Re: little trap for those compiling own source

    On 2008-09-12, Grant wrote:
    > Hi there,
    >
    > Just updated iptables on slack-11, no 'man iptables' afterwards,
    > where'd it go?
    >
    > /usr/local/share/man ... Doh!
    >
    > So I added this to .bashrc:
    > MANPATH=/usr/local/share/man:$MANPATH
    >
    > Dunno why /usr/local/man is on the nose these days.


    configure --prefix=/usr/local also helps, assuming there is a proper
    configure.

    Bud

  3. Re: little trap for those compiling own source

    On Fri, 12 Sep 2008 09:23:29 -0500, wrhamblen wrote:

    > On 2008-09-12, Grant wrote:
    >> Hi there,
    >>
    >> Just updated iptables on slack-11, no 'man iptables' afterwards,
    >> where'd it go?
    >>
    >> /usr/local/share/man ... Doh!
    >>
    >> So I added this to .bashrc:
    >> MANPATH=/usr/local/share/man:$MANPATH
    >>
    >> Dunno why /usr/local/man is on the nose these days.

    >
    > configure --prefix=/usr/local also helps, assuming there is a proper
    > configure.


    That's generally the default $prefix and it's also probable that is where
    the OP will find his new iptables. Since his $PATH probably has
    /usr/local/bin|sbin *last* he will also execute the original iptables when
    he tries to use the new one.


  4. Re: little trap for those compiling own source

    Dave Uhring wrote:

    > Since his $PATH probably has /usr/local/bin|sbin *last* he will also
    > execute the original iptables when he tries to use the new one.


    Why on earth would you consider that "probable"??? Isn't it more likely
    that people want to run locally installed software as a preference and
    therefore put local directories in their paths first?

    In fact, I'm quite sure that even a default Slackware installation lists
    local directories first (it does ...):

    /etc/old/login.defs.original:
    ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
    ENV_PATH PATH=/usr/local/bin:/bin:/usr/bin

    /etc/old/profile.original:
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"
    PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH

    I think the OP's $PATH "probably" DOESN'T have /usr/local/{s,}bin last.

    --
    ----------------------------------------------------------------------
    Sylvain Robitaille syl@alcor.concordia.ca

    Network and Systems analyst Concordia University
    Instructional & Information Technology Montreal, Quebec, Canada
    ----------------------------------------------------------------------

  5. Re: little trap for those compiling own source

    On Fri, 12 Sep 2008 15:32:21 +0000, Sylvain Robitaille wrote:

    > Dave Uhring wrote:
    >
    >> Since his $PATH probably has /usr/local/bin|sbin *last* he will also
    >> execute the original iptables when he tries to use the new one.

    >
    > Why on earth would you consider that "probable"??? Isn't it more likely
    > that people want to run locally installed software as a preference and
    > therefore put local directories in their paths first?


    I don't think that the OP had a clue where his 'make install' instruction
    put things. That is clearly evidenced by his surprise at finding the man
    page in /usr/local/man.

    > In fact, I'm quite sure that even a default Slackware installation lists
    > local directories first (it does ...):


    OK, I always set my own PATH in ~/.bashrc and /usr/local/bin|sbin is
    always next to last before /usr/games. It makes no sense for the shell to
    search mostly empty directories before finding the invoked executable.
    That is a waste of user time and processor time.

    ....snip old files...

    > I think the OP's $PATH "probably" DOESN'T have /usr/local/{s,}bin last.


    You may be correct. I don't have a Slackware system up at the moment and
    can't check it. OTOH, neither of us has *any* idea of what the OP's
    actual $PATH is.


  6. Re: little trap for those compiling own source

    On Fri, 12 Sep 2008 11:27:25 -0500, Dave Uhring wrote:
    > On Fri, 12 Sep 2008 15:32:21 +0000, Sylvain Robitaille wrote:


    >> I think the OP's $PATH "probably" DOESN'T have /usr/local/{s,}bin last.

    >
    > You may be correct. I don't have a Slackware system up at the moment and
    > can't check it. OTOH, neither of us has *any* idea of what the OP's
    > actual $PATH is.


    Indeed, you are correct. That is why I set my own PATH and I went and
    forgot why.


  7. Re: little trap for those compiling own source

    Dave Uhring wrote:

    > I don't think that the OP had a clue where his 'make install'
    > instruction put things. That is clearly evidenced by his surprise at
    > finding the man page in /usr/local/man.


    /usr/local/share/man. I gather from context that he *expected* to find
    the man page(s) in /usr/local/man.

    > OK, I always set my own PATH in ~/.bashrc and /usr/local/bin|sbin is
    > always next to last before /usr/games. It makes no sense for the
    > shell to search mostly empty directories before finding the invoked
    > executable. That is a waste of user time and processor time.


    Tcsh tends to cache such things, so the lookup is trivial. I don't know
    whether bash does the same. Either way, even on fairly old systems, in
    my experience the time taken to search the path for an executable is
    quite trivial.

    > ... OTOH, neither of us has *any* idea of what the OP's actual $PATH
    > is.


    Absolutely true (and the real point of the original post was $MANPATH
    anyway, which we also don't know, but I was responding to your reference
    to $PATH and that he would be calling a different binary than expected).

    --
    ----------------------------------------------------------------------
    Sylvain Robitaille syl@alcor.concordia.ca

    Network and Systems analyst Concordia University
    Instructional & Information Technology Montreal, Quebec, Canada
    ----------------------------------------------------------------------

  8. Re: little trap for those compiling own source

    On 2008-09-12, Grant wrote:
    > Hi there,
    >
    > Just updated iptables on slack-11, no 'man iptables' afterwards,
    > where'd it go?
    >
    > /usr/local/share/man ... Doh!
    >
    > So I added this to .bashrc:
    > MANPATH=/usr/local/share/man:$MANPATH
    >
    > Dunno why /usr/local/man is on the nose these days.



    From /etc/profile on Slackware:
    # /etc/profile: This file contains system-wide defaults used by
    # all Bourne (and related) shells.

    # Set the values for some environment variables:
    export MINICOM="-c on"
    export MANPATH=/usr/local/man:/usr/man
    ...
    Slackware still uses the traditional $prefix/man directory for manpages,
    but lots of software now defaults to $prefix/share/man instead.
    Your addition to ~/.bashrc is certainly valid, although I would suggest
    that you put it in a custom file in /etc/profile.d/, perhaps something
    like this:
    # /etc/profile.d/99-local_manpath.sh
    # Add /usr/local/share/man to MANPATH
    MANPATH=/usr/local/share/man:$MANPATH
    export MANPATH
    Be sure to make that file executable, and also to add a corresponding
    99-local_manpath.csh script if any of your users are masochists.

    An alternative solution would be to do something like this (after moving
    the manpages already in /usr/local/share/man/* to /usr/local/man/*):
    mkdir -p /usr/local/share
    cd /usr/local/share
    ln -s ../man .

    -RW


  9. Re: little trap for those compiling own source

    On Fri, 12 Sep 2008 18:05:32 +0000 (UTC), Sylvain Robitaille wrote:

    >Dave Uhring wrote:
    >
    >> I don't think that the OP had a clue where his 'make install'
    >> instruction put things. That is clearly evidenced by his surprise at
    >> finding the man page in /usr/local/man.

    >
    >/usr/local/share/man. I gather from context that he *expected* to find
    >the man page(s) in /usr/local/man.


    There's a lot of stupid replies to this OP Sylvain has read what I
    wrote

    Yes, I know where the thing installed, how do the clueless think I run
    a system? Yes I expected the man pages to go into /usr/local/man:

    $ tree /usr/local/man/
    /usr/local/man/
    |-- cat1
    |-- cat2
    |-- cat3
    |-- cat4
    |-- cat5
    |-- cat6
    |-- cat7
    |-- cat8
    |-- cat9
    |-- catn
    |-- man1
    | |-- 7z.1
    | |-- 7za.1
    | |-- 7zr.1
    | |-- Xvnc.1
    | |-- lua.1
    | |-- luac.1
    | |-- vncconfig.1
    | |-- vncpasswd.1
    | |-- vncserver.1
    | |-- vncviewer.1
    | `-- x0vncserver.1
    |-- man2
    |-- man3
    |-- man4
    |-- man5
    |-- man6
    |-- man7
    |-- man8
    | |-- lft.8
    | `-- whob.8
    |-- man9
    `-- mann

    But some programs put their man pages under /usr/local/share/man:

    $ tree /usr/local/share/man/
    /usr/local/share/man/
    |-- man1
    | |-- gawk.1
    | |-- igawk.1
    | |-- lzcat.1 -> lzma.1
    | |-- lzcmp.1 -> lzdiff.1
    | |-- lzdiff.1
    | |-- lzegrep.1 -> lzgrep.1
    | |-- lzfgrep.1 -> lzgrep.1
    | |-- lzgrep.1
    | |-- lzless.1 -> lzmore.1
    | |-- lzma.1
    | |-- lzmadec.1
    | |-- lzmainfo.1
    | |-- lzmore.1
    | |-- pgawk.1
    | `-- unlzma.1 -> lzma.1
    |-- man3
    | |-- Git.3
    | `-- private-Error.3
    `-- man8
    |-- ip6tables-restore.8
    |-- ip6tables-save.8
    |-- ip6tables.8
    |-- iptables-restore.8
    |-- iptables-save.8
    |-- iptables-xml.8
    `-- iptables.8

    >> OK, I always set my own PATH in ~/.bashrc and /usr/local/bin|sbin is
    >> always next to last before /usr/games. It makes no sense for the
    >> shell to search mostly empty directories before finding the invoked
    >> executable. That is a waste of user time and processor time.


    Dave seems clueless on how paths work.

    >Tcsh tends to cache such things, so the lookup is trivial. I don't know
    >whether bash does the same. Either way, even on fairly old systems, in
    >my experience the time taken to search the path for an executable is
    >quite trivial.


    >> ... OTOH, neither of us has *any* idea of what the OP's actual $PATH
    >> is.

    >
    >Absolutely true (and the real point of the original post was $MANPATH
    >anyway, which we also don't know, but I was responding to your reference
    >to $PATH and that he would be calling a different binary than expected).


    Until yesterday the $MANPATH was stock. $PATH still is, while break a
    working system?

    I posted an observation, not a freakin' cry for help )

    Grant.
    --
    http://bugsplatter.id.au/

  10. Re: little trap for those compiling own source

    On Fri, 12 Sep 2008 19:53:42 +0000, Robby Workman wrote:

    >On 2008-09-12, Grant wrote:
    >> Hi there,
    >>
    >> Just updated iptables on slack-11, no 'man iptables' afterwards,
    >> where'd it go?
    >>
    >> /usr/local/share/man ... Doh!
    >>
    >> So I added this to .bashrc:
    >> MANPATH=/usr/local/share/man:$MANPATH
    >>
    >> Dunno why /usr/local/man is on the nose these days.

    >
    >
    >From /etc/profile on Slackware:
    > # /etc/profile: This file contains system-wide defaults used by
    > # all Bourne (and related) shells.
    >
    > # Set the values for some environment variables:
    > export MINICOM="-c on"
    > export MANPATH=/usr/local/man:/usr/man
    > ...
    >Slackware still uses the traditional $prefix/man directory for manpages,
    >but lots of software now defaults to $prefix/share/man instead.


    Must mess your Slackbuilds a bit -- so you've decided to move manpages
    to one location rather than have both in the path?

    >Your addition to ~/.bashrc is certainly valid, although I would suggest
    >that you put it in a custom file in /etc/profile.d/, perhaps something
    >like this:
    > # /etc/profile.d/99-local_manpath.sh
    > # Add /usr/local/share/man to MANPATH
    > MANPATH=/usr/local/share/man:$MANPATH
    > export MANPATH
    >Be sure to make that file executable, and also to add a corresponding
    >99-local_manpath.csh script if any of your users are masochists.


    Thanks Robby, probably a good general solution. Bash here

    None of the other scripts in /etc/profile.d/ have leading numbers?

    >An alternative solution would be to do something like this (after moving
    >the manpages already in /usr/local/share/man/* to /usr/local/man/*):
    > mkdir -p /usr/local/share
    > cd /usr/local/share
    > ln -s ../man .


    I thought about a symlink but there's something wrong with that idea
    and installing more packages (-ENOCOFFEE can't think what it was).
    Prefer not to postfix installs of new programs into /usr/local.

    Grant.
    --
    http://bugsplatter.id.au/

  11. Re: little trap for those compiling own source

    On 2008-09-12, Grant wrote:
    > On Fri, 12 Sep 2008 19:53:42 +0000, Robby Workman wrote:
    >
    >>Slackware still uses the traditional $prefix/man directory for manpages,
    >>but lots of software now defaults to $prefix/share/man instead.

    >
    > Must mess your Slackbuilds a bit -- so you've decided to move manpages
    > to one location rather than have both in the path?



    Well, yeah, that's the way we've done it so far, anyway.

    I don't recall if I mentioned the possibility of a MANPATH addition
    to Pat or not, but I'll try to remember at some point...


    >>Your addition to ~/.bashrc is certainly valid, although I would suggest
    >>that you put it in a custom file in /etc/profile.d/, perhaps something
    >>like this:
    >> # /etc/profile.d/99-local_manpath.sh
    >> # Add /usr/local/share/man to MANPATH
    >> MANPATH=/usr/local/share/man:$MANPATH
    >> export MANPATH
    >>Be sure to make that file executable, and also to add a corresponding
    >>99-local_manpath.csh script if any of your users are masochists.

    >
    > Thanks Robby, probably a good general solution. Bash here
    >
    > None of the other scripts in /etc/profile.d/ have leading numbers?



    Hmm... well... my rationale for the 99-* was to make sure that
    script was executed *last* - to ensure that nothing else would
    do a MANPATH=/somewhere:$MANPATH later... HOWEVER --
    that will have exactly the opposite effect, as it will be run
    *first* since none of the other scripts have numbers. Anyway,
    now you know what I was thinking, even if it didn't come out right.


    >>An alternative solution would be to do something like this (after moving
    >>the manpages already in /usr/local/share/man/* to /usr/local/man/*):
    >> mkdir -p /usr/local/share
    >> cd /usr/local/share
    >> ln -s ../man .

    >
    > I thought about a symlink but there's something wrong with that idea
    > and installing more packages (-ENOCOFFEE can't think what it was).
    > Prefer not to postfix installs of new programs into /usr/local.



    Yeah, I prefer the profile.d scripts as well - in fact, I almost always
    prefer solutions that don't affect the stock filesystem layout or
    contents if possible. That way, I can blindly overwrite most config
    files when upgrading, and I don't have to worry about newer packages
    wiping my custom symlinks and replacing them with a directory (or even
    worse, wiping my custom directory *and_it's_contents* and replacing
    it with a symlink). As always, YMMV.

    -RW

  12. Re: little trap for those compiling own source

    On Sat, 13 Sep 2008 03:31:23 +0000, Robby Workman wrote:

    >> None of the other scripts in /etc/profile.d/ have leading numbers?


    > Hmm... well... my rationale for the 99-* was to make sure that
    > script was executed *last* - to ensure that nothing else would
    > do a MANPATH=/somewhere:$MANPATH later... HOWEVER --
    > that will have exactly the opposite effect, as it will be run
    > *first* since none of the other scripts have numbers. Anyway,
    > now you know what I was thinking, even if it didn't come out right.


    Yes, it would be run first, since the scripts in /etc/profile.d are
    executed in alphabetical order, as sourced from /etc/profile. I think you
    must have had some "sysvinit" stuff on your mind with that "99"...


    --
    "Ubuntu" -- an African word, meaning "Slackware is too hard for me".
    The Usenet Improvement Project: http://improve-usenet.org


  13. Re: little trap for those compiling own source


    wrhamblen@comcast.net wrote :

    > configure --prefix=/usr/local also helps,


    'configure --prefix=/usr/local --mandir=/usr/local/man' helps even
    more. But a proper configure script will reveal where everything goes
    if you run 'configure --help'.
    --
    Thomas O.

    This area is designed to become quite warm during normal operation.

  14. Re: little trap for those compiling own source

    On 2008-09-13, Dan C wrote:
    > On Sat, 13 Sep 2008 03:31:23 +0000, Robby Workman wrote:
    >
    >>> None of the other scripts in /etc/profile.d/ have leading numbers?

    >
    >> Hmm... well... my rationale for the 99-* was to make sure that
    >> script was executed *last* - to ensure that nothing else would
    >> do a MANPATH=/somewhere:$MANPATH later... HOWEVER --
    >> that will have exactly the opposite effect, as it will be run
    >> *first* since none of the other scripts have numbers. Anyway,
    >> now you know what I was thinking, even if it didn't come out right.

    >
    > Yes, it would be run first, since the scripts in /etc/profile.d are
    > executed in alphabetical order, as sourced from /etc/profile. I think you
    > must have had some "sysvinit" stuff on your mind with that "99"...



    Actually, I've been messing with udev :-)

    -RW

  15. Re: little trap for those compiling own source

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    * Grant writes:

    > Just updated iptables on slack-11, no 'man iptables' afterwards,
    > where'd it go?


    > /usr/local/share/man ... Doh!


    [...]

    > Dunno why /usr/local/man is on the nose these days.


    $prefix/share/man has been the defacto standard location for man pages
    for years now. Doesn't Pat make /usr/man a symlink to /usr/share/man?

    See the FHS (Filesystem Hierarchy Standard):



    --
    |---------------------|
    | Genius - Is the ability to reduce |
    | the complicated to the simple |
    |-------------------------------------|
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.8 (GNU/Linux)
    Comment: The SXEmacs Project
    Comment: EMchat - The SXEmacs IM client

    iEYEARECAAYFAkjMPTsACgkQHSfbS6lLMAP8zwCgyh3veYOcFS mugAD7F8V8bbhB
    b8YAoJj1LDHwuQJtKq+RIqP/SBs7+zpE
    =/Su6
    -----END PGP SIGNATURE-----

  16. Re: little trap for those compiling own source

    On Sun, 14 Sep 2008 08:22:37 +1000, Steve Youngs wrote:

    >-----BEGIN PGP SIGNED MESSAGE-----
    >Hash: SHA1
    >NotDashEscaped: You need GnuPG to verify this message
    >
    >* Grant writes:
    >
    > > Just updated iptables on slack-11, no 'man iptables' afterwards,
    > > where'd it go?

    >
    > > /usr/local/share/man ... Doh!

    >
    >[...]
    >
    > > Dunno why /usr/local/man is on the nose these days.

    >
    >$prefix/share/man has been the defacto standard location for man pages
    >for years now. Doesn't Pat make /usr/man a symlink to /usr/share/man?


    There's a symlink for /usr/share/man -> ../man, but /usr/local/share
    is missing on a clean slack-11.0 or slack-12.1 install.
    >
    >See the FHS (Filesystem Hierarchy Standard):
    >
    >


    Thanks for the link, I couldn't think of the name for that, and didn't
    go looking.

    So for a new slackware install one should perform (if one intends to
    do local software installs):

    mkdir /usr/local/share/ && ln -s /usr/local/man /usr/local/share/man

    As the FHS says they should be symlinked, rather than have one instead
    of the other. I'll add the symlink for correctness, and remove my
    ..bashrc kludge

    Now it's fixed:
    root@deltree:~# diff -Nrup /usr/local/share/man /usr/local/man/
    root@deltree:~#

    Grant.
    --
    http://bugsplatter.id.au/

+ Reply to Thread