diff options
author | root <root@rshg054.dnsready.net> | 2012-01-06 23:14:57 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-06 23:14:57 +0000 |
commit | d7931e8fa49a4698ac8dbb1a155ca6b48f031828 (patch) | |
tree | 281739e3992b9ac2dbb722ea6f84d1015fe1a365 /testing/kmod | |
parent | 817e58c278cb8ebee7743205877d0f67c431fcec (diff) |
Fri Jan 6 23:14:57 UTC 2012
Diffstat (limited to 'testing/kmod')
-rw-r--r-- | testing/kmod/PKGBUILD | 59 | ||||
-rw-r--r-- | testing/kmod/depmod-search.conf | 5 | ||||
-rw-r--r-- | testing/kmod/return-non-zero-on-fail.patch | 30 |
3 files changed, 94 insertions, 0 deletions
diff --git a/testing/kmod/PKGBUILD b/testing/kmod/PKGBUILD new file mode 100644 index 000000000..6fd9c4c96 --- /dev/null +++ b/testing/kmod/PKGBUILD @@ -0,0 +1,59 @@ +# $Id: PKGBUILD 146216 2012-01-06 04:24:28Z dreisner $ +# Maintainer: Dave Reisner <dreisner@archlinux.org> + +pkgname=kmod +pkgver=3 +pkgrel=3 +pkgdesc="Linux kernel module handling" +arch=('i686' 'x86_64') +url="http://git.profusion.mobi/cgit.cgi/kmod.git" +license=('GPL2') +depends=('glibc' 'zlib') +options=('!libtool') +provides=('module-init-tools=3.16') +conflicts=('module-init-tools') +replaces=('module-init-tools') +source=("http://packages.profusion.mobi/$pkgname/$pkgname-$pkgver.tar.xz" + "depmod-search.conf" + "return-non-zero-on-fail.patch") +md5sums=('bc0e69f75c2ac22c091f05e166e86c5d' + '4b8cbcbc54b9029c99fd730e257d4436' + '4be6f783a7fc2d1747ccaa2536d2e88f') + +build() { + cd "$pkgname-$pkgver" + + patch -Np1 <"$srcdir/return-non-zero-on-fail.patch" + + ./configure \ + --with-rootprefix= \ + --with-rootlibdir=/lib \ + --with-zlib + + make +} + +check() { + make -C "$pkgname-$pkgver" check +} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + + # binary directories + install -dm755 "$pkgdir"/{,s}bin + + # configuration directories + install -dm755 "$pkgdir"/{etc,lib}/{depmod,modprobe}.d + + # add symlinks to kmod + ln -s /usr/bin/kmod "$pkgdir/bin/lsmod" + for tool in {ins,rm,dep}mod mod{info,probe}; do + ln -s ../usr/bin/kmod "$pkgdir/sbin/$tool" + done + + # install depmod.d file for search/ dir + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/lib/depmod.d/search.conf" +} + +# vim: ft=sh syn=sh et diff --git a/testing/kmod/depmod-search.conf b/testing/kmod/depmod-search.conf new file mode 100644 index 000000000..3feb67b05 --- /dev/null +++ b/testing/kmod/depmod-search.conf @@ -0,0 +1,5 @@ +# +# /etc/depmod.d/depmod.conf +# + +search updates extramodules built-in diff --git a/testing/kmod/return-non-zero-on-fail.patch b/testing/kmod/return-non-zero-on-fail.patch new file mode 100644 index 000000000..4802a825f --- /dev/null +++ b/testing/kmod/return-non-zero-on-fail.patch @@ -0,0 +1,30 @@ +diff --git a/tools/kmod-modinfo.c b/tools/kmod-modinfo.c +index b6af26f..8506193 100644 +--- a/tools/kmod-modinfo.c ++++ b/tools/kmod-modinfo.c +@@ -279,6 +279,12 @@ static int modinfo_alias_do(struct kmod_ctx *ctx, const char *alias) + LOG("Module alias %s not found.\n", alias); + return err; + } ++ ++ if (list == NULL) { ++ LOG("Module %s not found.\n", alias); ++ return -ENOENT; ++ } ++ + kmod_list_foreach(l, list) { + struct kmod_module *mod = kmod_module_get_module(l); + int r = modinfo_do(mod); +diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c +index 8286b9b..6ca94f2 100644 +--- a/tools/kmod-modprobe.c ++++ b/tools/kmod-modprobe.c +@@ -856,7 +856,7 @@ static int insmod_alias(struct kmod_ctx *ctx, const char *alias, const char *ext + + if (list == NULL) { + LOG("Module %s not found.\n", alias); +- return err; ++ return -ENOENT; + } + + if (use_blacklist) { |