From 3e7521ddc23706aba7501bc13f0ae6a29956add88918259d562654f20c508eba Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 26 Feb 2014 17:34:42 +0000 Subject: [PATCH] Accepting request 223975 from home:michal-m:branches: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. OBS-URL: https://build.opensuse.org/request/show/223975 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=63 --- ...mod-w-documentation-and-getopt-entry.patch | 96 +++++++++++++++++++ ...ze-allow-unsupported-modules-on-comm.patch | 40 ++++++++ ...ecognize-allow_unsupported_modules-i.patch | 28 ++++++ kmod-no-static.diff | 23 ----- kmod.changes | 15 +++ kmod.spec | 9 +- 6 files changed, 186 insertions(+), 25 deletions(-) create mode 100644 0001-Remove-rmmod-w-documentation-and-getopt-entry.patch create mode 100644 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch create mode 100644 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch delete mode 100644 kmod-no-static.diff diff --git a/0001-Remove-rmmod-w-documentation-and-getopt-entry.patch b/0001-Remove-rmmod-w-documentation-and-getopt-entry.patch new file mode 100644 index 0000000..55bb24b --- /dev/null +++ b/0001-Remove-rmmod-w-documentation-and-getopt-entry.patch @@ -0,0 +1,96 @@ +From f81194e28e56dd57588edb5f19c5a3b1f38d1eb8 Mon Sep 17 00:00:00 2001 +From: Stephen Kitt +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 @@ + + rmmod + +- + + + modulename +@@ -94,22 +93,6 @@ + + + +- +- +- +- +- Normally, rmmod will refuse to unload modules +- which are in use. With this option, rmmod 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 +- +- lsmod8 +- ) for information on usage counts. +- +- +- +- + + + +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 + diff --git a/0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch b/0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch new file mode 100644 index 0000000..ef5580d --- /dev/null +++ b/0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch @@ -0,0 +1,40 @@ +From 472b40d53f6a9121ade7b969151b5b14268d1172 Mon Sep 17 00:00:00 2001 +From: Michal Marek +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 + diff --git a/0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch b/0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch new file mode 100644 index 0000000..a9a2c85 --- /dev/null +++ b/0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch @@ -0,0 +1,28 @@ +From da1cb1dd16edb2533ac431793e5bb3d01b243cae Mon Sep 17 00:00:00 2001 +From: Michal Marek +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 + diff --git a/kmod-no-static.diff b/kmod-no-static.diff deleted file mode 100644 index 6d04b61..0000000 --- a/kmod-no-static.diff +++ /dev/null @@ -1,23 +0,0 @@ -From: Jan Engelhardt -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) $@; \ diff --git a/kmod.changes b/kmod.changes index 10f0cf9..5017d89 100644 --- a/kmod.changes +++ b/kmod.changes @@ -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 diff --git a/kmod.spec b/kmod.spec index bcc43aa..26e328a 100644 --- a/kmod.spec +++ b/kmod.spec @@ -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