summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/connman')
-rw-r--r--meta/recipes-connectivity/connman/connman-conf.bb24
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup16
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config9
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/0001-Removed-icon-from-connman-gnome-about-applet.patch35
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-01.pngbin0 -> 490 bytes
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-02.pngbin0 -> 496 bytes
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-03.pngbin0 -> 492 bytes
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-04.pngbin0 -> 470 bytes
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-05.pngbin0 -> 419 bytes
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/null_check_for_ipv4_config.patch36
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome_0.7.bb27
-rw-r--r--meta/recipes-connectivity/connman/connman.inc215
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch35
-rw-r--r--meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch21
-rw-r--r--meta/recipes-connectivity/connman/connman/connman83
-rw-r--r--meta/recipes-connectivity/connman/connman_1.22.bb11
16 files changed, 512 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
new file mode 100644
index 0000000..af72640
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Connman config to setup wired interface on qemu machines"
2DESCRIPTION = "This is the ConnMan configuration to set up a Wired \
3network interface for a qemu machine."
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
6
7SRC_URI_append_qemuall = "file://wired.config \
8 file://wired-setup \
9 "
10PR = "r2"
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14FILES_${PN} = "${localstatedir}/* ${libdir}/*"
15
16do_install() {
17 #Configure Wired network interface in case of qemu* machines
18 if test -e ${WORKDIR}/wired.config && test -e ${WORKDIR}/wired-setup; then
19 install -d ${D}${localstatedir}/lib/connman
20 install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman
21 install -d ${D}${libdir}/connman
22 install -m 0755 ${WORKDIR}/wired-setup ${D}${libdir}/connman
23 fi
24}
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup
new file mode 100644
index 0000000..c46899e
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3CONFIGF=/var/lib/connman/wired.config
4
5# Extract wired network config from /proc/cmdline
6NET_CONF=`cat /proc/cmdline |sed -ne 's/^.*ip=\([^ ]*\):\([^ ]*\):\([^ ]*\):\([^ ]*\).*$/\1\/\4\/\3/p'`
7
8# Check if eth0 is already set via kernel cmdline
9if [ "x$NET_CONF" = "x" ]; then
10 # Wired interface is not configured via kernel cmdline
11 # Remove connman config file template
12 rm -f ${CONFIGF}
13else
14 # Setup a connman config accordingly
15 sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF}
16fi
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config
new file mode 100644
index 0000000..42998ce
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config
@@ -0,0 +1,9 @@
1[global]
2Name = Wired
3Description = Wired network configuration
4
5[service_ethernet]
6Type = ethernet
7IPv4 =
8MAC = 52:54:00:12:34:56
9Nameservers = 8.8.8.8
diff --git a/meta/recipes-connectivity/connman/connman-gnome/0001-Removed-icon-from-connman-gnome-about-applet.patch b/meta/recipes-connectivity/connman/connman-gnome/0001-Removed-icon-from-connman-gnome-about-applet.patch
new file mode 100644
index 0000000..4f36b95
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/0001-Removed-icon-from-connman-gnome-about-applet.patch
@@ -0,0 +1,35 @@
1From 5907a23ad2f49702960a33f9e2039552673eabc7 Mon Sep 17 00:00:00 2001
2From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
3Date: Mon, 17 Dec 2012 14:01:18 +0200
4Subject: [PATCH] Removed icon from connman-gnome "about" applet
5
6The connman-gnome "about" applet showed a picture that
7can not be displayed. There is no designated picture
8in connman-gnome to be used in the about section, so
9it was removed.
10
11[OE-Core #2509]
12
13Upstream-Status : Pending
14
15Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
16---
17 applet/main.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/applet/main.c b/applet/main.c
21index f12d371..c7b3c7f 100644
22--- a/applet/main.c
23+++ b/applet/main.c
24@@ -212,7 +212,7 @@ static void about_callback(GtkWidget *item, gpointer user_data)
25 "comments", _("A connection manager for the GNOME desktop"),
26 "authors", authors,
27 "translator-credits", _("translator-credits"),
28- "logo-icon-name", "network-wireless", NULL);
29+ NULL);
30 }
31
32 static void settings_callback(GtkWidget *item, gpointer user_data)
33--
341.7.9.5
35
diff --git a/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-01.png b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-01.png
new file mode 100644
index 0000000..33247c1
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-01.png
Binary files differ
diff --git a/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-02.png b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-02.png
new file mode 100644
index 0000000..a94fb95
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-02.png
Binary files differ
diff --git a/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-03.png b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-03.png
new file mode 100644
index 0000000..b5eb405
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-03.png
Binary files differ
diff --git a/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-04.png b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-04.png
new file mode 100644
index 0000000..be54419
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-04.png
Binary files differ
diff --git a/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-05.png b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-05.png
new file mode 100644
index 0000000..1c40ac9
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/images/connman-signal-05.png
Binary files differ
diff --git a/meta/recipes-connectivity/connman/connman-gnome/null_check_for_ipv4_config.patch b/meta/recipes-connectivity/connman/connman-gnome/null_check_for_ipv4_config.patch
new file mode 100644
index 0000000..0421cda
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/null_check_for_ipv4_config.patch
@@ -0,0 +1,36 @@
1In networks that don't have a DHCP server configured, ipv4 address
2allocation fails and the ipv4 structure doesn't get populated. When
3the GUI is trying to read the ipv4_config.method field to see whether
4it contains "dhcp" string, a segmentation fault is generated.
5
6Ethernet manual configuration behavior remains unchanged after this fix.
7
8Upstream-Status: Pending
9
10Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
11Index: git/properties/ethernet.c
12===================================================================
13--- git.orig/properties/ethernet.c
14+++ git/properties/ethernet.c
15@@ -194,7 +194,7 @@ void add_ethernet_service(GtkWidget *mai
16
17 data->button = button;
18
19- if (g_str_equal(ipv4_config.method, "dhcp") == TRUE)
20+ if (!ipv4_config.method || g_str_equal(ipv4_config.method, "dhcp") == TRUE)
21 update_ethernet_ipv4(data, CONNMAN_POLICY_DHCP);
22 else
23 update_ethernet_ipv4(data, CONNMAN_POLICY_MANUAL);
24Index: git/properties/wifi.c
25===================================================================
26--- git.orig/properties/wifi.c
27+++ git/properties/wifi.c
28@@ -230,7 +230,7 @@ static void wifi_ipconfig(GtkWidget *tab
29
30 data->ipv4_config = ipv4_config;
31
32- if (g_str_equal(ipv4_config.method, "dhcp") == TRUE)
33+ if (!ipv4_config.method || g_str_equal(ipv4_config.method, "dhcp") == TRUE)
34 update_wifi_ipv4(data, CONNMAN_POLICY_DHCP);
35 else
36 update_wifi_ipv4(data, CONNMAN_POLICY_MANUAL);
diff --git a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
new file mode 100644
index 0000000..f121ea3
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
@@ -0,0 +1,27 @@
1SUMMARY = "GTK+ frontend for the ConnMan network connection manager"
2HOMEPAGE = "http://connman.net/"
3SECTION = "libs/network"
4LICENSE = "GPLv2 & LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
6 file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \
7 file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a"
8
9DEPENDS = "gtk+ dbus-glib intltool-native"
10
11# 0.7 tag
12SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
13SRC_URI = "git://github.com/connectivity/connman-gnome.git \
14 file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
15 file://null_check_for_ipv4_config.patch \
16 file://images/* \
17 "
18
19S = "${WORKDIR}/git"
20
21inherit autotools-brokensep gtk-icon-cache
22
23RDEPENDS_${PN} = "connman"
24
25do_install_append() {
26 install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/
27}
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
new file mode 100644
index 0000000..b3147c9
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -0,0 +1,215 @@
1SUMMARY = "A daemon for managing internet connections within embedded devices"
2DESCRIPTION = "The ConnMan project provides a daemon for managing \
3internet connections within embedded devices running the Linux \
4operating system. The Connection Manager is designed to be slim and \
5to use as few resources as possible, so it can be easily integrated. \
6It is a fully modular system that can be extended, through plug-ins, \
7to support all kinds of wired or wireless technologies. Also, \
8configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "https://01.org/jira/browse/CM"
12LICENSE = "GPLv2"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=d6a1ac98a6791c5294e8a7f176ecd66d"
15
16DEPENDS = "dbus glib-2.0 ppp iptables"
17
18INC_PR = "r20"
19
20EXTRA_OECONF += "\
21 ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
22 ac_cv_path_PPPD=${sbindir}/pppd \
23 --enable-debug \
24 --enable-loopback \
25 --enable-ethernet \
26 --enable-tools \
27 --enable-test \
28 --disable-polkit \
29 --enable-client \
30 ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
31"
32
33PACKAGECONFIG ??= "wispr \
34 ${@base_contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
35 ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
36 ${@base_contains('DISTRO_FEATURES', '3g','3g', '', d)} \
37"
38
39# If you want ConnMan to support VPN, add following statement into
40# local.conf or distro config
41# PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp"
42
43PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant"
44PACKAGECONFIG[bluetooth] = "--enable-bluetooth, --disable-bluetooth, bluez4"
45PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono"
46PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
47PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
48PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
49PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd"
50PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
51# WISPr support for logging into hotspots, requires TLS
52PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
53
54INITSCRIPT_NAME = "connman"
55INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
56
57python __anonymous () {
58 systemd_packages = "${PN}"
59 pkgconfig = d.getVar('PACKAGECONFIG', True)
60 if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
61 systemd_packages += " ${PN}-vpn"
62 d.setVar('SYSTEMD_PACKAGES', systemd_packages)
63}
64
65SYSTEMD_SERVICE_${PN} = "connman.service"
66SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
67SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
68
69inherit autotools-brokensep pkgconfig systemd update-rc.d
70
71do_configure_append () {
72 sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service
73}
74
75# This allows *everyone* to access ConnMan over DBus, without any access
76# control. Really the at_console flag should work, which would mean that
77# both this and the xuser patch can be dropped.
78do_compile_append() {
79 sed -i -e s:deny:allow:g src/connman-dbus.conf
80 sed -i -e s:deny:allow:g vpn/vpn-dbus.conf
81}
82
83do_install_append() {
84 if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
85 install -d ${D}${sysconfdir}/init.d
86 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
87 sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman
88 fi
89
90 install -d ${D}${bindir}
91 install -m 0755 ${S}/tools/*-test ${D}${bindir}
92 if [ -e ${S}/tools/wispr ]; then
93 install -m 0755 ${S}/tools/wispr ${D}${bindir}
94 fi
95 install -m 0755 ${B}/client/connmanctl ${D}${bindir}
96
97 # We don't need to package an empty directory
98 rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts
99
100 # Automake 1.12 won't install empty directories, but we need the
101 # plugins directory to be present for ownership
102 mkdir -p ${D}${libdir}/connman/plugins
103}
104
105# These used to be plugins, but now they are core
106RPROVIDES_${PN} = "\
107 connman-plugin-loopback \
108 connman-plugin-ethernet \
109 ${@base_contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
110 ${@base_contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \
111 ${@base_contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
112 "
113
114RDEPENDS_${PN} = "\
115 dbus \
116 ${@base_contains('PACKAGECONFIG', 'bluetooth', 'bluez4', '', d)} \
117 ${@base_contains('PACKAGECONFIG', 'wifi','wpa-supplicant', '', d)} \
118 ${@base_contains('PACKAGECONFIG', '3g','ofono', '', d)} \
119 xuser-account \
120 "
121
122PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
123
124def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
125 plugintype = pkg.split( '-' )[-1]
126 if plugintype in depmap:
127 rdepends = map(lambda x: multilib_prefix + x, \
128 depmap[plugintype].split())
129 d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends))
130 if add_insane_skip:
131 d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so")
132
133python populate_packages_prepend() {
134 depmap = dict(pppd="ppp")
135 multilib_prefix = (d.getVar("MLPREFIX", True) or "")
136
137 hook = lambda file,pkg,x,y,z: \
138 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
139 plugin_dir = d.expand('${libdir}/connman/plugins/')
140 plugin_name = d.expand('${PN}-plugin-%s')
141 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \
142 '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
143
144 hook = lambda file,pkg,x,y,z: \
145 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
146 plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
147 plugin_name = d.expand('${PN}-plugin-vpn-%s')
148 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \
149 '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
150}
151
152PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
153
154FILES_${PN}-tools = "${bindir}/wispr"
155
156FILES_${PN}-tests = "${bindir}/*-test ${libdir}/${BPN}/test/*"
157RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient"
158
159FILES_${PN}-client = "${bindir}/connmanctl"
160
161FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
162 ${libdir}/connman/plugins \
163 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
164 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
165 ${datadir}/dbus-1/system-services/*"
166
167FILES_${PN}-dbg += "${libdir}/connman/*/.debug"
168
169FILES_${PN}-dev += "${libdir}/connman/*/*.la"
170
171PACKAGES =+ "${PN}-vpn"
172
173SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
174DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \
175managing VPN connections within embedded devices running the Linux \
176operating system. The connman-vpnd handles all the VPN connections \
177and starts/stops VPN client processes when necessary. The connman-vpnd \
178provides a DBus API for managing VPN connections. All the different \
179VPN technogies are implemented using plug-ins."
180FILES_${PN}-vpn += "${sbindir}/connman-vpnd \
181 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
182 ${datadir}/dbus-1/system-services/net.connman.vpn.service \
183 ${systemd_unitdir}/system/connman-vpn.service"
184
185SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
186DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
187to create a VPN connection to OpenVPN server."
188FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
189 ${libdir}/connman/plugins-vpn/openvpn.so"
190RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn"
191RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
192
193SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
194DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
195to create a VPN connection to Cisco3000 VPN Concentrator."
196FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
197 ${libdir}/connman/plugins-vpn/vpnc.so"
198RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn"
199RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
200
201SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
202DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
203to create a VPN connection to L2TP server."
204FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
205 ${libdir}/connman/plugins-vpn/l2tp.so"
206RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn"
207RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
208
209SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
210DESCRIPTION_${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
211to create a VPN connection to PPTP server."
212FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
213 ${libdir}/connman/plugins-vpn/pptp.so"
214RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn"
215RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"
diff --git a/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch b/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch
new file mode 100644
index 0000000..e6f03e6
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch
@@ -0,0 +1,35 @@
1From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 7 Apr 2012 18:52:12 -0700
4Subject: [PATCH] plugin.h: Change visibility to default for debug symbols
5
6gold refuses to link in undefined weak symbols which
7have hidden visibility
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11
12Upstream-Status: Pending
13---
14 include/plugin.h | 4 ++--
15 1 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/include/plugin.h b/include/plugin.h
18index 692a4e5..a9361c3 100644
19--- a/include/plugin.h
20+++ b/include/plugin.h
21@@ -89,9 +89,9 @@ struct connman_plugin_desc {
22 #else
23 #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
24 extern struct connman_debug_desc __start___debug[] \
25- __attribute__ ((weak, visibility("hidden"))); \
26+ __attribute__ ((weak, visibility("default"))); \
27 extern struct connman_debug_desc __stop___debug[] \
28- __attribute__ ((weak, visibility("hidden"))); \
29+ __attribute__ ((weak, visibility("default"))); \
30 extern struct connman_plugin_desc connman_plugin_desc \
31 __attribute__ ((visibility("default"))); \
32 struct connman_plugin_desc connman_plugin_desc = { \
33--
341.7.5.4
35
diff --git a/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch b/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch
new file mode 100644
index 0000000..707b3ca
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch
@@ -0,0 +1,21 @@
1Because Poky doesn't support at_console we need to special-case the session
2user.
3
4Upstream-Status: Inappropriate [configuration]
5
6Signed-off-by: Ross Burton <ross.burton@intel.com>
7
8diff --git a/src/connman-dbus.conf b/src/connman-dbus.conf
9index 98a773e..466809c 100644
10--- a/src/connman-dbus.conf
11+++ b/src/connman-dbus.conf
12@@ -8,6 +8,9 @@
13 <allow send_interface="net.connman.Counter"/>
14 <allow send_interface="net.connman.Notification"/>
15 </policy>
16+ <policy user="xuser">
17+ <allow send_destination="net.connman"/>
18+ </policy>
19 <policy at_console="true">
20 <allow send_destination="net.connman"/>
21 </policy>
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
new file mode 100644
index 0000000..bf7a94a
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/connman
@@ -0,0 +1,83 @@
1#!/bin/sh
2
3DAEMON=/usr/sbin/connmand
4PIDFILE=/var/run/connmand.pid
5DESC="Connection Manager"
6
7if [ -f /etc/default/connman ] ; then
8 . /etc/default/connman
9fi
10
11set -e
12
13nfsroot=0
14
15exec 9<&0 < /proc/mounts
16while read dev mtpt fstype rest; do
17 if test $mtpt = "/" ; then
18 case $fstype in
19 nfs | nfs4)
20 nfsroot=1
21 break
22 ;;
23 *)
24 ;;
25 esac
26 fi
27done
28
29do_start() {
30 EXTRA_PARAM=""
31 if test $nfsroot -eq 1 ; then
32 NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'`
33 NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'`
34
35 if [ ! -z "$NET_ADDR" ]; then
36 if [ "$NET_ADDR" = dhcp ]; then
37 ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"`
38 if [ ! -z "$ethn" ]; then
39 EXTRA_PARAM="-I $ethn"
40 fi
41 else
42 for i in $NET_DEVS; do
43 ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'`
44 if [ "$NET_ADDR" = "$ADDR" ]; then
45 EXTRA_PARAM="-I $i"
46 break
47 fi
48 done
49 fi
50 fi
51 fi
52 if [ -f @LIBDIR@/connman/wired-setup ] ; then
53 . @LIBDIR@/connman/wired-setup
54 fi
55 $DAEMON $EXTRA_PARAM
56}
57
58do_stop() {
59 start-stop-daemon --stop --name connmand --quiet
60}
61
62case "$1" in
63 start)
64 echo "Starting $DESC"
65 do_start
66 ;;
67 stop)
68 echo "Stopping $DESC"
69 do_stop
70 ;;
71 restart|force-reload)
72 echo "Restarting $DESC"
73 do_stop
74 sleep 1
75 do_start
76 ;;
77 *)
78 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
79 exit 1
80 ;;
81esac
82
83exit 0
diff --git a/meta/recipes-connectivity/connman/connman_1.22.bb b/meta/recipes-connectivity/connman/connman_1.22.bb
new file mode 100644
index 0000000..4bd986f
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman_1.22.bb
@@ -0,0 +1,11 @@
1require connman.inc
2
3SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
4 file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
5 file://add_xuser_dbus_permission.patch \
6 file://connman \
7 "
8SRC_URI[md5sum] = "4f45ab2035d1028a287d14427ce61774"
9SRC_URI[sha256sum] = "64d9a8ab83c99943514bb64984142fef409177a93c64e1aace84eaf13c7bddde"
10
11RRECOMMENDS_${PN} = "connman-conf"