ports/144533: ports tree Makefiles fail to setup a standardardized ENV

Ronald F.Guilmette rfg at tristatelogic.com
Sun Mar 7 20:00:05 UTC 2010


>Number:         144533
>Category:       ports
>Synopsis:       ports tree Makefiles fail to setup a standardardized ENV
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 07 20:00:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
Infinite Monkeys & Co. LLC
>Environment:
System: FreeBSD segfault.tristatelogic.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Aug 5 02:38:40 PDT 2008 root at segfault.monkeys.com:/usr/src/sys/i386/compile/rfg20080805 i386

>Description:
	Quite simply, the process of building many of the ports in the ports
	tree is highly dependant upon certain very specific things either
	being set, or alternatively, not set, in the environment.  But neither
	the port Makefiles or the files they include make any serious effort
	to adjust the enviroment, as necessary, so as to insure that it is
	sufficiently close to the environment used by port tree maintainers
	so that individual ports will actually build successfully.

	As a result, the process of building many of the ports in the ports
	tree (e.g. net/avahi-app, but also many others) will die in bizzare,
	incomprehensible, and unexpected ways (see ports/140563 for an example)
	if the user performing the build has, e.g., the variable POSIXLY_CORRECT
	set in his/her personal environment at the time the build process
	begins. (I do not know offhand if there are other such environment
	variables/values that are critical to various port builds, but it seems
	entirely plausible that there are perhaps many such others.)

	To the best of my knowledge, there is _no_ documentation that instructs
	port builders regarding what environment variables should or should
	not be set when building either all ports, or any given specific port.
	But in any case, such documentation, if made available, would still be
	a poor substitute for proper and more reliable automation of the port
	building process.  Such automation should, ideally, set and/or unset
	any any all environment variables (e.g. POSIXLY_CORRECT) whose settings
	may be critical to the build process.

>How-To-Repeat:
	% setenv POSIXLY_CORRECT 1
	% portupgrade net/avahi-app

>Fix:
	I see no compelling reason why /usr/ports/Mk/bsd.port.mk could not
	be adjusted/hacked so that in future it would cause the setting and/or
	unsetting of various environment variables, as necessary, to insure
	successful builds of all ports, prior to actually invoking each port's
	own Makefile.

	I do not have code in hand for this sort of change, but I believe it
	should be reasonably easy to hack together, and I'd be happy to put
	such such patches together, upon request, if whoever responds to this
	PR can't immediately figure out how to do this.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list