forked from pool/multipath-tools
184 lines
5.6 KiB
Plaintext
184 lines
5.6 KiB
Plaintext
diff --git a/Makefile b/Makefile
|
|
index a099daf..54be0a5 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -25,7 +25,6 @@ BUILDDIRS = \
|
|
libmultipath/checkers \
|
|
multipath \
|
|
multipathd \
|
|
- devmap_name \
|
|
kpartx
|
|
|
|
ifeq ($(MULTIPATH_VERSION),)
|
|
diff --git a/Makefile.inc b/Makefile.inc
|
|
index 622f557..0d00303 100644
|
|
--- a/Makefile.inc
|
|
+++ b/Makefile.inc
|
|
@@ -13,7 +13,7 @@ ifeq ($(TOPDIR),)
|
|
TOPDIR = ..
|
|
endif
|
|
|
|
-prefix =
|
|
+prefix =
|
|
exec_prefix = $(prefix)
|
|
bindir = $(exec_prefix)/sbin
|
|
libudevdir = ${prefix}/lib/udev
|
|
@@ -26,8 +26,8 @@ libdir = $(prefix)/lib/multipath
|
|
GZIP = /bin/gzip -9 -c
|
|
INSTALL_PROGRAM = install
|
|
|
|
-OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes -fPIC
|
|
-CFLAGS = $(OPTFLAGS)
|
|
+OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
|
|
+CFLAGS = $(OPTFLAGS) -fPIC
|
|
SHARED_FLAGS = -shared
|
|
|
|
%.o: %.c
|
|
diff --git a/kpartx/Makefile b/kpartx/Makefile
|
|
index 21e4ad4..ef08d37 100644
|
|
--- a/kpartx/Makefile
|
|
+++ b/kpartx/Makefile
|
|
@@ -15,21 +15,19 @@ all: $(EXEC)
|
|
|
|
$(EXEC): $(OBJS)
|
|
$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
|
|
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
|
|
-
|
|
+
|
|
install: $(EXEC) $(EXEC).8
|
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
|
$(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) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
|
|
+ $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/70-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
|
|
|
|
clean:
|
|
- rm -f core *.o $(EXEC) *.gz
|
|
+ rm -f core *.o $(EXEC)
|
|
diff --git a/libmultipath/Makefile b/libmultipath/Makefile
|
|
index 55721e8..d4bcbef 100644
|
|
--- a/libmultipath/Makefile
|
|
+++ b/libmultipath/Makefile
|
|
@@ -28,9 +28,8 @@ all: $(LIBS)
|
|
$(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: $(LIBS)
|
|
+ $(INSTALL_PROGRAM) -D $(LIBS) $(DESTDIR)$(libdir)/$(LIBS)
|
|
|
|
uninstall:
|
|
rm -f $(libdir)/$(LIBS)
|
|
diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
|
|
index 9b517f2..dbc09ba 100644
|
|
--- a/libmultipath/checkers/Makefile
|
|
+++ b/libmultipath/checkers/Makefile
|
|
@@ -21,7 +21,7 @@ libcheck%.so: libsg.o %.o
|
|
$(CC) $(SHARED_FLAGS) -o $@ $^
|
|
|
|
install:
|
|
- $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(libdir)
|
|
+ $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)
|
|
|
|
uninstall:
|
|
rm -f $(libdir)/$(LIBS)
|
|
diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile
|
|
index c05d457..46bb936 100644
|
|
--- a/libmultipath/prioritizers/Makefile
|
|
+++ b/libmultipath/prioritizers/Makefile
|
|
@@ -25,7 +25,7 @@ libprio%.so: %.o
|
|
$(CC) $(SHARED_FLAGS) -o $@ $^
|
|
|
|
install: $(LIBS)
|
|
- install -m 755 libprio*.so $(libdir)
|
|
+ install -m 755 libprio*.so $(DESTDIR)$(libdir)
|
|
|
|
uninstall:
|
|
rm -f $(libdir)/libprio*.so
|
|
diff --git a/libmultipath/prioritizers/hds.c b/libmultipath/prioritizers/hds.c
|
|
index 6ebe4d8..f3d4cb3 100644
|
|
--- a/libmultipath/prioritizers/hds.c
|
|
+++ b/libmultipath/prioritizers/hds.c
|
|
@@ -86,7 +86,7 @@
|
|
int hds_modular_prio (const char *dev, int fd)
|
|
{
|
|
int k;
|
|
- char vendor[8];
|
|
+ char vendor[9];
|
|
char product[32];
|
|
char serial[32];
|
|
char ldev[32];
|
|
diff --git a/multipath/Makefile b/multipath/Makefile
|
|
index bb44e3e..ed7ede1 100644
|
|
--- a/multipath/Makefile
|
|
+++ b/multipath/Makefile
|
|
@@ -16,24 +16,20 @@ all: $(EXEC)
|
|
|
|
$(EXEC): $(OBJS)
|
|
$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS)
|
|
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
|
|
- $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
|
|
|
|
install:
|
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
|
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
|
$(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/71-multipath.rules
|
|
$(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)/etc/udev/rules.d/multipath.rules
|
|
rm $(DESTDIR)$(bindir)/$(EXEC)
|
|
- rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
|
|
- rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
|
|
|
|
clean:
|
|
- rm -f core *.o $(EXEC) *.gz
|
|
+ rm -f core *.o $(EXEC)
|
|
diff --git a/multipath/multipath.rules b/multipath/multipath.rules
|
|
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
|
index dd223c4..5143b6b 100644
|
|
--- a/multipathd/Makefile
|
|
+++ b/multipathd/Makefile
|
|
@@ -29,20 +29,18 @@ all : $(EXEC)
|
|
|
|
$(EXEC): $(OBJS)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS)
|
|
- $(GZIP) $(EXEC).8 > $(EXEC).8.gz
|
|
|
|
install:
|
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
|
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
|
|
$(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir)
|
|
$(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
|
|
|
|
clean:
|
|
- rm -f core *.o $(EXEC) *.gz
|
|
+ rm -f core *.o $(EXEC)
|
|
|
|
diff --git a/multipathd/multipathd.init.suse b/multipathd/multipathd.init.suse
|