Date: Friday, August 14, 2015 @ 16:12:19 Author: dreisner Revision: 243692
archrelease: copy trunk to testing-i686, testing-x86_64 Added: kmod/repos/testing-i686/ kmod/repos/testing-i686/0001-libkmod-module-fix-return-code-in-error-path.patch (from rev 243691, kmod/trunk/0001-libkmod-module-fix-return-code-in-error-path.patch) kmod/repos/testing-i686/PKGBUILD (from rev 243691, kmod/trunk/PKGBUILD) kmod/repos/testing-i686/depmod-search.conf (from rev 243691, kmod/trunk/depmod-search.conf) kmod/repos/testing-x86_64/ kmod/repos/testing-x86_64/0001-libkmod-module-fix-return-code-in-error-path.patch (from rev 243691, kmod/trunk/0001-libkmod-module-fix-return-code-in-error-path.patch) kmod/repos/testing-x86_64/PKGBUILD (from rev 243691, kmod/trunk/PKGBUILD) kmod/repos/testing-x86_64/depmod-search.conf (from rev 243691, kmod/trunk/depmod-search.conf) ------------------------------------------------------------------------+ testing-i686/0001-libkmod-module-fix-return-code-in-error-path.patch | 34 ++++ testing-i686/PKGBUILD | 79 ++++++++++ testing-i686/depmod-search.conf | 5 testing-x86_64/0001-libkmod-module-fix-return-code-in-error-path.patch | 34 ++++ testing-x86_64/PKGBUILD | 79 ++++++++++ testing-x86_64/depmod-search.conf | 5 6 files changed, 236 insertions(+) Copied: kmod/repos/testing-i686/0001-libkmod-module-fix-return-code-in-error-path.patch (from rev 243691, kmod/trunk/0001-libkmod-module-fix-return-code-in-error-path.patch) =================================================================== --- testing-i686/0001-libkmod-module-fix-return-code-in-error-path.patch (rev 0) +++ testing-i686/0001-libkmod-module-fix-return-code-in-error-path.patch 2015-08-14 14:12:19 UTC (rev 243692) @@ -0,0 +1,34 @@ +From 114ec87c85c35a2bd3682f9f891e494127be6fb5 Mon Sep 17 00:00:00 2001 +From: Lucas De Marchi <lucas.demar...@intel.com> +Date: Sat, 13 Jun 2015 18:29:47 -0300 +Subject: [PATCH] libkmod-module: fix return code in error path + +ENOSYS is the wrong errno to return when we don't find a module in +kmod_module_insert_module(). Why is it there in the first place? This +goes back to kmod v1 when we couldn't load modules by names, but we +should give a path instead. + +708624a ("ELF: initial support for modinfo and strip of modversions and +vermagic.") changed that so we do a lazy-search by the module path in +this function. Later f304afe ("Change error message to reflect +reality") fixed the log message but the return coded remained the same. +--- + libkmod/libkmod-module.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c +index 366308f..50b2ff9 100644 +--- a/libkmod/libkmod-module.c ++++ b/libkmod/libkmod-module.c +@@ -830,7 +830,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod, + path = kmod_module_get_path(mod); + if (path == NULL) { + ERR(mod->ctx, "could not find module by name='%s'\n", mod->name); +- return -ENOSYS; ++ return -ENOENT; + } + + mod->file = kmod_file_open(mod->ctx, path); +-- +2.5.0 + Copied: kmod/repos/testing-i686/PKGBUILD (from rev 243691, kmod/trunk/PKGBUILD) =================================================================== --- testing-i686/PKGBUILD (rev 0) +++ testing-i686/PKGBUILD 2015-08-14 14:12:19 UTC (rev 243692) @@ -0,0 +1,79 @@ +# $Id$ +# Maintainer: Dave Reisner <dreis...@archlinux.org> + +pkgname=kmod +pkgver=21 +pkgrel=2 +pkgdesc="Linux kernel module handling" +arch=('i686' 'x86_64') +url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary' +license=('GPL2') +depends=('glibc' 'zlib' 'xz') +makedepends=('gtk-doc') +checkdepends=('linux-headers') +options=('strip' 'debug') +provides=('module-init-tools=3.16' 'libkmod.so') +conflicts=('module-init-tools') +replaces=('module-init-tools') +validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi +source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign} + '0001-libkmod-module-fix-return-code-in-error-path.patch' + "depmod-search.conf") +md5sums=('ee246fab2e1cba9fbdcad6a86ec31531' + 'SKIP' + '1825c63bd993a9b8a6b2395a1e25cdc6' + 'dd62cbf62bd8f212f51ef8c43bec9a77') + + +prepare() { + cd "$pkgname-$pkgver" + + patch -Np1 <../0001-libkmod-module-fix-return-code-in-error-path.patch +} + +build() { + cd "$pkgname-$pkgver" + + ./configure \ + --sysconfdir=/etc \ + --enable-gtk-doc \ + --with-xz \ + --with-zlib + + make +} + +check() { + # As of kmod v20, the test suite needs to build some kernel modules, and thus + # needs headers available in order to run. We depend on linux-headers, but + # this is really only to try and make sure that *some* useable tree of kernel + # headers exist. The first useable tree we find is good enough, as these + # modules will never be loaded by tests. + + local kdirs=(/usr/lib/modules/*/build/Makefile) + if [[ ! -f ${kdirs[0]} ]]; then + printf '==> Unable to find kernel headers to build modules for tests\n' >&2 + return 1 + fi + + local kver kdir=${kdirs[0]%/Makefile} + IFS=/ read _ _ _ kver _ <<<"$kdir" + + make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver" +} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + + # extra directories + install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d + + for tool in {ins,ls,rm,dep}mod mod{probe,info}; do + ln -s kmod "$pkgdir/usr/bin/$tool" + done + + # install depmod.d file for search/ dir + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" +} + +# vim: ft=sh syn=sh et Copied: kmod/repos/testing-i686/depmod-search.conf (from rev 243691, kmod/trunk/depmod-search.conf) =================================================================== --- testing-i686/depmod-search.conf (rev 0) +++ testing-i686/depmod-search.conf 2015-08-14 14:12:19 UTC (rev 243692) @@ -0,0 +1,5 @@ +# +# /usr/lib/depmod.d/search.conf +# + +search updates extramodules built-in Copied: kmod/repos/testing-x86_64/0001-libkmod-module-fix-return-code-in-error-path.patch (from rev 243691, kmod/trunk/0001-libkmod-module-fix-return-code-in-error-path.patch) =================================================================== --- testing-x86_64/0001-libkmod-module-fix-return-code-in-error-path.patch (rev 0) +++ testing-x86_64/0001-libkmod-module-fix-return-code-in-error-path.patch 2015-08-14 14:12:19 UTC (rev 243692) @@ -0,0 +1,34 @@ +From 114ec87c85c35a2bd3682f9f891e494127be6fb5 Mon Sep 17 00:00:00 2001 +From: Lucas De Marchi <lucas.demar...@intel.com> +Date: Sat, 13 Jun 2015 18:29:47 -0300 +Subject: [PATCH] libkmod-module: fix return code in error path + +ENOSYS is the wrong errno to return when we don't find a module in +kmod_module_insert_module(). Why is it there in the first place? This +goes back to kmod v1 when we couldn't load modules by names, but we +should give a path instead. + +708624a ("ELF: initial support for modinfo and strip of modversions and +vermagic.") changed that so we do a lazy-search by the module path in +this function. Later f304afe ("Change error message to reflect +reality") fixed the log message but the return coded remained the same. +--- + libkmod/libkmod-module.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c +index 366308f..50b2ff9 100644 +--- a/libkmod/libkmod-module.c ++++ b/libkmod/libkmod-module.c +@@ -830,7 +830,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod, + path = kmod_module_get_path(mod); + if (path == NULL) { + ERR(mod->ctx, "could not find module by name='%s'\n", mod->name); +- return -ENOSYS; ++ return -ENOENT; + } + + mod->file = kmod_file_open(mod->ctx, path); +-- +2.5.0 + Copied: kmod/repos/testing-x86_64/PKGBUILD (from rev 243691, kmod/trunk/PKGBUILD) =================================================================== --- testing-x86_64/PKGBUILD (rev 0) +++ testing-x86_64/PKGBUILD 2015-08-14 14:12:19 UTC (rev 243692) @@ -0,0 +1,79 @@ +# $Id$ +# Maintainer: Dave Reisner <dreis...@archlinux.org> + +pkgname=kmod +pkgver=21 +pkgrel=2 +pkgdesc="Linux kernel module handling" +arch=('i686' 'x86_64') +url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary' +license=('GPL2') +depends=('glibc' 'zlib' 'xz') +makedepends=('gtk-doc') +checkdepends=('linux-headers') +options=('strip' 'debug') +provides=('module-init-tools=3.16' 'libkmod.so') +conflicts=('module-init-tools') +replaces=('module-init-tools') +validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi +source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign} + '0001-libkmod-module-fix-return-code-in-error-path.patch' + "depmod-search.conf") +md5sums=('ee246fab2e1cba9fbdcad6a86ec31531' + 'SKIP' + '1825c63bd993a9b8a6b2395a1e25cdc6' + 'dd62cbf62bd8f212f51ef8c43bec9a77') + + +prepare() { + cd "$pkgname-$pkgver" + + patch -Np1 <../0001-libkmod-module-fix-return-code-in-error-path.patch +} + +build() { + cd "$pkgname-$pkgver" + + ./configure \ + --sysconfdir=/etc \ + --enable-gtk-doc \ + --with-xz \ + --with-zlib + + make +} + +check() { + # As of kmod v20, the test suite needs to build some kernel modules, and thus + # needs headers available in order to run. We depend on linux-headers, but + # this is really only to try and make sure that *some* useable tree of kernel + # headers exist. The first useable tree we find is good enough, as these + # modules will never be loaded by tests. + + local kdirs=(/usr/lib/modules/*/build/Makefile) + if [[ ! -f ${kdirs[0]} ]]; then + printf '==> Unable to find kernel headers to build modules for tests\n' >&2 + return 1 + fi + + local kver kdir=${kdirs[0]%/Makefile} + IFS=/ read _ _ _ kver _ <<<"$kdir" + + make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver" +} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + + # extra directories + install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d + + for tool in {ins,ls,rm,dep}mod mod{probe,info}; do + ln -s kmod "$pkgdir/usr/bin/$tool" + done + + # install depmod.d file for search/ dir + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" +} + +# vim: ft=sh syn=sh et Copied: kmod/repos/testing-x86_64/depmod-search.conf (from rev 243691, kmod/trunk/depmod-search.conf) =================================================================== --- testing-x86_64/depmod-search.conf (rev 0) +++ testing-x86_64/depmod-search.conf 2015-08-14 14:12:19 UTC (rev 243692) @@ -0,0 +1,5 @@ +# +# /usr/lib/depmod.d/search.conf +# + +search updates extramodules built-in