GNU logs - #76637, boring messages


Message sent to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76637] [PATCH] services: wireguard: Add the auto-start? field.
Resent-From: Carlo Zancanaro <carlo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN
Resent-Date: Fri, 28 Feb 2025 10:34:01 +0000
Resent-Message-ID: <handler.76637.B.174073879824377 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 76637
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76637 <at> debbugs.gnu.org
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.174073879824377
          (code B ref -1); Fri, 28 Feb 2025 10:34:01 +0000
Received: (at submit) by debbugs.gnu.org; 28 Feb 2025 10:33:18 +0000
Received: from localhost ([127.0.0.1]:45530 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tnxgD-0006L6-Hk
	for submit <at> debbugs.gnu.org; Fri, 28 Feb 2025 05:33:18 -0500
Received: from lists.gnu.org ([2001:470:142::17]:34508)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <carlo@HIDDEN>)
 id 1tnxgA-0006Kf-C3
 for submit <at> debbugs.gnu.org; Fri, 28 Feb 2025 05:33:15 -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 <carlo@HIDDEN>)
 id 1tnxfp-0006lV-9f
 for guix-patches@HIDDEN; Fri, 28 Feb 2025 05:33:02 -0500
Received: from voltorb.zancanaro.id.au ([45.77.50.64])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <carlo@HIDDEN>)
 id 1tnxfh-0003rt-2s
 for guix-patches@HIDDEN; Fri, 28 Feb 2025 05:32:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=k1; bh=DlmGMwJdziRq0Wl
 kwVSpYubUvXBdO/Y7Xwn9KOgtawI=; h=date:subject:to:from;
 d=zancanaro.id.au; b=mL5CMPYqtrHHSKz3z8Ly6AHHmAEcGUAR8zBaTZAYBm0ZE3GqE
 wZKXUYU8J9yxNY+8VPfB+PXttylUxArVygE9zt4e4TChytkrKtGI+4KWCy29m03oChccXw
 CoLucaRSa8eb1ZVIGmrAFKU+kHulirR3REAZqCwx6EuPoUwY0iRA=
Received: by voltorb.zancanaro.id.au (OpenSMTPD) with ESMTPSA id 4d72084d
 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <guix-patches@HIDDEN>;
 Fri, 28 Feb 2025 10:32:25 +0000 (UTC)
From: Carlo Zancanaro <carlo@HIDDEN>
Date: Fri, 28 Feb 2025 21:31:10 +1100
Message-ID: <5d18dcc609db2170071a302ee35fc0d74170ae54.1740738670.git.carlo@HIDDEN>
X-Mailer: git-send-email 2.48.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=45.77.50.64; envelope-from=carlo@HIDDEN;
 helo=voltorb.zancanaro.id.au
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/services/vpn.scm (<wireguard-configuration>): Add auto-start?.
(wireguard-shepherd-service): Pass auto-start? to Shepherd service.
* doc/guix.texi (VPN Services)[wireguard]: Document it.

Change-Id: I7880a8c8e9860250f875e845e94eb118a4b852fa
---

Does what it says on the tin.

This makes it possible to define a wireguard service without
automatically starting the service. This is convenient for connections
on desktops/laptops if they are not always used.

 doc/guix.texi        | 8 +++++++-
 gnu/services/vpn.scm | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 93380dc30d..c7ca21ef52 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -43,7 +43,7 @@
 Copyright @copyright{} 2017, 2018, 2019 Clément Lassieur@*
 Copyright @copyright{} 2017, 2018, 2020, 2021, 2022 Mathieu Othacehe@*
 Copyright @copyright{} 2017 Federico Beffa@*
-Copyright @copyright{} 2017, 2018, 2024 Carlo Zancanaro@*
+Copyright @copyright{} 2017, 2018, 2024, 2025 Carlo Zancanaro@*
 Copyright @copyright{} 2017 Thomas Danckaert@*
 Copyright @copyright{} 2017 humanitiesNerd@*
 Copyright @copyright{} 2017, 2021 Christine Lemmer-Webber@*
@@ -35570,6 +35570,12 @@ VPN Services
 altogether, and @code{"auto"} (the default) that adds routes to the
 default table and enables special handling of default routes.
 
+@item @code{auto-start?} (default: @code{#t"})
+Whether the Wireguard network should be started automatically by the
+Shepherd.  If it is @code{#f} the service has to be started manually
+with @code{herd start wireguard-$interface} (for example: @code{herd
+start wireguard-wg0}).
+
 @end table
 @end deftp
 
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index c66622ad6c..478a0d543e 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2022 Timo Wilken <guix@HIDDEN>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
 ;;; Copyright © 2024 Richard Sent <richard@HIDDEN>
+;;; Copyright © 2025 Carlo Zancanaro <carlo@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,6 +89,7 @@ (define-module (gnu services vpn)
             wireguard-configuration-pre-down
             wireguard-configuration-post-down
             wireguard-configuration-table
+            wireguard-configuration-auto-start?
 
             wireguard-service-type))
 
@@ -764,7 +766,9 @@ (define-record-type* <wireguard-configuration>
   (post-down              wireguard-configuration-post-down ;list of strings
                           (default '()))
   (table                  wireguard-configuration-table ;string
-                          (default "auto")))
+                          (default "auto"))
+  (auto-start?            wireguard-configuration-auto-start? ;boolean
+                          (default #t)))
 
 (define (wireguard-configuration-file config)
   (define (peer->config peer)
@@ -916,6 +920,7 @@ (define (wireguard-shepherd-service config)
   (match-record config <wireguard-configuration>
     (wireguard interface)
     (let ((wg-quick (file-append wireguard "/bin/wg-quick"))
+          (auto-start? (wireguard-configuration-auto-start? config))
           (config (wireguard-configuration-file config)))
       (list (shepherd-service
              (requirement '(networking))
@@ -926,6 +931,7 @@ (define (wireguard-shepherd-service config)
                        (invoke #$wg-quick "down" #$config)
                        #f))                       ;stopped!
              (actions (list (shepherd-configuration-action config)))
+             (auto-start? auto-start?)
              (documentation "Run the Wireguard VPN tunnel"))))))
 
 (define (wireguard-monitoring-jobs config)

base-commit: a76708a872e65230931f3c5c3b079d0a39d5cb84
-- 
2.48.1





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Carlo Zancanaro <carlo@HIDDEN>
Subject: bug#76637: Acknowledgement ([PATCH] services: wireguard: Add the
 auto-start? field.)
Message-ID: <handler.76637.B.174073879824377.ack <at> debbugs.gnu.org>
References: <5d18dcc609db2170071a302ee35fc0d74170ae54.1740738670.git.carlo@HIDDEN>
X-Gnu-PR-Message: ack 76637
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 76637 <at> debbugs.gnu.org
Date: Fri, 28 Feb 2025 10:34:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  Ludovic Court=C3=A8s <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@gma=
il.com>
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 76637 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
76637: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76637
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Fri, 28 Feb 2025 10:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.