(operating-system) structure requires a kernel

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
T
T
Tomas Volf wrote on 6 Apr 16:51 +0200
(address . bug-guix@gnu.org)
ZhFhfu_fcTyfxjeV@ws
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYRYX4ACgkQL7/ufbZ/
wakuuA/+Ir0/NFGzlo4+3IwZ0b6Yjv9GOoKu884tpW1nFnrwBF7Ctl1yDdcbbeHW
uff5Ge9TED6cf71kIhDoPLehA5Yktbt4QoqXquk1jgDBH5e7uJ6eKhh7ls6n9Xnp
DgfxPReKl6DQFqvA9pspkIuIgA20w8AH6hzsrtzvbuAl2+GhssQIDy6gQyfI6InM
opfJA9Po/wQOFHtd2tMUSBOpOm5+bpYgT4MK0AMQqPN7fUpAXdis7FFGznWAm1E/
ISNCIRzeGSGPJB7uTZf9tkT09OqmXQT9h8eIQFTpGohiDnkJ09Cy0GXfQSALzU8c
ne0Rb6ipCbYA25LXO56mG54bIYZ04ARzKWBLlE9FBIpqtrPN5j/9Uj522F5dayoR
WQul3mDDlMt+Kr8LBfujLUMJo17nyLQR6ByCh18rXJQPQsMoHp28xL793K6epKEt
rAu6ES/nNIgsUEqVlKOE3Iu/6lrtvQmyYRlSjLBcuxg3xOd08oKzwj4F8qYUm7q6
pUJBDW9L4XPM7mEz4pRgWAaw5rIdjeeVNIbxba7Scpu5RppL/r7l5gLnrB9e31ka
qpyaBuk5FDeCHg0j70P5lIeH4KJfCQTGCnkifUazAFwxE6NYOaCzHbUu4NlhXq4b
TIBFWJBhJ0JUd2+wO6b7qFASN3QDUGPtJj6hCx4Z2IOZdENjS8s=
=3UQK
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 8 Apr 14:28 +0200
(name . Tomas Volf)(address . ~@wolfsden.cz)(address . 70239@debbugs.gnu.org)
87cyr0qbqt.fsf@gnu.org
Hi,

Tomas Volf <~@wolfsden.cz> skribis:

Toggle quote (10 lines)
> (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)

[...]

Toggle quote (17 lines)
> 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.

Toggle quote (16 lines)
> 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:
Toggle diff (35 lines)
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))
Could you confirm?

Toggle quote (3 lines)
> 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’.
T
T
Tomas Volf wrote on 9 Apr 18:04 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70239@debbugs.gnu.org)
ZhVm82D2jgxyp3w2@ws
Hi,

On 2024-04-08 14:28:58 +0200, Ludovic Courtès wrote:
Toggle quote (4 lines)
> [..]
>
> Could you confirm?

Yes, the attached patch fixed the issue for me. :)

Toggle quote (9 lines)
>
> > 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’.

Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmYVZvMACgkQL7/ufbZ/
wam/QA//YIpwWardOVnARAWUpr6L0yFPSeoBegZ/2ch3kf0kSDdD6CRdReEM4W3W
YeCnpPs8YiqIc1QCYpqv6SyVah+af/9Se0tBW2bkotoiDR7U6snO5FRopvL4CgZs
em9i/YosJMGqU/8xvPeatjBvT9PVKfuKuOC8RyORkjizyH4oDxrnhc+tkzfyGoD2
b7Kv+ZMBOXt87Ine7mZt4Y5K2BU/43AsbfLiOfJxd2B48iHp0nzFOxUGI54ZwgXd
5RA7tRPpKcQ4D06nxYZYA+tQjnGtuahYpRIDoLqqI/DdnhGn8BEwQkNjlMsWf51j
2z4asQk2rrgexn51CpQL4G7qt2hvr4ALfpIsV9nqr2PRomNAVKakFwBZvFX+Zh/T
gLmZsq5aMsR/46QFScs6Zpa5xWjJarSYJ3YbbrgKwC1CEAdvrDqzdyxNjTibR4Jz
oxu9dmc32vq3DS8QbbL6uHbPLdgWJzWEnhlfcVSMkYSqZUufm1Gv5ty6QFCDTTp4
KNFEHz35BbK++MoyR2bY90F9O4+qGtYMQhIGF686ne0igBdYoH3bOjn0xgaebHXU
ZYgHbkz9xDvzVhTkSR/nnOqFHVNQ6TUgYm9LLIcS+0FaKahWyUETLGbFHSu8aKQr
KfX61iawY/sM6GlQ6YL424X+gp/Wo11y2UZbRvHB5lTPEb5JqsQ=
=8fg3
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 70239@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70239
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch