Accepting request 157561 from home:sbrabec:branches:GNOME:Factory

- Remove no more needed gnome-nettool2.png.
- Fix paths in man pages (sed script).
- Update avahi-discover.desktop to fit Desktop Menu Specification
  better (avahi#365, fdo#49699).
- Automatically disable avahi on networks with unicast .local
  domain (bnc#431704, avahi-daemon-check-dns-suse.sh,
  avahi-daemon-check-dns-suse.patch).
- Split avahi-autoipd into a separate package (bnc#431704#c6,
  avahi-autoipd.if-up, avahi-autoipd.if-down,
  avahi-autoipd.README.SUSE).
- Use dedicated UID and GID for avahi-autoipd.
- Added sysconfig to fine tune behavior.
- Remove no more needed gnome-nettool2.png.
- Fix paths in man pages (sed script).
- Update avahi-discover.desktop to fit Desktop Menu Specification
  better (avahi#365, fdo#49699, avahi-desktop.patch).
- Move service-types.db to the main package. It is requires by
  python-avahi and avahi-utils.

OBS-URL: https://build.opensuse.org/request/show/157561
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=96
This commit is contained in:
Stanislav Brabec 2013-03-07 14:50:23 +00:00 committed by Git OBS Bridge
parent 81703027d5
commit 2dbf7fb6d9
16 changed files with 806 additions and 99 deletions

97
avahi-autoipd.README.SUSE Normal file
View File

@ -0,0 +1,97 @@
IPv4LL in SUSE Linux
====================
IPv4LL provides support of peer to peer address assignment from a
special link local IP range.
SUSE Linux contains three implementations of IPv4LL autoip protocol:
avahi-autoipd from avahi-autoipd package from avahi project
===========================================================
This is a daemon, that runs and assign IPv4LL address, either as a
fallback or at any time, depending on System/Zeroconf
AVAHI_AUTOIPD_FORCE_BIND sysconfig key (disabled by default).
The daemon runs permanently for each device, monitors the network
status, and assigns IPv4LL address when requested.
See http://avahi.org/wiki/AvahiAutoipd#ModesofOperation for more.
Activate avahi-autoipd implementation
-------------------------------------
- Install avahi-autoip package and check that System/Zeroconf
AVAHI_AUTOIPD_FORCE_BIND sysconfig key is "yes" (the default).
- Set the address settings in the YaST network configuration either to
None (to have IPv4LL address only) or DHCP (if you want DHCP together
with IPv4LL).
- Note that NetworkManager uses avahi-autoipd by default.
For AVAHI_AUTOIPD_FORCE_BIND=false:
-----------------------------------
In this mode the daemon assigns IPv4LL address only of DHCP fails.
Advantage:
- All programs work with this setup.
Disadvantage:
- When DHCP assigns address, all existing IPv4LL connections are lost.
For AVAHI_AUTOIPD_FORCE_BIND=true:
----------------------------------
In this mode the deamon forces binding address from IPv4LL address, even if
standard IPv4 address exists.
Advantage:
- You can depend on IPv4LL address always assigned.
Disadvantage:
- Some programs don't work well with labeled IP addresses or interface
aliases.
autoip from sysconfig package
=============================
autoip is hard bound to sysconfig scripts and it is called during ifup.
If DHCP adrress is assigned, autoip ends immediately. Only if no DHCP
address is assigned, it stays running as a daemon and provides IPv4LL
address.
Activate autoip implementation
------------------------------
- Do not install avahi-autoipd package or set System/Zeroconf
AVAHI_AUTOIPD_FORCE_BIND sysconfig key to "no".
- Set Zeroconf the address settings in the YaST network configuration.
IPv4LL assigned by dhcpcd
=========================
If dhcpcd fails to obtain a lease, it will probe for a valid IPv4LL
address. Once obtained it will probe every 10 seconds for a DHCP server.
Activate dhcpcd implementation
------------------------------
This implementation is not supported in SUSE yet. Enabling this
implementation would require several manual changes in the
/sbin/ifup-dhcp script (removal of -L argument, and skipping of calls to
${SCRIPTNAME}-autoip in /sbin/ifup (e. g. by not setting Zeroconf in the
YaST network configuration).

11
avahi-autoipd.if-down Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
[ "$2" != "lo" ] || exit 0
if test -f /etc/sysconfig/avahi ; then
. /etc/sysconfig/avahi
fi
if test "$AVAHI_AUTOIPD_ENABLE" = "yes" ; then
@sbindir@/avahi-autoipd -k $2 2> /dev/null || exit 0
fi

16
avahi-autoipd.if-up Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
[ "$2" != "lo" ] || exit 0
if test -f /etc/sysconfig/avahi ; then
. /etc/sysconfig/avahi
fi
if test "$AVAHI_AUTOIPD_ENABLE" = "yes" ; then
if test "$AVAHI_AUTOIPD_FORCE_BIND" = "yes" ; then
FORCE=" --force-bind"
else
FORCE=""
fi
@sbindir@/avahi-autoipd -wD$FORCE $2 2> /dev/null || exit 0
fi

24
avahi-autoipd.sysconfig Normal file
View File

@ -0,0 +1,24 @@
## Path: System/Zeroconf
## Description: Zeroconf (Bonjour, Rendezvous) options
## Type: yesno
## Default: yes
#
# Enable or disable avahi implementation of IPv4LL. If you select
# "yes", then it ignores AUTOIP keyword in the YaST network
# configuration. You should disable autoip implementation by disabling
# AUTOIP in the YaST network configuration of all devices.
# For more see @docdir@/avahi-autoipd/README.SUSE.
#
AVAHI_AUTOIPD_ENABLE="yes"
## Type: yesno
## Default: no
#
# Force binding address from IPv4LL (link local) address, even if
# standard IPv4 address exists. If you select "yes", alias interface
# will be created. It may break some naive programs. If you select
# "no", IPv4LL will be usable only if no routable address is configured.
# See http://avahi.org/wiki/AvahiAutoipd#ModesofOperation for more.
#
AVAHI_AUTOIPD_FORCE_BIND="no"

View File

@ -0,0 +1,65 @@
--- avahi-daemon-check-dns.sh.debian 2012-03-04 05:24:07.000000000 +0100
+++ avahi-daemon-check-dns.sh 2012-05-23 20:06:27.121923772 +0200
@@ -5,15 +5,15 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
-RUNDIR="/var/run/avahi-daemon/"
+RUNDIR="/var/run/avahi-daemon"
DISABLE_TAG="$RUNDIR/disabled-for-unicast-local"
NS_CACHE="$RUNDIR/checked_nameservers"
-AVAHI_DAEMON_DETECT_LOCAL=1
+AVAHI_DAEMON_DETECT_LOCAL=yes
-test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon
+test -f /etc/sysconfig/avahi-daemon && . /etc/sysconfig/avahi-daemon
-if [ "$AVAHI_DAEMON_DETECT_LOCAL" != "1" ]; then
+if [ "$AVAHI_DAEMON_DETECT_LOCAL" != "yes" ]; then
exit 0
fi
@@ -96,12 +96,8 @@
# no unicast .local conflict, so remove the tag and start avahi again
if [ -e ${DISABLE_TAG} ]; then
rm -f ${DISABLE_TAG}
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d avahi-daemon start || true
- else
- if [ -x "/etc/init.d/avahi-daemon" ]; then
- /etc/init.d/avahi-daemon start || true
- fi
+ if [ -x "/etc/init.d/avahi-daemon" ]; then
+ /etc/init.d/avahi-daemon start || true
fi
fi
}
@@ -110,14 +106,8 @@
[ -e ${DISABLE_TAG} ] && return
if [ -x /etc/init.d/avahi-daemon ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d --force avahi-daemon stop || true
- else
- if [ -x "/etc/init.d/avahi-daemon" ]; then
- /etc/init.d/avahi-daemon stop || true
- fi
- fi
- if [ -x /usr/bin/logger ]; then
+ /etc/init.d/avahi-daemon stop || true
+ if [ -x /bin/logger ]; then
logger -p daemon.warning -t avahi <<EOF
Avahi detected that your currently configured local DNS server serves
a domain .local. This is inherently incompatible with Avahi and thus
--- avahi-daemon.if-up.debian 2012-03-04 05:24:07.000000000 +0100
+++ avahi-daemon.if-up 2012-05-24 19:38:04.347420848 +0200
@@ -3,7 +3,7 @@
# Don't run the avahi-daemon unicast local check while bringing up
# the loopback device; it's not necessary until we bring up a real network
# device
-[ "$IFACE" != "lo" ] || exit 0
+[ "$2" != "lo" ] || exit 0
# If we have an unicast .local domain, we immediately disable avahi to avoid
# conflicts with the multicast IP4LL .local domain

155
avahi-daemon-check-dns.sh Normal file
View File

@ -0,0 +1,155 @@
#!/bin/sh
#
# If we have an unicast .local domain, we immediately disable avahi to avoid
# conflicts with the multicast IP4LL .local domain
PATH=/bin:/usr/bin:/sbin:/usr/sbin
RUNDIR="/var/run/avahi-daemon/"
DISABLE_TAG="$RUNDIR/disabled-for-unicast-local"
NS_CACHE="$RUNDIR/checked_nameservers"
AVAHI_DAEMON_DETECT_LOCAL=1
test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon
if [ "$AVAHI_DAEMON_DETECT_LOCAL" != "1" ]; then
exit 0
fi
ensure_rundir() {
if [ ! -d ${RUNDIR} ] ; then
mkdir -m 0755 -p ${RUNDIR}
chown avahi:avahi ${RUNDIR}
fi
}
dns_reachable() {
# If there are no nameserver entries in resolv.conf there is no dns reachable
$(grep -q nameserver /etc/resolv.conf) || return 1;
# If there is no local nameserver and no we have no global ip addresses
# then we can't reach any nameservers
if ! $(egrep -q "nameserver 127.0.0.1|::1" /etc/resolv.conf); then
# Get addresses of all running interfaces
ADDRS=$(LC_ALL=C ifconfig | grep ' addr:')
# Filter out all local addresses
ADDRS=$(echo "${ADDRS}" | egrep -v ':127|Scope:Host|Scope:Link')
# Check we have a default route
ROUTES=$(route -n | grep '^0.0.0.0 ')
if [ -z "${ADDRS}" -o -z "${ROUTES}" ] ; then
return 1;
fi
fi
return 0
}
dns_has_local() {
# Some magic to do tests
if [ -n "${FAKE_HOST_RETURN}" ] ; then
if [ "${FAKE_HOST_RETURN}" = "true" ]; then
return 0;
else
return 1;
fi
fi
OUT=`LC_ALL=C host -t soa local. 2>&1`
if [ $? -eq 0 ] ; then
if echo "$OUT" | egrep -vq 'has no|not found'; then
return 0
fi
else
# Checking the dns servers failed. Assuming no .local unicast dns, but
# remove the nameserver cache so we recheck the next time we're triggered
rm -f ${NS_CACHE}
fi
return 1
}
dns_needs_check() {
TMP_CACHE="${NS_CACHE}.$$"
RET=0
ensure_rundir
cat /etc/resolv.conf | grep "nameserver" | sort > ${TMP_CACHE} || return 0
if [ -e ${NS_CACHE} ]; then
DIFFERENCE=$(diff -w ${NS_CACHE} ${TMP_CACHE})
echo "${DIFFERENCE}" | grep -q '^>'
ADDED=$?
echo "${DIFFERENCE}" | grep -q '^<'
REMOVED=$?
# Avahi was disabled and no servers were removed, no need to recheck
[ -e ${DISABLE_TAG} ] && [ ${REMOVED} -ne 0 ] && RET=1
# Avahi was enabled and no servers were added, no need to recheck
[ ! -e ${DISABLE_TAG} ] && [ ${ADDED} -ne 0 ] && RET=1
fi
mv ${TMP_CACHE} ${NS_CACHE}
return ${RET};
}
enable_avahi () {
# no unicast .local conflict, so remove the tag and start avahi again
if [ -e ${DISABLE_TAG} ]; then
rm -f ${DISABLE_TAG}
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d avahi-daemon start || true
else
if [ -x "/etc/init.d/avahi-daemon" ]; then
/etc/init.d/avahi-daemon start || true
fi
fi
fi
}
disable_avahi () {
[ -e ${DISABLE_TAG} ] && return
if [ -x /etc/init.d/avahi-daemon ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d --force avahi-daemon stop || true
else
if [ -x "/etc/init.d/avahi-daemon" ]; then
/etc/init.d/avahi-daemon stop || true
fi
fi
if [ -x /usr/bin/logger ]; then
logger -p daemon.warning -t avahi <<EOF
Avahi detected that your currently configured local DNS server serves
a domain .local. This is inherently incompatible with Avahi and thus
Avahi disabled itself. If you want to use Avahi in this network, please
contact your administrator and convince him to use a different DNS domain,
since .local should be used exclusively for Zeroconf technology.
For more information, see http://avahi.org/wiki/AvahiAndUnicastDotLocal
EOF
fi
fi
ensure_rundir
touch ${DISABLE_TAG}
}
if ! dns_reachable ; then
# No unicast dns server reachable, so enable avahi
enable_avahi
# And blow away the dns cache, so we force a recheck when the interface comes
# up again
rm -f ${NS_CACHE}
exit 0
fi
# Check if the dns needs checking..
dns_needs_check || exit 0
if dns_has_local ; then
# .local from dns server, disabling avahi
disable_avahi
else
# no .local from dns server, enabling avahi
enable_avahi
fi
exit 0

12
avahi-daemon.if-up Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# Don't run the avahi-daemon unicast local check while bringing up
# the loopback device; it's not necessary until we bring up a real network
# device
[ "$IFACE" != "lo" ] || exit 0
# If we have an unicast .local domain, we immediately disable avahi to avoid
# conflicts with the multicast IP4LL .local domain
if [ -x /usr/lib/avahi/avahi-daemon-check-dns.sh ] ; then
exec /usr/lib/avahi/avahi-daemon-check-dns.sh
fi

View File

@ -1,42 +1,36 @@
Index: avahi-0.6.25/avahi-ui/bssh.desktop.in.in
Index: avahi-0.6.31/avahi-ui/bssh.desktop.in.in
===================================================================
--- avahi-0.6.25.orig/avahi-ui/bssh.desktop.in.in
+++ avahi-0.6.25/avahi-ui/bssh.desktop.in.in
@@ -5,7 +5,7 @@ _Comment=Browse for Zeroconf-enabled SSH
Exec=@bindir@/bssh
--- avahi-0.6.31.orig/avahi-ui/bssh.desktop.in.in
+++ avahi-0.6.31/avahi-ui/bssh.desktop.in.in
@@ -6,6 +6,6 @@ Exec=@bindir@/bssh
Terminal=false
Type=Application
-Icon=network-wired
Icon=network-wired
-Categories=GNOME;Network;
+Icon=gnome-nettool2
+Categories=GNOME;System;Monitor;
+Categories=GTK;Network;RemoteAccess;
StartupNotify=false
GenericName=
Index: avahi-0.6.25/avahi-ui/bvnc.desktop.in.in
Index: avahi-0.6.31/avahi-ui/bvnc.desktop.in.in
===================================================================
--- avahi-0.6.25.orig/avahi-ui/bvnc.desktop.in.in
+++ avahi-0.6.25/avahi-ui/bvnc.desktop.in.in
@@ -5,7 +5,7 @@ _Comment=Browse for Zeroconf-enabled VNC
Exec=@bindir@/bvnc
--- avahi-0.6.31.orig/avahi-ui/bvnc.desktop.in.in
+++ avahi-0.6.31/avahi-ui/bvnc.desktop.in.in
@@ -6,6 +6,6 @@ Exec=@bindir@/bvnc
Terminal=false
Type=Application
-Icon=network-wired
Icon=network-wired
-Categories=GNOME;Network;
+Icon=gnome-nettool2
+Categories=GNOME;System;Monitor;
+Categories=GTK;Network;RemoteAccess;
StartupNotify=false
GenericName=
Index: avahi-0.6.25/avahi-python/avahi-discover/avahi-discover.desktop.in.in
Index: avahi-0.6.31/avahi-python/avahi-discover/avahi-discover.desktop.in.in
===================================================================
--- avahi-0.6.25.orig/avahi-python/avahi-discover/avahi-discover.desktop.in.in
+++ avahi-0.6.25/avahi-python/avahi-discover/avahi-discover.desktop.in.in
@@ -5,7 +5,7 @@ _Comment=Browse for Zeroconf services av
Exec=@bindir@/avahi-discover
--- avahi-0.6.31.orig/avahi-python/avahi-discover/avahi-discover.desktop.in.in
+++ avahi-0.6.31/avahi-python/avahi-discover/avahi-discover.desktop.in.in
@@ -6,6 +6,6 @@ Exec=@bindir@/avahi-discover
Terminal=false
Type=Application
-Icon=network-wired
Icon=network-wired
-Categories=GNOME;System;
+Icon=gnome-nettool2
+Categories=GNOME;System;Utility;
+Categories=GTK;Network;Monitor;
StartupNotify=false
GenericName=

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Feb 4 16:59:54 CET 2013 - sbrabec@suse.cz
- Remove no more needed gnome-nettool2.png.
- Fix paths in man pages (sed script).
- Update avahi-discover.desktop to fit Desktop Menu Specification
better (avahi#365, fdo#49699).
-------------------------------------------------------------------
Sat Sep 17 13:50:42 UTC 2011 - jengelh@medozas.de

View File

@ -52,20 +52,31 @@ Summary: D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1+
Group: System/Daemons
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
Source1: gnome-nettool2.png
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh
Source2: avahi-bookmarks.init
Source3: avahi.firewall
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
Source5: avahi.sysconfig
Source6: avahi-autoipd.sysconfig
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source7: avahi-daemon.if-up
Source8: %{_name}_spec-prepare.sh
Source9: avahi-autoipd.README.SUSE
Source10: avahi-autoipd.if-up
Source11: avahi-autoipd.if-down
Source100: attributes
Source101: update_spec.pl
Source102: baselibs.conf
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
# PATCH-FIX-OPENSUSE avahi-gacdir.patch -- Mono libs are in $prefix/lib on suse
Patch0: avahi-gacdir.patch
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 sbrabec@suse.de
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 Avahi#365 -- sbrabec@suse.cz
Patch1: avahi-desktop.patch
# PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer
Patch3: avahi-empty-share-dir.patch
# PATCH-FEATURE-OPENSUSE avahi-daemon-check-dns-suse.patch bnc431704 sbrabec@suse.cz -- Port Debian avahi-daemon-check-dns.sh to SUSE, see also http://avahi.org/wiki/AvahiAndUnicastDotLocal
Patch4: avahi-daemon-check-dns-suse.patch
# PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default
Patch10: avahi-unicastdomains.patch
# PATCH-FIX-UPSTREAM avahi-gtk_box_new.patch dimstar@opensuse.org -- Do not use deprecated gtk_[hv]box_new, http://www.avahi.org/ticket/342
@ -97,7 +108,7 @@ BuildRequires: libtool
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
Source5: %{_name}_spec-prepare.sh
BuildRequires: gnome-icon-theme
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
@ -126,6 +137,8 @@ Obsoletes: mDNSResponder-64bit
# mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5
Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
Conflicts: avahi-utils <= 0.6.31-9.2
%endif
%if %build_glib2
BuildRequires: gobject-introspection-devel
@ -308,6 +321,21 @@ passes all tests in the Apple Bonjour conformance test suite. In
addition, it supports some nifty things that have never been seen
elsewhere, like correct mDNS reflection across LAN segments.
%package autoipd
Summary: IPv4LL Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Provides: avahi:%{_sbindir}/avahi-autoipd
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
Conflicts: avahi <= 0.6.31-9.2
%description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4
Link-Local Addresses.
avahi-autoipd doesn't depend on any other Avahi library, hence it makes
sense to install it even if Avahi itself is not installed.
%package utils
Summary: Command Line Utilities for D-BUS Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
@ -592,7 +620,6 @@ across LAN segments.
%if %build_qt3
%package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
Group: System/GUI/KDE
# Old name used for <= 10.3:
@ -615,7 +642,6 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments.
%package -n libavahi-qt3-devel
Summary: Include Files and Libraries Mandatory for Development
Group: Development/Libraries/C and C++
Requires: libavahi-devel = %{version}
@ -719,10 +745,17 @@ things, like correct mDNS reflection across LAN segments.
%prep
%setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} .
cp -a %{S:5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream
%patch0
%patch1 -p1
%patch3
%patch4
%patch10 -p1
%patch11 -p1
%patch12 -p1
@ -746,6 +779,8 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4
fi
# FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
%build
autoreconf -f -i
@ -793,8 +828,8 @@ intltoolize -f
--disable-mono\
%endif
--with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi\
--with-autoipd-group=avahi
--with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR
@ -847,6 +882,18 @@ make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
@ -859,7 +906,11 @@ ln -s %{_sysconfdir}/init.d/avahi-dnsconfd $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dn
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
ln -s %{_sysconfdir}/init.d/avahi-bookmarks $RPM_BUILD_ROOT%{_sbindir}/rcavahi-bookmarks
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %{S:1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnome-nettool2.png
# network-wired icon is available only in GNOME. Install network-wired.png as fallback system-wide icon. (Avahi#365)
# The icon is installed as part of core, as any of %%build_glib2 subpackages can be installed separately.
install -m 644 /usr/share/icons/gnome/48x48/devices/network-wired.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/network-wired.png
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
@ -903,8 +954,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%endif
%if %build_glib2
# FIXME: There are no better Categories in the spec (Monitor is not allowed in Network).
%suse_update_desktop_file -r avahi-discover GNOME System Monitor
%suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
@ -920,7 +970,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%post
/sbin/ldconfig
%{fillup_only -n avahi}
%{fillup_only -ns security checksig}
%{fillup_and_insserv -f -y avahi-daemon}
%{fillup_and_insserv -f avahi-dnsconfd}
%if %suse_version >= 1210
@ -935,12 +986,20 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%postun
/sbin/ldconfig
%{restart_on_update avahi-daemon}
%{restart_on_update avahi-dnsconfd}
%insserv_cleanup
%if %suse_version >= 1210
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
%post autoipd
%{fillup_only -ns avahi autoipd}
# Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11.
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%endif
%post -n libavahi-client3 -p /sbin/ldconfig
@ -1038,20 +1097,24 @@ fi
%defattr(-,root,root)
%doc LICENSE docs/*
# Note: This file is intentionally packaged here. It is needed for avahi-utils-gtk and python-avahi-gtk:
%{_datadir}/pixmaps/gnome-nettool2.png
%{_datadir}/pixmaps/network-wired.png
%dir %{_libdir}/avahi/
# Note: This file is intentionally packaged here. It is needed for python-avahi and avahi-utils:
%{_libdir}/avahi/service-types.db
# avahi creates the directory itself, we do not package it
# since it might be on tmpfs
%attr(-,avahi,avahi) %ghost %{_localstatedir}/run/avahi-daemon
%doc %{_mandir}/man5/*.5*
%doc %{_mandir}/man8/*.8*
%exclude %doc %{_mandir}/man8/avahi-autoipd*
%{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon
%{_sbindir}/rcavahi-dnsconfd
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/*
%dir %{_sysconfdir}/avahi
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%{_sysconfdir}/avahi/avahi-dnsconfd.action
%{_sysconfdir}/avahi/avahi-autoipd.action
%dir %{_sysconfdir}/avahi/services
%{_sysconfdir}/avahi/services/*.service
%config(noreplace) %{_sysconfdir}/avahi/hosts
@ -1060,12 +1123,16 @@ fi
%{_sysconfdir}/init.d/avahi-daemon
%{_datadir}/dbus-1/interfaces/org.freedesktop.Avahi.*.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%dir %{_prefix}/lib/avahi
%{_prefix}/lib/avahi/avahi-daemon-check-dns.sh
%{_unitdir}/avahi-daemon.service
%{_unitdir}/avahi-daemon.socket
%{_unitdir}/avahi-dnsconfd.service
# Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon
/var/adm/fillup-templates/sysconfig.avahi
%files lang -f %{name}.lang
%defattr(-,root,root)
@ -1102,6 +1169,16 @@ fi
%{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd*
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd
/var/adm/fillup-templates/sysconfig.avahi-autoipd
%files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse*
@ -1110,8 +1187,6 @@ fi
%{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd
%dir %{_libdir}/avahi/
%{_libdir}/avahi/service-types.db
%doc %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1*

View File

@ -52,20 +52,31 @@ Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonj
License: LGPL-2.1+
Group: Development/Languages/Mono
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
Source1: gnome-nettool2.png
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh
Source2: avahi-bookmarks.init
Source3: avahi.firewall
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
Source5: avahi.sysconfig
Source6: avahi-autoipd.sysconfig
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source7: avahi-daemon.if-up
Source8: %{_name}_spec-prepare.sh
Source9: avahi-autoipd.README.SUSE
Source10: avahi-autoipd.if-up
Source11: avahi-autoipd.if-down
Source100: attributes
Source101: update_spec.pl
Source102: baselibs.conf
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
# PATCH-FIX-OPENSUSE avahi-gacdir.patch -- Mono libs are in $prefix/lib on suse
Patch0: avahi-gacdir.patch
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 sbrabec@suse.de
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 Avahi#365 -- sbrabec@suse.cz
Patch1: avahi-desktop.patch
# PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer
Patch3: avahi-empty-share-dir.patch
# PATCH-FEATURE-OPENSUSE avahi-daemon-check-dns-suse.patch bnc431704 sbrabec@suse.cz -- Port Debian avahi-daemon-check-dns.sh to SUSE, see also http://avahi.org/wiki/AvahiAndUnicastDotLocal
Patch4: avahi-daemon-check-dns-suse.patch
# PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default
Patch10: avahi-unicastdomains.patch
# PATCH-FIX-UPSTREAM avahi-gtk_box_new.patch dimstar@opensuse.org -- Do not use deprecated gtk_[hv]box_new, http://www.avahi.org/ticket/342
@ -97,7 +108,7 @@ BuildRequires: libtool
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
Source5: %{_name}_spec-prepare.sh
BuildRequires: gnome-icon-theme
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
@ -126,6 +137,8 @@ Obsoletes: mDNSResponder-64bit
# mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5
Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
Conflicts: avahi-utils <= 0.6.31-9.2
%endif
%if %build_glib2
BuildRequires: gobject-introspection-devel
@ -307,6 +320,21 @@ passes all tests in the Apple Bonjour conformance test suite. In
addition, it supports some nifty things that have never been seen
elsewhere, like correct mDNS reflection across LAN segments.
%package autoipd
Summary: IPv4LL Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Provides: avahi:%{_sbindir}/avahi-autoipd
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
Conflicts: avahi <= 0.6.31-9.2
%description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4
Link-Local Addresses.
avahi-autoipd doesn't depend on any other Avahi library, hence it makes
sense to install it even if Avahi itself is not installed.
%package utils
Summary: Command Line Utilities for D-BUS Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
@ -591,7 +619,6 @@ across LAN segments.
%if %build_qt3
%package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
Group: System/GUI/KDE
# Old name used for <= 10.3:
@ -614,7 +641,6 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments.
%package -n libavahi-qt3-devel
Summary: Include Files and Libraries Mandatory for Development
Group: Development/Libraries/C and C++
Requires: libavahi-devel = %{version}
@ -718,10 +744,17 @@ things, like correct mDNS reflection across LAN segments.
%prep
%setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} .
cp -a %{S:5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream
%patch0
%patch1 -p1
%patch3
%patch4
%patch10 -p1
%patch11 -p1
%patch12 -p1
@ -745,6 +778,8 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4
fi
# FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
%build
autoreconf -f -i
@ -792,8 +827,8 @@ intltoolize -f
--disable-mono\
%endif
--with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi\
--with-autoipd-group=avahi
--with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR
@ -846,6 +881,18 @@ make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
@ -858,7 +905,11 @@ ln -s %{_sysconfdir}/init.d/avahi-dnsconfd $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dn
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
ln -s %{_sysconfdir}/init.d/avahi-bookmarks $RPM_BUILD_ROOT%{_sbindir}/rcavahi-bookmarks
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %{S:1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnome-nettool2.png
# network-wired icon is available only in GNOME. Install network-wired.png as fallback system-wide icon. (Avahi#365)
# The icon is installed as part of core, as any of %%build_glib2 subpackages can be installed separately.
install -m 644 /usr/share/icons/gnome/48x48/devices/network-wired.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/network-wired.png
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
@ -902,8 +953,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%endif
%if %build_glib2
# FIXME: There are no better Categories in the spec (Monitor is not allowed in Network).
%suse_update_desktop_file -r avahi-discover GNOME System Monitor
%suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
@ -919,7 +969,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%post
/sbin/ldconfig
%{fillup_only -n avahi}
%{fillup_only -ns security checksig}
%{fillup_and_insserv -f -y avahi-daemon}
%{fillup_and_insserv -f avahi-dnsconfd}
%if %suse_version >= 1210
@ -934,12 +985,20 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%postun
/sbin/ldconfig
%{restart_on_update avahi-daemon}
%{restart_on_update avahi-dnsconfd}
%insserv_cleanup
%if %suse_version >= 1210
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
%post autoipd
%{fillup_only -ns avahi autoipd}
# Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11.
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%endif
%post -n libavahi-client3 -p /sbin/ldconfig
@ -1037,20 +1096,24 @@ fi
%defattr(-,root,root)
%doc LICENSE docs/*
# Note: This file is intentionally packaged here. It is needed for avahi-utils-gtk and python-avahi-gtk:
%{_datadir}/pixmaps/gnome-nettool2.png
%{_datadir}/pixmaps/network-wired.png
%dir %{_libdir}/avahi/
# Note: This file is intentionally packaged here. It is needed for python-avahi and avahi-utils:
%{_libdir}/avahi/service-types.db
# avahi creates the directory itself, we do not package it
# since it might be on tmpfs
%attr(-,avahi,avahi) %ghost %{_localstatedir}/run/avahi-daemon
%doc %{_mandir}/man5/*.5*
%doc %{_mandir}/man8/*.8*
%exclude %doc %{_mandir}/man8/avahi-autoipd*
%{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon
%{_sbindir}/rcavahi-dnsconfd
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/*
%dir %{_sysconfdir}/avahi
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%{_sysconfdir}/avahi/avahi-dnsconfd.action
%{_sysconfdir}/avahi/avahi-autoipd.action
%dir %{_sysconfdir}/avahi/services
%{_sysconfdir}/avahi/services/*.service
%config(noreplace) %{_sysconfdir}/avahi/hosts
@ -1059,12 +1122,16 @@ fi
%{_sysconfdir}/init.d/avahi-daemon
%{_datadir}/dbus-1/interfaces/org.freedesktop.Avahi.*.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%dir %{_prefix}/lib/avahi
%{_prefix}/lib/avahi/avahi-daemon-check-dns.sh
%{_unitdir}/avahi-daemon.service
%{_unitdir}/avahi-daemon.socket
%{_unitdir}/avahi-dnsconfd.service
# Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon
/var/adm/fillup-templates/sysconfig.avahi
%files lang -f %{name}.lang
%defattr(-,root,root)
@ -1101,6 +1168,16 @@ fi
%{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd*
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd
/var/adm/fillup-templates/sysconfig.avahi-autoipd
%files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse*
@ -1109,8 +1186,6 @@ fi
%{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd
%dir %{_libdir}/avahi/
%{_libdir}/avahi/service-types.db
%doc %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1*

View File

@ -52,20 +52,31 @@ Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjo
License: LGPL-2.1+
Group: System/GUI/KDE
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
Source1: gnome-nettool2.png
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh
Source2: avahi-bookmarks.init
Source3: avahi.firewall
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
Source5: avahi.sysconfig
Source6: avahi-autoipd.sysconfig
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source7: avahi-daemon.if-up
Source8: %{_name}_spec-prepare.sh
Source9: avahi-autoipd.README.SUSE
Source10: avahi-autoipd.if-up
Source11: avahi-autoipd.if-down
Source100: attributes
Source101: update_spec.pl
Source102: baselibs.conf
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
# PATCH-FIX-OPENSUSE avahi-gacdir.patch -- Mono libs are in $prefix/lib on suse
Patch0: avahi-gacdir.patch
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 sbrabec@suse.de
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 Avahi#365 -- sbrabec@suse.cz
Patch1: avahi-desktop.patch
# PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer
Patch3: avahi-empty-share-dir.patch
# PATCH-FEATURE-OPENSUSE avahi-daemon-check-dns-suse.patch bnc431704 sbrabec@suse.cz -- Port Debian avahi-daemon-check-dns.sh to SUSE, see also http://avahi.org/wiki/AvahiAndUnicastDotLocal
Patch4: avahi-daemon-check-dns-suse.patch
# PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default
Patch10: avahi-unicastdomains.patch
# PATCH-FIX-UPSTREAM avahi-gtk_box_new.patch dimstar@opensuse.org -- Do not use deprecated gtk_[hv]box_new, http://www.avahi.org/ticket/342
@ -97,7 +108,7 @@ BuildRequires: libtool
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
Source5: %{_name}_spec-prepare.sh
BuildRequires: gnome-icon-theme
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
@ -126,6 +137,8 @@ Obsoletes: mDNSResponder-64bit
# mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5
Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
Conflicts: avahi-utils <= 0.6.31-9.2
%endif
%if %build_glib2
BuildRequires: gobject-introspection-devel
@ -310,6 +323,21 @@ passes all tests in the Apple Bonjour conformance test suite. In
addition, it supports some nifty things that have never been seen
elsewhere, like correct mDNS reflection across LAN segments.
%package autoipd
Summary: IPv4LL Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Provides: avahi:%{_sbindir}/avahi-autoipd
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
Conflicts: avahi <= 0.6.31-9.2
%description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4
Link-Local Addresses.
avahi-autoipd doesn't depend on any other Avahi library, hence it makes
sense to install it even if Avahi itself is not installed.
%package utils
Summary: Command Line Utilities for D-BUS Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
@ -594,7 +622,6 @@ across LAN segments.
%if %build_qt3
%package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
Group: System/GUI/KDE
# Old name used for <= 10.3:
@ -617,7 +644,6 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments.
%package -n libavahi-qt3-devel
Summary: Include Files and Libraries Mandatory for Development
Group: Development/Libraries/C and C++
Requires: libavahi-devel = %{version}
@ -721,10 +747,17 @@ things, like correct mDNS reflection across LAN segments.
%prep
%setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} .
cp -a %{S:5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream
%patch0
%patch1 -p1
%patch3
%patch4
%patch10 -p1
%patch11 -p1
%patch12 -p1
@ -748,6 +781,8 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4
fi
# FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
%build
autoreconf -f -i
@ -795,8 +830,8 @@ intltoolize -f
--disable-mono\
%endif
--with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi\
--with-autoipd-group=avahi
--with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR
@ -849,6 +884,18 @@ make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
@ -861,7 +908,11 @@ ln -s %{_sysconfdir}/init.d/avahi-dnsconfd $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dn
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
ln -s %{_sysconfdir}/init.d/avahi-bookmarks $RPM_BUILD_ROOT%{_sbindir}/rcavahi-bookmarks
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %{S:1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnome-nettool2.png
# network-wired icon is available only in GNOME. Install network-wired.png as fallback system-wide icon. (Avahi#365)
# The icon is installed as part of core, as any of %%build_glib2 subpackages can be installed separately.
install -m 644 /usr/share/icons/gnome/48x48/devices/network-wired.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/network-wired.png
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
@ -905,8 +956,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%endif
%if %build_glib2
# FIXME: There are no better Categories in the spec (Monitor is not allowed in Network).
%suse_update_desktop_file -r avahi-discover GNOME System Monitor
%suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
@ -922,7 +972,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%post
/sbin/ldconfig
%{fillup_only -n avahi}
%{fillup_only -ns security checksig}
%{fillup_and_insserv -f -y avahi-daemon}
%{fillup_and_insserv -f avahi-dnsconfd}
%if %suse_version >= 1210
@ -937,12 +988,20 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%postun
/sbin/ldconfig
%{restart_on_update avahi-daemon}
%{restart_on_update avahi-dnsconfd}
%insserv_cleanup
%if %suse_version >= 1210
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
%post autoipd
%{fillup_only -ns avahi autoipd}
# Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11.
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%endif
%post -n libavahi-client3 -p /sbin/ldconfig
@ -1040,20 +1099,24 @@ fi
%defattr(-,root,root)
%doc LICENSE docs/*
# Note: This file is intentionally packaged here. It is needed for avahi-utils-gtk and python-avahi-gtk:
%{_datadir}/pixmaps/gnome-nettool2.png
%{_datadir}/pixmaps/network-wired.png
%dir %{_libdir}/avahi/
# Note: This file is intentionally packaged here. It is needed for python-avahi and avahi-utils:
%{_libdir}/avahi/service-types.db
# avahi creates the directory itself, we do not package it
# since it might be on tmpfs
%attr(-,avahi,avahi) %ghost %{_localstatedir}/run/avahi-daemon
%doc %{_mandir}/man5/*.5*
%doc %{_mandir}/man8/*.8*
%exclude %doc %{_mandir}/man8/avahi-autoipd*
%{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon
%{_sbindir}/rcavahi-dnsconfd
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/*
%dir %{_sysconfdir}/avahi
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%{_sysconfdir}/avahi/avahi-dnsconfd.action
%{_sysconfdir}/avahi/avahi-autoipd.action
%dir %{_sysconfdir}/avahi/services
%{_sysconfdir}/avahi/services/*.service
%config(noreplace) %{_sysconfdir}/avahi/hosts
@ -1062,12 +1125,16 @@ fi
%{_sysconfdir}/init.d/avahi-daemon
%{_datadir}/dbus-1/interfaces/org.freedesktop.Avahi.*.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%dir %{_prefix}/lib/avahi
%{_prefix}/lib/avahi/avahi-daemon-check-dns.sh
%{_unitdir}/avahi-daemon.service
%{_unitdir}/avahi-daemon.socket
%{_unitdir}/avahi-dnsconfd.service
# Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon
/var/adm/fillup-templates/sysconfig.avahi
%files lang -f %{name}.lang
%defattr(-,root,root)
@ -1104,6 +1171,16 @@ fi
%{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd*
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd
/var/adm/fillup-templates/sysconfig.avahi-autoipd
%files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse*
@ -1112,8 +1189,6 @@ fi
%{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd
%dir %{_libdir}/avahi/
%{_libdir}/avahi/service-types.db
%doc %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1*

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Feb 4 16:59:54 CET 2013 - sbrabec@suse.cz
- Automatically disable avahi on networks with unicast .local
domain (bnc#431704, avahi-daemon-check-dns-suse.sh,
avahi-daemon-check-dns-suse.patch).
- Split avahi-autoipd into a separate package (bnc#431704#c6,
avahi-autoipd.if-up, avahi-autoipd.if-down,
avahi-autoipd.README.SUSE).
- Use dedicated UID and GID for avahi-autoipd.
- Added sysconfig to fine tune behavior.
- Remove no more needed gnome-nettool2.png.
- Fix paths in man pages (sed script).
- Update avahi-discover.desktop to fit Desktop Menu Specification
better (avahi#365, fdo#49699, avahi-desktop.patch).
- Move service-types.db to the main package. It is requires by
python-avahi and avahi-utils.
-------------------------------------------------------------------
Mon Jan 28 10:01:28 UTC 2013 - rmilasan@suse.com

View File

@ -54,20 +54,31 @@ Summary: D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1+
Group: System/Daemons
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
Source1: gnome-nettool2.png
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh
Source2: avahi-bookmarks.init
Source3: avahi.firewall
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
Source5: avahi.sysconfig
Source6: avahi-autoipd.sysconfig
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source7: avahi-daemon.if-up
Source8: %{_name}_spec-prepare.sh
Source9: avahi-autoipd.README.SUSE
Source10: avahi-autoipd.if-up
Source11: avahi-autoipd.if-down
Source100: attributes
Source101: update_spec.pl
Source102: baselibs.conf
# Copy of glib-2.0.m4 from glib2-devel to not depend on glib2-devel.
Source4: avahi-glib-gettext.m4
# PATCH-FIX-OPENSUSE avahi-gacdir.patch -- Mono libs are in $prefix/lib on suse
Patch0: avahi-gacdir.patch
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 sbrabec@suse.de
# PATCH-FIX-UPSTREAM avahi-desktop.patch bnc254654 Avahi#365 -- sbrabec@suse.cz
Patch1: avahi-desktop.patch
# PATCH-FIX-UPSTREAM avahi-empty-share-dir.patch jpr@novell.com -- mailed maintainer
Patch3: avahi-empty-share-dir.patch
# PATCH-FEATURE-OPENSUSE avahi-daemon-check-dns-suse.patch bnc431704 sbrabec@suse.cz -- Port Debian avahi-daemon-check-dns.sh to SUSE, see also http://avahi.org/wiki/AvahiAndUnicastDotLocal
Patch4: avahi-daemon-check-dns-suse.patch
# PATCH-FIX-OPENSUSE avahi-unicastdomains.patch bnc433359 lnussel@suse.de -- disable pre-set unicast domains by default
Patch10: avahi-unicastdomains.patch
# PATCH-FIX-UPSTREAM avahi-gtk_box_new.patch dimstar@opensuse.org -- Do not use deprecated gtk_[hv]box_new, http://www.avahi.org/ticket/342
@ -99,7 +110,7 @@ BuildRequires: libtool
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
Source5: %{_name}_spec-prepare.sh
BuildRequires: gnome-icon-theme
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
@ -128,6 +139,8 @@ Obsoletes: mDNSResponder-64bit
# mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5
Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
Conflicts: avahi-utils <= 0.6.31-9.2
%endif
%if %build_glib2
BuildRequires: gobject-introspection-devel
@ -310,6 +323,21 @@ passes all tests in the Apple Bonjour conformance test suite. In
addition, it supports some nifty things that have never been seen
elsewhere, like correct mDNS reflection across LAN segments.
%package autoipd
Summary: IPv4LL Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Provides: avahi:%{_sbindir}/avahi-autoipd
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
Conflicts: avahi <= 0.6.31-9.2
%description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4
Link-Local Addresses.
avahi-autoipd doesn't depend on any other Avahi library, hence it makes
sense to install it even if Avahi itself is not installed.
%package utils
Summary: Command Line Utilities for D-BUS Service for Zeroconf and Bonjour
Group: Productivity/Networking/Other
@ -594,7 +622,6 @@ across LAN segments.
%if %build_qt3
%package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
Group: System/GUI/KDE
# Old name used for <= 10.3:
@ -617,7 +644,6 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments.
%package -n libavahi-qt3-devel
Summary: Include Files and Libraries Mandatory for Development
Group: Development/Libraries/C and C++
Requires: libavahi-devel = %{version}
@ -721,10 +747,17 @@ things, like correct mDNS reflection across LAN segments.
%prep
%setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} .
cp -a %{S:5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream
%patch0
%patch1 -p1
%patch3
%patch4
%patch10 -p1
%patch11 -p1
%patch12 -p1
@ -748,6 +781,8 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4
fi
# FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
%build
autoreconf -f -i
@ -795,8 +830,8 @@ intltoolize -f
--disable-mono\
%endif
--with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi\
--with-autoipd-group=avahi
--with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR
@ -849,6 +884,18 @@ make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
ln -s avahi-compat-libdns_sd/dns_sd.h $RPM_BUILD_ROOT%{_includedir}/
ln -s avahi-compat-howl.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/howl.pc
install -d $RPM_BUILD_ROOT%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh $RPM_BUILD_ROOT%{_prefix}/lib/avahi/
install -d $RPM_BUILD_ROOT/etc/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.)
install avahi-daemon.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down $RPM_BUILD_ROOT/etc/sysconfig/network/if-down.d/avahi-autoipd
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
@ -861,7 +908,11 @@ ln -s %{_sysconfdir}/init.d/avahi-dnsconfd $RPM_BUILD_ROOT%{_sbindir}/rcavahi-dn
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
ln -s %{_sysconfdir}/init.d/avahi-bookmarks $RPM_BUILD_ROOT%{_sbindir}/rcavahi-bookmarks
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %{S:1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnome-nettool2.png
# network-wired icon is available only in GNOME. Install network-wired.png as fallback system-wide icon. (Avahi#365)
# The icon is installed as part of core, as any of %%build_glib2 subpackages can be installed separately.
install -m 644 /usr/share/icons/gnome/48x48/devices/network-wired.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/network-wired.png
install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.avahi* $RPM_BUILD_ROOT/var/adm/fillup-templates/
%if ! %build_glib2
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces
@ -905,8 +956,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%endif
%if %build_glib2
# FIXME: There are no better Categories in the spec (Monitor is not allowed in Network).
%suse_update_desktop_file -r avahi-discover GNOME System Monitor
%suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc
%suse_update_desktop_file bssh
%endif
@ -922,7 +972,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%post
/sbin/ldconfig
%{fillup_only -n avahi}
%{fillup_only -ns security checksig}
%{fillup_and_insserv -f -y avahi-daemon}
%{fillup_and_insserv -f avahi-dnsconfd}
%if %suse_version >= 1210
@ -937,12 +988,20 @@ rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/avahi-ui.pc
%endif
%postun
/sbin/ldconfig
%{restart_on_update avahi-daemon}
%{restart_on_update avahi-dnsconfd}
%insserv_cleanup
%if %suse_version >= 1210
%service_del_postun avahi-dnsconfd.service avahi-daemon.service
%pre autoipd
%{_sbindir}/groupadd -r avahi-autoipd 2> /dev/null || :
%{_sbindir}/useradd -r -s /bin/false -c "User for Avahi IPv4LL" -d %{_localstatedir}/lib/avahi-autoipd -g avahi-autoipd avahi-autoipd 2> /dev/null || :
%post autoipd
%{fillup_only -ns avahi autoipd}
# Change ownership of /var/lib/avahi-autoipd after upgrade from openSUSE <= 12.3 and SLE <= 11.
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%endif
%post -n libavahi-client3 -p /sbin/ldconfig
@ -1040,20 +1099,24 @@ fi
%defattr(-,root,root)
%doc LICENSE docs/*
# Note: This file is intentionally packaged here. It is needed for avahi-utils-gtk and python-avahi-gtk:
%{_datadir}/pixmaps/gnome-nettool2.png
%{_datadir}/pixmaps/network-wired.png
%dir %{_libdir}/avahi/
# Note: This file is intentionally packaged here. It is needed for python-avahi and avahi-utils:
%{_libdir}/avahi/service-types.db
# avahi creates the directory itself, we do not package it
# since it might be on tmpfs
%attr(-,avahi,avahi) %ghost %{_localstatedir}/run/avahi-daemon
%doc %{_mandir}/man5/*.5*
%doc %{_mandir}/man8/*.8*
%exclude %doc %{_mandir}/man8/avahi-autoipd*
%{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon
%{_sbindir}/rcavahi-dnsconfd
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/*
%dir %{_sysconfdir}/avahi
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%{_sysconfdir}/avahi/avahi-dnsconfd.action
%{_sysconfdir}/avahi/avahi-autoipd.action
%dir %{_sysconfdir}/avahi/services
%{_sysconfdir}/avahi/services/*.service
%config(noreplace) %{_sysconfdir}/avahi/hosts
@ -1062,12 +1125,16 @@ fi
%{_sysconfdir}/init.d/avahi-daemon
%{_datadir}/dbus-1/interfaces/org.freedesktop.Avahi.*.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%dir %{_prefix}/lib/avahi
%{_prefix}/lib/avahi/avahi-daemon-check-dns.sh
%{_unitdir}/avahi-daemon.service
%{_unitdir}/avahi-daemon.socket
%{_unitdir}/avahi-dnsconfd.service
# Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon
/var/adm/fillup-templates/sysconfig.avahi
%files lang -f %{name}.lang
%defattr(-,root,root)
@ -1104,6 +1171,16 @@ fi
%{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd*
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd
/var/adm/fillup-templates/sysconfig.avahi-autoipd
%files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse*
@ -1112,8 +1189,6 @@ fi
%{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd
%dir %{_libdir}/avahi/
%{_libdir}/avahi/service-types.db
%doc %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1*

10
avahi.sysconfig Normal file
View File

@ -0,0 +1,10 @@
## Path: System/Zeroconf
## Description: Zeroconf (Bonjour, Rendezvous) options
## Type: yesno
## Default: yes
#
# Detect unicast DNS .local domain and temporarily disable avahi in such case.
# For more read http://avahi.org/wiki/AvahiAndUnicastDotLocal
#
AVAHI_DAEMON_DETECT_LOCAL="yes"

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88cbac3316fd0ad10bb7d054dcd53ab822517a1d9bbb70a31cd754dcd59e94b9
size 4509