From e8f575580d93021be22dc037757e3dfd5148a732 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sep 06 2007 19:05:35 +0000 Subject: - resolves #249044: Update init script to use runlevel 96 - resolves #251700: Fix assertion in libdns_sd-compat --- diff --git a/avahi-0.6.21-initscript.patch b/avahi-0.6.21-initscript.patch index d2b5f57..6d9cf95 100644 --- a/avahi-0.6.21-initscript.patch +++ b/avahi-0.6.21-initscript.patch @@ -1,7 +1,19 @@ -diff -up avahi-0.6.21/initscript/fedora/avahi-daemon.in.initscript avahi-0.6.21/initscript/fedora/avahi-daemon.in ---- avahi-0.6.21/initscript/fedora/avahi-daemon.in.initscript 2007-08-28 15:00:24.000000000 +0200 -+++ avahi-0.6.21/initscript/fedora/avahi-daemon.in 2007-08-28 17:34:28.000000000 +0200 -@@ -14,20 +14,25 @@ OTHER_AVAHI_OPTS="" +Index: initscript/fedora/avahi-dnsconfd.in +=================================================================== +--- initscript/fedora/avahi-dnsconfd.in (revision 1531) ++++ initscript/fedora/avahi-dnsconfd.in (revision 1535) +@@ -1,8 +1,8 @@ + #! /bin/sh + # +-# avahi-daemon: Starts the Avahi dns configuration daemon ++# avahi-dnsconfd: Starts the Avahi dns configuration daemon + # +-# chkconfig: - 97 02 ++# chkconfig: - 96 02 + # description: avahi-dnsconfd connects to a running avahi-daemon and runs the script \ + # /etc/avahi/dnsconf.action for each unicast DNS server that is announced \ + # on the local LAN. This is useful for configuring unicast DNS servers in \ +@@ -14,18 +14,24 @@ # Source function library. . /etc/init.d/functions @@ -10,40 +22,58 @@ diff -up avahi-0.6.21/initscript/fedora/avahi-daemon.in.initscript avahi-0.6.21/ -# Check that networking is configured. -[ ${NETWORKING} = "no" ] && exit 0 - - AVAHI_BIN=@sbindir@/avahi-daemon +- + AVAHI_BIN=@sbindir@/avahi-dnsconfd -test -x $AVAHI_BIN || exit 5 -+ + +if [ $1 == 'status' ]; then + test -x $AVAHI_BIN || exit 4 +else + test -x $AVAHI_BIN || exit 5 +fi ++ + LOCKFILE=/var/lock/subsys/avahi-dnsconfd - LOCKFILE=/var/lock/subsys/avahi-daemon - - base=${0##*/} - ++base=${0##*/} ++ start() { + # Check that networking is configured. + [ ${NETWORKING} = "no" ] && exit 1 + - echo -n $"Starting Avahi daemon... " - if [ -s /etc/localtime ]; then - cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1 -@@ -96,7 +101,7 @@ case "$1" in + echo -n $"Starting Avahi DNS daemon... " + $AVAHI_BIN -D + RETVAL=$? +@@ -58,7 +64,6 @@ + return $RETVAL + } + +- + restart() { + stop + start +@@ -92,7 +97,7 @@ ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 + exit 2 + ;; esac - exit $RETVAL -diff -up avahi-0.6.21/initscript/fedora/avahi-dnsconfd.in.initscript avahi-0.6.21/initscript/fedora/avahi-dnsconfd.in ---- avahi-0.6.21/initscript/fedora/avahi-dnsconfd.in.initscript 2007-08-28 17:35:07.000000000 +0200 -+++ avahi-0.6.21/initscript/fedora/avahi-dnsconfd.in 2007-08-28 17:36:48.000000000 +0200 -@@ -14,18 +14,21 @@ OTHER_AVAHI_OPTS="" +Index: initscript/fedora/avahi-daemon.in +=================================================================== +--- initscript/fedora/avahi-daemon.in (revision 1531) ++++ initscript/fedora/avahi-daemon.in (revision 1535) +@@ -2,7 +2,7 @@ + # + # avahi-daemon: Starts the Avahi Daemon + # +-# chkconfig: 345 97 02 ++# chkconfig: 345 96 02 + # description: This is a daemon which runs on client machines to perform \ + # Zeroconf service discovery on a network. avahi-daemon must be \ + # running on systems that use Avahi for service discovery. \ +@@ -14,20 +14,24 @@ # Source function library. . /etc/init.d/functions @@ -53,29 +83,33 @@ diff -up avahi-0.6.21/initscript/fedora/avahi-dnsconfd.in.initscript avahi-0.6.2 -# Check that networking is configured. -[ ${NETWORKING} = "no" ] && exit 0 - - AVAHI_BIN=@sbindir@/avahi-dnsconfd + AVAHI_BIN=@sbindir@/avahi-daemon -test -x $AVAHI_BIN || exit 5 + +if [ $1 == 'status' ]; then + test -x $AVAHI_BIN || exit 4 +else + test -x $AVAHI_BIN || exit 5 +fi ++ + LOCKFILE=/var/lock/subsys/avahi-daemon - LOCKFILE=/var/lock/subsys/avahi-dnsconfd + base=${0##*/} start() { + # Check that networking is configured. + [ ${NETWORKING} = "no" ] && exit 1 + - echo -n $"Starting Avahi DNS daemon... " - $AVAHI_BIN -D - RETVAL=$? -@@ -92,7 +95,7 @@ case "$1" in + echo -n $"Starting Avahi daemon... " + if [ -s /etc/localtime ]; then + cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1 +@@ -96,7 +100,8 @@ ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart}" - exit 1 + exit 2 - ;; ++ ;; esac + exit $RETVAL diff --git a/avahi-0.6.21-libdns_sd-fix.patch b/avahi-0.6.21-libdns_sd-fix.patch new file mode 100644 index 0000000..148ca02 --- /dev/null +++ b/avahi-0.6.21-libdns_sd-fix.patch @@ -0,0 +1,21 @@ +Index: avahi-compat-libdns_sd/compat.c +=================================================================== +--- avahi-compat-libdns_sd/compat.c (revision 1535) ++++ avahi-compat-libdns_sd/compat.c (revision 1536) +@@ -990,6 +990,16 @@ + return; + } + } ++ ++ if (!sdref->service_name_chosen) { ++ ++ assert(sdref->service_name); ++ ++ if (!(sdref->service_name_chosen = avahi_strdup(sdref->service_name))) { ++ reg_report_error(sdref, kDNSServiceErr_NoMemory); ++ return; ++ } ++ } + + /* Register the service */ + diff --git a/avahi.spec b/avahi.spec index 429d881..217c78f 100644 --- a/avahi.spec +++ b/avahi.spec @@ -6,7 +6,7 @@ %endif Name: avahi Version: 0.6.21 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Local network service discovery Group: System Environment/Base License: LGPL @@ -39,6 +39,7 @@ Source0: http://avahi.org/download/%{name}-%{version}.tar.gz Patch1: avahi-0.6.21-avahi-browse-help-fix.patch Patch2: avahi-0.6.3-MONO_SHARED_DIR.patch Patch3: avahi-0.6.21-initscript.patch +Patch4: avahi-0.6.21-libdns_sd-fix.patch %description Avahi is a system which facilitates service discovery on @@ -221,8 +222,9 @@ fashion with mDNS. %patch1 -p0 -b .avahi-browse-help-fix %if %{WITH_MONO} %patch2 -p1 -b .MONO_SHARED_DIR -%patch3 -p1 -b .initscript %endif +%patch3 -p0 -b .initscript +%patch4 -p0 -b .dns_sd %build @@ -483,6 +485,10 @@ fi %endif %changelog +* Thu Sep 6 2007 Lennart Poettering - 0.6.21-5 +- resolves #249044: Update init script to use runlevel 96 +- resolves #251700: Fix assertion in libdns_sd-compat + * Thu Sep 6 2007 Lennart Poettering - 0.6.21-4 - Ship ssh static service file by default, don't ship ssh-sftp by default - resolves: #269741: split off avahi-ui-tools package