From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SOZrH6iv6158cAAA0tVLHw (envelope-from ) for ; Thu, 18 Jun 2020 18:17:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EERoG6iv614qIAAAB5/wlQ (envelope-from ) for ; Thu, 18 Jun 2020 18:17:12 +0000 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 BA89F940BFC for ; Thu, 18 Jun 2020 18:17:11 +0000 (UTC) Received: from localhost ([::1]:44504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlz64-0002ls-S8 for larch@yhetil.org; Thu, 18 Jun 2020 14:17:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlz5y-0002lh-Py for guix-patches@gnu.org; Thu, 18 Jun 2020 14:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlz5y-0006cN-GF for guix-patches@gnu.org; Thu, 18 Jun 2020 14:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jlz5y-00072w-Bt for guix-patches@gnu.org; Thu, 18 Jun 2020 14:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41924] [PATCH] profiles: Make linux-module-database skip inappropriate inputs Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 Jun 2020 18:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41924 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Kozlov Cc: 41924@debbugs.gnu.org Received: via spool by 41924-submit@debbugs.gnu.org id=B41924.159250421427069 (code B ref 41924); Thu, 18 Jun 2020 18:17:02 +0000 Received: (at 41924) by debbugs.gnu.org; 18 Jun 2020 18:16:54 +0000 Received: from localhost ([127.0.0.1]:54377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlz5p-00072W-QT for submit@debbugs.gnu.org; Thu, 18 Jun 2020 14:16:54 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:35526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlz5n-00072N-75 for 41924@debbugs.gnu.org; Thu, 18 Jun 2020 14:16:52 -0400 Received: from localhost (80-110-127-207.cgn.dynamic.surfer.at [80.110.127.207]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 6AAC93367CA9; Thu, 18 Jun 2020 20:16:49 +0200 (CEST) Date: Thu, 18 Jun 2020 20:16:47 +0200 From: Danny Milosavljevic Message-ID: <20200618201647.73f8b0d5@scratchpost.org> In-Reply-To: <169811592419302@mail.yandex.ru> References: <169811592419302@mail.yandex.ru> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/dGUmEEssDGSBA/+P7J_vIU."; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.11 X-TUID: iVmb+ZavBtkx --Sig_/dGUmEEssDGSBA/+P7J_vIU. Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Ivan, thanks for the patch, and for persevering on this. Could you also add a system test to gnu/tests/linux-modules.scm ? That would also mean that you'd create a variant of linux-libre that has CONFIG_MODULES=3Dn. > (directory-entries > (lambda (directory) > - (scandir directory (lambda (basename) > - (not > - (string-prefix? "." basename)= ))))) > + (if (file-exists? directory) > + (scandir directory (lambda (basename) > + (not > + (string-prefix? "." basena= me)))) > + '()))) That would silently skip packages that don't contain kernel modules (but for example supertux or something), too, right? (so misconfigured guix wouldn't be detected) Also, if you tried to use a kernel without module support and then added mo= dules (for the wrong kernel, one with CONFIG_MODULES=3Dy) via extra guix packages, this would erroneously succeed, right? (I guess depmod would have something against it, though. Still, I'd like a= test for that) Usually I'd be fine with these unsupported constellations, but misconfigured kernel vs module ABI makes me reconsider my life choices, so probably not h= ere :-> What I would do is try to find a file that's only in the kernel when there's module support (/lib/modules doesn't count since there could be a kernel wi= th module support but no modules compiled), and then try to ascertain whether CONFIG_MODULES=3Dy that way, so (define config-modules? (any (append-map directory-entries with marker-file= ))) or something. Then succeed either with config-modules? and at least one file per entry, or with (not config-modules?) and no files anywhere. Alternatively, we could at least make it only possible for the FIRST entry in the list of module packages (which is the Linux kernel) to have no /lib/modules, and not care about any of the other entries in that way. > + ;; Do nothing when there is nothing to do > + (() (mkdir #$output)) Good idea. --Sig_/dGUmEEssDGSBA/+P7J_vIU. Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl7rr48ACgkQ5xo1VCww uqVcIAgAhexE7zXohEsHW3z/NM29tk04kEv8fTtdPRwapwt+6uYqay5G9igZ6W24 sYLzvZL82CJRRPmNKCpsNAWIDqc3fdBcYphukY/Q9ShuxsQZO7l946msrosrrxbg 5gRTR/JAVmebPmRIXo84Y+AfPPDQBPmPx70cDs0lwmCkOOS7TbgjgpnqJTlKj5KX cDBVIzkjXKxjrISGQ8tnsVqQUw4RHvhL/H5B+/QgGTBGbY57Zp3bj1fyAwKaEF9z kEprwXHeL2K9L4nG1mpC0qpod0hyLP81XQ6iT9P7YnrqwF1DChOHD8PPphmbhuac fdZ37w3nigcH97DPx0AVYFQpjOKgig== =0PiM -----END PGP SIGNATURE----- --Sig_/dGUmEEssDGSBA/+P7J_vIU.--