summaryrefslogtreecommitdiff
path: root/community-testing
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-30 00:02:28 +0000
committerroot <root@rshg054.dnsready.net>2012-05-30 00:02:28 +0000
commitf676c2f568b9c75daa3e2b688978b877f950953d (patch)
tree59afe7e51ecb44399c2e64658841e1b5f86571fa /community-testing
parentedec45419def1b81bd663a2859684ef55ba56269 (diff)
Wed May 30 00:02:27 UTC 2012
Diffstat (limited to 'community-testing')
-rw-r--r--community-testing/libvirt/PKGBUILD25
-rw-r--r--community-testing/libvirt/libvirt.tmpfiles.d4
-rw-r--r--community-testing/multipath-tools/PKGBUILD20
-rw-r--r--community-testing/multipath-tools/blacklist-cciss-devices.patch29
-rw-r--r--community-testing/multipath-tools/buffer-overflows.patch22
-rw-r--r--community-testing/multipath-tools/explicitly-include-posix_types.h.patch35
-rw-r--r--community-testing/multipath-tools/fix-build.patch137
-rw-r--r--community-testing/multipath-tools/log_enquery_overflow.patch69
8 files changed, 297 insertions, 44 deletions
diff --git a/community-testing/libvirt/PKGBUILD b/community-testing/libvirt/PKGBUILD
index 5000e9a3d..fd8b61ae9 100644
--- a/community-testing/libvirt/PKGBUILD
+++ b/community-testing/libvirt/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 71494 2012-05-27 13:14:57Z dreisner $
+# $Id: PKGBUILD 71546 2012-05-28 16:42:48Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jonathan Wiersma <archaur at jonw dot org>
pkgname=libvirt
pkgver=0.9.12
-pkgrel=4
+pkgrel=8
pkgdesc="API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)"
arch=('i686' 'x86_64')
url="http://libvirt.org/"
@@ -34,6 +34,7 @@ source=("http://libvirt.org/sources/$pkgname-$pkgver.tar.gz"
libvirtd.conf.d
libvirtd-guests.rc.d
libvirtd-guests.conf.d
+ libvirt.tmpfiles.d
openbsd-netcat-default.patch
libvirt-libnl3.patch)
md5sums=('5e842bc55733ceba60c64767580ff3e4'
@@ -41,6 +42,7 @@ md5sums=('5e842bc55733ceba60c64767580ff3e4'
'3ed0e24f5b5e25bf553f5427d64915e6'
'8297b1be794a24cc77f66af9380ace59'
'bc2971dacdbac967fc3474e50affc345'
+ '8d98e62915785686b0b6c8c070628392'
'b0be50eb9dfe4d133decf23b60880f7d'
'ba27fbcd989de8d84cfff98326f10c54')
@@ -64,8 +66,8 @@ build() {
export LDFLAGS=-lX11
export RADVD=/usr/sbin/radvd
[ -f Makefile ] || ./configure --prefix=/usr --libexec=/usr/lib/"$pkgname" \
- --with-storage-lvm --without-xen --with-udev --without-hal --disable-static
- find -name Makefile -exec sed -i 's#-L /usr#-L/usr#' {} \;
+ --with-storage-lvm --without-xen --with-udev --without-hal --disable-static \
+ --with-init-script=systemd
make -j1
}
@@ -80,5 +82,18 @@ package() {
install -D -m755 "$srcdir"/libvirtd-guests.rc.d "$pkgdir"/etc/rc.d/libvirtd-guests
install -D -m644 "$srcdir"/libvirtd-guests.conf.d "$pkgdir"/etc/conf.d/libvirtd-guests
- rm -rf $pkgdir/var/run
+
+ install -dm0755 $pkgdir/usr/lib/sysctl.d
+ mv $pkgdir/etc/sysctl.d/libvirtd $pkgdir/usr/lib/sysctl.d/libvirtd
+
+ # systemd stuff
+ install -D -m644 "$srcdir"/libvirt.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/libvirt.conf
+ mv $pkgdir/lib/* $pkgdir/usr/lib/
+
+ rm -rf \
+ $pkgdir/var/run \
+ $pkgdir/etc/rc.d/init.d \
+ $pkgdir/etc/sysconfig \
+ $pkgdir/lib \
+ $pkgdir/etc/sysctl.d
}
diff --git a/community-testing/libvirt/libvirt.tmpfiles.d b/community-testing/libvirt/libvirt.tmpfiles.d
new file mode 100644
index 000000000..0cec93271
--- /dev/null
+++ b/community-testing/libvirt/libvirt.tmpfiles.d
@@ -0,0 +1,4 @@
+d /var/run/libvirt/qemu 0755 root root -
+d /var/run/libvirt/lxc 0755 root root -
+d /var/run/libvirt/uml 0755 root root -
+d /var/run/libvirt/network 0755 root root -
diff --git a/community-testing/multipath-tools/PKGBUILD b/community-testing/multipath-tools/PKGBUILD
index 28d08b8f4..b4f134390 100644
--- a/community-testing/multipath-tools/PKGBUILD
+++ b/community-testing/multipath-tools/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 71284 2012-05-26 08:37:33Z bpiotrowski $
+# $Id: PKGBUILD 71548 2012-05-28 17:59:37Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Thomas S Hatch <thatch45 ar gmail dot com>
# Contributor: Michael P <ptchinster@archlinux.us>
@@ -6,7 +6,7 @@
pkgname=multipath-tools
pkgver=0.4.9
-pkgrel=7
+pkgrel=8
pkgdesc='Multipath tools for Linux'
arch=('i686' 'x86_64')
url="http://christophe.varoqui.free.fr/"
@@ -16,15 +16,25 @@ 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)
+ multipath.conf multipath.conf.annotated multipathd.rc
+ fix-build.patch buffer-overflows.patch log_enquery_overflow.patch
+ blacklist-cciss-devices.patch explicitly-include-posix_types.h.patch)
md5sums=('a6d4b48afc28f1f50f5ee4b1b06d2765'
'9324ff0ba8330dcb21b2fcf64988026f'
'be11462922eeeb9fcd2ba5f3f137b7d9'
'7c04ef96441363b0d43a2ebb13a87659'
- '885c0ba9c90b73cc93aa3f78005f81d6')
+ '885c0ba9c90b73cc93aa3f78005f81d6'
+ 'c5aab36777b0304a3525533cdd31bddc'
+ '00eae05e02f1b85062e998574ab1b833'
+ '61b4038c4c145ca52e836145ea6bdd6c'
+ 'd99beb6d8a9b84f90125c7cacf8a6006')
build() {
- patch -Np1 -i all-in-one.patch
+ patch -Np1 -i fix-build.patch
+ patch -Np1 -i buffer-overflows.patch
+ patch -Np1 -i log_enquery_overflow.patch
+ patch -Np1 -i blacklist-cciss-devices.patch
+ patch -Np1 -i explicitly-include-posix_types.h.patch
# Needs to be fixed upstream. Refer to
# https://bbs.archlinux.org/viewtopic.php?pid=793814#p793814
diff --git a/community-testing/multipath-tools/blacklist-cciss-devices.patch b/community-testing/multipath-tools/blacklist-cciss-devices.patch
new file mode 100644
index 000000000..497121c36
--- /dev/null
+++ b/community-testing/multipath-tools/blacklist-cciss-devices.patch
@@ -0,0 +1,29 @@
+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 f369517..2e5efc8 100644
+--- a/libmultipath/blacklist.c
++++ b/libmultipath/blacklist.c
+@@ -121,6 +121,12 @@ setup_default_blist (struct config * conf)
+ if (store_ble(conf->blist_devnode, 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 (alloc_ble_device(conf->blist_device))
+--
diff --git a/community-testing/multipath-tools/buffer-overflows.patch b/community-testing/multipath-tools/buffer-overflows.patch
new file mode 100644
index 000000000..38719aceb
--- /dev/null
+++ b/community-testing/multipath-tools/buffer-overflows.patch
@@ -0,0 +1,22 @@
+--- multipath-tools-0.4.9.orig/libmultipath/prioritizers/datacore.c 2010-05-22 05:01:58.000000000 -0700
++++ multipath-tools-0.4.9/libmultipath/prioritizers/datacore.c 2010-11-28 12:22:12.037228583 -0800
+@@ -94,7 +94,7 @@
+ if ((io_hdr.info & SG_INFO_OK_MASK) != SG_INFO_OK)
+ return 0;
+
+- snprintf(vendor, 9, "%.8s\n", inqBuffp + 8);
++ snprintf(vendor, 8, "%.8s\n", inqBuffp + 8);
+ snprintf(product, 17, "%.16s", inqBuffp + 16);
+ snprintf(luname, 21, "%.19s", inqBuffp + 36);
+ snprintf(wwpn, 17, "%.16s", inqBuffp + 96);
+--- multipath-tools-0.4.9.orig/libmultipath/prioritizers/hds.c 2010-05-22 05:01:58.000000000 -0700
++++ multipath-tools-0.4.9/libmultipath/prioritizers/hds.c 2010-11-28 12:22:44.199483997 -0800
+@@ -123,7 +123,7 @@
+ 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);
diff --git a/community-testing/multipath-tools/explicitly-include-posix_types.h.patch b/community-testing/multipath-tools/explicitly-include-posix_types.h.patch
new file mode 100644
index 000000000..6cbbc3ba1
--- /dev/null
+++ b/community-testing/multipath-tools/explicitly-include-posix_types.h.patch
@@ -0,0 +1,35 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Sat, 5 Dec 2009 18:11:00 +0100
+Subject: [PATCH] explicitly include posix_types.h
+
+to get the correct type for __kernel_old_dev_t
+
+Closes: #558990
+---
+ kpartx/lopart.c | 13 +------------
+ 1 files changed, 1 insertions(+), 12 deletions(-)
+
+Index: mpath/kpartx/lopart.c
+===================================================================
+--- mpath.orig/kpartx/lopart.c 2012-02-09 18:02:23.808800332 +0530
++++ mpath/kpartx/lopart.c 2012-02-09 18:15:24.400671080 +0530
+@@ -26,18 +26,7 @@
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ #include <sysmacros.h>
+-
+-#if defined(__hppa__) || defined(__powerpc64__) || defined (__alpha__) \
+- || defined (__x86_64__)
+-typedef unsigned long __kernel_old_dev_t;
+-#elif defined(__powerpc__) || defined(__ia64__) || (defined(__sparc__) && defined (__arch64__))
+-typedef unsigned int __kernel_old_dev_t;
+-#else
+-typedef unsigned short __kernel_old_dev_t;
+-#endif
+-
+-#define dev_t __kernel_old_dev_t
+-
++#include <asm/posix_types.h>
+ #include <linux/loop.h>
+
+ #include "lopart.h"
diff --git a/community-testing/multipath-tools/fix-build.patch b/community-testing/multipath-tools/fix-build.patch
index c6196f73b..ff8f6824c 100644
--- a/community-testing/multipath-tools/fix-build.patch
+++ b/community-testing/multipath-tools/fix-build.patch
@@ -1,6 +1,24 @@
---- 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 @@
+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
@@ -9,7 +27,7 @@
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 @@
+@@ -14,22 +14,22 @@ EXEC = kpartx
all: $(EXEC)
$(EXEC): $(OBJS)
@@ -19,12 +37,13 @@
install: $(EXEC) $(EXEC).8
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
-@@ -23,13 +22,14 @@
+ $(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) -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)/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)
@@ -33,30 +52,30 @@
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
++ rm -f $(DESTDIR)/usr/lib/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 @@
+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)
@@ -76,9 +95,10 @@
install:
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
+- $(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)/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)
@@ -91,7 +111,7 @@
- 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)/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
@@ -99,9 +119,58 @@
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 @@
+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)
@@ -112,7 +181,7 @@
#
# debuging stuff
-@@ -28,21 +28,20 @@
+@@ -28,21 +28,20 @@ OBJS = main.o pidfile.o uxlsnr.o uxclnt.
all : $(EXEC)
$(EXEC): $(OBJS)
diff --git a/community-testing/multipath-tools/log_enquery_overflow.patch b/community-testing/multipath-tools/log_enquery_overflow.patch
new file mode 100644
index 000000000..67367c9f4
--- /dev/null
+++ b/community-testing/multipath-tools/log_enquery_overflow.patch
@@ -0,0 +1,69 @@
+From e1d69df0cdd1627676501df3a533b25ffadaeff0 Mon Sep 17 00:00:00 2001
+From: Arkadiusz Miskiewicz <arekm@maven.pl>
+Date: Sat, 27 Nov 2010 19:21:21 +0100
+Subject: [PATCH] multipath-tools overflow
+
+On Saturday 27 of November 2010, you wrote:
+
+[...]
+
+> the whole logarea is memset to 0 by logarea_init(), and each dequeued
+> message is also memset to 0 by log_dequeue(), so it seems normal that
+> msg->str value is 0x0, but it's really its address that matters.
+
+Ok, got it. Pointers, memory areas in my debugging session - are looking
+good then.
+
+>
+> It's not clear to me : are you actually hitting a bug or is it your
+> debug session that puzzles you ?
+
+I'm hitting a bug. multipathd dies for me at that strcpy(). Now I think
+the bug is strcpy usage instead of memcpy because I'm building with
+-O2 -D_FORTIFY_SOURCE=2 which turns on special glibc overflow
+detection.
+
+That detection seem to be smart enough to know that &str area is not
+a string memory and aborts the program.
+
+Found similar problem discussed here
+http://sourceware.org/ml/binutils/2005-11/msg00308.html
+
+glibc aborts the program:
+[pid 13432] writev(2, [{"*** ", 4}, {"buffer overflow detected", 24},
+{" ***: ", 6}, {"/home/users/arekm/rpm/BUILD/multipath-tools-0.4.9
+/multipathd/multipathd", 71}, {" terminated\n", 12}], 5) = 117
+
+same for valgrind:
+**13436** *** strcpy_chk: buffer overflow detected ***: program terminated
+==13436== at 0x4024997: VALGRIND_PRINTF_BACKTRACE (valgrind.h:4477)
+==13436== by 0x40265F8: __strcpy_chk (mc_replace_strmem.c:781)
+==13436== by 0x40EDC06: log_enqueue (string3.h:107)
+==13436== by 0x40ED68A: log_safe (log_pthread.c:24)
+==13436== by 0x40E296A: dlog (debug.c:36)
+==13436== by 0x804ECEC: pidfile_create (pidfile.c:37)
+==13436== by 0x804E731: main (main.c:1424)
+
+The bug is not visible if I run multipathd in debug mode (-d).
+
+This patch fixes the problem for me by avoiding false positive on strcpy_chk.
+---
+ libmultipath/log.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libmultipath/log.c b/libmultipath/log.c
+index e56e46b..57b7696 100644
+--- a/libmultipath/log.c
++++ b/libmultipath/log.c
+@@ -142,7 +142,7 @@ int log_enqueue (int prio, const char * fmt, va_list ap)
+ la->empty = 0;
+ msg = (struct logmsg *)la->tail;
+ msg->prio = prio;
+- strcpy((void *)&msg->str, buff);
++ memcpy((void *)&msg->str, buff, strlen(buff) + 1);
+ lastmsg->next = la->tail;
+ msg->next = la->head;
+
+--
+1.7.6.5
+