Skip to content

Commit

Permalink
pass through DEBUG_MODE_LEVEL to dpkg make target
Browse files Browse the repository at this point in the history
It's quite strange but we can't run `make dpkg` with other
debug mode level.
  • Loading branch information
shlemisto authored and lnocturno committed Jan 9, 2023
1 parent 23252a4 commit 95c9bdc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ else
KDIR=/lib/modules/$(KVER)/build
endif

DEBUG_MODE_LEVEL ?= 2release

OLD_QLA_INI_DIR=qla2x00t
OLD_QLA_DIR=$(OLD_QLA_INI_DIR)/qla2x00-target

Expand Down Expand Up @@ -440,7 +442,8 @@ dpkg: ../scst_$(VERSION).orig.tar.gz
buildopts+=(-j4); \
fi && \
DEB_CC_SET="$(CC)" DEB_KVER_SET=$(KVER) DEB_KDIR_SET=$(KDIR) DEB_QLA_DIR_SET=$(QLA_DIR) \
DEB_QLA_INI_DIR_SET=$(QLA_INI_DIR) debuild "$${buildopts[@]}" --lintian-opts --profile debian && \
DEB_QLA_INI_DIR_SET=$(QLA_INI_DIR) DEB_DEBUG_MODE_LEVEL=$(DEBUG_MODE_LEVEL) \
debuild "$${buildopts[@]}" --lintian-opts --profile debian && \
mkdir -p dpkg && \
for f in "$${output_files[@]}" ../scst_$(VERSION).orig.tar.[gx]z; do\
mv $$f dpkg || true; \
Expand Down
8 changes: 5 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export KDIR=$(DEB_KDIR_SET)
export CC=$(DEB_CC_SET)
export QLA_DIR=$(DEB_QLA_DIR_SET)
export QLA_INI_DIR=$(DEB_QLA_INI_DIR_SET)
export DEBUG_MODE_LEVEL=$(DEB_DEBUG_MODE_LEVEL)

SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(KVER) && echo fcst) iscsi-scst $(QLA_DIR) scst_local scstadmin srpt
DESTDIR=$(CURDIR)/debian/tmp
Expand All @@ -37,7 +38,7 @@ clean:

build:
[ -n "$(QLA_INI_DIR)" ] && \
make 2release && \
make $(DEBUG_MODE_LEVEL) && \
export BUILD_2X_MODULE=y && \
export CONFIG_SCSI_QLA_FC=y && \
export CONFIG_SCSI_QLA2XXX_TARGET=y && \
Expand Down Expand Up @@ -70,11 +71,12 @@ install:
break; \
fi; \
done && \
make 2debug && \
make $(DEBUG_MODE_LEVEL) && \
rm -f "$(DESTDIR)"/lib/modules/*/[Mm]odule* && \
mkdir -p $(DESTDIR)/usr/src/scst-$(VERSION) && \
for f in scst.dkms scst-dkms.postinst scst-dkms.prerm; do \
sed "s/\$${PACKAGE_VERSION}/$(VERSION)/" \
sed "s/\$${PACKAGE_VERSION}/$(VERSION)/; \
s/\$${DEBUG_MODE_LEVEL}/$(DEBUG_MODE_LEVEL)/" \
< debian/$$f.in >debian/$$f || exit $?; \
done && \
cp debian/scst.dkms \
Expand Down
2 changes: 1 addition & 1 deletion debian/scst.dkms.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PACKAGE_VERSION="${PACKAGE_VERSION}"
PACKAGE_NAME="scst"
AUTOINSTALL=yes
MAKE[0]="export KVER=${kernelver} KDIR=${kernel_source_dir} BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y && make 2release && make -sC scst && make -sC fcst && make -sC iscsi-scst && make -sC qla2x00t-32gbit/qla2x00-target && make -sC scst_local && make -sC srpt"
MAKE[0]="export KVER=${kernelver} KDIR=${kernel_source_dir} BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y && make ${DEBUG_MODE_LEVEL} && make -sC scst && make -sC fcst && make -sC iscsi-scst && make -sC qla2x00t-32gbit/qla2x00-target && make -sC scst_local && make -sC srpt"
CLEAN="make clean"
# Remove any existing ib_srpt.ko kernel modules
PRE_INSTALL="find /lib/modules/${kernelver} -name ib_srpt.ko -exec rm {} \;"
Expand Down

0 comments on commit 95c9bdc

Please sign in to comment.