1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

services/udev: Allow configuring udev to run in debug mode.

This re-introduces commit dd64f441d3, which had
been reverted due to previously causing a system hang when debug? was enabled,
a problem that appears to have been resolved within Shepherd.

* gnu/services/base.scm (<udev-configuration>): <debug?>: New field.
* gnu/services/base.scm (udev-shepherd-service): Use it to add '--debug' to
the command line, if applicable.
* doc/guix.texi (Base Services): Document it.

Change-Id: I88243fb4f321ff0876dd227e3c2b22082d37cfcf
This commit is contained in:
Maxim Cournoyer
2025-02-24 16:36:41 +09:00
parent dde3ac664c
commit bb8cc412c8
2 changed files with 17 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021 Hui Lu <luhuins@163.com>
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021-2023, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021, 2025 muradm <mail@muradm.net>
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
@@ -160,6 +160,8 @@
udev-configuration
udev-configuration?
udev-configuration-udev
udev-configuration-debug?
udev-configuration-rules
udev-configuration-hardware
udev-service-type
@@ -2581,6 +2583,8 @@ command that allows you to share pre-built binaries with others over HTTP.")))
udev-configuration?
(udev udev-configuration-udev ;file-like
(default eudev))
(debug? udev-configuration-debug? ;boolean
(default #f))
(rules udev-configuration-rules ;list of file-like
(default '()))
(hardware udev-configuration-hardware ;list of file-like
@@ -2723,7 +2727,10 @@ item of PACKAGES."
(umask old-umask))
(let ((pid (fork+exec-command
(list udevd)
(list udevd
#$@(if (udev-configuration-debug? config)
'("--debug")
'()))
#:environment-variables
(cons*
(string-append "LINUX_MODULE_DIRECTORY="