Since libaio is now in /lib, not /usr/lib, multipath no longer needs to

statically link against it. Fixed an error with binding file and WWIDs
    that include spaces. Cleaned up the messages from the directio checker
    function. Fixed the udev rules. Fixed a regression in multipath.conf
    parsing Fixed 457530, 457589
This commit is contained in:
Benjamin Marzinski 2008-09-26 23:28:36 +00:00
parent 4fa3700b25
commit 765b685946
10 changed files with 138 additions and 128 deletions

13
binding_error.patch Normal file
View File

@ -0,0 +1,13 @@
Index: multipath-tools/libmultipath/alias.c
===================================================================
--- multipath-tools.orig/libmultipath/alias.c
+++ multipath-tools/libmultipath/alias.c
@@ -243,7 +243,7 @@ lookup_binding(FILE *f, char *map_wwid,
curr_id = scan_devname(alias);
if (curr_id >= id)
id = curr_id + 1;
- wwid = strtok(NULL, " \t");
+ wwid = strtok(NULL, "");
if (!wwid){
condlog(3,
"Ignoring malformed line %u in bindings file",

View File

@ -7,14 +7,14 @@ Index: multipath-tools/libmultipath/parser.c
else else
in_string = 1; in_string = 1;
+ } else if (!in_string && (*cp == '{' || *cp == '}')) { + } else if (!in_string && (*cp == '{' || *cp == '}')) {
+ cp++;
+ token = MALLOC(2); + token = MALLOC(2);
+
+ if (!token) + if (!token)
+ goto out; + goto out;
+
+ *(token) = *cp; + *(token) = *cp;
+ *(token + 1) = '\0'; + *(token + 1) = '\0';
+ cp++;
} else { } else {
while ((in_string || while ((in_string ||
(!isspace((int) *cp) && isascii((int) *cp) && (!isspace((int) *cp) && isascii((int) *cp) &&

View File

@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath Name: device-mapper-multipath
Version: 0.4.8 Version: 0.4.8
Release: 6%{?dist} Release: 7%{?dist}
License: GPL+ License: GPL+
Group: System Environment/Base Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/ URL: http://christophe.varoqui.free.fr/
@ -9,16 +9,16 @@ Source0: multipath-tools-080804.tgz
Patch0: linking_change.patch Patch0: linking_change.patch
Patch1: uevent_fix.patch Patch1: uevent_fix.patch
Patch2: sparc64fix.patch Patch2: sparc64fix.patch
Patch3: directio_fix.patch Patch3: config_files.patch
Patch4: config_files.patch Patch4: redhatification.patch
Patch5: redhatification.patch Patch5: mpath_wait.patch
Patch6: mpath_wait.patch Patch6: multipath_rules.patch
Patch7: multipath_rules.patch Patch7: cciss_id.patch
Patch8: cciss_id.patch Patch8: scsi_id_change.patch
Patch9: scsi_id_change.patch Patch9: config_space_fix.patch
Patch10: static_libaio.patch Patch10: fix_devt.patch
Patch11: config_space_fix.patch Patch11: directio_message_cleanup.patch
Patch12: fix_devt.patch Patch12: binding_error.patch
Requires: kpartx = %{version}-%{release} Requires: kpartx = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): chkconfig Requires(post): chkconfig
@ -48,16 +48,16 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0 -p1 -b .linking_change %patch0 -p1 -b .linking_change
%patch1 -p1 -b .uevent_fix %patch1 -p1 -b .uevent_fix
%patch2 -p1 -b .sparc64fix %patch2 -p1 -b .sparc64fix
%patch3 -p1 -b .directio_fix %patch3 -p1 -b .config_files
%patch4 -p1 -b .config_files %patch4 -p1 -b .redhatification
%patch5 -p1 -b .redhatification %patch5 -p1 -b .mpath_wait
%patch6 -p1 -b .mpath_wait %patch6 -p1 -b .multipath_rules
%patch7 -p1 -b .multipath_rules %patch7 -p1 -b .cciss_id
%patch8 -p1 -b .cciss_id %patch8 -p1 -b .scsi_id_change
%patch9 -p1 -b .scsi_id_change %patch9 -p1 -b .config_space_fix
%patch10 -p1 -b .static_libaio %patch10 -p1 -b .fix_devt
%patch11 -p1 -b .config_space_fix %patch11 -p1 -b .directio_message
%patch12 -p1 -b .fix_devt %patch12 -p1 -b .binding_error
%build %build
make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT
@ -109,6 +109,14 @@ fi
%{_mandir}/man8/kpartx.8.gz %{_mandir}/man8/kpartx.8.gz
%changelog %changelog
* Fri Sep 26 2008 Benjamin Marzinski <bmarzins@redhat.com> 0.4.8-7
- Since libaio is now in /lib, not /usr/lib, multipath no longer needs to
statically link against it. Fixed an error with binding file and WWIDs
that include spaces. Cleaned up the messages from the directio checker
function. Fixed the udev rules. Fixed a regression in multipath.conf
parsing
- Fixed 457530, 457589
* Wed Aug 20 2008 Benjamin Marzinski <bmarzins@redhat.com> 0.4.8-6 * Wed Aug 20 2008 Benjamin Marzinski <bmarzins@redhat.com> 0.4.8-6
- Updated to latest upstream 0.4.8 code: multipath-tools-080804.tgz - Updated to latest upstream 0.4.8 code: multipath-tools-080804.tgz
(git commit id: eb87cbd0df8adf61d1c74c025f7326d833350f78) (git commit id: eb87cbd0df8adf61d1c74c025f7326d833350f78)

View File

@ -1,21 +0,0 @@
Index: multipath-tools-temp/libmultipath/checkers/directio.c
===================================================================
--- multipath-tools-temp.orig/libmultipath/checkers/directio.c
+++ multipath-tools-temp/libmultipath/checkers/directio.c
@@ -15,6 +15,7 @@
#include <linux/kdev_t.h>
#include <asm/unistd.h>
#include <libaio.h>
+#include <sys/syscall.h>
#include "checkers.h"
#include "../libmultipath/debug.h"
@@ -148,7 +149,7 @@ check_state(int fd, struct directio_cont
}
ct->running++;
- r = io_getevents(ct->ioctx, 1L, 1L, &event, &timeout);
+ r = syscall(SYS_io_getevents, ct->ioctx, 1L, 1L, &event, &timeout);
LOG(3, "async io getevents returns %li (errno=%s)", r, strerror(errno));
if (r < 1L) {

View File

@ -0,0 +1,15 @@
Index: multipath-tools/libmultipath/checkers/directio.c
===================================================================
--- multipath-tools.orig/libmultipath/checkers/directio.c
+++ multipath-tools/libmultipath/checkers/directio.c
@@ -148,8 +148,9 @@ check_state(int fd, struct directio_cont
}
ct->running++;
+ errno = 0;
r = io_getevents(ct->ioctx, 1L, 1L, &event, &timeout);
- LOG(3, "async io getevents returns %li (errno=%s)", r, strerror(errno));
+ LOG(3, "async io_getevents returns %li (%s)", r, strerror(errno));
if (r < 1L) {
if (ct->running > ASYNC_TIMEOUT_SEC || sync) {

View File

@ -1,7 +1,7 @@
Index: multipath-tools-080519/libmultipath/Makefile Index: multipath-tools/libmultipath/Makefile
=================================================================== ===================================================================
--- multipath-tools-080519.orig/libmultipath/Makefile --- multipath-tools.orig/libmultipath/Makefile
+++ multipath-tools-080519/libmultipath/Makefile +++ multipath-tools/libmultipath/Makefile
@@ -23,14 +23,15 @@ endif @@ -23,14 +23,15 @@ endif
all: $(LIBS) all: $(LIBS)
@ -21,29 +21,48 @@ Index: multipath-tools-080519/libmultipath/Makefile
clean: clean:
rm -f core *.a *.o *.gz *.so rm -f core *.a *.o *.gz *.so
Index: multipath-tools-080519/multipath/Makefile Index: multipath-tools/multipath/Makefile
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipath/Makefile --- multipath-tools.orig/multipath/Makefile
+++ multipath-tools-080519/multipath/Makefile +++ multipath-tools/multipath/Makefile
@@ -6,7 +6,7 @@ include ../Makefile.inc @@ -6,9 +6,8 @@ include ../Makefile.inc
OBJS = main.o OBJS = main.o
-CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir) -CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -lpthread -ldevmapper -laio -ldl \
- -lmultipath -L$(multipathdir)
+CFLAGS += -I$(multipathdir) +CFLAGS += -I$(multipathdir)
LDFLAGS += -lpthread -ldevmapper -laio -ldl \ +LDFLAGS += -lpthread -ldevmapper -ldl -lmultipath -L$(multipathdir)
-lmultipath -L$(multipathdir)
Index: multipath-tools-080519/multipathd/Makefile EXEC = multipath
Index: multipath-tools/multipathd/Makefile
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipathd/Makefile --- multipath-tools.orig/multipathd/Makefile
+++ multipath-tools-080519/multipathd/Makefile +++ multipath-tools/multipathd/Makefile
@@ -5,7 +5,7 @@ include ../Makefile.inc @@ -5,8 +5,8 @@ include ../Makefile.inc
# #
# basic flags setting # basic flags setting
# #
-CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir) -CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio -ldl \
+CFLAGS += -I$(multipathdir) +CFLAGS += -I$(multipathdir)
LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio -ldl \ +LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ldl \
-lmultipath -L$(multipathdir) -lmultipath -L$(multipathdir)
#
Index: multipath-tools/libmultipath/checkers/Makefile
===================================================================
--- multipath-tools.orig/libmultipath/checkers/Makefile
+++ multipath-tools/libmultipath/checkers/Makefile
@@ -17,6 +17,9 @@ CFLAGS += -I..
all: $(LIBS)
+libcheckdirectio.so: libsg.o directio.o
+ $(CC) $(SHARED_FLAGS) -o $@ $^ -laio
+
libcheck%.so: libsg.o %.o
$(CC) $(SHARED_FLAGS) -o $@ $^

View File

@ -1,7 +1,7 @@
Index: multipath-tools-080515/multipath/Makefile Index: multipath-tools/multipath/Makefile
=================================================================== ===================================================================
--- multipath-tools-080515.orig/multipath/Makefile --- multipath-tools.orig/multipath/Makefile
+++ multipath-tools-080515/multipath/Makefile +++ multipath-tools/multipath/Makefile
@@ -23,7 +23,7 @@ install: @@ -23,7 +23,7 @@ install:
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) mpath_wait $(DESTDIR)$(bindir)/ $(INSTALL_PROGRAM) -m 755 $(EXEC) mpath_wait $(DESTDIR)$(bindir)/
@ -20,24 +20,22 @@ Index: multipath-tools-080515/multipath/Makefile
rm $(DESTDIR)$(bindir)/$(EXEC) rm $(DESTDIR)$(bindir)/$(EXEC)
rm $(DESTDIR)$(bindir)/mpath_wait rm $(DESTDIR)$(bindir)/mpath_wait
rm $(DESTDIR)$(mandir)/$(EXEC).8.gz rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
Index: multipath-tools-080515/multipath/multipath.rules Index: multipath-tools/multipath/multipath.rules
=================================================================== ===================================================================
--- multipath-tools-080515.orig/multipath/multipath.rules --- multipath-tools.orig/multipath/multipath.rules
+++ multipath-tools-080515/multipath/multipath.rules +++ multipath-tools/multipath/multipath.rules
@@ -1,7 +1,9 @@ @@ -1,7 +1,8 @@
-# -#
-# udev rules for multipathing. -# udev rules for multipathing.
-# The persistent symlinks are created with the kpartx rules -# The persistent symlinks are created with the kpartx rules
-# -#
- -
-# socket for uevents -# socket for uevents
-RUN+="socket:/org/kernel/dm/multipath_event"
+# multipath wants the devmaps presented as meaninglful device names +# multipath wants the devmaps presented as meaninglful device names
+# so name them after their devmap name +# so name them after their devmap name
+SUBSYSTEM!="block", GOTO="end_mpath" +SUBSYSTEM!="block", GOTO="end_mpath"
+KERNEL!="dm-[0-9]*", ACTION=="add", PROGRAM=="/bin/bash -c '/sbin/lsmod | /bin/grep ^dm_multipath'", RUN+="/sbin/multipath -v0 %M:%m" RUN+="socket:/org/kernel/dm/multipath_event"
+KERNEL!="dm-[0-9]*", GOTO="end_mpath" +KERNEL!="dm-[0-9]*", GOTO="end_mpath"
+PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath" +PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath"
+ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m" +ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
+PROGRAM!="/bin/bash -c '/sbin/dmsetup info -c --noheadings -j %M -m %m | /bin/grep -q .*:.*:.*:.*:.*:.*:.*:part[0-9]*-mpath-'", GOTO="end_mpath"
+LABEL="end_mpath" +LABEL="end_mpath"

View File

@ -1,17 +1,17 @@
Index: multipath-tools-080519/libmultipath/defaults.h Index: multipath-tools/libmultipath/defaults.h
=================================================================== ===================================================================
--- multipath-tools-080519.orig/libmultipath/defaults.h --- multipath-tools.orig/libmultipath/defaults.h
+++ multipath-tools-080519/libmultipath/defaults.h +++ multipath-tools/libmultipath/defaults.h
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#define DEFAULT_GETUID "/lib/udev/scsi_id -g -u -s /block/%n" -#define DEFAULT_GETUID "/lib/udev/scsi_id -g -u -s /block/%n"
+#define DEFAULT_GETUID "/sbin/scsi_id -g -u -s /block/%n" +#define DEFAULT_GETUID "/sbin/scsi_id -g -u -s /block/%n"
#define DEFAULT_UDEVDIR "/dev" #define DEFAULT_UDEVDIR "/dev"
#define DEFAULT_MULTIPATHDIR "/lib/multipath" #define DEFAULT_MULTIPATHDIR "/lib/multipath"
#define DEFAULT_SELECTOR "round-robin 0" #define DEFAULT_SELECTOR "round-robin 0"
Index: multipath-tools-080519/libmultipath/hwtable.c Index: multipath-tools/libmultipath/hwtable.c
=================================================================== ===================================================================
--- multipath-tools-080519.orig/libmultipath/hwtable.c --- multipath-tools.orig/libmultipath/hwtable.c
+++ multipath-tools-080519/libmultipath/hwtable.c +++ multipath-tools/libmultipath/hwtable.c
@@ -172,7 +172,7 @@ static struct hwentry default_hw[] = { @@ -172,7 +172,7 @@ static struct hwentry default_hw[] = {
/* HP Smart Array */ /* HP Smart Array */
.vendor = "HP", .vendor = "HP",
@ -39,7 +39,7 @@ Index: multipath-tools-080519/libmultipath/hwtable.c
.features = "1 queue_if_no_path", .features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER, .hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR, .selector = DEFAULT_SELECTOR,
@@ -705,6 +705,22 @@ static struct hwentry default_hw[] = { @@ -722,6 +722,22 @@ static struct hwentry default_hw[] = {
.checker_name = RDAC, .checker_name = RDAC,
.prio_name = PRIO_RDAC, .prio_name = PRIO_RDAC,
}, },
@ -62,10 +62,10 @@ Index: multipath-tools-080519/libmultipath/hwtable.c
/* /*
* EOL * EOL
*/ */
Index: multipath-tools-080519/multipath.conf.annotated Index: multipath-tools/multipath.conf.annotated
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipath.conf.annotated --- multipath-tools.orig/multipath.conf.annotated
+++ multipath-tools-080519/multipath.conf.annotated +++ multipath-tools/multipath.conf.annotated
@@ -55,9 +55,9 @@ @@ -55,9 +55,9 @@
# # scope : multipath # # scope : multipath
# # desc : the default program and args to callout to obtain a unique # # desc : the default program and args to callout to obtain a unique
@ -87,10 +87,10 @@ Index: multipath-tools-080519/multipath.conf.annotated
# #
# # # #
# # name : path_selector # # name : path_selector
Index: multipath-tools-080519/multipath.conf.defaults Index: multipath-tools/multipath.conf.defaults
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipath.conf.defaults --- multipath-tools.orig/multipath.conf.defaults
+++ multipath-tools-080519/multipath.conf.defaults +++ multipath-tools/multipath.conf.defaults
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
# polling_interval 5 # polling_interval 5
# selector "round-robin 0" # selector "round-robin 0"
@ -452,10 +452,10 @@ Index: multipath-tools-080519/multipath.conf.defaults
+# prio rdac +# prio rdac
+# } +# }
#} #}
Index: multipath-tools-080519/multipath.conf.synthetic Index: multipath-tools/multipath.conf.synthetic
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipath.conf.synthetic --- multipath-tools.orig/multipath.conf.synthetic
+++ multipath-tools-080519/multipath.conf.synthetic +++ multipath-tools/multipath.conf.synthetic
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
# polling_interval 10 # polling_interval 10
# selector "round-robin 0" # selector "round-robin 0"
@ -474,10 +474,10 @@ Index: multipath-tools-080519/multipath.conf.synthetic
# path_checker directio # path_checker directio
# path_selector "round-robin 0" # path_selector "round-robin 0"
# hardware_handler "0" # hardware_handler "0"
Index: multipath-tools-080519/Makefile.inc Index: multipath-tools/Makefile.inc
=================================================================== ===================================================================
--- multipath-tools-080519.orig/Makefile.inc --- multipath-tools.orig/Makefile.inc
+++ multipath-tools-080519/Makefile.inc +++ multipath-tools/Makefile.inc
@@ -20,7 +20,7 @@ libudevdir = ${prefix}/lib/udev @@ -20,7 +20,7 @@ libudevdir = ${prefix}/lib/udev
multipathdir = $(TOPDIR)/libmultipath multipathdir = $(TOPDIR)/libmultipath
mandir = $(prefix)/usr/share/man/man8 mandir = $(prefix)/usr/share/man/man8
@ -487,10 +487,10 @@ Index: multipath-tools-080519/Makefile.inc
libdir = $(prefix)/lib/multipath libdir = $(prefix)/lib/multipath
GZIP = /bin/gzip -9 -c GZIP = /bin/gzip -9 -c
Index: multipath-tools-080519/multipathd/Makefile Index: multipath-tools/multipathd/Makefile
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipathd/Makefile --- multipath-tools.orig/multipathd/Makefile
+++ multipath-tools-080519/multipathd/Makefile +++ multipath-tools/multipathd/Makefile
@@ -35,6 +35,7 @@ install: @@ -35,6 +35,7 @@ install:
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
@ -499,10 +499,10 @@ Index: multipath-tools-080519/multipathd/Makefile
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
Index: multipath-tools-080519/multipathd/multipathd.init.redhat Index: multipath-tools/multipathd/multipathd.init.redhat
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipathd/multipathd.init.redhat --- multipath-tools.orig/multipathd/multipathd.init.redhat
+++ multipath-tools-080519/multipathd/multipathd.init.redhat +++ multipath-tools/multipathd/multipathd.init.redhat
@@ -1,13 +1,9 @@ @@ -1,13 +1,9 @@
#!/bin/bash #!/bin/bash
- -
@ -561,10 +561,10 @@ Index: multipath-tools-080519/multipathd/multipathd.init.redhat
esac esac
exit $RETVAL exit $RETVAL
Index: multipath-tools-080519/multipath/Makefile Index: multipath-tools/multipath/Makefile
=================================================================== ===================================================================
--- multipath-tools-080519.orig/multipath/Makefile --- multipath-tools.orig/multipath/Makefile
+++ multipath-tools-080519/multipath/Makefile +++ multipath-tools/multipath/Makefile
@@ -28,6 +28,10 @@ install: @@ -28,6 +28,10 @@ install:
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir) $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
@ -576,10 +576,10 @@ Index: multipath-tools-080519/multipath/Makefile
uninstall: uninstall:
rm $(DESTDIR)/etc/udev/rules.d/multipath.rules rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
Index: multipath-tools-080519/multipath/multipath.conf.redhat Index: multipath-tools/multipath/multipath.conf.redhat
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ multipath-tools-080519/multipath/multipath.conf.redhat +++ multipath-tools/multipath/multipath.conf.redhat
@@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
+# This is a basic configuration file with some examples, for device mapper +# This is a basic configuration file with some examples, for device mapper
+# multipath. +# multipath.
@ -678,10 +678,10 @@ Index: multipath-tools-080519/multipath/multipath.conf.redhat
+# path_grouping_policy multibus +# path_grouping_policy multibus
+# } +# }
+#} +#}
Index: multipath-tools-080519/kpartx/Makefile Index: multipath-tools/kpartx/Makefile
=================================================================== ===================================================================
--- multipath-tools-080519.orig/kpartx/Makefile --- multipath-tools.orig/kpartx/Makefile
+++ multipath-tools-080519/kpartx/Makefile +++ multipath-tools/kpartx/Makefile
@@ -20,10 +20,10 @@ $(EXEC): $(OBJS) @@ -20,10 +20,10 @@ $(EXEC): $(OBJS)
install: $(EXEC) $(EXEC).8 install: $(EXEC) $(EXEC).8
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)

View File

@ -1,22 +0,0 @@
Index: multipath-tools/multipath/Makefile
===================================================================
--- multipath-tools.orig/multipath/Makefile
+++ multipath-tools/multipath/Makefile
@@ -7,7 +7,7 @@ include ../Makefile.inc
OBJS = main.o
CFLAGS += -I$(multipathdir)
-LDFLAGS += -lpthread -ldevmapper -laio -ldl \
+LDFLAGS += -lpthread -ldevmapper -Wl,-Bstatic,-laio,-Bdynamic -ldl \
-lmultipath -L$(multipathdir)
EXEC = multipath
@@ -15,7 +15,7 @@ EXEC = multipath
all: $(EXEC)
$(EXEC): $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS)
+ $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) -Wl,-undefined=io_submit,-undefined=io_getevents,-undefined=io_destroy,-undefined=io_setup $(LDFLAGS) -rdynamic
$(GZIP) $(EXEC).8 > $(EXEC).8.gz
$(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz

View File

@ -1,8 +1,8 @@
Index: multipath-tools-080515/multipathd/main.c Index: multipath-tools/multipathd/main.c
=================================================================== ===================================================================
--- multipath-tools-080515.orig/multipathd/main.c --- multipath-tools.orig/multipathd/main.c
+++ multipath-tools-080515/multipathd/main.c +++ multipath-tools/multipathd/main.c
@@ -619,14 +619,20 @@ uxsock_trigger (char * str, char ** repl @@ -602,14 +602,20 @@ uxsock_trigger (char * str, char ** repl
static int static int
uev_discard(char * devpath) uev_discard(char * devpath)
{ {