summaryrefslogtreecommitdiff
path: root/packages/networkmanager
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-02-02 21:50:14 +0100
committerKoen Kooi <koen@openembedded.org>2009-02-02 21:50:14 +0100
commit927decaa31e3409eeb47df293eac72aeed03092e (patch)
treef76ce6721dd4a9227dbba9a8645ad48a5de4073f /packages/networkmanager
parent05b19d12d5a32d1ab7708660e9dcede2b2bf1dc8 (diff)
networkmanager: merge with mamona
Diffstat (limited to 'packages/networkmanager')
-rw-r--r--packages/networkmanager/cnetworkmanager_git.bb21
-rw-r--r--packages/networkmanager/files/008-BACKEND-debian-fallback-to-generic-loopback.loom.patch64
-rw-r--r--packages/networkmanager/files/02-dbus_access_network_manager.patch14
-rw-r--r--packages/networkmanager/files/25NetworkManager4
-rw-r--r--packages/networkmanager/files/add_probe_for_v250_modems.patch342
-rw-r--r--packages/networkmanager/files/adding_no_scan_by_default.patch12
-rw-r--r--packages/networkmanager/files/avoid_frequent_scan.patch226
-rw-r--r--packages/networkmanager/files/cx3110_bring_up.patch19
-rw-r--r--packages/networkmanager/files/define_kernel_types_for_old_linux_headers.patch15
-rw-r--r--packages/networkmanager/files/define_kernel_types_for_old_linux_headers_and_warn_functions_from_glib_2_16.patch57
-rw-r--r--packages/networkmanager/files/fix_seg_fault.patch13
-rw-r--r--packages/networkmanager/files/mamona/25NetworkManager30
-rw-r--r--packages/networkmanager/files/remove-gtk-doc-make.patch11
-rw-r--r--packages/networkmanager/netm-cli-0.2/scan_support.patch69
-rw-r--r--packages/networkmanager/netm-cli_0.2.bb13
-rw-r--r--packages/networkmanager/netm-cli_git.bb15
-rw-r--r--packages/networkmanager/networkmanager-0.7.inc68
-rwxr-xr-xpackages/networkmanager/networkmanager-0.7/NetworkManager69
-rw-r--r--packages/networkmanager/networkmanager-0.7/cx3110_bring_up.patch20
-rw-r--r--packages/networkmanager/networkmanager-0.7/disable_wireless_by_default.patch22
-rw-r--r--packages/networkmanager/networkmanager-0.7/nm-system-settings.conf6
-rw-r--r--packages/networkmanager/networkmanager-applet_0.6.6.bb15
-rw-r--r--packages/networkmanager/networkmanager-pre0.7.inc79
-rw-r--r--packages/networkmanager/networkmanager.inc49
-rw-r--r--packages/networkmanager/networkmanager_0.6.5.bb9
-rw-r--r--packages/networkmanager/networkmanager_0.6.6.bb19
-rw-r--r--packages/networkmanager/networkmanager_0.7.bb25
-rw-r--r--packages/networkmanager/networkmanager_0.7olpc.bb11
-rw-r--r--packages/networkmanager/networkmanager_svn.bb60
29 files changed, 1295 insertions, 82 deletions
diff --git a/packages/networkmanager/cnetworkmanager_git.bb b/packages/networkmanager/cnetworkmanager_git.bb
new file mode 100644
index 0000000000..2a8ba64a2b
--- /dev/null
+++ b/packages/networkmanager/cnetworkmanager_git.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Command line interface for Network Manager"
+HOMEPAGE = "http://vidner.net/martin/software/cnetworkmanager/"
+LICENSE = "GPL"
+SECTION = "console/network"
+RDEPENDS = "python-core python-crypt python-dbus python-math python-pygobject python-re python-textutils python-uuid python-xml"
+PR = "r1"
+PV = "0.8+git"
+
+SRC_URI = "git://repo.or.cz/r/cnetworkmanager.git;protocol=http;tag=801f95b5fd856cd8ec25dc56839f47c1a12e6041"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+}
+
+do_install(){
+ install -d ${D}${bindir}
+ install -m 755 cnetworkmanager ${D}${bindir}
+ install -d ${D}${sysconfdir}/dbus-1/system.d
+ install -m 644 cnetworkmanager.conf ${D}${sysconfdir}/dbus-1/system.d
+}
diff --git a/packages/networkmanager/files/008-BACKEND-debian-fallback-to-generic-loopback.loom.patch b/packages/networkmanager/files/008-BACKEND-debian-fallback-to-generic-loopback.loom.patch
new file mode 100644
index 0000000000..f29fa77979
--- /dev/null
+++ b/packages/networkmanager/files/008-BACKEND-debian-fallback-to-generic-loopback.loom.patch
@@ -0,0 +1,64 @@
+=== modified file 'ChangeLog'
+---
+ ChangeLog | 10 ++++++++++
+ src/backends/NetworkManagerDebian.c | 6 +++++-
+ 2 files changed, 15 insertions(+), 1 deletion(-)
+
+Index: network-manager-0.7~~svn20081015t024626/ChangeLog
+===================================================================
+--- network-manager-0.7~~svn20081015t024626.orig/ChangeLog
++++ network-manager-0.7~~svn20081015t024626/ChangeLog
+@@ -120,16 +120,26 @@
+
+ 2008-10-10 Tambet Ingo <tambet@gmail.com>
+
+ * src/nm-logging.c (nm_logging_setup): Don't use LOG_CONS when running as
+ a daemon to prevent NM logging spew on console on startup and shutdown (due
+ to dependency loop between NM and syslog).
+
+ 2008-10-10 Alexander Sack <asac@ubuntu.com>
++
++ Fallback to generic enable_loopback if /sbin/ifup isnt installed or
++ fails.
++ * src/backends/NetworkManagerDebian.c
++ - (nm_system_enable_loopback): test for /sbin/ifconfig binary
++ and fallback to nm_generic_enable_loopback if it
++ doesnt exist or when /sbin/ifconfig lo up fails for
++ whatever reason.
++
++2008-10-10 Alexander Sack <asac@ubuntu.com>
+
+ Implement managed mode. We bind devices configured in /etc/network/interfaces
+ to their connections by updating wired/wireless setting with the
+ mac address of the device.
+
+ * system-settings/plugins/ifupdown/plugin.c
+ - (get_net_address_for_udi): implement function to retrieve MAC
+ address of udi from hal in GByteArray format
+Index: network-manager-0.7~~svn20081015t024626/src/backends/NetworkManagerDebian.c
+===================================================================
+--- network-manager-0.7~~svn20081015t024626.orig/src/backends/NetworkManagerDebian.c
++++ network-manager-0.7~~svn20081015t024626/src/backends/NetworkManagerDebian.c
+@@ -39,17 +39,21 @@
+ /*
+ * nm_system_enable_loopback
+ *
+ * Bring up the loopback interface
+ *
+ */
+ void nm_system_enable_loopback (void)
+ {
+- nm_spawn_process ("/sbin/ifup lo");
++ // if wrapper fails we gonna try our own
++ if(!g_file_test ("/sbin/ifconfig", G_FILE_TEST_IS_EXECUTABLE) ||
++ nm_spawn_process ("/sbin/ifconfig lo up") != 0) {
++ nm_generic_enable_loopback ();
++ }
+ }
+
+ /*
+ * nm_system_update_dns
+ *
+ * Invalidate the nscd host cache, if it exists, since
+ * we changed resolv.conf.
+ *
diff --git a/packages/networkmanager/files/02-dbus_access_network_manager.patch b/packages/networkmanager/files/02-dbus_access_network_manager.patch
new file mode 100644
index 0000000000..7dc2ddd0eb
--- /dev/null
+++ b/packages/networkmanager/files/02-dbus_access_network_manager.patch
@@ -0,0 +1,14 @@
+diff -Nur bzr.debian.0.9.4.patchupdate/src/NetworkManager.conf bzr.debian.0.9.4.patchupdate.new/src/NetworkManager.conf
+--- bzr.debian.0.9.4.patchupdate/src/NetworkManager.conf 2007-06-25 17:14:46.000000000 +0200
++++ bzr.debian.0.9.4.patchupdate.new/src/NetworkManager.conf 2007-06-25 17:15:51.000000000 +0200
+@@ -8,6 +8,10 @@
+ <allow send_destination="org.freedesktop.NetworkManager"/>
+ <allow send_interface="org.freedesktop.NetworkManager"/>
+ </policy>
++ <policy user="haldaemon">
++ <allow send_destination="org.freedesktop.NetworkManager"/>
++ <allow send_interface="org.freedesktop.NetworkManager"/>
++ </policy>
+ <policy at_console="true">
+ <allow send_destination="org.freedesktop.NetworkManager"/>
+ <allow send_interface="org.freedesktop.NetworkManager"/>
diff --git a/packages/networkmanager/files/25NetworkManager b/packages/networkmanager/files/25NetworkManager
index 8e4dec167f..6b51bfa843 100644
--- a/packages/networkmanager/files/25NetworkManager
+++ b/packages/networkmanager/files/25NetworkManager
@@ -14,8 +14,8 @@ case $1 in
'stop')
echo -n "Stopping NetworkManager daemon: NetworkManager"
- kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2`
- kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2`
+ kill `pidof NetworkManagerDispatcher`
+ kill `pidof NetworkManager`
echo "."
;;
diff --git a/packages/networkmanager/files/add_probe_for_v250_modems.patch b/packages/networkmanager/files/add_probe_for_v250_modems.patch
new file mode 100644
index 0000000000..011bf93d9d
--- /dev/null
+++ b/packages/networkmanager/files/add_probe_for_v250_modems.patch
@@ -0,0 +1,342 @@
+=== modified file 'src/Makefile.am'
+---
+ src/Makefile.am | 4 -
+ src/nm-hal-manager.c | 24 ++++++-
+ src/probe-modem.c | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/probe-modem.h | 29 ++++++++
+ 4 files changed, 220 insertions(+), 3 deletions(-)
+
+Index: network-manager.07.ubuntu/src/Makefile.am
+===================================================================
+--- network-manager.07.ubuntu.orig/src/Makefile.am
++++ network-manager.07.ubuntu/src/Makefile.am
+@@ -67,17 +67,19 @@
+ nm-cdma-device.h \
+ nm-hso-gsm-device.c \
+ nm-hso-gsm-device.h \
+ wpa.c \
+ wpa.h \
+ nm-netlink.c \
+ nm-netlink.h \
+ nm-dhcp4-config.c \
+- nm-dhcp4-config.h
++ nm-dhcp4-config.h \
++ probe-modem.c \
++ probe-modem.h
+
+ nm-access-point-glue.h: $(top_srcdir)/introspection/nm-access-point.xml
+ dbus-binding-tool --prefix=nm_access_point --mode=glib-server --output=$@ $<
+
+ nm-manager-glue.h: $(top_srcdir)/introspection/nm-manager.xml
+ dbus-binding-tool --prefix=nm_manager --mode=glib-server --output=$@ $<
+
+ nm-device-interface-glue.h: $(top_srcdir)/introspection/nm-device.xml
+Index: network-manager.07.ubuntu/src/nm-hal-manager.c
+===================================================================
+--- network-manager.07.ubuntu.orig/src/nm-hal-manager.c
++++ network-manager.07.ubuntu/src/nm-hal-manager.c
+@@ -12,16 +12,19 @@
+ #include "nm-dbus-manager.h"
+ #include "nm-utils.h"
+ #include "nm-device-wifi.h"
+ #include "nm-device-ethernet.h"
+ #include "nm-gsm-device.h"
+ #include "nm-hso-gsm-device.h"
+ #include "nm-cdma-device.h"
+
++#include "probe-modem.h"
++
++
+ /* Killswitch poll frequency in seconds */
+ #define RFKILL_POLL_FREQUENCY 6
+
+ #define HAL_DBUS_SERVICE "org.freedesktop.Hal"
+
+ typedef struct {
+ LibHalContext *hal_ctx;
+ NMDBusManager *dbus_mgr;
+@@ -269,43 +272,51 @@
+ modem_device_creator (NMHalManager *self, const char *udi, gboolean managed)
+ {
+ NMHalManagerPrivate *priv = NM_HAL_MANAGER_GET_PRIVATE (self);
+ char *serial_device;
+ char *parent_udi;
+ char *driver_name = NULL;
+ GObject *device = NULL;
+ char **capabilities, **iter;
+- gboolean type_gsm = FALSE;
+- gboolean type_cdma = FALSE;
++ gboolean type_gsm;
++ gboolean type_cdma;
++ gboolean type_v250;
+ char *netdev = NULL;
+
+ serial_device = libhal_device_get_property_string (priv->hal_ctx, udi, "serial.device", NULL);
+
+ /* Get the driver */
+ parent_udi = libhal_device_get_property_string (priv->hal_ctx, udi, "info.parent", NULL);
+ if (parent_udi) {
+ driver_name = libhal_device_get_property_string (priv->hal_ctx, parent_udi, "info.linux.driver", NULL);
+ libhal_free_string (parent_udi);
+ }
+
+ if (!serial_device || !driver_name)
+ goto out;
+
++ type_gsm = FALSE;
++ type_cdma = FALSE;
++ type_v250 = FALSE;
+ capabilities = libhal_device_get_property_strlist (priv->hal_ctx, udi, "modem.command_sets", NULL);
+ /* 'capabilites' may be NULL */
+ for (iter = capabilities; iter && *iter; iter++) {
+ if (!strcmp (*iter, "GSM-07.07")) {
+ type_gsm = TRUE;
+ break;
+ }
+ if (!strcmp (*iter, "IS-707-A")) {
+ type_cdma = TRUE;
+ break;
+ }
++ if (!strcmp (*iter, "V.250")) {
++ type_v250 = TRUE;
++ /* no break here! */
++ }
+ }
+ g_strfreev (capabilities);
+
+ /* Compatiblity with the pre-specification bits */
+ if (!type_gsm && !type_cdma) {
+ capabilities = libhal_device_get_property_strlist (priv->hal_ctx, udi, "info.capabilities", NULL);
+ for (iter = capabilities; *iter; iter++) {
+ if (!strcmp (*iter, "gsm")) {
+@@ -315,16 +326,25 @@
+ if (!strcmp (*iter, "cdma")) {
+ type_cdma = TRUE;
+ break;
+ }
+ }
+ g_strfreev (capabilities);
+ }
+
++ /* V.250 probe */
++ if (!type_gsm && !type_cdma && type_v250) {
++ gint probed_type = probe_modem (serial_device, udi, priv->hal_ctx);
++ if (probed_type == 1)
++ type_gsm = TRUE;
++ else if (probed_type == 2)
++ type_cdma = TRUE;
++ }
++
+ /* Special handling of 'hso' cards (until punted out to a modem manager) */
+ if (type_gsm && !strcmp (driver_name, "hso"))
+ netdev = get_hso_netdev (priv->hal_ctx, udi);
+
+ if (type_gsm) {
+ if (netdev)
+ device = (GObject *) nm_hso_gsm_device_new (udi, serial_device + strlen ("/dev/"), NULL, netdev, driver_name, managed);
+ else
+Index: network-manager.07.ubuntu/src/probe-modem.c
+===================================================================
+--- /dev/null
++++ network-manager.07.ubuntu/src/probe-modem.c
+@@ -0,0 +1,166 @@
++/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
++/* Probe modem capabilities
++ *
++ * Copyright (c) 2008 Vitja Makarov, <vitja.makarov@gmail.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ */
++
++#include <termios.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <errno.h>
++
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++#include "nm-utils.h"
++#include "probe-modem.h"
++
++
++#define MODEM_CAP_GSM 0x0001 /* GSM commands */
++#define MODEM_CAP_IS707_A 0x0002 /* CDMA circuit switched data commands */
++#define MODEM_CAP_DS 0x0004 /* data compression */
++#define MODEM_CAP_ES 0x0008 /* error control */
++#define MODEM_CAP_FCLASS 0x0010 /* Fax commands */
++#define MODEM_CAP_MS 0x0020 /* Modulation control commands */
++#define MODEM_CAP_W 0x0040 /* Wireless commands */
++
++struct modem_caps {
++ char *name;
++ int bits;
++};
++
++static struct modem_caps modem_caps[] = {
++ {"+CGSM", MODEM_CAP_GSM},
++ /* TODO: are they the same? */
++ {"+CIS707-A", MODEM_CAP_IS707_A},
++ {"+CIS707", MODEM_CAP_IS707_A},
++ {"+CIS707P", MODEM_CAP_IS707_A},
++ {NULL}
++} ;
++
++#define AT_CAPS_PROBE "AT+GCAP\r\n"
++
++static int modem_probe_caps(int fd)
++{
++ char buf[200];
++ char *ptr, *field = NULL;
++ int err, ret = 0;
++
++ err = write(fd, AT_CAPS_PROBE, sizeof(AT_CAPS_PROBE) - 1);
++
++ if (err != sizeof(AT_CAPS_PROBE) - 1)
++ return -1;
++
++ /* 100ms is enough for modem to send all the data */
++ usleep(100000);
++
++ err = read(fd, buf, sizeof(buf) - 1);
++ if (err <= 0)
++ return -1;
++ buf[err] = 0;
++
++ /* check okay reply */
++ ptr = strstr(buf, "\r\nOK\r\n");
++ if (!ptr)
++ return -1;
++ *ptr = 0;
++
++ /* find +GCAP: string */
++ ptr = strstr(buf, "\r\n+GCAP:");
++
++ if (ptr == NULL)
++ return -1;
++ ptr += 8;
++
++ /* and parse it */
++ do {
++ err = *ptr == '\0' || *ptr == '\r' || *ptr == '\n';
++ if (*ptr == ' ' || *ptr == ',' || err) {
++ *ptr = 0;
++ if (field) {
++ struct modem_caps *cap = modem_caps;
++
++ while (cap->name) {
++ if (!strcmp(cap->name, field))
++ ret |= cap->bits;
++ cap++;
++ }
++ }
++ field = NULL;
++ } else if (NULL == field) {
++ field = ptr;
++ }
++ ptr++;
++ } while (!err);
++
++ return ret;
++}
++
++int probe_modem (const char* device, const char *udi, LibHalContext *ctx)
++{
++ struct termios orig, attrs;
++ int fd, caps;
++ int rv = -1;
++
++ fd = open(device, O_RDWR|O_NDELAY);
++
++ if (-1 == fd) {
++ nm_warning ("open(%s): %s", device, strerror(errno));
++ return rv;
++ }
++
++ if (tcgetattr(fd, &orig))
++ goto close_and_out;
++
++ memcpy(&attrs, &orig, sizeof(attrs));
++ attrs.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR);
++ attrs.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
++ attrs.c_lflag &= ~(ICANON | XCASE | ECHO | ECHOE | ECHONL);
++ attrs.c_lflag &= ~(ECHO | ECHOE);
++ attrs.c_cc[VMIN] = 1;
++ attrs.c_cc[VTIME] = 0;
++ attrs.c_cc[VEOF] = 1;
++
++ tcsetattr(fd, TCSANOW, &attrs);
++ caps = modem_probe_caps(fd);
++ tcsetattr(fd, TCSANOW, &orig);
++
++ if (caps < 0) {
++ nm_debug("Couldn't get caps");
++ goto close_and_out;
++ }
++
++ if (caps & MODEM_CAP_GSM) {
++ nm_debug("Found GSM modem");
++ rv = 1;
++ goto close_and_out;
++ }
++
++ if (caps & MODEM_CAP_IS707_A) {
++ nm_debug("Found CDMA modem");
++ rv = 2;
++ goto close_and_out;
++ }
++
++ rv = 0;
++
++close_and_out:
++ close (fd);
++ return rv;
++}
+Index: network-manager.07.ubuntu/src/probe-modem.h
+===================================================================
+--- /dev/null
++++ network-manager.07.ubuntu/src/probe-modem.h
+@@ -0,0 +1,29 @@
++/* Copyright (c) 2008 Antti Kaijanmäki, <antti@kaijanmaki.net>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ */
++
++#ifndef PROBE_MODEM_H
++#define PROBE_MODEM_H
++
++
++#include <glib.h>
++#include <libhal.h>
++
++/* returns '1' if properties were changed */
++int probe_modem (const char* device, const char* udi, LibHalContext *ctx);
++
++#endif /* PROBE_MODEM_H */
diff --git a/packages/networkmanager/files/adding_no_scan_by_default.patch b/packages/networkmanager/files/adding_no_scan_by_default.patch
new file mode 100644
index 0000000000..31682c5c29
--- /dev/null
+++ b/packages/networkmanager/files/adding_no_scan_by_default.patch
@@ -0,0 +1,12 @@
+Index: NetworkManager-0.6.6/initscript/Debian/NetworkManager
+===================================================================
+--- NetworkManager-0.6.6.orig/initscript/Debian/NetworkManager 2008-09-03 17:44:23.000000000 -0300
++++ NetworkManager-0.6.6/initscript/Debian/NetworkManager 2008-09-03 18:01:35.000000000 -0300
+@@ -18,6 +18,7 @@
+ DESC="Network connection manager daemon"
+ NAME="NetworkManager"
+ DAEMON=/usr/sbin/$NAME
++DAEMON_OPTS=--no-scan
+ PIDFILE=/var/run/$NAME.pid
+ SCRIPTNAME=/etc/init.d/$NAME
+ USER=root
diff --git a/packages/networkmanager/files/avoid_frequent_scan.patch b/packages/networkmanager/files/avoid_frequent_scan.patch
new file mode 100644
index 0000000000..43f84f7674
--- /dev/null
+++ b/packages/networkmanager/files/avoid_frequent_scan.patch
@@ -0,0 +1,226 @@
+Index: NetworkManager-0.6.6/src/nm-device-802-11-wireless.c
+===================================================================
+--- NetworkManager-0.6.6.orig/src/nm-device-802-11-wireless.c 2008-09-05 15:01:32.000000000 -0300
++++ NetworkManager-0.6.6/src/nm-device-802-11-wireless.c 2008-09-08 11:37:23.000000000 -0300
+@@ -624,9 +624,12 @@
+ NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
+ GSource * source;
+ guint source_id;
++ NMData * app_data;
++
++ app_data = nm_device_get_app_data (NM_DEVICE (self));
+
+ /* Start the scanning timeout for devices that can do scanning */
+- if (nm_device_get_capabilities (dev) & NM_DEVICE_CAP_WIRELESS_SCAN) {
++ if (!app_data->no_scan && nm_device_get_capabilities (dev) & NM_DEVICE_CAP_WIRELESS_SCAN) {
+ /* Stupid orinoco has problems scanning immediately after being up,
+ * so wait a bit before triggering a scan.
+ */
+@@ -1063,9 +1066,14 @@
+ NMWirelessScanInterval interval)
+ {
+ guint8 seconds = nm_wireless_scan_interval_to_seconds (interval);
++ NMData *app_data;
+
+ g_return_if_fail (self != NULL);
+
++ app_data = nm_device_get_app_data (NM_DEVICE (self));
++ if (app_data->no_scan)
++ return;
++
+ self->priv->scan_interval = seconds;
+
+ if (interval == NM_WIRELESS_SCAN_INTERVAL_ACTIVE && !self->priv->scanning) {
+@@ -1974,9 +1982,13 @@
+ scan_results_timeout (NMDevice80211Wireless *self)
+ {
+ GTimeVal cur_time;
++ NMData * app_data;
+
+ g_return_val_if_fail (self != NULL, FALSE);
+
++ app_data = nm_device_get_app_data (NM_DEVICE (self));
++ g_assert (app_data);
++
+ request_and_convert_scan_results (self);
+
+ self->priv->scanning = FALSE;
+@@ -1984,11 +1996,39 @@
+ g_get_current_time (&cur_time);
+ self->priv->last_scan = cur_time.tv_sec;
+
+- /* After the first successful scan back down to the ACTIVE scan interval */
+- if (self->priv->scan_interval == nm_wireless_scan_interval_to_seconds (NM_WIRELESS_SCAN_INTERVAL_INIT))
+- nm_device_802_11_wireless_set_scan_interval (self, NM_WIRELESS_SCAN_INTERVAL_ACTIVE);
+- else
+- schedule_scan (self, 0);
++ if (!app_data->no_scan)
++ {
++ /* After the first successful scan back down to the ACTIVE scan interval */
++ if (self->priv->scan_interval == nm_wireless_scan_interval_to_seconds (NM_WIRELESS_SCAN_INTERVAL_INIT))
++ nm_device_802_11_wireless_set_scan_interval (self, NM_WIRELESS_SCAN_INTERVAL_ACTIVE);
++ else
++ schedule_scan (self, 0);
++ }
++ else
++ {
++ /* If we're in "no scan" mode, lets always signalize that we've performed a scan */
++ DBusMessage *message;
++ char *dev_path = NULL;
++
++ if (!(dev_path = nm_dbus_get_object_path_for_device (NM_DEVICE (self))))
++ goto out;
++
++ if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, "ScanPerformed")))
++ {
++ nm_warning ("scan_results_timeout(): Not enough memory for new dbus message!");
++ goto out;
++ }
++
++ dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_INVALID);
++
++ if (!dbus_connection_send (app_data->dbus_connection, message, NULL))
++ nm_warning ("scan_results_timeout(): Could not raise the ScanPerformed signal!");
++
++ dbus_message_unref (message);
++
++out:
++ g_free (dev_path);
++ }
+
+ return FALSE;
+ }
+@@ -2134,7 +2174,7 @@
+ }
+ schedule_scan_results_timeout (self, 10);
+ }
+- return FALSE;
++ return TRUE;
+
+ reschedule:
+ schedule_scan (self, 0);
+@@ -2156,6 +2196,13 @@
+ }
+
+
++gboolean
++nm_device_802_11_wireless_perform_scan (NMDevice80211Wireless *self)
++{
++ return nm_device_802_11_wireless_scan ((gpointer) self);
++}
++
++
+ /*
+ * schedule_scan
+ *
+Index: NetworkManager-0.6.6/src/NetworkManager.c
+===================================================================
+--- NetworkManager-0.6.6.orig/src/NetworkManager.c 2008-03-06 17:14:39.000000000 -0300
++++ NetworkManager-0.6.6/src/NetworkManager.c 2008-09-05 15:01:32.000000000 -0300
+@@ -929,6 +929,7 @@
+ gboolean become_daemon = FALSE;
+ gboolean enable_test_devices = FALSE;
+ gboolean show_usage = FALSE;
++ gboolean no_scan = FALSE;
+ char * owner;
+ char * pidfile = NULL;
+ char * user_pidfile = NULL;
+@@ -951,6 +952,7 @@
+ {"pid-file", 0, 0, G_OPTION_ARG_STRING, &user_pidfile, "Specify the location of a PID file", NULL},
+ {"enable-test-devices", 0, 0, G_OPTION_ARG_NONE, &enable_test_devices, "Allow dummy devices to be created via DBUS methods [DEBUG]", NULL},
+ {"info", 0, 0, G_OPTION_ARG_NONE, &show_usage, "Show application information", NULL},
++ {"no-scan", 0, 0, G_OPTION_ARG_NONE, &no_scan, "Prevent background scan", NULL},
+ {NULL}
+ };
+ opt_ctx = g_option_context_new("");
+@@ -1009,6 +1011,8 @@
+ exit (EXIT_FAILURE);
+ }
+
++ nm_data->no_scan = no_scan;
++
+ /* Create our dbus service */
+ nm_data->dbus_connection = nm_dbus_init (nm_data);
+ if (!nm_data->dbus_connection)
+Index: NetworkManager-0.6.6/src/NetworkManagerMain.h
+===================================================================
+--- NetworkManager-0.6.6.orig/src/NetworkManagerMain.h 2008-03-06 17:14:39.000000000 -0300
++++ NetworkManager-0.6.6/src/NetworkManagerMain.h 2008-09-05 15:01:32.000000000 -0300
+@@ -87,6 +87,7 @@
+ gboolean modem_active;
+ gboolean asleep;
+ gboolean disconnected;
++ gboolean no_scan;
+
+ GSList * dialup_list;
+ GMutex * dialup_list_mutex;
+Index: NetworkManager-0.6.6/src/nm-dbus-device.c
+===================================================================
+--- NetworkManager-0.6.6.orig/src/nm-dbus-device.c 2008-03-06 17:14:39.000000000 -0300
++++ NetworkManager-0.6.6/src/nm-dbus-device.c 2008-09-08 15:12:43.000000000 -0300
+@@ -500,6 +500,44 @@
+ }
+
+
++static DBusMessage *nm_dbus_device_perform_scan (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
++{
++ NMDevice *dev;
++ DBusMessage *reply = NULL;
++ NMData * app_data;
++
++ g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
++
++ dev = data->dev;
++
++ app_data = nm_device_get_app_data (NM_DEVICE (dev));
++ if (!app_data->no_scan)
++ {
++ nm_warning ("You cannot ask for a scan if you're not in 'No scan' mode");
++ reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "Cannot perform scan", "You cannot ask for a scan if you're not in 'No scan' mode");
++ goto out;
++ }
++
++ if (!nm_device_is_802_11_wireless (dev))
++ {
++ reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotWireless",
++ "Wired devices cannot scan for wireless networks.");
++ goto out;
++ }
++
++ if (nm_device_802_11_wireless_perform_scan ((NMDevice80211Wireless *) dev))
++ reply = dbus_message_new_method_return (message); /* Success */
++ else
++ reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "Cannot perform scan", "The device cannot perform network scanning.");
++
++out:
++ if (!reply)
++ nm_warning ("Could not allocate dbus message.");
++
++ return reply;
++}
++
++
+ /*
+ * nm_dbus_device_methods_setup
+ *
+@@ -523,6 +561,7 @@
+ nm_dbus_method_list_add_method (list, "setLinkActive", nm_dbus_device_set_link_active);
+ nm_dbus_method_list_add_method (list, "getCapabilities", nm_dbus_device_get_capabilities);
+ nm_dbus_method_list_add_method (list, "getDriver", nm_dbus_device_get_driver);
++ nm_dbus_method_list_add_method (list, "performScan", nm_dbus_device_perform_scan);
+
+ return (list);
+ }
+Index: NetworkManager-0.6.6/src/nm-device-802-11-wireless.h
+===================================================================
+--- NetworkManager-0.6.6.orig/src/nm-device-802-11-wireless.h 2008-03-06 17:14:39.000000000 -0300
++++ NetworkManager-0.6.6/src/nm-device-802-11-wireless.h 2008-09-05 15:01:32.000000000 -0300
+@@ -110,6 +110,8 @@
+
+ gint8 nm_device_802_11_wireless_get_signal_strength (NMDevice80211Wireless *self);
+
++gboolean nm_device_802_11_wireless_perform_scan (NMDevice80211Wireless *self);
++
+
+ G_END_DECLS
+
diff --git a/packages/networkmanager/files/cx3110_bring_up.patch b/packages/networkmanager/files/cx3110_bring_up.patch
new file mode 100644
index 0000000000..3317ff6479
--- /dev/null
+++ b/packages/networkmanager/files/cx3110_bring_up.patch
@@ -0,0 +1,19 @@
+Index: NetworkManager-0.6.6/src/nm-device-802-11-wireless.c
+===================================================================
+--- NetworkManager-0.6.6.orig/src/nm-device-802-11-wireless.c 2008-09-03 15:10:43.000000000 -0300
++++ NetworkManager-0.6.6/src/nm-device-802-11-wireless.c 2008-09-03 15:27:23.000000000 -0300
+@@ -295,6 +295,14 @@
+ guint32 caps = NM_DEVICE_CAP_NONE;
+ iwrange range;
+ struct iwreq wrq;
++ NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
++
++ /* The cx3110 driver has to be UP in order to get its capabilities. */
++ if (!self->priv->is_initialized) {
++ const char *kernel_driver = nm_device_get_driver (dev);
++ if (nm_null_safe_strcmp("cx3110", kernel_driver))
++ nm_device_bring_up (dev);
++ }
+
+ /* Check for Wireless Extensions support >= 16 for wireless devices */
+
diff --git a/packages/networkmanager/files/define_kernel_types_for_old_linux_headers.patch b/packages/networkmanager/files/define_kernel_types_for_old_linux_headers.patch
new file mode 100644
index 0000000000..cc966f453d
--- /dev/null
+++ b/packages/networkmanager/files/define_kernel_types_for_old_linux_headers.patch
@@ -0,0 +1,15 @@
+Index: trunk/src/nm-device-802-3-ethernet.c
+===================================================================
+--- trunk.orig/src/nm-device-802-3-ethernet.c 2008-05-07 11:06:53.000000000 -0300
++++ trunk/src/nm-device-802-3-ethernet.c 2008-09-04 15:03:11.000000000 -0300
+@@ -28,6 +28,10 @@
+ #include <net/ethernet.h>
+ #include <stdlib.h>
+ #include <linux/sockios.h>
++typedef unsigned long long u64;
++typedef unsigned int u32;
++typedef unsigned short u16;
++typedef unsigned char u8;
+ #include <linux/ethtool.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
diff --git a/packages/networkmanager/files/define_kernel_types_for_old_linux_headers_and_warn_functions_from_glib_2_16.patch b/packages/networkmanager/files/define_kernel_types_for_old_linux_headers_and_warn_functions_from_glib_2_16.patch
new file mode 100644
index 0000000000..e6a2a537ce
--- /dev/null
+++ b/packages/networkmanager/files/define_kernel_types_for_old_linux_headers_and_warn_functions_from_glib_2_16.patch
@@ -0,0 +1,57 @@
+Index: trunk/src/nm-device-ethernet.c
+===================================================================
+--- trunk.orig/src/nm-device-ethernet.c 2008-08-21 18:44:59.000000000 -0300
++++ trunk/src/nm-device-ethernet.c 2008-08-21 18:44:59.000000000 -0300
+@@ -28,6 +28,10 @@
+ #include <net/ethernet.h>
+ #include <stdlib.h>
+ #include <linux/sockios.h>
++typedef unsigned long long u64;
++typedef unsigned int u32;
++typedef unsigned short u16;
++typedef unsigned char u8;
+ #include <linux/ethtool.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+Index: trunk/src/nm-device-wifi.c
+===================================================================
+--- trunk.orig/src/nm-device-wifi.c 2008-08-21 18:54:24.000000000 -0300
++++ trunk/src/nm-device-wifi.c 2008-08-21 19:17:17.000000000 -0300
+@@ -165,6 +165,9 @@
+ gboolean has_scan_capa_ssid;
+ };
+
++#define g_warn_if_fail(expr) do { if G_LIKELY (expr) ; else \
++ g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #expr); } while (0)
++
+ static guint32 nm_device_wifi_get_frequency (NMDeviceWifi *self);
+
+ static void nm_device_wifi_set_ssid (NMDeviceWifi *self, const GByteArray * ssid);
+@@ -220,6 +223,27 @@
+ const GValue *handler_return,
+ gpointer data);
+
++void
++g_warn_message (const char *domain,
++ const char *file,
++ int line,
++ const char *func,
++ const char *warnexpr)
++{
++ char *s, lstr[32];
++ g_snprintf (lstr, 32, "%d", line);
++ if (warnexpr)
++ s = g_strconcat ("(", file, ":", lstr, "):",
++ func, func[0] ? ":" : "",
++ " runtime check failed: (", warnexpr, ")", NULL);
++ else
++ s = g_strconcat ("(", file, ":", lstr, "):",
++ func, func[0] ? ":" : "",
++ " ", "code should not be reached", NULL);
++ g_log (domain, G_LOG_LEVEL_WARNING, "%s", s);
++ g_free (s);
++}
++
+ static GQuark
+ nm_wifi_error_quark (void)
+ {
diff --git a/packages/networkmanager/files/fix_seg_fault.patch b/packages/networkmanager/files/fix_seg_fault.patch
new file mode 100644
index 0000000000..679ca8e172
--- /dev/null
+++ b/packages/networkmanager/files/fix_seg_fault.patch
@@ -0,0 +1,13 @@
+Index: NetworkManager-0.6.6/src/nm-device-802-11-wireless.c
+===================================================================
+--- NetworkManager-0.6.6.orig/src/nm-device-802-11-wireless.c 2008-03-06 17:14:39.000000000 -0300
++++ NetworkManager-0.6.6/src/nm-device-802-11-wireless.c 2008-08-26 13:53:22.000000000 -0300
+@@ -944,6 +944,8 @@
+ /* If we didn't get any security info, make some up. */
+ if (!security)
+ security = nm_ap_security_new_from_ap (ap);
++ else
++ g_object_ref (security);
+ }
+ g_assert (security);
+ nm_ap_set_security (ap, security);
diff --git a/packages/networkmanager/files/mamona/25NetworkManager b/packages/networkmanager/files/mamona/25NetworkManager
new file mode 100644
index 0000000000..606d2bc33d
--- /dev/null
+++ b/packages/networkmanager/files/mamona/25NetworkManager
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# NetworkManager startup script
+
+. /etc/profile
+
+case $1 in
+ 'start')
+ echo -n "Starting NetworkManager daemon: NetworkManager"
+ /usr/sbin/NetworkManager --no-scan
+ /usr/sbin/NetworkManagerDispatcher
+ echo "."
+ ;;
+
+ 'stop')
+ echo -n "Stopping NetworkManager daemon: NetworkManager"
+ kill `pidof NetworkManagerDispatcher`
+ kill `pidof NetworkManager`
+ echo "."
+ ;;
+
+ 'restart')
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 { start | stop | restart }"
+ ;;
+esac
diff --git a/packages/networkmanager/files/remove-gtk-doc-make.patch b/packages/networkmanager/files/remove-gtk-doc-make.patch
new file mode 100644
index 0000000000..b4137c69a7
--- /dev/null
+++ b/packages/networkmanager/files/remove-gtk-doc-make.patch
@@ -0,0 +1,11 @@
+Index: trunk/docs/libnm-glib/Makefile.am
+===================================================================
+--- trunk.orig/docs/libnm-glib/Makefile.am 2008-11-17 19:37:20.000000000 -0300
++++ trunk/docs/libnm-glib/Makefile.am 2008-11-17 19:37:30.000000000 -0300
+@@ -75,5 +75,5 @@
+
+
+ # include common portion ...
+-include $(top_srcdir)/gtk-doc.make
++#include $(top_srcdir)/gtk-doc.make
+
diff --git a/packages/networkmanager/netm-cli-0.2/scan_support.patch b/packages/networkmanager/netm-cli-0.2/scan_support.patch
new file mode 100644
index 0000000000..efa3cd89b4
--- /dev/null
+++ b/packages/networkmanager/netm-cli-0.2/scan_support.patch
@@ -0,0 +1,69 @@
+diff --git a/netm-cli/netm-cli b/netm-cli/netm-cli
+index 46c3fa6..0a53036 100755
+--- a/netm-cli/netm-cli
++++ b/netm-cli/netm-cli
+@@ -29,6 +29,7 @@ __version__ = "0.2"
+ import dbus
+ import gobject
+ import os
++import sys
+ from dbus.mainloop.glib import DBusGMainLoop
+ from ConfigParser import ConfigParser
+ from optparse import OptionParser, OptionGroup
+@@ -499,6 +500,14 @@ class NMCLI:
+ self._we_cipher, self._hexkey,
+ self._wpa_version, self._key_mgmt)
+
++ def scan(self):
++ """Scan the network and update the NM device struct."""
++ for devname in self.devices:
++ device = self.devices[devname]
++ if device['type'] == DEVICE_TYPE_802_11_WIRELESS:
++ devobj = self.bus.get_object(NM_DBUS_SERVICE, device['path'])
++ devobj.performScan()
++
+ def sleep(self):
+ """Tell NetworkManager to go into offline mode mode."""
+ self.nm.sleep(ignore_reply=True)
+@@ -782,7 +791,33 @@ def main():
+ nm = NMCLI(device, essid, hexkey, contype, wep_alg, wpa_pairwise,
+ options.verbose)
+
++ loop = gobject.MainLoop()
++
+ # Main actions
++ if options.networks:
++ print "Performing scan...",
++ sys.stdout.flush()
++ devices = [nm.devices[dev]['path'] for dev in nm.devices if
++ nm.devices[dev]['type'] == DEVICE_TYPE_802_11_WIRELESS]
++
++ def scan_performed(device):
++ """Scan helper."""
++ if device in devices:
++ devices.remove(device)
++ if not devices:
++ loop.quit()
++
++ nm.bus.add_signal_receiver(
++ handler_function=scan_performed, signal_name="ScanPerformed",
++ path=NM_DBUS_PATH, dbus_interface=NM_DBUS_INTERFACE)
++ nm.scan()
++ loop.run()
++ nm.bus.remove_signal_receiver(
++ handler_or_match=scan_performed, signal_name="ScanPerformed",
++ path=NM_DBUS_PATH, dbus_interface=NM_DBUS_INTERFACE)
++ print "OK"
++ sys.stdout.flush()
++ nm.update_devices()
+ if options.monitor:
+ nm.set_signals()
+ if options.nmstatus:
+@@ -811,7 +846,6 @@ def main():
+ config.save()
+
+ if options.monitor:
+- loop = gobject.MainLoop()
+ loop.run()
+
+ # Run the program
diff --git a/packages/networkmanager/netm-cli_0.2.bb b/packages/networkmanager/netm-cli_0.2.bb
new file mode 100644
index 0000000000..9166c44a52
--- /dev/null
+++ b/packages/networkmanager/netm-cli_0.2.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Command Line interface for Network Manager"
+HOMEPAGE = "http://dev.openbossa.org/mamona/gitweb?p=users/salveti/netm-cli.git;a=summary"
+LICENSE = "GPLv2"
+SECTION = "console/network"
+RDEPENDS = "python-dbus python-pygobject python-textutils networkmanager (>=0.6) networkmanager (<0.7)"
+PR = "r3"
+
+inherit setuptools
+
+SRC_URI = "git://dev.openbossa.org/mamona/users/salveti/netm-cli.git;protocol=http;tag=netm-cli-${PV}"
+SRC_URI_append_mamona = " file://scan_support.patch;patch=1"
+
+S = "${WORKDIR}/git"
diff --git a/packages/networkmanager/netm-cli_git.bb b/packages/networkmanager/netm-cli_git.bb
new file mode 100644
index 0000000000..c85dc2e784
--- /dev/null
+++ b/packages/networkmanager/netm-cli_git.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Command Line interface for Network Manager"
+HOMEPAGE = "http://dev.openbossa.org/mamona/gitweb?p=users/salveti/netm-cli.git;a=summary"
+LICENSE = "GPLv2"
+SECTION = "console/network"
+RDEPENDS = "python-dbus python-pygobject python-textutils networkmanager (>= 0.7)"
+PR = "r3"
+PV = "0.3+git"
+
+inherit setuptools
+
+SRC_URI = "git://dev.openbossa.org/mamona/users/salveti/netm-cli.git;protocol=http"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} += "${sysconfdir}/dbus-1/system.d/netm-cli.conf"
diff --git a/packages/networkmanager/networkmanager-0.7.inc b/packages/networkmanager/networkmanager-0.7.inc
new file mode 100644
index 0000000000..f3927e8a1b
--- /dev/null
+++ b/packages/networkmanager/networkmanager-0.7.inc
@@ -0,0 +1,68 @@
+DESCRIPTION = "NetworkManager"
+SECTION = "net/misc"
+LICENSE = "GPL"
+PRIORITY = "optional"
+DEPENDS = "libnl dbus dbus-glib hal wireless-tools policykit gnutls e2fsprogs-libs ppp"
+RDEPENDS = "wpa-supplicant dhcp-client \
+ ${@base_contains('COMBINED_FEATURES', '3gmodem', 'ppp', '', d)} \
+ "
+
+EXTRA_OECONF = " \
+ --with-distro=debian \
+ --with-crypto=gnutls \
+ --disable-more-warnings"
+
+inherit autotools pkgconfig update-rc.d
+
+INITSCRIPT_NAME = "NetworkManager"
+INITSCRIPT_PARAMS = "defaults 28"
+
+do_stage () {
+ autotools_stage_all
+}
+
+do_install_append () {
+ install -d ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ # Test binaries
+ install -d ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-tool ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/libnm_glib_test ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-online ${D}/usr/bin
+}
+
+pkg_postinst_${PN} () {
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ /etc/init.d/populate-volatile.sh update
+}
+
+PACKAGES =+ "libnmutil libnmglib libnmglib-vpn ${PN}-tests"
+
+FILES_libnmutil += "${libdir}/libnm-util.so.*"
+FILES_libnmglib += "${libdir}/libnm_glib.so.*"
+FILES_libnmglib-vpn += "${libdir}/libnm_glib_vpn.so.*"
+
+FILES_${PN} += " \
+ ${libexecdir} \
+ ${libdir}/pppd/*/nm-pppd-plugin.so \
+ ${libdir}/NetworkManager/*.so \
+ ${datadir}/PolicyKit \
+ ${datadir}/dbus-1"
+
+FILES_${PN}-dbg += "${libdir}/NetworkManager/.debug/ \
+ ${libdir}/pppd/*/.debug/ "
+
+FILES_${PN}-dev += "${datadir}/NetworkManager/gdb-cmd \
+ ${libdir}/pppd/*/*.a \
+ ${libdir}/pppd/*/*.la \
+ ${libdir}/NetworkManager/*.a \
+ ${libdir}/NetworkManager/*.la"
+
+FILES_${PN}-tests = "${bindir}/nm-tool \
+ ${bindir}/libnm_glib_test \
+ ${bindir}/nminfotest \
+ ${bindir}/nm-online \
+ ${bindir}/nm-supplicant \
+ ${bindir}/nm-testdevices"
diff --git a/packages/networkmanager/networkmanager-0.7/NetworkManager b/packages/networkmanager/networkmanager-0.7/NetworkManager
new file mode 100755
index 0000000000..4cde8cc003
--- /dev/null
+++ b/packages/networkmanager/networkmanager-0.7/NetworkManager
@@ -0,0 +1,69 @@
+#! /bin/sh
+#
+# NetworkManager NetworkManager daemon
+# Daemon for automatically switching network
+# connections to the best available connection.
+# This file should be placed in /etc/init.d.
+#
+# Authors: <j@bootlab.org>
+# Mark Roach <mrroach@okmaybe.com>
+# Thom May <thom@debian.org>
+#
+# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
+#
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Network connection manager daemon"
+NAME="NetworkManager"
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+USER=root
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --user $USER --exec $DAEMON -- $DAEMON_OPTS
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --oknodo --user $USER --exec $DAEMON
+}
+
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/networkmanager/networkmanager-0.7/cx3110_bring_up.patch b/packages/networkmanager/networkmanager-0.7/cx3110_bring_up.patch
new file mode 100644
index 0000000000..db420ce2ba
--- /dev/null
+++ b/packages/networkmanager/networkmanager-0.7/cx3110_bring_up.patch
@@ -0,0 +1,20 @@
+Index: NetworkManager-0.7.0/src/nm-device-wifi.c
+===================================================================
+--- NetworkManager-0.7.0.orig/src/nm-device-wifi.c
++++ NetworkManager-0.7.0/src/nm-device-wifi.c
+@@ -364,6 +364,15 @@ real_get_generic_capabilities (NMDevice
+ const char *iface = nm_device_get_iface (dev);
+ gboolean success;
+
++ /* The cx3110 driver has to be UP in order to get its capabilities. */
++ gboolean no_firmware = FALSE;
++ const char *driver = nm_device_get_driver (dev);
++ if (driver && !strcmp ("wlan-omap", driver) && !nm_system_device_is_up (dev)) {
++ if (!nm_device_hw_bring_up (dev, TRUE, &no_firmware))
++ nm_warning ("(%s): couldn't bring up interface to get capabilities.",
++ iface);
++ }
++
+ memset (&range, 0, sizeof (struct iw_range));
+ success = wireless_get_range (NM_DEVICE_WIFI (dev), &range, &response_len);
+ if (!success)
diff --git a/packages/networkmanager/networkmanager-0.7/disable_wireless_by_default.patch b/packages/networkmanager/networkmanager-0.7/disable_wireless_by_default.patch
new file mode 100644
index 0000000000..d194d96ea5
--- /dev/null
+++ b/packages/networkmanager/networkmanager-0.7/disable_wireless_by_default.patch
@@ -0,0 +1,22 @@
+Index: NetworkManager-0.7.0/src/nm-manager.c
+===================================================================
+--- NetworkManager-0.7.0.orig/src/nm-manager.c 2009-01-15 17:23:09.000000000 -0300
++++ NetworkManager-0.7.0/src/nm-manager.c 2009-01-15 17:32:36.000000000 -0300
+@@ -286,7 +286,7 @@
+ DBusGConnection *g_connection;
+ guint id;
+
+- priv->wireless_enabled = TRUE;
++ priv->wireless_enabled = FALSE;
+ priv->wireless_hw_enabled = TRUE;
+ priv->sleeping = FALSE;
+ priv->state = NM_STATE_DISCONNECTED;
+@@ -613,7 +613,7 @@
+ g_param_spec_boolean (NM_MANAGER_WIRELESS_ENABLED,
+ "WirelessEnabled",
+ "Is wireless enabled",
+- TRUE,
++ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
diff --git a/packages/networkmanager/networkmanager-0.7/nm-system-settings.conf b/packages/networkmanager/networkmanager-0.7/nm-system-settings.conf
new file mode 100644
index 0000000000..fb9ef1ff97
--- /dev/null
+++ b/packages/networkmanager/networkmanager-0.7/nm-system-settings.conf
@@ -0,0 +1,6 @@
+[main]
+plugins=ifupdown,keyfile
+
+[ifupdown]
+managed=true
+
diff --git a/packages/networkmanager/networkmanager-applet_0.6.6.bb b/packages/networkmanager/networkmanager-applet_0.6.6.bb
new file mode 100644
index 0000000000..b9adba70f7
--- /dev/null
+++ b/packages/networkmanager/networkmanager-applet_0.6.6.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "GTK+ applet for NetworkManager"
+LICENSE = "GPL"
+DEPENDS = "networkmanager dbus-glib libglade gconf gnome-keyring"
+#TODO DEPENDS libnotify
+RDEPENDS = "networkmanager"
+
+inherit gnome gtk-icon-cache
+
+SRC_URI = "http://people.redhat.com/dcbw/NetworkManager/0.6.6/nm-applet-0.6.6.tar.gz \
+ file://applet-no-gnome.diff;patch=1;pnum=0"
+
+FILES_${PN} += "${datadir}/nm-applet/ \
+ ${datadir}/gnome-vpn-properties/ \
+ ${datadir}/gnome/autostart/ \
+ "
diff --git a/packages/networkmanager/networkmanager-pre0.7.inc b/packages/networkmanager/networkmanager-pre0.7.inc
new file mode 100644
index 0000000000..e1b80919d5
--- /dev/null
+++ b/packages/networkmanager/networkmanager-pre0.7.inc
@@ -0,0 +1,79 @@
+DESCRIPTION = "NetworkManager"
+SECTION = "net/misc"
+LICENSE = "GPL"
+PRIORITY = "optional"
+DEPENDS = "libnl dbus dbus-glib hal wireless-tools ppp policykit gnutls"
+RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client dhcdbd"
+
+# Providers that require this file MUST append the source to SRC_URI
+# These are just the common patches
+SRC_URI = " \
+ file://25NetworkManager \
+ file://99_networkmanager"
+
+S = "${WORKDIR}/git"
+
+
+EXTRA_OECONF = " \
+ --with-distro=debian \
+ --with-wpa_supplicant=/usr/sbin/wpa_supplicant \
+ --with-dhcdbd=/sbin/dhcdbd \
+ --with-ip=/sbin/ip.iproute2 \
+ --with-crypto=gnutls \
+ --disable-more-warnings"
+
+inherit autotools pkgconfig
+
+do_stage () {
+ autotools_stage_all
+}
+
+do_install_append () {
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_networkmanager ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/25NetworkManager ${D}/etc/dbus-1/event.d
+ sed -i s,/sbin/ip,/sbin/ip.iproute2, ${D}/etc/init.d/NetworkManager
+ # Test binaries
+ install -d ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-tool ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/libnm_glib_test ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-online ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nmtestdevices ${D}/usr/bin
+}
+
+pkg_postinst_${PN} () {
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ /etc/init.d/populate-volatile.sh update
+}
+
+PACKAGES =+ "libnmutil libnmglib libnmglib-vpn ${PN}-tests"
+
+FILES_libnmutil += "${libdir}/libnm-util.so.*"
+FILES_libnmglib += "${libdir}/libnm_glib.so.*"
+FILES_libnmglib-vpn += "${libdir}/libnm_glib_vpn.so.*"
+
+FILES_${PN} += " \
+ ${libexecdir} \
+ ${libdir}/pppd/*/nm-pppd-plugin.so \
+ ${libdir}/NetworkManager/*.so \
+ ${datadir}/PolicyKit \
+ ${datadir}/dbus-1"
+
+FILES_${PN}-dbg += "${libdir}/NetworkManager/.debug/ \
+ ${libdir}/pppd/*/.debug/ "
+
+FILES_${PN}-dev += "${datadir}/NetworkManager/gdb-cmd \
+ ${libdir}/pppd/*/*.a \
+ ${libdir}/pppd/*/*.la \
+ ${libdir}/NetworkManager/*.a \
+ ${libdir}/NetworkManager/*.la"
+
+FILES_${PN}-tests = "${bindir}/nm-tool \
+ ${bindir}/libnm_glib_test \
+ ${bindir}/nminfotest \
+ ${bindir}/nm-online \
+ ${bindir}/nm-supplicant \
+ ${bindir}/nm-testdevices"
diff --git a/packages/networkmanager/networkmanager.inc b/packages/networkmanager/networkmanager.inc
index 2a0f28753f..ead854ca58 100644
--- a/packages/networkmanager/networkmanager.inc
+++ b/packages/networkmanager/networkmanager.inc
@@ -3,19 +3,18 @@ SECTION = "net/misc"
LICENSE = "GPL"
HOMEPAGE = "http://www.gnome.org"
PRIORITY = "optional"
-DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools"
-RDEPENDS = "wpa-supplicant iproute2 dhcdbd"
-PR = "r1"
+DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools ppp"
+RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client dhcdbd"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.6/NetworkManager-${PV}.tar.bz2 \
- file://NetworkManager \
+ file://25NetworkManager \
file://99_networkmanager"
S = "${WORKDIR}/NetworkManager-${PV}/"
EXTRA_OECONF = " \
- --with-gnome \
+ --without-gnome \
--with-distro=debian \
--without-gcrypt \
--with-wpa_supplicant=/usr/sbin/wpa_supplicant \
@@ -28,26 +27,30 @@ do_stage () {
autotools_stage_all
}
-do_install () {
- oe_libinstall -C libnm-util libnm-util ${D}/usr/lib
- oe_libinstall -C gnome/libnm_glib libnm_glib ${D}/usr/lib
-
- oe_runmake -C src DESTDIR="${D}" install
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_networkmanager ${D}/etc/default/volatiles
- install -d ${D}/etc/init.d/
- install -m 0755 ${WORKDIR}/NetworkManager ${D}/etc/init.d/
- install -d ${D}/${datadir}/
+do_install_append () {
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_networkmanager ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/25NetworkManager ${D}/etc/dbus-1/event.d
+ sed -i s,/sbin/ip,/sbin/ip.iproute2, ${D}/etc/init.d/NetworkManager
+ # Test binaries
+ install -d ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-tool ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/libnm_glib_test ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nminfotest ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-online ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nm-supplicant-test ${D}/usr/bin
+ install -m 0755 ${S}/test/.libs/nmtestdevices ${D}/usr/bin
}
pkg_postinst_${PN} () {
-if [ "x$D" != "x" ]; then
- exit 1
-fi
-/etc/init.d/populate-volatile.sh update
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ /etc/init.d/populate-volatile.sh update
}
-PACKAGES =+ "libnmutil libnmglib libnmglib-vpn"
+PACKAGES =+ "libnmutil libnmglib libnmglib-vpn ${PN}-tests"
FILES_libnmutil += "${libdir}/libnm-util.so.*"
FILES_libnmglib += "${libdir}/libnm_glib.so.*"
@@ -62,3 +65,9 @@ FILES_${PN}-dbg += "${libdir}/NetworkManager/.debug/ \
FILES_${PN}-dev += " ${datadir}/NetworkManager/gdb-cmd "
+FILES_${PN}-tests = "${bindir}/nm-tool \
+ ${bindir}/libnm_glib_test \
+ ${bindir}/nminfotest \
+ ${bindir}/nm-online \
+ ${bindir}/nm-supplicant \
+ ${bindir}/nm-testdevices"
diff --git a/packages/networkmanager/networkmanager_0.6.5.bb b/packages/networkmanager/networkmanager_0.6.5.bb
index 2817124887..9744820abd 100644
--- a/packages/networkmanager/networkmanager_0.6.5.bb
+++ b/packages/networkmanager/networkmanager_0.6.5.bb
@@ -1,10 +1,3 @@
require networkmanager.inc
-PR = "r2"
-
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.6/NetworkManager-${PV}.tar.bz2 \
- file://NetworkManager \
- file://99_networkmanager"
-
-S = "${WORKDIR}/NetworkManager-${PV}/"
-
+PR = "r5"
diff --git a/packages/networkmanager/networkmanager_0.6.6.bb b/packages/networkmanager/networkmanager_0.6.6.bb
new file mode 100644
index 0000000000..03a573928a
--- /dev/null
+++ b/packages/networkmanager/networkmanager_0.6.6.bb
@@ -0,0 +1,19 @@
+require networkmanager.inc
+
+PR = "r7"
+
+# Release candidate for 0.6.6, Hosted in dcbw's redhat space.
+SRC_URI = "http://people.redhat.com/dcbw/NetworkManager/0.6.6/NetworkManager-0.6.6.tar.gz \
+ file://25NetworkManager \
+ file://99_networkmanager \
+ file://fix_seg_fault.patch;patch=1 \
+ "
+
+SRC_URI_append_mamona = " \
+ file://avoid_frequent_scan.patch;patch=1 \
+ file://adding_no_scan_by_default.patch;patch=1 \
+ "
+
+SRC_URI_append_nokia770 = " file://cx3110_bring_up.patch;patch=1 "
+SRC_URI_append_nokia800 = " file://cx3110_bring_up.patch;patch=1 "
+SRC_URI_append_nokia810 = " file://cx3110_bring_up.patch;patch=1 "
diff --git a/packages/networkmanager/networkmanager_0.7.bb b/packages/networkmanager/networkmanager_0.7.bb
new file mode 100644
index 0000000000..9c19be9139
--- /dev/null
+++ b/packages/networkmanager/networkmanager_0.7.bb
@@ -0,0 +1,25 @@
+require networkmanager-0.7.inc
+
+PV = "0.7"
+PR = "r10"
+
+SRC_URI += "http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.7/NetworkManager-0.7.0.tar.bz2 \
+ file://remove-gtk-doc-make.patch;patch=1 \
+ file://008-BACKEND-debian-fallback-to-generic-loopback.loom.patch;patch=1 \
+ file://02-dbus_access_network_manager.patch;patch=1 \
+ file://add_probe_for_v250_modems.patch;patch=1 \
+ file://cx3110_bring_up.patch;patch=1 \
+ file://nm-system-settings.conf \
+ file://NetworkManager \
+"
+
+SRC_URI_append_mamona += " file://disable_wireless_by_default.patch;patch=1 "
+
+S = "${WORKDIR}/NetworkManager-0.7.0"
+
+do_install_append () {
+ install -d ${D}/etc/NetworkManager/
+ install -m 0644 ${WORKDIR}/nm-system-settings.conf ${D}/etc/NetworkManager/
+ install -m 0755 ${WORKDIR}/NetworkManager ${D}/etc/init.d
+}
+
diff --git a/packages/networkmanager/networkmanager_0.7olpc.bb b/packages/networkmanager/networkmanager_0.7olpc.bb
new file mode 100644
index 0000000000..230360168d
--- /dev/null
+++ b/packages/networkmanager/networkmanager_0.7olpc.bb
@@ -0,0 +1,11 @@
+require networkmanager-pre0.7.inc
+
+PR = "r2"
+PV = "0.7olpc+git"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI += "git://dev.laptop.org/users/sjoerd/NetworkManager.git;protocol=git;branch=olpc-patches;tag=f1fa6c27710196b7327402c59b2c55d920a12bb0 \
+ file://define_kernel_types_for_old_linux_headers_and_warn_functions_from_glib_2_16.patch;patch=1 \
+ "
+S = "${WORKDIR}/git"
diff --git a/packages/networkmanager/networkmanager_svn.bb b/packages/networkmanager/networkmanager_svn.bb
index e6bd318063..4045b817de 100644
--- a/packages/networkmanager/networkmanager_svn.bb
+++ b/packages/networkmanager/networkmanager_svn.bb
@@ -1,57 +1,13 @@
-DESCRIPTION = "NetworkManager"
-SECTION = "net/misc"
-LICENSE = "GPL"
-HOMEPAGE = "http://www.gnome.org"
-PRIORITY = "optional"
-DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools ppp"
-RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client"
+require networkmanager-pre0.7.inc
PV = "0.7+svnr${SRCREV}"
-PR = "r5"
+PR = "r1"
-SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \
- file://no-restarts.diff;patch=1;pnum=0 \
- file://25NetworkManager \
- file://99_networkmanager"
+DEFAULT_PREFERENCE = "-1"
-S = "${WORKDIR}/trunk"
-
-EXTRA_OECONF = " \
- --with-distro=debian \
- --with-ip=/sbin/ip.iproute2"
-
-inherit autotools pkgconfig
-
-do_stage () {
- autotools_stage_all
-}
-
-do_install_append () {
- install -d ${D}/etc/default/volatiles
- install -m 0644 ${WORKDIR}/99_networkmanager ${D}/etc/default/volatiles
- install -d ${D}/etc/dbus-1/event.d
- install -m 0755 ${WORKDIR}/25NetworkManager ${D}/etc/dbus-1/event.d
- sed -i s,/sbin/ip,/sbin/ip.iproute2, ${D}/etc/init.d/NetworkManager
-}
-
-pkg_postinst () {
- if [ "x$D" != "x" ]; then
- exit 1
- fi
- /etc/init.d/populate-volatile.sh update
-}
-
-PACKAGES =+ "libnmutil libnmglib libnmglib-vpn"
-
-FILES_libnmutil += "${libdir}/libnm-util.so.*"
-FILES_libnmglib += "${libdir}/libnm_glib.so.*"
-FILES_libnmglib-vpn += "${libdir}/libnm_glib_vpn.so.*"
-
-FILES_${PN} += " \
- ${libexecdir} \
- ${libdir}/pppd/*/nm-pppd-plugin.so \
- ${libdir}/NetworkManager/*.so"
-FILES_${PN}-dbg += "${libdir}/NetworkManager/.debug/ \
- ${libdir}/pppd/*/.debug/ "
-FILES_${PN}-dev += " ${datadir}/NetworkManager/gdb-cmd "
+SRC_URI += "svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \
+ file://define_kernel_types_for_old_linux_headers.patch;patch=1 \
+ file://no-restarts.diff;patch=1;pnum=0 \
+ "
+S = "${WORKDIR}/trunk"