unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 5ff2f8a606701261dbcae410eee964897be4b0fb 961 bytes (raw)
name: gnu/packages/patches/kmod-13-module-directory.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
This patch changes libkmod so it honors the 'LINUX_MODULE_DIRECTORY'
environment variable, rather than looking for modules exclusively in
/lib/modules.

Patch by Shea Levy and Eelco Dolstra, from Nixpkgs; adjusted to
use 'LINUX_MODULE_DIRECTORY' rather than 'MODULE_DIR' as the variable
name.


--- kmod-7/libkmod/libkmod.c	2012-03-15 08:19:16.750010226 -0400
+++ kmod-7/libkmod/libkmod.c	2012-04-04 15:21:29.532074313 -0400
@@ -200,7 +200,7 @@
 static char *get_kernel_release(const char *dirname)
 {
 	struct utsname u;
-	char *p;
+	char *p, *dirname_prefix;
 
 	if (dirname != NULL)
 		return path_make_absolute_cwd(dirname);
@@ -208,7 +208,10 @@
 	if (uname(&u) < 0)
 		return NULL;
 
-	if (asprintf(&p, "%s/%s", dirname_default_prefix, u.release) < 0)
+	if ((dirname_prefix = getenv("LINUX_MODULE_DIRECTORY")) == NULL)
+		dirname_prefix = dirname_default_prefix;
+
+	if (asprintf(&p, "%s/%s", dirname_prefix, u.release) < 0)
 		return NULL;
 
 	return p;


debug log:

solving 5ff2f8a60 ...
found 5ff2f8a60 in https://yhetil.org/guix-patches/20180227155051.1141-3-dannym@scratchpost.org/ ||
	https://yhetil.org/guix-patches/20180227112619.5071-3-dannym@scratchpost.org/ ||
	https://yhetil.org/guix-patches/20180226040609.3066-3-dannym@scratchpost.org/ ||
	https://yhetil.org/guix-patches/20180226035025.1698-3-dannym@scratchpost.org/

applying [1/1] https://yhetil.org/guix-patches/20180227155051.1141-3-dannym@scratchpost.org/
diff --git a/gnu/packages/patches/kmod-13-module-directory.patch b/gnu/packages/patches/kmod-13-module-directory.patch
new file mode 100644
index 000000000..5ff2f8a60

1:21: space before tab in indent.
 	struct utsname u;
1:24: trailing whitespace.
 
1:25: space before tab in indent.
 	if (dirname != NULL)
1:26: space before tab in indent.
 		return path_make_absolute_cwd(dirname);
1:28: space before tab in indent.
 	if (uname(&u) < 0)
Checking patch gnu/packages/patches/kmod-13-module-directory.patch...
Applied patch gnu/packages/patches/kmod-13-module-directory.patch cleanly.
warning: squelched 6 whitespace errors
warning: 11 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/20180227112619.5071-3-dannym@scratchpost.org/ for 5ff2f8a60
skipping https://yhetil.org/guix-patches/20180226040609.3066-3-dannym@scratchpost.org/ for 5ff2f8a60
skipping https://yhetil.org/guix-patches/20180226035025.1698-3-dannym@scratchpost.org/ for 5ff2f8a60
index at:
100644 5ff2f8a606701261dbcae410eee964897be4b0fb	gnu/packages/patches/kmod-13-module-directory.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).