Re: makewhatis for man page changes
man 5 man.conf Need to add /usr/local/man to your manpath. On Jul 24, 2019 11:39 AM, Jungle Boogie wrote: > > Hi All, > > Turns out I don't know everything and I need to read man pages from > time-to-time. I'm sure you're like me and also want to consult the man pages. > How do you do it on applications you've installed from source? > > Reading makewhatis.8, I think this is the tool I would use. > > # makewhatis -D -a /usr/local/share/man > /usr/local/share/man//de/man1/nmap.1: Adding to database > /usr/local/share/man//es/man1/nmap.1: Adding to database > /usr/local/share/man//fr/man1/nmap.1: Adding to database > /usr/local/share/man//hr/man1/nmap.1: Adding to database > /usr/local/share/man//hu/man1/nmap.1: Adding to database > /usr/local/share/man//it/man1/nmap.1: Adding to database > /usr/local/share/man//ja/man1/nmap.1: Adding to database > /usr/local/share/man//man1/aerc.1: Adding to database > /usr/local/share/man//man1/curl-config.1: Adding to database > /usr/local/share/man//man1/curl.1: Adding to database > /usr/local/share/man//man1/dnscap.1: Adding to database > /usr/local/share/man//man1/enchive.1.gz: Adding to database > /usr/local/share/man//man1/endlessh.1: Adding to database > .. > > but this doesn't work: > $ man 1 nmap > man: No entry for nmap in section 1 of the manual. > > What am I doing wrong? > > Thanks for any tips! > > $ sysctl kern.version > kern.version=OpenBSD 6.5-current (GENERIC.MP) #139: Wed Jul 24 05:11:28 MDT > 2019 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > >
Re: makewhatis for man page changes
Hi, Jungle Boogie wrote on Wed, Jul 24, 2019 at 11:14:33AM -0700: > $ MANPATH=/usr/local/share/man: > $ echo $MANPATH > /usr/local/share/man: > > $ man nmap > man: No entry for nmap in the manual. Oh well, $ export MANPATH is missing here. Sorry for not noticing that omission earlier. > However, this will work: > $ man -M /usr/local/share/man: nmap > > That will at least get it to load the manpage. Sure, and so will $ man -m /usr/local/share/man nmap even without a colon. So many possibilities... If i were the to re-design the user interface from scratch, there would be fewer possibilities, but i don't see the point in deleting ways that used to work in the past, causing gratuitious incompatibility. Yours, Ingo > Creating a /etc/man.conf page and adding the entry into it gets > man pages to load.
Re: makewhatis for man page changes
On Wed 24 Jul 2019 6:45 PM, Paco Esteban wrote: On Wed, 24 Jul 2019, Jungle Boogie wrote: Hi All, Turns out I don't know everything and I need to read man pages from time-to-time. I'm sure you're like me and also want to consult the man pages. How do you do it on applications you've installed from source? Reading makewhatis.8, I think this is the tool I would use. # makewhatis -D -a /usr/local/share/man As far as I know, that will create a mandoc.db on /usr/local/share/man That's an index for use with apropos(1) and whatis(1). but this doesn't work: $ man 1 nmap man: No entry for nmap in section 1 of the manual. What am I doing wrong? You have to tell man to look on other paths. That can be done setting the MANPATH env variable. In your case something like: MANPATH=/usr/local/share/man: $ MANPATH=/usr/local/share/man: $ echo $MANPATH /usr/local/share/man: $ man nmap man: No entry for nmap in the manual. However, this will work: $ man -M /usr/local/share/man: nmap That will at least get it to load the manpage. Creating a /etc/man.conf page and adding the entry into it gets man pages to load. Thanks for the tips and time!
Re: makewhatis for man page changes
Hi, Paco Esteban wrote on Wed, Jul 24, 2019 at 06:45:45PM +0200: > On Wed, 24 Jul 2019, Jungle Boogie wrote: >> Turns out I don't know everything and I need to read man pages from >> time-to-time. I'm sure you're like me and also want to consult the >> man pages. Absolutely. Even though i tend to improve at least one manual page almost every day, i typically consult many different manual pages every day in addition to that, without intending to change them, merely to look something up that i need. >> How do you do it on applications you've installed from source? I almost never install applications from source. When possible, i install packages with pkg_add(1) that were compiled on the official OpenBSD package build infrastructure. When i want to use packages newer than the official ones (which happens rarely because packages are officially updated at least daily) or when i work on updating a package, i build the package myself from the port and install the resulting package. When i want to use software that has not been ported yet, i tend to create a port. That happens rarely because vast amounts of software have already been ported. When temporarily using or testing software that i do not want to port, i typically use the "man -l" option. >> Reading makewhatis.8, I think this is the tool I would use. Yes. >> # makewhatis -D -a /usr/local/share/man Not exactly the question asked by the OP - but using that particular directory for that partivular purpose is an odd choice. In general, regard the whole tree below /usr/local/ as reserved for packages. Do not install anything manually there, always use pkg_add(1) only to change anything below /usr/local/. Admitted, packages do not use /usr/local/share/man/, so this particular directory is unlikely to cause conflicts now or in the future, but it is confusing nonetheless. > As far as I know, that will create a mandoc.db on /usr/local/share/man > That's an index for use with apropos(1) and whatis(1). Correct. >> but this doesn't work: >> $ man 1 nmap >> man: No entry for nmap in section 1 of the manual. Try $ pkg_locate bin/nmap $ doas pkg_add nmap $ man nmap >> What am I doing wrong? > You have to tell man to look on other paths. That can be done setting > the MANPATH env variable. In your case something like: > > MANPATH=/usr/local/share/man: > > Note the ':' at the end. That means that path will be prepended to the > default list of paths to look for man pages. > > Check man(1) for more info. Correct. However, *if* you want to globally install manually installed software to be used by all users of the system, then adding your custom manpath directory globally and system-wide may be even better. For example, create /etc/man.conf similar to this: manpath /usr/share/man manpath /usr/X11R6/man manpath /usr/local/man manpath /usr/local/share/man See man.conf(5) for details. The advantages are: * Users need not remeber setting MANPATH * weekly(8) will keep /usr/local/share/man/mandoc.db up to date. Yours, Ingo
Re: makewhatis for man page changes
On Wed, 24 Jul 2019, Jungle Boogie wrote: > Hi All, > > Turns out I don't know everything and I need to read man pages from > time-to-time. I'm sure you're like me and also want to consult the man pages. > How do you do it on applications you've installed from source? > > Reading makewhatis.8, I think this is the tool I would use. > > # makewhatis -D -a /usr/local/share/man As far as I know, that will create a mandoc.db on /usr/local/share/man That's an index for use with apropos(1) and whatis(1). > but this doesn't work: > $ man 1 nmap > man: No entry for nmap in section 1 of the manual. > > What am I doing wrong? You have to tell man to look on other paths. That can be done setting the MANPATH env variable. In your case something like: MANPATH=/usr/local/share/man: Note the ':' at the end. That means that path will be prepended to the default list of paths to look for man pages. Check man(1) for more info. Cheers, -- Paco Esteban. https://onna.be/gpgkey.asc 9A6B 6083 AD9E FDC2 0EAF 5CB3 5818 130B 8A6D BC03
makewhatis for man page changes
Hi All, Turns out I don't know everything and I need to read man pages from time-to-time. I'm sure you're like me and also want to consult the man pages. How do you do it on applications you've installed from source? Reading makewhatis.8, I think this is the tool I would use. # makewhatis -D -a /usr/local/share/man /usr/local/share/man//de/man1/nmap.1: Adding to database /usr/local/share/man//es/man1/nmap.1: Adding to database /usr/local/share/man//fr/man1/nmap.1: Adding to database /usr/local/share/man//hr/man1/nmap.1: Adding to database /usr/local/share/man//hu/man1/nmap.1: Adding to database /usr/local/share/man//it/man1/nmap.1: Adding to database /usr/local/share/man//ja/man1/nmap.1: Adding to database /usr/local/share/man//man1/aerc.1: Adding to database /usr/local/share/man//man1/curl-config.1: Adding to database /usr/local/share/man//man1/curl.1: Adding to database /usr/local/share/man//man1/dnscap.1: Adding to database /usr/local/share/man//man1/enchive.1.gz: Adding to database /usr/local/share/man//man1/endlessh.1: Adding to database ... but this doesn't work: $ man 1 nmap man: No entry for nmap in section 1 of the manual. What am I doing wrong? Thanks for any tips! $ sysctl kern.version kern.version=OpenBSD 6.5-current (GENERIC.MP) #139: Wed Jul 24 05:11:28 MDT 2019 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP