From: Declan Tsien <declantsien@riseup.net>
To: 60752@debbugs.gnu.org
Subject: [bug#60752] [Declan Tsien] Re: [bug#60752] [PATCH] services: connman: Add option to disable wpa-supplicant.
Date: Sat, 14 Jan 2023 09:17:02 +0800 [thread overview]
Message-ID: <87wn5pap9t.fsf@riseup.net> (raw)
In-Reply-To: <874jsvc3ms.fsf@riseup.net>
[-- Attachment #1.1: Type: text/plain, Size: 281 bytes --]
-------------------- Start of forwarded message --------------------
From: Declan Tsien <declantsien@riseup.net>
To: Bruno Victal <mirai@makinata.eu>
Subject: Re: [bug#60752] [PATCH] services: connman: Add option to disable
wpa-supplicant.
Date: Sat, 14 Jan 2023 09:13:50 +0800
[-- Attachment #1.2.1.1: Type: text/plain, Size: 422 bytes --]
Bruno Victal <mirai@makinata.eu> 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.
[-- Attachment #1.2.1.2: services: connman: Add option to disable wpa-supplicant. --]
[-- Type: text/x-patch, Size: 3549 bytes --]
From 379d4afac343101a2351bab4f314496395828d8d Mon Sep 17 00:00:00 2001
From: Declan Tsien <declantsien@riseup.net>
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.
---
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
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19726,6 +19726,10 @@ The connman package to use.
@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
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 702404bc6c..39162fe822 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2023 Declan Tsien <declantsien@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1262,10 +1263,12 @@ (define network-manager-service-type
(define-record-type* <connman-configuration>
connman-configuration make-connman-configuration
connman-configuration?
- (connman connman-configuration-connman
- (default connman))
- (disable-vpn? connman-configuration-disable-vpn?
- (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)))
(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)
- (let ((connman (connman-configuration-connman config))
- (disable-vpn? (connman-configuration-disable-vpn? config)))
+ (let ((connman (connman-configuration-connman config))
+ (disable-vpn? (connman-configuration-disable-vpn? config))
+ (disable-wpa-supplicant? (connman-configuration-disable-wpa-supplicant? config)))
(list (shepherd-service
(documentation "Run Connman")
(provision '(networking))
- (requirement
- '(user-processes dbus-system loopback wpa-supplicant))
+ (requirement (append '(user-processes dbus-system loopback)
+ (if disable-wpa-supplicant? '() '(wpa-supplicant))))
(start #~(make-forkexec-constructor
(list (string-append #$connman
"/sbin/connmand")
--
2.38.1
[-- Attachment #1.2.1.3: Type: text/plain, Size: 129 bytes --]
This way, connman service can let users disable wireless adapters or hook
in a another implementation like iwd.
Cheers,
Declan
[-- Attachment #1.2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 690 bytes --]
[-- Attachment #1.3: Type: text/plain, Size: 67 bytes --]
-------------------- End of forwarded message --------------------
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 690 bytes --]
next prev parent reply other threads:[~2023-01-14 1:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <874jstc3zl.fsf@riseup.net>
2023-01-12 12:56 ` [bug#60752] [PATCH] services: connman: Add iwd backend support Declan Tsien
2023-01-12 14:12 ` Bruno Victal
2023-01-12 14:31 ` Declan Tsien
2023-01-12 14:53 ` Bruno Victal
2023-01-12 15:22 ` Declan Tsien
2023-01-14 1:17 ` Declan Tsien [this message]
2023-01-14 1:54 ` bug#60752: Declan Tsien
2023-01-16 17:22 ` bug#60752: Andrew Tropin
2023-01-17 0:30 ` [bug#60752] Declan Tsien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn5pap9t.fsf@riseup.net \
--to=declantsien@riseup.net \
--cc=60752@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.