Bug 64342

Summary: Assumed content of PATH is not defined in Porter's Handbook
Product: Documentation Reporter: Martin Horcicka <horcicka>
Component: Books & ArticlesAssignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Martin Horcicka 2004-03-16 14:30:15 UTC
In section "5.7.2 RUN_DEPENDS" of Porter's Handbook there is mentioned usage
of "which -s" to "determine if the program exists in the user's search path".
Unfortunately I cannot see any definition of PATH that porters should assume
so that they could choose the right form of dependency - e.g.:

RUN_DEPENDS=	portupgrade:${PORTSDIR}/sysutils/portupgrade
or
RUN_DEPENDS=	${LOCALBASE}/sbin/portupgrade:${PORTSDIR}/sysutils/portupgrade

In scripts used on clusters for package building I have found the following:

/usr/ports/Tools/portbuild/scripts/dopackages:
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin

/usr/ports/Tools/portbuild/scripts/portbuild:
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:.

I am not very sure which of these definitions is actually used during the
building but I'd bet on that one from portbuild.

BTW, does anyone know why there is that dot (actual directory) at the end of
the list? It is not very typical. And why is /usr/local/sbin missing there?

Fix: 

Port managers should be asked about the value of PATH that porters should
assume for building packages at building clusters and that information should
appear on some suitable place in Porter's Handbook.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-04-01 00:41:57 UTC
State Changed
From-To: open->feedback

The only existing usage of a dependency on portupgrade (in pkg_cutleaves) 
seems to use the latter form. 

I will forward a copy of this on to portmgr@ for possible comments.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-08-26 05:12:51 UTC
Responsible Changed
From-To: freebsd-doc->portmgr

This should be discussed amongst portmgr, it seems.
Comment 3 Kris Kennaway 2004-10-16 00:30:57 UTC
I removed the '.' entry some time ago, and added /usr/local/sbin in 
response to a number of ports that started assuming it was in PATH.

Kris
Comment 4 Martin Horcicka 2004-10-18 10:04:15 UTC
Hi Kris,

Kris Kennaway (2004-10-15 19:30 -0400):

> I removed the '.' entry some time ago, and added /usr/local/sbin in response 
> to a number of ports that started assuming it was in PATH.

that's great, thanks. Anyway, information about the content of PATH that a 
porter can expect to be available during the "which -s" in dependency checking 
should be noticed in Porter's Handbook.

Thank you.

Martin
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2004-12-20 15:53:26 UTC
State Changed
From-To: feedback->closed

This is now properly documented.