Bug#1009179: dkms: Upstream has removed mkdeb|mkdsc|mkbmdeb
Hello everyone, In case anyone is interested in ZFS packages: I created a bit hacky way to package ZFS binary modules for Debian 12 which uses dkms mktarball --binaries-only underneath. If someone wants to take a look the package is on GitHub: https://github.com/fihufil/debian-zfs-modules It builds packages just fine but there is one gotcha: the packages are unsigned so it won't work on systems with Secure Boot enabled. KR, Filip Dorosz
Bug#1009179: dkms: Upstream has removed mkdeb|mkdsc|mkbmdeb
Hi everyone, On Fri, 08 Apr 2022 13:04:04 +0300 Jaak Pruulmann-Vengerfeldt wrote: > With the new upstream version arriving in unstable, it is not clear what > is now the proper way to create binary-only module packages, for > example? Now it reached stable/bookworm ... I just ran into it and are in desperate need for packaging (also zfs), do first tried to manually reverse the changes referenced above, but there were too many changes, so I started to manually craft the package on basis of a working bullseye package. This needs polishing, yet it "works for me", so maybe it is of some use for anyone trying to package zfs modules. ---%< #!/bin/bash export LANG=C DETECTED_VERSION="" # be smart and try to detect if we have only one kernel if [ "$( find /lib/modules/ -maxdepth 1 -mindepth 1 -type d | sed -e 's%/% %g' | awk '{print $NF }' | wc -l )" == "1" ] then DETECTED_VERSION=$( find /lib/modules/ -maxdepth 1 -mindepth 1 -type d | sed -e 's%/% %g' | awk '{print $NF }' ) fi KERNEL_VERSION=${1:-$DETECTED_VERSION} if [ "$KERNEL_VERSION" == "" ] then echo "ERROR: Please provide kernel version!" exit 1 fi if [ ! -e "/usr/lib/modules/$KERNEL_VERSION/updates/dkms/zfs.ko" ] then if [ -e "/usr/lib/modules/${KERNEL_VERSION}-amd64/updates/dkms/zfs.ko" ] then KERNEL_VERSION=${KERNEL_VERSION}-amd64 else echo "ERROR: ZFS module for kernel $KERNEL_VERSION was not found, cannot continue!" echo "" find /usr/lib/modules/*/updates/* -type f exit 1 fi fi ZFS_VERSION=$( modinfo /lib/modules/${KERNEL_VERSION}/updates/dkms/zfs.ko | grep ^version | awk '{ print $NF }' | cut -d- -f1 ) TMPDIR="/tmp/build.$KERNEL_VERSION" rm -rf $TMPDIR mkdir -p $TMPDIR/debian cd $TMPDIR mkdir -p src/lib/modules/$KERNEL_VERSION/updates/dkms cp -R /usr/lib/modules/$KERNEL_VERSION/updates/dkms/*.ko src/lib/modules/$KERNEL_VERSION/updates/dkms cat > debian/changelog < $( date +"%a, %d %b %Y %H:%M:%S %z" ) EOF cat > debian/control < Section: misc Priority: optional Standards-Version: 4.5.1 Build-Depends: bash (>= 4.2), debhelper (>= 13) Package: zfs-modules-${KERNEL_VERSION} Architecture: amd64 Depends: linux-image-${KERNEL_VERSION} Provides: zfs-modules Description: zfs binary drivers for linux-image-${KERNEL_VERSION} This package contains zfs drivers for the ${KERNEL_VERSION} Linux kernel, built from zfs-dkms for the amd64 architecture. EOF echo 13 > debian/compat cat > Makefile <<'EOF' all: install: @cp -R src/* $(DESTDIR) clean-all: @rm -rf src/* EOF cat >debian/rules <<'EOF' #!/usr/bin/make -f %: dh $@ EOF chmod +x debian/rules dpkg-buildpackage -d -b -us -uc 1>/dev/null rm -rf $TMPDIR >%--- -- Best regards Andreas STEINEL M.Sc. Visual Computing, M.Sc. Informatik Durchwahl: +49 6881 5 91 eXirius IT Dienstleistungen GmbH Juchem-Straße 24 | 66571 Eppelborn T +49 6881 5 0 | i...@exirius.de http://www.exirius.de Amtsgericht Saarbrücken HRB 12124 Geschäftsführer: Michael Royar, Claus Cullmann eXirius ist Mitglied im Netzwerk Digital Fellows www.fellows.digital
Bug#1009179: dkms: Upstream has removed mkdeb|mkdsc|mkbmdeb
Package: dkms Version: 2.8.4-3 Followup-For: Bug #1009179 I'd like to also signal that I'm interested in keeping this functionality around. I looked at the current dkms source and it's not *that* complicatd. It's basically one (rather big, 100 lines) shell function which does everything. Also, it seems to me we should be able to get away with just replicating mkdsc: once we have a source package, we can use our normal tools to build the rest... It looks like it's basically: invoke_command "cp -ar '$DEBDIR/' '$temp_dir_debian'" "copying template" invoke_command "cp -Lpr '$dkms_tree/$module/$module_version/source' '$temp_dir_debian/$module-$module_version'" "Copying source tree" invoke_command "dpkg-buildpackage -S -us -uc 1>/dev/null" "Building source package" || \ Now obviously, maybe those templates are gone too so we'd need to keep that up to date, but it seems that's somewhat feasible... -- System Information: Debian Release: 11.3 APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable'), (1, 'unstable'), (1, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.0-14-amd64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages dkms depends on: ii build-essential 12.9 ii coreutils8.32-4+b1 ii dctrl-tools 2.24-3+b1 ii dpkg-dev 1.20.9 ii gcc [c-compiler] 4:10.2.1-1 ii gcc-10 [c-compiler] 10.2.1-6 ii kmod 28-1 ii lsb-release 11.1.0 ii make 4.3-4.1 ii patch2.7.6-7 Versions of packages dkms recommends: ii fakeroot 1.25.3-1.1 ii linux-headers-amd64 [linux-headers-generic] 5.10.113-1 ii sudo 1.9.5p2-3 Versions of packages dkms suggests: ii e2fsprogs 1.46.2-2 pn menu -- debconf-show failed
Bug#1009179: dkms: Upstream has removed mkdeb|mkdsc|mkbmdeb
The commit message for https://github.com/dell/dkms/commit/68b083eaa3f71c166adfece8e4f760e0cdf96185 says: "Distributions know much better than us, what is the proper way to package a DKMS module. Remove in-tree, semi-constantly out-of-date code." and a comment on https://github.com/dell/dkms/issues/70 says: "Distribution specific packaging was severely broken for most distributions and has been dropped in the latest release." This indicates that upstream has no interest in including or maintaining distro-specific module packaging (and, indeed, mkrpm has been removed from dkms too). So, if upstream won't do it, perhaps debian's package of dkms should include extra scripts providing the debian-specific functionality removed from dkms. `dkms-mkbmdeb`, for example, could be a standalone wrapper script that uses `dkms mktarball --binaries-only`. It could be based on the mkbmdeb code removed from dkms. ditto for `dkms-mkdeb` and `dkms-mkdsc` scripts. Having separate scripts would also make it easier to keep dkms up-to-date with upstream without having to patch it on every build. craig PS: not having to have the linux headers and a complete build environment on every machine would be useful. My fastest machine, for example, can compile the ZFS dkms module in a minute or so (per kernel version, and I typically have at least two, current and previous on every machine) while my other machines can easily take 15 or 20 minutes or more.
Bug#1009179: dkms: Upstream has removed mkdeb|mkdsc|mkbmdeb
control: forwarded -1 https://github.com/dell/dkms/issues On Fri, 08 Apr 2022 13:04:04 +0300 Jaak Pruulmann-Vengerfeldt wrote: Package: dkms Version: 3.0.3-1 Severity: important Tags: upstream Dear Maintainer, It appears that dkms upstream has removed support for mkdeb, mkdsc and mkbmdeb -- https://github.com/dell/dkms/commit/68b083eaa3f71c166adfece8e4f760e0cdf96185 From that commit one can't really see if there have been any discussions. With the new upstream version arriving in unstable, it is not clear what is now the proper way to create binary-only module packages, for example? Our packaging seems to assume that all the support is still there in upstream.. With best regards, jaak. Hello, please consider joining the upstream discussion or open a defect there. G.
Bug#1009179: dkms: Upstream has removed mkdeb|mkdsc|mkbmdeb
Package: dkms Version: 3.0.3-1 Severity: important Tags: upstream Dear Maintainer, It appears that dkms upstream has removed support for mkdeb, mkdsc and mkbmdeb -- https://github.com/dell/dkms/commit/68b083eaa3f71c166adfece8e4f760e0cdf96185 >From that commit one can't really see if there have been any discussions. With the new upstream version arriving in unstable, it is not clear what is now the proper way to create binary-only module packages, for example? Our packaging seems to assume that all the support is still there in upstream.. With best regards, jaak. -- System Information: Debian Release: bookworm/sid APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 5.16.0-5-amd64 (SMP w/4 CPU threads; PREEMPT) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=et_EE.UTF-8, LC_CTYPE=et_EE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages dkms depends on: ii coreutils 8.32-4.1 ii dctrl-tools 2.24-3+b1 ii dpkg-dev 1.21.7 ii gcc [c-compiler] 4:11.2.0-2 ii gcc-10 [c-compiler] 10.3.0-15 ii gcc-11 [c-compiler] 11.2.0-19 ii gcc-4.4 [c-compiler] 4.4.7-8 ii gcc-4.5 [c-compiler] 4.5.4-1 ii gcc-4.6 [c-compiler] 4.6.4-7 ii gcc-4.7 [c-compiler] 4.7.4-3 ii gcc-4.9 [c-compiler] 4.9.4-2 ii gcc-5 [c-compiler]5.5.0-12 ii gcc-6 [c-compiler]6.5.0-2 ii gcc-9 [c-compiler]9.4.0-5 ii kmod 29-1 ii lsb-release 11.1.0 ii make 4.3-4.1 ii patch 2.7.6-7 Versions of packages dkms recommends: ii fakeroot 1.28-1 ii linux-headers-amd64 [linux-headers-generic] 5.16.18-1 ii sudo 1.9.10-3 Versions of packages dkms suggests: ii e2fsprogs 1.46.5-2 pn menu -- Configuration Files: /etc/dkms/framework.conf changed [not included] -- no debconf information