[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/08: services: shepherd: Add workaround for 0.5.0 in containers.
From: |
Ludovic Courtès |
Subject: |
05/08: services: shepherd: Add workaround for 0.5.0 in containers. |
Date: |
Wed, 26 Sep 2018 17:40:46 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit a56c4eb8f43ae5555985d8a84308d150c0763c5a
Author: Ludovic Courtès <address@hidden>
Date: Wed Sep 26 22:52:38 2018 +0200
services: shepherd: Add workaround for 0.5.0 in containers.
* gnu/services/shepherd.scm (%containerized-shepherd-service): New service.
* gnu/system.scm (essential-services): Use it when CONTAINER? is true.
---
gnu/services/shepherd.scm | 16 ++++++++++++++++
gnu/system.scm | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 4c7e720..49d08cc 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -59,6 +59,7 @@
%default-modules
shepherd-service-file
+ %containerized-shepherd-service
shepherd-service-lookup-procedure
shepherd-service-back-edges
@@ -327,6 +328,21 @@ symbols provided/required by a service."
(lambda (service)
(vhash-foldq* cons '() service edges)))
+(define %containerized-shepherd-service
+ ;; XXX: This service works around a bug in the Shepherd 0.5.0: shepherd
+ ;; calls reboot(2) (via 'disable-reboot-on-ctrl-alt-del') when it starts,
+ ;; but in a container that fails with EINVAL. This was fixed in Shepherd
+ ;; commit 92e806bac1abaeeaf5d60f0ab50d1ae85ba6a62f.
+ (simple-service 'containerized-shepherd
+ shepherd-root-service-type
+ (list (shepherd-service
+ (provision '(containerized-shepherd))
+ (start #~(lambda ()
+ (set! (@@ (shepherd)
+ disable-reboot-on-ctrl-alt-del)
+ (const #t))
+ #t))))))
+
(define (shepherd-service-upgrade live target)
"Return two values: the subset of LIVE (a list of <live-service>) that needs
to be unloaded, and the subset of TARGET (a list of <shepherd-service>) that
diff --git a/gnu/system.scm b/gnu/system.scm
index e4a5747..99bc098 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -501,7 +501,7 @@ a container or that of a \"bare metal\" system."
;; Add the firmware service, unless we are building for a
;; container.
(if container?
- '()
+ (list %containerized-shepherd-service)
(list %linux-bare-metal-service
(service firmware-service-type
(operating-system-firmware os))))))))
- branch master updated (0661912 -> e15ede6), Ludovic Courtès, 2018/09/26
- 01/08: gnu: shepherd: Update to 0.5.0., Ludovic Courtès, 2018/09/26
- 04/08: services: dhcp-client: Use 'read-pid-file'., Ludovic Courtès, 2018/09/26
- 06/08: services: udev: Don't attempt to read "modules.devname" from a container., Ludovic Courtès, 2018/09/26
- 02/08: guix system: Load all services on reconfigure, not just stopped ones., Ludovic Courtès, 2018/09/26
- 08/08: gnu: enlightenment: Fix initial locale and keyboard selection., Ludovic Courtès, 2018/09/26
- 03/08: gnu: Remove incorrect Emacs package deprecations., Ludovic Courtès, 2018/09/26
- 05/08: services: shepherd: Add workaround for 0.5.0 in containers.,
Ludovic Courtès <=
- 07/08: services: virtual-terminal: Write to "default_utf8" only if necessary., Ludovic Courtès, 2018/09/26