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.bb39
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/main.conf2
-rw-r--r--meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service10
-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_0.7.bb8
-rw-r--r--meta/recipes-connectivity/connman/connman.inc110
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch55
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch152
-rw-r--r--meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch18
-rw-r--r--meta/recipes-connectivity/connman/connman/connman40
-rw-r--r--meta/recipes-connectivity/connman/connman_1.38.bb16
-rw-r--r--meta/recipes-connectivity/connman/connman_1.42.bb17
13 files changed, 308 insertions, 184 deletions
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index 9a519ec866..a1a0e08faa 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -1,36 +1,21 @@
1SUMMARY = "Connman config to setup wired interface on qemu machines" 1SUMMARY = "Connman config to ignore wired interface on qemu machines"
2DESCRIPTION = "This is the ConnMan configuration to set up a Wired \ 2DESCRIPTION = "This is the ConnMan configuration to avoid touching wired \
3network interface for a qemu machine." 3network interface inside qemu machines."
4LICENSE = "GPLv2" 4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" 5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
6 6
7inherit systemd
8 7
9SRC_URI_append_qemuall = " file://wired.config \ 8SRC_URI = "file://main.conf \
10 file://wired-setup \ 9 "
11 file://wired-connection.service \
12"
13PR = "r2"
14 10
15S = "${WORKDIR}" 11S = "${WORKDIR}"
16 12
17PACKAGE_ARCH = "${MACHINE_ARCH}" 13PACKAGE_ARCH = "${MACHINE_ARCH}"
18 14
19FILES_${PN} = "${localstatedir}/* ${datadir}/*" 15FILES:${PN} = "${sysconfdir}/*"
20 16
21do_install() { 17# Kernel IP-Config is perfectly capable of setting up networking passed in via ip=
22 #Configure Wired network interface in case of qemu* machines 18do_install:append:qemuall() {
23 if test -e ${WORKDIR}/wired.config && 19 mkdir -p ${D}${sysconfdir}/connman
24 test -e ${WORKDIR}/wired-setup && 20 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} 21}
35
36SYSTEMD_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]
2NetworkInterfaceBlacklist = 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]
2Description=Setup a wired interface
3Before=connman.service
4
5[Service]
6Type=oneshot
7ExecStart=@SCRIPTDIR@/wired-setup
8
9[Install]
10WantedBy=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
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
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]
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_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
index af986c4eab..fcd154b4b0 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 @@
1SUMMARY = "GTK+ frontend for the ConnMan network connection manager" 1SUMMARY = "GTK+ frontend for the ConnMan network connection manager"
2HOMEPAGE = "http://connman.net/" 2HOMEPAGE = "http://connman.net/"
3SECTION = "libs/network" 3SECTION = "libs/network"
4LICENSE = "GPLv2 & LGPLv2.1" 4LICENSE = "GPL-2.0-only & LGPL-2.1-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ 5LIC_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
12SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143" 12SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
13SRC_URI = "git://github.com/connectivity/connman-gnome.git \ 13SRC_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/ \
@@ -23,8 +23,8 @@ S = "${WORKDIR}/git"
23inherit autotools-brokensep gtk-icon-cache pkgconfig features_check 23inherit autotools-brokensep gtk-icon-cache pkgconfig features_check
24ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" 24ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
25 25
26RDEPENDS_${PN} = "connman" 26RDEPENDS:${PN} = "connman"
27 27
28do_install_append() { 28do_install:append() {
29 install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/ 29 install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/
30} 30}
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 776bbfbff2..7487ca0d0c 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -9,12 +9,14 @@ configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins." 9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/" 10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "https://01.org/jira/browse/CM" 11BUGTRACKER = "https://01.org/jira/browse/CM"
12LICENSE = "GPLv2" 12LICENSE = "GPL-2.0-only"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ 13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" 14 file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
15 15
16inherit autotools pkgconfig systemd update-rc.d update-alternatives 16inherit autotools pkgconfig systemd update-rc.d update-alternatives
17 17
18CVE_PRODUCT = "connman connection_manager"
19
18DEPENDS = "dbus glib-2.0 ppp" 20DEPENDS = "dbus glib-2.0 ppp"
19 21
20EXTRA_OECONF += "\ 22EXTRA_OECONF += "\
@@ -25,21 +27,29 @@ EXTRA_OECONF += "\
25 --enable-ethernet \ 27 --enable-ethernet \
26 --enable-tools \ 28 --enable-tools \
27 --disable-polkit \ 29 --disable-polkit \
30 --runstatedir=/run \
28" 31"
32# For smooth operation it would be best to start only one wireless daemon at a time.
33# If wpa-supplicant is running, connman will use it preferentially.
34# Select either wpa-supplicant or iwd
35WIRELESS_DAEMON ??= "wpa-supplicant"
29 36
30PACKAGECONFIG ??= "wispr iptables client\ 37PACKAGECONFIG ??= "wispr iptables client\
31 ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ 38 ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ 39 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
33" 41"
34 42
35# If you want ConnMan to support VPN, add following statement into 43# If you want ConnMan to support VPN, add following statement into
36# local.conf or distro config 44# local.conf or distro config
37# PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp" 45# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
38 46
39PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" 47PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
40PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant" 48PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
41PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" 49PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
42PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" 50PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
51PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant"
52PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd"
43PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," 53PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
44PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" 54PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
45PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" 55PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
@@ -64,16 +74,16 @@ python __anonymous () {
64 d.setVar('SYSTEMD_PACKAGES', systemd_packages) 74 d.setVar('SYSTEMD_PACKAGES', systemd_packages)
65} 75}
66 76
67SYSTEMD_SERVICE_${PN} = "connman.service" 77SYSTEMD_SERVICE:${PN} = "connman.service"
68SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" 78SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service"
69SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" 79SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service"
70 80
71ALTERNATIVE_PRIORITY = "100" 81ALTERNATIVE_PRIORITY = "100"
72ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" 82ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
73ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" 83ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
74ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" 84ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
75 85
76do_install_append() { 86do_install:append() {
77 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then 87 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
78 install -d ${D}${sysconfdir}/init.d 88 install -d ${D}${sysconfdir}/init.d
79 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman 89 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
@@ -100,7 +110,7 @@ do_install_append() {
100} 110}
101 111
102# These used to be plugins, but now they are core 112# These used to be plugins, but now they are core
103RPROVIDES_${PN} = "\ 113RPROVIDES:${PN} = "\
104 connman-plugin-loopback \ 114 connman-plugin-loopback \
105 connman-plugin-ethernet \ 115 connman-plugin-ethernet \
106 ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ 116 ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
@@ -108,7 +118,7 @@ RPROVIDES_${PN} = "\
108 ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ 118 ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
109 " 119 "
110 120
111RDEPENDS_${PN} = "\ 121RDEPENDS:${PN} = "\
112 dbus \ 122 dbus \
113 " 123 "
114 124
@@ -119,11 +129,11 @@ def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
119 if plugintype in depmap: 129 if plugintype in depmap:
120 rdepends = map(lambda x: multilib_prefix + x, \ 130 rdepends = map(lambda x: multilib_prefix + x, \
121 depmap[plugintype].split()) 131 depmap[plugintype].split())
122 d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends)) 132 d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends))
123 if add_insane_skip: 133 if add_insane_skip:
124 d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so") 134 d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so")
125 135
126python populate_packages_prepend() { 136python populate_packages:prepend() {
127 depmap = dict(pppd="ppp") 137 depmap = dict(pppd="ppp")
128 multilib_prefix = (d.getVar("MLPREFIX") or "") 138 multilib_prefix = (d.getVar("MLPREFIX") or "")
129 139
@@ -144,72 +154,72 @@ python populate_packages_prepend() {
144 154
145PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" 155PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
146 156
147FILES_${PN}-tools = "${bindir}/wispr" 157FILES:${PN}-tools = "${bindir}/wispr"
148RDEPENDS_${PN}-tools ="${PN}" 158RDEPENDS:${PN}-tools ="${PN}"
149 159
150FILES_${PN}-tests = "${bindir}/*-test" 160FILES:${PN}-tests = "${bindir}/*-test"
151 161
152FILES_${PN}-client = "${bindir}/connmanctl" 162FILES:${PN}-client = "${bindir}/connmanctl"
153RDEPENDS_${PN}-client ="${PN}" 163RDEPENDS:${PN}-client ="${PN}"
154 164
155FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ 165FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
156 ${libdir}/connman/plugins \ 166 ${libdir}/connman/plugins \
157 ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ 167 ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
158 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ 168 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
159 ${datadir}/dbus-1/system-services/* \ 169 ${datadir}/dbus-1/system-services/* \
160 ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" 170 ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
161 171
162FILES_${PN}-dev += "${libdir}/connman/*/*.la" 172FILES:${PN}-dev += "${libdir}/connman/*/*.la"
163 173
164PACKAGES =+ "${PN}-vpn ${PN}-wait-online" 174PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
165 175
166SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices" 176SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
167DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \ 177DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \
168managing VPN connections within embedded devices running the Linux \ 178managing VPN connections within embedded devices running the Linux \
169operating system. The connman-vpnd handles all the VPN connections \ 179operating system. The connman-vpnd handles all the VPN connections \
170and starts/stops VPN client processes when necessary. The connman-vpnd \ 180and starts/stops VPN client processes when necessary. The connman-vpnd \
171provides a DBus API for managing VPN connections. All the different \ 181provides a DBus API for managing VPN connections. All the different \
172VPN technogies are implemented using plug-ins." 182VPN technogies are implemented using plug-ins."
173FILES_${PN}-vpn += "${sbindir}/connman-vpnd \ 183FILES:${PN}-vpn += "${sbindir}/connman-vpnd \
174 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ 184 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
175 ${datadir}/dbus-1/system-services/net.connman.vpn.service \ 185 ${datadir}/dbus-1/system-services/net.connman.vpn.service \
176 ${systemd_unitdir}/system/connman-vpn.service" 186 ${systemd_system_unitdir}/connman-vpn.service"
177 187
178SUMMARY_${PN}-wait-online = "A program that will return once ConnMan has connected to a network" 188SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
179DESCRIPTION_${PN}-wait-online = "A service that can be enabled so that \ 189DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \
180the system waits until a network connection is established." 190the system waits until a network connection is established."
181FILES_${PN}-wait-online += "${sbindir}/connmand-wait-online \ 191FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \
182 ${systemd_unitdir}/system/connman-wait-online.service" 192 ${systemd_system_unitdir}/connman-wait-online.service"
183 193
184SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" 194SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
185DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ 195DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
186to create a VPN connection to OpenVPN server." 196to create a VPN connection to OpenVPN server."
187FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ 197FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
188 ${libdir}/connman/plugins-vpn/openvpn.so" 198 ${libdir}/connman/plugins-vpn/openvpn.so"
189RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn" 199RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn"
190RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" 200RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
191 201
192SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" 202SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
193DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ 203DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
194to create a VPN connection to Cisco3000 VPN Concentrator." 204to create a VPN connection to Cisco3000 VPN Concentrator."
195FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ 205FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
196 ${libdir}/connman/plugins-vpn/vpnc.so \ 206 ${libdir}/connman/plugins-vpn/vpnc.so \
197 ${libdir}/connman/scripts/vpn-script" 207 ${libdir}/connman/scripts/vpn-script"
198RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn" 208RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn"
199RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" 209RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
200 210
201SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" 211SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
202DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ 212DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
203to create a VPN connection to L2TP server." 213to create a VPN connection to L2TP server."
204FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ 214FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
205 ${libdir}/connman/plugins-vpn/l2tp.so" 215 ${libdir}/connman/plugins-vpn/l2tp.so"
206RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn" 216RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn"
207RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" 217RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
208 218
209SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" 219SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
210DESCRIPTION_${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ 220DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
211to create a VPN connection to PPTP server." 221to create a VPN connection to PPTP server."
212FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ 222FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
213 ${libdir}/connman/plugins-vpn/pptp.so" 223 ${libdir}/connman/plugins-vpn/pptp.so"
214RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn" 224RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn"
215RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" 225RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"
diff --git a/meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch b/meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch
new file mode 100644
index 0000000000..8012606db7
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch
@@ -0,0 +1,55 @@
1From cbba6638986c2de763981bf6fc59df6a86fed44f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 1 Jan 2024 17:42:21 -0800
4Subject: [PATCH v2] src/log.c: Include libgen.h for basename API
5
6Use POSIX version of basename. This comes to front with latest musl
7which dropped the declaration from string.h [1] it fails to build with
8clang-17+ because it treats implicit function declaration as error.
9
10Fix it by applying the basename on a copy of string since posix version
11may modify the input string.
12
13[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
14
15Upstream-Status: Submitted [https://lore.kernel.org/connman/20240102015917.3732089-1-raj.khem@gmail.com/T/#u]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18
19 src/log.c | 6 ++++--
20 1 file changed, 4 insertions(+), 2 deletions(-)
21
22diff --git a/src/log.c b/src/log.c
23index 554b046..2df3af7 100644
24--- a/src/log.c
25+++ b/src/log.c
26@@ -24,6 +24,7 @@
27 #endif
28
29 #include <stdio.h>
30+#include <libgen.h>
31 #include <unistd.h>
32 #include <stdarg.h>
33 #include <stdlib.h>
34@@ -196,6 +197,7 @@ int __connman_log_init(const char *program, const char *debug,
35 const char *program_name, const char *program_version)
36 {
37 static char path[PATH_MAX];
38+ char* tmp = strdup(program);
39 int option = LOG_NDELAY | LOG_PID;
40
41 program_exec = program;
42@@ -212,8 +214,8 @@ int __connman_log_init(const char *program, const char *debug,
43 if (backtrace)
44 signal_setup(signal_handler);
45
46- openlog(basename(program), option, LOG_DAEMON);
47-
48+ openlog(basename(tmp), option, LOG_DAEMON);
49+ free(tmp);
50 syslog(LOG_INFO, "%s version %s", program_name, program_version);
51
52 return 0;
53--
542.43.0
55
diff --git a/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch b/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
new file mode 100644
index 0000000000..9e5ac8da15
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
@@ -0,0 +1,152 @@
1From af55a6a414d32c12f9ef3cab778385a361e1ad6d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
3Date: Sat, 25 Mar 2023 20:51:52 +0000
4Subject: [PATCH] vpn: Adding support for latest pppd 2.5.0 release
5
6The API has gone through a significant overhaul, and this change fixes any compile issues.
71) Fixes to configure.ac itself
82) Cleanup in pppd plugin itself
9
10Adding a libppp-compat.h file to mask for any differences in the version.
11
12Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a48864a2e5d2a725dfc6eef567108bc13b43857f]
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14
15---
16 scripts/libppp-compat.h | 127 ++++++++++++++++++++++++++++++++++++++++
17 1 file changed, 127 insertions(+)
18 create mode 100644 scripts/libppp-compat.h
19
20diff --git a/scripts/libppp-compat.h b/scripts/libppp-compat.h
21new file mode 100644
22index 0000000..eee1d09
23--- /dev/null
24+++ b/scripts/libppp-compat.h
25@@ -0,0 +1,127 @@
26+/* Copyright (C) Eivind Naess, eivnaes@yahoo.com */
27+/* SPDX-License-Identifier: GPL-2.0-or-later */
28+
29+#ifndef __LIBPPP_COMPAT_H__
30+#define __LIBPPP_COMPAT_H__
31+
32+/* Define USE_EAPTLS compile with EAP TLS support against older pppd headers,
33+ * pppd >= 2.5.0 use PPP_WITH_EAPTLS and is defined in pppdconf.h */
34+#define USE_EAPTLS 1
35+
36+/* Define INET6 to compile with IPv6 support against older pppd headers,
37+ * pppd >= 2.5.0 use PPP_WITH_IPV6CP and is defined in pppdconf.h */
38+#define INET6 1
39+
40+/* PPP < 2.5.0 defines and exports VERSION which overlaps with current package VERSION define.
41+ * this silly macro magic is to work around that. */
42+#undef VERSION
43+#include <pppd/pppd.h>
44+
45+#ifndef PPPD_VERSION
46+#define PPPD_VERSION VERSION
47+#endif
48+
49+#include <pppd/fsm.h>
50+#include <pppd/ccp.h>
51+#include <pppd/eui64.h>
52+#include <pppd/ipcp.h>
53+#include <pppd/ipv6cp.h>
54+#include <pppd/eap.h>
55+#include <pppd/upap.h>
56+
57+#ifdef HAVE_PPPD_CHAP_H
58+#include <pppd/chap.h>
59+#endif
60+
61+#ifdef HAVE_PPPD_CHAP_NEW_H
62+#include <pppd/chap-new.h>
63+#endif
64+
65+#ifdef HAVE_PPPD_CHAP_MS_H
66+#include <pppd/chap_ms.h>
67+#endif
68+
69+#ifndef PPP_PROTO_CHAP
70+#define PPP_PROTO_CHAP 0xc223
71+#endif
72+
73+#ifndef PPP_PROTO_EAP
74+#define PPP_PROTO_EAP 0xc227
75+#endif
76+
77+
78+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
79+
80+static inline bool
81+debug_on (void)
82+{
83+ return debug;
84+}
85+
86+static inline const char
87+*ppp_ipparam (void)
88+{
89+ return ipparam;
90+}
91+
92+static inline int
93+ppp_ifunit (void)
94+{
95+ return ifunit;
96+}
97+
98+static inline const char *
99+ppp_ifname (void)
100+{
101+ return ifname;
102+}
103+
104+static inline int
105+ppp_get_mtu (int idx)
106+{
107+ return netif_get_mtu(idx);
108+}
109+
110+typedef enum ppp_notify
111+{
112+ NF_PID_CHANGE,
113+ NF_PHASE_CHANGE,
114+ NF_EXIT,
115+ NF_SIGNALED,
116+ NF_IP_UP,
117+ NF_IP_DOWN,
118+ NF_IPV6_UP,
119+ NF_IPV6_DOWN,
120+ NF_AUTH_UP,
121+ NF_LINK_DOWN,
122+ NF_FORK,
123+ NF_MAX_NOTIFY
124+} ppp_notify_t;
125+
126+typedef void (ppp_notify_fn) (void *ctx, int arg);
127+
128+static inline void
129+ppp_add_notify (ppp_notify_t type, ppp_notify_fn *func, void *ctx)
130+{
131+ struct notifier **list[NF_MAX_NOTIFY] = {
132+ [NF_PID_CHANGE ] = &pidchange,
133+ [NF_PHASE_CHANGE] = &phasechange,
134+ [NF_EXIT ] = &exitnotify,
135+ [NF_SIGNALED ] = &sigreceived,
136+ [NF_IP_UP ] = &ip_up_notifier,
137+ [NF_IP_DOWN ] = &ip_down_notifier,
138+ [NF_IPV6_UP ] = &ipv6_up_notifier,
139+ [NF_IPV6_DOWN ] = &ipv6_down_notifier,
140+ [NF_AUTH_UP ] = &auth_up_notifier,
141+ [NF_LINK_DOWN ] = &link_down_notifier,
142+ [NF_FORK ] = &fork_notifier,
143+ };
144+
145+ struct notifier **notify = list[type];
146+ if (notify) {
147+ add_notifier(notify, func, ctx);
148+ }
149+}
150+
151+#endif /* #if WITH_PPP_VERSION < PPP_VERSION(2,5,0) */
152+#endif /* #if__LIBPPP_COMPAT_H__ */
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..aefdd3aa06 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,4 +1,4 @@
1From c7734e1547db967eccf242fe4b9e8a30b9ff141c Mon Sep 17 00:00:00 2001 1From 01974865e4d331eeaf25248bee1bb96539c450d9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Apr 2015 23:02:21 -0700 3Date: Mon, 6 Apr 2015 23:02:21 -0700
4Subject: [PATCH] resolve: musl does not implement res_ninit 4Subject: [PATCH] resolve: musl does not implement res_ninit
@@ -15,18 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 13 insertions(+), 21 deletions(-) 15 1 file changed, 13 insertions(+), 21 deletions(-)
16 16
17diff --git a/gweb/gresolv.c b/gweb/gresolv.c 17diff --git a/gweb/gresolv.c b/gweb/gresolv.c
18index 38a554e..a9e8740 100644 18index 954e7cf..2a9bc51 100644
19--- a/gweb/gresolv.c 19--- a/gweb/gresolv.c
20+++ b/gweb/gresolv.c 20+++ b/gweb/gresolv.c
21@@ -36,6 +36,7 @@ 21@@ -878,8 +879,6 @@ 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; 22 resolv->index = index;
31 resolv->nameserver_list = NULL; 23 resolv->nameserver_list = NULL;
32 24
@@ -35,7 +27,7 @@ index 38a554e..a9e8740 100644
35 return resolv; 27 return resolv;
36 } 28 }
37 29
38@@ -918,8 +917,6 @@ void g_resolv_unref(GResolv *resolv) 30@@ -919,8 +918,6 @@ void g_resolv_unref(GResolv *resolv)
39 31
40 flush_nameservers(resolv); 32 flush_nameservers(resolv);
41 33
@@ -44,7 +36,7 @@ index 38a554e..a9e8740 100644
44 g_free(resolv); 36 g_free(resolv);
45 } 37 }
46 38
47@@ -1022,24 +1019,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, 39@@ -1023,24 +1020,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
48 debug(resolv, "hostname %s", hostname); 40 debug(resolv, "hostname %s", hostname);
49 41
50 if (!resolv->nameserver_list) { 42 if (!resolv->nameserver_list) {
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index c64fa0d715..a021fd4655 100644
--- a/meta/recipes-connectivity/connman/connman/connman
+++ b/meta/recipes-connectivity/connman/connman/connman
@@ -10,49 +10,11 @@ fi
10 10
11set -e 11set -e
12 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() { 13do_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
58do_stop() { 20do_stop() {
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 @@
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://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
6 file://connman \
7 file://no-version-scripts.patch \
8 "
9
10SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
11
12SRC_URI[md5sum] = "1ed8745354c7254bdfd4def54833ee94"
13SRC_URI[sha256sum] = "cb30aca97c2f79ccaed8802aa2909ac5100a3969de74c0af8a9d73b85fc4932b"
14
15RRECOMMENDS_${PN} = "connman-conf"
16RCONFLICTS_${PN} = "networkmanager"
diff --git a/meta/recipes-connectivity/connman/connman_1.42.bb b/meta/recipes-connectivity/connman/connman_1.42.bb
new file mode 100644
index 0000000000..91ab9895ac
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman_1.42.bb
@@ -0,0 +1,17 @@
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://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
6 file://connman \
7 file://no-version-scripts.patch \
8 file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
9 file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
10 "
11
12SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
13
14SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa"
15
16RRECOMMENDS:${PN} = "connman-conf"
17RCONFLICTS:${PN} = "networkmanager"