From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CH0rCdoCwmOLOwAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 02:18:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gDk5CNoCwmMXUAEAG6o9tA (envelope-from ) for ; Sat, 14 Jan 2023 02:18:18 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CB9EE697D for ; Sat, 14 Jan 2023 02:18:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGVBM-00061k-G8; Fri, 13 Jan 2023 20:18:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGVBK-00061X-6y for guix-patches@gnu.org; Fri, 13 Jan 2023 20:18:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGVBJ-0004SJ-V4 for guix-patches@gnu.org; Fri, 13 Jan 2023 20:18:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGVBJ-0005Sb-Nc for guix-patches@gnu.org; Fri, 13 Jan 2023 20:18:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60752] [Declan Tsien] Re: [bug#60752] [PATCH] services: connman: Add option to disable wpa-supplicant. In-Reply-To: <874jsvc3ms.fsf@riseup.net> Resent-From: Declan Tsien Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 Jan 2023 01:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60752@debbugs.gnu.org Received: via spool by 60752-submit@debbugs.gnu.org id=B60752.167365903820930 (code B ref 60752); Sat, 14 Jan 2023 01:18:01 +0000 Received: (at 60752) by debbugs.gnu.org; 14 Jan 2023 01:17:18 +0000 Received: from localhost ([127.0.0.1]:52816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGVAc-0005RV-0e for submit@debbugs.gnu.org; Fri, 13 Jan 2023 20:17:18 -0500 Received: from mx1.riseup.net ([198.252.153.129]:48118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGVAa-0005RF-0P for 60752@debbugs.gnu.org; Fri, 13 Jan 2023 20:17:17 -0500 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4Nv0kZ1khtzDqCn for <60752@debbugs.gnu.org>; Sat, 14 Jan 2023 01:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1673659030; bh=VRowg0YvzpaCm8G3Rv98RvmNvYxtazCOxj7+NeeVzoE=; h=From:To:Subject:References:Date:From; b=Roi9OS0rmZSmAs4B9b2ICBAffjOaMFvD6P5BzcTSBkw7BvJnTIHkuEzIqXj8XWj2y xVKv4fw0frjF/OpRb/549QMPppwZGwwxSrpEoDjq69w8y0HDKwX65OE2X8gxN2SqEX XvhgrIemUb/8wvsQ0GODOO2zh3RQ7thof9+NzvbE= X-Riseup-User-ID: 1048524F661FFAC4911BC3F14D689A871E7214D367B1A1F3452E0085C7B69E5E Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4Nv0kY3KxWz5vZt for <60752@debbugs.gnu.org>; Sat, 14 Jan 2023 01:17:09 +0000 (UTC) From: Declan Tsien References: <874jstc3zl.fsf@riseup.net> Date: Sat, 14 Jan 2023 09:17:02 +0800 Message-ID: <87wn5pap9t.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="====-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=Roi9OS0r; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673659097; a=rsa-sha256; cv=none; b=OwQMv83d2hXc6HFvVz1MF8ppu5M+91mvfOA8yiIJfChVAusv97mpkjhZQTcU1KWSU0AExC UvvkhzvKfgtlTYwvLHr1jc2XCpzDiDJqBF6gghNTIn4jk1dcA3Gd2bGgpirZN6SnU2ZrGJ dQKZU1qvMxSTvHPg4EjqsvvicnVzWuc3St59Z1xzx0qDblXm18yhwsI//RLNYXPnGSLnMI bjnLPTHOzzzM9jNVhZ8KKvG9UQ/jfKRofde7n556FhYJNe/JFuftaLhbg0klQrdCJb2z9j ETF9Q/MIxz8IInxoZs7bdfkx8KDsBHN90X/lFYQq8nPTr4R6/uQyKnNRYKnTaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673659097; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=zaDntPIaEh+HkkNogh1I5oui68QYQ9kidQyvjou3gog=; b=LYa6slxeWxnVVnPm5/fwI0p9NxWgTTZ5ZVT2+6bcGW5DeJBOYcWVNO0IIdHST2Ol8ciWlf Ih3g8UrWMySpfLQhJGvwKCCSdZ30JHlD95gi2SKqeYq/l1v3hZgDXXF2PgSe1H3M+eKftJ 3kRsDn7aViHx/nuQgQ3b9rgc3Xwd0TlsMqLtldnTyAYrargWrWmNtlTFOsw8Z2Yhlx+TIo vtdl9R6ojXKwk+y4sTTNN9hpoATWeKawbrrov+CRuwtdl2AyfpqHXMd5F8ZVH9jRqlSFtn GHNjqIK148QqOgethdzOO+aC7Sf5Bd53QxIGqfEYYH1ZKDL6yrHgov/4fsWrCg== X-Migadu-Queue-Id: CB9EE697D X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=Roi9OS0r; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none) X-Migadu-Spam-Score: -3.90 X-Spam-Score: -3.90 X-TUID: iHXt8qhmgUr+ --====-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain -------------------- Start of forwarded message -------------------- From: Declan Tsien To: Bruno Victal Subject: Re: [bug#60752] [PATCH] services: connman: Add option to disable wpa-supplicant. Date: Sat, 14 Jan 2023 09:13:50 +0800 --=-=-= Content-Type: multipart/signed; boundary="==-=-=" --==-=-= Content-Type: multipart/mixed; boundary="===-=-=" --===-=-= Content-Type: text/plain Content-Disposition: inline Bruno Victal writes: > Hi, > > Does connman absolutely require a wireless adapter backend? > IMO if that's not the case, neither iwd nor wpa-supplicant backends should be pulled by connman. (or at least they should be required only if they are present among the services field) > This is because not every machine comes or wants to use a wireless adapter. > > > Cheers, > Bruno Hi, what about this. --===-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-services-connman-Add-option-to-disable-wpa-supplican.patch Content-Transfer-Encoding: quoted-printable Content-Description: services: connman: Add option to disable wpa-supplicant. From=20379d4afac343101a2351bab4f314496395828d8d Mon Sep 17 00:00:00 2001 From: Declan Tsien Date: Sat, 14 Jan 2023 08:57:02 +0800 Subject: [PATCH] services: connman: Add option to disable wpa-supplicant. * gnu/services/networking.scm (connman-configuration)[disable-wpa-supplicant?]: New field. (connman-shepherd-service): Applied disable-wpa-supplicant? logic. * doc/guix.texi: Add information about connman-configuration disable-wpa-supplicant? option. =2D-- doc/guix.texi | 4 ++++ gnu/services/networking.scm | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 751d0957d8..29be830bd4 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -19726,6 +19726,10 @@ The connman package to use. =20 @item @code{disable-vpn?} (default: @code{#f}) When true, disable connman's vpn plugin. + +@item @code{disable-wpa-supplicant?} (default: @code{#f}) +When true, remove @code{wpa-supplicant} requirement. Let users disable +wireless adapters or hook in a another implementation like @code{iwd}. @end table @end deftp =20 diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 702404bc6c..39162fe822 100644 =2D-- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -19,6 +19,7 @@ ;;; Copyright =C2=A9 2021 Maxime Devos ;;; Copyright =C2=A9 2021 Guillaume Le Vaillant ;;; Copyright =C2=A9 2022 Andrew Tropin +;;; Copyright =C2=A9 2023 Declan Tsien ;;; ;;; This file is part of GNU Guix. ;;; @@ -1262,10 +1263,12 @@ (define network-manager-service-type (define-record-type* connman-configuration make-connman-configuration connman-configuration? =2D (connman connman-configuration-connman =2D (default connman)) =2D (disable-vpn? connman-configuration-disable-vpn? =2D (default #f))) + (connman connman-configuration-connman + (default connman)) + (disable-vpn? connman-configuration-disable-vpn? + (default #f)) + (disable-wpa-supplicant? connman-configuration-disable-wpa-supplicant? + (default #f))) =20 (define (connman-activation config) (let ((disable-vpn? (connman-configuration-disable-vpn? config))) @@ -1280,13 +1283,14 @@ (define (connman-shepherd-service config) "Return a shepherd service for Connman" (and (connman-configuration? config) =2D (let ((connman (connman-configuration-connman config)) =2D (disable-vpn? (connman-configuration-disable-vpn? config))) + (let ((connman (connman-configuration-connman config)) + (disable-vpn? (connman-configuration-disable-vpn? conf= ig)) + (disable-wpa-supplicant? (connman-configuration-disable-wpa-suppl= icant? config))) (list (shepherd-service (documentation "Run Connman") (provision '(networking)) =2D (requirement =2D '(user-processes dbus-system loopback wpa-supplicant)) + (requirement (append '(user-processes dbus-system loopback) + (if disable-wpa-supplicant? '() '(wpa-sup= plicant)))) (start #~(make-forkexec-constructor (list (string-append #$connman "/sbin/connmand") =2D-=20 2.38.1 --===-=-= Content-Type: text/plain Content-Disposition: inline This way, connman service can let users disable wireless adapters or hook in a another implementation like iwd. Cheers, Declan --===-=-=-- --==-=-= Content-Type: application/pgp-signature; name=signature.asc Content-Transfer-Encoding: base64 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSExCQUVCQ0FBMUZpRUU5cFh6bnNZbDRJ RXp0WFdmRDhhSEEzWHY0dlVGQW1QQ0FjOFhIR1JsWTJ4aGJuUnoKYVdWdVFISnBjMlYxY0M1dVpY UUFDZ2tRRDhhSEEzWHY0dlV4SVF3QXV6WVZKemVBRnNHVDQ4Rnhob0FPSHJFVQpRMXAvU2lkU001 dTlNZ0s3SEJucXhEUjlXeU1WQW1iNXRha2YzMzFhRTdnVlQ0TkhROGVPKy9DbkRicThKYWpQCkND QmFYVExCbFlVMzQ5T3dUR1M2OU8xSlZDWXJpUU5FQVM4RVBuYjN3NXZIYzFpRnZKVFhOMHRVQUlL VXhTTzQKODRSdHRiWWtSUTYraStnM3UybjBBUnlhcFJSM0d3NlR4Sy81NDREWkc5eFVadDMvbzh1 ZEk5UFpVSnVjNDhTdAo3MDlwOFZxamtnT3JhMm5iYnNjaXdTZ3VJSVErWWI4VmJhRVF6YU51a2Jv SkJRTzJoU2lvRG1YYlRkZERHQ2tVCi9DWnFpM0hYd2orWTc4UFE5ZFNsVU9ROWFLcGw1UWU5QTU1 SnpONXE1eVVVemdQMlNGb3pKY0ZSK3g4WkMxZUMKOUVTVmdPeE5IL3MvTjV5VlgrUXJwWU5xZkE4 ck5zelBmNkcreEkvOXhmcllkZUtuQVoyZUFLWk1RRVdDdlI1WApaLzhVMFVRVFJLdG9NSUxlRVQ1 QWQxVmdjYWhOSWVMVXFHYjc2UmtuRW1ZVTNVKzVFemt2MWZ3ZmhnQlRhTVF2Ckp3UUFvMnR5RnVk UFE2dDJtdjdONGgwQ1lubnJXUnBtT1pud2xOM0YKPWVBZmsKLS0tLS1FTkQgUEdQIFNJR05BVFVS RS0tLS0t --==-=-=-- --=-=-= Content-Type: text/plain -------------------- End of forwarded message -------------------- --=-=-=-- --====-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHLBAEBCAA1FiEE9pXznsYl4IEztXWfD8aHA3Xv4vUFAmPCAo4XHGRlY2xhbnRz aWVuQHJpc2V1cC5uZXQACgkQD8aHA3Xv4vWgCQwAmtEq+SGtPiPOFqGZlxwWASpd rN2DTpoPNlHMRXZYJH/+E6VqMp9ewp+Q7cYMAonmy9IHeCtEb7SZjq6CS+tp6xzC tILOfpuYdAuF4H5MW3M3HXa8rAJXyy5KvY82X0LvOkrfXNpt+Cpcs+SqOsG9/aKo wOGWS94rxolYz3TytM5cEK9uMzSmGB9vzIWELBLR6DN11Bi2LdoTKwB9kSUTMMj/ CfMe0y1nVyBr0v7fM+hhYMknXz5E8C6k0w6cJKXnU/ewDEbuwX6y7ivDyuvSUt0W IgQeZet/yjoF3Qt7WX0v4vZxNJxub5OHXOqX+MHa+bC3SutxdBjOiq/AavUS0k2n OAneTVwhMFHA3WvFLZrKPb8Ep2OzOAIov67tiMwyYzE4IA/E3DhIG6H876kVsyQh Yc82LPIdkStOzjgTR5+GkOyga3xlqtVNxjxyl/kYPbbltdW3ZAfmox23tqrYf5Sj 1ptBTr0NftKYv6DFIfgYm/6bjDvSlcmNJr72F9V5 =p9S3 -----END PGP SIGNATURE----- --====-=-=--