--- ipvsadm/Makefile +++ ipvsadm/Makefile 2022/09/06 11:41:13 @@ -37,10 +37,11 @@ RPMSPECDIR = $(shell rpm --eval '%_specd CC = gcc INCLUDE = -SBIN = $(BUILD_ROOT)/sbin +SBINDIR = /sbin +SBIN = $(BUILD_ROOT)$(SBINDIR) MANDIR = usr/man -MAN = $(BUILD_ROOT)/$(MANDIR)/man8 -INIT = $(BUILD_ROOT)/etc/rc.d/init.d +MAN = $(BUILD_ROOT)$(MANDIR)/man8 +INIT = $(BUILD_ROOT)/etc/init.d MKDIR = mkdir INSTALL = install STATIC_LIBS = libipvs/libipvs.a @@ -87,7 +88,7 @@ libs: make -C libipvs ipvsadm: $(OBJS) $(STATIC_LIBS) - $(CC) $(CFLAGS) -o $@ $^ $(LIBS) + $(CC) $(CFLAGS) -pie -o $@ $^ $(LIBS) install: all if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi @@ -99,7 +100,7 @@ install: all $(INSTALL) -m 0644 ipvsadm-save.8 $(MAN) $(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN) [ -d $(INIT) ] || $(MKDIR) -p $(INIT) - $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm + $(INSTALL) -m 0754 ipvsadm.sh $(INIT)/ipvsadm clean: rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz