From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 vEx/IRh8AmQ5DQEAbAwnHQ (envelope-from ) for ; Sat, 04 Mar 2023 00:00:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +EQGIRh8AmQMXQEA9RJhRA (envelope-from ) for ; Sat, 04 Mar 2023 00:00:40 +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 0F3924041 for ; Sat, 4 Mar 2023 00:00:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYENk-0000vF-Gl; Fri, 03 Mar 2023 18:00: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 1pYENh-0000sc-Ov for guix-patches@gnu.org; Fri, 03 Mar 2023 18:00:05 -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 1pYENh-0007Tq-CM for guix-patches@gnu.org; Fri, 03 Mar 2023 18:00:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYENh-0000yR-8P for guix-patches@gnu.org; Fri, 03 Mar 2023 18:00:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH v2 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, 03 Mar 2023 23:00:05 +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.16778843943618 (code B ref 61587); Fri, 03 Mar 2023 23:00:05 +0000 Received: (at 61587) by debbugs.gnu.org; 3 Mar 2023 22:59:54 +0000 Received: from localhost ([127.0.0.1]:34141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYENV-0000wD-KB for submit@debbugs.gnu.org; Fri, 03 Mar 2023 17:59:53 -0500 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:36988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYENS-0000vT-T0 for 61587@debbugs.gnu.org; Fri, 03 Mar 2023 17:59:52 -0500 Received: from smtpmciv8.myservices.hosting (smtpmciv8.myservices.hosting [185.26.106.203]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 9706420825 for <61587@debbugs.gnu.org>; Fri, 3 Mar 2023 23:59:47 +0100 (CET) Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv8.myservices.hosting (Postfix) with ESMTP id 4DAE520817 for <61587@debbugs.gnu.org>; Fri, 3 Mar 2023 23:59:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id EDF008009A; Fri, 3 Mar 2023 23:59:46 +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 NwUKIZaJcSO3; Fri, 3 Mar 2023 23:59:46 +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 80C4A80097; Fri, 3 Mar 2023 23:59:46 +0100 (CET) From: Bruno Victal Date: Fri, 3 Mar 2023 22:59:09 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Seal: i=1; s=key1; d=yhetil.org; t=1677884440; a=rsa-sha256; cv=none; b=BxSxOPvqEVPZXJ7Bc8UCPi1Kq+eCQkk6StLOfhYY39V6beTvqdCU2uxjGVzN+SzWceWAbA 2saxithmjYcjizlNFaO4ipUYuugTmRfHKjsBhg1msethbPpUXzmiH+qCezsTyd/lFGcFbv B0o/sEuWZER5QoMstugDmGY16DAjVjz8on8ZRBOOUwDf2Dx3D99uodFQFPwXmM9sPYtRW9 uQ2X5zQtvIqsOIL0WVugYbTVLbfDB5dGD01on24f1eg4VoWdRjM4cDgC5GhMohkD6vDF1n xi8buu0tiOe9PMBMlJiMVziuDefWtR4xdiTLwMvfrntjSrq3+VbQWOZ0WzacGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677884440; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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; bh=CX0ZRR2O2mNPrEEmsNEaP55PlA6mApeO4eyKbd398uM=; b=g7n0DgLCh9YWCuDwSL7qS+00vM2HNIp5vjXkCl/gx0W6eLhDnDkDanr1zFlZUv/11fN99q 0eej6NJVhHSSQhl+gqYmoLsZJzgRYjM8SXzw6R5JSe96s4/gR6t9TCyX9hpNPhv6qSkNTx P/g9ywkTDGXEd7/y4XkTa1KzcmlPF+xjuS3CpN6PqSf4oxvERQMYcmj55+1cJULonj/sfv /3bR4uy5NmXCwF8gYqrJ1emL2lNfJ0zontSVy+jZhPQ0nSeyDxN7ivQ7XrUr4SaO1pdJ+I Xq2SZ9sOy4BGJqbIgm1MaWGmgFvh//v9W4+L4uZJkHGXqXmvgHJ4kQwfzYzDug== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.20 X-Spam-Score: -0.20 X-Migadu-Queue-Id: 0F3924041 Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none X-TUID: 3ff5g5xYiAP6 * 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 00313c54e6..dceef5cbd5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19917,6 +19917,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") -- 2.39.1