all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rodion Goritskov <rodion.goritskov@gmail.com>
To: 71722@debbugs.gnu.org
Cc: Rodion Goritskov <rodion.goritskov@gmail.com>
Subject: [bug#71722] [PATCH 1/2] services: agate: Update options for compatibility with the current Agate version.
Date: Sat, 22 Jun 2024 23:33:54 +0400	[thread overview]
Message-ID: <258b03236418dc733802f4834f02565755063e76.1719082137.git.rodion.goritskov@gmail.com> (raw)
In-Reply-To: <cover.1719082137.git.rodion.goritskov@gmail.com>

* gnu/services/web.scm (<agate-configuration>)[certs]: Add.
* gnu/services/web.scm (<agate-configuration>)[cert]: Remove.
* gnu/services/web.scm (<agate-configuration>)[key]: Remove.
* gnu/services/web.scm (<agate-configuration>)[hostname]: Change from string
to list.
* gnu/services/web.scm (<agate-configuration>)[silent?]: Remove.
* gnu/services/web.scm (<agate-configuration>)[only-tls13?]: Add.
* gnu/services/web.scm (<agate-configuration>)[central-conf?]: Add.
* gnu/services/web.scm (<agate-configuration>)[ed25519?]: Add.
* gnu/services/web.scm (<agate-configuration>)[skip-port-check?]: Add.
* gnu/services/web.scm (agate-shepherd-service): Change handling of addr and
hostname, add new options handling.

Change-Id: Ibc83a7254d1e425604d4aa0b95cbaa74fc9c72eb
---
 gnu/services/web.scm | 50 +++++++++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 19 deletions(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 406117c457..1ee1fff9ed 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -302,13 +302,15 @@ (define-module (gnu services web)
             agate-configuration?
             agate-configuration-package
             agate-configuration-content
-            agate-configuration-cert
-            agate-configuration-key
+            agate-configuration-certs
             agate-configuration-addr
             agate-configuration-hostname
             agate-configuration-lang
-            agate-configuration-silent
+            agate-configuration-only-tls13
             agate-configuration-serve-secret
+            agate-configuration-central-conf
+            agate-configuration-ed25519
+            agate-configuration-skip-port-check
             agate-configuration-log-ip
             agate-configuration-user
             agate-configuration-group
@@ -2177,20 +2179,24 @@ (define-record-type* <agate-configuration>
             (default agate))
   (content  agate-configuration-content
             (default "/srv/gemini"))
-  (cert     agate-configuration-cert
-            (default #f))
-  (key      agate-configuration-key
-            (default #f))
+  (certs     agate-configuration-certs
+             (default "/srv/gemini-certs"))
   (addr     agate-configuration-addr
             (default '("0.0.0.0:1965" "[::]:1965")))
   (hostname agate-configuration-hostname
-            (default #f))
+            (default '()))
   (lang     agate-configuration-lang
             (default #f))
-  (silent?  agate-configuration-silent
-            (default #f))
+  (only-tls13? agate-configuration-only-tls13
+               (default #f))
   (serve-secret? agate-configuration-serve-secret
                  (default #f))
+  (central-conf? agate-configuration-central-conf
+                 (default #f))
+  (ed25519? agate-configuration-ed25519
+            (default #f))
+  (skip-port-check? agate-configuration-skip-port-check
+                    (default #f))
   (log-ip?  agate-configuration-log-ip
             (default #t))
   (user     agate-configuration-user
@@ -2202,8 +2208,10 @@ (define-record-type* <agate-configuration>
 
 (define agate-shepherd-service
   (match-lambda
-    (($ <agate-configuration> package content cert key addr
-                              hostname lang silent? serve-secret?
+    (($ <agate-configuration> package content certs addr
+                              hostname lang only-tls13?
+                              serve-secret? central-conf?
+                              ed25519? skip-port-check?
                               log-ip? user group log-file)
      (list (shepherd-service
             (provision '(agate))
@@ -2213,17 +2221,21 @@ (define agate-shepherd-service
                      #~(make-forkexec-constructor
                         (list #$agate
                               "--content" #$content
-                              "--cert" #$cert
-                              "--key" #$key
-                              "--addr" #$@addr
+                              "--certs" #$certs
+                              #$@(append-map
+                                  (lambda x (append '("--addr") x))
+                                  addr)
+                              #$@(append-map
+                                  (lambda x (append '("--hostname") x))
+                                  hostname)
                               #$@(if lang
                                      (list "--lang" lang)
                                      '())
-                              #$@(if hostname
-                                     (list "--hostname" hostname)
-                                     '())
-                              #$@(if silent? '("--silent") '())
                               #$@(if serve-secret? '("--serve-secret") '())
+                              #$@(if only-tls13? '("--only-tls13") '())
+                              #$@(if central-conf? '("--central-conf") '())
+                              #$@(if ed25519? '("--ed25519") '())
+                              #$@(if skip-port-check? '("--skip-port-check") '())
                               #$@(if log-ip? '("--log-ip") '()))
                         #:user #$user #:group #$group
                         #:log-file #$log-file)))
-- 
2.45.1





  reply	other threads:[~2024-06-22 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22 19:03 [bug#71722] [PATCH 0/2] services: Update agate-service-type to match actual agate options Rodion Goritskov
2024-06-22 19:33 ` Rodion Goritskov [this message]
2024-06-22 19:33 ` [bug#71722] [PATCH 2/2] services: agate-service-type: Update documentation Rodion Goritskov
2024-07-26 17:01 ` [bug#71722] [PATCH 0/2] services: Update agate-service-type to match actual agate options Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=258b03236418dc733802f4834f02565755063e76.1719082137.git.rodion.goritskov@gmail.com \
    --to=rodion.goritskov@gmail.com \
    --cc=71722@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.