all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Declan Tsien <declantsien@riseup.net>
To: 60752@debbugs.gnu.org
Subject: [bug#60752] [PATCH] services: connman: Add iwd backend support.
Date: Thu, 12 Jan 2023 20:56:59 +0800	[thread overview]
Message-ID: <874jsvc3ms.fsf@riseup.net> (raw)


[-- Attachment #1.1: 0001-services-connman-Add-iwd-backend-support.patch --]
[-- Type: text/x-patch, Size: 3251 bytes --]

From d15947bcbfd16b1509df555a2b05a5639dec923a Mon Sep 17 00:00:00 2001
From: Declan Tsien <declantsien@riseup.net>
Date: Thu, 12 Jan 2023 18:37:51 +0800
Subject: [PATCH] services: connman: Add iwd backend support.

* gnu/services/networking.scm (connman-configuration)[iwd?]: New
field.
(connman-shepherd-service): Applied iwd? logic.
* doc/guix.texi: Add information about connman-configuration iwd? option.
---
 doc/guix.texi               |  3 +++
 gnu/services/networking.scm | 13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 751d0957d8..ac483dacb9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19726,6 +19726,9 @@ The connman package to use.
 
 @item @code{disable-vpn?} (default: @code{#f})
 When true, disable connman's vpn plugin.
+
+@item @code{iwd?} (default: @code{#f})
+When true, ConnMan uses iwd to connect to wireless networks.
 @end table
 @end deftp
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 702404bc6c..f24c8f7063 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 © 2022 Declan Tsien <declantsien@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1265,7 +1266,8 @@ (define-record-type* <connman-configuration>
   (connman      connman-configuration-connman
                 (default connman))
   (disable-vpn? connman-configuration-disable-vpn?
-                (default #f)))
+                (default #f))
+  (iwd? connman-configuration-iwd? (default #f)))
 
 (define (connman-activation config)
   (let ((disable-vpn? (connman-configuration-disable-vpn? config)))
@@ -1281,18 +1283,21 @@ (define (connman-shepherd-service config)
   (and
    (connman-configuration? config)
    (let ((connman      (connman-configuration-connman config))
-         (disable-vpn? (connman-configuration-disable-vpn? config)))
+         (disable-vpn? (connman-configuration-disable-vpn? config))
+         (iwd? (connman-configuration-iwd? config)))
      (list (shepherd-service
             (documentation "Run Connman")
             (provision '(networking))
             (requirement
-             '(user-processes dbus-system loopback wpa-supplicant))
+             (append '(user-processes dbus-system loopback)
+                     (if iwd? '(iwd) '(wpa-supplicant))))
             (start #~(make-forkexec-constructor
                       (list (string-append #$connman
                                            "/sbin/connmand")
                             "--nodaemon"
                             "--nodnsproxy"
-                            #$@(if disable-vpn? '("--noplugin=vpn") '()))
+                            #$@(if disable-vpn? '("--noplugin=vpn") '())
+                            #$@(if iwd? '("--wifi=iwd_agent") '()))
 
                       ;; As connman(8) notes, when passing '-n', connman
                       ;; "directs log output to the controlling terminal in
-- 
2.38.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 690 bytes --]

             reply	other threads:[~2023-01-12 12:58 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 ` Declan Tsien [this message]
2023-01-12 14:12   ` [bug#60752] [PATCH] services: connman: Add iwd backend support 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   ` [bug#60752] [Declan Tsien] Re: [bug#60752] [PATCH] services: connman: Add option to disable wpa-supplicant Declan Tsien
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=874jsvc3ms.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.