From 80424661171d99125d70f5514617e9ab1b00b9c5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 27 Aug 2021 17:56:28 +0000 Subject: [PATCH 1/3] scstadmin/init.d/scst: Remove the 'which' invocation Remove the invocation of the 'which' command since that command has been deprecated in Debian 11 and since I am not aware of any other portable approach for querying the path of a command. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9494 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 2 -- 1 file changed, 2 deletions(-) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 3c6acdaa1..9490e1b29 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -69,8 +69,6 @@ fi PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin SCST_DFLT=/etc/default/scst -[ -x "$(which scstadmin)" ] || exit 5 - if [ -f $SCST_DFLT ]; then . $SCST_DFLT fi From 27a74601a5f7be849aaa19967246d7e8ecdbfc8c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 27 Aug 2021 17:57:47 +0000 Subject: [PATCH 2/3] Makefile, dpkg: Show $(KVER) and $(KDIR) while building a Debian package git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9495 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4d44a96b0..c1495df45 100644 --- a/Makefile +++ b/Makefile @@ -380,12 +380,14 @@ debian/compat: dpkg: ../scst_$(VERSION).orig.tar.gz @[ -z "$$DEBEMAIL" ] || export DEBEMAIL=bvanassche@acm.org && \ [ -z "$$DEBFULLNAME" ] || export DEBFULLNAME="Bart Van Assche" &&\ + echo "KDIR=$(KDIR)" && \ + echo "KVER=$(KVER)" && \ sed 's/%{scst_version}/$(VERSION)/' \ debian/scst.dkms && \ - sed 's/%{KVER}/$(KVER)/' \ - debian/scst.preinst && \ - sed 's/%{KVER}/$(KVER)/' \ - debian/scst.postinst && \ + sed 's/%{KVER}/$(KVER)/' \ + debian/scst.preinst && \ + sed 's/%{KVER}/$(KVER)/' \ + debian/scst.postinst && \ output_files=( \ ../*_$(VERSION)-$(DEBIAN_REVISION)_*.deb \ ../*_$(VERSION)-$(DEBIAN_REVISION)_*.ddeb \ From d5cee6ebf4e62f4f92c040cfaac33381e1c203b6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 27 Aug 2021 17:58:27 +0000 Subject: [PATCH 3/3] Makefile: Make sure that $(KVER) and $(KDIR) are set These variables are needed for building Debian packages. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9496 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index c1495df45..7dee4f530 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,11 @@ ifdef KDIR cat $(KDIR)/include/config/kernel.release 2>/dev/null || \ make -s -C $(KDIR) kernelversion)) endif +else + ifndef KVER + KVER=$(strip $(shell uname -r)) + endif + KDIR=/lib/modules/$(KVER)/build endif ifeq ($(QLA_32GBIT),no)