diff --git a/0010-modprobe-Implement-allow-unsupported-modules.patch b/0010-modprobe-Implement-allow-unsupported-modules.patch index bb15965..c654b53 100644 --- a/0010-modprobe-Implement-allow-unsupported-modules.patch +++ b/0010-modprobe-Implement-allow-unsupported-modules.patch @@ -6,17 +6,17 @@ Subject: [PATCH 4/5] 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(-) + Makefile.am | 4 +++- + libkmod/libkmod-unsupported.c | 9 +++++++++ + libkmod/libkmod-unsupported.h | 8 ++++++++ + tools/modprobe.c | 8 +++++++- + 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 libkmod/libkmod-unsupported.c create mode 100644 libkmod/libkmod-unsupported.h ---- kmod-19.orig/Makefile.am -+++ kmod-19/Makefile.am -@@ -86,7 +86,9 @@ libkmod_libkmod_la_LIBADD = \ +--- kmod-20.orig/Makefile.am ++++ kmod-20/Makefile.am +@@ -87,7 +87,9 @@ libkmod_libkmod_la_LIBADD = \ ${liblzma_LIBS} ${zlib_LIBS} noinst_LTLIBRARIES += libkmod/libkmod-internal.la @@ -28,7 +28,7 @@ Patch-mainline: never -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES) --- /dev/null -+++ kmod-19/libkmod/libkmod-unsupported.c ++++ kmod-20/libkmod/libkmod-unsupported.c @@ -0,0 +1,9 @@ +#include "libkmod-internal.h" +#include "libkmod-unsupported.h" @@ -40,7 +40,7 @@ Patch-mainline: never + config->block_unsupported = 0; +} --- /dev/null -+++ kmod-19/libkmod/libkmod-unsupported.h ++++ kmod-20/libkmod/libkmod-unsupported.h @@ -0,0 +1,8 @@ +#pragma once + @@ -50,18 +50,18 @@ Patch-mainline: never + * library + */ +void kmod_internal_allow_unsupported(struct kmod_ctx *ctx); ---- kmod-19.orig/tools/modprobe.c -+++ kmod-19/tools/modprobe.c +--- kmod-20.orig/tools/modprobe.c ++++ kmod-20/tools/modprobe.c @@ -38,6 +38,8 @@ #include "kmod.h" -+#include "libkmod-unsupported.h" ++#include "libkmod/libkmod-unsupported.h" + static int log_priority = LOG_CRIT; static int use_syslog = 0; #define LOG(...) log_printf(log_priority, __VA_ARGS__) -@@ -756,6 +758,7 @@ static int do_modprobe(int argc, char ** +@@ -730,6 +732,7 @@ static int do_modprobe(int argc, char ** int do_remove = 0; int do_show_config = 0; int do_show_modversions = 0; @@ -69,7 +69,7 @@ Patch-mainline: never int err; argv = prepend_options_from_env(&argc, orig_argv); -@@ -839,7 +842,7 @@ static int do_modprobe(int argc, char ** +@@ -813,7 +816,7 @@ static int do_modprobe(int argc, char ** kversion = optarg; break; case 128: @@ -78,7 +78,7 @@ Patch-mainline: never break; case 's': env_modprobe_options_append("-s"); -@@ -911,6 +914,9 @@ static int do_modprobe(int argc, char ** +@@ -885,6 +888,9 @@ static int do_modprobe(int argc, char ** log_setup_kmod_log(ctx, verbose); diff --git a/kmod-19.tar.sign b/kmod-19.tar.sign deleted file mode 100644 index 6182ab1..0000000 --- a/kmod-19.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABAgAGBQJUaJgbAAoJEJuipaYwy+pTf8cP/20YgEUIg/jeey7dVJ9kI/Fb -68yuu3lDR8mfi+LWduRoDHxfbFLVUTs3FWv5ub8i3gEan9LnTzArCs4X4j+kFvAr -Ecr2lYXRXJlZC7k9o11ljUlE+geJLSNi+lE2urI+dAYvR8kgjddRijGul+qpMu1V -LTx1PZHGYDyo4XDSwN0zDU2xwI9zehMflJgqzx6ltaDFMX/S7qOxVZVYMlwhugdF -p4maCE9xdJVkbMv4wgxdqwyn1ZtZNsIbbJigpyPafJyCDSi2ocD6c9TsqK4czUdz -7OyHlc27UtyX53PVhdH/I47cej6CnLpLDpTvnm92S72+Cvb2I6UMJ9TGniXKmQjs -cOwsljGHQF5w9eekjuVQOp678B9dTwdjywupGryzyVLdDjoH6yhhEv/vd4wqYAxy -9bBDUX9Kuf4GS4UTlXbVUwJ6oy6JK5ZlhrazMoTdQBaf0pIyKKrtk/LZiuNz3NjX -Myu/2UJVAcIYsgD3sbxVaK399apgqknJxlbMmHJieTU9EA/Oc9yCk2M4X6d067OF -nslyWhlv9xHv5iiJjuIlHPTcMwSMVdA5/2cJKDcA73Dj2t5xWUn+8X9x88LRV0pZ -nVJHZuXM6D8qhfxAK3cgs+c5noc3448rJsC7fQR4DyEbO9c302AU6V2ilOGII6mE -G0Tzn6ahVTfP9sdZFria -=oJOo ------END PGP SIGNATURE----- diff --git a/kmod-19.tar.xz b/kmod-19.tar.xz deleted file mode 100644 index e6613c9..0000000 --- a/kmod-19.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e7fee6eeff5435848b2dcc852bc8959066478d687d232284d67300c071e7b14 -size 1473916 diff --git a/kmod-20.tar.sign b/kmod-20.tar.sign new file mode 100644 index 0000000..0225148 --- /dev/null +++ b/kmod-20.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJU81XMAAoJEJuipaYwy+pTzN8P/0Qy13vnSe1krvYNv1QxEAbp +wyam2Nr0E9z9ZgA30LYRC8h0P9Su4UB/kOSU3PY189AkKndyLvcNPl49sqDdssgP +nJUczQUv54hfOJqfW70TAHK292xPr0wCt17KC1mCpcIflUl/8TMYIoUxwNeVmsVT +F+ZD4HZVhFQ46V8SxCD/fDK3/Ib/PQsGZtbEQaeDHu/VE6RUmGjBjUNtBUWbRqRw +lNtKc07X8Zutx3/fjMrEvSTVTVK55Abqmi39kxD+9EN6Jv7AgZMt2DOfJKtcAr1K +b070ZCUyxIUHmy+QOCil5GxnBm+ceggZkSpdr2CecJPWiYOV8MKsFoNHfXbt+sNU +Ej1JFxbEhdIoH2jrHO9D7AB2ZBhLNCdVCmuuf1DzoVyeuJW5tUey7uefpPwhv5iE +VSkqbg5CF4nFpxYScNUNKVMIprPAxz2q8SLWXMKf4j9AEPJFqsW6dUxx9YiGh4g0 +eZ3iie/oSz5aqwpket9V4O2bJhSN75qOnvYLvgJcRlHBk0geB0aIzq9cMrmsy6tJ +hFd7tlk5zuoH+ehO/d13O3dOMmbMchcM+Q0lMDLrV0GTstxGCOtZ1pORV6FjQis2 +YZSYSHj1vG42nxdMqHxHJpPBYjtB0zliADYXhwSxtDNVY+22sAFJEvT0FhDoDaH8 +2Hc/3i5X9xhu/sGTuuWh +=kPYD +-----END PGP SIGNATURE----- diff --git a/kmod-20.tar.xz b/kmod-20.tar.xz new file mode 100644 index 0000000..f0c06a2 --- /dev/null +++ b/kmod-20.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0 +size 437880 diff --git a/kmod-blacklist-fixtest.patch b/kmod-blacklist-fixtest.patch deleted file mode 100644 index 2695870..0000000 --- a/kmod-blacklist-fixtest.patch +++ /dev/null @@ -1,51 +0,0 @@ -In upstream git: - 0af8f786c0bae8c10d9b463d72e72cc6e80c26a2 - From: Marcus Meissner -and - d2db083ab6f8491e806c72888d897d15584f9f17 - From: Lucas De Marchi - -Index: kmod-19/testsuite/test-blacklist.c -=================================================================== ---- kmod-19.orig/testsuite/test-blacklist.c -+++ kmod-19/testsuite/test-blacklist.c -@@ -92,14 +92,13 @@ fail_lookup: - kmod_unref(ctx); - return EXIT_FAILURE; - } --static const struct test sblacklist_1 = { -- .name = "blacklist_1", -+ -+DEFINE_TEST(blacklist_1, - .description = "check if modules are correctly blacklisted", -- .func = blacklist_1, - .config = { - [TC_ROOTFS] = TESTSUITE_ROOTFS "test-blacklist/", - }, - .need_spawn = true, --}; -+); - - TESTSUITE_MAIN(); -Index: kmod-19/testsuite/test-dependencies.c -=================================================================== ---- kmod-19.orig/testsuite/test-dependencies.c -+++ kmod-19/testsuite/test-dependencies.c -@@ -76,15 +76,13 @@ static int test_dependencies(const struc - - return EXIT_SUCCESS; - } --static const struct test stest_dependencies = { -- .name = "test_dependencies", -+DEFINE_TEST(test_dependencies, - .description = "test if kmod_module_get_dependencies works", -- .func = test_dependencies, - .config = { - [TC_ROOTFS] = TESTSUITE_ROOTFS "test-dependencies/", - [TC_UNAME_R] = TEST_UNAME, - }, - .need_spawn = true, --}; -+) - - TESTSUITE_MAIN(); diff --git a/kmod-testsuite.changes b/kmod-testsuite.changes new file mode 100644 index 0000000..36369ea --- /dev/null +++ b/kmod-testsuite.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Tue Apr 21 12:43:39 UTC 2015 - mmarek@suse.cz + +- Run the kmod testsuite in a separate build, to avoid a buildloop + with the kernel. + diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec new file mode 100644 index 0000000..47e4b59 --- /dev/null +++ b/kmod-testsuite.spec @@ -0,0 +1,88 @@ +# +# spec file for package kmod-testsuite +# +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: kmod-testsuite +%define lname libkmod2 +Summary: Testsuite of the kmod package +License: LGPL-2.1+ and GPL-2.0+ +Group: System/Kernel +Version: 20 +Release: 0 +Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/ +#Announce: https://lkml.org/lkml/2015/3/1/152 + +#Git-Web: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary +#Git-Clone: git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.xz +Source2: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.sign +Patch1: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch +Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch +Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch +Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch +Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch +Patch7: 0001-use-correct-sort-method-in-test-array.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: git-core +BuildRequires: kernel-default-devel +BuildRequires: libtool +BuildRequires: pkgconfig >= 0.21 +BuildRequires: xz +%if 0%{?sles_version} == 11 +BuildRequires: xz-devel >= 4.99 +BuildRequires: zlib-devel +%else +BuildRequires: pkgconfig(liblzma) >= 4.99 +BuildRequires: pkgconfig(zlib) +%endif +Requires: suse-module-tools + +%description +This spec file does not produce any binary RPMs. It just builds kmod and +runs its testsuite. It has been split off the kmod package to avoid a +buildloop with the kernel. + +%prep +%setup -q -n kmod-%version +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 7 -p1 + +%build +autoreconf -fi +export LDFLAGS="-Wl,-z,relro,-z,now" +# The extra --includedir gives us the possibility to detect dependent +# packages which fail to properly use pkgconfig. +%configure \ +%if 0%{?sles_version} == 11 + zlib_CFLAGS=" " zlib_LIBS="-lz" \ +%endif + --with-xz \ + --with-zlib \ + --includedir="%_includedir/kmod" \ + --with-rootlibdir="%_libdir" \ + --bindir="%_bindir" +make %{?_smp_mflags} V=1 + +%install + +# empty + +%check +make check V=1 + +%changelog diff --git a/kmod.changes b/kmod.changes index a4969b3..04b987e 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Apr 21 14:38:55 UTC 2015 - mmarek@suse.cz + +- Update to kmod 20 +* More robust ELF parsing +* To fix a race, modprobe only looks at modules.builtin to + determine a builtin module, so e.g. 'modprobe vt' will no longer + work. +* Other fixes +* Testsuite moved to a separate package, since it is now building + the test modules from sources, which requires the kernel package. +* dropped kmod-blacklist-fixtest.patch (merged upstream) + + ------------------------------------------------------------------- Thu Apr 2 18:24:23 UTC 2015 - crrodriguez@opensuse.org diff --git a/kmod.spec b/kmod.spec index 0128997..96057c2 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,7 +1,7 @@ # # spec file for package kmod # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,21 +21,20 @@ Name: kmod Summary: Utilities to load modules into the kernel License: LGPL-2.1+ and GPL-2.0+ Group: System/Kernel -Version: 19 +Version: 20 Release: 0 Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/ -#Announce: https://lkml.org/lkml/2014/11/16/97 +#Announce: https://lkml.org/lkml/2015/3/1/152 #Git-Web: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary #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 +Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.xz +Source2: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.sign Patch1: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch -Patch6: kmod-blacklist-fixtest.patch Patch7: 0001-use-correct-sort-method-in-test-array.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -101,8 +100,8 @@ This package contains the development headers for the library found in %lname. %prep -%setup -q -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 +%setup -q -n kmod-%version +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 7 -p1 %build autoreconf -fi @@ -115,7 +114,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now" %endif --with-xz \ --with-zlib \ - --includedir="%_includedir/%name" \ + --includedir="%_includedir/kmod" \ --with-rootlibdir="%_libdir" \ --bindir="%_bindir" make %{?_smp_mflags} V=1 @@ -125,7 +124,7 @@ b="%buildroot"; make install DESTDIR="$b"; rm -f "$b/%_libdir"/*.la -mkdir -p "$b/%_libexecdir/%name" "$b/%_sbindir" "$b/sbin"; +mkdir -p "$b/%_libexecdir/kmod" "$b/%_sbindir" "$b/sbin"; for i in depmod insmod lsmod modinfo modprobe rmmod; do # # kmod-compat and kmod-compat(usrmerge) @@ -137,7 +136,7 @@ for i in depmod insmod lsmod modinfo modprobe rmmod; do # Make symlinks also available in normal fashion, # so one can actually run it. # - ln -s "%_bindir/kmod" "$b/%_libexecdir/%name/$i"; + ln -s "%_bindir/kmod" "$b/%_libexecdir/kmod/$i"; done; mkdir -p "$b/%_bindir" "$b/bin"; for i in lsmod; do @@ -153,12 +152,9 @@ mkdir -p "$b"/{bin,sbin,%_lib}; ln -s "%_bindir/kmod" "$b/bin/"; %if "%_libdir" != "/%_lib" ln -s "%_libdir/libkmod.so.2" "$b/%_lib/"; -ln -s "%_libdir/libkmod.so.2.2.9" "$b/%_lib/"; +ln -s "%_libdir/libkmod.so.2.2.10" "$b/%_lib/"; %endif -%check -make check V=1 - %post %{?regenerate_initrd_post} @@ -172,7 +168,7 @@ make check V=1 %files %defattr(-,root,root) %_bindir/kmod -%_libexecdir/%name +%_libexecdir/kmod /bin/kmod %_datadir/bash-completion/ %_mandir/man8/kmod.8*