From: <abe...@us...> - 2016-05-31 15:40:31
|
Revision: 7691 http://sourceforge.net/p/astlinux/code/7691 Author: abelbeck Date: 2016-05-31 15:40:28 +0000 (Tue, 31 May 2016) Log Message: ----------- avahi, version bump to 0.6.32 and update from upstream Buildroot, add patches from David Kerr for his project Modified Paths: -------------- branches/1.0/package/avahi/Config.in branches/1.0/package/avahi/S05avahi-setup.sh branches/1.0/package/avahi/avahi.mk Added Paths: ----------- branches/1.0/package/avahi/avahi-Filtering-Reflector-Advertisements.patch branches/1.0/package/avahi/avahi-airplay-service.patch Removed Paths: ------------- branches/1.0/package/avahi/avahi-autoipd-perms.patch branches/1.0/package/avahi/avahi-disable-systemd-support.patch branches/1.0/package/avahi/avahi-ipv6only.patch branches/1.0/package/avahi/avahi-optional-ipv6.patch branches/1.0/package/avahi/busybox-udhcpc-default.script Modified: branches/1.0/package/avahi/Config.in =================================================================== --- branches/1.0/package/avahi/Config.in 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/Config.in 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,17 +1,16 @@ config BR2_PACKAGE_AVAHI bool "avahi" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE help Avahi is a system which facilitates service discovery on a local network. http://www.avahi.org/ +if BR2_PACKAGE_AVAHI + config BR2_PACKAGE_AVAHI_AUTOIPD bool "IPv4LL network address configuration daemon" - default y - depends on BR2_PACKAGE_AVAHI select BR2_PACKAGE_LIBDAEMON help Avahi-autoipd implements IPv4LL, "Dynamic Configuration of @@ -23,7 +22,6 @@ config BR2_PACKAGE_AVAHI_DAEMON bool "mDNS/DNS-SD daemon" - depends on BR2_PACKAGE_AVAHI select BR2_PACKAGE_LIBDAEMON select BR2_PACKAGE_EXPAT help @@ -31,3 +29,13 @@ architecture (also known as "Rendezvous" or "Bonjour"). The daemon registers local IP addresses and services using mDNS/DNS-SD. + +config BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY + bool "libdns_sd compatibility (Bonjour)" + depends on BR2_PACKAGE_AVAHI_DAEMON + select BR2_PACKAGE_DBUS + help + Enable the libdns_sd (Bonjour) compatibility library support + for legacy applications. + +endif Modified: branches/1.0/package/avahi/S05avahi-setup.sh =================================================================== --- branches/1.0/package/avahi/S05avahi-setup.sh 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/S05avahi-setup.sh 2016-05-31 15:40:28 UTC (rev 7691) @@ -5,7 +5,7 @@ if [ ! -d /tmp/avahi-autopid ]; then rm -rf /tmp/avahi-autoipd mkdir /tmp/avahi-autoipd - chown default.default /tmp/avahi-autoipd + chown nobody:nobody /tmp/avahi-autoipd fi ;; stop) ;; Added: branches/1.0/package/avahi/avahi-Filtering-Reflector-Advertisements.patch =================================================================== --- branches/1.0/package/avahi/avahi-Filtering-Reflector-Advertisements.patch (rev 0) +++ branches/1.0/package/avahi/avahi-Filtering-Reflector-Advertisements.patch 2016-05-31 15:40:28 UTC (rev 7691) @@ -0,0 +1,182 @@ +From 0e9f40ff16f2d1582b3e1200a7a35f83f216f4f2 Mon Sep 17 00:00:00 2001 +From: James Rudd <Jam...@sb...> +Date: Mon, 25 Aug 2014 16:23:33 +1000 +Subject: [[PATCH] Filtering Reflector Advertisements] Filtering Reflector + Advertisements + +Allows Avahi-Daemon to filter which advertisements are added to the cache to be reflected to different networks. +It checks incoming service names against a list defined in avahi-daemon.conf [reflector] reflect-filters. +The list can be types of services or can contain hostnames to match. +For example we only allow AirPlay and AirTunes to be reflected between VLANs, so have "_airplay._tcp.local,_raop._tcp.local" set. + +The patch will block the PTR and SRV advertisements but will still allow A records for machine name lookup. +All locally published services are still published even if they do not match the filter. + +The filter also blocks local programs from seeing advertised programs so it is recommend to only enable it on a dedicated bonjour reflector server. + +Signed-off-by: James Rudd <Jam...@sb...> +--- + avahi-core/core.h | 1 + + avahi-core/server.c | 42 +++++++++++++++++++++++++++++++++++++++++- + avahi-daemon/avahi-daemon.conf | 1 + + avahi-daemon/main.c | 12 ++++++++++++ + man/avahi-daemon.conf.5.xml.in | 10 ++++++++++ + 5 files changed, 65 insertions(+), 1 deletion(-) + +diff --git a/avahi-core/core.h b/avahi-core/core.h +index f50c612..1ebd27a 100644 +--- a/avahi-core/core.h ++++ b/avahi-core/core.h +@@ -56,6 +56,7 @@ typedef struct AvahiServerConfig { + int use_iff_running; /**< Require IFF_RUNNING on local network interfaces. This is the official way to check for link beat. Unfortunately this doesn't work with all drivers. So bettere leave this off. */ + int enable_reflector; /**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */ + int reflect_ipv; /**< if enable_reflector is 1, enable/disable reflecting between IPv4 and IPv6 */ ++ AvahiStringList *reflect_filters; /**< if enable_reflector is 1, will only add services containing one of these strings */ + int add_service_cookie; /**< Add magic service cookie to all locally generated records implicitly */ + int enable_wide_area; /**< Enable wide area support */ + AvahiAddress wide_area_servers[AVAHI_WIDE_AREA_SERVERS_MAX]; /** Unicast DNS server to use for wide area lookup */ +diff --git a/avahi-core/server.c b/avahi-core/server.c +index 69a1d02..81725ac 100644 +--- a/avahi-core/server.c ++++ b/avahi-core/server.c +@@ -674,6 +674,34 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter + } + + if (!avahi_key_is_pattern(record->key)) { ++ // Filter services that will be cached. Allow all local services ++ if (!from_local_iface && s->config.enable_reflector && s->config.reflect_filters != NULL){ ++ AvahiStringList *l; ++ int match = 0; ++ ++ if (record->key->type == AVAHI_DNS_TYPE_PTR){ ++ // Need to match DNS pointer target with filter ++ for (l = s->config.reflect_filters; l; l = l->next) ++ if (strstr( record->data.ptr.name, (char*) l->text) != NULL) ++ match = 1; ++ ++ if (! match){ ++ //avahi_log_info("Reject Ptr SRC [%s] Dest [%s]", record->key->name, record->data.ptr.name); ++ return; ++ } ++ } ++ else if (record->key->type == AVAHI_DNS_TYPE_SRV || record->key->type == AVAHI_DNS_TYPE_TXT){ ++ // Need to match key name with filter ++ for (l = s->config.reflect_filters; l; l = l->next) ++ if (strstr( record->key->name, (char*) l->text) != NULL) ++ match = 1; ++ ++ if (! match){ ++ //avahi_log_info("Reject Key [%s] iface [%d]", record->key->name, from_local_iface); ++ return; ++ } ++ } ++ } + + if (handle_conflict(s, i, record, cache_flush)) { + if (!from_local_iface && !avahi_record_is_link_local_address(record)) +@@ -1589,6 +1617,7 @@ AvahiServerConfig* avahi_server_config_init(AvahiServerConfig *c) { + c->use_iff_running = 0; + c->enable_reflector = 0; + c->reflect_ipv = 0; ++ c->reflect_filters = NULL; + c->add_service_cookie = 0; + c->enable_wide_area = 0; + c->n_wide_area_servers = 0; +@@ -1611,13 +1640,14 @@ void avahi_server_config_free(AvahiServerConfig *c) { + avahi_free(c->host_name); + avahi_free(c->domain_name); + avahi_string_list_free(c->browse_domains); ++ avahi_string_list_free(c->reflect_filters); + avahi_string_list_free(c->allow_interfaces); + avahi_string_list_free(c->deny_interfaces); + } + + AvahiServerConfig* avahi_server_config_copy(AvahiServerConfig *ret, const AvahiServerConfig *c) { + char *d = NULL, *h = NULL; +- AvahiStringList *browse = NULL, *allow = NULL, *deny = NULL; ++ AvahiStringList *browse = NULL, *allow = NULL, *deny = NULL, *reflect = NULL ; + assert(ret); + assert(c); + +@@ -1652,12 +1682,22 @@ AvahiServerConfig* avahi_server_config_copy(AvahiServerConfig *ret, const AvahiS + return NULL; + } + ++ if (!(reflect = avahi_string_list_copy(c->reflect_filters)) && c->reflect_filters) { ++ avahi_string_list_free(allow); ++ avahi_string_list_free(browse); ++ avahi_string_list_free(deny); ++ avahi_free(h); ++ avahi_free(d); ++ return NULL; ++ } ++ + *ret = *c; + ret->host_name = h; + ret->domain_name = d; + ret->browse_domains = browse; + ret->allow_interfaces = allow; + ret->deny_interfaces = deny; ++ ret->reflect_filters = reflect; + + return ret; + } +diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf +index 27e240d..662fd69 100644 +--- a/avahi-daemon/avahi-daemon.conf ++++ b/avahi-daemon/avahi-daemon.conf +@@ -57,6 +57,7 @@ publish-workstation=no + [reflector] + #enable-reflector=no + #reflect-ipv=no ++#reflect-filters=_airplay._tcp.local,_raop._tcp.local + + [rlimits] + #rlimit-as= +diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c +index 8c28fd6..2676133 100644 +--- a/avahi-daemon/main.c ++++ b/avahi-daemon/main.c +@@ -826,6 +826,18 @@ static int load_config_file(DaemonConfig *c) { + c->server_config.enable_reflector = is_yes(p->value); + else if (strcasecmp(p->key, "reflect-ipv") == 0) + c->server_config.reflect_ipv = is_yes(p->value); ++ else if (strcasecmp(p->key, "reflect-filters") == 0) { ++ char **e, **t; ++ ++ avahi_string_list_free(c->server_config.reflect_filters); ++ c->server_config.reflect_filters = NULL; ++ e = avahi_split_csv(p->value); ++ ++ for (t = e; *t; t++) ++ c->server_config.reflect_filters = avahi_string_list_add(c->server_config.reflect_filters, *t); ++ ++ avahi_strfreev(e); ++ } + else { + avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name); + goto finish; +diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in +index 2d15017..c3eeff4 100644 +--- a/man/avahi-daemon.conf.5.xml.in ++++ b/man/avahi-daemon.conf.5.xml.in +@@ -327,6 +327,16 @@ + enabled, avahi-daemon will forward mDNS traffic between IPv4 + and IPv6, which is usually not recommended. Defaults to "no".</p> + </option> ++ ++ <option> ++ <p><opt>reflect-filters=</opt> Set a comma separated list of ++ allowed service names to be reflected. Each service that is ++ seen must match an entry in this list to be reflected to other ++ networks. This list can match the type of service or the name ++ of the machine providing the service. Defaults to allowing all ++ services.</p> ++ ++ </option> + </section> + + <section name="Section [rlimits]"> +-- +1.9.1 + Added: branches/1.0/package/avahi/avahi-airplay-service.patch =================================================================== --- branches/1.0/package/avahi/avahi-airplay-service.patch (rev 0) +++ branches/1.0/package/avahi/avahi-airplay-service.patch 2016-05-31 15:40:28 UTC (rev 7691) @@ -0,0 +1,12 @@ +diff --git a/service-type-database/service-types b/service-type-database/service-types +index 6e7e2cd..54719af 100644 +--- a/service-type-database/service-types ++++ b/service-type-database/service-types +@@ -139,6 +139,7 @@ _realplayfavs._tcp:RealPlayer Shared Favorites + _realplayfavs._tcp[it]:RealPlayer - Preferiti Condivisi + + _raop._tcp:AirTunes Remote Audio ++_airplay._tcp:AirPlay Remote Video + + _rtsp._tcp:RTSP Realtime Streaming Server + _rtp._udp:RTP Realtime Streaming Server Deleted: branches/1.0/package/avahi/avahi-autoipd-perms.patch =================================================================== --- branches/1.0/package/avahi/avahi-autoipd-perms.patch 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/avahi-autoipd-perms.patch 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,11 +0,0 @@ ---- avahi-0.6.14/avahi-autoipd/main.c.cls 2006-09-13 12:49:45.000000000 -0700 -+++ avahi-0.6.14/avahi-autoipd/main.c 2006-09-25 20:34:10.000000000 -0700 -@@ -239,7 +239,7 @@ - - fprintf(f, "%s\n", inet_ntop(AF_INET, &addr, buf, sizeof (buf))); - fclose(f); -- -+ chmod(fn, S_IRUSR|S_IWUSR); - return 0; - - fail: Deleted: branches/1.0/package/avahi/avahi-disable-systemd-support.patch =================================================================== --- branches/1.0/package/avahi/avahi-disable-systemd-support.patch 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/avahi-disable-systemd-support.patch 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,22 +0,0 @@ -[PATCH] avahi-daemon: disable systemd support - -Disable systemd support as it isn't needed for BR, and uses SOCK_CLOEXEC -which isn't available on uClibc. - -Signed-off-by: Peter Korsgaard <ja...@su...> ---- - avahi-daemon/sd-daemon.h | 1 + - 1 file changed, 1 insertion(+) - -Index: avahi-0.6.27/avahi-daemon/sd-daemon.h -=================================================================== ---- avahi-0.6.27.orig/avahi-daemon/sd-daemon.h -+++ avahi-0.6.27/avahi-daemon/sd-daemon.h -@@ -66,6 +66,7 @@ extern "C" { - - See sd-daemon(7) for more information. - */ -+#define DISABLE_SYSTEMD /* no systemd support in BR */ - - #if __GNUC__ >= 4 - #define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b))) Deleted: branches/1.0/package/avahi/avahi-ipv6only.patch =================================================================== --- branches/1.0/package/avahi/avahi-ipv6only.patch 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/avahi-ipv6only.patch 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,19 +0,0 @@ -diff -urpN avahi-0.6.22.orig/avahi-core/socket.c avahi-0.6.22/avahi-core/socket.c ---- avahi-0.6.22.orig/avahi-core/socket.c 2007-12-16 22:03:08.000000000 +0100 -+++ avahi-0.6.22/avahi-core/socket.c 2008-03-31 17:13:24.000000000 +0200 -@@ -394,13 +394,13 @@ int avahi_open_socket_ipv6(int no_reuse) - avahi_log_warn("IPV6_UNICAST_HOPS failed: %s", strerror(errno)); - goto fail; - } -- -+#ifdef IPV6_V6ONLY - yes = 1; - if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0) { - avahi_log_warn("IPV6_V6ONLY failed: %s", strerror(errno)); - goto fail; - } -- -+#endif - yes = 1; - if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) { - avahi_log_warn("IPV6_MULTICAST_LOOP failed: %s", strerror(errno)); Deleted: branches/1.0/package/avahi/avahi-optional-ipv6.patch =================================================================== --- branches/1.0/package/avahi/avahi-optional-ipv6.patch 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/avahi-optional-ipv6.patch 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,147 +0,0 @@ -[PATCH] avahi-core: make ipv6 support optional on uclibc 0.9.31+ - -uClibc 0.9.31+ doesn't define the IPV6_* defines when IPv6 support isn't -enabled, causing the avahi build to break. Detect this configuration, and -comment out IPv6 code if so. - -Signed-off-by: Peter Korsgaard <ja...@su...> ---- - avahi-core/socket.c | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) - -Index: avahi-0.6.23/avahi-core/socket.c -=================================================================== ---- avahi-0.6.23.orig/avahi-core/socket.c -+++ avahi-0.6.23/avahi-core/socket.c -@@ -47,6 +47,11 @@ - #include <net/if_dl.h> - #endif - -+#include <features.h> -+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) -+#define NO_IPV6 -+#endif -+ - #include "dns.h" - #include "fdutil.h" - #include "socket.h" -@@ -75,6 +80,7 @@ static void mdns_mcast_group_ipv4(struct - inet_pton(AF_INET, AVAHI_IPV4_MCAST_GROUP, &ret_sa->sin_addr); - } - -+#ifndef NO_IPV6 - static void mdns_mcast_group_ipv6(struct sockaddr_in6 *ret_sa) { - assert(ret_sa); - -@@ -83,6 +89,7 @@ static void mdns_mcast_group_ipv6(struct - ret_sa->sin6_port = htons(AVAHI_MDNS_PORT); - inet_pton(AF_INET6, AVAHI_IPV6_MCAST_GROUP, &ret_sa->sin6_addr); - } -+#endif - - static void ipv4_address_to_sockaddr(struct sockaddr_in *ret_sa, const AvahiIPv4Address *a, uint16_t port) { - assert(ret_sa); -@@ -95,6 +102,7 @@ static void ipv4_address_to_sockaddr(str - memcpy(&ret_sa->sin_addr, a, sizeof(AvahiIPv4Address)); - } - -+#ifndef NO_IPV6 - static void ipv6_address_to_sockaddr(struct sockaddr_in6 *ret_sa, const AvahiIPv6Address *a, uint16_t port) { - assert(ret_sa); - assert(a); -@@ -105,6 +113,7 @@ static void ipv6_address_to_sockaddr(str - ret_sa->sin6_port = htons(port); - memcpy(&ret_sa->sin6_addr, a, sizeof(AvahiIPv6Address)); - } -+#endif - - int avahi_mdns_mcast_join_ipv4(int fd, const AvahiIPv4Address *a, int idx, int join) { - #ifdef HAVE_STRUCT_IP_MREQN -@@ -143,6 +152,7 @@ int avahi_mdns_mcast_join_ipv4(int fd, c - } - - int avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *a, int idx, int join) { -+#ifndef NO_IPV6 - struct ipv6_mreq mreq6; - struct sockaddr_in6 sa6; - -@@ -164,6 +174,9 @@ int avahi_mdns_mcast_join_ipv6(int fd, c - } - - return 0; -+#else -+ return -1; -+#endif - } - - static int reuseaddr(int fd) { -@@ -372,6 +385,7 @@ fail: - } - - int avahi_open_socket_ipv6(int no_reuse) { -+#ifndef NO_IPV6 - struct sockaddr_in6 sa, local; - int fd = -1, yes, r; - int ttl; -@@ -437,7 +451,7 @@ int avahi_open_socket_ipv6(int no_reuse) - fail: - if (fd >= 0) - close(fd); -- -+#endif - return -1; - } - -@@ -567,7 +581,7 @@ int avahi_send_dns_packet_ipv6( - const AvahiIPv6Address *src_address, - const AvahiIPv6Address *dst_address, - uint16_t dst_port) { -- -+#ifndef NO_IPV6 - struct sockaddr_in6 sa; - struct msghdr msg; - struct iovec io; -@@ -620,6 +634,9 @@ int avahi_send_dns_packet_ipv6( - } - - return sendmsg_loop(fd, &msg, 0); -+#else -+ return -1; -+#endif - } - - AvahiDnsPacket *avahi_recv_dns_packet_ipv4( -@@ -782,7 +799,7 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip - AvahiIPv6Address *ret_dst_address, - AvahiIfIndex *ret_iface, - uint8_t *ret_ttl) { -- -+#ifndef NO_IPV6 - AvahiDnsPacket *p = NULL; - struct msghdr msg; - struct iovec io; -@@ -889,7 +906,7 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip - fail: - if (p) - avahi_dns_packet_free(p); -- -+#endif - return NULL; - } - -@@ -934,6 +951,7 @@ fail: - } - - int avahi_open_unicast_socket_ipv6(void) { -+#ifndef NO_IPV6 - struct sockaddr_in6 local; - int fd = -1, yes; - -@@ -974,6 +992,6 @@ int avahi_open_unicast_socket_ipv6(void) - fail: - if (fd >= 0) - close(fd); -- -+#endif - return -1; - } Modified: branches/1.0/package/avahi/avahi.mk =================================================================== --- branches/1.0/package/avahi/avahi.mk 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/avahi.mk 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,97 +1,103 @@ ############################################################# # -# avahi (zeroconf implementation) +# avahi # ############################################################# -# -# This program is free software; you can redistribute it -# and/or modify it under the terms of the GNU Lesser General -# Public License as published by the Free Software Foundation -# either version 2.1 of the License, or (at your option) any -# later version. -AVAHI_VERSION = 0.6.30 +AVAHI_VERSION = 0.6.32 AVAHI_SOURCE = avahi-$(AVAHI_VERSION).tar.gz -AVAHI_SITE = http://www.avahi.org/download/ +AVAHI_SITE = https://github.com/lathiat/avahi/releases/download/v$(AVAHI_VERSION) AVAHI_INSTALL_STAGING = YES -AVAHI_INSTALL_TARGET = YES -AVAHI_CONF_ENV = ac_cv_func_strtod=yes \ - ac_fsusage_space=yes \ - fu_cv_sys_stat_statfs2_bsize=yes \ - ac_cv_func_closedir_void=no \ - ac_cv_func_getloadavg=no \ - ac_cv_lib_util_getloadavg=no \ - ac_cv_lib_getloadavg_getloadavg=no \ - ac_cv_func_getgroups=yes \ - ac_cv_func_getgroups_works=yes \ - ac_cv_func_chown_works=yes \ - ac_cv_have_decl_euidaccess=no \ - ac_cv_func_euidaccess=no \ - ac_cv_have_decl_strnlen=yes \ - ac_cv_func_strnlen_working=yes \ - ac_cv_func_lstat_dereferences_slashed_symlink=yes \ - ac_cv_func_lstat_empty_string_bug=no \ - ac_cv_func_stat_empty_string_bug=no \ - vb_cv_func_rename_trailing_slash_bug=no \ - ac_cv_have_decl_nanosleep=yes \ - jm_cv_func_nanosleep_works=yes \ - gl_cv_func_working_utimes=yes \ - ac_cv_func_utime_null=yes \ - ac_cv_have_decl_strerror_r=yes \ - ac_cv_func_strerror_r_char_p=no \ - jm_cv_func_svid_putenv=yes \ - ac_cv_func_getcwd_null=yes \ - ac_cv_func_getdelim=yes \ - ac_cv_func_mkstemp=yes \ - utils_cv_func_mkstemp_limitations=no \ - utils_cv_func_mkdir_trailing_slash_bug=no \ - jm_cv_func_gettimeofday_clobber=no \ - am_cv_func_working_getline=yes \ - gl_cv_func_working_readdir=yes \ - jm_ac_cv_func_link_follows_symlink=no \ - utils_cv_localtime_cache=no \ - ac_cv_struct_st_mtim_nsec=no \ - gl_cv_func_tzset_clobber=no \ - gl_cv_func_getcwd_null=yes \ - gl_cv_func_getcwd_path_max=yes \ - ac_cv_func_fnmatch_gnu=yes \ - am_getline_needs_run_time_check=no \ - am_cv_func_working_getline=yes \ - gl_cv_func_mkdir_trailing_slash_bug=no \ - gl_cv_func_mkstemp_limitations=no \ - ac_cv_func_working_mktime=yes \ - jm_cv_func_working_re_compile_pattern=yes \ - ac_use_included_regex=no \ - avahi_cv_sys_cxx_works=yes \ - DATADIRNAME=share +AVAHI_CONF_ENV = \ + ac_cv_func_strtod=yes \ + ac_fsusage_space=yes \ + fu_cv_sys_stat_statfs2_bsize=yes \ + ac_cv_func_closedir_void=no \ + ac_cv_func_getloadavg=no \ + ac_cv_lib_util_getloadavg=no \ + ac_cv_lib_getloadavg_getloadavg=no \ + ac_cv_func_getgroups=yes \ + ac_cv_func_getgroups_works=yes \ + ac_cv_func_chown_works=yes \ + ac_cv_have_decl_euidaccess=no \ + ac_cv_func_euidaccess=no \ + ac_cv_have_decl_strnlen=yes \ + ac_cv_func_strnlen_working=yes \ + ac_cv_func_lstat_dereferences_slashed_symlink=yes \ + ac_cv_func_lstat_empty_string_bug=no \ + ac_cv_func_stat_empty_string_bug=no \ + vb_cv_func_rename_trailing_slash_bug=no \ + ac_cv_have_decl_nanosleep=yes \ + jm_cv_func_nanosleep_works=yes \ + gl_cv_func_working_utimes=yes \ + ac_cv_func_utime_null=yes \ + ac_cv_have_decl_strerror_r=yes \ + ac_cv_func_strerror_r_char_p=no \ + jm_cv_func_svid_putenv=yes \ + ac_cv_func_getcwd_null=yes \ + ac_cv_func_getdelim=yes \ + ac_cv_func_mkstemp=yes \ + utils_cv_func_mkstemp_limitations=no \ + utils_cv_func_mkdir_trailing_slash_bug=no \ + jm_cv_func_gettimeofday_clobber=no \ + am_cv_func_working_getline=yes \ + gl_cv_func_working_readdir=yes \ + jm_ac_cv_func_link_follows_symlink=no \ + utils_cv_localtime_cache=no \ + ac_cv_struct_st_mtim_nsec=no \ + gl_cv_func_tzset_clobber=no \ + gl_cv_func_getcwd_null=yes \ + gl_cv_func_getcwd_path_max=yes \ + ac_cv_func_fnmatch_gnu=yes \ + am_getline_needs_run_time_check=no \ + am_cv_func_working_getline=yes \ + gl_cv_func_mkdir_trailing_slash_bug=no \ + gl_cv_func_mkstemp_limitations=no \ + ac_cv_func_working_mktime=yes \ + jm_cv_func_working_re_compile_pattern=yes \ + ac_use_included_regex=no \ + avahi_cv_sys_cxx_works=yes \ + DATADIRNAME=share -AVAHI_CONF_OPT = --localstatedir=/var \ - --disable-qt3 \ - --disable-qt4 \ - --disable-gdbm \ - --disable-python-dbus \ - --disable-pygtk \ - --disable-gtk3 \ - --disable-mono \ - --disable-monodoc \ - --disable-stack-protector \ - --with-distro=none \ - $(if $(BR2_HAVE_DOCUMENTATION),--enable,--disable)-manpages \ - $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \ - --with-avahi-user=default \ - --with-avahi-group=default \ - --with-autoipd-user=default \ - --with-autoipd-group=default +AVAHI_CONF_OPT = \ + --localstatedir=/var \ + --disable-qt3 \ + --disable-qt4 \ + --disable-gtk \ + --disable-gtk3 \ + --disable-gdbm \ + --disable-python-dbus \ + --disable-pygtk \ + --disable-mono \ + --disable-monodoc \ + --disable-stack-protector \ + --with-distro=none \ + --disable-manpages \ + $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \ + --with-avahi-user=nobody \ + --with-avahi-group=nobody \ + --with-autoipd-user=nobody \ + --with-autoipd-group=nobody -AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-intltool host-pkg-config +AVAHI_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-pkg-config +AVAHI_CFLAGS = $(TARGET_CFLAGS) + +# No systemd +AVAHI_CFLAGS += -DDISABLE_SYSTEMD + ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),) AVAHI_DEPENDENCIES += libdaemon else AVAHI_CONF_OPT += --disable-libdaemon endif +ifeq ($(BR2_PACKAGE_LIBCAP),y) +AVAHI_DEPENDENCIES += libcap +endif + ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) AVAHI_DEPENDENCIES += expat AVAHI_CONF_OPT += --with-xml=expat @@ -99,6 +105,10 @@ AVAHI_CONF_OPT += --with-xml=none endif +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) +AVAHI_CONF_OPT += --enable-compat-libdns_sd +endif + ifeq ($(BR2_PACKAGE_DBUS),y) AVAHI_DEPENDENCIES += dbus else @@ -111,20 +121,15 @@ AVAHI_CONF_OPT += --disable-glib --disable-gobject endif -ifeq ($(BR2_PACKAGE_LIBGLADE),y) -AVAHI_DEPENDENCIES += libglade -else -AVAHI_CONF_OPT += --disable-gtk -endif - ifeq ($(BR2_PACKAGE_PYTHON),y) -AVAHI_CONF_ENV += am_cv_pathless_PYTHON=python \ - am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \ - am_cv_python_version=$(PYTHON_VERSION) \ - am_cv_python_platform=linux2 \ - am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ - am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ - py_cv_mod_socket_=yes +AVAHI_CONF_ENV += \ + am_cv_pathless_PYTHON=python \ + am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \ + am_cv_python_version=$(PYTHON_VERSION) \ + am_cv_python_platform=linux2 \ + am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + py_cv_mod_socket_=yes AVAHI_DEPENDENCIES += python AVAHI_CONF_OPT += --enable-python @@ -132,36 +137,46 @@ AVAHI_CONF_OPT += --disable-python endif -ifeq ($(BR2_PACKAGE_LIBINTL),y) -AVAHI_DEPENDENCIES += libintl -AVAHI_MAKE_OPT = LIBS=-lintl -endif +AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)" +AVAHI_MAKE_OPT += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) + define AVAHI_REMOVE_INITSCRIPT rm -rf $(TARGET_DIR)/etc/init.d/avahi-* endef AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT +ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y) define AVAHI_INSTALL_AUTOIPD - rm -rf $(TARGET_DIR)/etc/dhcp3/ - $(INSTALL) -D -m 0755 package/avahi/busybox-udhcpc-default.script $(TARGET_DIR)/usr/share/udhcpc/default.script - $(INSTALL) -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/ rm -f $(TARGET_DIR)/var/lib/avahi-autoipd $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd endef -ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y) -AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD +define AVAHI_INSTALL_AUTOIPD_INIT_SYSV + $(INSTALL) -D -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/S05avahi-setup.sh +endef + +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD AVAHI_INSTALL_AUTOIPD_INIT_SYSV endif -define AVAHI_INSTALL_DAEMON_INITSCRIPT - $(INSTALL) -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/ +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) +define AVAHI_INSTALL_DAEMON_INIT_SYSV + $(INSTALL) -D -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/S50avahi-daemon endef -ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) -AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_DAEMON_INITSCRIPT +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_DAEMON_INIT_SYSV endif +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) +# applications expects to be able to #include <dns_sd.h> +define AVAHI_STAGING_INSTALL_LIBDNSSD_LINK + ln -sf avahi-compat-libdns_sd/dns_sd.h \ + $(STAGING_DIR)/usr/include/dns_sd.h +endef + +AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK +endif + $(eval $(call AUTOTARGETS,package,avahi)) Deleted: branches/1.0/package/avahi/busybox-udhcpc-default.script =================================================================== --- branches/1.0/package/avahi/busybox-udhcpc-default.script 2016-05-30 17:58:43 UTC (rev 7690) +++ branches/1.0/package/avahi/busybox-udhcpc-default.script 2016-05-31 15:40:28 UTC (rev 7691) @@ -1,58 +0,0 @@ -#!/bin/sh - -# udhcpc script edited by Tim Riker <Ti...@Ri...> - -[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 - -RESOLV_CONF="/etc/resolv.conf" -[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" -[ -n "$subnet" ] && NETMASK="netmask $subnet" - -case "$1" in - deconfig) - grep -q -v ip= /proc/cmdline - if [ $? -eq 0 ]; then - /sbin/ifconfig $interface up - fi - grep -q -v nfsroot= /proc/cmdline - if [ $? -eq 0 ]; then - /sbin/ifconfig $interface 0.0.0.0 - fi - if [ -x /usr/sbin/avahi-autoipd ]; then - /usr/sbin/avahi-autoipd -k $interface - fi - ;; - - leasefail|nak) - if [ -x /usr/sbin/avahi-autoipd ]; then - /usr/sbin/avahi-autoipd -wD $interface --no-chroot - fi - ;; - - renew|bound) - if [ -x /usr/sbin/avahi-autoipd ]; then - /usr/sbin/avahi-autoipd -k $interface - fi - /sbin/ifconfig $interface $ip $BROADCAST $NETMASK - - if [ -n "$router" ] ; then - echo "deleting routers" - while route del default gw 0.0.0.0 dev $interface ; do - : - done - - for i in $router ; do - route add default gw $i dev $interface - done - fi - - echo -n > $RESOLV_CONF - [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF - for i in $dns ; do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF - done - ;; -esac - -exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |