[avahi] Patch for gentoo compilation

Sebastien Estienne sebastien.estienne at gmail.com
Thu Jun 30 16:14:59 PDT 2005


2005/6/30, Lennart Poettering <mzzhgg at 0pointer.de>:

> Have a look on the top of avahi-daemon/Makefile.am:
> 
> AM_CFLAGS= \
> [...]
>         -DAVAHI_RUNTIME_DIR=\"$(localstatedir)/run/avahi\"
> 
> avahi puts its PID and socket files in AVAHI_RUNTIME_DIR. Ths should
> be the place to fix this. However, our  autoconf guru, Sebastien,
> might code up some neat autodetection routines for the right path for
> the runtime directory. (And by while doing so moving the definition of
> this path to configure.ac. What do you think, Sebastien?
> 
> Same thing in avahi-dnsconfd/Makefile.am. AVAHI_SOCKET is the socket
> of avahi-daemon to connect to. AVAHI_RUNTIME_SCRIPT is the path where
> to put the PID file. Since avahi-dns-confd puts its PID file directly
> to /var/run/ (instead of /var/run/avahi/) this should be cleaned up a
> little anyway.
I made the modifications for AVAHI_SOCKET and AVAHI_RUNTIME_DIR (using config.h)
and also modifyed avahai/simple-protocol.c to use AVAHI_SOCKET instead
of UNIX_SOCKET.

about gentoo and /var/lib/run, i think that if portage explicitely
define --localstatedir=/var/lib , there must be a reason (the default
value is /var)
I could easily detect that's the distro is gentoo and use /var/run,
but i'm not sure it's the right thing to do. We should investigate how
other ebuild do this, dbus or hal ebuild for example.

regards,
-- 
Sebastien Estienne


More information about the avahi mailing list