Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2019-10-08 19:57:44 -07:00
8 changed files with 43 additions and 24 deletions

View File

@@ -5,7 +5,7 @@
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (not a .c file).
SBINDIR := /usr/local/sbin
SBINDIR := $(PREFIX)/sbin
INITDIR := /etc/init.d
RCDIR := /etc/rc.d
@@ -24,17 +24,9 @@ include/iscsi_scst_itf_ver.h: include/iscsi_scst.h
install: all
@install -vD -m 755 usr/iscsi-scstd $(DESTDIR)$(SBINDIR)/iscsi-scstd
@install -vD -m 755 usr/iscsi-scst-adm $(DESTDIR)$(SBINDIR)/iscsi-scst-adm
if [ -f /etc/debian_version ]; then \
install -vD -m 755 etc/initd/initd.debian $(DESTDIR)$(INITDIR)/iscsi-scst; \
elif [ -f /etc/redhat-release ]; then \
install -vD -m 755 etc/initd/initd.redhat $(DESTDIR)$(INITDIR)/iscsi-scst; \
elif [ -f /etc/gentoo-release ]; then \
install -vD -m 755 etc/initd/initd.gentoo $(DESTDIR)$(INITDIR)/iscsi-scst; \
elif [ -f /etc/slackware-version ]; then \
install -vD -m 755 etc/initd/initd $(DESTDIR)$(RCDIR)/iscsi-scst; \
else \
install -vD -m 755 etc/initd/initd $(DESTDIR)$(INITDIR)/iscsi-scst; \
fi
@install -vD -m 644 doc/manpages/iscsi-scstd.conf.5 $(DESTDIR)$(MANDIR)/man5/iscsi-scstd.conf.5
@install -vD -m 644 doc/manpages/iscsi-scstd.8 $(DESTDIR)$(MANDIR)/man8/iscsi-scstd.8
@install -vD -m 644 doc/manpages/iscsi-scst-adm.8 $(DESTDIR)$(MANDIR)/man8/iscsi-scst-adm.8
clean:
$(MAKE) -C usr clean

View File

@@ -9,7 +9,12 @@ fi
scst_dir=$(dirname "$(cd "$(dirname "$0")" && pwd)")
CONFIG_MODULE_SIG_HASH=$(sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$/\1/p' "${KDIR}/.config")
if [ ! -e "${KDIR}/scripts/sign-file" ]; then
echo "Not signing modules because no sign-file executable"
exit
fi
CONFIG_MODULE_SIG_HASH=$(sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$/\1/p' "${KDIR}/.config" | { read -r line; [ -n "$line" ] && echo "$line" || echo sha256; })
sed 's,^kernel/,,' < modules.order | \
while read -r f; do

View File

@@ -72,8 +72,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))", stmnt)
gsub("defined\\(USE_PRE_440_WR_STRUCTURE\\)",
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) || " \
"RHEL_RELEASE_CODE -0 >= 7 * 256 + 6)", stmnt)
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0))", stmnt)
gsub("defined\\(IB_CREATE_CQ_HAS_INIT_ATTR\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) || " \
@@ -84,8 +83,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
"RHEL_RELEASE_CODE -0 >= 7 * 256 + 6)", stmnt)
gsub("defined\\(IB_CM_LISTEN_TAKES_FOURTH_ARG\\)",
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) || " \
"RHEL_RELEASE_CODE -0 >= 7 * 256 + 6)", stmnt)
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0))", stmnt)
gsub("defined\\(IB_CLIENT_REMOVE_TAKES_TWO_ARGS\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) || " \
@@ -103,7 +101,12 @@ function evaluate(stmnt, pattern, arg, op, result) {
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))", stmnt)
gsub("HAVE_DEV_ATTR_MAX_SEND_SGE",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))", stmnt)
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || " \
"RHEL_RELEASE_CODE -0 >= 8 * 256 + 0)", stmnt)
gsub("defined\\(HAVE_DEV_ATTR_MAX_RECV_SGE\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || " \
"RHEL_RELEASE_CODE -0 >= 8 * 256 + 0)", stmnt)
gsub("HAVE_RDMA_DESTROY_AH_WITH_FLAGS",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0))", stmnt)
@@ -125,8 +128,7 @@ function evaluate(stmnt, pattern, arg, op, result) {
"RHEL_RELEASE_CODE -0 >= 6 * 256 + 10)", stmnt)
gsub("defined\\(HAVE_IB_QUERY_DEVICE\\)",
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) || " \
"RHEL_RELEASE_CODE -0 >= 7 * 256 + 6)", stmnt)
"(LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0))", stmnt)
gsub("defined\\(MAD_HANDLER_TAKES_SEND_BUF\\)",
"(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) || " \

View File

@@ -224,9 +224,18 @@ true
%files devel
%defattr(-,root,root,0755)
%dir /usr/include/scst
/usr/include/scst/
/usr/include/scst/Module.symvers
/usr/include/scst/backport.h
/usr/include/scst/scst.h
/usr/include/scst/scst_const.h
/usr/include/scst/scst_debug.h
/usr/include/scst/scst_itf_ver.h
/usr/include/scst/scst_sgv.h
/usr/include/scst/scst_user.h
%changelog
* Tue Oct 8 2019 Bart Van Assche <bvanassche@acm.org>
- Make this spec file compatible with rpmbuild v4.14.
* Wed May 6 2015 Bart Van Assche <bart.vanassche@sandisk.com>
- Build in release mode instead of debug mode.
* Mon May 4 2015 Bart Van Assche <bart.vanassche@sandisk.com>

View File

@@ -195,9 +195,18 @@ rm -rf /usr/local/include/scst
%files devel
%defattr(-,root,root,0755)
%dir /usr/include/scst
/usr/include/scst/
/usr/include/scst/Module.symvers
/usr/include/scst/backport.h
/usr/include/scst/scst.h
/usr/include/scst/scst_const.h
/usr/include/scst/scst_debug.h
/usr/include/scst/scst_itf_ver.h
/usr/include/scst/scst_sgv.h
/usr/include/scst/scst_user.h
%changelog
* Tue Oct 8 2019 Bart Van Assche <bvanassche@acm.org>
- Make this spec file compatible with rpmbuild v4.14.
* Wed May 6 2015 Bart Van Assche <bart.vanassche@sandisk.com>
- Build in release mode instead of debug mode.
* Mon May 4 2015 Bart Van Assche <bart.vanassche@sandisk.com>

View File

@@ -23,7 +23,8 @@
#include <linux/version.h>
#include <linux/bio.h>
#include <linux/blkdev.h> /* struct request_queue */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0) || \
(defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 8)
#include <linux/blk-mq.h>
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)

View File

@@ -130,6 +130,7 @@ install: all
-rm -f $(INSTALL_DIR)/scsi_tgt.ko
KDIR=$(KDIR) ../../scripts/sign-modules
$(MAKE) -C $(KDIR) M=$(shell pwd)/dev_handlers \
INSTALL_MOD_DIR=extra/dev_handlers \
$$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \
CONFIG_MODULE_SIG_ALL= modules_install
$(MAKE) -C $(KDIR) M=$(shell pwd) \

View File

@@ -1,4 +1,4 @@
CONFIG_MODULE_SIG_HASH := $(shell sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$$/\1/p' "$(KDIR)/.config")
CONFIG_MODULE_SIG_HASH := $(shell sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$$/\1/p' "$(KDIR)/.config" | { read -r line; [ -n "$$line" ] && echo "$$line" || echo sha256; })
all: $(shell grep -q '^CONFIG_MODULE_SIG=y$$' "$(KDIR)/.config" && \
echo module_signing_enabled)