[arch-commits] Commit in kmod/repos (14 files)

Dave Reisner dreisner at archlinux.org
Sun Nov 18 03:33:34 UTC 2012


    Date: Saturday, November 17, 2012 @ 22:33:34
  Author: dreisner
Revision: 171489

db-move: moved kmod from [testing] to [core] (i686, x86_64)

Added:
  kmod/repos/core-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch
    (from rev 171488, kmod/repos/testing-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch)
  kmod/repos/core-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch
    (from rev 171488, kmod/repos/testing-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch)
  kmod/repos/core-i686/PKGBUILD
    (from rev 171488, kmod/repos/testing-i686/PKGBUILD)
  kmod/repos/core-i686/depmod-search.conf
    (from rev 171488, kmod/repos/testing-i686/depmod-search.conf)
  kmod/repos/core-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch
    (from rev 171488, kmod/repos/testing-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch)
  kmod/repos/core-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch
    (from rev 171488, kmod/repos/testing-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch)
  kmod/repos/core-x86_64/PKGBUILD
    (from rev 171488, kmod/repos/testing-x86_64/PKGBUILD)
  kmod/repos/core-x86_64/depmod-search.conf
    (from rev 171488, kmod/repos/testing-x86_64/depmod-search.conf)
Deleted:
  kmod/repos/core-i686/PKGBUILD
  kmod/repos/core-i686/depmod-search.conf
  kmod/repos/core-x86_64/PKGBUILD
  kmod/repos/core-x86_64/depmod-search.conf
  kmod/repos/testing-i686/
  kmod/repos/testing-x86_64/

-----------------------------------------------------------------------------+
 core-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch   |   43 +++
 core-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch                     |   31 ++
 core-i686/PKGBUILD                                                          |  121 +++++-----
 core-i686/depmod-search.conf                                                |   10 
 core-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch |   43 +++
 core-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch                   |   31 ++
 core-x86_64/PKGBUILD                                                        |  121 +++++-----
 core-x86_64/depmod-search.conf                                              |   10 
 8 files changed, 288 insertions(+), 122 deletions(-)

Copied: kmod/repos/core-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch (from rev 171488, kmod/repos/testing-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch)
===================================================================
--- core-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch	                        (rev 0)
+++ core-i686/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,43 @@
+From 06294621a944e4611e15ce8201df80870e052e7d Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+Date: Fri, 16 Nov 2012 11:35:30 -0200
+Subject: [PATCH 1/2] depmod: fix hash lookup by relpath instead of uncrelpath
+
+We index modules in depmod by it's uncompressed relative path, not
+relative path. We didn't notice this bug before since this function is
+only triggered if we release a module to be replaced by one of higher
+priority.
+
+Also fix a leftover log message referring to relpath instead of
+uncrelpath.
+---
+ tools/depmod.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/depmod.c b/tools/depmod.c
+index cc9346f..aafe66b 100644
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -1114,7 +1114,7 @@ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ 				      mod->uncrelpath, mod);
+ 		if (err < 0) {
+ 			ERR("hash_add_unique %s: %s\n",
+-			    mod->relpath, strerror(-err));
++			    mod->uncrelpath, strerror(-err));
+ 			hash_del(depmod->modules_by_name, mod->modname);
+ 			goto fail;
+ 		}
+@@ -1134,8 +1134,8 @@ static int depmod_module_del(struct depmod *depmod, struct mod *mod)
+ {
+ 	DBG("del %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+ 
+-	if (mod->relpath != NULL)
+-		hash_del(depmod->modules_by_uncrelpath, mod->relpath);
++	if (mod->uncrelpath != NULL)
++		hash_del(depmod->modules_by_uncrelpath, mod->uncrelpath);
+ 
+ 	hash_del(depmod->modules_by_name, mod->modname);
+ 
+-- 
+1.8.0
+

Copied: kmod/repos/core-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch (from rev 171488, kmod/repos/testing-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch)
===================================================================
--- core-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch	                        (rev 0)
+++ core-i686/0002-depmod-fix-asserting-mod-kmod-NULL.patch	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,31 @@
+From 02c64df3c2b33880b18d3f4aba9fa8e48e5ca904 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+Date: Fri, 16 Nov 2012 12:05:42 -0200
+Subject: [PATCH 2/2] depmod: fix asserting mod->kmod == NULL
+
+If we are replacing a lower priority module (due to its location), we
+already created a kmod_module, but didn't open the file for reading its
+symbols. This means mod->kmod won't be NULL, and this is just ok. Since
+all the functions freeing stuff below the previous assert already takes
+NULL into consideration, it's safe to just unref mod->kmod and let the
+right thing happens.
+---
+ tools/depmod.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/depmod.c b/tools/depmod.c
+index aafe66b..7bbdcd3 100644
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -977,7 +977,7 @@ static void mod_free(struct mod *mod)
+ {
+ 	DBG("free %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+ 	array_free_array(&mod->deps);
+-	assert(mod->kmod == NULL);
++	kmod_module_unref(mod->kmod);
+ 	kmod_module_info_free_list(mod->info_list);
+ 	kmod_module_dependency_symbols_free_list(mod->dep_sym_list);
+ 	free(mod->uncrelpath);
+-- 
+1.8.0
+

Deleted: core-i686/PKGBUILD
===================================================================
--- core-i686/PKGBUILD	2012-11-18 03:22:38 UTC (rev 171488)
+++ core-i686/PKGBUILD	2012-11-18 03:33:34 UTC (rev 171489)
@@ -1,56 +0,0 @@
-# $Id$
-# Maintainer: Dave Reisner <dreisner at archlinux.org>
-
-pkgname=kmod
-pkgver=11
-pkgrel=1
-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')
-makedepends=('gtk-doc')
-options=('!libtool')
-provides=('module-init-tools=3.16')
-conflicts=('module-init-tools')
-replaces=('module-init-tools')
-source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
-        "depmod-search.conf")
-md5sums=('607e33b0144625c2e5221e5a7df49c7a'
-         'dd62cbf62bd8f212f51ef8c43bec9a77')
-
-build() {
-  cd "$pkgname-$pkgver"
-
-  ./configure \
-    --sysconfdir=/etc \
-    --enable-gtk-doc \
-    --with-zlib
-
-  make
-}
-
-check() {
-  # testsuite is broken on 32-bit because of an unhandled EEXIST on mkdir_p
-  make -C "$pkgname-$pkgver" check || :
-}
-
-package() {
-  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
-
-  # extra directories
-  install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin"
-
-  # add symlinks to kmod
-  ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe"
-  ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod"
-
-  for tool in {ins,ls,rm}mod modinfo; 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/core-i686/PKGBUILD (from rev 171488, kmod/repos/testing-i686/PKGBUILD)
===================================================================
--- core-i686/PKGBUILD	                        (rev 0)
+++ core-i686/PKGBUILD	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+
+pkgname=kmod
+pkgver=11
+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')
+makedepends=('gtk-doc')
+options=('!libtool')
+provides=('module-init-tools=3.16')
+conflicts=('module-init-tools')
+replaces=('module-init-tools')
+source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
+        "0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch"
+        "0002-depmod-fix-asserting-mod-kmod-NULL.patch"
+        "depmod-search.conf")
+md5sums=('607e33b0144625c2e5221e5a7df49c7a'
+         '239549791aeca08a56428c27c558af7f'
+         'f39fc93d4be1e109ea73c6509ab171eb'
+         'dd62cbf62bd8f212f51ef8c43bec9a77')
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  # upstream commit 06294621a944e4611e15ce8201df80870e052e7d
+  patch -Np1 <"$srcdir/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch"
+
+  # upstream commit 02c64df3c2b33880b18d3f4aba9fa8e48e5ca904
+  patch -Np1 <"$srcdir/0002-depmod-fix-asserting-mod-kmod-NULL.patch"
+
+  ./configure \
+    --sysconfdir=/etc \
+    --enable-gtk-doc \
+    --with-zlib
+
+  make
+}
+
+check() {
+  make -C "$pkgname-$pkgver" check
+}
+
+package() {
+  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+  # extra directories
+  install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin"
+
+  # add symlinks to kmod
+  ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe"
+  ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod"
+
+  for tool in {ins,ls,rm}mod modinfo; 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

Deleted: core-i686/depmod-search.conf
===================================================================
--- core-i686/depmod-search.conf	2012-11-18 03:22:38 UTC (rev 171488)
+++ core-i686/depmod-search.conf	2012-11-18 03:33:34 UTC (rev 171489)
@@ -1,5 +0,0 @@
-#
-# /usr/lib/depmod.d/search.conf
-#
-
-search updates extramodules built-in

Copied: kmod/repos/core-i686/depmod-search.conf (from rev 171488, kmod/repos/testing-i686/depmod-search.conf)
===================================================================
--- core-i686/depmod-search.conf	                        (rev 0)
+++ core-i686/depmod-search.conf	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,5 @@
+#
+# /usr/lib/depmod.d/search.conf
+#
+
+search updates extramodules built-in

Copied: kmod/repos/core-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch (from rev 171488, kmod/repos/testing-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch)
===================================================================
--- core-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch	                        (rev 0)
+++ core-x86_64/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,43 @@
+From 06294621a944e4611e15ce8201df80870e052e7d Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+Date: Fri, 16 Nov 2012 11:35:30 -0200
+Subject: [PATCH 1/2] depmod: fix hash lookup by relpath instead of uncrelpath
+
+We index modules in depmod by it's uncompressed relative path, not
+relative path. We didn't notice this bug before since this function is
+only triggered if we release a module to be replaced by one of higher
+priority.
+
+Also fix a leftover log message referring to relpath instead of
+uncrelpath.
+---
+ tools/depmod.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/depmod.c b/tools/depmod.c
+index cc9346f..aafe66b 100644
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -1114,7 +1114,7 @@ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ 				      mod->uncrelpath, mod);
+ 		if (err < 0) {
+ 			ERR("hash_add_unique %s: %s\n",
+-			    mod->relpath, strerror(-err));
++			    mod->uncrelpath, strerror(-err));
+ 			hash_del(depmod->modules_by_name, mod->modname);
+ 			goto fail;
+ 		}
+@@ -1134,8 +1134,8 @@ static int depmod_module_del(struct depmod *depmod, struct mod *mod)
+ {
+ 	DBG("del %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+ 
+-	if (mod->relpath != NULL)
+-		hash_del(depmod->modules_by_uncrelpath, mod->relpath);
++	if (mod->uncrelpath != NULL)
++		hash_del(depmod->modules_by_uncrelpath, mod->uncrelpath);
+ 
+ 	hash_del(depmod->modules_by_name, mod->modname);
+ 
+-- 
+1.8.0
+

Copied: kmod/repos/core-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch (from rev 171488, kmod/repos/testing-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch)
===================================================================
--- core-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch	                        (rev 0)
+++ core-x86_64/0002-depmod-fix-asserting-mod-kmod-NULL.patch	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,31 @@
+From 02c64df3c2b33880b18d3f4aba9fa8e48e5ca904 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+Date: Fri, 16 Nov 2012 12:05:42 -0200
+Subject: [PATCH 2/2] depmod: fix asserting mod->kmod == NULL
+
+If we are replacing a lower priority module (due to its location), we
+already created a kmod_module, but didn't open the file for reading its
+symbols. This means mod->kmod won't be NULL, and this is just ok. Since
+all the functions freeing stuff below the previous assert already takes
+NULL into consideration, it's safe to just unref mod->kmod and let the
+right thing happens.
+---
+ tools/depmod.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/depmod.c b/tools/depmod.c
+index aafe66b..7bbdcd3 100644
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -977,7 +977,7 @@ static void mod_free(struct mod *mod)
+ {
+ 	DBG("free %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+ 	array_free_array(&mod->deps);
+-	assert(mod->kmod == NULL);
++	kmod_module_unref(mod->kmod);
+ 	kmod_module_info_free_list(mod->info_list);
+ 	kmod_module_dependency_symbols_free_list(mod->dep_sym_list);
+ 	free(mod->uncrelpath);
+-- 
+1.8.0
+

Deleted: core-x86_64/PKGBUILD
===================================================================
--- core-x86_64/PKGBUILD	2012-11-18 03:22:38 UTC (rev 171488)
+++ core-x86_64/PKGBUILD	2012-11-18 03:33:34 UTC (rev 171489)
@@ -1,56 +0,0 @@
-# $Id$
-# Maintainer: Dave Reisner <dreisner at archlinux.org>
-
-pkgname=kmod
-pkgver=11
-pkgrel=1
-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')
-makedepends=('gtk-doc')
-options=('!libtool')
-provides=('module-init-tools=3.16')
-conflicts=('module-init-tools')
-replaces=('module-init-tools')
-source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
-        "depmod-search.conf")
-md5sums=('607e33b0144625c2e5221e5a7df49c7a'
-         'dd62cbf62bd8f212f51ef8c43bec9a77')
-
-build() {
-  cd "$pkgname-$pkgver"
-
-  ./configure \
-    --sysconfdir=/etc \
-    --enable-gtk-doc \
-    --with-zlib
-
-  make
-}
-
-check() {
-  # testsuite is broken on 32-bit because of an unhandled EEXIST on mkdir_p
-  make -C "$pkgname-$pkgver" check || :
-}
-
-package() {
-  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
-
-  # extra directories
-  install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin"
-
-  # add symlinks to kmod
-  ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe"
-  ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod"
-
-  for tool in {ins,ls,rm}mod modinfo; 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/core-x86_64/PKGBUILD (from rev 171488, kmod/repos/testing-x86_64/PKGBUILD)
===================================================================
--- core-x86_64/PKGBUILD	                        (rev 0)
+++ core-x86_64/PKGBUILD	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+
+pkgname=kmod
+pkgver=11
+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')
+makedepends=('gtk-doc')
+options=('!libtool')
+provides=('module-init-tools=3.16')
+conflicts=('module-init-tools')
+replaces=('module-init-tools')
+source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
+        "0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch"
+        "0002-depmod-fix-asserting-mod-kmod-NULL.patch"
+        "depmod-search.conf")
+md5sums=('607e33b0144625c2e5221e5a7df49c7a'
+         '239549791aeca08a56428c27c558af7f'
+         'f39fc93d4be1e109ea73c6509ab171eb'
+         'dd62cbf62bd8f212f51ef8c43bec9a77')
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  # upstream commit 06294621a944e4611e15ce8201df80870e052e7d
+  patch -Np1 <"$srcdir/0001-depmod-fix-hash-lookup-by-relpath-instead-of-uncrelp.patch"
+
+  # upstream commit 02c64df3c2b33880b18d3f4aba9fa8e48e5ca904
+  patch -Np1 <"$srcdir/0002-depmod-fix-asserting-mod-kmod-NULL.patch"
+
+  ./configure \
+    --sysconfdir=/etc \
+    --enable-gtk-doc \
+    --with-zlib
+
+  make
+}
+
+check() {
+  make -C "$pkgname-$pkgver" check
+}
+
+package() {
+  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+  # extra directories
+  install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin"
+
+  # add symlinks to kmod
+  ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe"
+  ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod"
+
+  for tool in {ins,ls,rm}mod modinfo; 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

Deleted: core-x86_64/depmod-search.conf
===================================================================
--- core-x86_64/depmod-search.conf	2012-11-18 03:22:38 UTC (rev 171488)
+++ core-x86_64/depmod-search.conf	2012-11-18 03:33:34 UTC (rev 171489)
@@ -1,5 +0,0 @@
-#
-# /usr/lib/depmod.d/search.conf
-#
-
-search updates extramodules built-in

Copied: kmod/repos/core-x86_64/depmod-search.conf (from rev 171488, kmod/repos/testing-x86_64/depmod-search.conf)
===================================================================
--- core-x86_64/depmod-search.conf	                        (rev 0)
+++ core-x86_64/depmod-search.conf	2012-11-18 03:33:34 UTC (rev 171489)
@@ -0,0 +1,5 @@
+#
+# /usr/lib/depmod.d/search.conf
+#
+
+search updates extramodules built-in




More information about the arch-commits mailing list