Forgot to commit some patches.

This commit is contained in:
Benjamin Marzinski 2008-05-20 04:42:36 +00:00
parent 685fcac1ef
commit d8126f9922
3 changed files with 85 additions and 1 deletions

View File

@ -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 <bmarzins@redhat.com> 0.4.8-2
- Forgot to commit some patches.
* Mon May 19 2008 Benjamin Marzinski <bmarzins@redhat.com> 0.4.8-1
- Updated to latest Upstream 0.4.8 code: multipath-tools-080519.tgz
(git commit id: 42704728855376d2f7da2de1967d7bc71bc54a2f)

53
makefiles_fix.patch Normal file
View File

@ -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

28
uevent_debug.patch Normal file
View File

@ -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;