GNU bug report logs - #39934
[PATCH] services: certbot: Add server option.

Previous Next

Package: guix-patches;

Reported by: Jack Hill <jackhill <at> jackhill.us>

Date: Thu, 5 Mar 2020 20:41:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39934 in the body.
You can then email your comments to 39934 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39934; Package guix-patches. (Thu, 05 Mar 2020 20:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jack Hill <jackhill <at> jackhill.us>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 05 Mar 2020 20:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jack Hill <jackhill <at> jackhill.us>
To: guix-patches <at> gnu.org
Cc: Jack Hill <jackhill <at> jackhill.us>, Tobias Geerinckx-Rice <me <at> tobias.gr>
Subject: [PATCH] services: certbot: Add server option.
Date: Thu,  5 Mar 2020 15:39:48 -0500
* gnu/services/certbot.scm (certbot-configuration): Add server option.
(certbot-command): Use server option.
(certbot-actication): Use server option.
(certbot-nginx-server-configurations): Use server option.
* doc/guix.texi (Certificate Services): Document server option.

Co-authored-by: Tobias Geerinckx-Rice <me <at> tobias.gr>
---
 doc/guix.texi            |  5 +++++
 gnu/services/certbot.scm | 12 +++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index fab9159530..2278cb6a53 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -74,6 +74,7 @@ Copyright @copyright{} 2019, 2020 Simon Tournier@*
 Copyright @copyright{} 2020 Wiktor Żelazny@*
 Copyright @copyright{} 2020 Damien Cassou@*
 Copyright @copyright{} 2020 Jakub Kądziołka@*
+Copyright @copyright{} 2020 Jack Hill@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -21008,6 +21009,10 @@ and several @code{domains}.
 Mandatory email used for registration, recovery contact, and important
 account notifications.
 
+@item @code{server} (default: @code{#f})
+Optional URL of ACME server.  Setting this overrides certbot's default,
+which is the Let's Encrypt server.
+
 @item @code{rsa-key-size} (default: @code{2048})
 Size of the RSA key.
 
diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index 0d3be03383..3e005918d6 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -3,6 +3,8 @@
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong <at> member.fsf.org>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2019 Julien Lepiller <julien <at> lepiller.eu>
+;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -70,6 +72,8 @@
   (certificates        certbot-configuration-certificates
                        (default '()))
   (email               certbot-configuration-email)
+  (server              certbot-configuration-server
+                       (default #f))
   (rsa-key-size        certbot-configuration-rsa-key-size
                        (default #f))
   (default-location    certbot-configuration-default-location
@@ -82,7 +86,7 @@
 (define certbot-command
   (match-lambda
     (($ <certbot-configuration> package webroot certificates email
-                                rsa-key-size default-location)
+                                server rsa-key-size default-location)
      (let* ((certbot (file-append package "/bin/certbot"))
             (rsa-key-size (and rsa-key-size (number->string rsa-key-size)))
             (commands
@@ -101,6 +105,7 @@
                             "--cert-name" name
                             "--manual-public-ip-logging-ok"
                             "-d" (string-join domains ","))
+                      (if server `("--server" ,server) '())
                       (if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
                       (if authentication-hook
                           `("--manual-auth-hook" ,authentication-hook)
@@ -113,6 +118,7 @@
                             "--webroot" "-w" webroot
                             "--cert-name" name
                             "-d" (string-join domains ","))
+                      (if server `("--server" ,server) '())
                       (if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
                       (if deploy-hook `("--deploy-hook" ,deploy-hook) '()))))))
               certificates)))
@@ -142,7 +148,7 @@
          (message (format #f (G_ "~a may need to be run~%") script)))
     (match config
       (($ <certbot-configuration> package webroot certificates email
-                                  rsa-key-size default-location)
+                                  server rsa-key-size default-location)
        (with-imported-modules '((guix build utils))
          #~(begin
              (use-modules (guix build utils))
@@ -154,7 +160,7 @@
 (define certbot-nginx-server-configurations
   (match-lambda
     (($ <certbot-configuration> package webroot certificates email
-                                rsa-key-size default-location)
+                                server rsa-key-size default-location)
      (list
       (nginx-server-configuration
        (listen '("80" "[::]:80"))
-- 
2.25.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 08 Mar 2020 20:20:01 GMT) Full text and rfc822 format available.

Notification sent to Jack Hill <jackhill <at> jackhill.us>:
bug acknowledged by developer. (Sun, 08 Mar 2020 20:20:01 GMT) Full text and rfc822 format available.

Message #10 received at 39934-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jack Hill <jackhill <at> jackhill.us>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 39934-done <at> debbugs.gnu.org
Subject: Re: [bug#39934] [PATCH] services: certbot: Add server option.
Date: Sun, 08 Mar 2020 21:19:06 +0100
Hi,

Jack Hill <jackhill <at> jackhill.us> skribis:

> * gnu/services/certbot.scm (certbot-configuration): Add server option.
> (certbot-command): Use server option.
> (certbot-actication): Use server option.
> (certbot-nginx-server-configurations): Use server option.
> * doc/guix.texi (Certificate Services): Document server option.
>
> Co-authored-by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Applied, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#39934; Package guix-patches. (Mon, 09 Mar 2020 04:41:02 GMT) Full text and rfc822 format available.

Message #13 received at 39934-done <at> debbugs.gnu.org (full text, mbox):

From: Jack Hill <jackhill <at> jackhill.us>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 39934-done <at> debbugs.gnu.org
Subject: Re: bug#39934: [PATCH] services: certbot: Add server option.
Date: Mon, 9 Mar 2020 00:40:01 -0400 (EDT)
[Message part 1 (text/plain, inline)]
On Sun, 8 Mar 2020, Ludovic Courtès wrote:

> Applied, thanks!

Awesome, thank you both.

Best,
Jack

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Apr 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 21 days ago.

Previous Next


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