summaryrefslogtreecommitdiff
path: root/recipes/zeroconf
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/zeroconf
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/zeroconf')
-rw-r--r--recipes/zeroconf/files/debian-zeroconf51
-rw-r--r--recipes/zeroconf/files/zeroconf-default17
-rw-r--r--recipes/zeroconf/files/zeroconf-limits.h.patch21
-rw-r--r--recipes/zeroconf/zeroconf-0.6.1/busybox.patch13
-rw-r--r--recipes/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch28
-rw-r--r--recipes/zeroconf/zeroconf_0.6.1.bb22
-rw-r--r--recipes/zeroconf/zeroconf_0.9.bb22
7 files changed, 174 insertions, 0 deletions
diff --git a/recipes/zeroconf/files/debian-zeroconf b/recipes/zeroconf/files/debian-zeroconf
new file mode 100644
index 0000000000..c3705d2788
--- /dev/null
+++ b/recipes/zeroconf/files/debian-zeroconf
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/zeroconf ]; then
+ exit 0
+fi
+
+# IPv4 link-local addresses (zeroconf) are
+# only applicable on the 'inet' address family
+[ "X$ADDRFAM" != "Xinet" ] && exit 0
+
+# However there are some methods where it doesn't
+# make any sense to configure an IPv4LL address
+
+# not on loopback
+[ "X$METHOD" = "Xloopback" ] && exit 0
+
+# not on ppp or wvdial either
+[ "X$METHOD" = "Xppp" ] && exit 0
+[ "X$METHOD" = "Xwvdial" ] && exit 0
+
+# The administrator may have blacklisted interfaces
+# or only want zeroconf in a fallback situation
+[ -f /etc/default/zeroconf ] &&
+ . /etc/default/zeroconf
+
+[ -n "$DISABLE" ] && exit 0
+
+for BLACK in $IFBLACKLIST; do
+ case $IFACE in
+ $BLACK)
+ exit 0
+ ;;
+ esac
+done
+
+# should we only allocate an address if we do not already have one?
+if [ -n "$FALLBACK" ]; then
+ /bin/ip addr show $IFACE scope global | grep -q "inet"
+ IP=$?
+ if [ $IP -eq 0 ]; then
+ /bin/ip route add 169.254.0.0/16 dev $IFACE
+ exit 0
+ fi
+fi
+
+# otherwise, run if we aren't already going
+if [ ! -r /var/run/zeroconf.$IFACE.pid ]; then
+ /usr/sbin/zeroconf -i $IFACE
+fi
+
+exit 0
diff --git a/recipes/zeroconf/files/zeroconf-default b/recipes/zeroconf/files/zeroconf-default
new file mode 100644
index 0000000000..cc07b275f1
--- /dev/null
+++ b/recipes/zeroconf/files/zeroconf-default
@@ -0,0 +1,17 @@
+# Default for zeroconf
+
+# disable zeroconf
+# If you want to disable zeroconf completely, uncomment the following line
+# this may be useful if you are debugging zeroconf or starting it manually
+#DISABLE=yes
+
+# black-listed interfaces
+# Interfaces which you never wish to have zeroconf run on should
+# be listed here. e.g. "eth2 wlan1" in a space seperated string
+IFBLACKLIST=""
+
+# fallback only
+# If you would only like a link-local address if you were unable to
+# obtain an address via DHCP then uncomment the following line
+#FALLBACK=yes
+
diff --git a/recipes/zeroconf/files/zeroconf-limits.h.patch b/recipes/zeroconf/files/zeroconf-limits.h.patch
new file mode 100644
index 0000000000..46ba208fa5
--- /dev/null
+++ b/recipes/zeroconf/files/zeroconf-limits.h.patch
@@ -0,0 +1,21 @@
+In newer glibc after this commit.
+
+http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/bits/socket.h.diff?r1=1.60&r2=1.61&cvsroot=glibc
+
+
+do not include limits.h indirectly through sockets.h so we would need to include limits.h explicitely.
+
+-Khem
+
+Index: zeroconf-0.9/zeroconf.c
+===================================================================
+--- zeroconf-0.9.orig/zeroconf.c 2008-05-27 16:56:05.000000000 -0700
++++ zeroconf-0.9/zeroconf.c 2008-05-27 16:56:20.000000000 -0700
+@@ -33,6 +33,7 @@
+ #include <net/if_arp.h>
+ #include <sys/time.h>
+ #include <signal.h>
++#include <limits.h>
+
+ #include "delay.h"
+
diff --git a/recipes/zeroconf/zeroconf-0.6.1/busybox.patch b/recipes/zeroconf/zeroconf-0.6.1/busybox.patch
new file mode 100644
index 0000000000..1c695612ad
--- /dev/null
+++ b/recipes/zeroconf/zeroconf-0.6.1/busybox.patch
@@ -0,0 +1,13 @@
+--- zeroconf-0.6.1/zeroconf.sh.orig 2005-08-27 21:25:07 +0200
++++ zeroconf-0.6.1/zeroconf.sh 2005-08-27 21:26:21 +0200
+@@ -30,7 +30,9 @@
+
+ remove_linklocal_addrs()
+ {
+- ip addr show $IFACE | grep "inet.*169.254" | cut -d" " -f6 | xargs --replace -n 1 ip addr del {} dev $IFACE
++ for IP in `ip addr show $IFACE | grep "inet.*169.254" | cut -d" " -f6`; do
++ ip addr delete $IP dev $IFACE
++ done
+ }
+
+ case $PHASE in
diff --git a/recipes/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch b/recipes/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch
new file mode 100644
index 0000000000..6c4008bc56
--- /dev/null
+++ b/recipes/zeroconf/zeroconf-0.6.1/debian-zeroconf.patch
@@ -0,0 +1,28 @@
+--- zeroconf-0.6.1.orig/debian-zeroconf
++++ zeroconf-0.6.1/debian-zeroconf
+@@ -19,6 +19,8 @@
+ [ -f /etc/default/zeroconf ] &&
+ . /etc/default/zeroconf
+
++[ -n "$DISABLE" ] && exit 0
++
+ for BLACK in $IFBLACKLIST; do
+ case $IFACE in
+ $BLACK)
+@@ -31,7 +33,6 @@
+ if [ -n "$FALLBACK" ]; then
+ /bin/ip addr show $IFACE scope global | grep -q "inet"
+ IP=$?
+- [ $IP -eq 0 ] && exit 0
+ if [ $IP -eq 0 ]; then
+ /bin/ip route add 169.254.0.0/16 dev $IFACE
+ exit 0
+@@ -39,6 +40,6 @@
+ fi
+
+ # otherwise, we are good to go
+-/usr/local/sbin/zeroconf -i $IFACE
++/usr/sbin/zeroconf -i $IFACE
+
+ exit 0
+
diff --git a/recipes/zeroconf/zeroconf_0.6.1.bb b/recipes/zeroconf/zeroconf_0.6.1.bb
new file mode 100644
index 0000000000..8dfa8ecb50
--- /dev/null
+++ b/recipes/zeroconf/zeroconf_0.6.1.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "IPv4 link-local address allocator"
+HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/"
+LICENSE = "GPL"
+SECTION = "net"
+PRIORITY = "optional"
+
+PR = "r0"
+
+SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${PN}-${PV}.tar.gz \
+ file://debian-zeroconf.patch;patch=1 \
+ file://busybox.patch;patch=1 \
+ file://zeroconf-default"
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -d ${D}${sysconfdir}/network/if-up.d
+ install -d ${D}${sysconfdir}/default
+ install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf
+ install -c -m 755 ${S}/zeroconf.sh ${D}${sysconfdir}/zeroconf
+ install -c -m 755 ${S}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf
+ install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf
+}
diff --git a/recipes/zeroconf/zeroconf_0.9.bb b/recipes/zeroconf/zeroconf_0.9.bb
new file mode 100644
index 0000000000..5c42237888
--- /dev/null
+++ b/recipes/zeroconf/zeroconf_0.9.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "IPv4 link-local address allocator"
+AUTHOR = "Anand Kumria <wildfire@progsoc.uts.edu.au>"
+HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/"
+LICENSE = "GPL"
+SECTION = "net"
+PRIORITY = "optional"
+
+PR = "r1"
+
+SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${PN}-${PV}.tar.gz \
+ file://zeroconf-default \
+ file://zeroconf-limits.h.patch;patch=1 \
+ file://debian-zeroconf"
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -d ${D}${sysconfdir}/network/if-up.d
+ install -d ${D}${sysconfdir}/default
+ install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf
+ install -c -m 755 ${WORKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf
+ install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf
+}