summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author Nikos Giotis <nikos.giotis@gmail.com>2019-04-12 22:44:58 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2019-04-12 22:44:58 +0700
commit99822beef8cc3dca96457dd2aecd0723032b84d2 (patch)
treec9fb81818850ed976629440864382646dffa46fd /system
parenta1e55b482a37997927da498fc15124ba1ad79a71 (diff)
downloadslackbuilds-99822beef8cc3dca96457dd2aecd0723032b84d2.tar.gz
slackbuilds-99822beef8cc3dca96457dd2aecd0723032b84d2.tar.xz
system/multipath-tools: Updated for version 0.7.8.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/multipath-tools/0002-multipathd-add-ncurses-to-linker.patch11
-rw-r--r--system/multipath-tools/README3
-rw-r--r--system/multipath-tools/README.SLACKWARE60
-rw-r--r--system/multipath-tools/doinst.sh26
-rw-r--r--system/multipath-tools/libmpathpersist.remove.empty.dir.patch.gzbin322 -> 0 bytes
-rw-r--r--system/multipath-tools/multipath-tools.SlackBuild40
-rw-r--r--system/multipath-tools/multipath-tools.info10
-rw-r--r--system/multipath-tools/multipath.conf.new4
-rw-r--r--system/multipath-tools/multipathd.slackware.patch.gzbin374 -> 0 bytes
-rw-r--r--system/multipath-tools/rc.multipathd.new44
-rw-r--r--system/multipath-tools/rcdir.patch.gzbin250 -> 0 bytes
-rw-r--r--system/multipath-tools/slack-desc2
12 files changed, 181 insertions, 19 deletions
diff --git a/system/multipath-tools/0002-multipathd-add-ncurses-to-linker.patch b/system/multipath-tools/0002-multipathd-add-ncurses-to-linker.patch
new file mode 100644
index 0000000000..f68c4af0b3
--- /dev/null
+++ b/system/multipath-tools/0002-multipathd-add-ncurses-to-linker.patch
@@ -0,0 +1,11 @@
+--- multipathd/Makefile.orig 2017-11-10 17:52:36.070562376 +0200
++++ multipathd/Makefile 2017-11-10 18:10:47.854895039 +0200
+@@ -11,7 +11,7 @@ CFLAGS += $(BIN_CFLAGS) -I$(multipathdir
+ LDFLAGS += $(BIN_LDFLAGS)
+ LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \
+ -L$(mpathcmddir) -lmpathcmd -ludev -ldl -lurcu -lpthread \
+- -ldevmapper -lreadline
++ -ldevmapper -lreadline -lncurses
+
+ ifdef SYSTEMD
+ CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)
diff --git a/system/multipath-tools/README b/system/multipath-tools/README
index d6b90af8ed..e56ff36245 100644
--- a/system/multipath-tools/README
+++ b/system/multipath-tools/README
@@ -1 +1,4 @@
Utilities used to drive the Device Mapper multipathing driver
+
+See README.SLACKWARE for details on how to configure and
+start multipathd.
diff --git a/system/multipath-tools/README.SLACKWARE b/system/multipath-tools/README.SLACKWARE
new file mode 100644
index 0000000000..6f814df9af
--- /dev/null
+++ b/system/multipath-tools/README.SLACKWARE
@@ -0,0 +1,60 @@
+README.SLACKWARE
+
+First you need to add this to /etc/rc.d/rc.modules.local
+
+ /sbin/modprobe -v dm-multipath
+
+Also add any modules that may be needed for any storage devices
+that may be not be configured up by udev, like eg. qla-2xxxx.
+
+To use multipath, you need to start the multipath daemon.
+The recommended way is to add the following to /etc/rc.d/rc.local
+
+ if [ -x /etc/rc.d/rc.multipathd ]; then
+ /etc/rc.d/rc.multipathd start
+ fi
+
+After starting multipathd you can see the multipaths like this
+
+ multipath -ll
+
+You have to have the paths connected and presented before
+seeing them with the above command. For some storage devices
+after presenting them to the host, a host reboot may be
+required for the devices and the paths to be show correctly.
+This also applies to any volume increase; a host reboot may
+be needed to pick up the new size. It seems to be depended
+on the storage in hand.
+
+To blackist any devices that you don't want to be handled by
+multipath like local hardware raid controllers, to your
+/etc/multipath.conf and entry like this
+
+ blacklist {
+ wwid 435456...
+ }
+
+To setup aliases to multipath devices add entries like these
+to /etc/multipath.conf
+
+ multipaths {
+ multipath {
+ wwid "534535..."
+ alias "storage0"
+ }
+ }
+
+Use the following to reload the configuration
+
+ multipath -r
+
+Then the device will be available under /dev/mapper/storage0
+You can create partitions on this like this
+
+ gdisk /dev/mapper/storage0
+
+To make an xfs filesystem on the first partition
+
+ mkfs.xfs /dev/mapper/storage0-part1
+
+See the manpages for more details.
diff --git a/system/multipath-tools/doinst.sh b/system/multipath-tools/doinst.sh
new file mode 100644
index 0000000000..b845f6b1b1
--- /dev/null
+++ b/system/multipath-tools/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.multipathd.new
+preserve_perms etc/multipath.conf.new
diff --git a/system/multipath-tools/libmpathpersist.remove.empty.dir.patch.gz b/system/multipath-tools/libmpathpersist.remove.empty.dir.patch.gz
deleted file mode 100644
index b288f4f235..0000000000
--- a/system/multipath-tools/libmpathpersist.remove.empty.dir.patch.gz
+++ /dev/null
Binary files differ
diff --git a/system/multipath-tools/multipath-tools.SlackBuild b/system/multipath-tools/multipath-tools.SlackBuild
index e4428d9217..7148af368b 100644
--- a/system/multipath-tools/multipath-tools.SlackBuild
+++ b/system/multipath-tools/multipath-tools.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2014 Nikos Yotis <nikos.giotis@gmail.com>
+# Copyright 2014,2018 Nikos Yotis <nikos.giotis@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -19,8 +19,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 22-Oct-2018
+# Updated for version 0.7.8
+
PRGNAM=multipath-tools
-VERSION=${VERSION:-0.5.0}
+VERSION=${VERSION:-0.7.8}
+SRCNAM="index.html?p=multipath-tools%2F.git;a=snapshot;sf=tgz;h=refs%2Ftags%2F$VERSION"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -57,13 +61,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$SRCNAM
cd $PRGNAM-$VERSION
-# Patches for slackware compatibility
-zcat $CWD/multipathd.slackware.patch.gz | patch -p0 --verbose
-zcat $CWD/rcdir.patch.gz | patch -p0 --verbose
-zcat $CWD/libmpathpersist.remove.empty.dir.patch.gz | patch -p0 --verbose
+# Patch for slackware compatibility
+cat $CWD/0002-multipathd-add-ncurses-to-linker.patch | patch -p0 --verbose
chown -R root:root .
find -L . \
@@ -75,24 +77,36 @@ find -L . \
# Build
cd $TMP/$PRGNAM-$VERSION
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make
-mkdir -p $PKG/usr/bin
make install DESTDIR=$PKG
+# Move everything in place
+mv $PKG/usr/lib/ $PKG/
+
+# Manpages
mv $PKG/usr/share/man $PKG/usr/
+rm -rf $PKG/usr/share
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-rm -rf $PKG/usr/share
-(
- cd $PKG/lib${LIBDIRSUFFIX}
- ln -sf libmpathpersist.so.0 libmpathpersist.so
-)
+# init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.multipathd.new > $PKG/etc/rc.d/rc.multipathd.new
+chmod 755 $PKG/etc/rc.d/rc.multipathd.new
+
+# default config
+cat $CWD/multipath.conf.new > $PKG/etc/multipath.conf.new
+chmod 644 $PKG/etc/multipath.conf.new
+# Docs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING README README.alua $CWD/README.SLACKWARE \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/multipath-tools/multipath-tools.info b/system/multipath-tools/multipath-tools.info
index febf070bee..54ce6d7b3a 100644
--- a/system/multipath-tools/multipath-tools.info
+++ b/system/multipath-tools/multipath-tools.info
@@ -1,10 +1,10 @@
PRGNAM="multipath-tools"
-VERSION="0.5.0"
+VERSION="0.7.8"
HOMEPAGE="http://christophe.varoqui.free.fr/"
-DOWNLOAD="http://christophe.varoqui.free.fr/multipath-tools/multipath-tools-0.5.0.tar.bz2"
-MD5SUM="faf261d4cc717bf4c979557dc7bf5f52"
+DOWNLOAD="https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;sf=tgz;h=refs/tags/0.7.8"
+MD5SUM="f8d0faed2913bc725c107b4f84f22a3a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="liburcu"
MAINTAINER="Nikos Giotis"
-EMAIL="nikos.giotis@gmail.com" \ No newline at end of file
+EMAIL="nikos.giotis@gmail.com"
diff --git a/system/multipath-tools/multipath.conf.new b/system/multipath-tools/multipath.conf.new
new file mode 100644
index 0000000000..8cdf633c2b
--- /dev/null
+++ b/system/multipath-tools/multipath.conf.new
@@ -0,0 +1,4 @@
+defaults {
+ find_multipaths yes
+}
+
diff --git a/system/multipath-tools/multipathd.slackware.patch.gz b/system/multipath-tools/multipathd.slackware.patch.gz
deleted file mode 100644
index 3d62dd673d..0000000000
--- a/system/multipath-tools/multipathd.slackware.patch.gz
+++ /dev/null
Binary files differ
diff --git a/system/multipath-tools/rc.multipathd.new b/system/multipath-tools/rc.multipathd.new
new file mode 100644
index 0000000000..e62690fa8f
--- /dev/null
+++ b/system/multipath-tools/rc.multipathd.new
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# This is usually needed for detecting multipaths. The default 5 seems
+# to work, but adjustment per case may be needed.
+SLEEP=5
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/sbin/multipathd
+
+test -x $DAEMON || exit 0
+
+case "$1" in
+ start)
+ pgrep -f $DAEMON >/dev/null
+ if [ $? = 0 ]; then
+ echo 'multipathd is already running'
+ exit 1
+ fi
+ echo -n "Starting multipath daemon: $DAEMON ."
+ $DAEMON
+ echo -n '.'; sleep $SLEEP; echo -n '. '
+ pgrep -f $DAEMON >/dev/null
+ if [ $? = 0 ]; then
+ echo "ok"
+ else
+ echo "error!"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping multipath daemon: multipathd ... "
+ $DAEMON shutdown || echo "daemon is not running"
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/multipathd {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/system/multipath-tools/rcdir.patch.gz b/system/multipath-tools/rcdir.patch.gz
deleted file mode 100644
index 9547e76335..0000000000
--- a/system/multipath-tools/rcdir.patch.gz
+++ /dev/null
Binary files differ
diff --git a/system/multipath-tools/slack-desc b/system/multipath-tools/slack-desc
index 7d06cfb209..717e2c511c 100644
--- a/system/multipath-tools/slack-desc
+++ b/system/multipath-tools/slack-desc
@@ -10,9 +10,9 @@ multipath-tools: multipath-tools (Utilities to drive Device Mapper multipath dri
multipath-tools:
multipath-tools: This project is used to drive the Device Mapper multipathing driver.
multipath-tools:
+multipath-tools: Home: http://christophe.varoqui.free.fr/
multipath-tools:
multipath-tools:
-multipath-tools: Home: http://christophe.varoqui.free.fr/
multipath-tools:
multipath-tools:
multipath-tools: