unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Jack Hill <jackhill@jackhill.us>
Cc: 39671@debbugs.gnu.org, Joshua Branson <jbranso@dismail.de>
Subject: bug#39671: Something appears to disable linux kernel modules from loading.
Date: Thu, 20 Feb 2020 20:59:25 +0100	[thread overview]
Message-ID: <20200220195925.3gpfvamxweucfhpf@pelzflorian.localdomain> (raw)
In-Reply-To: <20200220121246.cerl2fivfguyzi7l@pelzflorian.localdomain>

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

The attached patch fixes the issue for me.  Can someone confirm?

It replaces or copies setenv calls for the udev service.

There are more service definitions that call setenv; I do not know if
they need to be moved too.

I will try if a smaller patch would suffice as well now.

Regards,
Florian

[-- Attachment #2: 0001-services-udev-Do-not-rely-on-shepherd-inheriting-env.patch --]
[-- Type: text/plain, Size: 2709 bytes --]

From 11509370049355680c815e06250afc09325c589c Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Thu, 20 Feb 2020 14:05:06 +0100
Subject: [PATCH] services: udev: Do not rely on shepherd inheriting
 environment variables.

Fixes <https://bugs.gnu.org/39671>.

* gnu/services/base.scm (udev-shepherd-service)[start] Move or copy
environment variables to 'fork+exec-command' instead of 'setenv'.
---
 gnu/services/base.scm | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 0c154d1c4e..706b3ae7ec 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2037,11 +2038,6 @@ item of @var{packages}."
                 (setenv "LINUX_MODULE_DIRECTORY"
                         "/run/booted-system/kernel/lib/modules")
 
-                ;; The first one is for udev, the second one for eudev.
-                (setenv "UDEV_CONFIG_FILE" #$udev.conf)
-                (setenv "EUDEV_RULES_DIRECTORY"
-                        #$(file-append rules "/lib/udev/rules.d"))
-
                 (let* ((kernel-release
                         (utsname:release (uname)))
                        (linux-module-directory
@@ -2058,7 +2054,18 @@ item of @var{packages}."
                     (make-static-device-nodes directory))
                   (umask old-umask))
 
-                (let ((pid (fork+exec-command (list udevd))))
+                (let ((pid (fork+exec-command (list udevd)
+                            #:environment-variables
+                            (cons*
+                             ;; The first one is for udev, the second one for
+                             ;; eudev.
+                             (string-append "UDEV_CONFIG_FILE=" #$udev.conf)
+                             (string-append "EUDEV_RULES_DIRECTORY="
+                                            #$(file-append
+                                               rules "/lib/udev/rules.d"))
+                             (string-append "LINUX_MODULE_DIRECTORY="
+                                            (getenv "LINUX_MODULE_DIRECTORY"))
+                             (default-environment-variables)))))
                   ;; Wait until udevd is up and running.  This appears to
                   ;; be needed so that the events triggered below are
                   ;; actually handled.
-- 
2.25.0


  reply	other threads:[~2020-02-20 20:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 23:11 bug#39671: Something appears to disable linux kernel modules from loading Joshua Branson via Bug reports for GNU Guix
2020-02-19 21:18 ` bug#39671: Linux-Libre 5.4.20 breaks Display Sessions Raghav Gururajan
2020-02-19 21:31 ` bug#39671: Something appears to disable linux kernel modules from loading Ludovic Courtès
2020-02-19 21:50   ` Jack Hill
2020-02-19 22:11     ` Ludovic Courtès
2020-02-19 22:50       ` Jack Hill
2020-02-20 10:18     ` pelzflorian (Florian Pelz)
2020-02-20 12:12       ` pelzflorian (Florian Pelz)
2020-02-20 19:59         ` pelzflorian (Florian Pelz) [this message]
2020-02-20 20:34           ` Leo Famulari
2020-02-20 20:43             ` pelzflorian (Florian Pelz)
2020-02-20 20:58               ` pelzflorian (Florian Pelz)
2020-02-20 21:08                 ` Jan Nieuwenhuizen
2020-02-20 21:06               ` Leo Famulari
2020-02-20 22:02           ` Ludovic Courtès
2020-02-20 23:24             ` pelzflorian (Florian Pelz)
2020-02-20 15:55   ` Joshua Branson via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200220195925.3gpfvamxweucfhpf@pelzflorian.localdomain \
    --to=pelzflorian@pelzflorian.de \
    --cc=39671@debbugs.gnu.org \
    --cc=jackhill@jackhill.us \
    --cc=jbranso@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).