Accepting request 229957 from Base:System
(forwarded request 229859 from matwey) OBS-URL: https://build.opensuse.org/request/show/229957 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=22
This commit is contained in:
commit
a7034125ca
@ -0,0 +1,76 @@
|
|||||||
|
From 48d4d7ba1acbb5c0955f75c6bdda9cf0935240fd Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
|
||||||
|
Date: Fri, 11 Apr 2014 19:43:18 +0400
|
||||||
|
Subject: [PATCH] Fix recursion loop in mod_count_all_dependencies() when
|
||||||
|
subgraph has a cycle.
|
||||||
|
|
||||||
|
When cycle is detected in mod_count_all_dependencies, use total count of
|
||||||
|
modules as an upper bound of needed memory. Correct number of nodes is determined by
|
||||||
|
subsequent call of mod_fill_all_unique_dependencies().
|
||||||
|
---
|
||||||
|
tools/depmod.c | 20 ++++++++++++++------
|
||||||
|
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/depmod.c b/tools/depmod.c
|
||||||
|
index 1aedaaf..c83dee1 100644
|
||||||
|
--- a/tools/depmod.c
|
||||||
|
+++ b/tools/depmod.c
|
||||||
|
@@ -1682,12 +1682,20 @@ static int depmod_load(struct depmod *depmod)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static size_t mod_count_all_dependencies(const struct mod *mod)
|
||||||
|
+static size_t mod_count_all_dependencies(const struct mod *mod, size_t upper_bound)
|
||||||
|
{
|
||||||
|
size_t i, count = 0;
|
||||||
|
+ /* cycle is detected */
|
||||||
|
+ if (mod->dep_loop)
|
||||||
|
+ return upper_bound;
|
||||||
|
+
|
||||||
|
for (i = 0; i < mod->deps.count; i++) {
|
||||||
|
const struct mod *d = mod->deps.array[i];
|
||||||
|
- count += 1 + mod_count_all_dependencies(d);
|
||||||
|
+ const size_t child = mod_count_all_dependencies(d, upper_bound);
|
||||||
|
+ if(child == upper_bound)
|
||||||
|
+ return child;
|
||||||
|
+
|
||||||
|
+ count += 1 + child;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
@@ -1722,12 +1730,12 @@ static int mod_fill_all_unique_dependencies(const struct mod *mod, const struct
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static const struct mod **mod_get_all_sorted_dependencies(const struct mod *mod, size_t *n_deps)
|
||||||
|
+static const struct mod **mod_get_all_sorted_dependencies(const struct mod *mod, size_t *n_deps, size_t count)
|
||||||
|
{
|
||||||
|
const struct mod **deps;
|
||||||
|
size_t last = 0;
|
||||||
|
|
||||||
|
- *n_deps = mod_count_all_dependencies(mod);
|
||||||
|
+ *n_deps = mod_count_all_dependencies(mod, count);
|
||||||
|
if (*n_deps == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
@@ -1771,7 +1779,7 @@ static int output_deps(struct depmod *depmod, FILE *out)
|
||||||
|
if (mod->deps.count == 0)
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
- deps = mod_get_all_sorted_dependencies(mod, &n_deps);
|
||||||
|
+ deps = mod_get_all_sorted_dependencies(mod, &n_deps, depmod->modules.count);
|
||||||
|
if (deps == NULL) {
|
||||||
|
ERR("could not get all sorted dependencies of %s\n", p);
|
||||||
|
goto end;
|
||||||
|
@@ -1819,7 +1827,7 @@ static int output_deps_bin(struct depmod *depmod, FILE *out)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
- deps = mod_get_all_sorted_dependencies(mod, &n_deps);
|
||||||
|
+ deps = mod_get_all_sorted_dependencies(mod, &n_deps, depmod->modules.count);
|
||||||
|
if (deps == NULL && n_deps > 0) {
|
||||||
|
ERR("could not get all sorted dependencies of %s\n", p);
|
||||||
|
continue;
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
@ -1,96 +0,0 @@
|
|||||||
From f81194e28e56dd57588edb5f19c5a3b1f38d1eb8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stephen Kitt <steve@sk2.org>
|
|
||||||
Date: Sun, 26 Jan 2014 18:00:23 -0200
|
|
||||||
Subject: [PATCH 1/3] Remove "rmmod -w" documentation and getopt entry
|
|
||||||
|
|
||||||
This patch removes the cmdopts declaration and the documentation. They
|
|
||||||
were leftover from the -w removal.
|
|
||||||
|
|
||||||
(cherry picked from commit a4bd1441e5c7e8903a9ae065801d4f06f13d06e9)
|
|
||||||
[mmarek: regenerated man/rmmod.8]
|
|
||||||
---
|
|
||||||
man/rmmod.8 | 12 +-----------
|
|
||||||
man/rmmod.xml | 17 -----------------
|
|
||||||
tools/rmmod.c | 1 -
|
|
||||||
3 files changed, 1 insertion(+), 29 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/rmmod.8 b/man/rmmod.8
|
|
||||||
index cd97efa..e5d879a 100644
|
|
||||||
--- a/man/rmmod.8
|
|
||||||
+++ b/man/rmmod.8
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
rmmod \- Simple program to remove a module from the Linux Kernel
|
|
||||||
.SH "SYNOPSIS"
|
|
||||||
.HP \w'\fBrmmod\fR\ 'u
|
|
||||||
-\fBrmmod\fR [\fB\-f\fR] [\fB\-w\fR] [\fB\-s\fR] [\fB\-v\fR] [\fImodulename\fR]
|
|
||||||
+\fBrmmod\fR [\fB\-f\fR] [\fB\-s\fR] [\fB\-v\fR] [\fImodulename\fR]
|
|
||||||
.SH "DESCRIPTION"
|
|
||||||
.PP
|
|
||||||
\fBrmmod\fR
|
|
||||||
@@ -55,16 +55,6 @@ This option can be extremely dangerous: it has no effect unless CONFIG_MODULE_FO
|
|
||||||
\fBlsmod\fR(8))\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
-\fB\-w\fR \fB\-\-wait\fR
|
|
||||||
-.RS 4
|
|
||||||
-Normally,
|
|
||||||
-\fBrmmod\fR
|
|
||||||
-will refuse to unload modules which are in use\&. With this option,
|
|
||||||
-\fBrmmod\fR
|
|
||||||
-will isolate the module, and wait until the module is no longer used\&. Nothing new will be able to use the module, but it\*(Aqs up to you to make sure the current users eventually finish with it\&. See
|
|
||||||
-\fBlsmod\fR(8)) for information on usage counts\&.
|
|
||||||
-.RE
|
|
||||||
-.PP
|
|
||||||
\fB\-s\fR, \fB\-\-syslog\fR
|
|
||||||
.RS 4
|
|
||||||
Send errors to syslog instead of standard error\&.
|
|
||||||
diff --git a/man/rmmod.xml b/man/rmmod.xml
|
|
||||||
index 3605068..5023fb0 100644
|
|
||||||
--- a/man/rmmod.xml
|
|
||||||
+++ b/man/rmmod.xml
|
|
||||||
@@ -39,7 +39,6 @@
|
|
||||||
<cmdsynopsis>
|
|
||||||
<command>rmmod</command>
|
|
||||||
<arg><option>-f</option></arg>
|
|
||||||
- <arg><option>-w</option></arg>
|
|
||||||
<arg><option>-s</option></arg>
|
|
||||||
<arg><option>-v</option></arg>
|
|
||||||
<arg><replaceable>modulename</replaceable></arg>
|
|
||||||
@@ -94,22 +93,6 @@
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
- <term><option>-w</option> <option>--wait</option>
|
|
||||||
- </term>
|
|
||||||
- <listitem>
|
|
||||||
- <para>
|
|
||||||
- Normally, <command>rmmod</command> will refuse to unload modules
|
|
||||||
- which are in use. With this option, <command>rmmod</command> will
|
|
||||||
- isolate the module, and wait until the module is no longer used.
|
|
||||||
- Nothing new will be able to use the module, but it's up to you to
|
|
||||||
- make sure the current users eventually finish with it. See
|
|
||||||
- <citerefentry>
|
|
||||||
- <refentrytitle>lsmod</refentrytitle><manvolnum>8</manvolnum>
|
|
||||||
- </citerefentry>) for information on usage counts.
|
|
||||||
- </para>
|
|
||||||
- </listitem>
|
|
||||||
- </varlistentry>
|
|
||||||
- <varlistentry>
|
|
||||||
<term>
|
|
||||||
<option>-s</option>
|
|
||||||
</term>
|
|
||||||
diff --git a/tools/rmmod.c b/tools/rmmod.c
|
|
||||||
index fd0fac5..df2f041 100644
|
|
||||||
--- a/tools/rmmod.c
|
|
||||||
+++ b/tools/rmmod.c
|
|
||||||
@@ -40,7 +40,6 @@ static const struct option cmdopts[] = {
|
|
||||||
{"syslog", no_argument, 0, 's'},
|
|
||||||
{"verbose", no_argument, 0, 'v'},
|
|
||||||
{"version", no_argument, 0, 'V'},
|
|
||||||
- {"wait", no_argument, 0, 'w'},
|
|
||||||
{"help", no_argument, 0, 'h'},
|
|
||||||
{NULL, 0, 0, 0}
|
|
||||||
};
|
|
||||||
--
|
|
||||||
1.8.4.5
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
|||||||
From 472b40d53f6a9121ade7b969151b5b14268d1172 Mon Sep 17 00:00:00 2001
|
From 820ce4a006eeb230ee597e7565b17cec464ef15d Mon Sep 17 00:00:00 2001
|
||||||
From: Michal Marek <mmarek@suse.cz>
|
From: Michal Marek <mmarek@suse.cz>
|
||||||
Date: Wed, 26 Feb 2014 13:48:55 +0100
|
Date: Wed, 26 Feb 2014 13:48:55 +0100
|
||||||
Subject: [PATCH 2/3] modprobe: Recognize --allow-unsupported-modules on
|
Subject: [PATCH 02/10] modprobe: Recognize --allow-unsupported-modules on
|
||||||
commandline
|
commandline
|
||||||
|
|
||||||
The option does not do anything yet, but it does not return error
|
The option does not do anything yet, but it does not return error
|
||||||
either.
|
either.
|
||||||
|
|
||||||
References: fate#316971
|
References: fate#316971
|
||||||
|
Patch-mainline: never
|
||||||
---
|
---
|
||||||
tools/modprobe.c | 5 +++++
|
tools/modprobe.c | 5 +++++
|
||||||
1 file changed, 5 insertions(+)
|
1 file changed, 5 insertions(+)
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
From da1cb1dd16edb2533ac431793e5bb3d01b243cae Mon Sep 17 00:00:00 2001
|
From 717e10547654bceebbcb84144be72a40d78e577a Mon Sep 17 00:00:00 2001
|
||||||
From: Michal Marek <mmarek@suse.cz>
|
From: Michal Marek <mmarek@suse.cz>
|
||||||
Date: Wed, 26 Feb 2014 13:53:38 +0100
|
Date: Wed, 26 Feb 2014 13:53:38 +0100
|
||||||
Subject: [PATCH 3/3] libkmod-config: Recognize allow_unsupported_modules in
|
Subject: [PATCH 03/10] libkmod-config: Recognize allow_unsupported_modules in
|
||||||
the configuration
|
the configuration
|
||||||
|
|
||||||
References: fate#316971
|
References: fate#316971
|
||||||
|
Patch-mainline: never
|
||||||
---
|
---
|
||||||
libkmod/libkmod-config.c | 3 +++
|
libkmod/libkmod-config.c | 3 +++
|
||||||
1 file changed, 3 insertions(+)
|
1 file changed, 3 insertions(+)
|
||||||
|
108
0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
Normal file
108
0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
From 36bb8bc7f4100d7ffc4d6d0436e36e48fa7c075f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Marek <mmarek@suse.cz>
|
||||||
|
Date: Wed, 5 Mar 2014 14:40:14 +0100
|
||||||
|
Subject: [PATCH 09/10] libkmod: Implement filtering of unsupported modules
|
||||||
|
(off by default)
|
||||||
|
|
||||||
|
References: fate#316971
|
||||||
|
Patch-mainline: never
|
||||||
|
---
|
||||||
|
libkmod/libkmod-config.c | 12 ++++++++++--
|
||||||
|
libkmod/libkmod-internal.h | 1 +
|
||||||
|
libkmod/libkmod-module.c | 31 +++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 42 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
|
||||||
|
index 3950923..385a224 100644
|
||||||
|
--- a/libkmod/libkmod-config.c
|
||||||
|
+++ b/libkmod/libkmod-config.c
|
||||||
|
@@ -663,8 +663,16 @@ static int kmod_config_parse(struct kmod_config *config, int fd,
|
||||||
|
ERR(ctx, "%s: command %s is deprecated and not parsed anymore\n",
|
||||||
|
filename, cmd);
|
||||||
|
} else if (streq(cmd, "allow_unsupported_modules")) {
|
||||||
|
- /* dummy option for now */
|
||||||
|
- ;
|
||||||
|
+ char *param = strtok_r(NULL, "\t ", &saveptr);
|
||||||
|
+
|
||||||
|
+ if (param == NULL)
|
||||||
|
+ goto syntax_error;
|
||||||
|
+ if (streq(param, "yes") || streq(param, "1"))
|
||||||
|
+ config->block_unsupported = 0;
|
||||||
|
+ else if (streq(param, "no") || streq(param, "0"))
|
||||||
|
+ config->block_unsupported = 1;
|
||||||
|
+ else
|
||||||
|
+ goto syntax_error;
|
||||||
|
} else {
|
||||||
|
syntax_error:
|
||||||
|
ERR(ctx, "%s line %u: ignoring bad line starting with '%s'\n",
|
||||||
|
diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h
|
||||||
|
index 0180124..596db5d 100644
|
||||||
|
--- a/libkmod/libkmod-internal.h
|
||||||
|
+++ b/libkmod/libkmod-internal.h
|
||||||
|
@@ -118,6 +118,7 @@ struct kmod_config {
|
||||||
|
struct kmod_list *softdeps;
|
||||||
|
|
||||||
|
struct kmod_list *paths;
|
||||||
|
+ int block_unsupported;
|
||||||
|
};
|
||||||
|
|
||||||
|
int kmod_config_new(struct kmod_ctx *ctx, struct kmod_config **config, const char * const *config_paths) __attribute__((nonnull(1, 2,3)));
|
||||||
|
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
|
||||||
|
index b94abd4..ee52b97 100644
|
||||||
|
--- a/libkmod/libkmod-module.c
|
||||||
|
+++ b/libkmod/libkmod-module.c
|
||||||
|
@@ -769,6 +769,24 @@ KMOD_EXPORT int kmod_module_remove_module(struct kmod_module *mod,
|
||||||
|
|
||||||
|
extern long init_module(const void *mem, unsigned long len, const char *args);
|
||||||
|
|
||||||
|
+static int check_module_supported(struct kmod_module *mod)
|
||||||
|
+{
|
||||||
|
+ char **strings;
|
||||||
|
+ int i, count;
|
||||||
|
+ struct kmod_elf *elf;
|
||||||
|
+
|
||||||
|
+ elf = kmod_file_get_elf(mod->file);
|
||||||
|
+ count = kmod_elf_get_strings(elf, ".modinfo", &strings);
|
||||||
|
+ if (count < 0)
|
||||||
|
+ return count;
|
||||||
|
+ for (i = 0; i < count; i++)
|
||||||
|
+ if (streq(strings[i], "supported=yes") ||
|
||||||
|
+ streq(strings[i], "supported=external")) {
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* kmod_module_insert_module:
|
||||||
|
* @mod: kmod module
|
||||||
|
@@ -794,6 +812,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
|
||||||
|
struct kmod_elf *elf;
|
||||||
|
const char *path;
|
||||||
|
const char *args = options ? options : "";
|
||||||
|
+ const struct kmod_config *config = kmod_get_config(mod->ctx);
|
||||||
|
|
||||||
|
if (mod == NULL)
|
||||||
|
return -ENOENT;
|
||||||
|
@@ -810,6 +829,18 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (config->block_unsupported) {
|
||||||
|
+ err = check_module_supported(mod);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ return err;
|
||||||
|
+ else if (err == 0) {
|
||||||
|
+ ERR(mod->ctx, "module '%s' is unsupported\n", mod->name);
|
||||||
|
+ ERR(mod->ctx, "Use --allow-unsupported or set allow_unsupported_modules 1 in\n");
|
||||||
|
+ ERR(mod->ctx, "/etc/modprobe.d/10-unsupported-modules.conf\n");
|
||||||
|
+ return -EPERM;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (kmod_file_get_direct(mod->file)) {
|
||||||
|
unsigned int kernel_flags = 0;
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.4.5
|
||||||
|
|
102
0010-modprobe-Implement-allow-unsupported-modules.patch
Normal file
102
0010-modprobe-Implement-allow-unsupported-modules.patch
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
From 714b9b5241f5fc6120c74f35d6a374e032bad6df Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Marek <mmarek@suse.cz>
|
||||||
|
Date: Wed, 5 Mar 2014 15:02:44 +0100
|
||||||
|
Subject: [PATCH 10/10] modprobe: Implement --allow-unsupported-modules
|
||||||
|
|
||||||
|
References: fate#316971
|
||||||
|
Patch-mainline: never
|
||||||
|
---
|
||||||
|
Makefile.am | 4 +++-
|
||||||
|
libkmod/libkmod-unsupported.c | 9 +++++++++
|
||||||
|
libkmod/libkmod-unsupported.h | 8 ++++++++
|
||||||
|
tools/modprobe.c | 7 ++++++-
|
||||||
|
4 files changed, 26 insertions(+), 2 deletions(-)
|
||||||
|
create mode 100644 libkmod/libkmod-unsupported.c
|
||||||
|
create mode 100644 libkmod/libkmod-unsupported.h
|
||||||
|
|
||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index 46b7652..9986730 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -78,7 +78,9 @@ libkmod_libkmod_la_LIBADD = libkmod/libkmod-util.la \
|
||||||
|
${liblzma_LIBS} ${zlib_LIBS}
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES += libkmod/libkmod-internal.la
|
||||||
|
-libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
|
||||||
|
+libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES) \
|
||||||
|
+ libkmod/libkmod-unsupported.c \
|
||||||
|
+ libkmod/libkmod-unsupported.h
|
||||||
|
libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \
|
||||||
|
-Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
|
||||||
|
libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
|
||||||
|
diff --git a/libkmod/libkmod-unsupported.c b/libkmod/libkmod-unsupported.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7ef9fc8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libkmod/libkmod-unsupported.c
|
||||||
|
@@ -0,0 +1,9 @@
|
||||||
|
+#include "libkmod-internal.h"
|
||||||
|
+#include "libkmod-unsupported.h"
|
||||||
|
+
|
||||||
|
+void kmod_internal_allow_unsupported(struct kmod_ctx *ctx)
|
||||||
|
+{
|
||||||
|
+ struct kmod_config *config = (struct kmod_config *)kmod_get_config(ctx);
|
||||||
|
+
|
||||||
|
+ config->block_unsupported = 0;
|
||||||
|
+}
|
||||||
|
diff --git a/libkmod/libkmod-unsupported.h b/libkmod/libkmod-unsupported.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..a95b4a2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libkmod/libkmod-unsupported.h
|
||||||
|
@@ -0,0 +1,8 @@
|
||||||
|
+#pragma once
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * This function implements the --allow-unsupported-modules modprobe
|
||||||
|
+ * option. It is not part of the kmod API and not exported by the shared
|
||||||
|
+ * library
|
||||||
|
+ */
|
||||||
|
+void kmod_internal_allow_unsupported(struct kmod_ctx *ctx);
|
||||||
|
diff --git a/tools/modprobe.c b/tools/modprobe.c
|
||||||
|
index 589cc07..7d0949d 100644
|
||||||
|
--- a/tools/modprobe.c
|
||||||
|
+++ b/tools/modprobe.c
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
|
||||||
|
#include "libkmod.h"
|
||||||
|
#include "libkmod-array.h"
|
||||||
|
+#include "libkmod-unsupported.h"
|
||||||
|
#include "macro.h"
|
||||||
|
|
||||||
|
#include "kmod.h"
|
||||||
|
@@ -755,6 +756,7 @@ static int do_modprobe(int argc, char **orig_argv)
|
||||||
|
int do_remove = 0;
|
||||||
|
int do_show_config = 0;
|
||||||
|
int do_show_modversions = 0;
|
||||||
|
+ int allow_unsupported = 0;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
argv = prepend_options_from_env(&argc, orig_argv);
|
||||||
|
@@ -838,7 +840,7 @@ static int do_modprobe(int argc, char **orig_argv)
|
||||||
|
kversion = optarg;
|
||||||
|
break;
|
||||||
|
case 128:
|
||||||
|
- /* --allow-unsupported-modules does nothing for now */
|
||||||
|
+ allow_unsupported = 1;
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
env_modprobe_options_append("-s");
|
||||||
|
@@ -910,6 +912,9 @@ static int do_modprobe(int argc, char **orig_argv)
|
||||||
|
|
||||||
|
log_setup_kmod_log(ctx, verbose);
|
||||||
|
|
||||||
|
+ if (allow_unsupported)
|
||||||
|
+ kmod_internal_allow_unsupported(ctx);
|
||||||
|
+
|
||||||
|
kmod_load_resources(ctx);
|
||||||
|
|
||||||
|
if (do_show_config)
|
||||||
|
--
|
||||||
|
1.8.4.5
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v2.0.22 (GNU/Linux)
|
|
||||||
|
|
||||||
iQIcBAABAgAGBQJSt12kAAoJEJuipaYwy+pT7LIQAJ1Yidwj1KUJJcBHu9u3R4er
|
|
||||||
8bIxU+NdblsKWOSU7kwoyhVg1O0TqGcVjX88cfgaYlamXMMdlRHMd4qLj8yW/X4B
|
|
||||||
8ktHoUfGWA4WmvMWWKce+dEjCdAknBv5Zkd1M7fMz1EMhM6qxbyhtAkuasUGUQYJ
|
|
||||||
0vz+TaldNYIiKmLB6xnOOx/vQzEdZQxAb78q8v7Vc9fYw/W8bs2QElBlSG2v+9Bk
|
|
||||||
N4VsiRGkrDv+1Fj5zfk+HwH/fl3R8YtzckBbg1dZGGGDyWgytK7ZeK8n3hZgGWD7
|
|
||||||
GHFbZIqX0timLq+aDW4tvtjBQeq6jCkXZghyxYd71kgTWwKYLRF22LOvlhJsowcA
|
|
||||||
lrbTkSkL1w3hdiDNZ2mJyK+sBtbPFj4Gslb4if9iWrePDkItgVT7mt989QHoEOl6
|
|
||||||
5UBqsgGpKl+c1iDfFtM5oOmmAbBUkCCjN2ubI67CtED70syFhKWPhedsqe8dkHit
|
|
||||||
tZMAvvnczsbvVnnqdUtAkpEkGF8Qm3gFdPQ2vFPN4SP7/MmU9rPHNUt5A3NfYFv7
|
|
||||||
beE7qj5GiTqMOfnN8zFojjCjoL6HlwI3NlBdVDLHHL3wlAyu0q4VfYMYykPvpsKJ
|
|
||||||
iX1ijwl03ObKGWhVhRbiWaMV7FoMAynCFEUsMb/OuFwAkbYSHG+JqkdyMVhJxHfQ
|
|
||||||
fOPUdvotkb+tIF++Ujux
|
|
||||||
=Ja4i
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:63412efab37c70459ccef167556965c93fd4f56af5986cd3750542a684c613c5
|
|
||||||
size 1440880
|
|
17
kmod-17.tar.sign
Normal file
17
kmod-17.tar.sign
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2.0.22 (GNU/Linux)
|
||||||
|
|
||||||
|
iQIcBAABAgAGBQJTQb7hAAoJEJuipaYwy+pTGGUQAJK2Bfd3RtANK9+4s3AeXvGk
|
||||||
|
xCStqGHEjerf4ecDPMsSAUaNg6ADsGNPiQHDfg3y6wfp15+kmX+JoQPFWyghrIXf
|
||||||
|
6x/OMN3ilPM2cfqJayacDbtNwTaCOY0JLokLpI0nR5iItdi1u6D++FnAh2UDU3C6
|
||||||
|
SLOmsZeTYaUZDZwlte0ZERITxaTgAhjoxD7QiKk54KlwTBOK24JSLV/oxmMrUkkH
|
||||||
|
YB0JQ6vMuJEiHXFZLlJX+hmwElgw0dcB7H2ywVGugGhC+i1so/z1IRs98M1y/Shz
|
||||||
|
rL4YiRWdRpfeHofcfOt0vStfCIIbtavjcQkQczbo2KZHjUmbp+7BRrL1Jvidg2bd
|
||||||
|
op3CX8iZCq0BTipjQcEkJzZN2NuHgN8aswKhbxxUfS1tjD9tWhNblu95bu+xuf/c
|
||||||
|
lpKCHHp5q7kw15bWNgb8NrRaJesMl9yhId9Qx4GXpZ4vJDwN2yoew6Y6m+bPKq78
|
||||||
|
vyIOStrP63ku46+M7VhTjtnFMg/CELPFVzQLmVTmjG+Be4/UmpFZs54vh7UC784H
|
||||||
|
q6j4V944ZO3VGGw0VcS2d1eh2Q4XHO6aTZkUMP8mioADjAaEB0kgKsV1d7yHpH2n
|
||||||
|
XOQ8D9FYr1R1zE1E6f63pmdhHUTbXQRoieomQDW6BvQ5QqV2QG0HZ17o28g0H96L
|
||||||
|
AcKSiGnKIV8CkiELtR9x
|
||||||
|
=RcyU
|
||||||
|
-----END PGP SIGNATURE-----
|
3
kmod-17.tar.xz
Normal file
3
kmod-17.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3ba7470041de04ca88308f501901b574169cb517d3192397074611b3921a2dfa
|
||||||
|
size 1484336
|
48
kmod.changes
48
kmod.changes
@ -1,3 +1,51 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 12 12:33:16 UTC 2014 - matwey.kornilov@gmail.com
|
||||||
|
|
||||||
|
- Add 0001-Fix-recursion-loop-in-mod_count_all_dependencies-whe.patch
|
||||||
|
* Fix segfault at cycled deps (bnc#872715)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 8 08:36:22 UTC 2014 - mmarek@suse.cz
|
||||||
|
|
||||||
|
- Remove the now obsolete test-files.tar.xz tarball
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 7 19:07:17 UTC 2014 - mmarek@suse.com
|
||||||
|
|
||||||
|
- Updated to kmod 17
|
||||||
|
* Do not require xsltproc for build
|
||||||
|
* Parse softdeps stored in kernel modules
|
||||||
|
* Add experimental python bindings (not enabled in the package yet)
|
||||||
|
* Misc bugfixes
|
||||||
|
- Deleted patches that went upstream. Only the unsupported modules
|
||||||
|
feature remains:
|
||||||
|
0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
||||||
|
0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
||||||
|
0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
|
||||||
|
0010-modprobe-Implement-allow-unsupported-modules.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 11 13:38:23 UTC 2014 - mmarek@suse.cz
|
||||||
|
|
||||||
|
- Provide and obsolete module-init-tools (bnc#867442)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 7 09:25:02 UTC 2014 - mmarek@suse.cz
|
||||||
|
|
||||||
|
- testsuite: Fix uname() during glibc startup
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 5 14:50:34 UTC 2014 - mmarek@suse.cz
|
||||||
|
|
||||||
|
- testsuite: Check the list of loaded modules after a test
|
||||||
|
- testsuite: Add test for modprobe --force
|
||||||
|
- testsuite: Do not provide finit_module(2) on older kernels
|
||||||
|
- Add some tests for kernels without finit_module(2)
|
||||||
|
- libkmod-module: Simplify kmod_module_insert_module()
|
||||||
|
- libkmod: Implement filtering of unsupported modules (fate#316971)
|
||||||
|
- modprobe: Implement --allow-unsupported-modules (fate#316971)
|
||||||
|
- make the %check section fatal
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 26 13:23:41 UTC 2014 - mmarek@suse.cz
|
Wed Feb 26 13:23:41 UTC 2014 - mmarek@suse.cz
|
||||||
|
|
||||||
|
21
kmod.spec
21
kmod.spec
@ -21,7 +21,7 @@ Name: kmod
|
|||||||
Summary: Utilities to load modules into the kernel
|
Summary: Utilities to load modules into the kernel
|
||||||
License: LGPL-2.1+ and GPL-2.0+
|
License: LGPL-2.1+ and GPL-2.0+
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
Version: 16
|
Version: 17
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/
|
Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/
|
||||||
#Announce: https://lwn.net/Articles/577962/
|
#Announce: https://lwn.net/Articles/577962/
|
||||||
@ -30,18 +30,15 @@ Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-modul
|
|||||||
#Git-Clone: git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod
|
#Git-Clone: git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod
|
||||||
Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.xz
|
Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.xz
|
||||||
Source2: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.sign
|
Source2: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.sign
|
||||||
Patch1: 0001-Remove-rmmod-w-documentation-and-getopt-entry.patch
|
Patch1: 0001-Fix-recursion-loop-in-mod_count_all_dependencies-whe.patch
|
||||||
Patch2: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
Patch2: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
||||||
Patch3: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
Patch3: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
||||||
|
Patch9: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
|
||||||
|
Patch10: 0010-modprobe-Implement-allow-unsupported-modules.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
%if 0%{?suse_version} >= 1220
|
|
||||||
BuildRequires: libxslt-tools
|
|
||||||
%else
|
|
||||||
BuildRequires: libxslt
|
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig >= 0.21
|
BuildRequires: pkgconfig >= 0.21
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
%if 0%{?sles_version}
|
%if 0%{?sles_version}
|
||||||
@ -67,8 +64,9 @@ Summary: Compat symlinks for kernel module utilities
|
|||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
Requires: kmod
|
Requires: kmod
|
||||||
|
Obsoletes: module-init-tools < 3.16
|
||||||
|
Provides: module-init-tools = 3.16
|
||||||
Provides: modutils
|
Provides: modutils
|
||||||
Conflicts: module-init-tools
|
|
||||||
|
|
||||||
%description compat
|
%description compat
|
||||||
kmod is a set of tools to handle common tasks with Linux kernel
|
kmod is a set of tools to handle common tasks with Linux kernel
|
||||||
@ -103,9 +101,10 @@ in %lname.
|
|||||||
%{?gpg_verify: xz -dk "%{S:0}"; %gpg_verify %{S:2}}
|
%{?gpg_verify: xz -dk "%{S:0}"; %gpg_verify %{S:2}}
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
touch man/rmmod.8
|
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
%patch10 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
@ -155,11 +154,11 @@ mkdir -p "$b"/{bin,sbin,%_lib};
|
|||||||
ln -s "%_bindir/kmod" "$b/bin/";
|
ln -s "%_bindir/kmod" "$b/bin/";
|
||||||
%if "%_libdir" != "/%_lib"
|
%if "%_libdir" != "/%_lib"
|
||||||
ln -s "%_libdir/libkmod.so.2" "$b/%_lib/";
|
ln -s "%_libdir/libkmod.so.2" "$b/%_lib/";
|
||||||
ln -s "%_libdir/libkmod.so.2.2.6" "$b/%_lib/";
|
ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/";
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check V=1 || :;
|
make check
|
||||||
|
|
||||||
%post -n %lname -p /sbin/ldconfig
|
%post -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user