Subject: IMPORTANT user-visible change to pkgsrc related to config files
To: None <,>
From: Johnny Lam <>
List: tech-pkg
Date: 11/25/2001 13:12:22

I've committed changes to and friends to implement a variable
PKG_SYSCONFDIR, used to specify the location where the configuration files
for a package may be found.  The is to help resolve those arguments that
look like:

	Config files are host-specific...they should go into /etc.

	No!  All package stuff should be in /usr/pkg; config files are no

	But I want to share my /usr/pkg, but not my config files.

	Well, use symlinks.


	Why not?

	Because my way is correct.

	No, my way is correct.

	[flamewar follows]

Now, those who want their config files in /etc should set PKG_SYSCONFBASE
to /etc in /etc/mk.conf, while those who want it in ${PREFIX}/etc don't have
to do anything (the default is for config files to be in ${PREFIX}/etc).
Also, the config directory for a particular package may be set in /etc/mk.conf
by setting PKG_SYSCONFDIR.<pkgname>, e.g. PKG_SYSCONFDIR.apache=/etc/apache.

Please note that not all packages have been converted to use PKG_SYSCONFDIR.

For package constructors, the PKG_SYSCONFDIR variable may be customized with
the following variables:

* PKG_SYSCONFBASE is the main config directory under which all package
  configuration files are to be found.  This defaults to ${PREFIX}/etc, but
  may be overridden in /etc/mk.conf.

* PKG_SYSCONFSUBDIR is the subdirectory of PKG_SYSCONFBASE under which the
  configuration files for a particular package may be found, e.g. the
  Apache configuration files may all be found under the "httpd" subdirectory

Packages should be taught to look for their configuration files in
${PKG_SYSCONFDIR}, which is passed through to the configure and build
processes.  This is typically done for GNU packages by passing
--sysconfdir=${PKG_SYSCONFDIR} to the configure script, but please check to
make sure.


	-- Johnny Lam <>