GNU bug report logs - #77004
[PATCH] gnu: libvirt: Fix path to Linux modules

Previous Next

Package: guix-patches;

Reported by: nathan <nathan_mail <at> nborghese.com>

Date: Fri, 14 Mar 2025 01:17:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77004 in the body.
You can then email your comments to 77004 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#77004; Package guix-patches. (Fri, 14 Mar 2025 01:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to nathan <nathan_mail <at> nborghese.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 14 Mar 2025 01:17:02 GMT) Full text and rfc822 format available.

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

From: nathan <nathan_mail <at> nborghese.com>
To: guix-patches <at> 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 <at> gnu.org:
bug#77004; Package guix-patches. (Sun, 16 Mar 2025 13:16:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: nathan <nathan_mail <at> nborghese.com>
Cc: 77004 <at> 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 <at> 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 <at> nborghese.com>
> From: nathan <nathan_mail <at> 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 <at> gmail.com>:
You have taken responsibility. (Sun, 16 Mar 2025 14:20:03 GMT) Full text and rfc822 format available.

Notification sent to nathan <nathan_mail <at> nborghese.com>:
bug acknowledged by developer. (Sun, 16 Mar 2025 14:20:03 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: nathan <nathan_mail <at> nborghese.com>
Cc: 77004-done <at> 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 <at> 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 <at> gnu.org:
bug#77004; Package guix-patches. (Sun, 16 Mar 2025 16:05:02 GMT) Full text and rfc822 format available.

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

From: nathan <nathan_mail <at> nborghese.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 77004 <at> 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 <at> 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 <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 Apr 2025 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.