pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /bin/pwd defaults (Re: devel/gobject-introspection build can't find 'glib/gmacros.h')



On Mon, Jun 01, 2015 at 09:27:49AM -0400, Greg Troxel wrote:
 > > > > Don't use symlinks in PREFIX OR WRKOBJDIR.
 > > > 
 > > > We should document that pkgsrc limitation.   I can add a note about
 > > > PREFIX to README.MacOSX.
 > >
 > > I think it is documented, although if so it's obviously not prominent
 > > enough.
 > >
 > > > It would be nice if bootstrap could check PREFIX for symlinks
 > > > at pkgsrc init time (e.g. something along the lines of
 > > > checkarg_sane_absolute_path).
 > >
 > > Yes, that's a good idea.
 > 
 > I agree; more than document it should fail hard.   It's really not
 > ok for pkgsrc to prohibit symlinks, and I view that as a bug that hasn't
 > been fixed.

It's not really fixable; you need to hunt down all the possible
pathnames that might refer to these directories and load them all into
the wrappers for matching and substitution. Otherwise, any tool that
manages to come up with one of the alternate names somehow will
silently bypass wrapper protection and strange things will happen.

Keep in mind that it's not sufficient to just use the name passed to
bootstrap and the realpath'd version of it. Any ksh-type shell can
provide an arbitrary alternate name in $PWD at any time; and "don't
use ksh" unfortunately isn't an answer either as this set of
conceptual flaws was standardized into sh by POSIX.

Hopefully nobody's yet got the idea that realpath(3) should behave the
same way as ksh.

 > The other issue is that OS X is correct here:
 > 
 >   http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pwd.html
 > 
 > and NetBSD's pwd is documented as non-conforming (because it defaults to
 > -P).

...for some notion of "correct", yes.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index