summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
committerTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-connectivity/avahi
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/avahi')
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb72
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc158
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.6.31.bb22
-rw-r--r--meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch52
-rw-r--r--meta/recipes-connectivity/avahi/files/00avahi-autoipd10
-rw-r--r--meta/recipes-connectivity/avahi/files/99avahi-autoipd10
-rw-r--r--meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch32
-rw-r--r--meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch34
-rw-r--r--meta/recipes-connectivity/avahi/files/initscript.patch41
-rw-r--r--meta/recipes-connectivity/avahi/files/out-of-tree.patch32
-rw-r--r--meta/recipes-connectivity/avahi/files/reuseport-check.patch30
11 files changed, 493 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
new file mode 100644
index 0000000..eea4d70
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
@@ -0,0 +1,72 @@
1LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
2 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
3 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
4 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
5 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
6
7require avahi.inc
8
9inherit python-dir pythonnative
10
11PACKAGECONFIG ??= "python"
12PACKAGECONFIG[python] = "--enable-python,--disable-python,python-native python"
13
14PR = "${INC_PR}.0"
15
16SRC_URI[md5sum] = "2f22745b8f7368ad5a0a3fddac343f2d"
17SRC_URI[sha256sum] = "8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48"
18
19DEPENDS += "avahi gtk+ libglade"
20
21AVAHI_GTK = "--enable-gtk --disable-gtk3"
22
23S = "${WORKDIR}/avahi-${PV}"
24
25PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc python-avahi avahi-discover avahi-discover-standalone"
26
27FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
28FILES_${PN}-dbg += "${libdir}/.debug/libavah-ui*"
29FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
30FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
31
32FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
33
34FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi ${PYTHON_SITEPACKAGES_DIR}/avahi_discover"
35FILES_avahi-discover = "${bindir}/avahi-discover \
36 ${datadir}/applications/avahi-discover.desktop \
37 ${datadir}/avahi/interfaces/avahi-discover*"
38FILES_avahi-discover-standalone = "${bindir}/avahi-discover-standalone \
39 ${datadir}/avahi/interfaces/avahi-discover.glade"
40
41RDEPENDS_avahi-discover = "python-avahi python-pygtk"
42RDEPENDS_python-avahi = "python-core python-dbus"
43
44
45do_install_append () {
46 rm ${D}${sysconfdir} -rf
47 rm ${D}${base_libdir} -rf
48 rm ${D}${systemd_unitdir} -rf
49 # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
50 # but not ${base_libdir} here. And the /lib may not exist
51 # whithout systemd.
52 [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
53 rm ${D}${bindir}/avahi-b*
54 rm ${D}${bindir}/avahi-p*
55 rm ${D}${bindir}/avahi-r*
56 rm ${D}${bindir}/avahi-s*
57 rm ${D}${includedir}/avahi-c* -rf
58 rm ${D}${includedir}/avahi-g* -rf
59 rm ${D}${libdir}/libavahi-c*
60 rm ${D}${libdir}/libavahi-g*
61 rm ${D}${libdir}/pkgconfig/avahi-c*
62 rm ${D}${libdir}/pkgconfig/avahi-g*
63 rm ${D}${sbindir} -rf
64 rm ${D}${datadir}/avahi/a*
65 rm ${D}${datadir}/avahi/s*
66 rm ${D}${datadir}/locale/ -rf
67 rm ${D}${datadir}/dbus* -rf
68 rm ${D}${mandir}/man1/a*
69 rm ${D}${mandir}/man5 -rf
70 rm ${D}${mandir}/man8 -rf
71}
72
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
new file mode 100644
index 0000000..b060437
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -0,0 +1,158 @@
1SUMMARY = "Avahi IPv4LL network address configuration daemon"
2DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \
3allows programs to publish and discover services and hosts running on a local network \
4with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \
5IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \
6configuration from the link-local 169.254.0.0/16 range without the need for a central \
7server.'
8AUTHOR = "Lennart Poettering <lennart@poettering.net>"
9HOMEPAGE = "http://avahi.org"
10BUGTRACKER = "http://avahi.org/report"
11SECTION = "network"
12
13# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
14# python scripts are under GPLv2+
15LICENSE = "GPLv2+ & LGPLv2.1+"
16
17INC_PR = "r11"
18
19DEPENDS = "expat libcap libdaemon dbus glib-2.0"
20
21SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
22 file://00avahi-autoipd \
23 file://99avahi-autoipd \
24 file://initscript.patch \
25 file://avahi_fix_install_issue.patch \
26 file://fix_for_automake_1.12.x.patch \
27 file://out-of-tree.patch \
28 file://0001-avahi-fix-avahi-status-command-error-prompt.patch \
29 file://reuseport-check.patch \
30 "
31
32USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
33USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
34 --no-create-home --shell /bin/false \
35 --user-group avahi"
36
37USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \
38 --no-create-home --shell /bin/false \
39 --user-group \
40 -c \"Avahi autoip daemon\" \
41 avahi-autoipd"
42
43inherit autotools pkgconfig update-rc.d gettext useradd
44
45EXTRA_OECONF = "--disable-introspection \
46 --with-avahi-priv-access-group=adm \
47 --disable-stack-protector \
48 --disable-gdbm \
49 --disable-mono \
50 --disable-monodoc \
51 --disable-qt3 \
52 --disable-qt4 \
53 --disable-python \
54 --disable-doxygen-doc \
55 ${EXTRA_OECONF_SYSVINIT} \
56 ${EXTRA_OECONF_SYSTEMD} \
57 ${AVAHI_GTK} \
58 "
59
60# The distro choice determines what init scripts are installed
61EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
62EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
63
64AVAHI_GTK ?= "--disable-gtk --disable-gtk3"
65
66LDFLAGS_append_libc-uclibc = " -lintl"
67LDFLAGS_append_uclinux-uclibc = " -lintl"
68
69do_configure_prepend() {
70 sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
71}
72
73
74PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
75
76# As avahi doesn't put any files into PN, clear the files list to avoid problems
77# if extra libraries appear.
78FILES_avahi = ""
79FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
80 ${sysconfdir}/avahi/avahi-autoipd.action \
81 ${sysconfdir}/dhcp/*/avahi-autoipd \
82 ${sysconfdir}/udhcpc.d/00avahi-autoipd \
83 ${sysconfdir}/udhcpc.d/99avahi-autoipd"
84FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
85FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
86FILES_avahi-daemon = "${sbindir}/avahi-daemon \
87 ${sysconfdir}/avahi/avahi-daemon.conf \
88 ${sysconfdir}/avahi/hosts \
89 ${sysconfdir}/avahi/services \
90 ${sysconfdir}/dbus-1 \
91 ${sysconfdir}/init.d/avahi-daemon \
92 ${datadir}/avahi/introspection/*.introspect \
93 ${datadir}/avahi/avahi-service.dtd \
94 ${datadir}/avahi/service-types \
95 ${datadir}/dbus-1/system-services"
96FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
97FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*"
98FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
99 ${sysconfdir}/avahi/avahi-dnsconfd.action \
100 ${sysconfdir}/init.d/avahi-dnsconfd"
101FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
102FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
103FILES_avahi-utils = "${bindir}/avahi-*"
104
105RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})"
106
107# uclibc has no nss
108RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
109RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
110
111RRECOMMENDS_avahi-dev = "expat-dev libcap-dev libdaemon-dev dbus-dev glib-2.0-dev update-rc.d-dev"
112RRECOMMENDS_avahi-dev_append_libc-glibc = " gettext-dev"
113
114RRECOMMENDS_avahi-dev[nodeprrecs] = "1"
115
116CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
117
118INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
119INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
120INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
121INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
122INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
123
124do_install() {
125 autotools_do_install
126
127 # don't install /var/run when populating rootfs. Do it through volatile
128 # /var/run of current version is empty, so just remove it.
129 # if /var/run become non-empty in the future, need to install it via volatile
130 rm -rf ${D}${localstatedir}/run
131 rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
132 rm -rf ${D}${datadir}/dbus-1/interfaces
133 rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
134 rm -rf ${D}${libdir}/avahi
135
136 install -d ${D}${sysconfdir}/udhcpc.d
137 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
138 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
139}
140
141# At the time the postinst runs, dbus might not be setup so only restart if running
142# Don't exit early, because update-rc.d needs to run subsequently.
143
144pkg_postinst_avahi-daemon () {
145if [ -z "$D" ]; then
146 killall -q -HUP dbus-daemon || true
147fi
148}
149
150pkg_postrm_avahi-daemon () {
151 deluser avahi || true
152 delgroup avahi || true
153}
154
155pkg_postrm_avahi-autoipd () {
156 deluser avahi-autoipd || true
157 delgroup avahi-autoipd || true
158}
diff --git a/meta/recipes-connectivity/avahi/avahi_0.6.31.bb b/meta/recipes-connectivity/avahi/avahi_0.6.31.bb
new file mode 100644
index 0000000..5d796a2
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/avahi_0.6.31.bb
@@ -0,0 +1,22 @@
1require avahi.inc
2
3inherit systemd
4
5SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
6SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
7SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
8
9LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
10 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
11 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
12 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
13 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
14
15PR = "${INC_PR}.1"
16
17SRC_URI[md5sum] = "2f22745b8f7368ad5a0a3fddac343f2d"
18SRC_URI[sha256sum] = "8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48"
19
20DEPENDS += "intltool-native"
21
22PACKAGES =+ "libavahi-gobject"
diff --git a/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch b/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
new file mode 100644
index 0000000..7590df7
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
@@ -0,0 +1,52 @@
1From f774ac25f436a782ccccc4dbe68378a684596799 Mon Sep 17 00:00:00 2001
2From: Lu Chong <Chong.Lu@windriver.com>
3Date: Thu, 7 Nov 2013 14:36:28 +0800
4Subject: [PATCH] avahi: fix avahi status command error prompt
5
6service --status-all command will display wrong status for avahi-daemon.
7This commit fix this error prompt and make service display right status
8for avahi-daemon.
9
10Upstream-Status: Pending
11
12Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
13---
14 initscript/debian/avahi-daemon.in | 14 +++++++++++---
15 1 file changed, 11 insertions(+), 3 deletions(-)
16
17diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
18index 4793b46..49ec358 100755
19--- a/initscript/debian/avahi-daemon.in
20+++ b/initscript/debian/avahi-daemon.in
21@@ -153,7 +153,15 @@ d_reload() {
22 # Function that check the status of the daemon/service.
23 #
24 d_status() {
25- $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running"
26+ $DAEMON -c
27+ status=$?
28+ if [ $status = 0 ]; then
29+ echo "$DESC is running"
30+ return 0
31+ else
32+ echo "$DESC is not running"
33+ return 3
34+ fi
35 }
36
37 case "$1" in
38@@ -182,9 +190,9 @@ case "$1" in
39 d_status
40 ;;
41 *)
42- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload}" >&2
43+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload|status}" >&2
44 exit 1
45 ;;
46 esac
47
48-exit 0
49+exit $?
50--
511.7.9.5
52
diff --git a/meta/recipes-connectivity/avahi/files/00avahi-autoipd b/meta/recipes-connectivity/avahi/files/00avahi-autoipd
new file mode 100644
index 0000000..a0ab814
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/00avahi-autoipd
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
4
5case "$1" in
6
7 deconfig|renew|bound)
8 /usr/sbin/avahi-autoipd -k $interface 2> /dev/null
9 ;;
10esac
diff --git a/meta/recipes-connectivity/avahi/files/99avahi-autoipd b/meta/recipes-connectivity/avahi/files/99avahi-autoipd
new file mode 100644
index 0000000..234cdaa
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/99avahi-autoipd
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
4
5case "$1" in
6
7 leasefail)
8 /usr/sbin/avahi-autoipd -wD $interface 2> /dev/null
9 ;;
10esac
diff --git a/meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch b/meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch
new file mode 100644
index 0000000..32f20ec
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Pending
2
3Fixes this install issue
4#| /bin/sh: line 0: cd: /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/avahi-0.6.31-r3.0/image//usr/bin: No such file or directory
5
6Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
72012/05/03
8
9Index: avahi-0.6.31/avahi-utils/Makefile.am
10===================================================================
11--- avahi-0.6.31.orig/avahi-utils/Makefile.am
12+++ avahi-0.6.31/avahi-utils/Makefile.am
13@@ -54,6 +54,7 @@ avahi_set_host_name_CFLAGS = $(AM_CFLAGS
14 avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
15
16 install-exec-local:
17+ $(MKDIR_P) $(DESTDIR)/$(bindir) && \
18 cd $(DESTDIR)/$(bindir) && \
19 rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
20 $(LN_S) avahi-resolve avahi-resolve-host-name && \
21Index: avahi-0.6.31/avahi-utils/Makefile.in
22===================================================================
23--- avahi-0.6.31.orig/avahi-utils/Makefile.in
24+++ avahi-0.6.31/avahi-utils/Makefile.in
25@@ -906,6 +906,7 @@ uninstall-am: uninstall-binPROGRAMS
26
27
28 @HAVE_DBUS_TRUE@install-exec-local:
29+@HAVE_DBUS_TRUE@ $(MKDIR_P) $(DESTDIR)/$(bindir) && \
30 @HAVE_DBUS_TRUE@ cd $(DESTDIR)/$(bindir) && \
31 @HAVE_DBUS_TRUE@ rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
32 @HAVE_DBUS_TRUE@ $(LN_S) avahi-resolve avahi-resolve-host-name && \
diff --git a/meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch b/meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch
new file mode 100644
index 0000000..0fc4c29
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch
@@ -0,0 +1,34 @@
1Upstream-Status: Pending
2
3autoamke 1.12.x has depricated use of mkdir_p , and recommends use of MKDIR_P
4instead. Fixed the automake files accordingly to avoid warning-errors.
5Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
62012/07/09
7
8
9Index: avahi-0.6.31/avahi-daemon/Makefile.am
10===================================================================
11--- avahi-0.6.31.orig/avahi-daemon/Makefile.am
12+++ avahi-0.6.31/avahi-daemon/Makefile.am
13@@ -169,7 +169,7 @@ xmllint:
14 done
15
16 install-data-local:
17- test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
18+ test -z "$(localstatedir)/run" || $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run"
19
20 update-systemd:
21 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
22Index: avahi-0.6.31/avahi-autoipd/Makefile.am
23===================================================================
24--- avahi-0.6.31.orig/avahi-autoipd/Makefile.am
25+++ avahi-0.6.31/avahi-autoipd/Makefile.am
26@@ -76,7 +76,7 @@ dhcliententerdir = $(sysconfdir)/dhcp/dh
27 dhclientexitdir = $(sysconfdir)/dhcp/dhclient-exit-hooks.d
28
29 install-exec-hook: dhclient-exit-hook dhclient-enter-hook
30- $(mkdir_p) $(DESTDIR)$(dhcliententerdir) $(DESTDIR)$(dhclientexitdir)
31+ $(MKDIR_P) $(DESTDIR)$(dhcliententerdir) $(DESTDIR)$(dhclientexitdir)
32 $(INSTALL) dhclient-enter-hook $(DESTDIR)$(dhcliententerdir)/avahi-autoipd
33 $(INSTALL) dhclient-exit-hook $(DESTDIR)$(dhclientexitdir)/avahi-autoipd
34
diff --git a/meta/recipes-connectivity/avahi/files/initscript.patch b/meta/recipes-connectivity/avahi/files/initscript.patch
new file mode 100644
index 0000000..193889e
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/initscript.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Pending
2
3diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
4index 30a2c2f..b5848a8 100755
5--- a/initscript/debian/avahi-daemon.in
6+++ b/initscript/debian/avahi-daemon.in
7@@ -1,2 +1,14 @@
8 #!/bin/sh
9-
10+### BEGIN INIT INFO
11+# Provides: avahi
12+# Required-Start: $remote_fs dbus
13+# Required-Stop: $remote_fs dbus
14+# Should-Start: $syslog
15+# Should-Stop: $syslog
16+# Default-Start: 2 3 4 5
17+# Default-Stop: 0 1 6
18+# Short-Description: Avahi mDNS/DNS-SD Daemon
19+# Description: Zeroconf daemon for configuring your network
20+# automatically
21+### END INIT INFO
22+#
23diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in
24index ac34804..f95c340 100755
25--- a/initscript/debian/avahi-dnsconfd.in
26+++ b/initscript/debian/avahi-dnsconfd.in
27@@ -1,1 +1,14 @@
28 #!/bin/sh
29+### BEGIN INIT INFO
30+# Provides: avahi-dnsconfd
31+# Required-Start: $remote_fs avahi
32+# Required-Stop: $remote_fs avahi
33+# Should-Start: $syslog
34+# Should-Stop: $syslog
35+# Default-Start: 2 3 4 5
36+# Default-Stop: 0 1 6
37+# Short-Description: Avahi mDNS/DNS-SD DNS configuration
38+# Description: Zeroconf daemon for configuring your network
39+# automatically
40+### END INIT INFO
41+#
diff --git a/meta/recipes-connectivity/avahi/files/out-of-tree.patch b/meta/recipes-connectivity/avahi/files/out-of-tree.patch
new file mode 100644
index 0000000..43476cd
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/out-of-tree.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Pending
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From a62dc95d75691ea4aefa86d8bbe54c62afd78ff6 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Tue, 17 Sep 2013 12:27:36 +0100
7Subject: [PATCH] build-sys: fix out-of-tree builds without xmltoman
8
9If manpages are enabled but xmltoman isn't present, out-of-tree builds fail
10because it checks inside the build directory for the pre-generated manpages.
11
12Fix this by using $srcdir when looking for files inside the source directory.
13---
14 configure.ac | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/configure.ac b/configure.ac
18index 9debce2..047c7ae 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -1021,7 +1021,7 @@ if test x$manpages = xyes ; then
22 fi
23
24 if test x$have_xmltoman = xno -o x$xmltoman = xno; then
25- if ! test -e man/avahi-daemon.8 ; then
26+ if ! test -e $srcdir/man/avahi-daemon.8 ; then
27 AC_MSG_ERROR([*** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman])
28 exit 1
29 fi
30--
311.7.10.4
32
diff --git a/meta/recipes-connectivity/avahi/files/reuseport-check.patch b/meta/recipes-connectivity/avahi/files/reuseport-check.patch
new file mode 100644
index 0000000..bb81c2c
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/reuseport-check.patch
@@ -0,0 +1,30 @@
1Fix avahi-daemon when running on kernel < 3.9 (patch taken from Ubuntu).
2
3Upstream-Status: Pending (unmaintained upstream)
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6Description: SO_REUSEPORT may not exist in running kernel
7 When userspace defines SO_REUSEPORT we will attempt to enable socket
8 port number reuse. However if the running kernel does not support
9 this call it will fail preventing daemon startup. If this call is
10 present but fails ENOPROTOOPT then we know that actually the kernel
11 does not support it and we should continue as if we did not have the
12 call at all. (LP: #1228204)
13 .
14 This patch could be removed from the debian package after jessie release.
15Author: Andy Whitcroft <apw@canonical.com>
16
17Index: avahi-0.6.31/avahi-core/socket.c
18===================================================================
19--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
20+++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
21@@ -177,7 +177,8 @@
22 yes = 1;
23 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
24 avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
25- return -1;
26+ if (errno != ENOPROTOOPT)
27+ return -1;
28 }
29 #endif
30