[arch-commits] Commit in btrfs-progs/trunk (4 files)

Tom Gundersen tomegun at archlinux.org
Wed Oct 3 23:03:18 UTC 2012


    Date: Wednesday, October 3, 2012 @ 19:03:17
  Author: tomegun
Revision: 167941

upgpkg: btrfs-progs 0.19.20120904-6

add back the btrfs initcpio hook as requested by dave, this now only deals with the non-udev case

Added:
  btrfs-progs/trunk/initcpio-hook-btrfs
  btrfs-progs/trunk/initcpio-install-btrfs
Modified:
  btrfs-progs/trunk/PKGBUILD
  btrfs-progs/trunk/btrfs.install

------------------------+
 PKGBUILD               |   14 ++++++++++++--
 btrfs.install          |    1 -
 initcpio-hook-btrfs    |   10 ++++++++++
 initcpio-install-btrfs |   15 +++++++++++++++
 4 files changed, 37 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-10-03 22:37:00 UTC (rev 167940)
+++ PKGBUILD	2012-10-03 23:03:17 UTC (rev 167941)
@@ -13,12 +13,20 @@
 conflicts=('btrfs-progs-unstable')
 provides=('btrfs-progs-unstable')
 license=('GPL2')
-source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz)
+source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz
+	initcpio-install-btrfs
+	initcpio-hook-btrfs)
 install=btrfs.install
 
 build() {
    cd $srcdir/$pkgname-$pkgver
    make CFLAGS="$CFLAGS"
+
+   # install mkinitcpio hooks
+   install -Dm644 "$srcdir/initcpio-install-btrfs" \
+     "$pkgdir/usr/lib/initcpio/install/btrfs"
+   install -Dm644 "$srcdir/initcpio-hook-btrfs" \
+     "$pkgdir/usr/lib/initcpio/hooks/btrfs"
 }
 
 package() {
@@ -30,4 +38,6 @@
    mkdir -p ${pkgdir}/sbin
    ln -sf /usr/bin/btrfs ${pkgdir}/sbin/btrfs
 }
-md5sums=('d9c96e670fac7c2098a9e7ef98d4b2e2')
+md5sums=('d9c96e670fac7c2098a9e7ef98d4b2e2'
+         '2d3df276f80bb09813f56a56d6f93ddd'
+         '9fb35142755b477a96cb7292f3d64839')

Modified: btrfs.install
===================================================================
--- btrfs.install	2012-10-03 22:37:00 UTC (rev 167940)
+++ btrfs.install	2012-10-03 23:03:17 UTC (rev 167941)
@@ -3,7 +3,6 @@
 post_upgrade() {
   if [ "$(vercmp 0.19.20120904-6 "$2")" -eq 1 ]; then
     echo "btrfs multi-device support now relies on linux 3.6 or later"
-    echo "the btrfs mkinitcpio hook has now been replaced by the udev hook"
   fi
 }
 

Added: initcpio-hook-btrfs
===================================================================
--- initcpio-hook-btrfs	                        (rev 0)
+++ initcpio-hook-btrfs	2012-10-03 23:03:17 UTC (rev 167941)
@@ -0,0 +1,10 @@
+#!/usr/bin/ash
+
+run_hook() {
+    # if udevd is running, this is done async by add/change events
+    if [ "$udevd_running" -ne 1 ]; then
+        btrfs device scan
+    fi
+}
+
+# vim: set ft=sh ts=4 sw=4 et:

Added: initcpio-install-btrfs
===================================================================
--- initcpio-install-btrfs	                        (rev 0)
+++ initcpio-install-btrfs	2012-10-03 23:03:17 UTC (rev 167941)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+build() {
+    add_module btrfs
+    add_binary btrfs
+    add_runscript
+}
+
+help() {
+    cat <<HELPEOF
+This hook provides support for multi-device btrfs volumes, in the absence of udev.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:




More information about the arch-commits mailing list