Hi Andreas, thank you so much for your fast reply!
Quoting Andreas Beckmann (2024-01-03 02:53:20) > Which dkms package version was used to build the failing package? Does█ > it make a difference (or even ftbfs) if it gets rebuilt with 3.0.12-3? According to the Installed-Build-Depends field of the .buildinfo, the package was built with dh-dkms (= 3.0.12-3): https://source.mnt.re/reform/reform-debian-packages/-/jobs/2724/raw Quoting Andreas Beckmann (2024-01-03 03:00:15) > Can you install dkms-test-dkms and/or dkms-noautoinstall-test-dkms ? Oh I didn't know that those packages existed, thank you! If I replace my reform2-lpc-dkms package with either of those, it works fine. This suggests that my package does something that used to work in the past but fails with the new dkms version? In an effort to get a bit further I patched the dkms package and added a "set +x" to dkms_common.postinst which seems to be the part that failed. Now I get this in my log: + [ -z reform2_lpc ] + [ -z 1.34 ] + [ -f /etc/dkms/no-autoinstall ] + [ -r /etc/dkms/framework.conf ] + . /etc/dkms/framework.conf + + cut -d/ -f4 ls -dv /lib/modules/6.6.9-reform2-arm64/build + KERNELS=6.6.9-reform2-arm64 + uname -r + CURRENT_KERNEL=6.5.0-0.deb12.4-reform2-arm64 + [ -e /var/lib/dkms/reform2_lpc/1.34 ] + [ -f /usr/share/reform2_lpc-dkms/reform2_lpc-1.34.dkms.tar.gz ] + [ -d /usr/src/reform2_lpc-1.34 ] + echo Loading new reform2_lpc-1.34 DKMS files... Loading new reform2_lpc-1.34 DKMS files... + dkms add -m reform2_lpc -v 1.34 + AUTOINSTALL= + . /var/lib/dkms/reform2_lpc/1.34/source/dkms.conf + autoinstall= dpkg: error processing package reform2-lpc-dkms (--configure): installed reform2-lpc-dkms package post-installation script subprocess returned error exit status 127 The contents of /var/lib/dkms/reform2_lpc/1.34/source/dkms.conf are: PACKAGE_NAME="reform2_lpc" PACKAGE_VERSION="1.34" BUILT_MODULE_NAME[0]="reform2_lpc" DEST_MODULE_LOCATION[0]="/extra" AUTOINSTALL="yes" When I source that file in a dash shell I get: sh: 3: /var/lib/dkms/reform2_lpc/1.34/source/dkms.conf: BUILT_MODULE_NAME[0]=reform2_lpc: not found sh: 4: /var/lib/dkms/reform2_lpc/1.34/source/dkms.conf: DEST_MODULE_LOCATION[0]=/extra: not found This makes sense because the [0] syntax is a bashism and not compatible with POSIX shell. This also explains the exit status 127 I initially received which indicates "command not found" as dash tries to run 'BUILT_MODULE_NAME[0]' and fails to find an executable named like that. I also see that dkms version 3.0.12-1 is missing this line in its /usr/lib/dkms/common.postinst and thus does not trigger this problem: autoinstall=$(AUTOINSTALL=; . "/var/lib/dkms/$NAME/$VERSION/source/dkms.conf" >/dev/null 2>&1; echo $AUTOINSTALL) That line was added in debian/patches/only-autobuild-AUTOINSTALL-yes-modules.patch in https://salsa.debian.org/debian/dkms/-/commit/5cd92a30769dfaa2223f160ee83e8afcd9aacb9c Is the [0] suffix not allowed anymore or are the dkms.conf files expected to be sourced only in a bash shell? The following patch fixes my problem by sourcing the dkms.conf in a bash sub-shell: --- dkms-3.0.12/debian/patches/only-autobuild-AUTOINSTALL-yes-modules.patch 2024-01-02 14:10:36.000000000 +0100 +++ dkms-3.0.12/debian/patches/only-autobuild-AUTOINSTALL-yes-modules.patch 2024-01-03 06:26:30.000000000 +0100 @@ -4,7 +4,7 @@ dkms add -m $NAME -v $VERSION > /dev/null fi -+autoinstall=$(AUTOINSTALL=; . "/var/lib/dkms/$NAME/$VERSION/source/dkms.conf" >/dev/null 2>&1; echo $AUTOINSTALL) ++autoinstall=$(bash -c 'AUTOINSTALL=; . "/var/lib/dkms/$1/$2/source/dkms.conf" >/dev/null 2>&1; echo $AUTOINSTALL' -- "$NAME" "$VERSION") +if [ -z "$autoinstall" ]; then + echo "Not building the $NAME module which does not have AUTOINSTALL enabled." + exit 0 What do you think? Thanks! cheers, josch
signature.asc
Description: signature