* module-init-tools updated to 3.4.
svn path=/nixpkgs/trunk/; revision=12581
This commit is contained in:
parent
3a057ce066
commit
b65d095ad7
@ -1,15 +1,32 @@
|
|||||||
{stdenv, fetchurl}:
|
{stdenv, fetchurl}:
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation {
|
||||||
name = "module-init-tools-3.2.2";
|
name = "module-init-tools-3.4";
|
||||||
src = fetchurl {
|
|
||||||
url = mirror://kernel/linux/utils/kernel/module-init-tools/module-init-tools-3.2.2.tar.bz2;
|
src = [
|
||||||
md5 = "a1ad0a09d3231673f70d631f3f5040e9";
|
(fetchurl {
|
||||||
};
|
url = mirror://kernel/linux/utils/kernel/module-init-tools/module-init-tools-3.4.tar.bz2;
|
||||||
|
sha256 = "11rxcdr915skc1m6dcavavw8dhcsy24wpi56sw1m4akj2frs3iwn";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Upstream forgot to include the generated manpages. Thankfully
|
||||||
|
# the Gentoo people fixed this for us :-)
|
||||||
|
(fetchurl {
|
||||||
|
url = mirror://gentoo/distfiles/module-init-tools-3.4-manpages.tar.bz2;
|
||||||
|
sha256 = "0jid24girjhr30mrdckylkcz11v4in46nshhrqv18yaxm6506v6j";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
patches = [./module-dir.patch];
|
patches = [./module-dir.patch];
|
||||||
|
|
||||||
postInstall = "rm $out/sbin/insmod.static"; # don't need it
|
postInstall = "rm $out/sbin/insmod.static"; # don't need it
|
||||||
} // (if stdenv ? isDietLibC then {
|
|
||||||
# We don't want bash (and therefore glibc) in the closure of the
|
# We don't want bash (and therefore glibc) in the closure of the
|
||||||
# output, since we want to put this in a initrd.
|
# output, since we want to put this in a initrd.
|
||||||
dontPatchShebangs = true;
|
dontPatchShebangs = stdenv ? isDietLibC;
|
||||||
} else {}))
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/;
|
||||||
|
description = "Tools for loading and managing Linux kernel modules";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@ -1,31 +1,18 @@
|
|||||||
diff -rc module-init-tools-3.2.2/depmod.c module-init-tools-3.2.2.new/depmod.c
|
diff -rc module-init-tools-3.4-orig/depmod.c module-init-tools-3.4/depmod.c
|
||||||
*** module-init-tools-3.2.2/depmod.c 2005-11-21 03:45:15.000000000 +0100
|
*** module-init-tools-3.4-orig/depmod.c 2007-10-07 23:51:46.000000000 +0200
|
||||||
--- module-init-tools-3.2.2.new/depmod.c 2006-07-27 16:50:35.000000000 +0200
|
--- module-init-tools-3.4/depmod.c 2008-08-11 12:03:14.000000000 +0200
|
||||||
***************
|
***************
|
||||||
*** 25,34 ****
|
*** 1066,1071 ****
|
||||||
|
--- 1066,1072 ----
|
||||||
#include "testing.h"
|
|
||||||
|
|
||||||
- #ifndef MODULE_DIR
|
|
||||||
- #define MODULE_DIR "/lib/modules/"
|
|
||||||
- #endif
|
|
||||||
-
|
|
||||||
static int verbose;
|
|
||||||
static unsigned int skipchars;
|
|
||||||
|
|
||||||
--- 25,30 ----
|
|
||||||
***************
|
|
||||||
*** 756,761 ****
|
|
||||||
--- 752,758 ----
|
|
||||||
*system_map = NULL;
|
*system_map = NULL;
|
||||||
struct module *list = NULL;
|
struct module *list = NULL;
|
||||||
int i;
|
int i;
|
||||||
+ char *module_dir;
|
+ char *module_dir;
|
||||||
|
const char *config = NULL;
|
||||||
/* Don't print out any errors just yet, we might want to exec
|
struct module_search *search = NULL;
|
||||||
backwards compat version. */
|
struct module_overrides *overrides = NULL;
|
||||||
***************
|
***************
|
||||||
*** 834,843 ****
|
*** 1148,1157 ****
|
||||||
if (optind == argc)
|
if (optind == argc)
|
||||||
all = 1;
|
all = 1;
|
||||||
|
|
||||||
@ -36,7 +23,7 @@ diff -rc module-init-tools-3.2.2/depmod.c module-init-tools-3.2.2.new/depmod.c
|
|||||||
|
|
||||||
if (maybe_all) {
|
if (maybe_all) {
|
||||||
if (!doing_stdout && !depfile_out_of_date(dirname))
|
if (!doing_stdout && !depfile_out_of_date(dirname))
|
||||||
--- 831,844 ----
|
--- 1149,1162 ----
|
||||||
if (optind == argc)
|
if (optind == argc)
|
||||||
all = 1;
|
all = 1;
|
||||||
|
|
||||||
@ -51,9 +38,11 @@ diff -rc module-init-tools-3.2.2/depmod.c module-init-tools-3.2.2.new/depmod.c
|
|||||||
|
|
||||||
if (maybe_all) {
|
if (maybe_all) {
|
||||||
if (!doing_stdout && !depfile_out_of_date(dirname))
|
if (!doing_stdout && !depfile_out_of_date(dirname))
|
||||||
diff -rc module-init-tools-3.2.2/modinfo.c module-init-tools-3.2.2.new/modinfo.c
|
Only in module-init-tools-3.4/: depmod.c~
|
||||||
*** module-init-tools-3.2.2/modinfo.c 2005-01-18 04:25:23.000000000 +0100
|
Only in module-init-tools-3.4/: depmod.c.rej
|
||||||
--- module-init-tools-3.2.2.new/modinfo.c 2006-07-27 16:51:38.000000000 +0200
|
diff -rc module-init-tools-3.4-orig/modinfo.c module-init-tools-3.4/modinfo.c
|
||||||
|
*** module-init-tools-3.4-orig/modinfo.c 2007-10-07 23:51:46.000000000 +0200
|
||||||
|
--- module-init-tools-3.4/modinfo.c 2008-08-11 12:07:55.000000000 +0200
|
||||||
***************
|
***************
|
||||||
*** 18,27 ****
|
*** 18,27 ****
|
||||||
#define streq(a,b) (strcmp((a),(b)) == 0)
|
#define streq(a,b) (strcmp((a),(b)) == 0)
|
||||||
@ -68,8 +57,8 @@ diff -rc module-init-tools-3.2.2/modinfo.c module-init-tools-3.2.2.new/modinfo.c
|
|||||||
|
|
||||||
--- 18,23 ----
|
--- 18,23 ----
|
||||||
***************
|
***************
|
||||||
*** 277,282 ****
|
*** 278,283 ****
|
||||||
--- 273,279 ----
|
--- 274,280 ----
|
||||||
char *data;
|
char *data;
|
||||||
struct utsname buf;
|
struct utsname buf;
|
||||||
char *depname, *p;
|
char *depname, *p;
|
||||||
@ -78,33 +67,41 @@ diff -rc module-init-tools-3.2.2/modinfo.c module-init-tools-3.2.2.new/modinfo.c
|
|||||||
data = grab_file(name, size);
|
data = grab_file(name, size);
|
||||||
if (data) {
|
if (data) {
|
||||||
***************
|
***************
|
||||||
*** 289,297 ****
|
*** 290,301 ****
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search for it in modules.dep. */
|
/* Search for it in modules.dep. */
|
||||||
uname(&buf);
|
if (kernel) {
|
||||||
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR, buf.release);
|
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR, kernel);
|
||||||
|
} else {
|
||||||
|
uname(&buf);
|
||||||
|
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR,
|
||||||
|
buf.release);
|
||||||
|
}
|
||||||
data = grab_file(depname, size);
|
data = grab_file(depname, size);
|
||||||
if (!data) {
|
--- 287,302 ----
|
||||||
fprintf(stderr, "modinfo: could not open %s\n", depname);
|
|
||||||
--- 286,298 ----
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
+ if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
||||||
+ module_dir = "/lib/modules";
|
+ module_dir = "/lib/modules";
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
/* Search for it in modules.dep. */
|
/* Search for it in modules.dep. */
|
||||||
uname(&buf);
|
if (kernel) {
|
||||||
! asprintf(&depname, "%s/%s/modules.dep", module_dir, buf.release);
|
! asprintf(&depname, "%s/%s/modules.dep", module_dir, kernel);
|
||||||
|
} else {
|
||||||
|
uname(&buf);
|
||||||
|
! asprintf(&depname, "%s/%s/modules.dep", module_dir,
|
||||||
|
buf.release);
|
||||||
|
}
|
||||||
data = grab_file(depname, size);
|
data = grab_file(depname, size);
|
||||||
if (!data) {
|
Only in module-init-tools-3.4/: modinfo.c~
|
||||||
fprintf(stderr, "modinfo: could not open %s\n", depname);
|
Only in module-init-tools-3.4/: modinfo.c.rej
|
||||||
diff -rc module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2.new/modprobe.c
|
diff -rc module-init-tools-3.4-orig/modprobe.c module-init-tools-3.4/modprobe.c
|
||||||
*** module-init-tools-3.2.2/modprobe.c 2005-12-02 00:42:09.000000000 +0100
|
*** module-init-tools-3.4-orig/modprobe.c 2007-10-07 23:57:23.000000000 +0200
|
||||||
--- module-init-tools-3.2.2.new/modprobe.c 2006-07-27 16:51:58.000000000 +0200
|
--- module-init-tools-3.4/modprobe.c 2008-08-11 12:06:54.000000000 +0200
|
||||||
***************
|
***************
|
||||||
*** 55,64 ****
|
*** 55,64 ****
|
||||||
char filename[0];
|
char filename[0];
|
||||||
@ -119,17 +116,17 @@ diff -rc module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2.new/modprobe
|
|||||||
/* Do we use syslog or stderr for messages? */
|
/* Do we use syslog or stderr for messages? */
|
||||||
--- 55,60 ----
|
--- 55,60 ----
|
||||||
***************
|
***************
|
||||||
*** 1416,1421 ****
|
*** 1433,1438 ****
|
||||||
--- 1412,1418 ----
|
--- 1429,1435 ----
|
||||||
char *newname = NULL;
|
char *newname = NULL;
|
||||||
char *aliasfilename, *symfilename;
|
char *aliasfilename, *symfilename;
|
||||||
errfn_t error = fatal;
|
errfn_t error = fatal;
|
||||||
+ char *module_dir = NULL;
|
+ char *module_dir = NULL;
|
||||||
|
int flags = O_NONBLOCK|O_EXCL;
|
||||||
|
|
||||||
/* Prepend options from environment. */
|
/* Prepend options from environment. */
|
||||||
argv = merge_args(getenv("MODPROBE_OPTIONS"), argv, &argc);
|
|
||||||
***************
|
***************
|
||||||
*** 1538,1545 ****
|
*** 1559,1566 ****
|
||||||
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
||||||
print_usage(argv[0]);
|
print_usage(argv[0]);
|
||||||
|
|
||||||
@ -138,7 +135,7 @@ diff -rc module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2.new/modprobe
|
|||||||
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
||||||
+ sizeof("/modules.alias")));
|
+ sizeof("/modules.alias")));
|
||||||
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
||||||
--- 1535,1546 ----
|
--- 1556,1567 ----
|
||||||
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
||||||
print_usage(argv[0]);
|
print_usage(argv[0]);
|
||||||
|
|
||||||
@ -151,3 +148,5 @@ diff -rc module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2.new/modprobe
|
|||||||
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
||||||
+ sizeof("/modules.alias")));
|
+ sizeof("/modules.alias")));
|
||||||
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
||||||
|
Only in module-init-tools-3.4/: modprobe.c~
|
||||||
|
Only in module-init-tools-3.4/: modprobe.c.rej
|
||||||
|
Loading…
Reference in New Issue
Block a user