<div dir="ltr">On Fri, Sep 12, 2008 at 06:59, Sebastian Harl <span dir="ltr"><<a href="mailto:sh@tokkee.org">sh@tokkee.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<div class="Ih2E3d"><br>
On Fri, Sep 12, 2008 at 06:43:11AM -0600, Boian Berberov wrote:<br>
> Let me illustrate exactly what happens on Gentoo. The econf function used<br>
> by ebuilds makes this call:<br>
> ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man<br>
> --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc<br>
> --localstatedir=/var/lib --localstatedir=/var <plugin-enables> ...<br>
><br>
> The second "--localstatedir=/var" is an override I have to put in. Since<br>
> prefix is set to /usr, the end result in the collectd.conf file without the<br>
> patch to that file is:<br>
> ...<br>
> #BaseDir "/usr/var/lib/collectd"<br>
> #PIDFile "/usr/var/run/collectd.pid"<br>
> ...<br>
><br>
> With the patch it is:<br>
> ...<br>
> #BaseDir "/var/lib/collectd"<br>
> #PIDFile "/var/run/collectd.pid"<br>
> ...<br>
<br>
</div>Okay, I guess, I forgot to mention that in my first reply: This is a<br>
known problem. The fix you proposed in your patch does not work for the<br>
reasons mentioned before. The only way to fix that is to do some<br>
sed-magic in the Makefile which takes care of the required substitutions<br>
in collectd.conf(.in). This will work as that's executed at compile time<br>
as well and ${prefix} is then substituted with the correct value.<br>
<br>
However, I don't really understand why any distributor would want to use<br>
the shipped config file in their packages. Usually you'd want to provide<br>
some more reasonable default config (the shipped config enables _all_<br>
plugins that have been built which, imho, is not reasonable for a<br>
distributor). In the Debian package, I've included my own config with<br>
appropriate paths. I guess, about anybody else does so as well, so<br>
nobody stepped up to fix this problem so far.<br>
<br>
Anyway, if you provide a patch that implements that sed-magic, I'm<br>
pretty sure this could be included in collectd.<br>
<div class="Ih2E3d"><br>
> Setting prefix to "/" will install everything else in root. Do you have any<br>
> suggestion on how I can set this up without the patch? Of course it can<br>
> always be maintained externally.<br>
<br>
</div>Ship your own config ... ;-)<br>
<br>
HTH,<br>
Sebastian<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="Wj3C7c">Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ <a href="http://tokkee.org/" target="_blank">http://tokkee.org/</a><br>
<br>
Those who would give up Essential Liberty to purchase a little Temporary<br>
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin<br>
<br>
</div></div><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
<br>
iD8DBQFIymfMEFEKc4UBx/wRAidBAJ4wAqTD1UDMJDskkcVRH0MDHfEh8gCfWpfz<br>
pKFguPhX3TPj8QNiRKWfRHA=<br>
=DQ6B<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br>Excellent idea! sed-magic would be easier to maintain. I do not know if I can integrate the sed-magic in the Makefile effectively, but if I do I will post the patch.<br><br>I should probably look at making a Gentoo-specific config file, but at this point I was trying to use the one you provide as a reasonable template that users can look at when making their own.<br>
<br>Boian Berberov<br></div>