diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:38:32 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:50:20 +0100 |
commit | e2e6f6fe07049f33cb6348780fa975162752e421 (patch) | |
tree | b1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-connectivity/connman | |
download | poky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz |
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/connman')
16 files changed, 518 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 0000000000..af726401e2 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-conf.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Connman config to setup wired interface on qemu machines" | ||
2 | DESCRIPTION = "This is the ConnMan configuration to set up a Wired \ | ||
3 | network interface for a qemu machine." | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
6 | |||
7 | SRC_URI_append_qemuall = "file://wired.config \ | ||
8 | file://wired-setup \ | ||
9 | " | ||
10 | PR = "r2" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | FILES_${PN} = "${localstatedir}/* ${libdir}/*" | ||
15 | |||
16 | do_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 0000000000..c46899ef32 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | CONFIGF=/var/lib/connman/wired.config | ||
4 | |||
5 | # Extract wired network config from /proc/cmdline | ||
6 | NET_CONF=`cat /proc/cmdline |sed -ne 's/^.*ip=\([^ ]*\):\([^ ]*\):\([^ ]*\):\([^ ]*\).*$/\1\/\4\/\3/p'` | ||
7 | |||
8 | # Check if eth0 is already set via kernel cmdline | ||
9 | if [ "x$NET_CONF" = "x" ]; then | ||
10 | # Wired interface is not configured via kernel cmdline | ||
11 | # Remove connman config file template | ||
12 | rm -f ${CONFIGF} | ||
13 | else | ||
14 | # Setup a connman config accordingly | ||
15 | sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF} | ||
16 | fi | ||
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 0000000000..42998ce897 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config | |||
@@ -0,0 +1,9 @@ | |||
1 | [global] | ||
2 | Name = Wired | ||
3 | Description = Wired network configuration | ||
4 | |||
5 | [service_ethernet] | ||
6 | Type = ethernet | ||
7 | IPv4 = | ||
8 | MAC = 52:54:00:12:34:56 | ||
9 | Nameservers = 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 0000000000..4f36b95601 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-gnome/0001-Removed-icon-from-connman-gnome-about-applet.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 5907a23ad2f49702960a33f9e2039552673eabc7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Dinu <andrei.adrianx.dinu@intel.com> | ||
3 | Date: Mon, 17 Dec 2012 14:01:18 +0200 | ||
4 | Subject: [PATCH] Removed icon from connman-gnome "about" applet | ||
5 | |||
6 | The connman-gnome "about" applet showed a picture that | ||
7 | can not be displayed. There is no designated picture | ||
8 | in connman-gnome to be used in the about section, so | ||
9 | it was removed. | ||
10 | |||
11 | [OE-Core #2509] | ||
12 | |||
13 | Upstream-Status : Pending | ||
14 | |||
15 | Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> | ||
16 | --- | ||
17 | applet/main.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/applet/main.c b/applet/main.c | ||
21 | index 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 | -- | ||
34 | 1.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 0000000000..33247c1e2d --- /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 0000000000..a94fb952ff --- /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 0000000000..b5eb405a90 --- /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 0000000000..be54419fa7 --- /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 0000000000..1c40ac9a10 --- /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 0000000000..0421cda0b2 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-gnome/null_check_for_ipv4_config.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | In networks that don't have a DHCP server configured, ipv4 address | ||
2 | allocation fails and the ipv4 structure doesn't get populated. When | ||
3 | the GUI is trying to read the ipv4_config.method field to see whether | ||
4 | it contains "dhcp" string, a segmentation fault is generated. | ||
5 | |||
6 | Ethernet manual configuration behavior remains unchanged after this fix. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com> | ||
11 | Index: 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); | ||
24 | Index: 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 0000000000..2d422b2b2b --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | DESCRIPTION = "gtk frontend for connman" | ||
2 | HOMEPAGE = "http://connman.net/" | ||
3 | SECTION = "libs/network" | ||
4 | LICENSE = "GPLv2 & LGPLv2.1" | ||
5 | LIC_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 | |||
9 | DEPENDS = "gtk+ dbus-glib intltool-native" | ||
10 | |||
11 | # 0.7 tag | ||
12 | SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143" | ||
13 | SRC_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 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit autotools gtk-icon-cache | ||
22 | |||
23 | RDEPENDS_${PN} = "connman" | ||
24 | |||
25 | do_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 0000000000..37ce3ec7bb --- /dev/null +++ b/meta/recipes-connectivity/connman/connman.inc | |||
@@ -0,0 +1,218 @@ | |||
1 | SUMMARY = "A daemon for managing internet connections within embedded devices" | ||
2 | DESCRIPTION = "The ConnMan project provides a daemon for managing \ | ||
3 | internet connections within embedded devices running the Linux \ | ||
4 | operating system. The Connection Manager is designed to be slim and \ | ||
5 | to use as few resources as possible, so it can be easily integrated. \ | ||
6 | It is a fully modular system that can be extended, through plug-ins, \ | ||
7 | to support all kinds of wired or wireless technologies. Also, \ | ||
8 | configuration methods, like DHCP and domain name resolving, are \ | ||
9 | implemented using plug-ins." | ||
10 | HOMEPAGE = "http://connman.net/" | ||
11 | BUGTRACKER = "http://bugs.meego.com/buglist.cgi?quicksearch=connman" | ||
12 | LICENSE = "GPLv2" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | ||
14 | file://src/main.c;beginline=1;endline=20;md5=d6a1ac98a6791c5294e8a7f176ecd66d" | ||
15 | |||
16 | DEPENDS = "dbus glib-2.0 ppp iptables" | ||
17 | |||
18 | INC_PR = "r20" | ||
19 | |||
20 | EXTRA_OECONF += "\ | ||
21 | ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ | ||
22 | ac_cv_path_PPPD=${sbindir}/pppd \ | ||
23 | --enable-debug \ | ||
24 | --enable-threads \ | ||
25 | --enable-loopback \ | ||
26 | --enable-ethernet \ | ||
27 | --enable-tools \ | ||
28 | --enable-test \ | ||
29 | --disable-polkit \ | ||
30 | --enable-client \ | ||
31 | --enable-fake \ | ||
32 | ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \ | ||
33 | " | ||
34 | |||
35 | PACKAGECONFIG ??= "wispr \ | ||
36 | ${@base_contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \ | ||
37 | ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \ | ||
38 | ${@base_contains('DISTRO_FEATURES', '3g','3g', '', d)} \ | ||
39 | " | ||
40 | |||
41 | # If you want ConnMan to support VPN, add following statement into | ||
42 | # local.conf or distro config | ||
43 | # PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp" | ||
44 | |||
45 | PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant" | ||
46 | PACKAGECONFIG[bluetooth] = "--enable-bluetooth, --disable-bluetooth, bluez4" | ||
47 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono" | ||
48 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," | ||
49 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" | ||
50 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" | ||
51 | PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" | ||
52 | PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" | ||
53 | # WISPr support for logging into hotspots, requires TLS | ||
54 | PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," | ||
55 | |||
56 | INITSCRIPT_NAME = "connman" | ||
57 | INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." | ||
58 | |||
59 | python __anonymous () { | ||
60 | systemd_packages = "${PN}" | ||
61 | pkgconfig = d.getVar('PACKAGECONFIG', True) | ||
62 | if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): | ||
63 | systemd_packages += " ${PN}-vpn" | ||
64 | d.setVar('SYSTEMD_PACKAGES', systemd_packages) | ||
65 | } | ||
66 | |||
67 | SYSTEMD_SERVICE_${PN} = "connman.service" | ||
68 | SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" | ||
69 | SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup" | ||
70 | |||
71 | inherit autotools gtk-doc pkgconfig systemd update-rc.d | ||
72 | |||
73 | do_configure_append () { | ||
74 | sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service | ||
75 | |||
76 | } | ||
77 | |||
78 | # This allows *everyone* to access ConnMan over DBus, without any access | ||
79 | # control. Really the at_console flag should work, which would mean that | ||
80 | # both this and the xuser patch can be dropped. | ||
81 | do_compile_append() { | ||
82 | sed -i -e s:deny:allow:g src/connman-dbus.conf | ||
83 | sed -i -e s:deny:allow:g vpn/vpn-dbus.conf | ||
84 | } | ||
85 | |||
86 | do_install_append() { | ||
87 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
88 | install -d ${D}${sysconfdir}/init.d | ||
89 | install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman | ||
90 | sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman | ||
91 | fi | ||
92 | |||
93 | install -d ${D}${bindir} | ||
94 | install -m 0755 ${S}/tools/*-test ${D}${bindir} | ||
95 | if [ -e ${S}/tools/wispr ]; then | ||
96 | install -m 0755 ${S}/tools/wispr ${D}${bindir} | ||
97 | fi | ||
98 | install -m 0755 ${B}/client/connmanctl ${D}${bindir} | ||
99 | |||
100 | # We don't need to package an empty directory | ||
101 | rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts | ||
102 | |||
103 | # Automake 1.12 won't install empty directories, but we need the | ||
104 | # plugins directory to be present for ownership | ||
105 | mkdir -p ${D}${libdir}/connman/plugins | ||
106 | } | ||
107 | |||
108 | # These used to be plugins, but now they are core | ||
109 | RPROVIDES_${PN} = "\ | ||
110 | connman-plugin-loopback \ | ||
111 | connman-plugin-ethernet \ | ||
112 | ${@base_contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ | ||
113 | ${@base_contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \ | ||
114 | ${@base_contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ | ||
115 | " | ||
116 | |||
117 | RDEPENDS_${PN} = "\ | ||
118 | dbus \ | ||
119 | ${@base_contains('PACKAGECONFIG', 'bluetooth', 'bluez4', '', d)} \ | ||
120 | ${@base_contains('PACKAGECONFIG', 'wifi','wpa-supplicant', '', d)} \ | ||
121 | ${@base_contains('PACKAGECONFIG', '3g','ofono', '', d)} \ | ||
122 | xuser-account \ | ||
123 | " | ||
124 | |||
125 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*" | ||
126 | |||
127 | def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): | ||
128 | plugintype = pkg.split( '-' )[-1] | ||
129 | if plugintype in depmap: | ||
130 | rdepends = map(lambda x: multilib_prefix + x, \ | ||
131 | depmap[plugintype].split()) | ||
132 | d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends)) | ||
133 | if add_insane_skip: | ||
134 | d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so") | ||
135 | |||
136 | python populate_packages_prepend() { | ||
137 | depmap = dict(pppd="ppp") | ||
138 | multilib_prefix = (d.getVar("MLPREFIX", True) or "") | ||
139 | |||
140 | hook = lambda file,pkg,x,y,z: \ | ||
141 | add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) | ||
142 | plugin_dir = d.expand('${libdir}/connman/plugins/') | ||
143 | plugin_name = d.expand('${PN}-plugin-%s') | ||
144 | do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \ | ||
145 | '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) | ||
146 | |||
147 | hook = lambda file,pkg,x,y,z: \ | ||
148 | add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) | ||
149 | plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') | ||
150 | plugin_name = d.expand('${PN}-plugin-vpn-%s') | ||
151 | do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \ | ||
152 | '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) | ||
153 | } | ||
154 | |||
155 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" | ||
156 | |||
157 | FILES_${PN}-tools = "${bindir}/wispr" | ||
158 | |||
159 | FILES_${PN}-tests = "${bindir}/*-test ${libdir}/${BPN}/test/*" | ||
160 | RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient" | ||
161 | |||
162 | FILES_${PN}-client = "${bindir}/connmanctl" | ||
163 | |||
164 | FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ | ||
165 | ${libdir}/connman/plugins \ | ||
166 | ${sysconfdir} ${sharedstatedir} ${localstatedir} \ | ||
167 | ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ | ||
168 | ${datadir}/dbus-1/system-services/*" | ||
169 | |||
170 | FILES_${PN}-dbg += "${libdir}/connman/*/.debug" | ||
171 | |||
172 | FILES_${PN}-dev += "${libdir}/connman/*/*.la" | ||
173 | |||
174 | PACKAGES =+ "${PN}-vpn" | ||
175 | |||
176 | SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices" | ||
177 | DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \ | ||
178 | managing VPN connections within embedded devices running the Linux \ | ||
179 | operating system. The connman-vpnd handles all the VPN connections \ | ||
180 | and starts/stops VPN client processes when necessary. The connman-vpnd \ | ||
181 | provides a DBus API for managing VPN connections. All the different \ | ||
182 | VPN technogies are implemented using plug-ins." | ||
183 | FILES_${PN}-vpn += "${sbindir}/connman-vpnd \ | ||
184 | ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ | ||
185 | ${datadir}/dbus-1/system-services/net.connman.vpn.service \ | ||
186 | ${systemd_unitdir}/system/connman-vpn.service" | ||
187 | |||
188 | SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" | ||
189 | DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ | ||
190 | to create a VPN connection to OpenVPN server." | ||
191 | FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ | ||
192 | ${libdir}/connman/plugins-vpn/openvpn.so" | ||
193 | RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn" | ||
194 | RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" | ||
195 | |||
196 | SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" | ||
197 | DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ | ||
198 | to create a VPN connection to Cisco3000 VPN Concentrator." | ||
199 | FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ | ||
200 | ${libdir}/connman/plugins-vpn/vpnc.so" | ||
201 | RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn" | ||
202 | RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" | ||
203 | |||
204 | SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" | ||
205 | DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ | ||
206 | to create a VPN connection to L2TP server." | ||
207 | FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ | ||
208 | ${libdir}/connman/plugins-vpn/l2tp.so" | ||
209 | RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn" | ||
210 | RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" | ||
211 | |||
212 | SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" | ||
213 | DESCRIPTION_${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ | ||
214 | to create a VPN connection to PPTP server." | ||
215 | FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ | ||
216 | ${libdir}/connman/plugins-vpn/pptp.so" | ||
217 | RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn" | ||
218 | RRECOMMENDS_${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 0000000000..e6f03e632e --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 7 Apr 2012 18:52:12 -0700 | ||
4 | Subject: [PATCH] plugin.h: Change visibility to default for debug symbols | ||
5 | |||
6 | gold refuses to link in undefined weak symbols which | ||
7 | have hidden visibility | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | |||
12 | Upstream-Status: Pending | ||
13 | --- | ||
14 | include/plugin.h | 4 ++-- | ||
15 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/include/plugin.h b/include/plugin.h | ||
18 | index 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 | -- | ||
34 | 1.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 0000000000..707b3cafba --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/add_xuser_dbus_permission.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Because Poky doesn't support at_console we need to special-case the session | ||
2 | user. | ||
3 | |||
4 | Upstream-Status: Inappropriate [configuration] | ||
5 | |||
6 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
7 | |||
8 | diff --git a/src/connman-dbus.conf b/src/connman-dbus.conf | ||
9 | index 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 0000000000..bf7a94a06d --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connman | |||
@@ -0,0 +1,83 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | DAEMON=/usr/sbin/connmand | ||
4 | PIDFILE=/var/run/connmand.pid | ||
5 | DESC="Connection Manager" | ||
6 | |||
7 | if [ -f /etc/default/connman ] ; then | ||
8 | . /etc/default/connman | ||
9 | fi | ||
10 | |||
11 | set -e | ||
12 | |||
13 | nfsroot=0 | ||
14 | |||
15 | exec 9<&0 < /proc/mounts | ||
16 | while 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 | ||
27 | done | ||
28 | |||
29 | do_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 | |||
58 | do_stop() { | ||
59 | start-stop-daemon --stop --name connmand --quiet | ||
60 | } | ||
61 | |||
62 | case "$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 | ;; | ||
81 | esac | ||
82 | |||
83 | exit 0 | ||
diff --git a/meta/recipes-connectivity/connman/connman_1.17.bb b/meta/recipes-connectivity/connman/connman_1.17.bb new file mode 100644 index 0000000000..461157fb4e --- /dev/null +++ b/meta/recipes-connectivity/connman/connman_1.17.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | require connman.inc | ||
2 | |||
3 | SRC_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 | " | ||
8 | |||
9 | SRC_URI[md5sum] = "dd4a13f789de1b69fcddf0cf613f2d5b" | ||
10 | SRC_URI[sha256sum] = "d31aa2e7dc9fa817c93aba973995b63506a8c83f55afe507028f09b580ef0b00" | ||
11 | |||
12 | PR = "${INC_PR}.0" | ||
13 | |||
14 | RRECOMMENDS_${PN} = "connman-conf" | ||