diff options
Diffstat (limited to 'meta/recipes-connectivity/connman')
14 files changed, 365 insertions, 258 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 @@ | |||
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 | ||
8 | 7 | ||
9 | SRC_URI_append_qemuall = " file://wired.config \ | 8 | SRC_URI = "file://main.conf \ |
10 | file://wired-setup \ | 9 | " |
11 | file://wired-connection.service \ | ||
12 | " | ||
13 | PR = "r2" | ||
14 | 10 | ||
15 | S = "${WORKDIR}" | 11 | S = "${WORKDIR}" |
16 | 12 | ||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 13 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
18 | 14 | ||
19 | FILES_${PN} = "${localstatedir}/* ${datadir}/*" | 15 | FILES:${PN} = "${sysconfdir}/*" |
20 | 16 | ||
21 | do_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 | 18 | do_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 | |||
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..f6150d98ec 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/ \ |
@@ -23,8 +23,8 @@ S = "${WORKDIR}/git" | |||
23 | inherit autotools-brokensep gtk-icon-cache pkgconfig features_check | 23 | inherit autotools-brokensep gtk-icon-cache pkgconfig features_check |
24 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | 24 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
25 | 25 | ||
26 | RDEPENDS_${PN} = "connman" | 26 | RDEPENDS:${PN} = "connman" |
27 | 27 | ||
28 | do_install_append() { | 28 | do_install:append() { |
29 | install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/ | 29 | install -m 0644 ${UNPACKDIR}/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..073061eeda 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 \ | |||
9 | implemented using plug-ins." | 9 | implemented using plug-ins." |
10 | HOMEPAGE = "http://connman.net/" | 10 | HOMEPAGE = "http://connman.net/" |
11 | BUGTRACKER = "https://01.org/jira/browse/CM" | 11 | BUGTRACKER = "https://01.org/jira/browse/CM" |
12 | LICENSE = "GPLv2" | 12 | LICENSE = "GPL-2.0-only" |
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 13 | LIC_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 | ||
16 | inherit autotools pkgconfig systemd update-rc.d update-alternatives | 16 | inherit autotools pkgconfig systemd update-rc.d update-alternatives |
17 | 17 | ||
18 | CVE_PRODUCT = "connman connection_manager" | ||
19 | |||
18 | DEPENDS = "dbus glib-2.0 ppp" | 20 | DEPENDS = "dbus glib-2.0 ppp" |
19 | 21 | ||
20 | EXTRA_OECONF += "\ | 22 | EXTRA_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 | ||
35 | WIRELESS_DAEMON ??= "wpa-supplicant" | ||
29 | 36 | ||
30 | PACKAGECONFIG ??= "wispr iptables client\ | 37 | PACKAGECONFIG ??= "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 | ||
39 | PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" | 47 | 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" | 48 | PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi" |
41 | PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" | 49 | PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" |
42 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" | 50 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" |
51 | PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant" | ||
52 | PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" | ||
43 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," | 53 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," |
44 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" | 54 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" |
45 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" | 55 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" |
@@ -64,19 +74,19 @@ python __anonymous () { | |||
64 | d.setVar('SYSTEMD_PACKAGES', systemd_packages) | 74 | d.setVar('SYSTEMD_PACKAGES', systemd_packages) |
65 | } | 75 | } |
66 | 76 | ||
67 | SYSTEMD_SERVICE_${PN} = "connman.service" | 77 | SYSTEMD_SERVICE:${PN} = "connman.service" |
68 | SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" | 78 | SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" |
69 | SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" | 79 | SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" |
70 | 80 | ||
71 | ALTERNATIVE_PRIORITY = "100" | 81 | ALTERNATIVE_PRIORITY = "100" |
72 | ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" | 82 | 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)}" | 83 | 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)}" | 84 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" |
75 | 85 | ||
76 | do_install_append() { | 86 | do_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 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman |
80 | sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman | 90 | sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman |
81 | fi | 91 | fi |
82 | 92 | ||
@@ -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 |
103 | RPROVIDES_${PN} = "\ | 113 | RPROVIDES:${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 | ||
111 | RDEPENDS_${PN} = "\ | 121 | RDEPENDS:${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 | ||
126 | python populate_packages_prepend() { | 136 | python 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 | ||
145 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" | 155 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" |
146 | 156 | ||
147 | FILES_${PN}-tools = "${bindir}/wispr" | 157 | FILES:${PN}-tools = "${bindir}/wispr" |
148 | RDEPENDS_${PN}-tools ="${PN}" | 158 | RDEPENDS:${PN}-tools ="${PN}" |
149 | 159 | ||
150 | FILES_${PN}-tests = "${bindir}/*-test" | 160 | FILES:${PN}-tests = "${bindir}/*-test" |
151 | 161 | ||
152 | FILES_${PN}-client = "${bindir}/connmanctl" | 162 | FILES:${PN}-client = "${bindir}/connmanctl" |
153 | RDEPENDS_${PN}-client ="${PN}" | 163 | RDEPENDS:${PN}-client ="${PN}" |
154 | 164 | ||
155 | FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ | 165 | FILES:${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 | ||
162 | FILES_${PN}-dev += "${libdir}/connman/*/*.la" | 172 | FILES:${PN}-dev += "${libdir}/connman/*/*.la" |
163 | 173 | ||
164 | PACKAGES =+ "${PN}-vpn ${PN}-wait-online" | 174 | PACKAGES =+ "${PN}-vpn ${PN}-wait-online" |
165 | 175 | ||
166 | SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices" | 176 | SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices" |
167 | DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \ | 177 | DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \ |
168 | managing VPN connections within embedded devices running the Linux \ | 178 | managing VPN connections within embedded devices running the Linux \ |
169 | operating system. The connman-vpnd handles all the VPN connections \ | 179 | operating system. The connman-vpnd handles all the VPN connections \ |
170 | and starts/stops VPN client processes when necessary. The connman-vpnd \ | 180 | and starts/stops VPN client processes when necessary. The connman-vpnd \ |
171 | provides a DBus API for managing VPN connections. All the different \ | 181 | provides a DBus API for managing VPN connections. All the different \ |
172 | VPN technogies are implemented using plug-ins." | 182 | VPN technogies are implemented using plug-ins." |
173 | FILES_${PN}-vpn += "${sbindir}/connman-vpnd \ | 183 | FILES:${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 | ||
178 | SUMMARY_${PN}-wait-online = "A program that will return once ConnMan has connected to a network" | 188 | 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 \ | 189 | DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \ |
180 | the system waits until a network connection is established." | 190 | the system waits until a network connection is established." |
181 | FILES_${PN}-wait-online += "${sbindir}/connmand-wait-online \ | 191 | FILES:${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 | ||
184 | SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" | 194 | SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" |
185 | DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ | 195 | DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ |
186 | to create a VPN connection to OpenVPN server." | 196 | to create a VPN connection to OpenVPN server." |
187 | FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ | 197 | FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ |
188 | ${libdir}/connman/plugins-vpn/openvpn.so" | 198 | ${libdir}/connman/plugins-vpn/openvpn.so" |
189 | RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn" | 199 | RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn" |
190 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" | 200 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" |
191 | 201 | ||
192 | SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" | 202 | SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" |
193 | DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ | 203 | DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ |
194 | to create a VPN connection to Cisco3000 VPN Concentrator." | 204 | to create a VPN connection to Cisco3000 VPN Concentrator." |
195 | FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ | 205 | FILES:${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" |
198 | RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn" | 208 | RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn" |
199 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" | 209 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" |
200 | 210 | ||
201 | SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" | 211 | SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" |
202 | DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ | 212 | DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ |
203 | to create a VPN connection to L2TP server." | 213 | to create a VPN connection to L2TP server." |
204 | FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ | 214 | FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ |
205 | ${libdir}/connman/plugins-vpn/l2tp.so" | 215 | ${libdir}/connman/plugins-vpn/l2tp.so" |
206 | RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn" | 216 | RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn" |
207 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" | 217 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" |
208 | 218 | ||
209 | SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" | 219 | 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 \ | 220 | DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ |
211 | to create a VPN connection to PPTP server." | 221 | to create a VPN connection to PPTP server." |
212 | FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ | 222 | FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ |
213 | ${libdir}/connman/plugins-vpn/pptp.so" | 223 | ${libdir}/connman/plugins-vpn/pptp.so" |
214 | RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn" | 224 | RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn" |
215 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" | 225 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" |
diff --git a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch deleted file mode 100644 index dd012750a4..0000000000 --- a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 9fea099d0a3ece37d80ad70d32ebb8a93f8f3280 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Fri, 30 Oct 2020 13:48:45 +0800 | ||
4 | Subject: [PATCH] connman.service: stop systemd-networkd when using connman | ||
5 | |||
6 | Stop systemd-networkd service when we use connman as network manager. | ||
7 | |||
8 | Upstream-Status: Inappropriate [configuration] | ||
9 | |||
10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.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 79e75d6..014eafe 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-networkd.service systemd-networkd.socket | ||
24 | Conflicts=systemd-resolved.service | ||
25 | |||
26 | [Service] | ||
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
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 @@ | |||
1 | From cbba6638986c2de763981bf6fc59df6a86fed44f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 1 Jan 2024 17:42:21 -0800 | ||
4 | Subject: [PATCH v2] src/log.c: Include libgen.h for basename API | ||
5 | |||
6 | Use POSIX version of basename. This comes to front with latest musl | ||
7 | which dropped the declaration from string.h [1] it fails to build with | ||
8 | clang-17+ because it treats implicit function declaration as error. | ||
9 | |||
10 | Fix it by applying the basename on a copy of string since posix version | ||
11 | may modify the input string. | ||
12 | |||
13 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
14 | |||
15 | Upstream-Status: Submitted [https://lore.kernel.org/connman/20240102015917.3732089-1-raj.khem@gmail.com/T/#u] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | |||
19 | src/log.c | 6 ++++-- | ||
20 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/src/log.c b/src/log.c | ||
23 | index 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 | -- | ||
54 | 2.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 @@ | |||
1 | From af55a6a414d32c12f9ef3cab778385a361e1ad6d Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com> | ||
3 | Date: Sat, 25 Mar 2023 20:51:52 +0000 | ||
4 | Subject: [PATCH] vpn: Adding support for latest pppd 2.5.0 release | ||
5 | |||
6 | The API has gone through a significant overhaul, and this change fixes any compile issues. | ||
7 | 1) Fixes to configure.ac itself | ||
8 | 2) Cleanup in pppd plugin itself | ||
9 | |||
10 | Adding a libppp-compat.h file to mask for any differences in the version. | ||
11 | |||
12 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a48864a2e5d2a725dfc6eef567108bc13b43857f] | ||
13 | Signed-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 | |||
20 | diff --git a/scripts/libppp-compat.h b/scripts/libppp-compat.h | ||
21 | new file mode 100644 | ||
22 | index 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..9e2cc34995 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,88 @@ | |||
1 | From c7734e1547db967eccf242fe4b9e8a30b9ff141c Mon Sep 17 00:00:00 2001 | 1 | From 60783f0d885c9a0db8b6f1d528786321e53f1512 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); | ||
86 | -- | ||
87 | 2.39.2 | ||
88 | |||
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 | ||
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() { |
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 45c2934dec..0000000000 --- a/meta/recipes-connectivity/connman/connman_1.38.bb +++ /dev/null | |||
@@ -1,17 +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://0001-connman.service-stop-systemd-networkd-when-using-con.patch \ | ||
7 | file://connman \ | ||
8 | file://no-version-scripts.patch \ | ||
9 | " | ||
10 | |||
11 | SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" | ||
12 | |||
13 | SRC_URI[md5sum] = "1ed8745354c7254bdfd4def54833ee94" | ||
14 | SRC_URI[sha256sum] = "cb30aca97c2f79ccaed8802aa2909ac5100a3969de74c0af8a9d73b85fc4932b" | ||
15 | |||
16 | RRECOMMENDS_${PN} = "connman-conf" | ||
17 | RCONFLICTS_${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..5c60b9cb83 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman_1.42.bb | |||
@@ -0,0 +1,17 @@ | |||
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 | 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 | file://0002-resolve-musl-does-not-implement-res_ninit.patch \ | ||
11 | " | ||
12 | |||
13 | |||
14 | SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa" | ||
15 | |||
16 | RRECOMMENDS:${PN} = "connman-conf" | ||
17 | RCONFLICTS:${PN} = "networkmanager" | ||