GNU bug report logs - #46513
[PATCH 0/6] Add Agate Gemini server.

Previous Next

Package: guix-patches;

Reported by: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>

Date: Sun, 14 Feb 2021 18:52:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 46513 in the body.
You can then email your comments to 46513 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#46513; Package guix-patches. (Sun, 14 Feb 2021 18:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 14 Feb 2021 18:52:01 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: guix-patches <at> gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 0/6] Add Agate Gemini server.
Date: Sun, 14 Feb 2021 20:51:04 +0200
Hi,

These patches add the package for the Agate server for the Gemini protocol as
well as a service and a little documentation in the manual regarding the
configuration of the service.

Alexandru-Sergiu Marton (6):
  gnu: Add rust-rustls-0.19.
  gnu: rust-tokio-macros-1: Update to 1.1.0.
  gnu: rust-tokio-1: Update to 1.2.0.
  gnu: Add rust-tokio-rustls-0.22.
  gnu: Add agate.
  services: Add agate web service.

 doc/guix.texi              |  89 ++++++++++++++++++++++++++++-
 gnu/packages/crates-io.scm |  83 ++++++++++++++++++++++-----
 gnu/packages/rust-apps.scm |  38 +++++++++++++
 gnu/services/web.scm       | 112 ++++++++++++++++++++++++++++++++++++-
 4 files changed, 304 insertions(+), 18 deletions(-)

-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46513; Package guix-patches. (Sun, 14 Feb 2021 18:58:02 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: 46513 <at> debbugs.gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 2/6] gnu: rust-tokio-macros-1: Update to 1.1.0.
Date: Sun, 14 Feb 2021 20:57:27 +0200
* gnu/packages/crates-io.scm (rust-tokio-macros-1): Update to 1.1.0.
---
 gnu/packages/crates-io.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 124a607e86..63346f835d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -41944,17 +41944,18 @@ futures efficiently")
 (define-public rust-tokio-macros-1
   (package
     (name "rust-tokio-macros")
-    (version "1.0.0")
+    (version "1.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "tokio-macros" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "150l6wfcqw2rcjaf22qk3z6ca794x0s2c68n5ar18cfafllpsla2"))))
+        (base32
+         "0mys5zm2gcdgc0iq8nqipzn703q26x1bpw59m04shikgacdb3xya"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:tests? #false                  ;FIXME: undeclared type `tokio`
+     `(#:skip-build? #t
        #:cargo-inputs
        (("rust-proc-macro2" ,rust-proc-macro2-1)
         ("rust-quote" ,rust-quote-1)
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46513; Package guix-patches. (Sun, 14 Feb 2021 18:58:02 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: 46513 <at> debbugs.gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 4/6] gnu: Add rust-tokio-rustls-0.22.
Date: Sun, 14 Feb 2021 20:57:29 +0200
* gnu/packages/crates-io.scm (rust-tokio-rustls-0.22): New variable.
---
 gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c3d44fd1b1..adb588a5ef 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -42302,6 +42302,34 @@ servers.")
      "Event loop that drives Tokio I/O resources.")
     (license license:expat)))
 
+(define-public rust-tokio-rustls-0.22
+  (package
+    (name "rust-tokio-rustls")
+    (version "0.22.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "tokio-rustls" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1dp1s2kai081f3fn9gjq92x2lw7lm7iqpcsl02cg2zg5fbg48s5w"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-rustls" ,rust-rustls-0.19)
+        ("rust-tokio" ,rust-tokio-1)
+        ("rust-webpki" ,rust-webpki-0.21))))
+    (home-page "https://github.com/tokio-rs/tls")
+    (synopsis
+     "Asynchronous TLS/SSL streams for Tokio")
+    (description
+     "This package provides asynchronous TLS/SSL streams for Tokio using
+Rustls.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-tokio-rustls-0.14
   (package
     (name "rust-tokio-rustls")
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46513; Package guix-patches. (Sun, 14 Feb 2021 18:58:03 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: 46513 <at> debbugs.gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 3/6] gnu: rust-tokio-1: Update to 1.2.0.
Date: Sun, 14 Feb 2021 20:57:28 +0200
* gnu/packages/crates-io.scm (rust-tokio-1): Update to 1.2.0.
---
 gnu/packages/crates-io.scm | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 63346f835d..c3d44fd1b1 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -41504,17 +41504,18 @@ Fireball''.")
 (define-public rust-tokio-1
   (package
     (name "rust-tokio")
-    (version "1.0.1")
+    (version "1.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "tokio" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "1gd6qc9xvm568kicbkch40kjn5w0q2nsn527gcy80v3baqgj4n6j"))))
+        (base32
+         "0fmfykdp29hjq5264mp6sa4c0wp5mlimbi0dd9mrxsk5qq20s6g8"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:tests? #false                  ;FIXME: unresolved import
+     `(#:skip-build? #t
        #:cargo-inputs
        (("rust-autocfg" ,rust-autocfg-1)
         ("rust-bytes" ,rust-bytes-1)
@@ -41528,15 +41529,7 @@ Fireball''.")
         ("rust-signal-hook-registry" ,rust-signal-hook-registry-1)
         ("rust-tokio-macros" ,rust-tokio-macros-1)
         ("rust-tracing" ,rust-tracing-0.1)
-        ("rust-winapi" ,rust-winapi-0.3))
-       #:cargo-development-inputs
-       (("rust-async-stream" ,rust-async-stream-0.3)
-        ("rust-futures" ,rust-futures-0.3)
-        ("rust-loom" ,rust-loom-0.4)
-        ("rust-nix" ,rust-nix-0.19)
-        ("rust-proptest" ,rust-proptest-0.10)
-        ("rust-tokio-stream" ,rust-tokio-stream-0.1)
-        ("rust-tokio-test" ,rust-tokio-test-0.4))))
+        ("rust-winapi" ,rust-winapi-0.3))))
     (home-page "https://tokio.rs")
     (synopsis "Event-driven, non-blocking I/O platform")
     (description
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46513; Package guix-patches. (Sun, 14 Feb 2021 18:58:04 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: 46513 <at> debbugs.gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 1/6] gnu: Add rust-rustls-0.19.
Date: Sun, 14 Feb 2021 20:57:26 +0200
* gnu/packages/crates-io.scm (rust-rustls-0.19): New variable.
---
 gnu/packages/crates-io.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a5ea75a594..124a607e86 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2020 Antoine Côté <antoine.cote <at> posteo.net>
 ;;; Copyright © 2021 aecepoglu <aecepoglu <at> fastmail.fm>
 ;;; Copyright @ 2021 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33794,6 +33795,36 @@ rustc compiler.")
      "Automatically apply the suggestions made by rustc.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-rustls-0.19
+  (package
+    (name "rust-rustls")
+    (version "0.19.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "rustls" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "02wqas2pcxk75s9l9c9f1r5am7258bmqprh68pnqfvkwz0gx4kq6"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-base64" ,rust-base64-0.13)
+        ("rust-log" ,rust-log-0.4)
+        ("rust-ring" ,rust-ring-0.16)
+        ("rust-sct" ,rust-sct-0.6)
+        ("rust-webpki" ,rust-webpki-0.21))))
+    (home-page "https://github.com/ctz/rustls")
+    (synopsis
+     "Modern TLS library written in Rust")
+    (description
+     "This package provides a modern TLS library written in Rust.")
+    (license
+     (list license:asl2.0 license:isc license:expat))))
+
 (define-public rust-rustls-0.18
   (package
     (name "rust-rustls")
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46513; Package guix-patches. (Sun, 14 Feb 2021 18:58:04 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: 46513 <at> debbugs.gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 5/6] gnu: Add agate.
Date: Sun, 14 Feb 2021 20:57:30 +0200
* gnu/packages/rust-apps.scm (agate): New variable.
---
 gnu/packages/rust-apps.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 9511cbf308..b832bd4453 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus <at> gmail.ccom>
 ;;; Copyright © 2021 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,43 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control))
 
+(define-public agate
+  (package
+    (name "agate")
+    (version "2.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "agate" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "19szg91l4r76vrc44hifrqvk38c5q21hbycgi62bcb52rswgwgdk"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-env-logger" ,rust-env-logger-0.8)
+        ("rust-getopts" ,rust-getopts-0.2)
+        ("rust-log" ,rust-log-0.4)
+        ("rust-mime-guess" ,rust-mime-guess-2)
+        ("rust-once-cell" ,rust-once-cell-1)
+        ("rust-percent-encoding"
+         ,rust-percent-encoding-2)
+        ("rust-rustls" ,rust-rustls-0.19)
+        ("rust-tokio" ,rust-tokio-1)
+        ("rust-tokio-rustls" ,rust-tokio-rustls-0.22)
+        ("rust-url" ,rust-url-2))))
+    (home-page "gemini://qwertqwefsday.eu/agate.gmi")
+    (synopsis
+     "Very simple server for the Gemini hypertext protocol")
+    (description
+     "Agate is a server for the Gemini network protocol, built with the Rust
+programming language.  It has very few features, and can only serve static
+files.  It uses async I/O, and should be quite efficient even when running on
+low-end hardware and serving many concurrent requests.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public bat
   (package
     (name "bat")
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46513; Package guix-patches. (Sun, 14 Feb 2021 18:58:04 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: 46513 <at> debbugs.gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Subject: [PATCH 6/6] services: Add agate web service.
Date: Sun, 14 Feb 2021 20:57:31 +0200
* gnu/services/web.scm (<agate-configuration>): New record type.
(agate-accounts, agate-shepherd-service): New procedures.
(agate-service-type): New variable.
* doc/guix.texi (Web Services): Document it.
---
 doc/guix.texi        |  89 +++++++++++++++++++++++++++++++++-
 gnu/services/web.scm | 112 ++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 198 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 68abb968b0..c10d6877e2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -81,7 +81,7 @@ Copyright @copyright{} 2020 R Veera Kumar@*
 Copyright @copyright{} 2020 Pierre Langlois@*
 Copyright @copyright{} 2020 pinoaffe@*
 Copyright @copyright{} 2020 André Batista@*
-Copyright @copyright{} 2020 Alexandru-Sergiu Marton@*
+Copyright @copyright{} 2020, 2021 Alexandru-Sergiu Marton@*
 Copyright @copyright{} 2020 raingloom@*
 Copyright @copyright{} 2020 Daniel Brooks@*
 Copyright @copyright{} 2020 John Soo@*
@@ -25316,6 +25316,93 @@ gmnisrv} and @command{man gmnisrv.ini}.
 @end table
 @end deftp
 
+@subsubheading agate
+
+@cindex agate
+The @uref{gemini://qwertqwefsday.eu/agate.gmi, Agate}
+(@uref{https://github.com/mbrubeck/agate, GitHub page over HTTPS})
+program is a simple @uref{https://gemini.circumlunar.space/, Gemini}
+protocol server written in Rust.
+
+@deffn {Scheme Variable} agate-service-type
+This is the type of the agate service, whose value should be an
+@code{agate-service-type} object, as in this example:
+
+@lisp
+(service agate-service-type
+	 (agate-configuration
+	   (content "/srv/gemini")
+	   (cert "/srv/cert.pem")
+	   (key "/srv/key.rsa")))
+@end lisp
+
+The example above represents the minimal tweaking necessary to get Agate
+up and running. Specifying the path to the certificate and key is always
+necessary, as the Gemini protocol requires TLS by default.
+
+To obtain a certificate and a key, you could, for example, use OpenSSL,
+running a command similar to the following example:
+
+@example
+openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem \
+    -days 3650 -nodes -subj "/CN=example.com"
+@end example
+
+Of course, you'll have to replace @i{example.com} with your own domain
+name, and then point the Agate configuration towards the path of the
+generated key and certificate.
+
+@end deffn
+
+@deftp {Data Type} agate-configuration
+Data type representing the configuration of Agate.
+
+@table @asis
+@item @code{package} (default: @var{agate})
+The package object of the Agate server.
+
+@item @code{content} (default: @code{"/srv/gemini"})
+The path of the directory from which Agate will serve files.
+
+@item @code{cert} (default: @code{#f})
+The path to the TLS certificate PEM file to be used for encrypted
+connections. Must be filled in with a value from the user.
+
+@item @code{key} (default: @code{#f})
+The path to the PKCS8 private key file to be used for encrypted
+connections. Must be filled in with a value from the user.
+
+@item @code{addr} (default: @code{'("0.0.0.0:1965" "[::]:1965")})
+A list of the addresses to listen on.
+
+@item @code{hostname} (default: @code{#f})
+The domain name of this Gemini server. Optional.
+
+@item @code{lang} (default: @code{#f})
+RFC 4646 Language code(s) for text/gemini documents. Optional.
+
+@item @code{silent?} (default: @code{#f})
+Set to @code{#t} to disable logging output.
+
+@item @code{serve-secret?} (default: @code{#f})
+Set to @code{#t} to serve secret files (files/directories starting with
+a dot).
+
+@item @code{log-ip?} (default: @code{#t})
+Whether or not to output IP addresses when logging.
+
+@item @code{user} (default: @code{"agate"})
+Owner of the @code{agate} process.
+
+@item @code{group} (default: @code{"agate"})
+Owner's group of the @code{agate} process.
+
+@item @code{log-file} (default: @code{"/var/log/agate.log"})
+The path of the file which should store the logging output of Agate.
+
+@end table
+@end deftp
+
 @node Certificate Services
 @subsection Certificate Services
 
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index ff7b262b6a..aa688a4328 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2020 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
-;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
+;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,6 +50,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages mail)
+  #:use-module (gnu packages rust-apps)
   #:use-module (guix packages)
   #:use-module (guix records)
   #:use-module (guix modules)
@@ -263,7 +264,25 @@
             gmnisrv-configuration-package
             gmnisrv-configuration-config-file
 
-            gmnisrv-service-type))
+            gmnisrv-service-type
+
+            agate-configuration
+            agate-configuration?
+            agate-configuration-package
+            agate-configuration-content
+            agate-configuration-cert
+            agate-configuration-key
+            agate-configuration-addr
+            agate-configuration-hostname
+            agate-configuration-lang
+            agate-configuration-silent
+            agate-configuration-serve-secret
+            agate-configuration-log-ip
+            agate-configuration-user
+            agate-configuration-group
+            agate-configuration-log-file
+
+            agate-service-type))
 
 ;;; Commentary:
 ;;;
@@ -1885,3 +1904,92 @@ root=/srv/gemini
     "Run the gmnisrv Gemini server.")
    (default-value
      (gmnisrv-configuration))))
+
+(define-record-type* <agate-configuration>
+  agate-configuration make-agate-configuration
+  agate-configuration?
+  (package  agate-configuration-package
+            (default agate))
+  (content  agate-configuration-content
+            (default "/srv/gemini"))
+  (cert     agate-configuration-cert
+            (default #f))
+  (key      agate-configuration-key
+            (default #f))
+  (addr     agate-configuration-addr
+            (default '("0.0.0.0:1965" "[::]:1965")))
+  (hostname agate-configuration-hostname
+            (default #f))
+  (lang     agate-configuration-lang
+            (default #f))
+  (silent?  agate-configuration-silent
+            (default #f))
+  (serve-secret? agate-configuration-serve-secret
+                 (default #f))
+  (log-ip?  agate-configuration-log-ip
+            (default #t))
+  (user     agate-configuration-user
+            (default "agate"))
+  (group    agate-configuration-group
+            (default "agate"))
+  (log-file agate-configuration-log
+            (default "/var/log/agate.log")))
+
+(define agate-shepherd-service
+  (match-lambda
+    (($ <agate-configuration> package content cert key addr
+                              hostname lang silent? serve-secret?
+                              log-ip? user group log-file)
+     (list (shepherd-service
+            (provision '(agate))
+            (requirement '(networking))
+            (documentation "Run the agate Gemini server.")
+            (start (let ((agate (file-append package "/bin/agate")))
+                     #~(make-forkexec-constructor
+			(list #$agate
+			      "--content" #$content
+			      "--cert" #$cert
+			      "--key" #$key
+			      "--addr" #$@addr
+                              #$@(if lang
+                                     (list "--lang" lang)
+                                     '())
+			      #$@(if hostname
+				     (list "--hostname" hostname)
+				     '())
+			      #$@(if silent? '("--silent") '())
+			      #$@(if serve-secret? '("--serve-secret") '())
+			      #$@(if log-ip? '("--log-ip") '()))
+			#:user #$user #:group #$group
+			#:log-file #$log-file)))
+            (stop #~(make-kill-destructor)))))))
+             
+(define agate-accounts
+  (match-lambda
+    (($ <agate-configuration> _ _ _ _ _
+                              _ _ _ _
+                              _ user group _)
+     `(,@(if (equal? group "agate")
+             '()
+             (list (user-group (name "agate") (system? #t))))
+       ,(user-group
+         (name group)
+         (system? #t))
+       ,(user-account
+         (name user)
+         (group group)
+         (supplementary-groups '("agate"))
+         (system? #t)
+         (comment "agate server user")
+         (home-directory "/var/empty")
+         (shell (file-append shadow "/sbin/nologin")))))))
+
+(define agate-service-type
+  (service-type
+   (name 'guix)
+   (extensions
+    (list (service-extension account-service-type
+                             agate-accounts)
+          (service-extension shepherd-root-service-type
+                             agate-shepherd-service)))
+   (default-value (agate-configuration))))
-- 
2.30.0





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 15 Feb 2021 12:43:01 GMT) Full text and rfc822 format available.

Notification sent to Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>:
bug acknowledged by developer. (Mon, 15 Feb 2021 12:43:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
Cc: 46513-done <at> debbugs.gnu.org
Subject: Re: [bug#46513] [PATCH 0/6] Add Agate Gemini server.
Date: Mon, 15 Feb 2021 13:42:33 +0100
Hello,

Alexandru-Sergiu Marton <brown121407 <at> posteo.ro> writes:

> These patches add the package for the Agate server for the Gemini protocol as
> well as a service and a little documentation in the manual regarding the
> configuration of the service.
>
> Alexandru-Sergiu Marton (6):
>   gnu: Add rust-rustls-0.19.
>   gnu: rust-tokio-macros-1: Update to 1.1.0.
>   gnu: rust-tokio-1: Update to 1.2.0.
>   gnu: Add rust-tokio-rustls-0.22.
>   gnu: Add agate.
>   services: Add agate web service.

Thank you!

I applied the patches with the modifications below:

- When adding new version of an existing Rust crate, I made the latter
  inherit from the former.

- I updated agate to 2.5.2, and changed the home-page into an HTTP one
  (i.e., the repository) for practical reasons.

- I fixed typos and wording in the documentation (two spaces after full
  stops, "the path of the file" -> "the file", @var -> @file or @code).

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Mar 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 31 days ago.

Previous Next


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