[avahi] Patch for gentoo compilation

Sebastien Estienne sebastien.estienne at gmail.com
Thu Jun 30 05:07:07 PDT 2005


2005/6/30, Steev <steev at steev.net>:
> I am attaching the patch again (it applies cleanly against r154 as well
> as 153, until it gets committed to svn, its required to install create
> the proper init script as well as tell it where it should properly be.
> I am also attaching the new ebuild that I have, I used it to install,
> and aside from starting (takes too long to get a response) the only
> other issue I have is, it *appears* that /var/lib/run/avahi is hardcoded
> in /usr/bin/avahi (i ran strings /usr/bin/avahi | grep run) and on
> gentoo we don't use /var/lib/run, we use /var/run - not sure where to
> change this.  Although since I am just testing it out to make sure it
> works, I created /var/lib/run/avahi for it.
I've commited your patch.
about /var/lib/run and /var/run, i don't know. But i don't think it's
hardcoded because on debian, it's also installed in /var/run

sebest at oxyde ~/svn/avahi $ strings /usr/bin/avahi | grep var
/var/run/avahi/avahi-daemon.pid
/var/run/avahi
mkdir("/var/run/avahi"): %s
Failed to create runtime directory /var/run/avahi.
/var/run/avahi/socket

So it must be configurable

> 
> >> I think they should contains headers, maybe we need to fix something,
> >> i'll investigate.
> 
> Thought so too, but didn't want to get that far into it.
> 
I fixed it, a small typo (a missing \  in makefile.am)

> As I apparently cannot currently start avahi from the init script (oh,
> did I mention I am on dialup....) due to it taking too long to get a
> response, this is the output of me running avahi from the commandline.
> 
> mebius ~ # avahi
> Found user 'avahi' (UID 409) and group 'avahi' (GID 409).
> Successfully dropped root privileges.
> Enumeration complete
> Server startup complete.  Host name is <mebius.local.>
> iface.c: avahi_server_add_service() failed.
> Loading service file /etc/avahi/services/example.service
> ** Message: dbus: interface=org.freedesktop.DBus,
> path=/org/freedesktop/DBus, member=NameAcquired
> ** Message: dbus: ServiceAcquired (:1.5)
> ** Message: dbus: interface=org.freedesktop.DBus,
> path=/org/freedesktop/DBus, member=NameAcquired
> ** Message: dbus: ServiceAcquired (org.freedesktop.Avahi)
> 
> and a sudo avahi -r from another terminal adds
> 
> Got SIGHUP, reloading.
> Service "Remote Terminal on mebius"
> (/etc/avahi/services/example.service) successfully established
> 
> and sudo avahi -k adds
> GOT SIGTERM, quitting.

This looks good to me...

> 
> Side note, patch is same one from before, just added in case someone
> didn't search the archives, apologize for wasting anyone's bandwidth.
> Ebuild is renamed to avahi-svn-9999.ebuild to corespond to cvs ebuild
> numbering in portage, though just modifying the .0.0.0.ebuild that I
> previously patched should work as well.
> 
> I have a [ -n ${DOCS} ] && dodoc ${DOCS} line in there to install all
> the files listed on the DOCS= line.  I stole that from the gnome2
> eclass, since I had added the DOCS= line but the docs weren't getting
> installed.  I am not sure if the first part of the line is un-necessary,
> but I am sure someone who is more familiar with ebuilds will let me know :)
> 
> One other thing - I am using dbus .34 (and it appears to work fine :) )
> so I would appreciate if someone using the old dbus .23 that is in
> portage would let me know if it works for them as well?
It's still 0.23 on debian ubuntu/hoary
It will be written to work on both Api.

> 
> - --
> Steev Klimaszewski
> www.steev.net
> steev at steev.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> 
> iD8DBQFCw9GS1c+EtXTHkJcRAowGAJ4grrORO0XKTT90WvEPePoR3aPG4QCdGgbI
> lbczp0z5O/XS+7wzuiP30og=
> =hLY6
> -----END PGP SIGNATURE-----
> 
> 
> # Copyright 1999-2005 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
> 
> inherit eutils subversion
> 
> MY_PN=${PN/-svn/}
> 
> ESVN_REPO_URI="svn://seth.intheinter.net/flexmdns/trunk"
> 
> DESCRIPTION="Avahi is a library which facilitates service discovery on a local
> network -- this means that you can plug your laptop or computer into a network
> and instantly be able to view other people who you can chat with, find printers
> to print to or find files being shared. This kind of technology is already found
> in MacOS X (branded 'rendezvous'/'bonjour') and is very convenient."
> HOMEPAGE="http://www.freedesktop.org/wiki/Software_2fAvahi"
> #SRC_URI="svn://seth.intheinter.net/flexmdns/trunk avahi"
> LICENSE="GPL-2"
> 
> SLOT="0"
> KEYWORDS="~x86"
> IUSE="dbus doc gtk"
> DEPEND=">=dev-libs/libdaemon-0.5
>         >=dev-libs/expat-1.9.7
>         >=dev-libs/glib-2.4.0
>         gtk? ( >=x11-libs/gtk+-2.4.0
>         >=gnome-base/libglade-2.4.0 )
>         dbus? ( >=sys-apps/dbus-0.23 )
>         doc? ( >=app-doc/doxygen )"
> 
> DOCS="LICENSE README todo"
> 
> src_unpack() {
>         ESVN_REPO_URI="svn://seth.intheinter.net/flexmdns/trunk"
>         ESVN_PROJECT="avahi"
>         subversion_src_unpack
>         epatch ${FILESDIR}/${ESVN_PROJECT}-gentoo-r153.patch
>         ./bootstrap.sh || die "Bootstrap failed."
> }
> 
> src_compile() {
>         econf \
>         `use_enable doc doxygen` \
>         `use_enable dbus` \
>         `use_enable gtk` \
>         || die "Configuration failed."
> }
> 
> src_install() {
>         emake install DESTDIR=${D} || die "install failed"
>         [ -n "${DOCS}" ] && dodoc ${DOCS} || die "docs failed to install"
> }
> 
> pkg_postinst() {
>         enewgroup avahi 409
>         enewuser avahi 409 /bin/false /dev/null avahi
>         ewarn "You must restart dbus for it to know about the avahi-dbus.conf"
>         ebeep 5
> }

Seems good.

-- 
Sebastien Estienne


More information about the avahi mailing list