preferred place for system-wide config files
m.seaman at infracaninophile.co.uk
Wed May 19 08:18:26 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
On 18/05/2010 22:57:25, Anonymous wrote:
> I can't understand why we should consider PREFIX absence here. Because,
> if it is absent then there is *no* port installed, too. The issue
> becomes moot: should a non-installed port look for files in
> LOCALBASE/etc or not? Besides, in case of ports that don't have any
> dependencies (e.g. portmaster) LOCALBASE is same as PREFIX because it
> may not exist prior installation, too. So, they either both exist or
> both do not exist in such case.
Hmmm... it makes no sense for a port to look for its /own/ configuration
files anywhere other than PREFIX by default. Looking for the
configuration files of some other port is a different matter.
Suppose we install apr1 and apache22 with a prefix of /opt. httpd.conf
is going to be in /opt/etc/apache22/httpd.conf
Now the development team comes along and installs their own copy of
devel/php5 with the options to build mod_php5 turned on. This they
install under their development tree: PREFIX = /opt/testing/
Installing an apache module involves adding the appropriate LoadModule
line to httpd.conf. Currently the ports would attempt to modify
/opt/etc/apache22/httpd.conf if anything. Which makes sense as that's
the default place to find httpd.conf from when apache was installed, and
the only location where the ports "knows" it can find a copy of httpd.conf.
Yet it's an equally valid scenario to assume those developers are
running their own private instance of apache using the binaries
installed for the system but their own config setup in
In the first place you've got a privately installed port attempting to
alter the system-wide configuration of apache, which is most likely
undesirable. In the second, the ports would have to guess where the
devs chose to put their apache config files, and there's not even any
guarantee there'd be anything there yet to be found at port installation
Software guessing about what human intentions are: that's going to end
in tears. In this particular case, I think the correct response should
be to detect that mod_php was being installed to a different PREFIX than
LOCALBASE, and suppress the modification of httpd.conf
If one particular developer subsequently goes on to install some php
modules, they could use PREFIX = /home/user for their private copy.
inter-alia installing those modules would entail adding entries to
/opt/testing/etc/php/extensions.ini -- where suddenly LOCALBASE is now
/opt/testing rather than /opt.
LOCALBASE is a rather imprecisely defined concept -- its easy to see
that there could be many values of LOCALBASE within some reasonably
complex dependency tree. Ultimately each dependent port could have a
distinct LOCALBASE[*]. The current usage of the LOCALBASE variable
within the ports system really doesn't accommodate that complexity.
[*] I've seen this proposed in all seriousness. My advice: run away.
Run away very quickly. Screaming optional.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the freebsd-ports