GNU bug report logs

#77004 [PATCH] gnu: libvirt: Fix path to Linux modules

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to guix-patches@gnu.org:
bug#77004; Package guix-patches. (Fri, 14 Mar 2025 01:17:02 GMT) (full text, mbox, link).


Acknowledgement sent to nathan <nathan_mail@nborghese.com>:
New bug report received and forwarded. Copy sent to guix-patches@gnu.org. (Fri, 14 Mar 2025 01:17:02 GMT) (full text, mbox, link).


Message #5 received at submit@debbugs.gnu.org (full text, mbox, reply):

From: nathan <nathan_mail@nborghese.com>
To: guix-patches@gnu.org
Subject: [PATCH] gnu: libvirt: Fix path to Linux modules
Date: Fri, 14 Mar 2025 01:16:30 +0000
[Message part 1 (text/plain, inline)]
libvirt needs to load a file that is inside the modules folder.
Fix the path
Nix has a similar fix https://github.com/NixOS/nixpkgs/pull/286985
[0001-gnu-libvirt-Fix-path-to-Linux-modules.patch (text/x-patch, attachment)]

Information forwarded to guix-patches@gnu.org:
bug#77004; Package guix-patches. (Sun, 16 Mar 2025 13:16:02 GMT) (full text, mbox, link).


Message #8 received at 77004@debbugs.gnu.org (full text, mbox, reply):

From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: nathan <nathan_mail@nborghese.com>
Cc: 77004@debbugs.gnu.org
Subject: Re: [bug#77004] [PATCH] gnu: libvirt: Fix path to Linux modules, [PATCH] gnu: libvirt: Fix path to Linux modules
Date: Sun, 16 Mar 2025 22:14:47 +0900
Hi Nathan,

nathan <nathan_mail@nborghese.com> writes:

> libvirt needs to load a file that is inside the modules folder.
> Fix the path
> Nix has a similar fix https://github.com/NixOS/nixpkgs/pull/286985
>
> From f3317c91eb469ff54e31b0fafd45e2070a1bb06a Mon Sep 17 00:00:00 2001
> Message-ID: <f3317c91eb469ff54e31b0fafd45e2070a1bb06a.1741914564.git.nathan_mail@nborghese.com>
> From: nathan <nathan_mail@nborghese.com>
> Date: Thu, 13 Mar 2025 20:36:27 -0400
> Subject: [PATCH] gnu: libvirt: Fix path to Linux modules
>
> * gnu/packages/virtualization.scm (libvirt): Use LINUX_MODULE_DIRECTORY to
> find modules.
> [source]: Add libvirt-respect-modules-path.patch
> * gnu/packages/patches/libvirt-respect-modules-path.patch: new file
> * gnu/local.mk: Register new file
> * gnu/services/virtualization.scm (libvirt-shepherd-service)
> <#:environment-variables>: pass LINUX_MODULE_DIRECTORY

LGTM.

[...]

> @@ -508,11 +508,13 @@ (define (libvirt-shepherd-service config)
>                       (list (string-append #$libvirt "/sbin/libvirtd")
>                             "-f" #$config-file
>                             #$@(if listen-tcp? '("--listen") '()))
> -                     ;; For finding qemu and ip binaries.
> +                     ;; For finding qemu, ip binaries, and kernel modules
>                       #:environment-variables
> -                     (list (string-append
> -                            "PATH=/run/current-system/profile/bin:"
> -                            "/run/current-system/profile/sbin"))))
> +                     (list
> +                      (string-append
> +                       "PATH=/run/current-system/profile/bin:"
> +                       "/run/current-system/profile/sbin")
> +                      "LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules")))

I suppose only modules from the booted kernel makes sense to be used,
hence the /run/booted-system instead of /run/current-system as Nix uses?

-- 
Thanks,
Maxim




Reply sent to Maxim Cournoyer <maxim.cournoyer@gmail.com>:
You have taken responsibility. (Sun, 16 Mar 2025 14:20:03 GMT) (full text, mbox, link).


Notification sent to nathan <nathan_mail@nborghese.com>:
bug acknowledged by developer. (Sun, 16 Mar 2025 14:20:03 GMT) (full text, mbox, link).


Message #13 received at 77004-done@debbugs.gnu.org (full text, mbox, reply):

From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: nathan <nathan_mail@nborghese.com>
Cc: 77004-done@debbugs.gnu.org
Subject: Re: [bug#77004] [PATCH] gnu: libvirt: Fix path to Linux modules, [PATCH] gnu: libvirt: Fix path to Linux modules
Date: Sun, 16 Mar 2025 23:19:17 +0900
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

[...]

>> @@ -508,11 +508,13 @@ (define (libvirt-shepherd-service config)
>>                       (list (string-append #$libvirt "/sbin/libvirtd")
>>                             "-f" #$config-file
>>                             #$@(if listen-tcp? '("--listen") '()))
>> -                     ;; For finding qemu and ip binaries.
>> +                     ;; For finding qemu, ip binaries, and kernel modules
>>                       #:environment-variables
>> -                     (list (string-append
>> -                            "PATH=/run/current-system/profile/bin:"
>> -                            "/run/current-system/profile/sbin"))))
>> +                     (list
>> +                      (string-append
>> +                       "PATH=/run/current-system/profile/bin:"
>> +                       "/run/current-system/profile/sbin")
>> +                      "LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules")))
>
> I suppose only modules from the booted kernel makes sense to be used,
> hence the /run/booted-system instead of /run/current-system as Nix uses?

I've kept /run/booted-system, made some light cosmetic changes including
in the GNU Changelog of the commit message (have a look in commit
856fa9a4e4), and pushed!

-- 
Thanks,
Maxim




Information forwarded to guix-patches@gnu.org:
bug#77004; Package guix-patches. (Sun, 16 Mar 2025 16:05:02 GMT) (full text, mbox, link).


Message #16 received at 77004@debbugs.gnu.org (full text, mbox, reply):

From: nathan <nathan_mail@nborghese.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>, 77004@debbugs.gnu.org
Subject: Re: [bug#77004] [PATCH] gnu: libvirt: Fix path to Linux modules
Date: Sun, 16 Mar 2025 16:03:57 +0000
Actually, Nix uses /run/booted-system too. They fixed it in a later patch that I didn't bother to link
https://github.com/NixOS/nixpkgs/pull/287544

Thanks for applying it

On 3/16/25 2:19 PM, Maxim Cournoyer wrote:
> Hi,
> 
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> 
> [...]
> 
>>> @@ -508,11 +508,13 @@ (define (libvirt-shepherd-service config)
>>>                        (list (string-append #$libvirt "/sbin/libvirtd")
>>>                              "-f" #$config-file
>>>                              #$@(if listen-tcp? '("--listen") '()))
>>> -                     ;; For finding qemu and ip binaries.
>>> +                     ;; For finding qemu, ip binaries, and kernel modules
>>>                        #:environment-variables
>>> -                     (list (string-append
>>> -                            "PATH=/run/current-system/profile/bin:"
>>> -                            "/run/current-system/profile/sbin"))))
>>> +                     (list
>>> +                      (string-append
>>> +                       "PATH=/run/current-system/profile/bin:"
>>> +                       "/run/current-system/profile/sbin")
>>> +                      "LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules")))
>>
>> I suppose only modules from the booted kernel makes sense to be used,
>> hence the /run/booted-system instead of /run/current-system as Nix uses?
> 
> I've kept /run/booted-system, made some light cosmetic changes including
> in the GNU Changelog of the commit message (have a look in commit
> 856fa9a4e4), and pushed!
> 




bug archived. Request was from Debbugs Internal Request <help-debbugs@gnu.org> to internal_control@debbugs.gnu.org. (Mon, 14 Apr 2025 11:24:05 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Wed Apr 16 02:57:24 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.