summaryrefslogtreecommitdiff
path: root/sys-fs/multipath-tools/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fs/multipath-tools/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/multipath-tools/files')
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.5.0-makefile.patch200
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.5.0-systemd-pkgconfig.patch24
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch25
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.6.4-sysmacros.patch60
-rw-r--r--sys-fs/multipath-tools/files/multipath.rc27
-rw-r--r--sys-fs/multipath-tools/files/rc-multipathd20
6 files changed, 356 insertions, 0 deletions
diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.5.0-makefile.patch b/sys-fs/multipath-tools/files/multipath-tools-0.5.0-makefile.patch
new file mode 100644
index 000000000000..691b138731f6
--- /dev/null
+++ b/sys-fs/multipath-tools/files/multipath-tools-0.5.0-makefile.patch
@@ -0,0 +1,200 @@
+--- multipath-tools-0.5.0/kpartx/Makefile
++++ multipath-tools-0.5.0/kpartx/Makefile
+@@ -12,7 +12,7 @@
+ CFLAGS += -DLIBDM_API_COOKIE
+ endif
+
+-LDFLAGS = -ldevmapper
++LIBS = -ldevmapper
+ OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
+ gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
+ EXEC = kpartx
+@@ -20,8 +20,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)
+@@ -29,14 +28,15 @@
+ $(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)$(libudevdir)/kpartx_id
++ 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.5.0/libmpathpersist/Makefile
++++ multipath-tools-0.5.0/libmpathpersist/Makefile
+@@ -22,8 +22,6 @@
+ $(CC) -Wall -fPIC -c $(CFLAGS) *.c
+ $(CC) -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
+ ln -s $(LIBS) $(DEVLIB)
+- $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
+- $(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
+
+ install: $(LIBS)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
+@@ -31,19 +29,17 @@
+ $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(syslibdir)
+ $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(man3dir)
+ $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)/usr/include/
+- $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)/usr/share/doc/mpathpersist/
+- ln -sf $(DESTDIR)$(syslibdir)/$(LIBS) $(DESTDIR)$(syslibdir)/$(DEVLIB)
+- install -m 644 mpath_persistent_reserve_in.3.gz $(DESTDIR)$(man3dir)
+- install -m 644 mpath_persistent_reserve_out.3.gz $(DESTDIR)$(man3dir)
+- install -m 644 mpath_persist.h $(DESTDIR)/usr/include/
++ $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_in.3 $(DESTDIR)$(man3dir)
++ $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_out.3 $(DESTDIR)$(man3dir)
++ $(INSTALL_PROGRAM) -m 644 mpath_persist.h $(DESTDIR)/usr/include/
+
+ uninstall:
+ rm -f $(DESTDIR)$(syslibdir)/$(LIBS)
+- rm $(DESTDIR)$(mandir)/mpath_persistent_reserve_in.3.gz
+- rm $(DESTDIR)$(mandir)/mpath_persistent_reserve_out.3.gz
++ rm $(DESTDIR)$(mandir)/mpath_persistent_reserve_in.3
++ rm $(DESTDIR)$(mandir)/mpath_persistent_reserve_out.3
+
+ clean:
+ rm -f core *.a *.o
+ rm -f libmpathpersist.so.0
+ rm -f libmpathpersist.so
+- rm -f mpath_persistent_reserve_in.3.gz mpath_persistent_reserve_out.3.gz
++ rm -f mpath_persistent_reserve_in.3 mpath_persistent_reserve_out.3
+--- multipath-tools-0.5.0/Makefile.inc
++++ multipath-tools-0.5.0/Makefile.inc
+@@ -48,8 +48,8 @@
+ RPM_OPT_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
+ endif
+
+-OPTFLAGS = $(RPM_OPT_FLAGS) -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.5.0/mpathpersist/Makefile
++++ multipath-tools-0.5.0/mpathpersist/Makefile
+@@ -13,18 +13,17 @@
+
+ $(EXEC): $(OBJS)
+ $(CC) -g $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS)
+- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
+
+ install:
+ install -d $(DESTDIR)$(bindir)
+ install -m 755 $(EXEC) $(DESTDIR)$(bindir)/
+ install -d $(DESTDIR)$(mandir)
+- install -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
++ install -m 644 $(EXEC).8 $(DESTDIR)$(mandir)
+
+ clean:
+ rm -f *.o $(EXEC)
+- rm -f mpathpersist.8.gz
++ rm -f mpathpersist.8
+
+ uninstall:
+ rm $(DESTDIR)$(bindir)/$(EXEC)
+- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
++ rm $(DESTDIR)$(mandir)/$(EXEC).8
+--- multipath-tools-0.5.0/multipath/Makefile
++++ multipath-tools-0.5.0/multipath/Makefile
+@@ -7,29 +7,27 @@
+ OBJS = main.o
+
+ CFLAGS += -I$(multipathdir)
+-LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev
++LIBS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev
+
+ 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)$(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)$(bindir)/$(EXEC)
+- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
+- rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
++ rm $(DESTDIR)$(mandir)/$(EXEC).8
++ rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5
+
+ clean:
+- rm -f core *.o $(EXEC) *.gz
++ rm -f core *.o $(EXEC)
+--- multipath-tools-0.5.0/multipathd/Makefile
++++ multipath-tools-0.5.0/multipathd/Makefile
+@@ -9,11 +9,11 @@
+ ifdef SYSTEMD
+ CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)
+ endif
+-LDFLAGS += -lpthread -ldevmapper -lreadline
++LIBS += -lpthread -ldevmapper -lreadline
+ ifdef SYSTEMD
+- LDFLAGS += -lsystemd-daemon
++ LIBS += -lsystemd-daemon
+ endif
+-LDFLAGS += -ludev -ldl \
++LIBS += -ludev -ldl \
+ -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist
+
+ #
+@@ -35,8 +35,7 @@
+ all : $(EXEC)
+
+ $(EXEC): $(OBJS)
+- $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC)
+- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC)
+
+ install:
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
+@@ -48,15 +47,15 @@
+ $(INSTALL_PROGRAM) -m 644 $(EXEC).socket $(DESTDIR)$(unitdir)
+ endif
+ $(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
+ rm -f $(DESTDIR)$(unitdir)/$(EXEC).service
+ rm -f $(DESTDIR)$(unitdir)/$(EXEC).socket
+
+ clean:
+- rm -f core *.o $(EXEC) *.gz
++ rm -f core *.o $(EXEC)
+
diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.5.0-systemd-pkgconfig.patch b/sys-fs/multipath-tools/files/multipath-tools-0.5.0-systemd-pkgconfig.patch
new file mode 100644
index 000000000000..d75f841361a6
--- /dev/null
+++ b/sys-fs/multipath-tools/files/multipath-tools-0.5.0-systemd-pkgconfig.patch
@@ -0,0 +1,24 @@
+diff -ru multipath-tools-0.5.0/libmultipath/Makefile multipath-tools-0.5.0-modified/libmultipath/Makefile
+--- multipath-tools-0.5.0/libmultipath/Makefile 2013-12-17 22:40:41.000000000 +0100
++++ multipath-tools-0.5.0-modified/libmultipath/Makefile 2014-03-07 04:03:45.963309627 +0100
+@@ -9,7 +9,7 @@
+ LIBS = $(DEVLIB).$(SONAME)
+ LIBDEPS = -lpthread -ldl -ldevmapper -ludev
+ ifdef SYSTEMD
+- LIBDEPS += -lsystemd-daemon
++ LIBDEPS += $(shell pkg-config --libs libsystemd 2>/dev/null || pkg-config --libs libsystemd-daemon 2>/dev/null)
+ endif
+
+ OBJS = memory.o parser.o vector.o devmapper.o callout.o \
+diff -ru multipath-tools-0.5.0/multipathd/Makefile multipath-tools-0.5.0-modified/multipathd/Makefile
+--- multipath-tools-0.5.0/multipathd/Makefile 2014-03-07 04:05:09.340307633 +0100
++++ multipath-tools-0.5.0-modified/multipathd/Makefile 2014-03-07 04:04:03.555309206 +0100
+@@ -11,7 +11,7 @@
+ endif
+ LIBS += -lpthread -ldevmapper -lreadline
+ ifdef SYSTEMD
+- LIBS += -lsystemd-daemon
++ LIBS += $(shell pkg-config --libs libsystemd 2>/dev/null || pkg-config --libs libsystemd-daemon 2>/dev/null)
+ endif
+ LIBS += -ludev -ldl \
+ -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist
diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch b/sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch
new file mode 100644
index 000000000000..cb785899c2ed
--- /dev/null
+++ b/sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch
@@ -0,0 +1,25 @@
+From 100588046ad59176b9779c73212aea63be5aace4 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 12 Sep 2016 17:26:38 -0400
+Subject: [PATCH] multipathd.service: ignore modprobe failures
+
+---
+ multipathd/multipathd.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service
+index e3d6f91..d26577f 100644
+--- a/multipathd/multipathd.service
++++ b/multipathd/multipathd.service
+@@ -11,7 +11,7 @@ Conflicts=shutdown.target
+ Type=notify
+ NotifyAccess=main
+ LimitCORE=infinity
+-ExecStartPre=/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
++ExecStartPre=-/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
+ ExecStart=/sbin/multipathd -d -s
+ ExecReload=/sbin/multipathd reconfigure
+
+--
+2.10.0
+
diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.6.4-sysmacros.patch b/sys-fs/multipath-tools/files/multipath-tools-0.6.4-sysmacros.patch
new file mode 100644
index 000000000000..99a12fc7b784
--- /dev/null
+++ b/sys-fs/multipath-tools/files/multipath-tools-0.6.4-sysmacros.patch
@@ -0,0 +1,60 @@
+diff --git a/kpartx/dasd.c b/kpartx/dasd.c
+index 1206e45..f50c1bd 100644
+--- a/kpartx/dasd.c
++++ b/kpartx/dasd.c
+@@ -28,6 +28,7 @@
+ #include <inttypes.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/ioctl.h>
+ #include <linux/hdreg.h>
+ #include <errno.h>
+diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
+index d31fea8..3452787 100644
+--- a/kpartx/kpartx.c
++++ b/kpartx/kpartx.c
+@@ -28,6 +28,7 @@
+ #include <stdint.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <ctype.h>
+ #include <libdevmapper.h>
+diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
+index 4d6c3c2..d9a9e67 100644
+--- a/libmultipath/checkers/tur.c
++++ b/libmultipath/checkers/tur.c
+@@ -11,6 +11,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
++#include <sys/sysmacros.h>
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <pthread.h>
+diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
+index 4f8ef13..9c0b240 100644
+--- a/libmultipath/devmapper.c
++++ b/libmultipath/devmapper.c
+@@ -12,6 +12,7 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <sys/sysmacros.h>
+
+ #include "checkers.h"
+ #include "vector.h"
+diff --git a/libmultipath/util.c b/libmultipath/util.c
+index 03a5738..1841f35 100644
+--- a/libmultipath/util.c
++++ b/libmultipath/util.c
+@@ -4,6 +4,7 @@
+ #include <pthread.h>
+ #include <string.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+
diff --git a/sys-fs/multipath-tools/files/multipath.rc b/sys-fs/multipath-tools/files/multipath.rc
new file mode 100644
index 000000000000..576026ace683
--- /dev/null
+++ b/sys-fs/multipath-tools/files/multipath.rc
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before checkfs fsck multipathd iscsid lvm
+ after modules device-mapper
+}
+
+start() {
+ if ! grep -qs device-mapper /proc/devices /proc/misc ; then
+ [ -e /proc/modules ] && modprobe -q dm-mod
+ [ -e /proc/modules ] && modprobe -q dm-multipath
+ fi
+
+ ebegin "Activating Multipath devices"
+ multipath -v0 >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Shutting down Multipath devices"
+ multipath -v0 -F >/dev/null
+ eend $?
+}
+
+# vim:ts=4
diff --git a/sys-fs/multipath-tools/files/rc-multipathd b/sys-fs/multipath-tools/files/rc-multipathd
new file mode 100644
index 000000000000..d4d440f2c910
--- /dev/null
+++ b/sys-fs/multipath-tools/files/rc-multipathd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ after modules
+}
+
+start() {
+ ebegin "Starting multipathd"
+ start-stop-daemon --start --quiet --exec /sbin/multipathd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping multipathd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/multipathd.pid
+ eend $?
+}