diff options
author | root <root@rshg054.dnsready.net> | 2012-05-28 00:02:35 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-05-28 00:02:35 +0000 |
commit | 89dd7b5f30d48c708092a71b1c8285090fe91505 (patch) | |
tree | fb3a22f789121b955ff0fce7ec8d2f8c8886579b /community-testing | |
parent | 1f45ad8e3f17397e2f44e68ef9a0d860091eea9e (diff) |
Mon May 28 00:02:35 UTC 2012
Diffstat (limited to 'community-testing')
15 files changed, 976 insertions, 0 deletions
diff --git a/community-testing/conntrack-tools/01-config-file-path.patch b/community-testing/conntrack-tools/01-config-file-path.patch new file mode 100644 index 000000000..8512cc9ab --- /dev/null +++ b/community-testing/conntrack-tools/01-config-file-path.patch @@ -0,0 +1,11 @@ +--- a/include/conntrackd.h 2012-05-26 15:29:15.630027223 +0200 ++++ b/include/conntrackd.h 2012-05-27 02:26:59.426811589 +0200 +@@ -50,7 +50,7 @@ + #define EXP_DUMP_INT_XML 47 /* dump internal cache in XML */ + #define EXP_DUMP_EXT_XML 48 /* dump external cache in XML */ + +-#define DEFAULT_CONFIGFILE "/etc/conntrackd/conntrackd.conf" ++#define DEFAULT_CONFIGFILE "/etc/conntrackd.conf" + #define DEFAULT_LOCKFILE "/var/lock/conntrackd.lock" + #define DEFAULT_LOGFILE "/var/log/conntrackd.log" + #define DEFAULT_STATS_LOGFILE "/var/log/conntrackd-stats.log" diff --git a/community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch b/community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch new file mode 100644 index 000000000..746934994 --- /dev/null +++ b/community-testing/conntrack-tools/02-fix-compilation-of-timeout-extension.patch @@ -0,0 +1,33 @@ +From 18efbc802479ce042378dc0cccc7577e1c6afa41 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso <pablo@netfilter.org> +Date: Sat, 26 May 2012 20:58:16 +0200 +Subject: [PATCH] nfct: fix compilation of timeout extension +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +nfct-extensions/timeout.c: In function ânfct_timeout_cbâ: +nfct-extensions/timeout.c:99:2: warning: passing argument 4 of ânfct_timeout_snprintfâ makes integer from pointer without a cast [enabled by default] +/usr/include/libnetfilter_cttimeout/libnetfilter_cttimeout.h:114:5: note: expected âunsigned intâ but argument is of type âstruct nfct_timeout *â + +Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> +--- + src/nfct-extensions/timeout.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/nfct-extensions/timeout.c b/src/nfct-extensions/timeout.c +index a1a5c52..5b32023 100644 +--- a/src/nfct-extensions/timeout.c ++++ b/src/nfct-extensions/timeout.c +@@ -96,7 +96,7 @@ static int nfct_timeout_cb(const struct nlmsghdr *nlh, void *data) + goto err_free; + } + +- nfct_timeout_snprintf(buf, sizeof(buf), t, 0); ++ nfct_timeout_snprintf(buf, sizeof(buf), t, NFCT_TIMEOUT_O_DEFAULT, 0); + printf("%s\n", buf); + + err_free: +-- +1.7.2.5 + diff --git a/community-testing/conntrack-tools/PKGBUILD b/community-testing/conntrack-tools/PKGBUILD new file mode 100644 index 000000000..f8c8ba7ef --- /dev/null +++ b/community-testing/conntrack-tools/PKGBUILD @@ -0,0 +1,53 @@ +# $Id: PKGBUILD 71335 2012-05-27 00:50:12Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> +# Contributor: Valere Monseur <valere_monseur@hotmail.com> +# Contributor: Alessandro Sagratini <ale_sagra@hotmail.com> +# Contributor: Kevin Edmonds <edmondskevin@hotmail.com> + +pkgname=conntrack-tools +pkgver=1.2.0 +pkgrel=1 +pkgdesc='Userspace tools to interact with the Netfilter connection tracking system' +arch=('i686' 'x86_64') +url='http://www.netfilter.org/projects/conntrack-tools' +license=('GPL2') +depends=('libnetfilter_conntrack' 'libnetfilter_cttimeout') +backup=('etc/conntrackd.conf' 'etc/conf.d/conntrackd') +install=$pkgname.install +source=("http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2" + 'conntrackd.rc' + 'conntrackd.conf' + 'conntrackd.service' + '01-config-file-path.patch' + '02-fix-compilation-of-timeout-extension.patch') +md5sums=('8e20330d6ca3a3f23552aa900b1d467c' + '478fe76da0202fcb5249bf65968d1c26' + 'd3e73e81b54e3e8166d357d434680684' + 'bd135eaefb47923bb8e8d26f084d3e9d' + '411fc0eb97c02595aab69b14c26c1d00' + '0144021bbec4d5b496ddd86a7ff7a257') + +build() { + cd $pkgname-$pkgver + for i in "$srcdir"/*.patch; do + patch -p1 -i "$i" + done + ./configure --prefix=/usr --sysconfdir=/etc + make +} + +package() { + # install binaries + pushd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + popd + # initscripts & systemd + install -D -m 755 conntrackd.rc "$pkgdir/etc/rc.d/conntrackd" + install -D -m 644 conntrackd.conf "$pkgdir/etc/conf.d/conntrackd" + install -D -m 644 conntrackd.service \ + "$pkgdir/usr/lib/systemd/system/conntrackd.service" + # install empty configuration files + install -D -m 644 /dev/null "$pkgdir/etc/conntrackd.conf" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community-testing/conntrack-tools/conntrack-tools.install b/community-testing/conntrack-tools/conntrack-tools.install new file mode 100644 index 000000000..d21a5f92c --- /dev/null +++ b/community-testing/conntrack-tools/conntrack-tools.install @@ -0,0 +1,9 @@ +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + [ $(vercmp "$2" '1.0.1-2') -gt 0 ] || cat <<EOF +Config file have been moved from /etc/conntrackd/conntrackd.conf to /etc/conntrackd.conf. +EOF +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community-testing/conntrack-tools/conntrackd.conf b/community-testing/conntrack-tools/conntrackd.conf new file mode 100644 index 000000000..285f566d2 --- /dev/null +++ b/community-testing/conntrack-tools/conntrackd.conf @@ -0,0 +1,3 @@ +# vim:set ts=2 sw=2 ft=sh noet: + +#DAEMON_OPTIONS='' diff --git a/community-testing/conntrack-tools/conntrackd.rc b/community-testing/conntrack-tools/conntrackd.rc new file mode 100644 index 000000000..4300a7041 --- /dev/null +++ b/community-testing/conntrack-tools/conntrackd.rc @@ -0,0 +1,34 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +DAEMON=/usr/sbin/conntrackd +PID=$(pidof -o %PPID $DAEMON) +DAEMON_OPTIONS="-d $DAEMON_OPTIONS" + +case "$1" in + start) + stat_busy "Starting ${0##*/} daemon" + [[ ! $PID ]] && $DAEMON $DAEMON_OPTIONS && add_daemon ${0##*/} && stat_done && exit 0 + stat_fail + ;; + stop) + stat_busy "Stopping ${0##*/} daemon" + [[ $PID ]] && kill $PID &> /dev/null && rm_daemon ${0##*/} && stat_done && exit 0 + stat_fail + ;; + restart) + $0 stop + $0 start + exit 0 + ;; + *) + echo "usage: ${0##*/} {start|stop|restart}" >&2 + ;; +esac + +exit 1 + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community-testing/conntrack-tools/conntrackd.service b/community-testing/conntrack-tools/conntrackd.service new file mode 100644 index 000000000..25a113785 --- /dev/null +++ b/community-testing/conntrack-tools/conntrackd.service @@ -0,0 +1,8 @@ +[Unit] +Description=Conntrack Daemon + +[Service] +ExecStart=/usr/sbin/conntrackd + +[Install] +WantedBy=multi-user.target diff --git a/community-testing/libnetfilter_cttimeout/PKGBUILD b/community-testing/libnetfilter_cttimeout/PKGBUILD new file mode 100644 index 000000000..53661d122 --- /dev/null +++ b/community-testing/libnetfilter_cttimeout/PKGBUILD @@ -0,0 +1,26 @@ +# $Id: PKGBUILD 71339 2012-05-27 00:57:37Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> + +pkgname=libnetfilter_cttimeout +pkgver=1.0.0 +pkgrel=2 +pkgdesc='Library for the connection tracking timeout infrastructure' +arch=('i686' 'x86_64') +url='http://www.netfilter.org/projects/libnetfilter_cttimeout/' +license=('GPL2') +depends=('libmnl' 'linux>=3.4') +options=('!libtool') +source=("http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2") +md5sums=('7697437fc9ebb6f6b83df56a633db7f9') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community-testing/multipath-tools/PKGBUILD b/community-testing/multipath-tools/PKGBUILD new file mode 100644 index 000000000..28d08b8f4 --- /dev/null +++ b/community-testing/multipath-tools/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 71284 2012-05-26 08:37:33Z bpiotrowski $ +# Maintainer: 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.4.9 +pkgrel=7 +pkgdesc='Multipath tools for Linux' +arch=('i686' 'x86_64') +url="http://christophe.varoqui.free.fr/" +license=('GPL') +depends=('libaio' 'device-mapper') +backup=('etc/multipath.conf' 'etc/multipath.conf.annotated') +install=multipath-tools.install +options=(!emptydirs) +source=(http://christophe.varoqui.free.fr/multipath-tools/$pkgname-$pkgver.tar.bz2 + multipath.conf multipath.conf.annotated multipathd.rc all-in-one.patch) +md5sums=('a6d4b48afc28f1f50f5ee4b1b06d2765' + '9324ff0ba8330dcb21b2fcf64988026f' + 'be11462922eeeb9fcd2ba5f3f137b7d9' + '7c04ef96441363b0d43a2ebb13a87659' + '885c0ba9c90b73cc93aa3f78005f81d6') + +build() { + patch -Np1 -i all-in-one.patch + + # Needs to be fixed upstream. Refer to + # https://bbs.archlinux.org/viewtopic.php?pid=793814#p793814 + export LDFLAGS=${LDFLAGS/-Wl,--as-needed} + + make +} + +package() { + make LIB='usr/lib' DESTDIR="$pkgdir" bindir='/usr/bin' libudevdir='/usr/lib/udev' install + install -D -m 644 multipath.conf "$pkgdir"/etc/multipath.conf + install -D -m 644 multipath.conf.annotated "$pkgdir"/etc/multipath.conf.annotated + install -D -m 755 multipathd.rc "$pkgdir"/etc/rc.d/multipathd +} diff --git a/community-testing/multipath-tools/all-in-one.patch b/community-testing/multipath-tools/all-in-one.patch new file mode 100644 index 000000000..ff8f6824c --- /dev/null +++ b/community-testing/multipath-tools/all-in-one.patch @@ -0,0 +1,209 @@ +diff -rupN upstream/Makefile.inc devel/Makefile.inc +--- upstream/Makefile.inc 2010-05-22 14:01:58.000000000 +0200 ++++ devel/Makefile.inc 2012-05-26 10:14:46.969786387 +0200 +@@ -32,11 +32,10 @@ rcdir = $(prefix)/etc/init.d + syslibdir = $(prefix)/$(LIB) + libdir = $(prefix)/$(LIB)/multipath + +-GZIP = /bin/gzip -9 -c + INSTALL_PROGRAM = install + +-OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes +-CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" ++OPTFLAGS = -Wall -Wunused -Wstrict-prototypes ++CFLAGS += $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" + SHARED_FLAGS = -shared + + %.o: %.c +diff -rupN upstream/kpartx/Makefile devel/kpartx/Makefile +--- upstream/kpartx/Makefile 2010-05-22 14:01:58.000000000 +0200 ++++ devel/kpartx/Makefile 2012-05-26 10:23:38.909780754 +0200 +@@ -6,7 +6,7 @@ include ../Makefile.inc + + CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + +-LDFLAGS = -ldevmapper ++LIBS = -ldevmapper + OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ + gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o + EXEC = kpartx +@@ -14,22 +14,22 @@ EXEC = kpartx + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: $(EXEC) $(EXEC).8 + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir) +- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d +- $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/ ++ $(INSTALL_PROGRAM) -d $(DESTDIR)/usr/lib/udev/rules.d ++ $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/usr/lib/udev/rules.d/66-kpartx.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + uninstall: + rm -f $(DESTDIR)$(bindir)/$(EXEC) +- rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 ++ rm -f $(DESTDIR)/usr/lib/udev/rules.d/66-kpartx.rules + + clean: +- rm -f core *.o $(EXEC) *.gz ++ rm -f core *.o $(EXEC) +diff -rupN upstream/kpartx/kpartx.rules devel/kpartx/kpartx.rules +--- upstream/kpartx/kpartx.rules 2010-05-22 14:01:58.000000000 +0200 ++++ devel/kpartx/kpartx.rules 2012-05-26 10:30:32.769776372 +0200 +@@ -27,9 +27,9 @@ ENV{DM_PART}=="?*", \ + + # Create dm tables for partitions + ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \ +- RUN+="/sbin/kpartx -a -p -part /dev/$name" ++ RUN+="/usr/sbin/kpartx -a -p -part /dev/$name" + ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \ +- RUN+="/sbin/kpartx -a -p -part /dev/$name" ++ RUN+="/usr/sbin/kpartx -a -p -part /dev/$name" + + LABEL="kpartx_end" + +diff -rupN upstream/multipath/Makefile devel/multipath/Makefile +--- upstream/multipath/Makefile 2010-05-22 14:01:58.000000000 +0200 ++++ devel/multipath/Makefile 2012-05-26 10:22:38.819781391 +0200 +@@ -7,32 +7,30 @@ include ../Makefile.inc + OBJS = main.o + + CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -ldl -lmultipath -L$(multipathdir) ++LIBS = -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath + + EXEC = multipath + + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz +- $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ +- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d +- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/ ++ $(INSTALL_PROGRAM) -d $(DESTDIR)/usr/lib/udev/rules.d ++ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/usr/lib/udev/rules.d/65-multipath.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) + + uninstall: +- rm $(DESTDIR)/etc/udev/rules.d/multipath.rules +- rm $(DESTDIR)$(bindir)/$(EXEC) +- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz +- rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz ++ rm -f $(DESTDIR)/usr/lib/udev/rules.d/65-multipath.rules ++ rm -f $(DESTDIR)$(bindir)/$(EXEC) ++ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 ++ rm -f $(DESTDIR)$(man5dir)/$(EXEC).conf.5 + + clean: +- rm -f core *.o $(EXEC) *.gz ++ rm -f core *.o $(EXEC) +diff -rupN upstream/multipath/multipath.rules devel/multipath/multipath.rules +--- upstream/multipath/multipath.rules 2010-05-22 14:01:58.000000000 +0200 ++++ devel/multipath/multipath.rules 2012-05-26 10:17:34.849784609 +0200 +@@ -1,7 +1,24 @@ +-# +-# udev rules for multipathing. +-# The persistent symlinks are created with the kpartx rules +-# ++# multipath wants the devmaps presented as meaninglful device names ++# so name them after their devmap name ++SUBSYSTEM!="block", GOTO="end_mpath" + +-# socket for uevents +-SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event" ++ENV{MPATH_SBIN_PATH}="/sbin" ++TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin" ++ ++ACTION=="add", ENV{DEVTYPE}!="partition", \ ++ ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \ ++ PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \ ++ ENV{DM_MULTIPATH_DEVICE_PATH}="1" ++ ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \ ++ RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}" ++ ++RUN+="socket:/org/kernel/dm/multipath_event" ++KERNEL!="dm-*", GOTO="end_mpath" ++ACTION!="change", GOTO="end_mpath" ++ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10" ++ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath" ++ENV{DM_SUSPENDED}=="1", GOTO="end_mpath" ++ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath" ++RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode" ++LABEL="end_mpath" +diff -rupN upstream/multipath-tools.spec.in devel/multipath-tools.spec.in +--- upstream/multipath-tools.spec.in 2010-05-22 14:01:58.000000000 +0200 ++++ devel/multipath-tools.spec.in 2012-05-26 10:24:16.989780353 +0200 +@@ -47,8 +47,8 @@ rm -rf $RPM_BUILD_ROOT + %{prefix}/usr/share/man/man8/multipathd.8.gz + %{prefix}/usr/share/man/man5/multipath.conf.5.gz + %{prefix}/sbin/multipathd +-%{prefix}/etc/udev/rules.d/multipath.rules +-%{prefix}/etc/udev/rules.d/kpartx.rules ++%{prefix}/usr/lib/udev/rules.d/multipath.rules ++%{prefix}/usr/lib/udev/rules.d/kpartx.rules + %{prefix}/lib/udev/kpartx_id + %{prefix}/lib/multipath/*.so + +diff -rupN upstream/multipathd/Makefile devel/multipathd/Makefile +--- upstream/multipathd/Makefile 2010-05-22 14:01:58.000000000 +0200 ++++ devel/multipathd/Makefile 2012-05-26 10:14:46.969786387 +0200 +@@ -6,8 +6,8 @@ include ../Makefile.inc + # basic flags setting + # + CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ldl \ +- -lmultipath -L$(multipathdir) ++LIBS = -lpthread -ldevmapper -lreadline -lncurses -ldl \ ++ -L$(multipathdir) -lmultipath + + # + # debuging stuff +@@ -28,21 +28,20 @@ OBJS = main.o pidfile.o uxlsnr.o uxclnt. + all : $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + uninstall: + rm -f $(DESTDIR)$(bindir)/$(EXEC) + rm -f $(DESTDIR)$(rcdir)/$(EXEC) +- rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 + + clean: +- rm -f core *.o $(EXEC) *.gz ++ rm -f core *.o $(EXEC) + diff --git a/community-testing/multipath-tools/fix-build.patch b/community-testing/multipath-tools/fix-build.patch new file mode 100644 index 000000000..c6196f73b --- /dev/null +++ b/community-testing/multipath-tools/fix-build.patch @@ -0,0 +1,140 @@ +--- multipath-tools-0.4.9.orig/kpartx/Makefile 2010-05-22 05:01:58.000000000 -0700 ++++ multipath-tools-0.4.9/kpartx/Makefile 2010-11-28 12:14:25.763531104 -0800 +@@ -6,7 +6,7 @@ + + CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + +-LDFLAGS = -ldevmapper ++LIBS = -ldevmapper + OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ + gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o + EXEC = kpartx +@@ -14,8 +14,7 @@ + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: $(EXEC) $(EXEC).8 + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) +@@ -23,13 +22,14 @@ + $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir) + $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d +- $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/ ++ $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/66-kpartx.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + uninstall: + rm -f $(DESTDIR)$(bindir)/$(EXEC) +- rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 ++ rm -f $(DESTDIR)/etc/udev/rules.d/66-kpartx.rules + + clean: +- rm -f core *.o $(EXEC) *.gz ++ rm -f core *.o $(EXEC) +--- multipath-tools-0.4.9.orig/Makefile.inc 2010-05-22 05:01:58.000000000 -0700 ++++ multipath-tools-0.4.9/Makefile.inc 2010-11-28 12:14:25.763531104 -0800 +@@ -32,11 +32,10 @@ + syslibdir = $(prefix)/$(LIB) + libdir = $(prefix)/$(LIB)/multipath + +-GZIP = /bin/gzip -9 -c + INSTALL_PROGRAM = install + +-OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes +-CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" ++OPTFLAGS = -Wall -Wunused -Wstrict-prototypes ++CFLAGS += $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" + SHARED_FLAGS = -shared + + %.o: %.c +--- multipath-tools-0.4.9.orig/multipath/Makefile 2010-05-22 05:01:58.000000000 -0700 ++++ multipath-tools-0.4.9/multipath/Makefile 2010-11-28 12:14:46.718697048 -0800 +@@ -7,32 +7,30 @@ + OBJS = main.o + + CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -ldl -lmultipath -L$(multipathdir) ++LIBS = -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath + + EXEC = multipath + + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz +- $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d +- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/ ++ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/65-multipath.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) + + uninstall: +- rm $(DESTDIR)/etc/udev/rules.d/multipath.rules +- rm $(DESTDIR)$(bindir)/$(EXEC) +- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz +- rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz ++ rm -f $(DESTDIR)/etc/udev/rules.d/65-multipath.rules ++ rm -f $(DESTDIR)$(bindir)/$(EXEC) ++ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 ++ rm -f $(DESTDIR)$(man5dir)/$(EXEC).conf.5 + + clean: +- rm -f core *.o $(EXEC) *.gz ++ rm -f core *.o $(EXEC) +--- multipath-tools-0.4.9.orig/multipathd/Makefile 2010-05-22 05:01:58.000000000 -0700 ++++ multipath-tools-0.4.9/multipathd/Makefile 2010-11-28 12:15:46.624171566 -0800 +@@ -6,8 +6,8 @@ + # basic flags setting + # + CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ldl \ +- -lmultipath -L$(multipathdir) ++LIBS = -lpthread -ldevmapper -lreadline -lncurses -ldl \ ++ -L$(multipathdir) -lmultipath + + # + # debuging stuff +@@ -28,21 +28,20 @@ + all : $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) +- $(GZIP) $(EXEC).8 > $(EXEC).8.gz ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC) + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(mandir) + + uninstall: + rm -f $(DESTDIR)$(bindir)/$(EXEC) + rm -f $(DESTDIR)$(rcdir)/$(EXEC) +- rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz ++ rm -f $(DESTDIR)$(mandir)/$(EXEC).8 + + clean: +- rm -f core *.o $(EXEC) *.gz ++ rm -f core *.o $(EXEC) + diff --git a/community-testing/multipath-tools/multipath-tools.install b/community-testing/multipath-tools/multipath-tools.install new file mode 100644 index 000000000..fa58bbc35 --- /dev/null +++ b/community-testing/multipath-tools/multipath-tools.install @@ -0,0 +1,4 @@ +post_install() { + + echo " * For full functonality ensure that the dm_multipath kernel module is loaded" +} diff --git a/community-testing/multipath-tools/multipath.conf b/community-testing/multipath-tools/multipath.conf new file mode 100644 index 000000000..6dacf093d --- /dev/null +++ b/community-testing/multipath-tools/multipath.conf @@ -0,0 +1,8 @@ +# +# Very Basic Multipath Configuration File +# + +defaults { + getuid_callout "/usr/lib/udev/scsi_id -g -u -d /dev/%n" +} + diff --git a/community-testing/multipath-tools/multipath.conf.annotated b/community-testing/multipath-tools/multipath.conf.annotated new file mode 100644 index 000000000..b79488413 --- /dev/null +++ b/community-testing/multipath-tools/multipath.conf.annotated @@ -0,0 +1,362 @@ +## +## This is a template multipath-tools configuration file +## Uncomment the lines relevent to your environment +## +# +## +## name : defaults +## desc : multipath-tools default settings +## +#defaults { +# # +# # name : udev_dir +# # desc : directory where udev creates its device nodes +# # default : /dev +# # +# udev_dir /dev +# +# # +# # name : polling_interval +# # scope : multipathd +# # desc : interval between two path checks in seconds +# # default : 5 +# # +# polling_interval 10 +# +# # +# # name : selector +# # scope : multipath +# # desc : the default path selector algorithm to use +# # these algorithms are offered by the kernel multipath target +# # values : "round-robin 0" +# # default : "round-robin 0" +# # +# selector "round-robin 0" +# +# # +# # name : path_grouping_policy +# # scope : multipath +# # desc : the default path grouping policy to apply to unspecified +# # multipaths +# # default : multibus +# # +# path_grouping_policy multibus +# +# # +# # name : getuid_callout +# # scope : multipath +# # desc : the default program and args to callout to obtain a unique +# # path identifier. Absolute path required +# # default : /usr/lib/udev/scsi_id -g -u -s +# # +# getuid_callout "/usr/lib/udev/scsi_id -g -u -s /block/%n" +# +# # +# # name : prio_callout +# # scope : multipath +# # desc : the default program and args to callout to obtain a path +# # priority value. The ALUA bits in SPC-3 provide an +# # exploitable prio value for example. "none" is a valid value +# # default : (null) +# # +# #prio_callout "/bin/true" +# +# # +# # name : path_checker +# # scope : multipath & multipathd +# # desc : the default method used to determine the paths' state +# # values : readsector0|tur|emc_clariion|hp_sw|directio +# # default : directio +# # +# #path_checker directio +# +# # +# # name : rr_min_io +# # scope : multipath +# # desc : the number of IO to route to a path before switching +# # to the next in the same path group +# # default : 1000 +# # +# rr_min_io 100 +# +# # +# # name : rr_weight +# # scope : multipath +# # desc : if set to priorities the multipath configurator will assign +# # path weights as "path prio * rr_min_io" +# # values : priorities|uniform +# # default : uniform +# # +# rr_weight priorities +# +# # +# # name : failback +# # scope : multipathd +# # desc : tell the daemon to manage path group failback, or not to. +# # 0 means immediate failback, values >0 means deffered failback +# # expressed in seconds. +# # values : manual|immediate|n > 0 +# # default : immediate +# # +# failback manual +# +# # +# # name : no_path_retry +# # scope : multipath & multipathd +# # desc : tell the number of retries until disable queueing, or +# # "fail" means immediate failure (no queueing), +# # "queue" means never stop queueing +# # values : queue|fail|n (>0) +# # default : (null) +# # +# #no_path_retry queue +# +# # +# # name : user_friendly_names +# # scope : multipath +# # desc : If set to "yes", using the bindings file +# # /var/lib/multipath/bindings to assign a persistent and +# # unique alias to the multipath, in the form of mpath<n>. +# # If set to "no" use the WWID as the alias. In either case +# # this be will be overriden by any specific aliases in this +# # file. +# # values : yes|no +# # default : no +# user_friendly_names no +# +#} +# +## +## name : blacklist +## scope : multipath & multipathd +## desc : list of device names to discard as not multipath candidates +## default : cciss, fd, hd, md, dm, sr, scd, st, ram, raw, loop +## +#blacklist { +# wwid 26353900f02796769 +# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" +# devnode "^hd[a-z][[0-9]*]" +# devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]" +# device { +# vendor DEC.* +# product MSA[15]00 +# } +#} +## +## name : blacklist_exceptions +## scope : multipath & multipathd +## desc : list of device names to be treated as multipath candidates +## even if they are on the blacklist. +## Note: blacklist exceptions are only valid in the same class. +## It is not possible to blacklist devices using the devnode keyword +## and to exclude some devices of them using the wwid keyword. +## default : - +## +#blacklist_exceptions { +# devnode "^dasd[c-d]+[0-9]*" +# wwid "IBM.75000000092461.4d00.34" +# wwid "IBM.75000000092461.4d00.35" +# wwid "IBM.75000000092461.4d00.36" +#} +# +## +## name : multipaths +## scope : multipath & multipathd +## desc : list of multipaths finest-grained settings +## +#multipaths { +# # +# # name : multipath +# # scope : multipath & multipathd +# # desc : container for settings that apply to one specific multipath +# # +# multipath { +# # +# # name : wwid +# # scope : multipath & multipathd +# # desc : index of the container +# # +# wwid 3600508b4000156d700012000000b0000 +# +# # +# # name : alias +# # scope : multipath +# # desc : symbolic name for the multipath +# # +# alias yellow +# +# # +# # name : path_grouping_policy +# # scope : multipath +# # desc : path grouping policy to apply to this multipath +# # values : failover, multibus, group_by_serial +# # default : failover +# # +# path_grouping_policy multibus +# +# # +# # name : path_checker +# # scope : multipathd +# # desc : path checking alorithm to use to check path state +# # values : readsector0|tur|emc_clariion|hp_sw|directio +# # default : directio +# # +# # path_checker directio +# +# # +# # name : path_selector +# # desc : the path selector algorithm to use for this mpath +# # these algo are offered by the kernel mpath target +# # values : "round-robin 0" +# # default : "round-robin 0" +# # +# path_selector "round-robin 0" +# +# # +# # name : failback +# # scope : multipathd +# # desc : tell the daemon to manage path group failback, or not to. +# # 0 means immediate failback, values >0 means deffered failback +# # expressed in seconds. +# # values : manual|immediate|n > 0 +# # default : immediate +# # +# failback manual +# +# # +# # name : no_path_retry +# # scope : multipath & multipathd +# # desc : tell the number of retries until disable queueing, or +# # "fail" means immediate failure (no queueing), +# # "queue" means never stop queueing +# # values : queue|fail|n (>0) +# # default : (null) +# # +# #no_path_retry queue +# +# # +# # name : rr_min_io +# # scope : multipath +# # desc : the number of IO to route to a path before switching +# # to the next in the same path group +# # default : 1000 +# # +# rr_min_io 100 +# } +# multipath { +# wwid 1DEC_____321816758474 +# alias red +# rr_weight priorities +# } +#} +# +## +## name : devices +## scope : multipath & multipathd +## desc : list of per storage controller settings +## overrides default settings (device_maps block) +## overriden by per multipath settings (multipaths block) +## +#devices { +# # +# # name : device +# # scope : multipath & multipathd +# # desc : settings for this specific storage controller +# # +# device { +# # +# # name : vendor, product +# # scope : multipath & multipathd +# # desc : index for the block +# # +# vendor "COMPAQ " +# product "HSV110 (C)COMPAQ" +# +# # +# # name : path_grouping_policy +# # scope : multipath +# # desc : path grouping policy to apply to multipath hosted +# # by this storage controller +# # values : failover = 1 path per priority group +# # multibus = all valid paths in 1 priority +# # group +# # group_by_serial = 1 priority group per detected +# # serial number +# # default : failover +# # +# path_grouping_policy multibus +# +# # +# # name : getuid_callout +# # scope : multipath +# # desc : the program and args to callout to obtain a unique +# # path identifier. Absolute path required +# # default : /usr/lib/udev/scsi_id -g -u -s +# # +# getuid_callout "/usr/lib/udev/scsi_id -g -u -s /block/%n" +# +# # +# # name : prio_callout +# # scope : multipath +# # desc : the program and args to callout to obtain a path +# # weight. Weights are summed for each path group to +# # determine the next PG to use case of failure. +# # "none" is a valid value. +# # default : no callout, all paths equals +# # +# prio_callout "/sbin/mpath_prio_balance_units %d" +# +# # +# # name : path_checker +# # scope : multipathd +# # desc : path checking alorithm to use to check path state +# # values : readsector0|tur|emc_clariion|hp_sw|directio +# # default : directio +# # +# path_checker directio +# +# # +# # name : path_selector +# # desc : the path selector algorithm to use for this mpath +# # these algo are offered by the kernel mpath target +# # values : "round-robin 0" +# # default : "round-robin 0" +# # +# path_selector "round-robin 0" +# +# # +# # name : failback +# # scope : multipathd +# # desc : tell the daemon to manage path group failback, or not to. +# # 0 means immediate failback, values >0 means deffered failback +# # expressed in seconds. +# # values : manual|immediate|n > 0 +# # default : immediate +# # +# failback 30 +# +# # +# # name : rr_min_io +# # scope : multipath +# # desc : the number of IO to route to a path before switching +# # to the next in the same path group +# # default : 1000 +# # +# rr_min_io 100 +# +# # +# # name : product_blacklist +# # scope : multipath & multipathd +# # desc : product strings to blacklist for this vendor +# # default : none +# # +# product_blacklist LUN_Z +# } +# device { +# vendor "COMPAQ " +# product "MSA1000 " +# path_grouping_policy multibus +# path_checker tur +# rr_weight priorities +# } +#} diff --git a/community-testing/multipath-tools/multipathd.rc b/community-testing/multipath-tools/multipathd.rc new file mode 100644 index 000000000..7f5ef5d6a --- /dev/null +++ b/community-testing/multipath-tools/multipathd.rc @@ -0,0 +1,35 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting multipathd" + /usr/bin/multipathd + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon multipathd + stat_done + fi + ;; + stop) + stat_busy "Stopping multipathd" + [ -f /var/run/multipathd.pid ] && kill `cat /var/run/multipathd.pid` >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon multipathd + stat_done + fi + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |