[collectd] localstatedir patches

Boian Berberov bberberov at gmail.com
Thu Sep 11 21:38:00 CEST 2008


OK.  But how does your example work?  I think in Gentoo it would have to be:
./configure --prefix=${custom_prefix} --localstatedir=${custom_prefix}/bar

Also, localstatedir defaults to [PREFIX/var] according to ./configure
--help, so that particular case should be covered for var.

This may come up for me in another context so I need to learn more about it.

Boian Berberov

On Thu, Sep 11, 2008 at 11:55, Sebastian Harl <sh at tokkee.org> wrote:

> Hi Boian,
>
> On Thu, Sep 11, 2008 at 11:44:03AM -0600, Boian Berberov wrote:
> > I was working on updating Gentoo's ebuild and I noticed that
> localstatedir
> > was not used in certain places.  Please review these patches and consider
> > them.
>
> > --- src/collectd.conf.in.orig 2008-09-11
> > +++ src/collectd.conf.in      2008-09-11
> > @@ -6,8 +6,8 @@
> >
> >  #Hostname    "localhost"
> >  FQDNLookup   true
> > -#BaseDir     "@prefix@/var/lib/@PACKAGE_NAME@"
> > -#PIDFile     "@prefix@/var/run/@PACKAGE_NAME at .pid"
> > +#BaseDir     "@localstatedir@/lib/@PACKAGE_NAME@"
> > +#PIDFile     "@localstatedir@/run/@PACKAGE_NAME at .pid"
>
> That does not work, if you're using e.g. "./configure --prefix=/foo
> --localstatedir=\${prefix}/bar" (which is very common in e.g. Debian
> source packages) as this would end up as "${prefix}/bar" in the config
> file.
>
> > --- src/powerdns.c.orig       2008-09-11
> > +++ src/powerdns.c    2008-09-11
> > @@ -45,10 +45,10 @@
> >  #endif
> >  #define FUNC_ERROR(func) do { char errbuf[1024]; ERROR ("powerdns
> plugin: %s failed: %s", func, sstrerror (errno, errbuf, sizeof (errbuf))); }
> while (0)
> >
> > -#define SERVER_SOCKET  "/var/run/pdns.controlsocket"
> > +#define SERVER_SOCKET  LOCALSTATEDIR"/run/pdns.controlsocket"
> >  #define SERVER_COMMAND "SHOW *"
> >
> > -#define RECURSOR_SOCKET  "/var/run/pdns_recursor.controlsocket"
> > +#define RECURSOR_SOCKET  LOCALSTATEDIR"/run/pdns_recursor.controlsocket"
> >  #define RECURSOR_COMMAND "get noerror-answers nxdomain-answers " \
> >    "servfail-answers sys-msec user-msec qa-latency cache-entries
> cache-hits " \
> >    "cache-misses questions"
>
> Signed-off-by: Sebastian Harl <sh at tokkee.org>
>
> Cheers,
> 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
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIyVulEFEKc4UBx/wRAvb4AJ9Lf0X7sDdgQV5uJouzZ1FjSjseUwCfVM5b
> Sbn3Ci9QCzYLUd0WpwgXDEc=
> =paGY
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.verplant.org/pipermail/collectd/attachments/20080911/7314fe99/attachment.htm 


More information about the collectd mailing list