GNU bug report logs -
#41924
[PATCH] profiles: Make linux-module-database skip inappropriate inputs
Previous Next
Reported by: Ivan Kozlov <kanichos <at> yandex.ru>
Date: Wed, 17 Jun 2020 18:45:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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=n.
> (directory-entries
> (lambda (directory)
> - (scandir directory (lambda (basename)
> - (not
> - (string-prefix? "." basename))))))
> + (if (file-exists? directory)
> + (scandir directory (lambda (basename)
> + (not
> + (string-prefix? "." basename))))
> + '())))
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 modules
(for the wrong kernel, one with CONFIG_MODULES=y) 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 here :->
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 with
module support but no modules compiled), and then try to ascertain whether
CONFIG_MODULES=y 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.
[Message part 2 (application/pgp-signature, inline)]
This bug report was last modified 5 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.