<div dir="ltr">OK. But how does your example work? I think in Gentoo it would have to be:<br>./configure --prefix=${custom_prefix} --localstatedir=${custom_prefix}/bar<br><br>Also, localstatedir defaults to [PREFIX/var] according to ./configure --help, so that particular case should be covered for var.<br>
<br>This may come up for me in another context so I need to learn more about it.<br><br>Boian Berberov<br><br><div class="gmail_quote">On Thu, Sep 11, 2008 at 11:55, Sebastian Harl <span dir="ltr"><<a href="mailto:sh@tokkee.org">sh@tokkee.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Boian,<br>
<div><div></div><div class="Wj3C7c"><br>
On Thu, Sep 11, 2008 at 11:44:03AM -0600, Boian Berberov wrote:<br>
> I was working on updating Gentoo's ebuild and I noticed that localstatedir<br>
> was not used in certain places. Please review these patches and consider<br>
> them.<br>
<br>
</div></div>> --- src/collectd.conf.in.orig 2008-09-11<br>
> +++ src/<a href="http://collectd.conf.in" target="_blank">collectd.conf.in</a> 2008-09-11<br>
> @@ -6,8 +6,8 @@<br>
><br>
> #Hostname "localhost"<br>
> FQDNLookup true<br>
> -#BaseDir "@prefix@/var/lib/@PACKAGE_NAME@"<br>
> -#PIDFile "@prefix@/var/run/@PACKAGE_NAME@.pid"<br>
> +#BaseDir "@localstatedir@/lib/@PACKAGE_NAME@"<br>
> +#PIDFile "@localstatedir@/run/@PACKAGE_NAME@.pid"<br>
<br>
That does not work, if you're using e.g. "./configure --prefix=/foo<br>
--localstatedir=\${prefix}/bar" (which is very common in e.g. Debian<br>
source packages) as this would end up as "${prefix}/bar" in the config<br>
file.<br>
<br>
> --- src/powerdns.c.orig 2008-09-11<br>
> +++ src/powerdns.c 2008-09-11<br>
> @@ -45,10 +45,10 @@<br>
> #endif<br>
> #define FUNC_ERROR(func) do { char errbuf[1024]; ERROR ("powerdns plugin: %s failed: %s", func, sstrerror (errno, errbuf, sizeof (errbuf))); } while (0)<br>
><br>
> -#define SERVER_SOCKET "/var/run/pdns.controlsocket"<br>
> +#define SERVER_SOCKET LOCALSTATEDIR"/run/pdns.controlsocket"<br>
> #define SERVER_COMMAND "SHOW *"<br>
><br>
> -#define RECURSOR_SOCKET "/var/run/pdns_recursor.controlsocket"<br>
> +#define RECURSOR_SOCKET LOCALSTATEDIR"/run/pdns_recursor.controlsocket"<br>
> #define RECURSOR_COMMAND "get noerror-answers nxdomain-answers " \<br>
> "servfail-answers sys-msec user-msec qa-latency cache-entries cache-hits " \<br>
> "cache-misses questions"<br>
<br>
Signed-off-by: Sebastian Harl <<a href="mailto:sh@tokkee.org">sh@tokkee.org</a>><br>
<br>
Cheers,<br>
Sebastian<br>
<font color="#888888"><br>
--<br>
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>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
<br>
iD8DBQFIyVulEFEKc4UBx/wRAvb4AJ9Lf0X7sDdgQV5uJouzZ1FjSjseUwCfVM5b<br>
Sbn3Ci9QCzYLUd0WpwgXDEc=<br>
=paGY<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br></div>