kmod: backport patch for musl 1.2.5 (#322720)

This fixes a segfault that will break kernel builds when we update to
musl 1.2.5.
This commit is contained in:
Alyssa Ross 2024-06-27 01:04:03 +02:00 committed by GitHub
parent 594cda1f90
commit 0a4b34b209
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchzip, autoconf, automake, docbook_xml_dtd_42
{ stdenv, lib, fetchzip, fetchpatch, autoconf, automake, docbook_xml_dtd_42
, docbook_xml_dtd_43, docbook_xsl, gtk-doc, libtool, pkg-config
, libxslt, xz, zstd, elf-header
, withDevdoc ? stdenv.hostPlatform == stdenv.buildPlatform
@ -48,8 +48,14 @@ in stdenv.mkDerivation rec {
(lib.enableFeature withDevdoc "gtk-doc")
] ++ lib.optional withStatic "--enable-static";
patches = [ ./module-dir.patch ]
++ lib.optional withStatic ./enable-static.patch;
patches = [
./module-dir.patch
(fetchpatch {
name = "musl.patch";
url = "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/patch/?id=11eb9bc67c319900ab00523997323a97d2d08ad2";
hash = "sha256-CYG615elMWces6QGQRg2H/NL7W4XsG9Zvz5H+xsdFFo=";
})
] ++ lib.optional withStatic ./enable-static.patch;
postInstall = ''
for prog in rmmod insmod lsmod modinfo modprobe depmod; do