diff options
Diffstat (limited to 'meta/recipes-connectivity/connman')
15 files changed, 261 insertions, 340 deletions
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb index 9a519ec866..854e1f1f29 100644 --- a/meta/recipes-connectivity/connman/connman-conf.bb +++ b/meta/recipes-connectivity/connman/connman-conf.bb | |||
@@ -1,36 +1,20 @@ | |||
1 | SUMMARY = "Connman config to setup wired interface on qemu machines" | 1 | SUMMARY = "Connman config to ignore wired interface on qemu machines" |
2 | DESCRIPTION = "This is the ConnMan configuration to set up a Wired \ | 2 | DESCRIPTION = "This is the ConnMan configuration to avoid touching wired \ |
3 | network interface for a qemu machine." | 3 | network interface inside qemu machines." |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" |
6 | 6 | ||
7 | inherit systemd | 7 | SRC_URI = "file://main.conf \ |
8 | " | ||
8 | 9 | ||
9 | SRC_URI_append_qemuall = " file://wired.config \ | 10 | S = "${UNPACKDIR}" |
10 | file://wired-setup \ | ||
11 | file://wired-connection.service \ | ||
12 | " | ||
13 | PR = "r2" | ||
14 | |||
15 | S = "${WORKDIR}" | ||
16 | 11 | ||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 12 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
18 | 13 | ||
19 | FILES_${PN} = "${localstatedir}/* ${datadir}/*" | 14 | FILES:${PN} = "${sysconfdir}/*" |
20 | 15 | ||
21 | do_install() { | 16 | # Kernel IP-Config is perfectly capable of setting up networking passed in via ip= |
22 | #Configure Wired network interface in case of qemu* machines | 17 | do_install:append:qemuall() { |
23 | if test -e ${WORKDIR}/wired.config && | 18 | mkdir -p ${D}${sysconfdir}/connman |
24 | test -e ${WORKDIR}/wired-setup && | 19 | cp ${S}/main.conf ${D}${sysconfdir}/connman/main.conf |
25 | test -e ${WORKDIR}/wired-connection.service; then | ||
26 | install -d ${D}${localstatedir}/lib/connman | ||
27 | install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman | ||
28 | install -d ${D}${datadir}/connman | ||
29 | install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman | ||
30 | install -d ${D}${systemd_system_unitdir} | ||
31 | install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir} | ||
32 | sed -i -e 's|@SCRIPTDIR@|${datadir}/connman|g' ${D}${systemd_system_unitdir}/wired-connection.service | ||
33 | fi | ||
34 | } | 20 | } |
35 | |||
36 | SYSTEMD_SERVICE_${PN}_qemuall = "wired-connection.service" | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/main.conf b/meta/recipes-connectivity/connman/connman-conf/main.conf new file mode 100644 index 0000000000..3c9dd396f6 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-conf/main.conf | |||
@@ -0,0 +1,2 @@ | |||
1 | [General] | ||
2 | NetworkInterfaceBlacklist = eth,en | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service deleted file mode 100644 index 48adfc08ac..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=Setup a wired interface | ||
3 | Before=connman.service | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=@SCRIPTDIR@/wired-setup | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=network.target | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup deleted file mode 100644 index c46899ef32..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
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 deleted file mode 100644 index 42998ce897..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
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_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb index af986c4eab..8bfc1540b3 100644 --- a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb +++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "GTK+ frontend for the ConnMan network connection manager" | 1 | SUMMARY = "GTK+ frontend for the ConnMan network connection manager" |
2 | HOMEPAGE = "http://connman.net/" | 2 | HOMEPAGE = "http://connman.net/" |
3 | SECTION = "libs/network" | 3 | SECTION = "libs/network" |
4 | LICENSE = "GPLv2 & LGPLv2.1" | 4 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ |
6 | file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \ | 6 | file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \ |
7 | file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a" | 7 | file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a" |
@@ -10,7 +10,7 @@ DEPENDS = "gtk+3 dbus-glib dbus-glib-native intltool-native gettext-native" | |||
10 | 10 | ||
11 | # 0.7 tag | 11 | # 0.7 tag |
12 | SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143" | 12 | SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143" |
13 | SRC_URI = "git://github.com/connectivity/connman-gnome.git \ | 13 | SRC_URI = "git://github.com/connectivity/connman-gnome.git;branch=master;protocol=https \ |
14 | file://0001-Removed-icon-from-connman-gnome-about-applet.patch \ | 14 | file://0001-Removed-icon-from-connman-gnome-about-applet.patch \ |
15 | file://null_check_for_ipv4_config.patch \ | 15 | file://null_check_for_ipv4_config.patch \ |
16 | file://images/ \ | 16 | file://images/ \ |
@@ -18,13 +18,15 @@ SRC_URI = "git://github.com/connectivity/connman-gnome.git \ | |||
18 | file://0001-Port-to-Gtk3.patch \ | 18 | file://0001-Port-to-Gtk3.patch \ |
19 | " | 19 | " |
20 | 20 | ||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | inherit autotools-brokensep gtk-icon-cache pkgconfig features_check | 21 | inherit autotools-brokensep gtk-icon-cache pkgconfig features_check |
24 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | 22 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
25 | 23 | ||
26 | RDEPENDS_${PN} = "connman" | 24 | RDEPENDS:${PN} = "connman" |
27 | 25 | ||
28 | do_install_append() { | 26 | do_install:append() { |
29 | install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/ | 27 | install -m 0644 ${UNPACKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/ |
30 | } | 28 | } |
29 | |||
30 | # http://errors.yoctoproject.org/Errors/Details/766926/ | ||
31 | # connman-client.c:200:15: error: assignment to 'GtkTreeModel *' {aka 'struct _GtkTreeModel *'} from incompatible pointer type 'GtkTreeStore *' {aka 'struct _GtkTreeStore *'} [-Wincompatible-pointer-types] | ||
32 | CFLAGS += "-Wno-error=incompatible-pointer-types" | ||
diff --git a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch deleted file mode 100644 index 8e2e0bd02d..0000000000 --- a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Mon, 12 Jun 2017 16:52:39 +0300 | ||
4 | Subject: [PATCH] connman.service: stop systemd-resolved when we use connman | ||
5 | |||
6 | Stop systemd-resolved service when we use connman as network manager. | ||
7 | |||
8 | Upstream-Status: Inappropriate [configuration] | ||
9 | |||
10 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
11 | --- | ||
12 | src/connman.service.in | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/connman.service.in b/src/connman.service.in | ||
16 | index 9f5c10f..dab48bc 100644 | ||
17 | --- a/src/connman.service.in | ||
18 | +++ b/src/connman.service.in | ||
19 | @@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman | ||
20 | After=dbus.service network-pre.target systemd-sysusers.service | ||
21 | Before=network.target multi-user.target shutdown.target | ||
22 | Wants=network.target | ||
23 | +Conflicts=systemd-resolved.service | ||
24 | |||
25 | [Service] | ||
26 | Type=dbus | ||
27 | -- | ||
28 | 2.4.0 | ||
29 | |||
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 deleted file mode 100644 index e6f03e632e..0000000000 --- a/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
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/0002-resolve-musl-does-not-implement-res_ninit.patch b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch index 942b9c97b6..2c612039ee 100644 --- a/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch +++ b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch | |||
@@ -1,83 +1,85 @@ | |||
1 | From c7734e1547db967eccf242fe4b9e8a30b9ff141c Mon Sep 17 00:00:00 2001 | 1 | From 4e726a5aaa75d60fab6a56bc37dbec48be53ff79 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 6 Apr 2015 23:02:21 -0700 | 3 | Date: Mon, 6 Apr 2015 23:02:21 -0700 |
4 | Subject: [PATCH] resolve: musl does not implement res_ninit | 4 | Subject: [PATCH] gweb/gresolv.c: make use of res_ninit optional and subject to |
5 | __RES | ||
5 | 6 | ||
6 | ported from | 7 | Not all libc implementation have those functions, and the way to determine |
8 | if they do is to check __RES which is explained in resolv.h thusly: | ||
9 | |||
10 | /* | ||
11 | * Revision information. This is the release date in YYYYMMDD format. | ||
12 | * It can change every day so the right thing to do with it is use it | ||
13 | * in preprocessor commands such as "#if (__RES > 19931104)". Do not | ||
14 | * compare for equality; rather, use it to determine whether your resolver | ||
15 | * is new enough to contain a certain feature. | ||
16 | */ | ||
17 | |||
18 | Indeed, it needs to be at least 19991006. | ||
19 | |||
20 | The portion of the patch that implements a fallback is ported from | ||
21 | Alpine Linux: | ||
7 | http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch | 22 | http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch |
8 | 23 | ||
9 | Upstream-Status: Pending | 24 | Upstream-Status: Submitted [to connman@lists.linux.dev,marcel@holtmann.org] |
10 | 25 | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | |||
13 | --- | 27 | --- |
14 | gweb/gresolv.c | 34 +++++++++++++--------------------- | 28 | gweb/gresolv.c | 21 +++++++++++++++++++++ |
15 | 1 file changed, 13 insertions(+), 21 deletions(-) | 29 | 1 file changed, 21 insertions(+) |
16 | 30 | ||
17 | diff --git a/gweb/gresolv.c b/gweb/gresolv.c | 31 | diff --git a/gweb/gresolv.c b/gweb/gresolv.c |
18 | index 38a554e..a9e8740 100644 | 32 | index 8101d71..9f1477c 100644 |
19 | --- a/gweb/gresolv.c | 33 | --- a/gweb/gresolv.c |
20 | +++ b/gweb/gresolv.c | 34 | +++ b/gweb/gresolv.c |
21 | @@ -36,6 +36,7 @@ | 35 | @@ -879,7 +879,9 @@ GResolv *g_resolv_new(int index) |
22 | #include <arpa/inet.h> | ||
23 | #include <arpa/nameser.h> | ||
24 | #include <net/if.h> | ||
25 | +#include <ctype.h> | ||
26 | |||
27 | #include "gresolv.h" | ||
28 | |||
29 | @@ -877,8 +878,6 @@ GResolv *g_resolv_new(int index) | ||
30 | resolv->index = index; | 36 | resolv->index = index; |
31 | resolv->nameserver_list = NULL; | 37 | resolv->nameserver_list = NULL; |
32 | 38 | ||
33 | - res_ninit(&resolv->res); | 39 | +#if (__RES >= 19991006) |
34 | - | 40 | res_ninit(&resolv->res); |
41 | +#endif | ||
42 | |||
35 | return resolv; | 43 | return resolv; |
36 | } | 44 | } |
37 | 45 | @@ -920,7 +922,9 @@ void g_resolv_unref(GResolv *resolv) | |
38 | @@ -918,8 +917,6 @@ void g_resolv_unref(GResolv *resolv) | ||
39 | 46 | ||
40 | flush_nameservers(resolv); | 47 | flush_nameservers(resolv); |
41 | 48 | ||
42 | - res_nclose(&resolv->res); | 49 | +#if (__RES >= 19991006) |
43 | - | 50 | res_nclose(&resolv->res); |
51 | +#endif | ||
52 | |||
44 | g_free(resolv); | 53 | g_free(resolv); |
45 | } | 54 | } |
46 | 55 | @@ -1024,6 +1028,7 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, | |
47 | @@ -1022,24 +1019,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, | ||
48 | debug(resolv, "hostname %s", hostname); | 56 | debug(resolv, "hostname %s", hostname); |
49 | 57 | ||
50 | if (!resolv->nameserver_list) { | 58 | if (!resolv->nameserver_list) { |
51 | - int i; | 59 | +#if (__RES >= 19991006) |
52 | - | 60 | int i; |
53 | - for (i = 0; i < resolv->res.nscount; i++) { | 61 | |
54 | - char buf[100]; | 62 | for (i = 0; i < resolv->res.nscount; i++) { |
55 | - int family = resolv->res.nsaddr_list[i].sin_family; | 63 | @@ -1043,6 +1048,22 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, |
56 | - void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr; | 64 | if (inet_ntop(family, sa_addr, buf, sizeof(buf))) |
57 | - | 65 | g_resolv_add_nameserver(resolv, buf, 53, 0); |
58 | - if (family != AF_INET && | ||
59 | - resolv->res._u._ext.nsaddrs[i]) { | ||
60 | - family = AF_INET6; | ||
61 | - sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr; | ||
62 | + FILE *f = fopen("/etc/resolv.conf", "r"); | ||
63 | + if (f) { | ||
64 | + char line[256], *s; | ||
65 | + int i; | ||
66 | + while (fgets(line, sizeof(line), f)) { | ||
67 | + if (strncmp(line, "nameserver", 10) || !isspace(line[10])) | ||
68 | + continue; | ||
69 | + for (s = &line[11]; isspace(s[0]); s++); | ||
70 | + for (i = 0; s[i] && !isspace(s[i]); i++); | ||
71 | + s[i] = 0; | ||
72 | + g_resolv_add_nameserver(resolv, s, 53, 0); | ||
73 | } | ||
74 | - | ||
75 | - if (family != AF_INET && family != AF_INET6) | ||
76 | - continue; | ||
77 | - | ||
78 | - if (inet_ntop(family, sa_addr, buf, sizeof(buf))) | ||
79 | - g_resolv_add_nameserver(resolv, buf, 53, 0); | ||
80 | + fclose(f); | ||
81 | } | 66 | } |
67 | +#else | ||
68 | + FILE *f = fopen("/etc/resolv.conf", "r"); | ||
69 | + if (f) { | ||
70 | + char line[256], *s; | ||
71 | + int i; | ||
72 | + while (fgets(line, sizeof(line), f)) { | ||
73 | + if (strncmp(line, "nameserver", 10) || !isspace(line[10])) | ||
74 | + continue; | ||
75 | + for (s = &line[11]; isspace(s[0]); s++); | ||
76 | + for (i = 0; s[i] && !isspace(s[i]); i++); | ||
77 | + s[i] = 0; | ||
78 | + g_resolv_add_nameserver(resolv, s, 53, 0); | ||
79 | + } | ||
80 | + fclose(f); | ||
81 | + } | ||
82 | +#endif | ||
82 | 83 | ||
83 | if (!resolv->nameserver_list) | 84 | if (!resolv->nameserver_list) |
85 | g_resolv_add_nameserver(resolv, "127.0.0.1", 53, 0); | ||
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch new file mode 100644 index 0000000000..62f07e707a --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 8d3be0285f1d4667bfe85dba555c663eb3d704b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yoonje Shin <ioerts@kookmin.ac.kr> | ||
3 | Date: Mon, 12 May 2025 10:48:18 +0200 | ||
4 | Subject: [PATCH] dnsproxy: Address CVE-2025-32366 vulnerability | ||
5 | |||
6 | In Connman parse_rr in dnsproxy.c has a memcpy length | ||
7 | that depends on an RR RDLENGTH value (i.e., *rdlen=ntohs(rr->rdlen) | ||
8 | and memcpy(response+offset,*end,*rdlen)). Here, rdlen may be larger | ||
9 | than the amount of remaining packet data in the current state of | ||
10 | parsing. As a result, values of stack memory locations may be sent | ||
11 | over the network in a response. | ||
12 | |||
13 | This patch adds a check to ensure that (*end + *rdlen) does not exceed | ||
14 | the valid range. If the condition is violated, the function returns | ||
15 | -EINVAL. | ||
16 | |||
17 | CVE: CVE-2025-32366 | ||
18 | |||
19 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=8d3be0285f1d4667bfe85dba555c663eb3d704b4] | ||
20 | |||
21 | Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> | ||
22 | --- | ||
23 | src/dnsproxy.c | 3 +++ | ||
24 | 1 file changed, 3 insertions(+) | ||
25 | |||
26 | diff --git a/src/dnsproxy.c b/src/dnsproxy.c | ||
27 | index 7ee26d9..1dd2f7f 100644 | ||
28 | --- a/src/dnsproxy.c | ||
29 | +++ b/src/dnsproxy.c | ||
30 | @@ -998,6 +998,9 @@ static int parse_rr(const unsigned char *buf, const unsigned char *start, | ||
31 | if ((offset + *rdlen) > *response_size) | ||
32 | return -ENOBUFS; | ||
33 | |||
34 | + if ((*end + *rdlen) > max) | ||
35 | + return -EINVAL; | ||
36 | + | ||
37 | memcpy(response + offset, *end, *rdlen); | ||
38 | |||
39 | *end += *rdlen; | ||
40 | -- | ||
41 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch new file mode 100644 index 0000000000..c114589679 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From d90b911f6760959bdf1393c39fe8d1118315490f Mon Sep 17 00:00:00 2001 | ||
2 | From: Praveen Kumar <praveen.kumar@windriver.com> | ||
3 | Date: Thu, 24 Apr 2025 11:39:29 +0000 | ||
4 | Subject: [PATCH] dnsproxy: Fix NULL/empty lookup causing potential crash | ||
5 | |||
6 | In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c | ||
7 | can be NULL or an empty string when the TC (Truncated) bit is set in | ||
8 | a DNS response. This allows attackers to cause a denial of service | ||
9 | (application crash) or possibly execute arbitrary code, because those | ||
10 | lookup values lead to incorrect length calculations and incorrect | ||
11 | memcpy operations. | ||
12 | |||
13 | This patch includes a check to make sure loookup value is valid before | ||
14 | using it. This helps avoid unexpected value when the input is empty or | ||
15 | incorrect. | ||
16 | |||
17 | Fixes: CVE-2025-32743 | ||
18 | |||
19 | CVE: CVE-2025-32743 | ||
20 | |||
21 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f] | ||
22 | |||
23 | Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> | ||
24 | --- | ||
25 | src/dnsproxy.c | 7 ++++++- | ||
26 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/src/dnsproxy.c b/src/dnsproxy.c | ||
29 | index f28a5d7..7ee26d9 100644 | ||
30 | --- a/src/dnsproxy.c | ||
31 | +++ b/src/dnsproxy.c | ||
32 | @@ -1685,8 +1685,13 @@ static int ns_resolv(struct server_data *server, struct request_data *req, | ||
33 | gpointer request, gpointer name) | ||
34 | { | ||
35 | int sk = -1; | ||
36 | + int err; | ||
37 | const char *lookup = (const char *)name; | ||
38 | - int err = ns_try_resolv_from_cache(req, request, lookup); | ||
39 | + | ||
40 | + if (!lookup || strlen(lookup) == 0) | ||
41 | + return -EINVAL; | ||
42 | + | ||
43 | + err = ns_try_resolv_from_cache(req, request, lookup); | ||
44 | |||
45 | if (err > 0) | ||
46 | /* cache hit */ | ||
47 | -- | ||
48 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman index c64fa0d715..adb5d44fed 100644 --- a/meta/recipes-connectivity/connman/connman/connman +++ b/meta/recipes-connectivity/connman/connman/connman | |||
@@ -10,53 +10,15 @@ fi | |||
10 | 10 | ||
11 | set -e | 11 | set -e |
12 | 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() { | 13 | 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 @DATADIR@/connman/wired-setup ] ; then | 14 | if [ -f @DATADIR@/connman/wired-setup ] ; then |
53 | . @DATADIR@/connman/wired-setup | 15 | . @DATADIR@/connman/wired-setup |
54 | fi | 16 | fi |
55 | $DAEMON $EXTRA_PARAM | 17 | $DAEMON |
56 | } | 18 | } |
57 | 19 | ||
58 | do_stop() { | 20 | do_stop() { |
59 | start-stop-daemon --stop --name connmand --quiet | 21 | start-stop-daemon --stop --oknodo --name connmand --quiet |
60 | } | 22 | } |
61 | 23 | ||
62 | case "$1" in | 24 | case "$1" in |
diff --git a/meta/recipes-connectivity/connman/connman/no-version-scripts.patch b/meta/recipes-connectivity/connman/connman/no-version-scripts.patch deleted file mode 100644 index e96e38bcf9..0000000000 --- a/meta/recipes-connectivity/connman/connman/no-version-scripts.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | With binutils 2.27 on at least MIPS, connmand will crash on startup. This | ||
2 | appears to be due to the symbol visibilty scripts hiding symbols that stdio | ||
3 | looks up at runtime, resulting in it segfaulting. | ||
4 | |||
5 | This certainly appears to be a bug in binutils 2.27 although the problem has | ||
6 | been known about for some time: | ||
7 | |||
8 | https://sourceware.org/bugzilla/show_bug.cgi?id=17908 | ||
9 | |||
10 | As the version scripts are only used to hide symbols from plugins we can safely | ||
11 | remove the scripts to work around the problem until binutils is fixed. | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
15 | |||
16 | diff --git a/Makefile.am b/Makefile.am | ||
17 | index d70725c..76ae432 100644 | ||
18 | --- a/Makefile.am | ||
19 | +++ b/Makefile.am | ||
20 | @@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \ | ||
21 | -src_connmand_LDFLAGS = -Wl,--export-dynamic \ | ||
22 | - -Wl,--version-script=$(srcdir)/src/connman.ver | ||
23 | +src_connmand_LDFLAGS = -Wl,--export-dynamic | ||
24 | @@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \ | ||
25 | -vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \ | ||
26 | - -Wl,--version-script=$(srcdir)/vpn/vpn.ver | ||
27 | +vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic | ||
diff --git a/meta/recipes-connectivity/connman/connman_1.38.bb b/meta/recipes-connectivity/connman/connman_1.38.bb deleted file mode 100644 index 027c41e9af..0000000000 --- a/meta/recipes-connectivity/connman/connman_1.38.bb +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
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://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ | ||
6 | file://connman \ | ||
7 | file://no-version-scripts.patch \ | ||
8 | " | ||
9 | |||
10 | SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" | ||
11 | |||
12 | SRC_URI[md5sum] = "1ed8745354c7254bdfd4def54833ee94" | ||
13 | SRC_URI[sha256sum] = "cb30aca97c2f79ccaed8802aa2909ac5100a3969de74c0af8a9d73b85fc4932b" | ||
14 | |||
15 | RRECOMMENDS_${PN} = "connman-conf" | ||
16 | RCONFLICTS_${PN} = "networkmanager" | ||
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman_1.44.bb index 776bbfbff2..1b0fbe438c 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman_1.44.bb | |||
@@ -7,48 +7,72 @@ It is a fully modular system that can be extended, through plug-ins, \ | |||
7 | to support all kinds of wired or wireless technologies. Also, \ | 7 | to support all kinds of wired or wireless technologies. Also, \ |
8 | configuration methods, like DHCP and domain name resolving, are \ | 8 | configuration methods, like DHCP and domain name resolving, are \ |
9 | implemented using plug-ins." | 9 | implemented using plug-ins." |
10 | HOMEPAGE = "http://connman.net/" | 10 | HOMEPAGE = "https://web.git.kernel.org/pub/scm/network/connman/connman.git/about/" |
11 | BUGTRACKER = "https://01.org/jira/browse/CM" | 11 | LICENSE = "GPL-2.0-only" |
12 | LICENSE = "GPLv2" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ |
14 | file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" | 13 | file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" |
15 | 14 | ||
16 | inherit autotools pkgconfig systemd update-rc.d update-alternatives | 15 | inherit autotools pkgconfig systemd update-rc.d update-alternatives |
17 | 16 | ||
18 | DEPENDS = "dbus glib-2.0 ppp" | 17 | CVE_PRODUCT = "connman connection_manager" |
18 | |||
19 | DEPENDS = "dbus glib-2.0" | ||
20 | |||
21 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ | ||
22 | file://connman \ | ||
23 | file://0002-resolve-musl-does-not-implement-res_ninit.patch \ | ||
24 | file://CVE-2025-32743.patch \ | ||
25 | file://CVE-2025-32366.patch \ | ||
26 | " | ||
27 | |||
28 | SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff" | ||
29 | |||
30 | RRECOMMENDS:${PN} = "connman-conf" | ||
31 | RCONFLICTS:${PN} = "networkmanager" | ||
19 | 32 | ||
20 | EXTRA_OECONF += "\ | 33 | EXTRA_OECONF += "\ |
21 | ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ | 34 | ac_cv_path_IP6TABLES_SAVE=${sbindir}/ip6tables-save \ |
35 | ac_cv_path_IPTABLES_SAVE=${sbindir}/iptables-save \ | ||
22 | ac_cv_path_PPPD=${sbindir}/pppd \ | 36 | ac_cv_path_PPPD=${sbindir}/pppd \ |
37 | ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ | ||
23 | --enable-debug \ | 38 | --enable-debug \ |
24 | --enable-loopback \ | 39 | --enable-loopback \ |
25 | --enable-ethernet \ | 40 | --enable-ethernet \ |
26 | --enable-tools \ | 41 | --enable-tools \ |
27 | --disable-polkit \ | 42 | --disable-polkit \ |
43 | --runstatedir='${runtimedir}' \ | ||
44 | --with-dns-backend='${@bb.utils.contains("DISTRO_FEATURES", "systemd-resolved", "systemd-resolved", "internal", d)}' \ | ||
28 | " | 45 | " |
46 | # For smooth operation it would be best to start only one wireless daemon at a time. | ||
47 | # If wpa-supplicant is running, connman will use it preferentially. | ||
48 | # Select either wpa-supplicant or iwd | ||
49 | WIRELESS_DAEMON ??= "wpa-supplicant" | ||
29 | 50 | ||
30 | PACKAGECONFIG ??= "wispr iptables client\ | 51 | PACKAGECONFIG ??= "wispr iptables client\ |
31 | ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ | 52 | ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \ |
32 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ | 53 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ |
54 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \ | ||
33 | " | 55 | " |
34 | 56 | ||
35 | # If you want ConnMan to support VPN, add following statement into | 57 | # If you want ConnMan to support VPN, add following statement into |
36 | # local.conf or distro config | 58 | # local.conf or distro config |
37 | # PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp" | 59 | # PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp" |
38 | 60 | ||
39 | PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" | 61 | PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" |
40 | PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant" | 62 | PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi" |
41 | PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" | 63 | PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" |
42 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" | 64 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" |
65 | PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant" | ||
66 | PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" | ||
43 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," | 67 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," |
44 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" | 68 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" |
45 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" | 69 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" |
46 | PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" | 70 | PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,ppp,xl2tpd" |
47 | PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" | 71 | PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,ppp,pptp-linux" |
48 | # WISPr support for logging into hotspots, requires TLS | 72 | # WISPr support for logging into hotspots, requires TLS |
49 | PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," | 73 | PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," |
50 | PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat" | 74 | PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat,iptables" |
51 | PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" | 75 | PACKAGECONFIG[iptables] = "--with-firewall=iptables,,iptables,,,nftables" |
52 | PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" | 76 | PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" |
53 | PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" | 77 | PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" |
54 | PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" | 78 | PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" |
@@ -64,19 +88,19 @@ python __anonymous () { | |||
64 | d.setVar('SYSTEMD_PACKAGES', systemd_packages) | 88 | d.setVar('SYSTEMD_PACKAGES', systemd_packages) |
65 | } | 89 | } |
66 | 90 | ||
67 | SYSTEMD_SERVICE_${PN} = "connman.service" | 91 | SYSTEMD_SERVICE:${PN} = "connman.service" |
68 | SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" | 92 | SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" |
69 | SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" | 93 | SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" |
70 | 94 | ||
71 | ALTERNATIVE_PRIORITY = "100" | 95 | ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd-resolved','10','100',d)}" |
72 | ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" | 96 | ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" |
73 | ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" | 97 | ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" |
74 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" | 98 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" |
75 | 99 | ||
76 | do_install_append() { | 100 | do_install:append() { |
77 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 101 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
78 | install -d ${D}${sysconfdir}/init.d | 102 | install -d ${D}${sysconfdir}/init.d |
79 | install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman | 103 | install -m 0755 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman |
80 | sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman | 104 | sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman |
81 | fi | 105 | fi |
82 | 106 | ||
@@ -93,14 +117,15 @@ do_install_append() { | |||
93 | # plugins directory to be present for ownership | 117 | # plugins directory to be present for ownership |
94 | mkdir -p ${D}${libdir}/connman/plugins | 118 | mkdir -p ${D}${libdir}/connman/plugins |
95 | 119 | ||
96 | # For read-only filesystem, do not create links during bootup | 120 | # For read-only filesystem, do not create links during bootup |
97 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 121 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
98 | ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman | 122 | install -d ${D}${sysconfdir} |
99 | fi | 123 | ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman |
124 | fi | ||
100 | } | 125 | } |
101 | 126 | ||
102 | # These used to be plugins, but now they are core | 127 | # These used to be plugins, but now they are core |
103 | RPROVIDES_${PN} = "\ | 128 | RPROVIDES:${PN} = "\ |
104 | connman-plugin-loopback \ | 129 | connman-plugin-loopback \ |
105 | connman-plugin-ethernet \ | 130 | connman-plugin-ethernet \ |
106 | ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ | 131 | ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ |
@@ -108,10 +133,6 @@ RPROVIDES_${PN} = "\ | |||
108 | ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ | 133 | ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ |
109 | " | 134 | " |
110 | 135 | ||
111 | RDEPENDS_${PN} = "\ | ||
112 | dbus \ | ||
113 | " | ||
114 | |||
115 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*" | 136 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*" |
116 | 137 | ||
117 | def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): | 138 | def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): |
@@ -119,11 +140,11 @@ def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): | |||
119 | if plugintype in depmap: | 140 | if plugintype in depmap: |
120 | rdepends = map(lambda x: multilib_prefix + x, \ | 141 | rdepends = map(lambda x: multilib_prefix + x, \ |
121 | depmap[plugintype].split()) | 142 | depmap[plugintype].split()) |
122 | d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends)) | 143 | d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends)) |
123 | if add_insane_skip: | 144 | if add_insane_skip: |
124 | d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so") | 145 | d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so") |
125 | 146 | ||
126 | python populate_packages_prepend() { | 147 | python populate_packages:prepend() { |
127 | depmap = dict(pppd="ppp") | 148 | depmap = dict(pppd="ppp") |
128 | multilib_prefix = (d.getVar("MLPREFIX") or "") | 149 | multilib_prefix = (d.getVar("MLPREFIX") or "") |
129 | 150 | ||
@@ -144,72 +165,73 @@ python populate_packages_prepend() { | |||
144 | 165 | ||
145 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" | 166 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" |
146 | 167 | ||
147 | FILES_${PN}-tools = "${bindir}/wispr" | 168 | FILES:${PN}-tools = "${bindir}/wispr" |
148 | RDEPENDS_${PN}-tools ="${PN}" | 169 | RDEPENDS:${PN}-tools = "${PN}" |
149 | 170 | ||
150 | FILES_${PN}-tests = "${bindir}/*-test" | 171 | FILES:${PN}-tests = "${bindir}/*-test" |
172 | RDEPENDS:${PN}-tests = "${@bb.utils.contains('PACKAGECONFIG', 'iptables', 'iptables', '', d)}" | ||
151 | 173 | ||
152 | FILES_${PN}-client = "${bindir}/connmanctl" | 174 | FILES:${PN}-client = "${bindir}/connmanctl" |
153 | RDEPENDS_${PN}-client ="${PN}" | 175 | RDEPENDS:${PN}-client = "${PN}" |
154 | 176 | ||
155 | FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ | 177 | FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ |
156 | ${libdir}/connman/plugins \ | 178 | ${libdir}/connman/plugins \ |
157 | ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ | 179 | ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ |
158 | ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ | 180 | ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ |
159 | ${datadir}/dbus-1/system-services/* \ | 181 | ${datadir}/dbus-1/system-services/* \ |
160 | ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" | 182 | ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" |
161 | 183 | ||
162 | FILES_${PN}-dev += "${libdir}/connman/*/*.la" | 184 | FILES:${PN}-dev += "${libdir}/connman/*/*.la" |
163 | 185 | ||
164 | PACKAGES =+ "${PN}-vpn ${PN}-wait-online" | 186 | PACKAGES =+ "${PN}-vpn ${PN}-wait-online" |
165 | 187 | ||
166 | SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices" | 188 | SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices" |
167 | DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \ | 189 | DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \ |
168 | managing VPN connections within embedded devices running the Linux \ | 190 | managing VPN connections within embedded devices running the Linux \ |
169 | operating system. The connman-vpnd handles all the VPN connections \ | 191 | operating system. The connman-vpnd handles all the VPN connections \ |
170 | and starts/stops VPN client processes when necessary. The connman-vpnd \ | 192 | and starts/stops VPN client processes when necessary. The connman-vpnd \ |
171 | provides a DBus API for managing VPN connections. All the different \ | 193 | provides a DBus API for managing VPN connections. All the different \ |
172 | VPN technogies are implemented using plug-ins." | 194 | VPN technogies are implemented using plug-ins." |
173 | FILES_${PN}-vpn += "${sbindir}/connman-vpnd \ | 195 | FILES:${PN}-vpn += "${sbindir}/connman-vpnd \ |
174 | ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ | 196 | ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ |
175 | ${datadir}/dbus-1/system-services/net.connman.vpn.service \ | 197 | ${datadir}/dbus-1/system-services/net.connman.vpn.service \ |
176 | ${systemd_unitdir}/system/connman-vpn.service" | 198 | ${systemd_system_unitdir}/connman-vpn.service" |
177 | 199 | ||
178 | SUMMARY_${PN}-wait-online = "A program that will return once ConnMan has connected to a network" | 200 | SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network" |
179 | DESCRIPTION_${PN}-wait-online = "A service that can be enabled so that \ | 201 | DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \ |
180 | the system waits until a network connection is established." | 202 | the system waits until a network connection is established." |
181 | FILES_${PN}-wait-online += "${sbindir}/connmand-wait-online \ | 203 | FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \ |
182 | ${systemd_unitdir}/system/connman-wait-online.service" | 204 | ${systemd_system_unitdir}/connman-wait-online.service" |
183 | 205 | ||
184 | SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" | 206 | SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" |
185 | DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ | 207 | DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ |
186 | to create a VPN connection to OpenVPN server." | 208 | to create a VPN connection to OpenVPN server." |
187 | FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ | 209 | FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ |
188 | ${libdir}/connman/plugins-vpn/openvpn.so" | 210 | ${libdir}/connman/plugins-vpn/openvpn.so" |
189 | RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn" | 211 | RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn" |
190 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" | 212 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" |
191 | 213 | ||
192 | SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" | 214 | SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" |
193 | DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ | 215 | DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ |
194 | to create a VPN connection to Cisco3000 VPN Concentrator." | 216 | to create a VPN connection to Cisco3000 VPN Concentrator." |
195 | FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ | 217 | FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ |
196 | ${libdir}/connman/plugins-vpn/vpnc.so \ | 218 | ${libdir}/connman/plugins-vpn/vpnc.so \ |
197 | ${libdir}/connman/scripts/vpn-script" | 219 | ${libdir}/connman/scripts/vpn-script" |
198 | RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn" | 220 | RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn" |
199 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" | 221 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" |
200 | 222 | ||
201 | SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" | 223 | SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" |
202 | DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ | 224 | DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ |
203 | to create a VPN connection to L2TP server." | 225 | to create a VPN connection to L2TP server." |
204 | FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ | 226 | FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ |
205 | ${libdir}/connman/plugins-vpn/l2tp.so" | 227 | ${libdir}/connman/plugins-vpn/l2tp.so" |
206 | RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn" | 228 | RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn" |
207 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" | 229 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" |
208 | 230 | ||
209 | SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" | 231 | SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" |
210 | DESCRIPTION_${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ | 232 | DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ |
211 | to create a VPN connection to PPTP server." | 233 | to create a VPN connection to PPTP server." |
212 | FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ | 234 | FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ |
213 | ${libdir}/connman/plugins-vpn/pptp.so" | 235 | ${libdir}/connman/plugins-vpn/pptp.so" |
214 | RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn" | 236 | RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn" |
215 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" | 237 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" |