From 13ca37d6a932fde1887b476d980e2744d60555ec Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 17:52:01 +0000 Subject: [PATCH] scst: Use 'make modules_install' instead of 'install' for installing kernel modules This patch ensures that the proper SELinux label is applied to all SCST kernel modules. This was reported by Rob Turk. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7779 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scst/src/Makefile b/scst/src/Makefile index f4ba3fd3b..3da5a5225 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -110,10 +110,11 @@ install: all echo Error: the scst and/or scst-devel RPMs must be uninstalled first; \ false; fi -rm -f $(INSTALL_DIR)/scsi_tgt.ko - install -d $(INSTALL_DIR) - install -d $(INSTALL_DIR)/dev_handlers - install -m 644 dev_handlers/*.ko $(INSTALL_DIR)/dev_handlers - install -m 644 scst.ko $(INSTALL_DIR) + $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/dev_handlers \ + modules_install + $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true)\ + modules_install install -d $(INSTALL_DIR_H) header_files="backport.h scst.h scst_const.h scst_debug.h \ scst_itf_ver.h scst_sgv.h scst_user.h"; \ @@ -122,7 +123,6 @@ install: all done rm -f $(INSTALL_DIR_H)/$(MODULE_SYMVERS) install -m 644 $(MODULE_SYMVERS) $(INSTALL_DIR_H) - -/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER) mkdir -p $(DESTDIR)/var/lib/scst/pr mkdir -p $(DESTDIR)/var/lib/scst/dif_tags mkdir -p $(DESTDIR)/var/lib/scst/vdev_mode_pages