On Sat, 2012-11-24 at 21:08 -0500, Frank Ch. Eigler wrote:
> Hi, Ken -
>
> > > IMHO, it would be more proper to have all configuration files under
> > > $sysconfdir.
> >
> > Well some of them used to be in /etc/<some-pcp-dir> for debian builds
> > but were recently moved when configure.in was rearranged.
>
> (That was not intentional, and should be restoreable.)
It is not that simple. These configuration files were special cases
where the setting depended on the distro ... since there is no
distro-specific logic in configure.in any more they cannot simply be
moved by command-line options to configure without moving a whole lot of
other stuff.
It needs to be fixed properly.
> > OPTION A
> >
> > Introduce $PCP_SYSCONF_DIR to expose $sysconfdir via pcp.conf and then
> > move everything currently below $PCP_VAR_DIR/config/<foo> to
> > $PCP_SYSCONF_DIR/<foo>.
> >
> > This touches vastly more files than the ones in the current
> > "configuration" files list, and would involve changes to 310 lines of
> > code/script/qa, although the changes can largely be automated.
>
> Yeah, cleaning it up fully is quite a bit of make-work.
I favour this approach. The work is boring, but low risk ... just the
sort of thing we could assign to a retired person ... 8^)>
> ($PCP_SYSCONFIG_DIR is already defined, just not used, whoops.)
This defaults to /etc/sysconfig ... which smells like something Redhat
specific ... although as it is not used, perhaps it should be culled.
It appears that autoconf provides $sysconfdir [default $prefix/etc] and
--sysconfdir=<foo> which becomes $PCP_ETC_DIR while we've added
$pcp_sysconfig_dir [default $prefix/etc/sysconfig] and
--with-sysconfigdir=<foo> which becomes $PCP_SYSCONFIG_DIR.
My vote would be for changing all references in the code from
$PCP_VAR_DIR/config to $PCP_ETC_DIR or better, introducing
$PCP_SYSCONF_DIR which would have the same value is $PCP_ETC_DIR but
would allow the uses in the code base to remain identifiable if we need
to revisit this at a later date.
> Default/template configuration files are commonly shipped right
> alongside /etc, or under the documentation directories. Perhaps
> it would make sense to install the crontab entries by default
> (on modern linux under /etc/cron.d).
The crontab enties really should only be installed if one is running the
system versions of pmlogger or pmie ... I'd prefer we do not do this
automatically ... although now we'd be pretty close to having them run
from a new crontab for the user "pcp" ... which is much better than
dinking with root's crontab entries.
|