Bug 18255

Summary: makewhatis weekly job doesn't look at /usr/local
Product: Base System Reporter: Lowell Gilbert <lowell>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Lowell Gilbert 2000-04-27 14:40:01 UTC
The period script that runs makewhatis doesn't have /usr/local in its
path, so manpath(1) doesn't include /usr/local/man, so ports and
packages don't get included in the database.  The most obvious fix is
to put /usr/local into the /etc/crontab PATH setting, but that's a bad
idea (because root crontab runs *shouldn't* be running anything from
/usr/local in a default system anyway).  Hammering it into the
periodic script that calls makewhatis seems like a better way.

Fix: This isn't very pretty, but cron jobs shouldn't by default be running
anything from /usr/local, so it shouldn't otherwise be in the path.
Better fixes would be fine with me...

	
How-To-Repeat: 
As "McClain, Michael" posted to freebsd-questions:
> In FreeBSD 3.4, is makewhatis broken?
> 'man bash' shows the man page, .apropos bash' says nothing appropriate.

Obviously, this will apply to any installed ports or packages.
Comment 1 Giorgos Keramidas freebsd_committer freebsd_triage 2002-06-08 23:20:30 UTC
On 2000-04-27 09:31 -0400, lowell@world.std.com wrote:
> The period script that runs makewhatis doesn't have /usr/local in
> its path, so manpath(1) doesn't include /usr/local/man, so ports and
> packages don't get included in the database.  The most obvious fix
> is to put /usr/local into the /etc/crontab PATH setting, but that's
> a bad idea (because root crontab runs *shouldn't* be running
> anything from /usr/local in a default system anyway).  Hammering it
> into the periodic script that calls makewhatis seems like a better
> way.

I think care should be taken to make sure that the correct value of
LOCALBASE is used.  The default value is /usr/local as shown in
/usr/ports/Mk/bsd.port.mk:

    01:18 [charon@hades /usr/ports/Mk]$ grep -n '^LOCALBASE' bsd.port.mk
    685:LOCALBASE?=         ${DESTDIR}/usr/local

Since this can be customized in /etc/make.conf, the following part of
the patch might not always be correct:

    + PATH=${PATH}:/usr/local/bin

- Giorgos
Comment 2 ru freebsd_committer freebsd_triage 2003-10-03 10:40:15 UTC
State Changed
From-To: open->closed

Superseded by PR conf/56626.