[arch-commits] Commit in mkinitcpio/repos (3 files)

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


    Date: Tuesday, February 21, 2012 @ 21:06:52
  Author: dreisner
Revision: 150780

archrelease: copy trunk to testing-any

Added:
  mkinitcpio/repos/testing-any/
  mkinitcpio/repos/testing-any/0001-autodetect-resolve-guessed-filesystem-modules.patch
    (from rev 150779, mkinitcpio/trunk/0001-autodetect-resolve-guessed-filesystem-modules.patch)
  mkinitcpio/repos/testing-any/PKGBUILD
    (from rev 150779, mkinitcpio/trunk/PKGBUILD)

----------------------------------------------------------+
 0001-autodetect-resolve-guessed-filesystem-modules.patch |   45 +++++++++++++
 PKGBUILD                                                 |   41 +++++++++++
 2 files changed, 86 insertions(+)

Copied: mkinitcpio/repos/testing-any/0001-autodetect-resolve-guessed-filesystem-modules.patch (from rev 150779, mkinitcpio/trunk/0001-autodetect-resolve-guessed-filesystem-modules.patch)
===================================================================
--- testing-any/0001-autodetect-resolve-guessed-filesystem-modules.patch	                        (rev 0)
+++ testing-any/0001-autodetect-resolve-guessed-filesystem-modules.patch	2012-02-22 02:06:52 UTC (rev 150780)
@@ -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
+

Copied: mkinitcpio/repos/testing-any/PKGBUILD (from rev 150779, mkinitcpio/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2012-02-22 02:06:52 UTC (rev 150780)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=mkinitcpio
+pkgver=0.8.2
+pkgrel=3
+pkgdesc="Modular initramfs image creation utility"
+arch=('any')
+url="http://www.archlinux.org/"
+license=('GPL')
+depends=('mkinitcpio-busybox>=1.16.1-2' 'kmod>=3' 'util-linux>=2.20.1-2' 'libarchive' 'coreutils'
+         'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'file' 'gzip')
+optdepends=('xz: Use lzma or xz compression for the initramfs image'
+            'bzip2: Use bzip2 compression for the initramfs image'
+            '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"
+        '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
+
+  # compat symlink
+  install -dm755 "$pkgdir/sbin"
+  ln -s /usr/bin/mkinitcpio "$pkgdir/sbin/mkinitcpio"
+
+  # XXX: remove udev hooks -- they belong to the udev package
+  rm "$pkgdir"/lib/initcpio/{hooks,install}/udev
+}
+




More information about the arch-commits mailing list