diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index c53d5e1..18f8c01 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,7 +1,7 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.4.8 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -103,6 +103,9 @@ fi %{_mandir}/man8/kpartx.8.gz %changelog +* Mon May 19 2008 Benjamin Marzinksi 0.4.8-2 +- Forgot to commit some patches. + * Mon May 19 2008 Benjamin Marzinski 0.4.8-1 - Updated to latest Upstream 0.4.8 code: multipath-tools-080519.tgz (git commit id: 42704728855376d2f7da2de1967d7bc71bc54a2f) diff --git a/makefiles_fix.patch b/makefiles_fix.patch new file mode 100644 index 0000000..976fd0e --- /dev/null +++ b/makefiles_fix.patch @@ -0,0 +1,53 @@ +Index: multipath-tools-080519/libmultipath/Makefile +=================================================================== +--- multipath-tools-080519.orig/libmultipath/Makefile ++++ multipath-tools-080519/libmultipath/Makefile +@@ -26,11 +26,11 @@ $(LIBS): $(OBJS) + $(CC) $(SHARED_FLAGS) $(CFLAGS) -o $@ $(OBJS) + + install: +- $(INSTALL_PROGRAM) -o root -g root -m 755 -d $(libdir) +- $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(libdir)/$(LIBS) ++ $(INSTALL_PROGRAM) -o root -g root -m 755 -d $(DESTDIR)$(libdir) ++ $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(DESTDIR)$(libdir)/$(LIBS) + + uninstall: +- rm -f $(libdir)/$(LIBS) ++ rm -f $(DESTDIR)$(libdir)/$(LIBS) + + clean: + rm -f core *.a *.o *.gz *.so +Index: multipath-tools-080519/libmultipath/checkers/Makefile +=================================================================== +--- multipath-tools-080519.orig/libmultipath/checkers/Makefile ++++ multipath-tools-080519/libmultipath/checkers/Makefile +@@ -21,10 +21,10 @@ libcheck%.so: libsg.o %.o + $(CC) $(SHARED_FLAGS) -o $@ $^ + + install: +- $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(libdir) ++ $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(DESTDIR)$(libdir) + + uninstall: +- rm -f $(libdir)/$(LIBS) ++ rm -f $(DESTDIR)$(libdir)/$(LIBS) + + clean: + rm -f core *.a *.o *.gz *.so +Index: multipath-tools-080519/libmultipath/prioritizers/Makefile +=================================================================== +--- multipath-tools-080519.orig/libmultipath/prioritizers/Makefile ++++ multipath-tools-080519/libmultipath/prioritizers/Makefile +@@ -25,10 +25,10 @@ libprio%.so: %.o + $(CC) $(SHARED_FLAGS) -o $@ $^ + + install: $(LIBS) +- install -m 755 libprio*.so $(libdir) ++ $(INSTALL_PROGRAM) -m 755 libprio*.so $(DESTDIR)$(libdir) + + uninstall: +- rm -f $(libdir)/libprio*.so ++ rm -f $(DESTDIR)$(libdir)/libprio*.so + + clean: + rm -f core *.a *.o *.gz *.so diff --git a/uevent_debug.patch b/uevent_debug.patch new file mode 100644 index 0000000..39c424d --- /dev/null +++ b/uevent_debug.patch @@ -0,0 +1,28 @@ +Index: multipath-tools-080515/multipathd/main.c +=================================================================== +--- multipath-tools-080515.orig/multipathd/main.c ++++ multipath-tools-080515/multipathd/main.c +@@ -619,14 +619,20 @@ uxsock_trigger (char * str, char ** repl + static int + uev_discard(char * devpath) + { ++ char *tmp; + char a[10], b[10]; + + /* + * keep only block devices, discard partitions + */ +- if (sscanf(devpath, "/block/%10s", a) != 1 || +- sscanf(devpath, "/block/%10[^/]/%10s", a, b) == 2) { +- condlog(4, "discard event on %s", devpath); ++ tmp = strstr(devpath, "/block/"); ++ if (tmp == NULL){ ++ condlog(0, "no /block/ in '%s'", devpath); ++ return 1; ++ } ++ if (sscanf(tmp, "/block/%10s", a) != 1 || ++ sscanf(tmp, "/block/%10[^/]/%10s", a, b) == 2) { ++ condlog(0, "discard event on %s", devpath); + return 1; + } + return 0;