[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/14: services: quassel: Use 'least-authority-wrapper'.
From: |
guix-commits |
Subject: |
13/14: services: quassel: Use 'least-authority-wrapper'. |
Date: |
Sun, 1 May 2022 16:15:34 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit dac4efc466fd459912d6dd85a0be7c96cd3e35e1
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Apr 17 22:18:50 2022 +0200
services: quassel: Use 'least-authority-wrapper'.
* gnu/services/messaging.scm (quassel-shepherd-service): Use
'least-authority-wrapper' instead of
'make-forkexec-constructor/container'.
---
gnu/services/messaging.scm | 42 ++++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 7fdd8cf285..05bf6e784b 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -939,29 +939,31 @@ a gateway between IRC and chat networks.")))
(define quassel-shepherd-service
(match-lambda
(($ <quassel-configuration> quassel interface port loglevel)
- (with-imported-modules (source-module-closure
- '((gnu build shepherd)
- (gnu system file-systems)))
+ (let ((quassel (least-authority-wrapper
+ (file-append quassel "/bin/quasselcore")
+ #:name "quasselcore"
+ #:mappings (list (file-system-mapping
+ (source "/var/lib/quassel")
+ (target source)
+ (writable? #t))
+ (file-system-mapping
+ (source "/var/log/quassel")
+ (target source)
+ (writable? #t)))
+ ;; XXX: The daemon needs to live in the main user
+ ;; namespace, as root, so it can access /var/lib/quassel
+ ;; owned by "quasselcore".
+ #:namespaces (fold delq %namespaces '(net user)))))
(list (shepherd-service
(provision '(quassel))
(requirement '(user-processes networking))
- (modules '((gnu build shepherd)
- (gnu system file-systems)))
- (start #~(make-forkexec-constructor/container
- (list #$(file-append quassel "/bin/quasselcore")
- "--configdir=/var/lib/quassel"
- "--logfile=/var/log/quassel/core.log"
- (string-append "--loglevel=" #$loglevel)
- (string-append "--port=" (number->string
#$port))
- (string-append "--listen=" #$interface))
- #:mappings (list (file-system-mapping
- (source "/var/lib/quassel")
- (target source)
- (writable? #t))
- (file-system-mapping
- (source "/var/log/quassel")
- (target source)
- (writable? #t)))))
+ (start #~(make-forkexec-constructor
+ (list #$quassel
+ "--configdir=/var/lib/quassel"
+ "--logfile=/var/log/quassel/core.log"
+ (string-append "--loglevel=" #$loglevel)
+ (string-append "--port=" (number->string
#$port))
+ (string-append "--listen=" #$interface))))
(stop #~(make-kill-destructor))))))))
(define %quassel-account
- 03/14: linux-container: 'call-with-container' relays SIGTERM and SIGINT., (continued)
- 03/14: linux-container: 'call-with-container' relays SIGTERM and SIGINT., guix-commits, 2022/05/01
- 11/14: services: wesnothd: Grant write access to /var/run/wesnothd., guix-commits, 2022/05/01
- 02/14: file-systems: Avoid load-time warnings when attempting to load (guix store)., guix-commits, 2022/05/01
- 06/14: Add (guix least-authority)., guix-commits, 2022/05/01
- 09/14: services: bitlbee: Use 'make-inetd-constructor'., guix-commits, 2022/05/01
- 04/14: linux-container: Ensure signal-handling asyncs get a chance to run., guix-commits, 2022/05/01
- 10/14: services: ipfs: Use 'least-authority-wrapper'., guix-commits, 2022/05/01
- 12/14: services: wesnothd: Use 'least-authority-wrapper'., guix-commits, 2022/05/01
- 01/14: gexp: Add 'references-file'., guix-commits, 2022/05/01
- 14/14: services: opendht: Use 'least-authority-wrapper'., guix-commits, 2022/05/01
- 13/14: services: quassel: Use 'least-authority-wrapper'.,
guix-commits <=
- 08/14: services: dicod: Use 'make-inetd-constructor'., guix-commits, 2022/05/01
- 07/14: services: dicod: Rewrite using 'least-authority-wrapper'., guix-commits, 2022/05/01
- 05/14: linux-container: Add #:child-is-pid1? parameter to 'call-with-container'., guix-commits, 2022/05/01