nixpkgs/pkgs/os-specific
Alyssa Ross fb079c3110 linux.configfile: fix alts containing "/m"
generate-config.pl's auto modules feature answers "m" to any Kconfig
question it thinks supports being a module.  It detected this by
seeing if the help shown by make config (called "alts" by the script)
contained the string "/m", which it would in the case of e.g a
tristate option, where alts would be "N/m/y/?".

But then along came CONFIG_MODPROBE_PATH in Linux 5.13, with a default
value, shown in the make config help, of "/sbin/modprobe".
generate-config.pl would see the "/m" substring, and answer "m" to the
question, meaning (I think) that the built kernel would expect the
modprobe binary to be at /m.  This broke the (non-NixOS) VM images I
build with Nix.  NixOS was unaffected because it uses a different
mechanism to set the modprobe path.

With the current architecture, we can't 100% determine whether a
Kconfig option is a string or a tristate, but we can get a lot closer
by using a better regex.  My new regex only accepts single word
characters, separated by slashes, with a "/?" at the end.  This is
much less likely to ever end up as the default value of a string
option.

Tested by building linux_latest.configfile before and after my
changes, and checking the only difference is the correct default for
CONFIG_MODPROBE_PATH.
2022-03-10 11:13:11 +00:00
..
bsd netbsd.compat: don't use musl's sys/cdefs.h 2022-01-06 14:22:07 +00:00
darwin Revert "darwin.apple_sdk.frameworks.IOSurface: use Libsystem instead of xpc (#161561)" 2022-03-04 21:07:35 -05:00
linux linux.configfile: fix alts containing "/m" 2022-03-10 11:13:11 +00:00
solo5 solo5: patch solo5-virtio-mkimage to use our Syslinux, etc 2022-02-05 21:32:18 +01:00
windows maintainers: update personal details 2021-12-31 21:48:55 +03:00