From 234ce549932bf73beeb3175b26bde64d336a651a Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Wed, 3 Jun 2009 19:42:55 +0000 Subject: [PATCH] - stop polluting syslog with useless messages we don't care nor can do anything about --- net/avahi/Makefile | 4 ++-- .../patches/patch-avahi-compat-libdns_sd_warn_c | 15 +++++++++++++++ net/avahi/patches/patch-avahi-daemon_main_c | 15 +++++++++++++-- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 net/avahi/patches/patch-avahi-compat-libdns_sd_warn_c diff --git a/net/avahi/Makefile b/net/avahi/Makefile index 9017c142e14..6c5b8ef157c 100755 --- a/net/avahi/Makefile +++ b/net/avahi/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2009/06/03 16:27:12 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.2 2009/06/03 19:42:55 ajacoutot Exp $ # python MODULE SHARED_ONLY= Yes @@ -12,7 +12,7 @@ V= 0.6.25 DISTNAME= avahi-${V} CATEGORIES= net devel -PKGNAME-main= avahi-${V} +PKGNAME-main= avahi-${V}p0 PKGNAME-gtk= avahi-gtk-${V} PKGNAME-qt3= avahi-qt3-${V} PKGNAME-qt4= avahi-qt4-${V} diff --git a/net/avahi/patches/patch-avahi-compat-libdns_sd_warn_c b/net/avahi/patches/patch-avahi-compat-libdns_sd_warn_c new file mode 100644 index 00000000000..cb56b316013 --- /dev/null +++ b/net/avahi/patches/patch-avahi-compat-libdns_sd_warn_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-avahi-compat-libdns_sd_warn_c,v 1.1 2009/06/03 19:42:55 ajacoutot Exp $ + +Reverse logic to stop polluting syslog(3). + +--- avahi-compat-libdns_sd/warn.c.orig Wed Jun 3 21:07:44 2009 ++++ avahi-compat-libdns_sd/warn.c Wed Jun 3 21:08:33 2009 +@@ -112,7 +112,7 @@ void avahi_warn_linkage(void) { + linkage_warning = 1; + pthread_mutex_unlock(&linkage_mutex); + +- if (!w && !getenv("AVAHI_COMPAT_NOWARN")) { ++ if (!w && getenv("AVAHI_COMPAT_WARN")) { + avahi_warn("The program '%s' uses the "COMPAT_LAYER" compatibility layer of Avahi.", avahi_exe_name()); + avahi_warn("Please fix your application to use the native API of Avahi!"); + avahi_warn("For more information see ", avahi_exe_name()); diff --git a/net/avahi/patches/patch-avahi-daemon_main_c b/net/avahi/patches/patch-avahi-daemon_main_c index c7fbe0bccd4..c7f3e82129e 100644 --- a/net/avahi/patches/patch-avahi-daemon_main_c +++ b/net/avahi/patches/patch-avahi-daemon_main_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-avahi-daemon_main_c,v 1.1.1.1 2009/06/03 16:27:12 ajacoutot Exp $ +$OpenBSD: patch-avahi-daemon_main_c,v 1.2 2009/06/03 19:42:55 ajacoutot Exp $ --- avahi-daemon/main.c.orig Fri Dec 12 22:36:15 2008 -+++ avahi-daemon/main.c Sun May 31 20:01:36 2009 ++++ avahi-daemon/main.c Wed Jun 3 21:30:51 2009 @@ -318,6 +318,11 @@ static void update_browse_domains(void) { return; } @@ -13,3 +13,14 @@ $OpenBSD: patch-avahi-daemon_main_c,v 1.1.1.1 2009/06/03 16:27:12 ajacoutot Exp l = avahi_string_list_copy(config.server_config.browse_domains); for (p = resolv_conf_search_domains, n = 0; *p && n < BROWSE_DOMAINS_MAX; p++, n++) { +@@ -985,8 +990,10 @@ static int run_server(DaemonConfig *c) { + + assert(c); + ++#ifndef __OpenBSD__ // no NSS in OpenBSD + if (!(nss_support = avahi_nss_support())) + avahi_log_warn("WARNING: No NSS support for mDNS detected, consider installing nss-mdns!"); ++#endif + + if (!(simple_poll_api = avahi_simple_poll_new())) { + avahi_log_error("Failed to create main loop object.");