From 09975f32c6bd871f40c3661198287de30f914199 Mon Sep 17 00:00:00 2001 From: Dafydd Harries Date: Jan 04 2008 11:47:09 +0000 Subject: copy patches from F-8 --- diff --git a/avahi-0.6.21-avahi-browse-help-fix.patch b/avahi-0.6.21-avahi-browse-help-fix.patch new file mode 100644 index 0000000..b700354 --- /dev/null +++ b/avahi-0.6.21-avahi-browse-help-fix.patch @@ -0,0 +1,18 @@ +Index: avahi-utils/avahi-browse.c +=================================================================== +--- avahi-utils/avahi-browse.c (revision 1518) ++++ avahi-utils/avahi-browse.c (revision 1519) +@@ -586,9 +586,12 @@ + "%s [options] -a\n" + "%s [options] -D\n" + #if defined(HAVE_GDBM) || defined(HAVE_DBM) +- "%s [options] -b\n", ++ "%s [options] -b\n" + #endif + "\n", ++#if defined(HAVE_GDBM) || defined(HAVE_DBM) ++ argv0, ++#endif + argv0, argv0, argv0); + + fprintf(f, diff --git a/avahi-0.6.21-initscript.patch b/avahi-0.6.21-initscript.patch new file mode 100644 index 0000000..6d9cf95 --- /dev/null +++ b/avahi-0.6.21-initscript.patch @@ -0,0 +1,115 @@ +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 +- + . /etc/sysconfig/network + +-# Check that networking is configured. +-[ ${NETWORKING} = "no" ] && exit 0 +- + 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 + ++base=${0##*/} ++ + start() { ++ # Check that networking is configured. ++ [ ${NETWORKING} = "no" ] && exit 1 ++ + 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 + +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 +- + . /etc/sysconfig/network + +-# Check that networking is configured. +-[ ${NETWORKING} = "no" ] && exit 0 +- + 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 + + 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 +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-0.6.21-multiarch.patch b/avahi-0.6.21-multiarch.patch new file mode 100644 index 0000000..3c61efd --- /dev/null +++ b/avahi-0.6.21-multiarch.patch @@ -0,0 +1,89 @@ +Index: /trunk/service-type-database/Makefile.am +=================================================================== +--- /trunk/service-type-database/Makefile.am (revision 1394) ++++ /trunk/service-type-database/Makefile.am (revision 1537) +@@ -21,4 +21,5 @@ + + pkgdata_DATA=service-types ++pkglib_DATA= + + if HAVE_PYTHON +@@ -26,5 +27,5 @@ + + noinst_SCRIPTS=build-db +-pkgdata_DATA+=service-types.db ++pkglib_DATA+=service-types.db + + build-db: build-db.in +@@ -43,5 +44,5 @@ + + noinst_SCRIPTS=build-db +-pkgdata_DATA+=service-types.db.pag service-types.db.dir ++pkglib_DATA+=service-types.db.pag service-types.db.dir + + build-db: build-db.in +Index: /trunk/avahi-utils/Makefile.am +=================================================================== +--- /trunk/avahi-utils/Makefile.am (revision 1263) ++++ /trunk/avahi-utils/Makefile.am (revision 1537) +@@ -33,5 +33,5 @@ + if HAVE_GDBM + avahi_browse_SOURCES += stdb.h stdb.c +-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" ++avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" + avahi_browse_LDADD += -lgdbm + endif +@@ -39,5 +39,5 @@ + if HAVE_DBM + avahi_browse_SOURCES += stdb.h stdb.c +-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" ++avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" + endif + +Index: /trunk/avahi-ui/Makefile.am +=================================================================== +--- /trunk/avahi-ui/Makefile.am (revision 1457) ++++ /trunk/avahi-ui/Makefile.am (revision 1537) +@@ -48,5 +48,5 @@ + if HAVE_GDBM + libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c +-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" ++libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" + libavahi_ui_la_LIBADD += -lgdbm + endif +@@ -54,5 +54,5 @@ + if HAVE_DBM + libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c +-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkgdatadir)/service-types.db\" ++libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\" + endif + +Index: /trunk/avahi-python/avahi/ServiceTypeDatabase.py.in +=================================================================== +--- /trunk/avahi-python/avahi/ServiceTypeDatabase.py.in (revision 1245) ++++ /trunk/avahi-python/avahi/ServiceTypeDatabase.py.in (revision 1540) +@@ -28,5 +28,5 @@ + class ServiceTypeDatabase: + +- def __init__(self, filename = "@pkgdatadir@/service-types.db"): ++ def __init__(self, filename = "@pkglibdir@/service-types.db"): + + self.db = @DBM@.open(filename, "r") +Index: /trunk/avahi-python/avahi/Makefile.am +=================================================================== +--- /trunk/avahi-python/avahi/Makefile.am (revision 1539) ++++ /trunk/avahi-python/avahi/Makefile.am (revision 1540) +@@ -34,5 +34,5 @@ + -e 's,@CHECK_KEY\@,while key is not None:,g' \ + -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \ +- -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ ++ -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ + chmod +x $@ + endif +@@ -47,5 +47,5 @@ + -e 's,@CHECK_KEY\@,for key in keys:,g' \ + -e 's,@NEXT_KEY\@,,g' \ +- -e 's,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ ++ -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ + chmod +x $@ + endif diff --git a/avahi-0.6.21-resolv-conf.patch b/avahi-0.6.21-resolv-conf.patch new file mode 100644 index 0000000..f891174 --- /dev/null +++ b/avahi-0.6.21-resolv-conf.patch @@ -0,0 +1,14 @@ +Index: /trunk/avahi-daemon/main.c +=================================================================== +--- /trunk/avahi-daemon/main.c (revision 1513) ++++ /trunk/avahi-daemon/main.c (revision 1525) +@@ -317,4 +317,9 @@ + int n; + char **p; ++ ++ if (!resolv_conf_search_domains) { ++ avahi_server_set_browse_domains(avahi_server, NULL); ++ return; ++ } + + l = avahi_string_list_copy(config.server_config.browse_domains);