Skip to content

Commit

Permalink
Update packaging bits to build scst-dbg package
Browse files Browse the repository at this point in the history
This commits updates the Debian packaging bits to build scst-dbg
package for kernel modules linked with debug kernel.

SCST kernel modules linked with debug kernel need to packaged
differently so that they can co-exist with SCST package for
modules built for production kernel.

The updates in packaging bits are minimal would only apply if
KVERS environment variable is configured for debug kernel for
TrueNAS SCALE.

Signed-off-by: Umer Saleem <[email protected]>
  • Loading branch information
usaleem-ix authored and bmeagherix committed Apr 26, 2024
1 parent a82ce1a commit af24fd0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,16 @@ dpkg: ../scst_$(VERSION).orig.tar.gz
echo "KVER=$(KVER)" && \
sed 's/%{scst_version}/$(VERSION)/' \
<debian/scst.dkms.in >debian/scst.dkms && \
sed 's/%{KVER}/$(KVER)/' \
<debian/scst.preinst.in >debian/scst.preinst && \
sed 's/%{KVER}/$(KVER)/' \
<debian/scst.postinst.in >debian/scst.postinst && \
if echo "$(KVER)" | grep -q "debug+truenas"; then \
mv debian/scst.install debian/scst-dbg.install && \
sed 's/%{KVER}/$(KVER)/' \
<debian/scst.postinst.in >debian/scst-dbg.postinst; \
else \
sed 's/%{KVER}/$(KVER)/' \
<debian/scst.preinst.in >debian/scst.preinst && \
sed 's/%{KVER}/$(KVER)/' \
<debian/scst.postinst.in >debian/scst.postinst; \
fi && \
output_files=( \
../*_$(VERSION)-$(DEBIAN_REVISION)_*.deb \
../*_$(VERSION)-$(DEBIAN_REVISION)_*.ddeb \
Expand Down
18 changes: 18 additions & 0 deletions debian/control.dbgmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: scst
Section: net
Priority: optional
Maintainer: Vladislav Bolkhovitin <[email protected]>
Build-Depends: debhelper (>= 9),
quilt,
dpkg-dev (>= 1.13.19)
Standards-Version: 4.1.1
Homepage: http://scst.sourceforge.net

Package: scst-dbg
Architecture: any
Depends: ${misc:Depends}
Conflicts: scst-dkms
Description: Generic SCSI target framework
SCST is a SCSI target framework that allows local block device data to be
accessed over a storage network via the iSCSI, FC, SRP or FCoE protocol.
This package contains the SCST kernel modules.
9 changes: 7 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/')
clean:
dh_testdir && \
dh_prep -Xqla_isp/TAGS -Xdebian/changelog && \
scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \
-x debian/scst.postinst
if echo "$(KVER)" | grep -q "debug+truenas"; then \
scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst-dbg.install \
-x debian/scst-dbg.postinst ; \
else \
scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \
-x debian/scst.postinst ; \
fi

build:
[ -n "$(QLA_INI_DIR)" ] && \
Expand Down

0 comments on commit af24fd0

Please sign in to comment.