[arch-commits] Commit in mkinitcpio/trunk (2 files)

Dave Reisner dreisner at archlinux.org
Wed Feb 22 02:06:45 UTC 2012


    Date: Tuesday, February 21, 2012 @ 21:06:44
  Author: dreisner
Revision: 150779

upgpkg: mkinitcpio 0.8.2-3

- backport patch to fix FS#28569

Added:
  mkinitcpio/trunk/0001-autodetect-resolve-guessed-filesystem-modules.patch
Modified:
  mkinitcpio/trunk/PKGBUILD

----------------------------------------------------------+
 0001-autodetect-resolve-guessed-filesystem-modules.patch |   45 +++++++++++++
 PKGBUILD                                                 |   16 +++-
 2 files changed, 57 insertions(+), 4 deletions(-)

Added: 0001-autodetect-resolve-guessed-filesystem-modules.patch
===================================================================
--- 0001-autodetect-resolve-guessed-filesystem-modules.patch	                        (rev 0)
+++ 0001-autodetect-resolve-guessed-filesystem-modules.patch	2012-02-22 02:06:44 UTC (rev 150779)
@@ -0,0 +1,45 @@
+From be9a42675f3ea125c9daa45986a3b58ba8bae226 Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner at archlinux.org>
+Date: Tue, 21 Feb 2012 16:47:56 -0500
+Subject: [PATCH] autodetect: resolve guessed filesystem modules
+
+Trading out modinfo for modprobe allows us to detect filesystems like
+ext2 and ext3 which might be aliased to ext4 in the case of Kconfig
+CONFIG_EXT4_USE_FOR_EXT23 being enabled. Maybe this catches other insane
+corner cases, too.
+
+Since we now treat this as possible aliases, we also need to be mindful
+of the fact that it could resolve to multiple module names. Assign the
+output as an array to respect this.
+
+Fixes FS#28569.
+
+Signed-off-by: Dave Reisner <dreisner at archlinux.org>
+---
+ install/autodetect |   10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/install/autodetect b/install/autodetect
+index 5cc908c..cc12124 100644
+--- a/install/autodetect
++++ b/install/autodetect
+@@ -7,8 +7,14 @@ build() {
+     MODULE_FILE=$workdir/autodetect_modules
+ 
+     add_if_avail() {
+-        if modinfo -k "$KERNELVERSION" "$1" &>/dev/null; then
+-            printf '%s\n' "$1" >>"$MODULE_FILE"
++        local resolved
++
++        # treat this as an alias, since ext3 might be aliased to ext4.
++        IFS=$'\n' read -rd '' -a resolved < \
++            <(modprobe -S "$KERNELVERSION" -R "$1" 2>/dev/null)
++
++        if (( ${#resolved[*]} )); then
++            printf '%s\n' "${resolved[@]}" >>"$MODULE_FILE"
+         fi
+     }
+ 
+-- 
+1.7.9.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-02-21 23:58:05 UTC (rev 150778)
+++ PKGBUILD	2012-02-22 02:06:44 UTC (rev 150779)
@@ -4,7 +4,7 @@
 
 pkgname=mkinitcpio
 pkgver=0.8.2
-pkgrel=2
+pkgrel=3
 pkgdesc="Modular initramfs image creation utility"
 arch=('any')
 url="http://www.archlinux.org/"
@@ -16,10 +16,18 @@
             'lzop: Use lzo compression for the initramfs image'
             'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
 backup=('etc/mkinitcpio.conf')
-source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz")
-md5sums=('2e0ac0c657ca7a78aa0583b3368c0e44')
-sha256sums=('9a951f9e2a158b65840f476c1b9e1e45c7b06383a90f182f76eab64bd3a398cb')
+source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"
+        '0001-autodetect-resolve-guessed-filesystem-modules.patch')
+md5sums=('2e0ac0c657ca7a78aa0583b3368c0e44'
+         '9a5f9cf5e9ca429824e927662a5095ea')
+sha256sums=('9a951f9e2a158b65840f476c1b9e1e45c7b06383a90f182f76eab64bd3a398cb'
+            '769e7a5eabb9b77802b1b55f4d123566e13c26dc4966189e4101a38069b6fe8f')
 
+build() {
+  cd "$pkgname-$pkgver"
+  patch -Np1 <"$srcdir/0001-autodetect-resolve-guessed-filesystem-modules.patch"
+}
+
 package() {
   make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
 




More information about the arch-commits mailing list