[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/14: services: wesnothd: Use 'least-authority-wrapper'.
From: |
guix-commits |
Subject: |
12/14: services: wesnothd: 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 53dbc6fd9a2f476f38e17496457a6b3b06e71687
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Apr 17 15:32:19 2022 +0200
services: wesnothd: Use 'least-authority-wrapper'.
* gnu/services/games.scm (wesnothd-shepherd-service): Use
'least-authority-wrapper' instead of
'make-forkexec-constructor/container'.
---
gnu/services/games.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/gnu/services/games.scm b/gnu/services/games.scm
index dc0bfbe9dc..6c2af44b49 100644
--- a/gnu/services/games.scm
+++ b/gnu/services/games.scm
@@ -23,6 +23,9 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages games)
#:use-module (gnu system shadow)
+ #:use-module ((gnu system file-systems) #:select (file-system-mapping))
+ #:use-module (gnu build linux-container)
+ #:autoload (guix least-authority) (least-authority-wrapper)
#:use-module (guix gexp)
#:use-module (guix modules)
#:use-module (guix records)
@@ -57,22 +60,20 @@
(define wesnothd-shepherd-service
(match-lambda
(($ <wesnothd-configuration> package port)
- (with-imported-modules (source-module-closure
- '((gnu build shepherd)
- (gnu system file-systems)))
+ (let ((wesnothd (least-authority-wrapper
+ (file-append package "/bin/wesnothd")
+ #:name "wesnothd"
+ #:mappings (list (file-system-mapping
+ (source "/var/run/wesnothd")
+ (target source)
+ (writable? #t)))
+ #:namespaces (delq 'net %namespaces))))
(shepherd-service
(documentation "The Battle for Wesnoth server")
(provision '(wesnoth-daemon))
(requirement '(networking))
- (modules '((gnu build shepherd)
- (gnu system file-systems)))
- (start #~(make-forkexec-constructor/container
- (list #$(file-append package "/bin/wesnothd")
- "-p" #$(number->string port))
- #:mappings (list (file-system-mapping
- (source "/var/run/wesnothd")
- (target source)
- (writable? #t)))
+ (start #~(make-forkexec-constructor
+ (list #$wesnothd "-p" #$(number->string port))
#:user "wesnothd" #:group "wesnothd"))
(stop #~(make-kill-destructor)))))))
- branch master updated (6b4124cdcc -> fee06d5aaa), guix-commits, 2022/05/01
- 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 <=
- 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, 2022/05/01
- 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