summaryrefslogtreecommitdiff
path: root/pcr/multipath-tools
diff options
context:
space:
mode:
authorEsteban Carnevale <alfplayer@mailoo.org>2014-04-24 18:39:54 -0300
committerEsteban Carnevale <alfplayer@mailoo.org>2014-04-24 18:39:54 -0300
commit10297249275ab298544c9e34b49e8b61a6ad448c (patch)
treebce664d8e1470bc268a9c86932af2a2feaa2b7e6 /pcr/multipath-tools
parentd22b7c00d202a04dfb09ba662bcabd501a836c7f (diff)
multipath-tools-0.5.0-1: add new package to [pcr]
Diffstat (limited to 'pcr/multipath-tools')
-rw-r--r--pcr/multipath-tools/PKGBUILD56
-rw-r--r--pcr/multipath-tools/blacklist-cciss-devices.patch30
-rw-r--r--pcr/multipath-tools/buffer-overflows.patch13
-rw-r--r--pcr/multipath-tools/multipath-tools.install9
4 files changed, 108 insertions, 0 deletions
diff --git a/pcr/multipath-tools/PKGBUILD b/pcr/multipath-tools/PKGBUILD
new file mode 100644
index 000000000..b497d0f60
--- /dev/null
+++ b/pcr/multipath-tools/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Justin Dray <justin@dray.be>
+# Contributor: Patrick McCarty <pnorcks at gmail dot com>
+# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Contributor: Thomas S Hatch <thatch45 ar gmail dot com>
+# Contributor: Michael P <ptchinster@archlinux.us>
+# Contributor: Matt Heagney <matt@heagney.com>
+
+pkgname=multipath-tools
+pkgver=0.5.0
+pkgrel=1
+pkgdesc='Multipath tools for Linux (including kpartx)'
+arch=('i686' 'x86_64')
+url="http://christophe.varoqui.free.fr/"
+license=('GPL2')
+depends=('libaio' 'device-mapper')
+conflicts=('multipath-tools-git')
+backup=('etc/multipath.conf')
+install=multipath-tools.install
+options=(!emptydirs)
+source=(http://christophe.varoqui.free.fr/multipath-tools/$pkgname-$pkgver.tar.bz2
+ buffer-overflows.patch
+ blacklist-cciss-devices.patch)
+md5sums=('faf261d4cc717bf4c979557dc7bf5f52'
+ '869942bdd31decc696f9cf4af24df65b'
+ 'c81422ccf5fd5ca6208dfbdd66ff323c')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/buffer-overflows.patch"
+ patch -Np1 -i "${srcdir}/blacklist-cciss-devices.patch"
+
+ sed -i 's|/etc/udev/rules.d|/usr/lib/udev|g' Makefile.inc kpartx/Makefile kpartx/kpartx.rules
+ sed -i 's|${prefix}/lib/udev|${prefix}/usr/lib/udev|g' Makefile.inc
+ sed -i 's|/sbin|/usr/bin|g' Makefile.inc multipathd/multipathd.service
+ sed -i '/Before/d' multipathd/multipathd.service
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make LIB="/usr/lib" \
+ DESTDIR="${pkgdir}" \
+ install
+
+ install -d "${pkgdir}/usr/share/multipath/examples"
+ install -Dm644 "multipath.conf.annotated" "${pkgdir}/usr/share/multipath/examples/multipath.conf.annotated"
+ install -Dm644 "multipath.conf.defaults" "${pkgdir}/usr/share/multipath/examples/multipath.conf.defaults"
+ install -Dm644 "multipath.conf.synthetic" "${pkgdir}/usr/share/multipath/examples/multipath.conf.synthetic"
+ install -Dm644 "multipath.conf.defaults" "${pkgdir}/etc/multipath.conf"
+ rm "${pkgdir}/usr/lib/libmpathpersist.so"
+ ln -s "${pkgdir}/usr/lib/libmpathpersist.so.0" "libmpathpersist.so"
+}
diff --git a/pcr/multipath-tools/blacklist-cciss-devices.patch b/pcr/multipath-tools/blacklist-cciss-devices.patch
new file mode 100644
index 000000000..30a4400a7
--- /dev/null
+++ b/pcr/multipath-tools/blacklist-cciss-devices.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Fri, 3 Oct 2008 12:39:48 +0200
+Subject: [PATCH] blacklist cciss devices
+
+cciss support isn't complete in 0.4.8 and the half functioning causes
+problems in d-i among other things.
+Closes: #500991
+---
+ libmultipath/blacklist.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+
+diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
+index 79ddcde..6d0a0ad 100644
+--- a/libmultipath/blacklist.c
++++ b/libmultipath/blacklist.c
+@@ -182,6 +182,13 @@ setup_default_blist (struct config * conf)
+ if (store_ble(conf->elist_property, str, ORIGIN_DEFAULT))
+ return 1;
+
++ str = STRDUP("^cciss!c[0-9]d[0-9]*");
++ if (!str)
++ return 1;
++ if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
++ return 1;
++
++
+ vector_foreach_slot (conf->hwtable, hwe, i) {
+ if (hwe->bl_product) {
+ if (_blacklist_device(conf->blist_device, hwe->vendor, \ No newline at end of file
diff --git a/pcr/multipath-tools/buffer-overflows.patch b/pcr/multipath-tools/buffer-overflows.patch
new file mode 100644
index 000000000..7d84ea91c
--- /dev/null
+++ b/pcr/multipath-tools/buffer-overflows.patch
@@ -0,0 +1,13 @@
+diff --git a/libmultipath/prioritizers/hds.c b/libmultipath/prioritizers/hds.c
+index f748707..1cec8a7 100644
+--- a/libmultipath/prioritizers/hds.c
++++ b/libmultipath/prioritizers/hds.c
+@@ -125,7 +125,7 @@ int hds_modular_prio (const char *dev, int fd)
+ return -1;
+ }
+
+- snprintf (vendor, 9, "%.8s", inqBuffp + 8);
++ snprintf (vendor, 8, "%.8s", inqBuffp + 8);
+ snprintf (product, 17, "%.16s", inqBuffp + 16);
+ snprintf (serial, 5, "%.4s", inqBuffp + 40);
+ snprintf (ldev, 5, "%.4s", inqBuffp + 44); \ No newline at end of file
diff --git a/pcr/multipath-tools/multipath-tools.install b/pcr/multipath-tools/multipath-tools.install
new file mode 100644
index 000000000..8ef2efaca
--- /dev/null
+++ b/pcr/multipath-tools/multipath-tools.install
@@ -0,0 +1,9 @@
+post_install() {
+
+ cat <<-EOF
+ * For full functonality ensure that the dm_multipath kernel module is loaded"
+ * Make sure to create /etc/multipath.conf based off of the defaults found in
+ /usr/share/multipath/examples
+ EOF
+
+}