[collectd] localstatedir patches
Sebastian Harl
sh at tokkee.org
Fri Sep 12 14:59:57 CEST 2008
Hi,
On Fri, Sep 12, 2008 at 06:43:11AM -0600, Boian Berberov wrote:
> Let me illustrate exactly what happens on Gentoo. The econf function used
> by ebuilds makes this call:
> ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
> --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
> --localstatedir=/var/lib --localstatedir=/var <plugin-enables> ...
>
> The second "--localstatedir=/var" is an override I have to put in. Since
> prefix is set to /usr, the end result in the collectd.conf file without the
> patch to that file is:
> ...
> #BaseDir "/usr/var/lib/collectd"
> #PIDFile "/usr/var/run/collectd.pid"
> ...
>
> With the patch it is:
> ...
> #BaseDir "/var/lib/collectd"
> #PIDFile "/var/run/collectd.pid"
> ...
Okay, I guess, I forgot to mention that in my first reply: This is a
known problem. The fix you proposed in your patch does not work for the
reasons mentioned before. The only way to fix that is to do some
sed-magic in the Makefile which takes care of the required substitutions
in collectd.conf(.in). This will work as that's executed at compile time
as well and ${prefix} is then substituted with the correct value.
However, I don't really understand why any distributor would want to use
the shipped config file in their packages. Usually you'd want to provide
some more reasonable default config (the shipped config enables _all_
plugins that have been built which, imho, is not reasonable for a
distributor). In the Debian package, I've included my own config with
appropriate paths. I guess, about anybody else does so as well, so
nobody stepped up to fix this problem so far.
Anyway, if you provide a patch that implements that sed-magic, I'm
pretty sure this could be included in collectd.
> Setting prefix to "/" will install everything else in root. Do you have any
> suggestion on how I can set this up without the patch? Of course it can
> always be maintained externally.
Ship your own config ... ;-)
HTH,
Sebastian
--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080912/698116aa/attachment.pgp
More information about the collectd
mailing list