From lowell@be-well.ilk.org  Thu Apr 27 06:32:00 2000
Return-Path: <lowell@be-well.ilk.org>
Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128])
	by hub.freebsd.org (Postfix) with ESMTP id 3DDC437B677
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Apr 2000 06:31:41 -0700 (PDT)
	(envelope-from lowell@be-well.ilk.org)
Received: (from lowell@localhost)
	by be-well.ilk.org (8.9.3/8.9.3) id JAA39410;
	Thu, 27 Apr 2000 09:31:29 -0400 (EDT)
	(envelope-from lowell)
Message-Id: <200004271331.JAA39410@be-well.ilk.org>
Date: Thu, 27 Apr 2000 09:31:29 -0400 (EDT)
From: lowell@world.std.com
Sender: lowell@be-well.ilk.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: whatis(1) doesn't know about /usr/local
X-Send-Pr-Version: 3.2

>Number:         18255
>Category:       misc
>Synopsis:       makewhatis weekly job doesn't look at /usr/local
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 27 06:40:01 PDT 2000
>Closed-Date:    Fri Oct 03 02:40:49 PDT 2003
>Last-Modified:  Fri Oct 03 02:40:49 PDT 2003
>Originator:     Lowell Gilbert
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
n/a
>Environment:

3.4-STABLE, but this probably applies to all versions.

>Description:

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.

>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.

>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...

	
*** /etc/periodic/weekly/320.whatis     Fri Sep 17 00:02:18 1999
--- 320.whatis  Thu Apr 27 09:19:32 2000
***************
*** 3,8 ****
--- 3,12 ----
  # $FreeBSD: src/etc/periodic/weekly/320.whatis,v 1.2.2.1 1999/08/29 14:19:51 peter Exp $
  #
  
+ # root cron jobs don't normally have /usr/local in the PATH; 
+ # make sure it gets picked up by manpath
+ PATH=${PATH}:/usr/local/bin
+ 
  if [ -x /usr/libexec/makewhatis.local -a -x /usr/bin/manpath ] ; then
  
      echo ""

>Release-Note:
>Audit-Trail:

From: Giorgos Keramidas <keramida@FreeBSD.org>
To: lowell@world.std.com
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/18255: whatis(1) doesn't know about /usr/local
Date: Sun, 9 Jun 2002 01:20:30 +0300

 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
 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Oct 3 02:40:15 PDT 2003 
State-Changed-Why:  
Superseded by PR conf/56626. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18255 
>Unformatted:
