Subject: bug#60752: closed (Re: bug#60752:)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 16 Jan 2023 17:23:02 +0000

Your bug report

#60752: [PATCH] services: connman: Add iwd backend support.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60752: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60752
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60752:
From: Andrew Tropin <[email-masked]>
To: Declan Tsien <[email-masked]>, [email-masked]
Date: Mon, 16 Jan 2023 21:22:11 +0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On 2023-01-14 09:54, Declan Tsien wrote:

> Started a new thread since the subject has changed
> https://issues.guix.gnu.org/60800

Let's keep the discussion in this thread, not to lose the context.

BTW, there is a retitle command for debbugs in case it necessary to
change the title of the bug. 

From what I see wpa-supplicant requirement is not needed, as Bruno
mentioned, there are use cases, where connman can be used without
wpa-supplicant or wireless backend at all.

According to the documentation I was able to find, to enable iwd support
--wifi=iwd_agent should be added to connmand, so I applied the first
patch with a few adjustments: Completely removed wpa-supplicant
requirement, realigned the code.  Unfortunately, I don't use connman and
can't easily check, Declan, could you please confirm that iwd is now
working correctly with connman?

-- 
Best regards,
Andrew Tropin

Subject: [PATCH] services: connman: Add iwd backend support.
From: Declan Tsien <[email-masked]>
To: [email-masked]
Date: Thu, 12 Jan 2023 20:56:59 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

From d15947bcbfd16b1509df555a2b05a5639dec923a Mon Sep 17 00:00:00 2001
From: Declan Tsien <[email-masked]>
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 <[email-masked]>
 ;;; Copyright © 2021 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2022 Andrew Tropin <[email-masked]>
+;;; Copyright © 2022 Declan Tsien <[email-masked]>
 ;;;
 ;;; 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