Merge pull request #135871 from abdelq/kmod-29

kmod: 27 -> 29
main
Jörg Thalheim 3 years ago committed by GitHub
commit da036efe0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      pkgs/os-specific/linux/kmod/darwin.patch
  2. 13
      pkgs/os-specific/linux/kmod/default.nix
  3. 24
      pkgs/os-specific/linux/kmod/no-name-field.patch

@ -69,14 +69,17 @@ diff --git a/shared/macro.h b/shared/macro.h
index 4fc5405..b5a2702 100644
--- a/shared/macro.h
+++ b/shared/macro.h
@@ -71,3 +71,7 @@
#endif
#define UNIQ __COUNTER__
+
+ #if !defined(__linux__)
@@ -53,6 +53,10 @@
#define CONCATENATE(x, y) XCONCATENATE(x, y)
#define UNIQ(x) CONCATENATE(x, __COUNTER__)
+#if !defined(__linux__)
+#define program_invocation_short_name getprogname()
+#endif
+
/* Temporaries for importing index handling */
#define NOFAIL(x) (x)
#define fatal(x...) do { } while (0)
diff --git a/shared/missing.h b/shared/missing.h
index 4c0d136..ad8ec0f 100644
--- a/shared/missing.h

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, autoreconfHook, pkg-config
, libxslt, xz, elf-header
, libxslt, xz, zstd, elf-header
, withStatic ? stdenv.hostPlatform.isStatic
}:
@ -9,23 +9,24 @@ let
in stdenv.mkDerivation rec {
pname = "kmod";
version = "27";
version = "29";
src = fetchurl {
url = "mirror://kernel/linux/utils/kernel/${pname}/${pname}-${version}.tar.xz";
sha256 = "035wzfzjx4nwidk747p8n085mgkvy531ppn16krrajx2dkqzply1";
sha256 = "0am54mi5rk72g5q7k6l6f36gw3r9vwgjmyna43ywcjhqmakyx00b";
};
nativeBuildInputs = [ autoreconfHook pkg-config libxslt ];
buildInputs = [ xz ] ++ lib.optional stdenv.isDarwin elf-header;
buildInputs = [ xz zstd ] ++ lib.optional stdenv.isDarwin elf-header;
configureFlags = [
"--sysconfdir=/etc"
"--with-xz"
"--with-zstd"
"--with-modulesdirs=${modulesDirs}"
] ++ lib.optional withStatic "--enable-static";
patches = [ ./module-dir.patch ./no-name-field.patch ]
patches = [ ./module-dir.patch ]
++ lib.optional stdenv.isDarwin ./darwin.patch
++ lib.optional withStatic ./enable-static.patch;
@ -49,7 +50,7 @@ in stdenv.mkDerivation rec {
homepage = "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/";
downloadPage = "https://www.kernel.org/pub/linux/utils/kernel/kmod/";
changelog = "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/plain/NEWS?h=v${version}";
license = licenses.lgpl21;
license = with licenses; [ lgpl21Plus gpl2Plus ]; # GPLv2+ for tools
platforms = platforms.unix;
};
}

@ -1,24 +0,0 @@
---
tools/modinfo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/modinfo.c b/tools/modinfo.c
index 0231bb0..7b2259e 100644
--- a/tools/modinfo.c
+++ b/tools/modinfo.c
@@ -178,7 +178,10 @@ static int modinfo_do(struct kmod_module *mod)
is_builtin = (filename == NULL);
if (is_builtin) {
- printf("%-16s%s%c", "name:", kmod_module_get_name(mod), separator);
+ if (field == NULL || field != NULL && streq(field, "name")){
+ printf("%-16s%s%c", "name:",
+ kmod_module_get_name(mod), separator);
+ }
filename = "(builtin)";
}
--
2.28.0
Loading…
Cancel
Save