From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oGsNHratEWQMPwAASxT56A (envelope-from ) for ; Wed, 15 Mar 2023 12:36:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kL7PHbatEWRGNwAAauVa8A (envelope-from ) for ; Wed, 15 Mar 2023 12:36:22 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2A63F3670E for ; Wed, 15 Mar 2023 12:36:21 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=dvV42n9J; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678880182; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Ex6ZDzO6BK8JFaGh4LaWYEc1NCZ8G8qSBBsPAqST1vc=; b=a9p+IC0LvJh3ofPTSAliO5gtPEMgS48WcLXyjlqMHbpqPUuld38MRRpRL8+wbuJA2Jk7c9 TyEkc+O2mMyTTsCV2s4yKz5JUu19D9yQesKaSPC1+vvTApJUMuncLF9V6qlJy1NqREd+0d ySkeTeYh+5+jHm7xtL88h/YlT0juWlBOVcgdYvQZ0q8FddPncJhAsweP3FCEJsGIe731Ez tddg0KI7hdSCr47hTwj6cxUU2KpDPwMAhl3KjzXHR6S32YXkOuhVMMMeg2C4u1tSAM6OS/ 0eTckdt5JE1Iacs3cIPxSfXLIHT2Nhyw4MTV6zoZZ5PeC+V7RSIR+r1AwD72vw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=dvV42n9J; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678880182; a=rsa-sha256; cv=none; b=boSrUoUXHvjWuXoTq6jx5yfHflZj1Xtd7CftIOKGCBzzwev83Ivz8FIOKmrO0Z6L5gzwWP 9s5GphrrkMf+DhSUxa4PcFN87fl80/m81yO/wCmOLkXd+/mV0q+MAEE0JGVP8NYTmi2niE sVBfLALwOKmOhPFFCs+vtlUXQOPoYYlBCqVt+6mckxlXah93bX3rjRRoBAtGOCfkLHpVf5 YNKGwnb4GmrZw62atXxxd81XN0bhT/j2JRqgkPplBCKnnY7r5n3BXjxIBcuw3qh6mV2/2L XQwawMil79VeJNyxAValbjrX6ziiDjwbZKWyww4AJ4x7KdpVm0xawLJ05SQ1dg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcPQP-0007hG-3P; Wed, 15 Mar 2023 07:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcPQM-0007go-Kt for bug-guix@gnu.org; Wed, 15 Mar 2023 07:36:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcPQI-00020Z-EB for bug-guix@gnu.org; Wed, 15 Mar 2023 07:36:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcPQI-0007o8-Ab for bug-guix@gnu.org; Wed, 15 Mar 2023 07:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#62174: Cannot use modules with an inferior kernel. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 15 Mar 2023 11:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62174 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Robby Zambito Cc: Liliana Marie Prikler , 62174@debbugs.gnu.org Received: via spool by 62174-submit@debbugs.gnu.org id=B62174.167888012229955 (code B ref 62174); Wed, 15 Mar 2023 11:36:02 +0000 Received: (at 62174) by debbugs.gnu.org; 15 Mar 2023 11:35:22 +0000 Received: from localhost ([127.0.0.1]:39196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcPPe-0007n4-AM for submit@debbugs.gnu.org; Wed, 15 Mar 2023 07:35:22 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:54644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcPPb-0007mv-UC for 62174@debbugs.gnu.org; Wed, 15 Mar 2023 07:35:20 -0400 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1678880117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ex6ZDzO6BK8JFaGh4LaWYEc1NCZ8G8qSBBsPAqST1vc=; b=dvV42n9J3Oq+X2OzA6vxhCbZ4GmZDHyQNR6A2AH27MQLRMcP/gNzwpfZGJaFARpnM6Dn9+ /sUhQKiFV+BBivHz1QXIa/MRR9uGBuvkAnhWD2U2y3GtCi6Zvltd4eWndQLeF7e7Gj0VWB IanPWEaovPRGsMdm76BsA7Qt39+G3/g= In-Reply-To: <87sfe73pyq.fsf@robbyzambito.me> References: <87mt4gass9.fsf@robbyzambito.me> <87sfe73pyq.fsf@robbyzambito.me> Date: Wed, 15 Mar 2023 12:35:16 +0100 Message-ID: <87h6umtfgr.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 2A63F3670E X-Spam-Score: -0.93 X-Migadu-Spam-Score: -0.93 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: Hcw6zCRy1kSZ Robby Zambito writes: > Liliana Marie Prikler writes: >> I think you should try to pin the kernel modules as well. If that >> still doesn't work as intended (it very well might), we have a proper >> case of something that should work but doesn't. >> >> Cheers > > Thanks for the suggestion. I tested with the following: > > ``` > (define-values (rz/linux rz/linux-kernel-modules) > (let* ((channels > (list (channel > (name 'guix) > (url "https://git.savannah.gnu.org/git/guix.git") > (commit "d37b467631d5b0e965ea933b8bda8448993580e9")))) > (inferior (inferior-for-channels channels)) > (kernel-version "6.1.15")) > (values (first (lookup-inferior-packages inferior "linux-libre" kernel-version)) > (list (first (lookup-inferior-packages inferior "v4l2loopback-linux-module")))))) > > (operating-system > ... > (kernel rz/linux) > (kernel-loadable-modules rz/linux-kernel-modules) > ...) > ``` > > But I receive a different error now: > > ``` > running profile hook of type 'linux-module-database'... > Backtrace: > 1 (primitive-load "/gnu/store/7ha0kn8fz8yfi26m3m8997wlc8m?") > In ice-9/boot-9.scm: > 2007:7 0 (error _ . _) > > ice-9/boot-9.scm:2007:7: In procedure error: > Specified Linux kernel and Linux kernel modules are not all of the same version > ``` > > However, if I use the most recent kernel version available in the > inferior... > > ``` > (define-values (rz/linux rz/linux-kernel-modules) > (let* ((channels > (list (channel > (name 'guix) > (url "https://git.savannah.gnu.org/git/guix.git") > (commit "d37b467631d5b0e965ea933b8bda8448993580e9")))) > (inferior (inferior-for-channels channels)) > (kernel-version "6.2.2")) > (values (first (lookup-inferior-packages inferior "linux-libre")) > (list (first (lookup-inferior-packages inferior "v4l2loopback-linux-module")))))) > ``` > > It actually works! So it seems that the problem is specifically with > using kernel modules with a kernel version other than the latest > linux-libre kernel from an inferior. I also tried using a specific > kernel version without an inferior like so: > > ``` > (operating-system > ... > (kernel (specification->package "linux-libre@6.1.15")) > (kernel-loadable-modules (list (specification->package"v4l2loopback-linux-module"))) > ...) > ``` > > And that works as well. > > TL;DR: The issue has been narrowed down to using kernel modules with a > kernel from an inferior besides the latest kernel from that inferior. I believe our kernel-loadable-modules is backed by a service with type linux-builder-service-type. It seems that the linux-builder-configuration->system-entry only deals gracefully with modules that are filtered by "(package? mod)" in order to rewrite the package with "package-for-kernel". So there are some things we'd need to do to ensure your use case works: - Get linux-builder-configuration->system-entry to support packages from an inferior. Can you try to wrap your kernel module package like such [untested], with rz/linux being the kernel inferior package you actually want: --8<---------------cut here---------------start------------->8--- (kernel rz/linux) (kernel-loadable-modules (map (lambda (mod) (package-for-kernel lz/linux mod)) rz/linux-kernel-modules)) --8<---------------cut here---------------end--------------->8--- If this doesn't work, we also need to make package-for-kernel support packages from an inferior for both the kernel and module argument, or create an alternative implementation that deals `linux-builder-configuration->system-entry' can dispatch to for this specific case. Good luck! - Jelle