From: "Ludovic Courtès" <ludo@gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 70239@debbugs.gnu.org
Subject: bug#70239: (operating-system) structure requires a kernel
Date: Mon, 08 Apr 2024 14:28:58 +0200 [thread overview]
Message-ID: <87cyr0qbqt.fsf@gnu.org> (raw)
In-Reply-To: <ZhFhfu_fcTyfxjeV@ws> (Tomas Volf's message of "Sat, 6 Apr 2024 16:51:42 +0200")
[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]
Hi,
Tomas Volf <~@wolfsden.cz> skribis:
> (operating-system
> (host-name "guix")
> ;; Servers usually use UTC regardless of the location.
> (timezone "Etc/UTC")
> (locale "en_US.utf8")
> (firmware '())
> (initrd-modules '())
> ; (kernel %ct-dummy-kernel)
> (kernel #f)
[...]
> In gnu/services.scm:
> 1031:29 7 (linux-builder-configuration->system-entry _)
> In guix/profiles.scm:
> 439:4 6 (packages->manifest _)
> In srfi/srfi-1.scm:
> 586:17 5 (map1 (#f))
> In guix/inferior.scm:
> 549:2 4 (loop #f "out" #<promise #<procedure 7f8c96627f98 at gu…>)
> 529:4 3 (inferior-package-input-field #f _)
> 473:18 2 (inferior-package-field #f (compose (lambda (#) (…)) #))
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
Indeed, ‘linux-builder-configuration->system-entry’ is not prepared for
that, but we can fix it.
> The (kernel (plain-file "fake-kernel" "")) leads to a different error:
>
> building /gnu/store/idy2sylx9zbvphzlqvhnldjvg242hd2a-linux-modules.drv...
> find-files: /gnu/store/jfcbq6djya5pi54yhpvzj66r18h4mp09-dummy-kernel-1/lib/modules: Not a directory
> Backtrace:
> 4 (primitive-load "/gnu/store/sckm34nzvmkcynhgn6zs5aq6xfs?")
> In ice-9/eval.scm:
> 619:8 3 (_ #f)
> 626:19 2 (_ #<directory (guile-user) 7ffff77f7c80>)
> 159:9 1 (_ #<directory (guile-user) 7ffff77f7c80>)
> In unknown file:
> 0 (car ())
>
> ERROR: In procedure car:
> In procedure car: Wrong type (expecting pair): ()
I believe this one is a regression introduced in
8f8ec56052766aa5105d672b77ad9eaca5c1ab3c. I believe this is fixed by
this patch:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1509 bytes --]
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 561cfe2fd0..40ff2dc808 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -134,18 +134,23 @@ (define (flat-linux-module-directory linux modules)
(guix build utils)
(rnrs io ports)
(srfi srfi-1)
- (srfi srfi-26))
+ (srfi srfi-26)
+ (ice-9 match))
(define module-dir
(string-append #$linux "/lib/modules"))
(define builtin-modules
- (call-with-input-file
- (first (find-files module-dir "modules.builtin$"))
- (lambda (port)
- (map file-name->module-name
- (string-tokenize
- (get-string-all port))))))
+ (match (find-files module-dir (lambda (file stat)
+ (string=? (basename file)
+ "modules.builtin")))
+ ((file . _)
+ (call-with-input-file file
+ (lambda (port)
+ (map file-name->module-name
+ (string-tokenize (get-string-all port))))))
+ (_
+ '())))
(define modules-to-lookup
(lset-difference string=? '#$modules builtin-modules))
[-- Attachment #3: Type: text/plain, Size: 213 bytes --]
Could you confirm?
> I think it would be best to just support (kernel #f) for container deployments,
> since that would simplify it and keep it manageable.
Yes, let’s do that too.
Thanks,
Ludo’.
next prev parent reply other threads:[~2024-04-08 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 14:51 bug#70239: (operating-system) structure requires a kernel Tomas Volf
2024-04-08 12:28 ` Ludovic Courtès [this message]
2024-04-09 16:04 ` Tomas Volf
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=87cyr0qbqt.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=70239@debbugs.gnu.org \
--cc=~@wolfsden.cz \
/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).