From 414e27ebe976c73681c5d0bff75fe1de44588a068cb28b3d65a799869c1e428f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 21 Jul 2016 09:48:01 +0000 Subject: [PATCH 1/5] Accepting request 412520 from home:michal-m:branches:Base:System - Do link zlib and xz, as we are not building compressed modules. - Do link zlib and xz, as we are not building compressed modules. OBS-URL: https://build.opensuse.org/request/show/412520 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=109 --- kmod-testsuite.changes | 5 +++++ kmod-testsuite.spec | 15 ++------------- kmod.changes | 5 +++++ kmod.spec | 15 ++------------- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/kmod-testsuite.changes b/kmod-testsuite.changes index 6729a2a..49d092d 100644 --- a/kmod-testsuite.changes +++ b/kmod-testsuite.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 21 09:11:25 UTC 2016 - mmarek@suse.com + +- Do link zlib and xz, as we are not building compressed modules. + ------------------------------------------------------------------- Thu Mar 31 16:53:28 UTC 2016 - normand@linux.vnet.ibm.com diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec index 912988d..6f3c90e 100644 --- a/kmod-testsuite.spec +++ b/kmod-testsuite.spec @@ -46,13 +46,6 @@ 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 %define kdir /usr/src/linux-obj/%_target_cpu/default @@ -67,15 +60,11 @@ buildloop with the kernel. %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 \ + --without-xz \ + --without-zlib \ --includedir="%_includedir/kmod" \ --with-rootlibdir="%_libdir" \ --bindir="%_bindir" diff --git a/kmod.changes b/kmod.changes index 317ba36..3bf99a5 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 21 09:11:25 UTC 2016 - mmarek@suse.com + +- Do link zlib and xz, as we are not building compressed modules. + ------------------------------------------------------------------- Fri Jun 17 15:18:29 UTC 2016 - mmarek@suse.cz diff --git a/kmod.spec b/kmod.spec index 9ca5cc2..2f9c8c5 100644 --- a/kmod.spec +++ b/kmod.spec @@ -45,13 +45,6 @@ BuildRequires: libtool BuildRequires: pkgconfig >= 0.21 BuildRequires: suse-module-tools 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 @@ -107,15 +100,11 @@ in %lname. %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 \ + --without-xz \ + --without-zlib \ --includedir="%_includedir/kmod" \ --with-rootlibdir="%_libdir" \ --bindir="%_bindir" From d5358f069ed86cf36cb804a3d0602095f66213caa38bf15e7081cb4968572750 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 21 Jul 2016 09:52:34 +0000 Subject: [PATCH 2/5] Copy back r108 because no time was given to react to the proposed change. OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=110 --- kmod-testsuite.changes | 5 ----- kmod-testsuite.spec | 15 +++++++++++++-- kmod.changes | 5 ----- kmod.spec | 15 +++++++++++++-- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/kmod-testsuite.changes b/kmod-testsuite.changes index 49d092d..6729a2a 100644 --- a/kmod-testsuite.changes +++ b/kmod-testsuite.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Thu Jul 21 09:11:25 UTC 2016 - mmarek@suse.com - -- Do link zlib and xz, as we are not building compressed modules. - ------------------------------------------------------------------- Thu Mar 31 16:53:28 UTC 2016 - normand@linux.vnet.ibm.com diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec index 6f3c90e..912988d 100644 --- a/kmod-testsuite.spec +++ b/kmod-testsuite.spec @@ -46,6 +46,13 @@ 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 %define kdir /usr/src/linux-obj/%_target_cpu/default @@ -60,11 +67,15 @@ buildloop with the kernel. %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 \ - --without-xz \ - --without-zlib \ +%if 0%{?sles_version} == 11 + zlib_CFLAGS=" " zlib_LIBS="-lz" \ +%endif + --with-xz \ + --with-zlib \ --includedir="%_includedir/kmod" \ --with-rootlibdir="%_libdir" \ --bindir="%_bindir" diff --git a/kmod.changes b/kmod.changes index 3bf99a5..317ba36 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Thu Jul 21 09:11:25 UTC 2016 - mmarek@suse.com - -- Do link zlib and xz, as we are not building compressed modules. - ------------------------------------------------------------------- Fri Jun 17 15:18:29 UTC 2016 - mmarek@suse.cz diff --git a/kmod.spec b/kmod.spec index 2f9c8c5..9ca5cc2 100644 --- a/kmod.spec +++ b/kmod.spec @@ -45,6 +45,13 @@ BuildRequires: libtool BuildRequires: pkgconfig >= 0.21 BuildRequires: suse-module-tools 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 @@ -100,11 +107,15 @@ in %lname. %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 \ - --without-xz \ - --without-zlib \ +%if 0%{?sles_version} == 11 + zlib_CFLAGS=" " zlib_LIBS="-lz" \ +%endif + --with-xz \ + --with-zlib \ --includedir="%_includedir/kmod" \ --with-rootlibdir="%_libdir" \ --bindir="%_bindir" From 0fde1c43f82b78dfca96ad8b32d252cc59a51e1c783b0f8340d472ae63831a26 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 21 Jul 2016 10:08:59 +0000 Subject: [PATCH 3/5] kmod-23 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=111 --- ...od-Handle-long-lines-in-proc-modules.patch | 93 ------------------- ...d-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch | 27 ------ kmod-22.tar.sign | 17 ---- kmod-22.tar.xz | 3 - kmod-23.tar.sign | 17 ++++ kmod-23.tar.xz | 3 + kmod-testsuite.spec | 6 +- kmod.changes | 13 +++ kmod.spec | 11 +-- 9 files changed, 39 insertions(+), 151 deletions(-) delete mode 100644 0001-libkmod-Handle-long-lines-in-proc-modules.patch delete mode 100644 depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch delete mode 100644 kmod-22.tar.sign delete mode 100644 kmod-22.tar.xz create mode 100644 kmod-23.tar.sign create mode 100644 kmod-23.tar.xz diff --git a/0001-libkmod-Handle-long-lines-in-proc-modules.patch b/0001-libkmod-Handle-long-lines-in-proc-modules.patch deleted file mode 100644 index 36216bc..0000000 --- a/0001-libkmod-Handle-long-lines-in-proc-modules.patch +++ /dev/null @@ -1,93 +0,0 @@ -From d1a89109faebc3db7e01d10fb8ac6f9dd2332a8f Mon Sep 17 00:00:00 2001 -From: Michal Marek -Date: Thu, 16 Jun 2016 09:18:52 +0200 -Subject: [PATCH] libkmod: Handle long lines in /proc/modules -Patch-mainline: Submitted to linux-modules@vger.kernel.org on 2016-06-17 -References: bsc#983754 - -kmod_module_new_from_loaded() calls fgets with a 4k buffer. When a -module such as usbcore is used by too many modules, the rest of the line -is considered a beginning of another lines and we eventually get errors -like these from lsmod: - -libkmod: kmod_module_get_holders: could not open '/sys/module/100,/holders': No such file or directory - -together with bogus entries in the output. In kmod_module_get_size, the -problem does not affect functionality, but the line numbers in error -messages will be wrong. - -Signed-off-by: Michal Marek ---- - -I wrote a test case for this as well, but it is failing because the -testsuite itself has problems with output larger than 4k. I'll send -something later. - -Also, the buffer could be shrinked now, so that we do not use that much -space on stack. Not sure if this is of interest or not. I left it as is. - -Michal - - ---- - libkmod/libkmod-module.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c -index 1460c6746cc4..25dcda7667b7 100644 ---- a/libkmod/libkmod-module.c -+++ b/libkmod/libkmod-module.c -@@ -1660,13 +1660,14 @@ KMOD_EXPORT int kmod_module_new_from_loaded(struct kmod_ctx *ctx, - struct kmod_module *m; - struct kmod_list *node; - int err; -+ size_t len = strlen(line); - char *saveptr, *name = strtok_r(line, " \t", &saveptr); - - err = kmod_module_new_from_name(ctx, name, &m); - if (err < 0) { - ERR(ctx, "could not get module from name '%s': %s\n", - name, strerror(-err)); -- continue; -+ goto eat_line; - } - - node = kmod_list_append(l, m); -@@ -1676,6 +1677,9 @@ KMOD_EXPORT int kmod_module_new_from_loaded(struct kmod_ctx *ctx, - ERR(ctx, "out of memory\n"); - kmod_module_unref(m); - } -+eat_line: -+ while (line[len - 1] != '\n' && fgets(line, sizeof(line), fp)) -+ len = strlen(line); - } - - fclose(fp); -@@ -1825,12 +1829,13 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) - } - - while (fgets(line, sizeof(line), fp)) { -+ size_t len = strlen(line); - char *saveptr, *endptr, *tok = strtok_r(line, " \t", &saveptr); - long value; - - lineno++; - if (tok == NULL || !streq(tok, mod->name)) -- continue; -+ goto eat_line; - - tok = strtok_r(NULL, " \t", &saveptr); - if (tok == NULL) { -@@ -1848,6 +1853,9 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) - - size = value; - break; -+eat_line: -+ while (line[len - 1] != '\n' && fgets(line, sizeof(line), fp)) -+ len = strlen(line); - } - fclose(fp); - --- -2.6.2 - diff --git a/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch b/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch deleted file mode 100644 index 995f2a1..0000000 --- a/depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch +++ /dev/null @@ -1,27 +0,0 @@ -Subject: [PATCH] depmod: Ignore PowerPC64 ABIv2 .TOC. symbo - -The .TOC. symbol on the PowerPC64 ABIv2 identifies the GOT -pointer, similar to how other architectures use _GLOBAL_OFFSET_TABLE_. - -This is not a symbol that needs relocation, and should be ignored -by depmod. - ---- - tools/depmod.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/depmod.c b/tools/depmod.c -index 6e9bb4d..a2e07c1 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c -@@ -2153,6 +2153,8 @@ static void depmod_add_fake_syms(struct depmod *depmod) - depmod_symbol_add(depmod, "__this_module", true, 0, NULL); - /* On S390, this is faked up too */ - depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL); -+ /* On PowerPC64 ABIv2, .TOC. is more or less _GLOBAL_OFFSET_TABLE_ */ -+ depmod_symbol_add(depmod, "TOC.", true, 0, NULL); - } - - static int depmod_load_symvers(struct depmod *depmod, const char *filename) --- -2.5.0 diff --git a/kmod-22.tar.sign b/kmod-22.tar.sign deleted file mode 100644 index 7622197..0000000 --- a/kmod-22.tar.sign +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAABCAAGBQJWS8KQAAoJEJuipaYwy+pTtI4P+gM1moO6Qt3CEP1GCfZPek9F -+2MxgtWnttSwroJ1PnQowv/yJtAtjnyBr78KK2M79g3XWRn2zXbf8+7S49dgrcpO -f7lHrvP+WIzTtS4mk7GTUk7LX8fUUOWr3na2aO6Cv2diJRW9JBKHWWzij5Wa0Zvn -JnA8b2CxweJp7KBcf+GxcLBkUrN5/5Qfej8KCK9pp4RUt1ks6vUTYaFjZHugr8ks -4U6GQbaFqpICpVd1k3qj/kfgftkPkQUcOL7MfK+LBtPuyA4rycy01hsESrB05gaJ -lw6dcmCAcI7xoI/2EpqD9D5pBGMR13IbBb4KmO2CdE30cQxT/R4oH1mt+Dbn3kwl -s185nSCqe7yo+F+qYmdqAy+u76yjXnlVl9/CpOBTkRkC0U8zq/QmnyBDZyYrcl5k -3z9UH+p5Y0lXFopbljEdGJfiLCWjP7g1ynqQl4mVL3ymfu0nW5/7/bsQq8lh20uh -c0u0qLAKzsL6XlO1YN60tzDHv43cZ3UoEtlNozJgLcNGM2KyrQsonwPtqMjNCSzw -xqQHcJZvcO1C3TLQ4FYGHfpN8/kNK3LpWLV7D+WHfZRQnU7MwuPkU7cUJrt4uh8w -IislcX/AbkbZ7VG81IaV/ni5jVfFBfnxFnW2xIgO2cN4xkTo8TVt1Qw0kF+TYaD7 -st8UBrgP1xKixic51979 -=vwC8 ------END PGP SIGNATURE----- diff --git a/kmod-22.tar.xz b/kmod-22.tar.xz deleted file mode 100644 index 9f9e83b..0000000 --- a/kmod-22.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba3b1ddea33228b473189fcb05b809024a3b86e9a7cf37d420cae06beb749f82 -size 449724 diff --git a/kmod-23.tar.sign b/kmod-23.tar.sign new file mode 100644 index 0000000..2c71ef0 --- /dev/null +++ b/kmod-23.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJXjwCUAAoJEJuipaYwy+pTgAoQAKLpfyFbLpUqcxpjWPgFD+Ei +1/Ls0SQIlnhgtX+mpXuFMS2eV5hdrozbc3EJ57x3mbPFi6KbVP9UQBnLF2e1glam +QZrjq4O7ae3OApCFCu/+q8XLz8M1n82etKANBez/tbZjmqvg5+gFnlXWDC4bhQeI +3i32RJtkHw94kThNR0+L4w+whG2xU9VOgh/OMbAf9m29uoJzBsNXZTO3+YuzvbtT +JYmPokaOjIBGMG/lPmKEVq5a5kkeSJ4UvTPYV+NlB87UAahzSSPZP4h9MXQaoQy6 +wP6ivqM8vW7EyXeTuyfOh/7+DV58xjP1Amjm2dTi412cQfSUjUC0fuOkbDTib/Ul +Ro6YtQoRS/ILES1YhwWzM19GIcZjEeMF58WHZVEnrTXq0xq2wCmt2MeBl24xX5EJ +wcocat3FcqHFaGmaLjMItqDwHhJrhbxnKJC3lpKmIvmdvyD1DyXeylxBX0RACn07 +kyV01JTFH+JefbUyS3vo5OnciTH6THJ9qHNL/ApjOf5htWUKthgW5SzqV073zXYp +Pc81EEFH2v7IMt4gCHPdbZ6AwAqcJVB+pLinttnNN6gQfmhfFpdBmC0u1SI9NBRF +EOHFsIQmdbfHuSXmSZzjjjBtsSl868u+aIyJE+tqLKMEc1zoMYh6nIm4nZaIkZgP +z14K+bbua25I+M8TW6BF +=PTLr +-----END PGP SIGNATURE----- diff --git a/kmod-23.tar.xz b/kmod-23.tar.xz new file mode 100644 index 0000000..88c87c5 --- /dev/null +++ b/kmod-23.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d303d5519faec9d69e1132f6b37db2579db17a7fb5c1517da0115d03ba168155 +size 450376 diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec index 912988d..52e607a 100644 --- a/kmod-testsuite.spec +++ b/kmod-testsuite.spec @@ -18,7 +18,7 @@ Name: kmod-testsuite %define lname libkmod2 -Version: 22 +Version: 23 Release: 0 Summary: Testsuite of the kmod package License: LGPL-2.1+ and GPL-2.0+ @@ -36,8 +36,6 @@ 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 -Patch8: depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch -Patch9: 0001-libkmod-Handle-long-lines-in-proc-modules.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -63,7 +61,7 @@ buildloop with the kernel. %prep %setup -q -n kmod-%version -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 7 -P 8 -P 9 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 7 -p1 %build autoreconf -fi diff --git a/kmod.changes b/kmod.changes index 317ba36..32da550 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jul 21 09:56:02 UTC 2016 - jengelh@inai.de + +- Update to new upstream release 23 +* Don't add comment to modules.devname if it would otherwise be + empty. +* Ignore .TOC. symbols in depmod parsing. +* Fix crash on modinfo while checking for available signature of + unknown type. +* Teach modinfo about PKCS#7 module signatures. +- Drop depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch (merged), + 0001-libkmod-Handle-long-lines-in-proc-modules.patch (merged) + ------------------------------------------------------------------- Fri Jun 17 15:18:29 UTC 2016 - mmarek@suse.cz diff --git a/kmod.spec b/kmod.spec index 9ca5cc2..80d24d3 100644 --- a/kmod.spec +++ b/kmod.spec @@ -18,13 +18,12 @@ Name: kmod %define lname libkmod2 -Version: 22 +Version: 23 Release: 0 Summary: Utilities to load modules into the kernel License: LGPL-2.1+ and GPL-2.0+ Group: System/Kernel -Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/ -#Announce: https://lwn.net/Articles/664801/ +Url: https://www.kernel.org/pub/linux/utils/kernel/kmod/ #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 @@ -36,8 +35,6 @@ 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 -Patch8: depmod-Ignore_PowerPC64_ABIv2_.TOC.symbol.patch -Patch9: 0001-libkmod-Handle-long-lines-in-proc-modules.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -103,7 +100,7 @@ in %lname. %prep %setup -q -n kmod-%version -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 7 -P 8 -P 9 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 7 -p1 %build autoreconf -fi @@ -155,7 +152,7 @@ ln -s "%_bindir/kmod" "$b/bin/"; ls -l "$b/%_libdir/" %if "%_libdir" != "/%_lib" ln -s "%_libdir/libkmod.so.2" "$b/%_lib/"; -ln -s "%_libdir/libkmod.so.2.3.0" "$b/%_lib/"; +ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/"; %endif %post From 3d3755762d9f51d9f72a89c2db3ee8982ca793b0f81ffaead46debe2577f5392 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 21 Jul 2016 11:27:03 +0000 Subject: [PATCH 4/5] strip unnecessary trailing semicolons; rework softlink creation OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=112 --- kmod.spec | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/kmod.spec b/kmod.spec index 80d24d3..6ced167 100644 --- a/kmod.spec +++ b/kmod.spec @@ -119,40 +119,39 @@ export LDFLAGS="-Wl,-z,relro,-z,now" make %{?_smp_mflags} V=1 %install -b="%buildroot"; -make install DESTDIR="$b"; +b="%buildroot" +%make_install rm -f "$b/%_libdir"/*.la -mkdir -p "$b/%_libexecdir/kmod" "$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) # - ln -s "%_bindir/kmod" "$b/%_sbindir/$i"; - ln -s "%_bindir/kmod" "$b/sbin/$i"; + ln -s "%_bindir/kmod" "$b/%_sbindir/$i" + ln -s "%_bindir/kmod" "$b/sbin/$i" # # Make symlinks also available in normal fashion, # so one can actually run it. # - ln -s "%_bindir/kmod" "$b/%_libexecdir/kmod/$i"; -done; -mkdir -p "$b/%_bindir" "$b/bin"; + ln -s "%_bindir/kmod" "$b/%_libexecdir/kmod/$i" +done +mkdir -p "$b/%_bindir" "$b/bin" for i in lsmod; do - ln -s "%_bindir/kmod" "$b/%_bindir/$i"; - ln -s "%_bindir/kmod" "$b/bin/$i"; -done; + ln -s "%_bindir/kmod" "$b/%_bindir/$i" + ln -s "%_bindir/kmod" "$b/bin/$i" +done # -# make mkinitrd happy -# (last time checked it does not look into /usr) +# make (all ancient versions of) mkinitrd happy which did not look in /usr # -mkdir -p "$b"/{bin,sbin,%_lib}; -ln -s "%_bindir/kmod" "$b/bin/"; +mkdir -p "$b"/{bin,sbin,%_lib} +ln -s "%_bindir/kmod" "$b/bin/" ls -l "$b/%_libdir/" %if "%_libdir" != "/%_lib" -ln -s "%_libdir/libkmod.so.2" "$b/%_lib/"; -ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/"; +ln -s "%_libdir/libkmod.so.2.3.1" "$b/%_lib/" +cp -a "%_libdir/libkmod.so.2" "$b/%_lib/" %endif %post @@ -161,8 +160,7 @@ ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/"; %posttrans %{?regenerate_initrd_posttrans} -%post -n %lname -p /sbin/ldconfig - +%post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files From 0ed1d615fe50a76876782b00b969089825eff5de861ca5fc2bd37c7bfcd6f8bc Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 21 Jul 2016 12:04:18 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=113 --- kmod.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index 6ced167..ea6f3c0 100644 --- a/kmod.spec +++ b/kmod.spec @@ -151,7 +151,8 @@ ln -s "%_bindir/kmod" "$b/bin/" ls -l "$b/%_libdir/" %if "%_libdir" != "/%_lib" ln -s "%_libdir/libkmod.so.2.3.1" "$b/%_lib/" -cp -a "%_libdir/libkmod.so.2" "$b/%_lib/" +ln -s libkmod.so.2.3.1 "$b/%_lib/libkmod.so.2" +ls -l "$b/%_lib/" %endif %post