summaryrefslogtreecommitdiff
path: root/testing/dmraid
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-07-01 23:11:14 +0000
committerroot <root@rshg047.dnsready.net>2011-07-01 23:11:14 +0000
commita81bc5be2e3672119ca0313a1fde10397a31211e (patch)
treedf4a74a90bd4186a7aab0c935caa8c0a469b9c23 /testing/dmraid
parent76400556d9e8a5dedc692487c13b76a541813a23 (diff)
Fri Jul 1 23:11:14 UTC 2011
Diffstat (limited to 'testing/dmraid')
-rw-r--r--testing/dmraid/PKGBUILD39
-rw-r--r--testing/dmraid/dmraid.install14
-rw-r--r--testing/dmraid/dmraid_hook19
-rw-r--r--testing/dmraid/dmraid_install19
4 files changed, 91 insertions, 0 deletions
diff --git a/testing/dmraid/PKGBUILD b/testing/dmraid/PKGBUILD
new file mode 100644
index 000000000..5af91a2ec
--- /dev/null
+++ b/testing/dmraid/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 129977 2011-06-30 18:03:08Z thomas $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+#Contributor: Urs Wolfer <uwolfer @ fwo.ch>
+
+pkgname=dmraid
+pkgver=1.0.0.rc16.3
+pkgrel=2
+pkgdesc="Device mapper RAID interface"
+url="http://people.redhat.com/~heinzm/sw/dmraid/"
+conflicts=('mkinitcpio<0.7')
+depends=('device-mapper>=2.0.54')
+arch=('i686' 'x86_64')
+license=('GPL')
+source=(#ftp://ftp.archlinux.org/other/dmraid/$pkgname-$pkgver.tar.bz2
+ http://people.redhat.com/~heinzm/sw/dmraid/src/$pkgname-1.0.0.rc16-3.tar.bz2
+ dmraid_install
+ dmraid_hook)
+install=dmraid.install
+md5sums=('819338fcef98e8e25819f0516722beeb'
+ 'bf6c61a11dbbb40d5152835075c9f438'
+ '2a1ef82fb32f065ee560dceef736475e')
+
+build() {
+ cd "$srcdir"/$pkgname/1.0.0.rc16-3/$pkgname
+ ./configure --enable-led --enable-intel_led
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname/1.0.0.rc16-3/$pkgname
+ make DESTDIR="$pkgdir" prefix=/ libdir=/lib mandir=/usr/share/man includedir=/usr/include install
+ mkdir -p "$pkgdir"/var/lock/dmraid
+ chmod 1777 "$pkgdir"/var/lock/
+ install -D -m644 "$srcdir"/dmraid_install "$pkgdir"/lib/initcpio/install/dmraid
+ install -D -m644 "$srcdir"/dmraid_hook "$pkgdir"/lib/initcpio/hooks/dmraid
+ # fix permissions
+ chmod 644 "$pkgdir"/lib/libdmraid.a
+ chmod 644 "$pkgdir"/usr/include/dmraid/*
+}
diff --git a/testing/dmraid/dmraid.install b/testing/dmraid/dmraid.install
new file mode 100644
index 000000000..64899e785
--- /dev/null
+++ b/testing/dmraid/dmraid.install
@@ -0,0 +1,14 @@
+post_upgrade() {
+ if [ "$(vercmp $2 1.0.0.rc15)" -lt 0 ]; then
+ # important upgrade notice
+ echo ">>>"
+ echo ">>> IMPORTANT DMRAID UPGRADE NOTICE"
+ echo ">>> -------------------------------"
+ echo ">>> Version 1.0.0.rc15 and greater introduce a new name scheme:"
+ echo ">>> You need to add an additional 'p' in front of your number."
+ echo ">>> e.g. <yourname><number> --> <yourname>p<number>"
+ echo ">>> firsthd1 --> firsthdp1"
+ echo ">>> Please change your bootloader and fstab accordingly."
+ echo ">>>"
+ fi
+}
diff --git a/testing/dmraid/dmraid_hook b/testing/dmraid/dmraid_hook
new file mode 100644
index 000000000..6219a718a
--- /dev/null
+++ b/testing/dmraid/dmraid_hook
@@ -0,0 +1,19 @@
+# vim: set ft=sh:
+run_hook ()
+{
+ /sbin/modprobe -q dm-mod >/dev/null 2>&1
+ /sbin/modprobe -q dm-mirror >/dev/null 2>&1
+ if [ -e "/sys/class/misc/device-mapper" ]; then
+ if [ ! -e "/dev/mapper/control" ]; then
+ mkdir /dev/mapper
+ mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
+ fi
+ msg ":: Activating dmraid arrays..."
+ # prevent any event monitoring calls with -I
+ if [ "${quiet}" = "y" ]; then
+ /sbin/dmraid -ay -I -Z >/dev/null
+ else
+ /sbin/dmraid -ay -I -Z
+ fi
+ fi
+}
diff --git a/testing/dmraid/dmraid_install b/testing/dmraid/dmraid_install
new file mode 100644
index 000000000..eeb9e0893
--- /dev/null
+++ b/testing/dmraid/dmraid_install
@@ -0,0 +1,19 @@
+# vim: set ft=sh:
+
+build()
+{
+ MODULES=" dm-mod dm-mirror "
+ BINARIES="/sbin/dmraid /sbin/dmsetup"
+ FILES=""
+ SCRIPT="dmraid"
+ add_file "/lib/udev/rules.d/10-dm.rules"
+ add_file "/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/lib/udev/rules.d/95-dm-notify.rules"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for a dmraid root device.
+HELPEOF
+}