From patchwork Wed Apr 2 16:02:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 60636 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AE22C3601F for ; Wed, 2 Apr 2025 16:02:32 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.groups.io with SMTP id smtpd.web11.12822.1743609745674132488 for ; Wed, 02 Apr 2025 09:02:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O1hhEZGs; spf=pass (domain: gmail.com, ip: 209.85.128.45, mailfrom: alex.kiernan@gmail.com) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43cf58eea0fso34265375e9.0 for ; Wed, 02 Apr 2025 09:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743609744; x=1744214544; darn=lists.openembedded.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LaBe6EtciBCn7tqX1OHqhAFLMpA0vrSRn2md9MVhCLE=; b=O1hhEZGsqvSj6pmm6hR1pUzuJv8ZhLlm1+VBYnQeY1LE1CxrtYqDx2w6j7FAeq9N24 Ml+h8Z+6Gdut0iYXCT1oS2HFFaxW2kT5jh01USrsZdwABAo6xGdfM8Y4gP6wCrCuj/jb 3xhqEmHyzyYnGsjvgjEwYL6Yb3Hk0GLmHpgmTl4jqPnCNbHleyG/jdIhUsobvIcXR5mG Y4BJJOlBnDKiZEN7RcP9U5wAH3eO4v6UxEmopLi0R5XPSsIm4g1GFch1E5rAn/OsCOde uRXXNyjLa8gCOvezZprArhgIuFfoy9V9lOhfRPz/BJRCFIqBiSpjLEPrTXVGh5V8EsmO iXZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743609744; x=1744214544; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LaBe6EtciBCn7tqX1OHqhAFLMpA0vrSRn2md9MVhCLE=; b=Ej06iVzos/miCbQ+/YHC46CuUqK4B80609Sop+cO0iTMvIGq/dAKQCKOeFtQIZIbnr YT6Pf8N69hmLQM0a+SHgp8F74MAYHvRl/KRLtVbTvXxLqiEqFN3sVN1P7fDiTUfbBufb v492xamU8W367Gq4oMEC8Vh1kpmosBr9yMBuvEBPFedkl0UGxbgyPqKcbZYr9JAJt7Qc T2Njm0gFOuNnXDjFlFO6jkyCvnZWZSSHW+JL6o/sj4B0r0yVg5iu1DPrGSutEtYi7BXN o0FD8jMn+eHg/XY8JlzMP1DHxhOf8A/a5LSy1UX5ty7ZU/x9A7RrhFE1Cw14jgmyIZfw Th8Q== X-Gm-Message-State: AOJu0YxoOTAxatkuv7tG93To4n9JuvfqUaWoChas8hoD2SLBmiVtIoFj gLtCw+W4xTFkzocs/3MgVFZgaRMUPHR7unc0GiF5mnm9DRzAGCIVMgRJIA== X-Gm-Gg: ASbGncun5Lq0PLDd4nwKIjQ4YpZoSsAcQV584Ouj5hhLci92ObDUWovUrbk9mD9/Piw P1ZvSwvsNInEwaTtF+2dSnH9srV9fWLw8fzoDmetRCfK9bNbgUpuqGYfeIyeAEVQPAV8wt4/CQ4 SwAm4pjBvOAm3x1yc0UxcfQMUiNH2qW6gTv5jHFuawJE+vMqguhVca0N71S04dSSiLwu/FLI5GD FhJpUQjrf4dpUThLXH+vndbyCVqlgigjap2JhNvXssg8ozSKF7iBktCxu2y3yejFIWVqEZaelnD Rm24SA1mtxRoMj1Ixe2AMkaPTsD8QcDo4RWO5migzkzc/UePRvxgUWN9zvo0UPjIxKTNU+ouYh0 q6o7s3l6hQBeQtrhrwJGhzw== X-Google-Smtp-Source: AGHT+IGft0qoqOBdC30d9CEqrBGxsJKG2xKaBrOtLK9Re9kfwOrkCTbi7nqLoxhCATlFrMdBRACb2g== X-Received: by 2002:a5d:5f81:0:b0:38d:b325:471f with SMTP id ffacd0b85a97d-39c2364b43fmr5477279f8f.15.1743609742592; Wed, 02 Apr 2025 09:02:22 -0700 (PDT) Received: from ip-10-0-0-134.eu-west-1.compute.internal ([2a05:d018:db1:fb00:c4f8:7a97:b7aa:1bfd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b79e0a3sm17543565f8f.71.2025.04.02.09.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 09:02:21 -0700 (PDT) From: Alex Kiernan Date: Wed, 02 Apr 2025 16:02:13 +0000 Subject: [PATCH OE-Core 1/5] connman: Merge .inc into .bb MIME-Version: 1.0 Message-Id: <20250402-connman-v1-1-2e4fbbb7caf9@gmail.com> References: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> In-Reply-To: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 02 Apr 2025 16:02:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/214281 No functional changes. Signed-off-by: Alex Kiernan --- meta/recipes-connectivity/connman/connman.inc | 221 --------------------- meta/recipes-connectivity/connman/connman_1.44.bb | 223 +++++++++++++++++++++- 2 files changed, 221 insertions(+), 223 deletions(-) diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc deleted file mode 100644 index 804c2db9a7eeae2a294e3ae64b86b3e3fe344c35..0000000000000000000000000000000000000000 --- a/meta/recipes-connectivity/connman/connman.inc +++ /dev/null @@ -1,221 +0,0 @@ -SUMMARY = "A daemon for managing internet connections within embedded devices" -DESCRIPTION = "The ConnMan project provides a daemon for managing \ -internet connections within embedded devices running the Linux \ -operating system. The Connection Manager is designed to be slim and \ -to use as few resources as possible, so it can be easily integrated. \ -It is a fully modular system that can be extended, through plug-ins, \ -to support all kinds of wired or wireless technologies. Also, \ -configuration methods, like DHCP and domain name resolving, are \ -implemented using plug-ins." -HOMEPAGE = "http://connman.net/" -BUGTRACKER = "https://01.org/jira/browse/CM" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" - -inherit autotools pkgconfig systemd update-rc.d update-alternatives - -CVE_PRODUCT = "connman connection_manager" - -DEPENDS = "dbus glib-2.0 ppp" - -EXTRA_OECONF += "\ - ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ - ac_cv_path_PPPD=${sbindir}/pppd \ - --enable-debug \ - --enable-loopback \ - --enable-ethernet \ - --enable-tools \ - --disable-polkit \ - --runstatedir=/run \ -" -# For smooth operation it would be best to start only one wireless daemon at a time. -# If wpa-supplicant is running, connman will use it preferentially. -# Select either wpa-supplicant or iwd -WIRELESS_DAEMON ??= "wpa-supplicant" - -PACKAGECONFIG ??= "wispr iptables client\ - ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \ -" - -# If you want ConnMan to support VPN, add following statement into -# local.conf or distro config -# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp" - -PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" -PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi" -PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" -PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" -PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant" -PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" -PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," -PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" -PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" -PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" -PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" -# WISPr support for logging into hotspots, requires TLS -PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," -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" -PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" -PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" -PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" -PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" - -INITSCRIPT_NAME = "connman" -INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." - -python __anonymous () { - systemd_packages = "${PN} ${PN}-wait-online" - pkgconfig = d.getVar('PACKAGECONFIG') - if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): - systemd_packages += " ${PN}-vpn" - d.setVar('SYSTEMD_PACKAGES', systemd_packages) -} - -SYSTEMD_SERVICE:${PN} = "connman.service" -SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" -SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" -ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" -ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" - -do_install:append() { - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman - sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman - fi - - install -d ${D}${bindir} - install -m 0755 ${B}/tools/*-test ${D}${bindir} - if [ -e ${B}/tools/wispr ]; then - install -m 0755 ${B}/tools/wispr ${D}${bindir} - fi - - # We don't need to package an empty directory - rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts - - # Automake 1.12 won't install empty directories, but we need the - # plugins directory to be present for ownership - mkdir -p ${D}${libdir}/connman/plugins - - # For read-only filesystem, do not create links during bootup - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman - fi -} - -# These used to be plugins, but now they are core -RPROVIDES:${PN} = "\ - connman-plugin-loopback \ - connman-plugin-ethernet \ - ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ - " - -PACKAGES_DYNAMIC += "^${PN}-plugin-.*" - -def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): - plugintype = pkg.split( '-' )[-1] - if plugintype in depmap: - rdepends = map(lambda x: multilib_prefix + x, \ - depmap[plugintype].split()) - d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends)) - if add_insane_skip: - d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so") - -python populate_packages:prepend() { - depmap = dict(pppd="ppp") - multilib_prefix = (d.getVar("MLPREFIX") or "") - - hook = lambda file,pkg,x,y,z: \ - add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) - plugin_dir = d.expand('${libdir}/connman/plugins/') - plugin_name = d.expand('${PN}-plugin-%s') - do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ - '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) - - hook = lambda file,pkg,x,y,z: \ - add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) - plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') - plugin_name = d.expand('${PN}-plugin-vpn-%s') - do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ - '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) -} - -PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" - -FILES:${PN}-tools = "${bindir}/wispr" -RDEPENDS:${PN}-tools = "${PN}" - -FILES:${PN}-tests = "${bindir}/*-test" - -FILES:${PN}-client = "${bindir}/connmanctl" -RDEPENDS:${PN}-client = "${PN}" - -FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ - ${libdir}/connman/plugins \ - ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ - ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ - ${datadir}/dbus-1/system-services/* \ - ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" - -FILES:${PN}-dev += "${libdir}/connman/*/*.la" - -PACKAGES =+ "${PN}-vpn ${PN}-wait-online" - -SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices" -DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \ -managing VPN connections within embedded devices running the Linux \ -operating system. The connman-vpnd handles all the VPN connections \ -and starts/stops VPN client processes when necessary. The connman-vpnd \ -provides a DBus API for managing VPN connections. All the different \ -VPN technogies are implemented using plug-ins." -FILES:${PN}-vpn += "${sbindir}/connman-vpnd \ - ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ - ${datadir}/dbus-1/system-services/net.connman.vpn.service \ - ${systemd_system_unitdir}/connman-vpn.service" - -SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network" -DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \ -the system waits until a network connection is established." -FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \ - ${systemd_system_unitdir}/connman-wait-online.service" - -SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ -to create a VPN connection to OpenVPN server." -FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ - ${libdir}/connman/plugins-vpn/openvpn.so" -RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" - -SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ -to create a VPN connection to Cisco3000 VPN Concentrator." -FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ - ${libdir}/connman/plugins-vpn/vpnc.so \ - ${libdir}/connman/scripts/vpn-script" -RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" - -SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ -to create a VPN connection to L2TP server." -FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ - ${libdir}/connman/plugins-vpn/l2tp.so" -RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" - -SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ -to create a VPN connection to PPTP server." -FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ - ${libdir}/connman/plugins-vpn/pptp.so" -RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb index 396d8bc5ce2c1a00e7fce1c7322b0f938de3c11c..1cd97d342f894bcffa6a7ed80ac8dc23e6a0565d 100644 --- a/meta/recipes-connectivity/connman/connman_1.44.bb +++ b/meta/recipes-connectivity/connman/connman_1.44.bb @@ -1,4 +1,23 @@ -require connman.inc +SUMMARY = "A daemon for managing internet connections within embedded devices" +DESCRIPTION = "The ConnMan project provides a daemon for managing \ +internet connections within embedded devices running the Linux \ +operating system. The Connection Manager is designed to be slim and \ +to use as few resources as possible, so it can be easily integrated. \ +It is a fully modular system that can be extended, through plug-ins, \ +to support all kinds of wired or wireless technologies. Also, \ +configuration methods, like DHCP and domain name resolving, are \ +implemented using plug-ins." +HOMEPAGE = "http://connman.net/" +BUGTRACKER = "https://01.org/jira/browse/CM" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" + +inherit autotools pkgconfig systemd update-rc.d update-alternatives + +CVE_PRODUCT = "connman connection_manager" + +DEPENDS = "dbus glib-2.0 ppp" SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ @@ -8,8 +27,208 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://0002-resolve-musl-does-not-implement-res_ninit.patch \ " - SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff" RRECOMMENDS:${PN} = "connman-conf" RCONFLICTS:${PN} = "networkmanager" + +EXTRA_OECONF += "\ + ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ + ac_cv_path_PPPD=${sbindir}/pppd \ + --enable-debug \ + --enable-loopback \ + --enable-ethernet \ + --enable-tools \ + --disable-polkit \ + --runstatedir=/run \ +" +# For smooth operation it would be best to start only one wireless daemon at a time. +# If wpa-supplicant is running, connman will use it preferentially. +# Select either wpa-supplicant or iwd +WIRELESS_DAEMON ??= "wpa-supplicant" + +PACKAGECONFIG ??= "wispr iptables client\ + ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \ +" + +# If you want ConnMan to support VPN, add following statement into +# local.conf or distro config +# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp" + +PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" +PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi" +PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" +PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" +PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant" +PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" +PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," +PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" +PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" +PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" +PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" +# WISPr support for logging into hotspots, requires TLS +PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," +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" +PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" +PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" +PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" +PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" + +INITSCRIPT_NAME = "connman" +INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." + +python __anonymous () { + systemd_packages = "${PN} ${PN}-wait-online" + pkgconfig = d.getVar('PACKAGECONFIG') + if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): + systemd_packages += " ${PN}-vpn" + d.setVar('SYSTEMD_PACKAGES', systemd_packages) +} + +SYSTEMD_SERVICE:${PN} = "connman.service" +SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" +SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman + sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman + fi + + install -d ${D}${bindir} + install -m 0755 ${B}/tools/*-test ${D}${bindir} + if [ -e ${B}/tools/wispr ]; then + install -m 0755 ${B}/tools/wispr ${D}${bindir} + fi + + # We don't need to package an empty directory + rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts + + # Automake 1.12 won't install empty directories, but we need the + # plugins directory to be present for ownership + mkdir -p ${D}${libdir}/connman/plugins + + # For read-only filesystem, do not create links during bootup + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman + fi +} + +# These used to be plugins, but now they are core +RPROVIDES:${PN} = "\ + connman-plugin-loopback \ + connman-plugin-ethernet \ + ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ + " + +PACKAGES_DYNAMIC += "^${PN}-plugin-.*" + +def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): + plugintype = pkg.split( '-' )[-1] + if plugintype in depmap: + rdepends = map(lambda x: multilib_prefix + x, \ + depmap[plugintype].split()) + d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends)) + if add_insane_skip: + d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so") + +python populate_packages:prepend() { + depmap = dict(pppd="ppp") + multilib_prefix = (d.getVar("MLPREFIX") or "") + + hook = lambda file,pkg,x,y,z: \ + add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) + plugin_dir = d.expand('${libdir}/connman/plugins/') + plugin_name = d.expand('${PN}-plugin-%s') + do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ + '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) + + hook = lambda file,pkg,x,y,z: \ + add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) + plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') + plugin_name = d.expand('${PN}-plugin-vpn-%s') + do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ + '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) +} + +PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" + +FILES:${PN}-tools = "${bindir}/wispr" +RDEPENDS:${PN}-tools = "${PN}" + +FILES:${PN}-tests = "${bindir}/*-test" + +FILES:${PN}-client = "${bindir}/connmanctl" +RDEPENDS:${PN}-client = "${PN}" + +FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ + ${libdir}/connman/plugins \ + ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ + ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ + ${datadir}/dbus-1/system-services/* \ + ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" + +FILES:${PN}-dev += "${libdir}/connman/*/*.la" + +PACKAGES =+ "${PN}-vpn ${PN}-wait-online" + +SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices" +DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \ +managing VPN connections within embedded devices running the Linux \ +operating system. The connman-vpnd handles all the VPN connections \ +and starts/stops VPN client processes when necessary. The connman-vpnd \ +provides a DBus API for managing VPN connections. All the different \ +VPN technogies are implemented using plug-ins." +FILES:${PN}-vpn += "${sbindir}/connman-vpnd \ + ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ + ${datadir}/dbus-1/system-services/net.connman.vpn.service \ + ${systemd_system_unitdir}/connman-vpn.service" + +SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network" +DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \ +the system waits until a network connection is established." +FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \ + ${systemd_system_unitdir}/connman-wait-online.service" + +SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" +DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ +to create a VPN connection to OpenVPN server." +FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ + ${libdir}/connman/plugins-vpn/openvpn.so" +RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" + +SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" +DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ +to create a VPN connection to Cisco3000 VPN Concentrator." +FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ + ${libdir}/connman/plugins-vpn/vpnc.so \ + ${libdir}/connman/scripts/vpn-script" +RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" + +SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" +DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ +to create a VPN connection to L2TP server." +FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ + ${libdir}/connman/plugins-vpn/l2tp.so" +RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" + +SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" +DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ +to create a VPN connection to PPTP server." +FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ + ${libdir}/connman/plugins-vpn/pptp.so" +RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" From patchwork Wed Apr 2 16:02:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 60633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08AB3C36017 for ; Wed, 2 Apr 2025 16:02:32 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web11.12823.1743609745938740141 for ; Wed, 02 Apr 2025 09:02:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bj4QM0sv; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: alex.kiernan@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-43cf680d351so6107955e9.0 for ; Wed, 02 Apr 2025 09:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743609744; x=1744214544; darn=lists.openembedded.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BeWdzIfO2DW+yUfvaZaspXmNGunE2+lJN2R+b207DXE=; b=bj4QM0svjWVBauifp3j2lOHyip338k398zdkriT42GyrIFXNeyCsMsgOcpSXEqzq0c no0Rdq3arxkLXo9ohjEiet591saDQKTpxdYKUpNlQJ7R7NaAWtdzGd5oeocFS49usSpD 3b/NVrlkidRpxDb0tsSp/UeVXmhBGXWL5SWc74Y+QwJTMGhVEXA0L2hLDSKQh4A/lXEH 87M0joPIsFyy7iCIuHQO5OWiKFF1a+0fonB4Z3Xm9+L2RN1xcXBC5azhqUBJKclyaeO4 MUUM95imljKrYguNf6O7Al4u9n8E5O5sH2srLNcBmosdLmFc3pCVN70ptTfgvwnuTLvX 5mAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743609744; x=1744214544; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BeWdzIfO2DW+yUfvaZaspXmNGunE2+lJN2R+b207DXE=; b=mnkxCIbNu70Mny5JGJJb583OsKyKYC2VDN6Y6JOP5m/qXKouotHzYJAsVQ8yk4KLaW 419HrNRUNX208kYGtW19WZ7g23D0cDBDxHvvkECv4eWrOPFOsZgexV8uke1n24si+I/V Ee1RVf6fxsUi3NUT+2l4ErbIFfV5AqrESOI0dduPxly4MECt26S6ybYfjYN8n2p52T+p txyI0Dmp9FZTFZOb/ULbkOOTNxoO7kUSbR83cSwDyPzgOAt2poQ2b+YzkXFpvYfxeLHi TnzRIhFxhWAfCahlZivKM+U+Im4YVNYMCI7K+iQmrLTFBxT41VKsW+cwAfGRHt0qb2xl sx0g== X-Gm-Message-State: AOJu0YwVuYCFU6TjQwHx3XSykjn/DBLjoSk8usTR2RFx9fm47XcQ1AVF eF01aOukstusox6zRZQfE0ALbTOrvRGsfsTmCgHOCEX8Rv6cQoXMuKVffA== X-Gm-Gg: ASbGncsDCE3YwMZXkr29DIVKe7WQhG6OejT9ZpXa223yKU+vaysjIApvLjIdBp3bSi9 DC0qOneLqX+weCDp7rrwE21hCh1dc1yNpE0Gc553iP8X1r+4UKIE50dI2hBt3qNItMKJbtq9WPE Wtfg4aeJ48tDZd7lkb9B9em24ws8MA8PedVLm7aPx9wDtwlFteXgArgxRwKB5fhaoyJ8HqE5j0h Zyyuih826Jtxl+m+DlXY9vrbt8Lul1kf+mdysOEFcRF+JWSLFPUZqNUXHK/GCJ0zzdsBgQ/kCJj NvQIl9vWrLao6ecumIRaRSA9BnQlvOjqPhjQZoyngPNFGLLfm/OlU48x95csSD6HMJcVPobw5dP U3z3TNP31LTw= X-Google-Smtp-Source: AGHT+IEmxR5iaMctEpodHF/gumsteH1g7r1Pai7AWwIjzOcK/KGpS+9fR6wZNugSpxj8DMSybpbg4g== X-Received: by 2002:a05:6000:1a89:b0:390:dec3:2780 with SMTP id ffacd0b85a97d-39c2e634ea7mr72334f8f.24.1743609743566; Wed, 02 Apr 2025 09:02:23 -0700 (PDT) Received: from ip-10-0-0-134.eu-west-1.compute.internal ([2a05:d018:db1:fb00:c4f8:7a97:b7aa:1bfd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b79e0a3sm17543565f8f.71.2025.04.02.09.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 09:02:22 -0700 (PDT) From: Alex Kiernan Date: Wed, 02 Apr 2025 16:02:14 +0000 Subject: [PATCH OE-Core 2/5] connman: Delete patches for gold and MIPS binutils fix MIME-Version: 1.0 Message-Id: <20250402-connman-v1-2-2e4fbbb7caf9@gmail.com> References: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> In-Reply-To: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 02 Apr 2025 16:02:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/214282 gold is no longer built/supported. The workaround for binutils on MIPS no longer appears to be required. Also fix up tabs/whitespace in shell functions, correct HOMEPAGE, drop broken BUGTRACKER link. Signed-off-by: Alex Kiernan --- ...ange-visibility-to-default-for-debug-symb.patch | 31 -------------- .../connman/connman/no-version-scripts.patch | 47 ---------------------- meta/recipes-connectivity/connman/connman_1.44.bb | 13 +++--- 3 files changed, 5 insertions(+), 86 deletions(-) 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 a68707b2fa62a6e1ac37e05b8706908c456cec02..0000000000000000000000000000000000000000 --- a/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c254226d4ebbd846c1f8169d70413a0d32d7ae77 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 7 Apr 2012 18:52:12 -0700 -Subject: [PATCH] plugin.h: Change visibility to default for debug symbols - -gold refuses to link in undefined weak symbols which -have hidden visibility - -Signed-off-by: Khem Raj - -Upstream-Status: Pending ---- - include/plugin.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/plugin.h b/include/plugin.h -index 8d2bb08..a12a6be 100644 ---- a/include/plugin.h -+++ b/include/plugin.h -@@ -89,9 +89,9 @@ struct connman_plugin_desc { - #else - #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \ - extern struct connman_debug_desc __start___debug[] \ -- __attribute__ ((weak, visibility("hidden"))); \ -+ __attribute__ ((weak, visibility("default"))); \ - extern struct connman_debug_desc __stop___debug[] \ -- __attribute__ ((weak, visibility("hidden"))); \ -+ __attribute__ ((weak, visibility("default"))); \ - extern struct connman_plugin_desc connman_plugin_desc \ - __attribute__ ((visibility("default"))); \ - struct connman_plugin_desc connman_plugin_desc = { \ 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 3667a166f69346c3ca3592d179cc1baaa16cb1b4..0000000000000000000000000000000000000000 --- a/meta/recipes-connectivity/connman/connman/no-version-scripts.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 67f37aafcc8ef5d2eb006387e7bec21f74518727 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Tue, 9 Aug 2016 12:12:02 +0100 -Subject: [PATCH] connman: disable version-scripts to fix crashes at startup - -With binutils 2.27 on at least MIPS, connmand will crash on startup. This -appears to be due to the symbol visibilty scripts hiding symbols that stdio -looks up at runtime, resulting in it segfaulting. - -This certainly appears to be a bug in binutils 2.27 although the problem has -been known about for some time: - -https://sourceware.org/bugzilla/show_bug.cgi?id=17908 - -As the version scripts are only used to hide symbols from plugins we can safely -remove the scripts to work around the problem until binutils is fixed. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton ---- - Makefile.am | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 3dc3bb5..3be5ccb 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -143,8 +143,7 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \ - @GIO_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @GNUTLS_LIBS@ \ - -lresolv -ldl -lrt - --src_connmand_LDFLAGS = -Wl,--export-dynamic \ -- -Wl,--version-script=$(srcdir)/src/connman.ver -+src_connmand_LDFLAGS = -Wl,--export-dynamic - - src_connmand_wait_online_SOURCES = src/connmand-wait-online.c - -@@ -187,8 +186,7 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \ - @GIO_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @GNUTLS_LIBS@ \ - -lresolv -ldl - --vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \ -- -Wl,--version-script=$(srcdir)/vpn/vpn.ver -+vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic - endif - - BUILT_SOURCES = $(local_headers) src/builtin.h $(service_files) \ diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb index 1cd97d342f894bcffa6a7ed80ac8dc23e6a0565d..553a377684c67190bbf274a28759bc1825b21d75 100644 --- a/meta/recipes-connectivity/connman/connman_1.44.bb +++ b/meta/recipes-connectivity/connman/connman_1.44.bb @@ -7,8 +7,7 @@ It is a fully modular system that can be extended, through plug-ins, \ to support all kinds of wired or wireless technologies. Also, \ configuration methods, like DHCP and domain name resolving, are \ implemented using plug-ins." -HOMEPAGE = "http://connman.net/" -BUGTRACKER = "https://01.org/jira/browse/CM" +HOMEPAGE = "https://web.git.kernel.org/pub/scm/network/connman/connman.git/about/" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" @@ -20,10 +19,8 @@ CVE_PRODUCT = "connman connection_manager" DEPENDS = "dbus glib-2.0 ppp" SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ - file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ file://connman \ - file://no-version-scripts.patch \ file://0002-resolve-musl-does-not-implement-res_ninit.patch \ " @@ -116,10 +113,10 @@ do_install:append() { # plugins directory to be present for ownership mkdir -p ${D}${libdir}/connman/plugins - # For read-only filesystem, do not create links during bootup - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman - fi + # For read-only filesystem, do not create links during bootup + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman + fi } # These used to be plugins, but now they are core From patchwork Wed Apr 2 16:02:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 60634 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E96BEC3601A for ; Wed, 2 Apr 2025 16:02:31 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.web11.12824.1743609746422020712 for ; Wed, 02 Apr 2025 09:02:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jZDeg1yQ; spf=pass (domain: gmail.com, ip: 209.85.221.47, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-39c1ef4ae3aso629435f8f.1 for ; Wed, 02 Apr 2025 09:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743609744; x=1744214544; darn=lists.openembedded.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1TIj0IJjRzT3fFVe29NLLrZNltJEhMy6SWtqRnSaTHc=; b=jZDeg1yQ2ZCUPoB0hXDTMrBfZkCP93mMs6MxDsPtAQYCyZmGZXsLoZXu48yAGVXWsI 9dZ2kcCUvSmaYgN+U6VBlx/OzVo3t55sMvJdSAIhXgjjvRiwEGtgv4yMxGL08yxcTe78 zf2X5P3GlCCpeTar/CxpqzOoklkAipJHdR9yTBhQOqtXZqi1FZ1EysJTqcLd80iHLGwb L6wiZkh4S4aDDESxXUszClv73aoOwLwQIVsarFRoU269HFszj7xQNzUGlYp8tvC8Q07v szBgLdqTzBUu9xw3ezvhIW86fjrZ3E9zoC09g0K4D1fDv3gsZc5WYSQvA/SQHbtIB99m ZohQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743609744; x=1744214544; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1TIj0IJjRzT3fFVe29NLLrZNltJEhMy6SWtqRnSaTHc=; b=fIX4GbnZd5W/joZWJmQ1Wu/8yoNZBUdd8PWi1LJbj8SbbcwJ+9gnSuTiCivLdpRzMP IyOBRQUfioqeWGQqFI+1cVsHPyv0ilOps0M43l9Xm5V2mTGLBar4O4gOFs1VNPs/zlwT PUYLEi3VlWfY/wb4wFUveRbw1iOCG3KtFrOCHPf1qu7y6/XrVGNLPgb+1ciWaStErLY3 8WR+JkuZ78kV1rwLiZPqzwBwlnCggB906GJ/v7r2vOwgF1j7aZoOQF9eUsVQraOdMgpq pjYwvOu8Y69V/PpJu3+1BDITKluV/nuWUGtRuOE/HAMg1P7fQJcVXxGOLJKj7eaKlTVa 3vaw== X-Gm-Message-State: AOJu0YxU+WAfOL0swEsrx7fda1YXFDUXzsnuYmEk1Ic/G2HAMqEFri3R dns5lcFXu1hBw6it/Km63wFH4M3O90G2btFSNc2UCEf1RCkyFrBlZl3nwg== X-Gm-Gg: ASbGncuZIsXiRp3aibkZG1v8+b6K2R95qMQL/PfU344HwiLoVn/WqfebCucWGgFmF2l +zzuEm/Ei1SttMEGEcf36o59zSNu1XfNyZPg11ZUw0YFRs6pvM91sCysUjbgS3FDPnupXRkqYuU zM7NMtjatfmM+N0OkpZAh9wHGKKYNzPGTLq+DcfyKK5ic1jhpoHtCO134AmpMDbWy+kJWTIK8fJ fRLUiU2nV5Ufh/B0HUSOuOXNwEG80mJApAqjIhyUUb37qhzIMKFHDSYvaIq/MHKd/eh07Oiws/h Pwc38Hxr6iV6TUUmn9PD+jJd74kBkrL6JydacU4UGSlDj2zHOtSXP9UXDIrosggGWcM69yA+S5l qAHeJuT3RXRA= X-Google-Smtp-Source: AGHT+IFpzZLog4tqV/A2Pm0ovipElmZbEni3QDwmNHLgXy11ypmLpuoi+o1vdU4OViQA4BfPYbj5GA== X-Received: by 2002:a05:6000:420f:b0:38d:ae1e:2f3c with SMTP id ffacd0b85a97d-39c2e636b68mr76757f8f.25.1743609744069; Wed, 02 Apr 2025 09:02:24 -0700 (PDT) Received: from ip-10-0-0-134.eu-west-1.compute.internal ([2a05:d018:db1:fb00:c4f8:7a97:b7aa:1bfd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b79e0a3sm17543565f8f.71.2025.04.02.09.02.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 09:02:23 -0700 (PDT) From: Alex Kiernan Date: Wed, 02 Apr 2025 16:02:15 +0000 Subject: [PATCH OE-Core 3/5] connman: Move ppp from DEPENDS to PACKAGECONFIG MIME-Version: 1.0 Message-Id: <20250402-connman-v1-3-2e4fbbb7caf9@gmail.com> References: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> In-Reply-To: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 02 Apr 2025 16:02:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/214283 ppp is only required by connman when building the L2TP or PPTP plugins. Move it from DEPENDS to PACKAGECONFIG so it's only there when required. Signed-off-by: Alex Kiernan --- meta/recipes-connectivity/connman/connman_1.44.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb index 553a377684c67190bbf274a28759bc1825b21d75..aa9da070dec1b4aac02019ae9c3158256b534c61 100644 --- a/meta/recipes-connectivity/connman/connman_1.44.bb +++ b/meta/recipes-connectivity/connman/connman_1.44.bb @@ -16,7 +16,7 @@ inherit autotools pkgconfig systemd update-rc.d update-alternatives CVE_PRODUCT = "connman connection_manager" -DEPENDS = "dbus glib-2.0 ppp" +DEPENDS = "dbus glib-2.0" SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ @@ -63,8 +63,8 @@ PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" -PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" -PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" +PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,ppp,xl2tpd" +PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,ppp,pptp-linux" # WISPr support for logging into hotspots, requires TLS PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," 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" From patchwork Wed Apr 2 16:02:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 60632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E81D3C28B20 for ; Wed, 2 Apr 2025 16:02:31 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web10.12863.1743609747385590314 for ; Wed, 02 Apr 2025 09:02:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eJi9gmCM; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-39727fe912cso2694584f8f.3 for ; Wed, 02 Apr 2025 09:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743609745; x=1744214545; darn=lists.openembedded.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vq0EPlPpZuHlRzrxuFpZuR/gR2YJwok5E2yWc17Aos0=; b=eJi9gmCMjKCpSlh1ne2M5i6Ghfw2SowGY2+nYTMYyj32wckjAkUyADDpCc0g6QeTXi XQgUU/H98q3jVHLgGT6HdBDC0n2xE+8gplh1rxa4ma51kzxLMOYnktJ8sOIs1gU7kqOL ZMjjHyb0qX1MGL6hRe/96HAqzVUSXy7H0MCvRFOVFKOvNMrynGHTznj/H57WPBbpiod/ FL1LgHEijFodLhUvwx2FTVHHh946sHBAGgMo+JYC/Sfc89fnANVFHEFeUUkDZ340ZiiY nLt0iDwFB3BFBXM5ITgt+AXCxUcXLcn0M3FrB8ASDwei+EeM9MnCqLsryNtzNyKYAl9A 8M/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743609745; x=1744214545; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vq0EPlPpZuHlRzrxuFpZuR/gR2YJwok5E2yWc17Aos0=; b=KTk2Q/Wk9Ild+vhPpI3wxVFsXeKuAU8W0c2p/Wynyok9C9FnwZOFmcICYfqaKr8gdd h1vkp++c8Qrcaj4WUXw/kCzqbgbzD97Cgn/PmtoNGrcye/XebXHT/LMTl68T3Sd353ef JQRCBHHxOTu6wI9vUZcnubbbLwCfNPHyjygWcFvaobaEWq0/B2zizt2QBltKPWpuQFHA zLK9GAAZ58ae8C1kELLtnVvEIQ0QdpFkg5eYnAmy+GIX/umDdBf12SdovEaj3Erzh/R4 3QuOQoZnUpSHX/cjQvABOtXE4jXDvxwbpDo/a9feunuIovV0Gex4CwZdBGOBsyugTIJf APnA== X-Gm-Message-State: AOJu0YxvZmfsQJQVQvywEdvCEh+/MHrlm3Ejgbgu0xqo81rpBHcslq8q KAYgUQjeIxxiK4kVbqb8Ww0cdBuSPB6JMRTipeSQGZx6J3BkgSSB7R/G3A== X-Gm-Gg: ASbGncs6/cRMBJ6FV8qEOGqhk6IzW0fFPEySouZLnjEXzEMfTdbj5qrkAHBV71qMuXi A/XhL9a0d4Q77jgWbmhZnfG1AF1lEtA69w0CBLxK2PZDpIykH3xk1rsJ9WzMYeSYX3vT693Cqqo PnBGAOKKendTa1Xcd7sUR4Vp7hZEvwecFfXMMNgwe9AzyPungTfspSIolQZAuSO5U3JGdTP8g8h NdKPiqBgGaQVJiY4lv3nOR5N6OcEvn6WRuNAwbOzFoL3T8ycIyAa7Nmae4WbpjwKnxHD8rJXRR+ ILTj3mD5osqJCjsJDHyHGUgFly/bpcFoVm8FSJm1kuXfRynv1/Z+h+nql8UQpDg40UTeFXGlZpp 1fobviyDaPKI= X-Google-Smtp-Source: AGHT+IE+CmWnnx/yhZIbrcvsWDr9irFG3w6eha7TZq0TX2pfZsvV+YOKygOokoo+zIyN8h9Iwqm7Sw== X-Received: by 2002:a5d:47ac:0:b0:399:7916:a164 with SMTP id ffacd0b85a97d-39c29767a19mr3076681f8f.31.1743609744965; Wed, 02 Apr 2025 09:02:24 -0700 (PDT) Received: from ip-10-0-0-134.eu-west-1.compute.internal ([2a05:d018:db1:fb00:c4f8:7a97:b7aa:1bfd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b79e0a3sm17543565f8f.71.2025.04.02.09.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 09:02:24 -0700 (PDT) From: Alex Kiernan Date: Wed, 02 Apr 2025 16:02:16 +0000 Subject: [PATCH OE-Core 4/5] connman: Add all build options as PACKAGECONFIG MIME-Version: 1.0 Message-Id: <20250402-connman-v1-4-2e4fbbb7caf9@gmail.com> References: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> In-Reply-To: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 02 Apr 2025 16:02:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/214284 Add all missing build options as PACKAGECONFIG items. Add CONNMAN_FIREWALL to select iptables or nftables (one is required). Set dns-backend automatically based on systemd-resolved in DISTRO_FEATURES, then drop "connman.service: stop systemd-resolved when we use connman" as we now use connman's systemd-resolved support. Signed-off-by: Alex Kiernan --- ...vice-stop-systemd-resolved-when-we-use-co.patch | 26 ------- meta/recipes-connectivity/connman/connman_1.44.bb | 85 +++++++++++++--------- 2 files changed, 50 insertions(+), 61 deletions(-) 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 4597fe68fcdf6f301247747c52b1d4636ebec631..0000000000000000000000000000000000000000 --- a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 19aff57e4da920d9ca972903582305b4efe81ef3 Mon Sep 17 00:00:00 2001 -From: "Maxin B. John" -Date: Mon, 12 Jun 2017 16:52:39 +0300 -Subject: [PATCH] connman.service: stop systemd-resolved when we use connman - -Stop systemd-resolved service when we use connman as network manager. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Maxin B. John ---- - src/connman.service.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/connman.service.in b/src/connman.service.in -index 7376346..79e75d6 100644 ---- a/src/connman.service.in -+++ b/src/connman.service.in -@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman - After=dbus.service network-pre.target systemd-sysusers.service - Before=network.target multi-user.target shutdown.target - Wants=network.target -+Conflicts=systemd-resolved.service - - [Service] - Type=dbus diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb index aa9da070dec1b4aac02019ae9c3158256b534c61..2622a8ebfed0ceec7ac39fcf3ffad76291de5797 100644 --- a/meta/recipes-connectivity/connman/connman_1.44.bb +++ b/meta/recipes-connectivity/connman/connman_1.44.bb @@ -12,65 +12,79 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" -inherit autotools pkgconfig systemd update-rc.d update-alternatives - CVE_PRODUCT = "connman connection_manager" DEPENDS = "dbus glib-2.0" SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ - file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ file://connman \ file://0002-resolve-musl-does-not-implement-res_ninit.patch \ - " +" SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff" +inherit autotools pkgconfig systemd update-rc.d update-alternatives + +RDEPENDS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'wifi', '${WIRELESS_DAEMON}', '', d)}" RRECOMMENDS:${PN} = "connman-conf" -RCONFLICTS:${PN} = "networkmanager" EXTRA_OECONF += "\ - ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ - ac_cv_path_PPPD=${sbindir}/pppd \ - --enable-debug \ - --enable-loopback \ - --enable-ethernet \ + --enable-datafiles \ --enable-tools \ - --disable-polkit \ - --runstatedir=/run \ + --runstatedir='${runtimedir}' \ + --with-dns-backend='${@bb.utils.contains("DISTRO_FEATURES", "systemd-resolved", "systemd-resolved", "internal", d)}' \ + ac_cv_path_IP6TABLES_SAVE=${sbindir}/ip6tables-save \ + ac_cv_path_IPTABLES_SAVE=${sbindir}/iptables-save \ + ac_cv_path_PPPD=${sbindir}/pppd \ + ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ " + # For smooth operation it would be best to start only one wireless daemon at a time. # If wpa-supplicant is running, connman will use it preferentially. # Select either wpa-supplicant or iwd WIRELESS_DAEMON ??= "wpa-supplicant" -PACKAGECONFIG ??= "wispr iptables client\ - ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \ +# Choose "iptables" or "nftables" +CONNMAN_FIREWALL ??= "iptables" + +# Default is 16kB +CONNMAN_STATS_MAX_FILE_SIZE = "16384" + +PACKAGECONFIG ??= "client ethernet loopback wispr ${CONNMAN_FIREWALL} \ + ${@bb.utils.filter('DISTRO_FEATURES', '3g bluetooth nfc polkit selinux systemd usbgadget wifi', d)} \ + ${@bb.utils.filter('WIRELESS_DAEMON', 'iwd', d)} \ " -# If you want ConnMan to support VPN, add following statement into -# local.conf or distro config -# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp" - -PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" -PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi" -PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" -PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" -PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant" -PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" -PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," -PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" -PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" +PACKAGECONFIG[3g] = "--enable-ofono,--disable-ofono,ofono" +PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez5,bluez5" +PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" +PACKAGECONFIG[dundee] = "--enable-dundee,--disable-dundee" +PACKAGECONFIG[ethernet] = "--enable-ethernet,--disable-ethernet" +PACKAGECONFIG[hh2serial-gps] = "--enable-hh2serial-gps,--disable-hh2serial-gps" +PACKAGECONFIG[iospm] = "--enable-iospm,--disable-iospm" +PACKAGECONFIG[iptables] = ",,iptables,iptables,nftables" +PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd" +PACKAGECONFIG[loopback] = "--enable-loopback,--disable-loopback" +PACKAGECONFIG[nfc] = "--enable-neard,--disable-neard,neard" +PACKAGECONFIG[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" +PACKAGECONFIG[nmcompat] = "--enable-nmcompat,--disable-nmcompat" +PACKAGECONFIG[pacrunner] = "--enable-pacrunner,--disable-pacrunner" +PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" +PACKAGECONFIG[session-policy-local] = "--enable-session-policy-local,--disable-session-policy-local" +PACKAGECONFIG[stats] = "--enable-stats --with-stats-max-file-size=${CONNMAN_STATS_MAX_FILE_SIZE},--disable-stats" +PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${nonarch_libdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" +PACKAGECONFIG[test] = "--enable-test,--disable-test" +PACKAGECONFIG[tist] = "--enable-tist,--disable-tist" +PACKAGECONFIG[usbgadget] = "--enable-gadget,--disable-gadget" +PACKAGECONFIG[wifi] = "--enable-wifi,--disable-wifi" +PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls" + PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,ppp,xl2tpd" +PACKAGECONFIG[openconnect] = "--enable-openconnect --with-openconnect=${sbindir}/openconnect,--disable-openconnect,openconnect,openconnect" +PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,ppp,pptp-linux" -# WISPr support for logging into hotspots, requires TLS -PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," -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" -PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" -PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" -PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" +PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" INITSCRIPT_NAME = "connman" @@ -115,6 +129,7 @@ do_install:append() { # For read-only filesystem, do not create links during bootup if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir} ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman fi } From patchwork Wed Apr 2 16:02:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 60635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0915BC3601C for ; Wed, 2 Apr 2025 16:02:32 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.web11.12826.1743609747872460527 for ; Wed, 02 Apr 2025 09:02:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TI2AC3QZ; spf=pass (domain: gmail.com, ip: 209.85.221.49, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-39c14016868so3322821f8f.1 for ; Wed, 02 Apr 2025 09:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743609746; x=1744214546; darn=lists.openembedded.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oRgM1Pe7pyHMEIefzoNAMNtGX8C1xl1ulYnVoJI0Y14=; b=TI2AC3QZ/B+jC1WqnxR6clGtBVo6zr0pIdV3KBcfJ1ShE9EByG8bqRs5xerp/ynNNX Nyrrea0GGB2LJgsEWDO7N5j4u9iwVEsi8rb6mMCyvfBQrhngf2qrwWZAoMu1V6xRzfXR e01UuKuUFENnPxoaxFQsccu0L3m5PYb7BNKcEWbA3Ch8d/GFf+zwTJs5le0InK/bk3Lv RhhelZgEPyO38BfNkhV1wziOSjOwkvlODLLCIv11C/cJpNln+bJj7RCcNUUnuH8MbDV0 E9jpWuN/fvvscB2XY/CC8SWgymUXGOsu1Pkhjlp+WSxTGiFv0Y9w64UJb3aslxjoRS9t rfrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743609746; x=1744214546; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oRgM1Pe7pyHMEIefzoNAMNtGX8C1xl1ulYnVoJI0Y14=; b=Na4a6GWiDCblsuZWbgo1HLMVlvJ4Ttc7OM285btexRwkZ1LDCuuWXH75lm6BgjtmPF MmMZ+7mNjyHehBw25Nj8BowHrmnNwty+tIHayg7FBnmrCZgr8dLsRLRaxLX1XhiAbtAA fRjUIosDeHUrFKb9z++NrRaT++qVKhuNbut7NztYw1K5FC1NazshGM+BfNwhJGxN7np7 Xt/1E//l4TOwsJKW8+/Gcmv/Foyys1kRa+v19qBo3MTHaosZcOIky3TdQGskzNILVU/d TNRaCy5nqVnoPqK/KqU3+8ZAMSXNlkEpfouuAlOMRpFOTyUjaxbaOWzcTAcObuov9Np8 Kqqw== X-Gm-Message-State: AOJu0Yxh7LvUiYEpr8BcNV02Y5ria21P1tvXMHblVs9M+gbJhHP4g6qp Amc/JrskV4TC+/T9BVv1cW3yXPLymFpXgqFMF5SLd02j0Lb8apm3A1kT7A== X-Gm-Gg: ASbGnctajCZ6qlluWjr4D5OpCDGa8Rpf1AnWRr/tBXZup7U6cFxOi5yuEMbtWcMypuj otemp1Kcs7U3CtuJqc3h4sMWMgvYLOE8HV4uaFDLaD6CSevy4vQlga01KLJ2+lQRyC35uqpIUq8 nlD2x31746fEomLb7mrZ5daH6NZsXc0Mu8LfxjSPI2/cMGTaHq7sEGOBKIC2UbPvWFYGIcS14nD u7acA3waxvOyHkDC5NkjEt5VZKg91Lbc0EKrL7Pq2hJihlyl6W+q5bm1PxbZE19lnlQhON2iguB +pF7aP65nUIMowacJsK2UjgL2lBRdhMR8HMzHzWRNjEXY4GoaFRJeba8Srkfx8jsLu7LaLaGfKr kFMMgQYJUUXw= X-Google-Smtp-Source: AGHT+IHoOL5436jh55jiQ1/v8KGzV2MPGcaXzSXRXvQhwZhRB4M4v7quNmX0lnRJyAzNQ8e45k6BSQ== X-Received: by 2002:a05:6000:1867:b0:39c:12f2:2f86 with SMTP id ffacd0b85a97d-39c12f2306bmr13711490f8f.8.1743609745684; Wed, 02 Apr 2025 09:02:25 -0700 (PDT) Received: from ip-10-0-0-134.eu-west-1.compute.internal ([2a05:d018:db1:fb00:c4f8:7a97:b7aa:1bfd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b79e0a3sm17543565f8f.71.2025.04.02.09.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 09:02:25 -0700 (PDT) From: Alex Kiernan Date: Wed, 02 Apr 2025 16:02:17 +0000 Subject: [PATCH OE-Core 5/5] connman: Rework to avoid splitting into many single binary packages MIME-Version: 1.0 Message-Id: <20250402-connman-v1-5-2e4fbbb7caf9@gmail.com> References: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> In-Reply-To: <20250402-connman-v1-0-2e4fbbb7caf9@gmail.com> To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 02 Apr 2025 16:02:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/214285 This recipe predates PACKAGECONFIG (or maybe widespread usage?) and so to use the VPN options they had to be both enabled at the PACKAGECONFIG level and then included as a separate package. In addition the list of VPN packages has drifted so (for example) wireguard was not delivered this way. Remove most of the subordinate packages and just populate the main connman package based on PACKAGECONFIG. Keep connman-client separate as `connmanctl` has a dependency on readline (which is GPLv3 licensed) and separate out connman-tools for `stats-tool` and connman-tests for all the test binaries (which possibly in the future could be used as the basis of a ptest package). Signed-off-by: Alex Kiernan --- meta/recipes-connectivity/connman/connman_1.44.bb | 159 +++++----------------- 1 file changed, 34 insertions(+), 125 deletions(-) diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb index 2622a8ebfed0ceec7ac39fcf3ffad76291de5797..b1616351b5c2b1a7d4f2ac577db19ab566ceac0e 100644 --- a/meta/recipes-connectivity/connman/connman_1.44.bb +++ b/meta/recipes-connectivity/connman/connman_1.44.bb @@ -90,17 +90,11 @@ PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." -python __anonymous () { - systemd_packages = "${PN} ${PN}-wait-online" - pkgconfig = d.getVar('PACKAGECONFIG') - if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): - systemd_packages += " ${PN}-vpn" - d.setVar('SYSTEMD_PACKAGES', systemd_packages) -} - -SYSTEMD_SERVICE:${PN} = "connman.service" -SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" -SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" +SYSTEMD_SERVICE:${PN} = "\ + connman.service \ + connman-wait-online.service \ + ${@bb.utils.contains_any('PACKAGECONFIG', ['openconnect', 'openvpn', 'vpnc', 'l2tp', 'pptp', 'wireguard'], 'connman-vpn.service', '', d)} \ +" ALTERNATIVE_PRIORITY = "100" ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" @@ -114,18 +108,15 @@ do_install:append() { sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman fi - install -d ${D}${bindir} - install -m 0755 ${B}/tools/*-test ${D}${bindir} - if [ -e ${B}/tools/wispr ]; then - install -m 0755 ${B}/tools/wispr ${D}${bindir} - fi + for noinst_program in ${NOINST_TESTS} ${NOINST_TOOLS}; do + if [ -r "${B}/$noinst_program" ]; then + install -d ${D}${bindir} + install -m 0755 "${B}/$noinst_program" ${D}${bindir} + fi + done # We don't need to package an empty directory - rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts - - # Automake 1.12 won't install empty directories, but we need the - # plugins directory to be present for ownership - mkdir -p ${D}${libdir}/connman/plugins + rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts ${D}${libdir}/connman # For read-only filesystem, do not create links during bootup if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then @@ -134,113 +125,31 @@ do_install:append() { fi } -# These used to be plugins, but now they are core -RPROVIDES:${PN} = "\ - connman-plugin-loopback \ - connman-plugin-ethernet \ - ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ - " - -PACKAGES_DYNAMIC += "^${PN}-plugin-.*" - -def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): - plugintype = pkg.split( '-' )[-1] - if plugintype in depmap: - rdepends = map(lambda x: multilib_prefix + x, \ - depmap[plugintype].split()) - d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends)) - if add_insane_skip: - d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so") - -python populate_packages:prepend() { - depmap = dict(pppd="ppp") - multilib_prefix = (d.getVar("MLPREFIX") or "") - - hook = lambda file,pkg,x,y,z: \ - add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) - plugin_dir = d.expand('${libdir}/connman/plugins/') - plugin_name = d.expand('${PN}-plugin-%s') - do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ - '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) - - hook = lambda file,pkg,x,y,z: \ - add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) - plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') - plugin_name = d.expand('${PN}-plugin-vpn-%s') - do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ - '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) -} - -PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" +NOINST_TESTS = "tools/supplicant-test tools/dhcp-test tools/dhcp-server-test \ + tools/addr-test tools/web-test tools/resolv-test tools/dbus-test \ + tools/polkit-test tools/wpad-test tools/private-network-test \ + tools/session-test tools/dnsproxy-test tools/iptables-test tools/ip6tables-test \ + tools/iptables-unit tools/dnsproxy-standalone \ + unit/test-ippool unit/test-iptables \ +" +NOINST_TOOLS = "tools/stats-tool tools/wispr" -FILES:${PN}-tools = "${bindir}/wispr" -RDEPENDS:${PN}-tools = "${PN}" +PACKAGE_BEFORE_PN = "${PN}-client ${PN}-tests ${PN}-tools" -FILES:${PN}-tests = "${bindir}/*-test" +FILES:${PN} += " \ + ${datadir}/dbus-1/system-services \ + ${datadir}/dbus-1/system.d \ + ${datadir}/polkit-1 \ + ${nonarch_libdir}/tmpfiles.d/*.conf \ +" FILES:${PN}-client = "${bindir}/connmanctl" RDEPENDS:${PN}-client = "${PN}" -FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ - ${libdir}/connman/plugins \ - ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ - ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ - ${datadir}/dbus-1/system-services/* \ - ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" - -FILES:${PN}-dev += "${libdir}/connman/*/*.la" - -PACKAGES =+ "${PN}-vpn ${PN}-wait-online" - -SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices" -DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \ -managing VPN connections within embedded devices running the Linux \ -operating system. The connman-vpnd handles all the VPN connections \ -and starts/stops VPN client processes when necessary. The connman-vpnd \ -provides a DBus API for managing VPN connections. All the different \ -VPN technogies are implemented using plug-ins." -FILES:${PN}-vpn += "${sbindir}/connman-vpnd \ - ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ - ${datadir}/dbus-1/system-services/net.connman.vpn.service \ - ${systemd_system_unitdir}/connman-vpn.service" - -SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network" -DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \ -the system waits until a network connection is established." -FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \ - ${systemd_system_unitdir}/connman-wait-online.service" - -SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ -to create a VPN connection to OpenVPN server." -FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ - ${libdir}/connman/plugins-vpn/openvpn.so" -RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" - -SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ -to create a VPN connection to Cisco3000 VPN Concentrator." -FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ - ${libdir}/connman/plugins-vpn/vpnc.so \ - ${libdir}/connman/scripts/vpn-script" -RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" - -SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ -to create a VPN connection to L2TP server." -FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ - ${libdir}/connman/plugins-vpn/l2tp.so" -RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" - -SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" -DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ -to create a VPN connection to PPTP server." -FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ - ${libdir}/connman/plugins-vpn/pptp.so" -RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn" -RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" +FILES:${PN}-tests = "${@ ' '.join([os.path.join('${bindir}', os.path.basename(noinst_program)) for noinst_program in NOINST_TESTS.split()]) }" +RDEPENDS:${PN}-tests = "${PN}" +ALLOW_EMPTY:${PN}-tests = "1" + +FILES:${PN}-tools = "${@ ' '.join([os.path.join('${bindir}', os.path.basename(noinst_program)) for noinst_program in NOINST_TOOLS.split()]) }" +RDEPENDS:${PN}-tools = "${PN}" +ALLOW_EMPTY:${PN}-tools = "1"