From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UMJoB+QxB2RPgAAASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 13:45:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MAllB+QxB2RqCgEA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 13:45:24 +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 D1C8F3371D for ; Tue, 7 Mar 2023 13:45:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZWgk-0001Q0-2n; Tue, 07 Mar 2023 07:45:06 -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 1pZWgi-0001Mc-8d for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45: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 1pZWgh-0003L4-TY for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZWgh-0002Bh-N0 for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH v3 4/8] services: connman: Add 'shepherd-requirement' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Mar 2023 12:45: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: ludo@gnu.org, Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.16781930698305 (code B ref 61587); Tue, 07 Mar 2023 12:45:03 +0000 Received: (at 61587) by debbugs.gnu.org; 7 Mar 2023 12:44:29 +0000 Received: from localhost ([127.0.0.1]:44724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWg8-00029m-Ht for submit@debbugs.gnu.org; Tue, 07 Mar 2023 07:44:29 -0500 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:55242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWg6-00029U-0D for 61587@debbugs.gnu.org; Tue, 07 Mar 2023 07:44:26 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id B699520721; Tue, 7 Mar 2023 13:44:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 73937800B4; Tue, 7 Mar 2023 13:44:20 +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 71etxwvfR6MG; Tue, 7 Mar 2023 13:44:20 +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 DA2C6800B2; Tue, 7 Mar 2023 13:44:19 +0100 (CET) From: Bruno Victal Date: Tue, 7 Mar 2023 12:44:01 +0000 Message-Id: <005b74725f5047fbf5e6ef1a5d5aba72bee79023.1678193024.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: <6d50c6d0cf8bc441bd9f38a0e2c02613b0a90d19.1678193024.git.mirai@makinata.eu> References: <6d50c6d0cf8bc441bd9f38a0e2c02613b0a90d19.1678193024.git.mirai@makinata.eu> 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678193123; 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=2AA7EKKluAW4tE0JWJl+Ah4hvvk+ku5rU4qi1w29cBw=; b=qbdVX9HEgqLN1MvkMcMUZ+Jp5iKTDadMSbzVJeaQLHvmKM4KyhBKUyxiV/FLG/I+sW/bad IIud7E7wNv4umIk5VqWxuCqxby4Zqo+R8QC2Bjn08D0mlp0AAtFgwtmpvWHT8BdzwLxKfA lVysULucDBlT69HKtETHgxAkvTSX+wniVeH5o9eu5NzcYbTkn8KuRQQ6I+nSXOzNOtuAeT AFVh6v31MyUdL0qSzUEsLhihjDZ//ZHYjJT/jglVCxzd5rzRI1ARJTC01yiRTjtpp+j/5+ SFbooFKF4o+Yk4i5xfuOYUlDdADJyGX6v7U9EmMQrbubH/dCfaIDjTy0ElG7Dw== 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-Seal: i=1; s=key1; d=yhetil.org; t=1678193123; a=rsa-sha256; cv=none; b=r/zAKgibgTQ7ZPCCR4Y1x7xsIysWvr1fbPSDLkUAhB0UkqG8EvxQId8Vyx7B2XaTMgNXx3 wQjqW8EkyihaCANm6NKfUV4iCGGsoevZeVyA48fIGAIb/lCUTzK38RXnB/NLtU/DKufpl2 zGfN8riOq0EmadDjAdwKNbYJtP/DC7LTghsbsEkvQuLNLvNi3dgQrvuNCrhN+GDwtCpCpu v5u+HqOfcYdcOWWqw+QMJT7cOR9jXi03MJCjec3dxJSksOJF52W8pK8LjxHe8OuJ5oUBIB HPcKEBZjwjV/32LhtTDexxIZkWZWtBWfajBn1D4c6Ueuhh5awkIetkK07q80pw== 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-Migadu-Spam-Score: -0.21 X-Spam-Score: -0.21 X-Migadu-Queue-Id: D1C8F3371D X-Migadu-Scanner: scn1.migadu.com X-TUID: tetCs1F7YVPq * 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 ccaca0a71b..ece0c0354d 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 abfaba8004..6a09f6e728 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