Blame SOURCES/0013-RHBZ-883981-cleanup-rpmdiff-issues.patch

4ae388
---
4ae388
 Makefile.inc                       |    9 +++++----
4ae388
 kpartx/Makefile                    |    2 +-
4ae388
 libmpathpersist/Makefile           |    4 ++--
4ae388
 libmultipath/Makefile              |    1 +
4ae388
 libmultipath/checkers/Makefile     |    2 +-
4ae388
 libmultipath/prioritizers/Makefile |    2 +-
4ae388
 multipath/Makefile                 |    2 +-
4ae388
 multipathd/Makefile                |    5 +++--
4ae388
 8 files changed, 15 insertions(+), 12 deletions(-)
4ae388
4ae388
Index: multipath-tools-130222/Makefile.inc
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/Makefile.inc
4ae388
+++ multipath-tools-130222/Makefile.inc
4ae388
@@ -23,15 +23,15 @@ endif
4ae388
 
4ae388
 prefix      = 
4ae388
 exec_prefix = $(prefix)
4ae388
-bindir      = $(exec_prefix)/sbin
4ae388
+bindir      = $(exec_prefix)/usr/sbin
4ae388
 libudevdir  = ${prefix}/lib/udev
4ae388
 multipathdir = $(TOPDIR)/libmultipath
4ae388
 mandir      = $(prefix)/usr/share/man/man8
4ae388
 man5dir     = $(prefix)/usr/share/man/man5
4ae388
 man3dir      = $(prefix)/usr/share/man/man3
4ae388
 rcdir	    = $(prefix)/etc/rc.d/init.d
4ae388
-syslibdir   = $(prefix)/$(LIB)
4ae388
-libdir	    = $(prefix)/$(LIB)/multipath
4ae388
+syslibdir   = $(prefix)/usr/$(LIB)
4ae388
+libdir	    = $(prefix)/usr/$(LIB)/multipath
4ae388
 unitdir     = $(prefix)/lib/systemd/system
4ae388
 mpathpersistdir = $(TOPDIR)/libmpathpersist
4ae388
 
4ae388
@@ -42,8 +42,9 @@ ifndef RPM_OPT_FLAGS
4ae388
 	RPM_OPT_FLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
4ae388
 endif
4ae388
 
4ae388
+LDFLAGS     += -Wl,-z,relro
4ae388
 OPTFLAGS     = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes
4ae388
-CFLAGS	     = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
4ae388
+CFLAGS	     = $(OPTFLAGS) -DLIB_STRING=\"${LIB}\"
4ae388
 SHARED_FLAGS = -shared
4ae388
 
4ae388
 %.o:	%.c
4ae388
Index: multipath-tools-130222/multipathd/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/multipathd/Makefile
4ae388
+++ multipath-tools-130222/multipathd/Makefile
4ae388
@@ -5,9 +5,10 @@ include ../Makefile.inc
4ae388
 #
4ae388
 # basic flags setting
4ae388
 #
4ae388
-CFLAGS += -I$(multipathdir) -I$(mpathpersistdir)
4ae388
+CFLAGS += -fPIE -DPIE -I$(multipathdir) -I$(mpathpersistdir)
4ae388
 LDFLAGS += -lpthread -ldevmapper -lreadline -ludev -ldl \
4ae388
-	   -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist
4ae388
+	   -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \
4ae388
+	   -Wl,-z,now -pie
4ae388
 
4ae388
 #
4ae388
 # debuging stuff
4ae388
Index: multipath-tools-130222/kpartx/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/kpartx/Makefile
4ae388
+++ multipath-tools-130222/kpartx/Makefile
4ae388
@@ -4,7 +4,7 @@
4ae388
 #
4ae388
 include ../Makefile.inc
4ae388
 
4ae388
-CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
4ae388
+CFLAGS += -fPIC -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
4ae388
 
4ae388
 LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h)
4ae388
 
4ae388
Index: multipath-tools-130222/libmpathpersist/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmpathpersist/Makefile
4ae388
+++ multipath-tools-130222/libmpathpersist/Makefile
4ae388
@@ -10,7 +10,7 @@ DEVLIB = libmpathpersist.so
4ae388
 LIBS = $(DEVLIB).$(SONAME)
4ae388
 
4ae388
 
4ae388
-CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) 
4ae388
+CFLAGS += -fPIC -I$(multipathdir) -I$(mpathpersistdir)
4ae388
 LIBDEPS +=  -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath
4ae388
 
4ae388
 OBJS = mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o 
4ae388
@@ -19,7 +19,7 @@ all: $(LIBS)
4ae388
 
4ae388
 
4ae388
 $(LIBS): 
4ae388
-	$(CC) -Wall -fPIC -c $(CFLAGS) *.c 
4ae388
+	$(CC) -Wall -c $(CFLAGS) *.c
4ae388
 	$(CC)  -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
4ae388
 	ln -s $(LIBS) $(DEVLIB)
4ae388
 	$(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz	
4ae388
Index: multipath-tools-130222/libmultipath/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmultipath/Makefile
4ae388
+++ multipath-tools-130222/libmultipath/Makefile
4ae388
@@ -8,6 +8,7 @@ SONAME=0
4ae388
 DEVLIB = libmultipath.so
4ae388
 LIBS = $(DEVLIB).$(SONAME)
4ae388
 LIBDEPS = -lpthread -ldl -ldevmapper -ludev
4ae388
+CFLAGS += -fPIC
4ae388
 
4ae388
 OBJS = memory.o parser.o vector.o devmapper.o \
4ae388
        hwtable.o blacklist.o util.o dmparser.o config.o \
4ae388
Index: multipath-tools-130222/libmultipath/checkers/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmultipath/checkers/Makefile
4ae388
+++ multipath-tools-130222/libmultipath/checkers/Makefile
4ae388
@@ -14,7 +14,7 @@ LIBS= \
4ae388
 	libcheckhp_sw.so \
4ae388
 	libcheckrdac.so
4ae388
 
4ae388
-CFLAGS += -I..
4ae388
+CFLAGS += -fPIC -I..
4ae388
 
4ae388
 all: $(LIBS)
4ae388
 
4ae388
Index: multipath-tools-130222/libmultipath/prioritizers/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmultipath/prioritizers/Makefile
4ae388
+++ multipath-tools-130222/libmultipath/prioritizers/Makefile
4ae388
@@ -17,7 +17,7 @@ LIBS = \
4ae388
 	libprioweightedpath.so \
4ae388
 	libprioiet.so
4ae388
 
4ae388
-CFLAGS += -I..
4ae388
+CFLAGS += -fPIC -I..
4ae388
 
4ae388
 all: $(LIBS)
4ae388
 
4ae388
Index: multipath-tools-130222/multipath/Makefile
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/multipath/Makefile
4ae388
+++ multipath-tools-130222/multipath/Makefile
4ae388
@@ -6,7 +6,7 @@ include ../Makefile.inc
4ae388
 
4ae388
 OBJS = main.o
4ae388
 
4ae388
-CFLAGS += -I$(multipathdir)
4ae388
+CFLAGS += -fPIC -I$(multipathdir)
4ae388
 LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath
4ae388
 
4ae388
 EXEC = multipath