SHA256
1
0
forked from pool/kmod

Accepting request 223987 from Base:System

- Remove "rmmod -w" documentation and getopt entry
- modprobe: Recognize --allow-unsupported-modules on commandline
  (fate#316971)
- libkmod-config: Recognize allow_unsupported_modules in the
  configuration (fate#316971)

- Drop the non-upstream kmod-no-static.diff; the size difference is
  negligible. (forwarded request 223975 from michal-m)

OBS-URL: https://build.opensuse.org/request/show/223987
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=21
This commit is contained in:
Stephan Kulow 2014-03-01 13:38:41 +00:00 committed by Git OBS Bridge
commit b484d3cd67
6 changed files with 186 additions and 25 deletions

View File

@ -0,0 +1,96 @@
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

View File

@ -0,0 +1,40 @@
From 472b40d53f6a9121ade7b969151b5b14268d1172 Mon Sep 17 00:00:00 2001
From: Michal Marek <mmarek@suse.cz>
Date: Wed, 26 Feb 2014 13:48:55 +0100
Subject: [PATCH 2/3] modprobe: Recognize --allow-unsupported-modules on
commandline
The option does not do anything yet, but it does not return error
either.
References: fate#316971
---
tools/modprobe.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/modprobe.c b/tools/modprobe.c
index 6b34658..589cc07 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -83,6 +83,8 @@ static const struct option cmdopts[] = {
{"dirname", required_argument, 0, 'd'},
{"set-version", required_argument, 0, 'S'},
+ {"allow-unsupported-modules", no_argument, 0, 128},
+
{"syslog", no_argument, 0, 's'},
{"quiet", no_argument, 0, 'q'},
{"verbose", no_argument, 0, 'v'},
@@ -835,6 +837,9 @@ static int do_modprobe(int argc, char **orig_argv)
case 'S':
kversion = optarg;
break;
+ case 128:
+ /* --allow-unsupported-modules does nothing for now */
+ break;
case 's':
env_modprobe_options_append("-s");
use_syslog = 1;
--
1.8.4.5

View File

@ -0,0 +1,28 @@
From da1cb1dd16edb2533ac431793e5bb3d01b243cae Mon Sep 17 00:00:00 2001
From: Michal Marek <mmarek@suse.cz>
Date: Wed, 26 Feb 2014 13:53:38 +0100
Subject: [PATCH 3/3] libkmod-config: Recognize allow_unsupported_modules in
the configuration
References: fate#316971
---
libkmod/libkmod-config.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 32adb8b..3950923 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -662,6 +662,9 @@ static int kmod_config_parse(struct kmod_config *config, int fd,
|| streq(cmd, "config")) {
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 */
+ ;
} else {
syntax_error:
ERR(ctx, "%s line %u: ignoring bad line starting with '%s'\n",
--
1.8.4.5

View File

@ -1,23 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-09-02 23:35:26.194874106 +0200
Well, we are not interested in just kmod (cf. NEWS),
so undo static linkage.
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: kmod/Makefile.am
===================================================================
--- kmod.orig/Makefile.am
+++ kmod/Makefile.am
@@ -117,7 +117,7 @@ tools_kmod_SOURCES = tools/kmod.c tools/
tools/depmod.c tools/log.h tools/log.c \
tools/static-nodes.c
tools_kmod_LDADD = libkmod/libkmod-util.la \
- libkmod/libkmod-internal.la
+ libkmod/libkmod.la
${noinst_SCRIPTS}: tools/kmod
$(AM_V_GEN) ($(RM) $@; \

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed Feb 26 13:23:41 UTC 2014 - mmarek@suse.cz
- Remove "rmmod -w" documentation and getopt entry
- modprobe: Recognize --allow-unsupported-modules on commandline
(fate#316971)
- libkmod-config: Recognize allow_unsupported_modules in the
configuration (fate#316971)
-------------------------------------------------------------------
Wed Feb 26 13:09:21 UTC 2014 - mmarek@suse.cz
- Drop the non-upstream kmod-no-static.diff; the size difference is
negligible.
-------------------------------------------------------------------
Tue Jan 7 11:59:38 UTC 2014 - jengelh@inai.de

View File

@ -30,7 +30,9 @@ Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-modul
#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
Source2: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.sign
Patch1: kmod-no-static.diff
Patch1: 0001-Remove-rmmod-w-documentation-and-getopt-entry.patch
Patch2: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
Patch3: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -100,7 +102,10 @@ in %lname.
%prep
%{?gpg_verify: xz -dk "%{S:0}"; %gpg_verify %{S:2}}
%setup -q
%patch -P 1 -p1
%patch1 -p1
touch man/rmmod.8
%patch2 -p1
%patch3 -p1
%build
autoreconf -fi