Avahi-0.9-rc5

Introduction to Avahi

The Avahi package is a system which facilitates service discovery on a local network.

[Note]

Note

This version of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable version of the System V books.

[Note]

Note

Normally the BLFS editors prefer to not use release candidates but the most recent "stable" release of this package was in 2020 and there are several security updates in this version.

Package Information

Additional Downloads

Avahi Dependencies

Required

GLib-2.88.3 (GObject Introspection recommended)

Recommended

Optional

D-Bus Python-1.4.0, libevent-2.1.13, Doxygen-1.18.0, GTK+-2 (deprecated), and xmltoman (for generating documentation)

Installation of Avahi

There should be a dedicated user and group to take control of the avahi-daemon daemon after it is started. Issue the following commands as the root user:

groupadd -fg 84 avahi &&
useradd -c "Avahi Daemon Owner" -d /run/avahi-daemon -u 84 \
        -g avahi -s /bin/false avahi

There should also be a dedicated privileged access group for Avahi clients. Issue the following command as the root user:

groupadd -fg 86 netdev

Fix a regression that results in a race condition when IPv6 is in use and multiple network adapters are present on the system:

patch -Np1 -i ../avahi-0.9-rc5-ipv6_race_condition_fix-1.patch

Install Avahi by running the following commands:

auroreconf -fiv &&

./configure \
    --prefix=/usr                  \
    --sysconfdir=/etc              \
    --localstatedir=/var           \
    --disable-static               \
    --disable-libevent             \
    --disable-mono                 \
    --disable-monodoc              \
    --disable-python               \
    --disable-qt3                  \
    --disable-qt4                  \
    --disable-qt5                  \
    --enable-core-docs             \
    --with-distro=none             \
    --with-systemdsystemunitdir=no \
    --with-dbus-system-address='unix:path=/run/dbus/system_bus_socket' &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--disable-libevent: This parameter disables the use of libevent-2.1.13. Remove if you have it installed.

--disable-mono: This parameter disables the Mono bindings.

--disable-monodoc: This parameter disables documentation for the Mono bindings.

--disable-python: This parameter disables the scripts that depend on Python. It also allows a regular install to complete successfully.

--disable-qt3: This parameter disables the attempt to build the obsolete Qt3 portions of the package.

--disable-qt4: This parameter disables the attempt to build the obsolete Qt4Core portions of the package.

--disable-qt5: This parameter disables the use of Qt5, and allows building without it.

--enable-core-docs: This parameter enables the building of documentation.

--with-distro=none: There is an obsolete boot script in the distribution for LFS. This option disables it.

--with-systemdsystemunitdir=no: Without it, the daemon fails to start in BLFS, which does not support systemd.

--with-dbus-system-address=: This option prevents the package from referring to the deprecated /var/run directory.

--disable-dbus: This parameter disables the use of D-Bus.

--disable-gtk: This parameter disables the use of GTK+2.

--disable-gtk3: This parameter disables the use of GTK+3.

--disable-libdaemon: This parameter disables the use of libdaemon. If you use this option, avahi-daemon won't be built.

--enable-tests: This option enables the building of tests and examples.

--enable-compat-howl: This option enables the compatibility layer for HOWL.

--enable-compat-libdns_sd: This option enables the compatibility layer for libdns_sd.

Configuring avahi

Boot Script

To automatically start the avahi-daemon when the system is rebooted, install the /etc/rc.d/init.d/avahi bootscript from the blfs-bootscripts-20251220 package.

make install-avahi

Contents

Installed Programs: avahi-browse, avahi-browse-domains, avahi-discover-standalone, avahi-publish, avahi-publish-address, avahi-publish-service, avahi-resolve, avahi-resolve-address, avahi-resolve-host-name, avahi-set-host-name, and bssh
Installed Libraries: libavahi-client.so, libavahi-common.so, libavahi-core.so, libavahi-glib.so, libavahi-gobject.so, and libavahi-ui-gtk3.so
Installed Directories: /etc/avahi/services, /usr/include/{avahi-client, avahi-common, avahi-core, avahi-glib, avahi-gobject, avahi-ui}, /usr/lib/avahi, and /usr/share/avahi

Short Descriptions

avahi-browse

browses for mDNS/DNS-SD services using the Avahi daemon

avahi-browse-domains

browses for mDNS/DNS-SD services using the Avahi daemon

avahi-discover-standalone

browses for mDNS/DNS-SD services using the Avahi daemon

avahi-publish

registers a mDNS/DNS-SD service or host name or address mapping using the Avahi daemon

avahi-publish-address

registers a mDNS/DNS-SD service or host name or address mapping using the Avahi daemon

avahi-publish-service

registers a mDNS/DNS-SD service or host name or address mapping using the Avahi daemon

avahi-resolve

resolves one or more mDNS/DNS host name(s) to IP address(es) (and vice versa) using the Avahi daemon

avahi-resolve-address

resolves one or more mDNS/DNS host name(s) to IP address(es) (and vice versa) using the Avahi daemon

avahi-resolve-host-name

resolves one or more mDNS/DNS host name(s) to IP address(es) (and vice versa) using the Avahi daemon

avahi-set-host-name

changes the mDNS host name

bssh

browses for SSH servers on the local network