From a5de5a7dfeecbccef1cfb8f6221a494b946ed982 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Tue, 23 Nov 2010 15:06:24 +0800 Subject: connman: Upgrade to version 0.63 Add build dependency iptables. Fix recipe metadata. Signed-off-by: Dongxiao Xu --- .../connman/connman-0.56/connman | 62 ---------------------- .../connman/connman-0.56/dbusperms.patch | 12 ----- .../connman-0.56/fix-shutdown-ap-disconnect.patch | 42 --------------- .../connman/connman-0.63/connman | 62 ++++++++++++++++++++++ .../connman/connman-0.63/dbusperms.patch | 12 +++++ .../connman-0.63/fix-shutdown-ap-disconnect.patch | 42 +++++++++++++++ meta/recipes-connectivity/connman/connman.inc | 2 +- meta/recipes-connectivity/connman/connman_0.56.bb | 25 --------- meta/recipes-connectivity/connman/connman_0.63.bb | 28 ++++++++++ 9 files changed, 145 insertions(+), 142 deletions(-) delete mode 100755 meta/recipes-connectivity/connman/connman-0.56/connman delete mode 100644 meta/recipes-connectivity/connman/connman-0.56/dbusperms.patch delete mode 100644 meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch create mode 100644 meta/recipes-connectivity/connman/connman-0.63/connman create mode 100644 meta/recipes-connectivity/connman/connman-0.63/dbusperms.patch create mode 100644 meta/recipes-connectivity/connman/connman-0.63/fix-shutdown-ap-disconnect.patch delete mode 100644 meta/recipes-connectivity/connman/connman_0.56.bb create mode 100644 meta/recipes-connectivity/connman/connman_0.63.bb diff --git a/meta/recipes-connectivity/connman/connman-0.56/connman b/meta/recipes-connectivity/connman/connman-0.56/connman deleted file mode 100755 index f01bf371c..000000000 --- a/meta/recipes-connectivity/connman/connman-0.56/connman +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -DAEMON=/usr/sbin/connmand -PIDFILE=/var/run/connmand.pid -DESC="Connection Manager" - -if [ -f /etc/default/connman ] ; then - . /etc/default/connman -fi - -set -e - -nfsroot=0 - -exec 9<&0 < /proc/mounts -while read dev mtpt fstype rest; do - if test $mtpt = "/" ; then - case $fstype in - nfs | nfs4) - nfsroot=1 - break - ;; - *) - ;; - esac - fi -done - -do_start() { - EXTRA_PARAM="" - if test $nfsroot -eq 1 ; then - EXTRA_PARAM="-P ethernet" - fi - $DAEMON $EXTRA_PARAM -} - -do_stop() { - start-stop-daemon --stop --name connmand --quiet -} - -case "$1" in - start) - echo "Starting $DESC" - do_start - ;; - stop) - echo "Stopping $DESC" - do_stop - ;; - restart|force-reload) - echo "Restarting $DESC" - do_stop - sleep 1 - do_start - ;; - *) - echo "Usage: $0 {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/meta/recipes-connectivity/connman/connman-0.56/dbusperms.patch b/meta/recipes-connectivity/connman/connman-0.56/dbusperms.patch deleted file mode 100644 index 100af0367..000000000 --- a/meta/recipes-connectivity/connman/connman-0.56/dbusperms.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: git/src/connman-dbus.conf -=================================================================== ---- git.orig/src/connman-dbus.conf 2009-05-26 00:34:35.000000000 +0100 -+++ git/src/connman-dbus.conf 2009-05-26 00:34:48.000000000 +0100 -@@ -10,6 +10,6 @@ - - - -- -+ - - diff --git a/meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch b/meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch deleted file mode 100644 index a0ad0991d..000000000 --- a/meta/recipes-connectivity/connman/connman-0.56/fix-shutdown-ap-disconnect.patch +++ /dev/null @@ -1,42 +0,0 @@ -Schedule delayed scan when being disconnected from an AP - -When being disconnected from an AP, a delayed scan is scheduled to make -sure the AP is still there. wpa_supplicant removes a BSS from its bss list -when it disappears from the scan results twice in a row. - -Author: Samuel Ortiz -Ported by Dongxiao Xu - -diff -ruN connman-0.56-orig/plugins/supplicant.c connman-0.56/plugins/supplicant.c ---- connman-0.56-orig/plugins/supplicant.c 2010-09-25 15:08:21.242927383 +0800 -+++ connman-0.56/plugins/supplicant.c 2010-09-25 15:12:46.346136858 +0800 -@@ -2184,6 +2184,15 @@ - scanning == TRUE ? "started" : "finished"); - } - -+static gboolean delayed_scan(gpointer user_data) -+{ -+ struct supplicant_task *task = user_data; -+ -+ supplicant_scan(task->device); -+ -+ return FALSE; -+} -+ - static void state_change(struct supplicant_task *task, DBusMessage *msg) - { - DBusError error; -@@ -2277,7 +2286,13 @@ - task_connect(task); - } else - task->network = NULL; -+ } else { -+ if (task->state == WPA_DISCONNECTED) -+ g_timeout_add_seconds(10, delayed_scan, task); -+ -+ remove_network(task); - } -+ - break; - - default: diff --git a/meta/recipes-connectivity/connman/connman-0.63/connman b/meta/recipes-connectivity/connman/connman-0.63/connman new file mode 100644 index 000000000..f01bf371c --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-0.63/connman @@ -0,0 +1,62 @@ +#!/bin/sh + +DAEMON=/usr/sbin/connmand +PIDFILE=/var/run/connmand.pid +DESC="Connection Manager" + +if [ -f /etc/default/connman ] ; then + . /etc/default/connman +fi + +set -e + +nfsroot=0 + +exec 9<&0 < /proc/mounts +while read dev mtpt fstype rest; do + if test $mtpt = "/" ; then + case $fstype in + nfs | nfs4) + nfsroot=1 + break + ;; + *) + ;; + esac + fi +done + +do_start() { + EXTRA_PARAM="" + if test $nfsroot -eq 1 ; then + EXTRA_PARAM="-P ethernet" + fi + $DAEMON $EXTRA_PARAM +} + +do_stop() { + start-stop-daemon --stop --name connmand --quiet +} + +case "$1" in + start) + echo "Starting $DESC" + do_start + ;; + stop) + echo "Stopping $DESC" + do_stop + ;; + restart|force-reload) + echo "Restarting $DESC" + do_stop + sleep 1 + do_start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta/recipes-connectivity/connman/connman-0.63/dbusperms.patch b/meta/recipes-connectivity/connman/connman-0.63/dbusperms.patch new file mode 100644 index 000000000..100af0367 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-0.63/dbusperms.patch @@ -0,0 +1,12 @@ +Index: git/src/connman-dbus.conf +=================================================================== +--- git.orig/src/connman-dbus.conf 2009-05-26 00:34:35.000000000 +0100 ++++ git/src/connman-dbus.conf 2009-05-26 00:34:48.000000000 +0100 +@@ -10,6 +10,6 @@ + + + +- ++ + + diff --git a/meta/recipes-connectivity/connman/connman-0.63/fix-shutdown-ap-disconnect.patch b/meta/recipes-connectivity/connman/connman-0.63/fix-shutdown-ap-disconnect.patch new file mode 100644 index 000000000..a0ad0991d --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-0.63/fix-shutdown-ap-disconnect.patch @@ -0,0 +1,42 @@ +Schedule delayed scan when being disconnected from an AP + +When being disconnected from an AP, a delayed scan is scheduled to make +sure the AP is still there. wpa_supplicant removes a BSS from its bss list +when it disappears from the scan results twice in a row. + +Author: Samuel Ortiz +Ported by Dongxiao Xu + +diff -ruN connman-0.56-orig/plugins/supplicant.c connman-0.56/plugins/supplicant.c +--- connman-0.56-orig/plugins/supplicant.c 2010-09-25 15:08:21.242927383 +0800 ++++ connman-0.56/plugins/supplicant.c 2010-09-25 15:12:46.346136858 +0800 +@@ -2184,6 +2184,15 @@ + scanning == TRUE ? "started" : "finished"); + } + ++static gboolean delayed_scan(gpointer user_data) ++{ ++ struct supplicant_task *task = user_data; ++ ++ supplicant_scan(task->device); ++ ++ return FALSE; ++} ++ + static void state_change(struct supplicant_task *task, DBusMessage *msg) + { + DBusError error; +@@ -2277,7 +2286,13 @@ + task_connect(task); + } else + task->network = NULL; ++ } else { ++ if (task->state == WPA_DISCONNECTED) ++ g_timeout_add_seconds(10, delayed_scan, task); ++ ++ remove_network(task); + } ++ + break; + + default: diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index ced21fe52..fb970ed1e 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc @@ -13,7 +13,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://src/main.c;beginline=1;endline=20;md5=4b55b550fa6b33cc2055ef30dd262b3e" -DEPENDS = "libgdbus dbus glib-2.0 hal" +DEPENDS = "libgdbus dbus glib-2.0 hal iptables" RDEPENDS_${PN} = "wpa-supplicant resolvconf" INITSCRIPT_NAME = "connman" diff --git a/meta/recipes-connectivity/connman/connman_0.56.bb b/meta/recipes-connectivity/connman/connman_0.56.bb deleted file mode 100644 index 665da32f0..000000000 --- a/meta/recipes-connectivity/connman/connman_0.56.bb +++ /dev/null @@ -1,25 +0,0 @@ -require connman.inc -PR = "r2" - -EXTRA_OECONF += "\ - ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \ - --disable-gtk-doc \ - --enable-debug \ - --enable-threads \ - --enable-loopback \ - --enable-ethernet \ - --enable-wifi \ - --enable-bluetooth \ - --enable-dnsproxy \ - --disable-dhclient \ - --enable-test \ - --disable-udev \ - --disable-polkit \ - --enable-client \ - --prefix=/usr --sysconfdir=/etc --localstatedir=/var" - -SRC_URI = "\ - http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \ - file://fix-shutdown-ap-disconnect.patch \ - file://connman \ -" diff --git a/meta/recipes-connectivity/connman/connman_0.63.bb b/meta/recipes-connectivity/connman/connman_0.63.bb new file mode 100644 index 000000000..e99f7840a --- /dev/null +++ b/meta/recipes-connectivity/connman/connman_0.63.bb @@ -0,0 +1,28 @@ +require connman.inc +PR = "r0" + +EXTRA_OECONF += "\ + ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \ + --disable-gtk-doc \ + --enable-debug \ + --enable-threads \ + --enable-loopback \ + --enable-ethernet \ + --enable-wifi \ + --enable-bluetooth \ + --enable-dnsproxy \ + --disable-dhclient \ + --enable-test \ + --disable-udev \ + --disable-polkit \ + --enable-client \ + --prefix=/usr --sysconfdir=/etc --localstatedir=/var" + +SRC_URI = "\ + http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \ + file://fix-shutdown-ap-disconnect.patch \ + file://connman \ +" + +SRC_URI[md5sum] = "11616a4fa1d03f96f0739730645f7c53" +SRC_URI[sha256sum] = "e2a57376cdcd42b3876262da6959aa58428941e0eb2df9a4724cd3f1af934492" -- cgit v1.2.3