GNU bug report logs -
#40595
[PATCH] system: Automatically adjust linux-module packages to use the operating-system's kernel.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40595 in the body.
You can then email your comments to 40595 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#40595
; Package
guix-patches
.
(Mon, 13 Apr 2020 11:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 13 Apr 2020 11:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/system.scm (package-for-kernel): New procedure.
(operating-system-directory-base-entries): Use it.
* gnu/tests/linux-module.scm: Test it.
---
gnu/system.scm | 18 +++++++++++++++++-
gnu/tests/linux-modules.scm | 11 ++++++++++-
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index fd456c6206..53c16233a1 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -32,6 +32,7 @@
#:use-module (guix derivations)
#:use-module (guix profiles)
#:use-module (guix ui)
+ #:use-module (guix utils)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages guile)
@@ -472,6 +473,16 @@ OS."
(file-append (operating-system-kernel os)
"/" (system-linux-image-file-name)))
+(define (package-for-kernel target-kernel module-package)
+ "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if
+possible (that is if there's a LINUX keyword argument in the build system)."
+ (package
+ (inherit module-package)
+ (arguments
+ (substitute-keyword-arguments (package-arguments module-package)
+ ((#:linux kernel #f)
+ target-kernel)))))
+
(define* (operating-system-directory-base-entries os)
"Return the basic entries of the 'system' directory of OS for use as the
value of the SYSTEM-SERVICE-TYPE service."
@@ -486,7 +497,12 @@ value of the SYSTEM-SERVICE-TYPE service."
(kernel
(profile-derivation
(packages->manifest
- (cons kernel modules))
+ (cons kernel
+ (map (lambda (module)
+ (if (package? module)
+ (package-for-kernel kernel module)
+ module))
+ modules)))
#:hooks (if has-modules?
(list linux-module-database)
'())))
diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm
index 788bdc848a..953b132ef7 100644
--- a/gnu/tests/linux-modules.scm
+++ b/gnu/tests/linux-modules.scm
@@ -28,8 +28,10 @@
#:use-module (guix derivations)
#:use-module (guix gexp)
#:use-module (guix modules)
+ #:use-module (guix packages)
#:use-module (guix monads)
#:use-module (guix store)
+ #:use-module (guix utils)
#:export (%test-loadable-kernel-modules-0
%test-loadable-kernel-modules-1
%test-loadable-kernel-modules-2))
@@ -118,5 +120,12 @@ with one extra module.")
(description "Tests loadable kernel modules facility of <operating-system>
with two extra modules.")
(value (run-loadable-kernel-modules-test
- (list acpi-call-linux-module ddcci-driver-linux)
+ (list acpi-call-linux-module
+ (package
+ (inherit ddcci-driver-linux)
+ (arguments
+ `(#:linux #f
+ ,@(strip-keyword-arguments '(#:linux)
+ (package-arguments
+ ddcci-driver-linux))))))
'("acpi_call" "ddcci")))))
Information forwarded
to
guix-patches <at> gnu.org
:
bug#40595
; Package
guix-patches
.
(Tue, 14 Apr 2020 07:41:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 40595 <at> debbugs.gnu.org (full text, mbox):
Hello Danny,
Thanks for the patch, I needed such feature.
It works well and the test pass; LGTM!
- Brice
Information forwarded
to
guix-patches <at> gnu.org
:
bug#40595
; Package
guix-patches
.
(Wed, 22 Apr 2020 18:58:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 40595 <at> debbugs.gnu.org (full text, mbox):
Hello Danny,
Looks like this patch need to be rebased.
Cheers,
- Brice
Reply sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
You have taken responsibility.
(Wed, 22 Apr 2020 21:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
bug acknowledged by developer.
(Wed, 22 Apr 2020 21:01:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 40595-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Brice,
yes, indeed.
Thanks.
I've rebased it and pushed it to guix master as commit f91ad0b13d8d3d5b1ae92e209b1be6e8473385ba.
[Message part 2 (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 21 May 2020 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.