From patchwork Fri Feb 17 21:14:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47068 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C3FA3168F8; Fri, 17 Feb 2023 21:16:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0C4ED16734 for ; Fri, 17 Feb 2023 21:16:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT85U-0004Vf-1V; Fri, 17 Feb 2023 16:16:12 -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 1pT85K-0004U7-DS for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:06 -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 1pT85K-0004Lx-0i for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT85J-000055-PZ for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 1/8] services: network-manager: Add 'shepherd-requirement' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.167666850432666 (code B ref 61587); Fri, 17 Feb 2023 21:16:01 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:15:04 +0000 Received: from localhost ([127.0.0.1]:41705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT84N-0008Uo-R4 for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:04 -0500 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:36788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT84L-0008Tw-ON for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:02 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id E66F52090F for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:15:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 905B18009A; Fri, 17 Feb 2023 22:15:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aPuIexZBHohC; Fri, 17 Feb 2023 22:15:00 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 1E08880098; Fri, 17 Feb 2023 22:15:00 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:52 +0000 Message-Id: <52d67f14ce662f215c384b59dfe28f446b9b384a.1676667941.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Note: This also makes wpa-supplicant an optional requirement. * gnu/services/networking.scm () [shepherd-requirement]: New field. (network-manager-shepherd-service): Honor it. (network-manager-configuration-shepherd-requirement): Export accessor. * doc/guix.texi (Networking Setup): Document it. --- doc/guix.texi | 6 ++++++ gnu/services/networking.scm | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 44e2165a82..46e0f637d0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19704,6 +19704,12 @@ Networking Setup @item @code{network-manager} (default: @code{network-manager}) The NetworkManager package to use. +@item @code{shepherd-requirement} (default: @code{()}) +This option can be used to provide a list of symbols naming Shepherd services +that this service will depend on, such as @code{'wpa-supplicant} or +@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet +networks. + @item @code{dns} (default: @code{"default"}) Processing mode for DNS, which affects how NetworkManager uses the @code{resolv.conf} configuration file. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index dacf64c2d1..5284855b83 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -143,6 +143,7 @@ (define-module (gnu services networking) network-manager-configuration network-manager-configuration? + network-manager-configuration-shepherd-requirement network-manager-configuration-dns network-manager-configuration-vpn-plugins network-manager-service-type @@ -1140,6 +1141,8 @@ (define-record-type* network-manager-configuration? (network-manager network-manager-configuration-network-manager (default network-manager)) + (shepherd-requirement network-manager-configuration-shepherd-requirement + (default '())) (dns network-manager-configuration-dns (default "default")) (vpn-plugins network-manager-configuration-vpn-plugins ;list of file-like @@ -1200,7 +1203,7 @@ (define (network-manager-environment config) (define (network-manager-shepherd-service config) (match-record config - (network-manager dns vpn-plugins iwd?) + (network-manager shepherd-requirement dns vpn-plugins iwd?) (let ((conf (plain-file "NetworkManager.conf" (string-append "[main]\ndns=" dns "\n" @@ -1209,8 +1212,9 @@ (define (network-manager-shepherd-service config) (list (shepherd-service (documentation "Run the NetworkManager.") (provision '(networking)) - (requirement (append '(user-processes dbus-system loopback) - (if iwd? '(iwd) '(wpa-supplicant)))) + (requirement `(user-processes dbus-system loopback + ,@shepherd-requirement + ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$network-manager "/sbin/NetworkManager") From patchwork Fri Feb 17 21:14:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47070 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 21EED168B3; Fri, 17 Feb 2023 21:16:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 111CD16734 for ; Fri, 17 Feb 2023 21:16:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT85R-0004V0-R1; Fri, 17 Feb 2023 16:16:09 -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 1pT85K-0004U9-T7 for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:06 -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 1pT85K-0004MG-Bp for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT85K-00005C-7v for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 2/8] services: network-manager: Deprecate 'iwd?' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.167666851632698 (code B ref 61587); Fri, 17 Feb 2023 21:16:02 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:15:16 +0000 Received: from localhost ([127.0.0.1]:41708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT84a-0008VI-7c for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:16 -0500 Received: from smtpm6.myservices.hosting ([185.26.105.207]:57672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT84Y-0008V8-EK for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:14 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm6.myservices.hosting (Postfix) with ESMTP id 9AF5520D17 for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:15:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 491548009A; Fri, 17 Feb 2023 22:15:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SRHaobdbZSj2; Fri, 17 Feb 2023 22:15:13 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id C819380098; Fri, 17 Feb 2023 22:15:12 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:53 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/networking.scm (warn-iwd?-field-deprecation): New procedure, helper for deprecated field. ()[iwd?]: Use helper to warn deprecated field. (network-manager-shepherd-service): Make iwd? a local variable independent from the deprecated field. * doc/guix.texi (Networking Setup): Remove mention of iwd? field. --- doc/guix.texi | 4 ---- gnu/services/networking.scm | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 46e0f637d0..8ccd727e6e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19758,10 +19758,6 @@ Networking Setup (VPNs). An example of this is the @code{network-manager-openvpn} package, which allows NetworkManager to manage VPNs @i{via} OpenVPN. -@item @code{iwd?} (default: @code{#f}) -NetworkManager will use iwd as a backend for wireless networking if this -option is set to @code{#t}, otherwise it will use wpa-supplicant. - @end table @end deftp diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 5284855b83..ddf2e20791 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1136,6 +1136,15 @@ (define-record-type* ;;; NetworkManager ;;; +;; TODO: deprecated field, remove later. +(define-with-syntax-properties (warn-iwd?-field-deprecation + (value properties)) + (when value + (warning (source-properties->location properties) + (G_ "the 'iwd?' field is deprecated, please use \ +'shepherd-requirement' field instead~%"))) + value) + (define-record-type* network-manager-configuration make-network-manager-configuration network-manager-configuration? @@ -1147,7 +1156,9 @@ (define-record-type* (default "default")) (vpn-plugins network-manager-configuration-vpn-plugins ;list of file-like (default '())) - (iwd? network-manager-configuration-iwd? (default #f))) + (iwd? network-manager-configuration-iwd? ; TODO: deprecated field, remove. + (default #f) + (sanitize warn-iwd?-field-deprecation))) (define (network-manager-activation config) ;; Activation gexp for NetworkManager @@ -1204,7 +1215,10 @@ (define (network-manager-environment config) (define (network-manager-shepherd-service config) (match-record config (network-manager shepherd-requirement dns vpn-plugins iwd?) - (let ((conf (plain-file "NetworkManager.conf" + (let ((iwd? (or iwd? ; TODO: deprecated field, remove later. + (and shepherd-requirement + (memq 'iwd shepherd-requirement)))) + (conf (plain-file "NetworkManager.conf" (string-append "[main]\ndns=" dns "\n" (if iwd? "[device]\nwifi.backend=iwd\n" "")))) @@ -1214,6 +1228,8 @@ (define (network-manager-shepherd-service config) (provision '(networking)) (requirement `(user-processes dbus-system loopback ,@shepherd-requirement + ;; TODO: iwd? is deprecated and should be passed + ;; with shepherd-requirement, remove later. ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$network-manager From patchwork Fri Feb 17 21:14:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47071 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CA6B0168F8; Fri, 17 Feb 2023 21:16:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0AA7116734 for ; Fri, 17 Feb 2023 21:16:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT85Q-0004Uz-GB; Fri, 17 Feb 2023 16:16:08 -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 1pT85L-0004UB-0d for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:06 -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 1pT85K-0004Mv-Ny for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT85K-00005O-JJ for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 3/8] services: connman: Use match-record and export accessors. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.167666852832723 (code B ref 61587); Fri, 17 Feb 2023 21:16:02 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:15:28 +0000 Received: from localhost ([127.0.0.1]:41711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT84l-0008Vi-KY for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:27 -0500 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:36862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT84j-0008Va-Na for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:26 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 4374D2090F for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:15:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id E1FC78009A; Fri, 17 Feb 2023 22:15:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YRy2R1fH6DwZ; Fri, 17 Feb 2023 22:15:24 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 756A980098; Fri, 17 Feb 2023 22:15:24 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:54 +0000 Message-Id: <6e0343b6f71b6fda9ef58c0b1f21fc83a472df44.1676667941.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/networking.scm (connman-shepherd-service): Use match-record. (connman-configuration-connman, connman-configuration-disable-vpn?) (connman-configuration-iwd?): Export accessors. --- gnu/services/networking.scm | 52 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index ddf2e20791..5cba3a9a3f 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -150,6 +150,9 @@ (define-module (gnu services networking) connman-configuration connman-configuration? + connman-configuration-connman + connman-configuration-disable-vpn? + connman-configuration-iwd? connman-service-type modem-manager-configuration @@ -1300,33 +1303,28 @@ (define (connman-activation config) (mkdir-p "/var/lib/connman-vpn/")))))) (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)) - (iwd? (connman-configuration-iwd? config))) - (list (shepherd-service - (documentation "Run Connman") - (provision '(networking)) - (requirement - (append '(user-processes dbus-system loopback) - (if iwd? '(iwd) '()))) - (start #~(make-forkexec-constructor - (list (string-append #$connman - "/sbin/connmand") - "--nodaemon" - "--nodnsproxy" - #$@(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 - ;; addition to syslog." Redirect stdout and stderr - ;; to avoid spamming the console (XXX: for some reason - ;; redirecting to /dev/null doesn't work.) - #:log-file "/var/log/connman.log")) - (stop #~(make-kill-destructor))))))) + (match-record config (connman disable-vpn? iwd?) + (list (shepherd-service + (documentation "Run Connman") + (provision '(networking)) + (requirement + (append '(user-processes dbus-system loopback) + (if iwd? '(iwd) '()))) + (start #~(make-forkexec-constructor + (list (string-append #$connman + "/sbin/connmand") + "--nodaemon" + "--nodnsproxy" + #$@(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 + ;; addition to syslog." Redirect stdout and stderr + ;; to avoid spamming the console (XXX: for some reason + ;; redirecting to /dev/null doesn't work.) + #:log-file "/var/log/connman.log")) + (stop #~(make-kill-destructor)))))) (define %connman-log-rotation (list (log-rotation From patchwork Fri Feb 17 21:14:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47069 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C8D0A168B3; Fri, 17 Feb 2023 21:16:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1DF7616734 for ; Fri, 17 Feb 2023 21:16:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT85T-0004VM-LJ; Fri, 17 Feb 2023 16:16:11 -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 1pT85L-0004UC-Ia for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:06 -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 1pT85L-0004Nf-4L for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT85K-00005X-WA for guix-patches@gnu.org; Fri, 17 Feb 2023 16:16:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 4/8] services: connman: Add 'shepherd-requirement' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.167666854732756 (code B ref 61587); Fri, 17 Feb 2023 21:16:02 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:15:47 +0000 Received: from localhost ([127.0.0.1]:41714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT855-0008WG-0V for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:47 -0500 Received: from smtpm5.myservices.hosting ([185.26.105.236]:60902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT853-0008W8-7W for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:15:45 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 7FCCD20CFC for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:15:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 24FD78009A; Fri, 17 Feb 2023 22:15:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AL6CHBV8QwRw; Fri, 17 Feb 2023 22:15:43 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id B4E9D80098; Fri, 17 Feb 2023 22:15:43 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:55 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/networking.scm () [shepherd-requirement]: New field. (connman-shepherd-service): Honor it. (connman-configuration-shepherd-requirement): Export accessor. * doc/guix.texi (Networking Setup): Document it. --- doc/guix.texi | 6 ++++++ gnu/services/networking.scm | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8ccd727e6e..0a0080b117 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19785,6 +19785,12 @@ Networking Setup @item @code{connman} (default: @var{connman}) The connman package to use. +@item @code{shepherd-requirement} (default: @code{()}) +This option can be used to provide a list of symbols naming Shepherd services +that this service will depend on, such as @code{'wpa-supplicant} or +@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet +networks. + @item @code{disable-vpn?} (default: @code{#f}) When true, disable connman's vpn plugin. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 5cba3a9a3f..30a4d6a6d8 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -151,6 +151,7 @@ (define-module (gnu services networking) connman-configuration connman-configuration? connman-configuration-connman + connman-configuration-shepherd-requirement connman-configuration-disable-vpn? connman-configuration-iwd? connman-service-type @@ -1288,6 +1289,8 @@ (define-record-type* connman-configuration? (connman connman-configuration-connman (default connman)) + (shepherd-requirement connman-configuration-shepherd-requirement + (default '())) (disable-vpn? connman-configuration-disable-vpn? (default #f)) (iwd? connman-configuration-iwd? @@ -1303,13 +1306,14 @@ (define (connman-activation config) (mkdir-p "/var/lib/connman-vpn/")))))) (define (connman-shepherd-service config) - (match-record config (connman disable-vpn? iwd?) + (match-record config (connman shepherd-requirement + disable-vpn? iwd?) (list (shepherd-service (documentation "Run Connman") (provision '(networking)) - (requirement - (append '(user-processes dbus-system loopback) - (if iwd? '(iwd) '()))) + (requirement `(user-processes dbus-system loopback + ,@shepherd-requirement + ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$connman "/sbin/connmand") From patchwork Fri Feb 17 21:14:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47076 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C743E168F8; Fri, 17 Feb 2023 21:25:28 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BD84416734 for ; Fri, 17 Feb 2023 21:25:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT8EJ-0000VD-OM; Fri, 17 Feb 2023 16:25:20 -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 1pT8E6-0000SN-QO for guix-patches@gnu.org; Fri, 17 Feb 2023 16:25:07 -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 1pT8E2-0005lx-CC for guix-patches@gnu.org; Fri, 17 Feb 2023 16:25:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT8E2-0000Ki-6j for guix-patches@gnu.org; Fri, 17 Feb 2023 16:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 5/8] services: connman: Deprecate 'iwd?' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.16766690701233 (code B ref 61587); Fri, 17 Feb 2023 21:25:02 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:24:30 +0000 Received: from localhost ([127.0.0.1]:41738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT8DW-0000Jo-9k for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:24:30 -0500 Received: from smtpmciv7.myservices.hosting ([185.26.106.202]:50534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT8DU-0000Jg-DP for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:24:28 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv7.myservices.hosting (Postfix) with ESMTP id B178920D82 for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:24:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id B246B8009A; Fri, 17 Feb 2023 22:15:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8wkCui65d21P; Fri, 17 Feb 2023 22:15:57 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 48A1680098; Fri, 17 Feb 2023 22:15:57 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:56 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/networking.scm () [iwd?]: Use helper to warn deprecated field. (connman-shepherd-service): Make iwd? a local variable independent from the deprecated field. * doc/guix.texi (Networking Setup): Remove mention of iwd? field. --- doc/guix.texi | 2 -- gnu/services/networking.scm | 50 +++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0a0080b117..67c518ca7d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19794,8 +19794,6 @@ Networking Setup @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 30a4d6a6d8..13816327b0 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1294,7 +1294,8 @@ (define-record-type* (disable-vpn? connman-configuration-disable-vpn? (default #f)) (iwd? connman-configuration-iwd? - (default #f))) + (default #f) + (sanitize warn-iwd?-field-deprecation))) (define (connman-activation config) (let ((disable-vpn? (connman-configuration-disable-vpn? config))) @@ -1308,27 +1309,32 @@ (define (connman-activation config) (define (connman-shepherd-service config) (match-record config (connman shepherd-requirement disable-vpn? iwd?) - (list (shepherd-service - (documentation "Run Connman") - (provision '(networking)) - (requirement `(user-processes dbus-system loopback - ,@shepherd-requirement - ,@(if iwd? '(iwd) '()))) - (start #~(make-forkexec-constructor - (list (string-append #$connman - "/sbin/connmand") - "--nodaemon" - "--nodnsproxy" - #$@(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 - ;; addition to syslog." Redirect stdout and stderr - ;; to avoid spamming the console (XXX: for some reason - ;; redirecting to /dev/null doesn't work.) - #:log-file "/var/log/connman.log")) - (stop #~(make-kill-destructor)))))) + (let ((iwd? (or iwd? ; TODO: deprecated field, remove later. + (and shepherd-requirement + (memq 'iwd shepherd-requirement))))) + (list (shepherd-service + (documentation "Run Connman") + (provision '(networking)) + (requirement `(user-processes dbus-system loopback + ,@shepherd-requirement + ;; TODO: iwd? is deprecated and should be passed + ;; with shepherd-requirement, remove later. + ,@(if iwd? '(iwd) '()))) + (start #~(make-forkexec-constructor + (list (string-append #$connman + "/sbin/connmand") + "--nodaemon" + "--nodnsproxy" + #$@(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 + ;; addition to syslog." Redirect stdout and stderr + ;; to avoid spamming the console (XXX: for some reason + ;; redirecting to /dev/null doesn't work.) + #:log-file "/var/log/connman.log")) + (stop #~(make-kill-destructor))))))) (define %connman-log-rotation (list (log-rotation From patchwork Fri Feb 17 21:14:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47073 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 25F92168F8; Fri, 17 Feb 2023 21:17:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4F6FD16734 for ; Fri, 17 Feb 2023 21:17:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT86L-0005Cx-8x; Fri, 17 Feb 2023 16:17: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 1pT86I-00058u-T7 for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17: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 1pT86I-0004ZT-J0 for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT86I-00007r-EW for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 6/8] services: network-manager: Await for NetworkManager to finish starting up. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.1676668571386 (code B ref 61587); Fri, 17 Feb 2023 21:17:02 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:16:11 +0000 Received: from localhost ([127.0.0.1]:41721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT85T-00006A-BK for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:16:11 -0500 Received: from smtpm3.myservices.hosting ([185.26.105.234]:42848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT85S-000062-CS for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:16:10 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id AA79B20FAB for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:16:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 515C48009D; Fri, 17 Feb 2023 22:16:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xqnNzofvaOGM; Fri, 17 Feb 2023 22:16:09 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id E04398009B; Fri, 17 Feb 2023 22:16:08 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:57 +0000 Message-Id: <502d6efbde6d7e372ab6bc414fbbe2c065c23b4e.1676667941.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is similar to its NetworkManager-wait-online.service systemd counterpart, with the main difference being that we handle it all in 'networking symbol, rather than introduce a new 'networking-online symbol. (see discussion #47253) As a result of this change, with opensmtpd-service-type as an example, manual 'herd restart smtpd' after system bootups are no longer required when opensmtpd is configured with a smtpd.conf containing non-loopback interfaces. (this issue is described in more detail at #60300) Addresses #60300. Supersedes #47253. (Note: Shepherd no longer blocks since shepherd 0.9.3) * gnu/services/networking.scm (network-manager-shepherd-service): Await for NetworkManager to finish starting up. --- gnu/services/networking.scm | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 13816327b0..55bc2cf362 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1235,17 +1235,31 @@ (define (network-manager-shepherd-service config) ;; TODO: iwd? is deprecated and should be passed ;; with shepherd-requirement, remove later. ,@(if iwd? '(iwd) '()))) - (start #~(make-forkexec-constructor - (list (string-append #$network-manager - "/sbin/NetworkManager") - (string-append "--config=" #$conf) - "--no-daemon") - #:environment-variables - (list (string-append "NM_VPN_PLUGIN_DIR=" #$vpn - "/lib/NetworkManager/VPN") - ;; Override non-existent default users - "NM_OPENVPN_USER=" - "NM_OPENVPN_GROUP="))) + (start + #~(lambda args + (let ((constructor + (apply + (make-forkexec-constructor + (list #$(file-append network-manager + "/sbin/NetworkManager") + (string-append "--config=" #$conf) + "--no-daemon") + #:environment-variables + (list (string-append "NM_VPN_PLUGIN_DIR=" #$vpn + "/lib/NetworkManager/VPN") + ;; Override non-existent default users + "NM_OPENVPN_USER=" + "NM_OPENVPN_GROUP=")) args))) + ;; XXX: Despite the "online" name, this doesn't guarantee + ;; WAN connectivity, it merely waits for NetworkManager + ;; to finish starting-up. This is required otherwise + ;; services will fail since the network interfaces be + ;; absent until NetworkManager finishes setting them up. + (system* #$(file-append network-manager "/bin/nm-online") + "--wait-for-startup" "--quiet") + ;; XXX: Finally, return the value from running + ;; make-forkexec-constructor to shepherd. + constructor))) (stop #~(make-kill-destructor))))))) (define network-manager-service-type From patchwork Fri Feb 17 21:14:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47072 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1EA0E168F8; Fri, 17 Feb 2023 21:17:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5FC7E16734 for ; Fri, 17 Feb 2023 21:17:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT86P-0005Rg-6Y; Fri, 17 Feb 2023 16:17:09 -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 1pT86J-0005Ar-8H for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:03 -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 1pT86I-0004ZY-UR for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT86I-00007z-Q2 for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 7/8] services: network-manager: Set service canonical-name to NetworkManager. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.1676668591423 (code B ref 61587); Fri, 17 Feb 2023 21:17:02 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:16:31 +0000 Received: from localhost ([127.0.0.1]:41724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT85m-00006k-Nl for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:16:31 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:45118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT85k-00006Z-H5 for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:16:29 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id E288120CBE for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:16:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 91E548009C; Fri, 17 Feb 2023 22:16:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id O3JCv0gLlczV; Fri, 17 Feb 2023 22:16:27 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 2A5068009B; Fri, 17 Feb 2023 22:16:27 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:58 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches According to the semantics in [1], 'networking should be a "virtual service" and NetworkManager its canonical-name. This does not influence existing services and they should continue to use the 'networking symbol. One visible change is that 'herd status' doesn't show 'networking' anymore, instead listing 'NetworkManager' in its place but both symbols are can be used to start and stop the same service. Note: Though the symbol NetworkManager doesn't really conform with the overall kebab-case used throughout Guix, this is intentional as we really want to make it clear that that the symbol NetworkManager really refers to the software called NetworkManager, since it's a canonical name here. (rather than risk misleading the user to interpret the symbol network-manager as a symbol for some unspecific network management software) [1]: https://www.gnu.org/software/shepherd/manual/html_node/Jump-Start.html * gnu/services/networking.scm (network-manager-shepherd-service): Make 'networking a virtual service and set 'NetworkManager as its canonical name. --- gnu/services/networking.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 55bc2cf362..bcde0d0db8 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1229,7 +1229,7 @@ (define (network-manager-shepherd-service config) (vpn (vpn-plugin-directory vpn-plugins))) (list (shepherd-service (documentation "Run the NetworkManager.") - (provision '(networking)) + (provision '(NetworkManager networking)) (requirement `(user-processes dbus-system loopback ,@shepherd-requirement ;; TODO: iwd? is deprecated and should be passed From patchwork Fri Feb 17 21:14:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47074 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C6219168F8; Fri, 17 Feb 2023 21:17:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1C54D16734 for ; Fri, 17 Feb 2023 21:17:24 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT86L-0005Er-SV; Fri, 17 Feb 2023 16:17: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 1pT86J-0005Bf-JG for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:04 -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 1pT86J-0004Zk-A6 for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT86J-000086-5s for guix-patches@gnu.org; Fri, 17 Feb 2023 16:17:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH 8/8] services: connman: Set service canonical-name to connman. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 21:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.1676668601451 (code B ref 61587); Fri, 17 Feb 2023 21:17:03 +0000 Received: (at 61587) by debbugs.gnu.org; 17 Feb 2023 21:16:41 +0000 Received: from localhost ([127.0.0.1]:41727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT85x-00007C-2I for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:16:41 -0500 Received: from smtpmciv8.myservices.hosting ([185.26.106.203]:57954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT85v-000071-IK for 61587@debbugs.gnu.org; Fri, 17 Feb 2023 16:16:39 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv8.myservices.hosting (Postfix) with ESMTP id D33C020DD0 for <61587@debbugs.gnu.org>; Fri, 17 Feb 2023 22:16:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 8FAD08009C; Fri, 17 Feb 2023 22:16:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id t7hx1mqAhlwH; Fri, 17 Feb 2023 22:16:38 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 2FFBF8009B; Fri, 17 Feb 2023 22:16:38 +0100 (CET) From: Bruno Victal Date: Fri, 17 Feb 2023 21:14:59 +0000 Message-Id: <7d438c9abe0b345b718b12a9fec0500fd5c56830.1676667941.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/networking.scm (connman-shepherd-service): Make 'networking a virtual service and set 'connman as its canonical name. --- gnu/services/networking.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index bcde0d0db8..7c35ff72eb 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1328,7 +1328,7 @@ (define (connman-shepherd-service config) (memq 'iwd shepherd-requirement))))) (list (shepherd-service (documentation "Run Connman") - (provision '(networking)) + (provision '(connman networking)) (requirement `(user-processes dbus-system loopback ,@shepherd-requirement ;; TODO: iwd? is deprecated and should be passed