summaryrefslogtreecommitdiff
path: root/gnu/services/virtualization.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-03-10 00:21:26 +0100
committerLudovic Courtès <ludo@gnu.org>2025-03-10 00:38:05 +0100
commitd0510dcd824e1b3fda62a8841e792581d7b8de8d (patch)
tree0e486c0b0f7add9ae4dd7e68c16cb347d640a001 /gnu/services/virtualization.scm
parentac2681310878ca841a91020f4211bff4369a8f72 (diff)
gnu: Adjust tests for ‘shepherd-system-log-service-type’.
This is a followup to 8492a3c8962664db4bd0e7475f63be0ef59db87a. * gnu/services/virtualization.scm (%minimal-vm-syslog-config): Remove. (%system-log-message-destination): New variable. (%virtual-build-machine-operating-system): Use it, and modify ‘shepherd-system-log-service-type’ instead of ‘syslog-service-type’. * gnu/tests/base.scm (%avahi-os): Likewise. * gnu/tests/install.scm (%syslog-conf): Remove. (operating-system-with-console-syslog): Modify ‘shepherd-system-log-service-type’ instead of ‘syslog-service-type’. * gnu/tests/nfs.scm (%nfs-os, run-nfs-full-test): Likewise. * gnu/tests/reconfigure.scm (run-kexec-test): Likewise. Change-Id: I142d34ad27594a538f5b75daf087e48c690171b8
Diffstat (limited to 'gnu/services/virtualization.scm')
-rw-r--r--gnu/services/virtualization.scm35
1 files changed, 19 insertions, 16 deletions
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 88cc91bb490..796b9bf86f5 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ryan Moe <ryan.moe@gmail.com>
-;;; Copyright © 2018, 2020-2024 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2020-2025 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020, 2021, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
@@ -1289,17 +1289,20 @@ that will be listening to receive secret keys on ADDRESS."
(_ #f))
(virtual-build-machine-port-forwardings config)))
-(define %minimal-vm-syslog-config
- ;; Minimal syslog configuration for a VM.
- (plain-file "vm-syslog.conf" "\
-# Log most messages to the console, which goes to the serial
-# output, allowing the host to log it.
-*.info;auth.notice;authpriv.none -/dev/console
-
-# The rest.
-*.=debug -/var/log/debug
-authpriv.*;auth.info /var/log/secure
-"))
+(define %system-log-message-destination
+ ;; Shepherd system log message destination procedure. Log most messages to
+ ;; the console, which goes to the serial output, allowing the host to log
+ ;; it.
+ #~(lambda (message)
+ (cond ((= (system-log-priority debug)
+ (system-log-message-priority message))
+ '("/var/log/debug"))
+ ((member (system-log-message-facility message)
+ (list (system-log-facility authorization)
+ (system-log-facility authorization/private)))
+ '("/var/log/secure"))
+ (else
+ '("/dev/console")))))
(define %virtual-build-machine-operating-system
(operating-system
@@ -1349,10 +1352,10 @@ authpriv.*;auth.info /var/log/secure
(inherit config)
(authorize-key? #f)
(use-substitutes? #f)))
- (syslog-service-type config =>
- (syslog-configuration
- (config-file
- %minimal-vm-syslog-config)))
+ (shepherd-system-log-service-type
+ config =>
+ (system-log-configuration
+ (message-destination %system-log-message-destination)))
(delete mingetty-service-type)
(delete console-font-service-type))))))