Package: osmocom-dahdi-dkms
Version: 0.0~git20241003.b2ea348-3
Severity: grave
Justification: renders package unusable
X-Debbugs-Cc: gag...@debian.org

Dear Maintainer,

When trying to install the osmocom-dahdi-dkms package on unstable, the
build of the modules fail. This is because the dkms.conf file in not
located in the correct location. The #MODULE_VERSION# string not being
interpreted by dh_dkms:

        $ dpkg -L osmocom-dahdi-dkms
        /.
        /usr
        /usr/share
        /usr/share/doc
        /usr/share/doc/osmocom-dahdi-dkms
        /usr/share/doc/osmocom-dahdi-dkms/LICENSE.firmware
        /usr/share/doc/osmocom-dahdi-dkms/README
        /usr/share/doc/osmocom-dahdi-dkms/changelog.Debian.gz
        /usr/share/doc/osmocom-dahdi-dkms/copyright
        /usr/src
        /usr/src/osmocom-dahdi-#MODULE_VERSION#
        /usr/src/osmocom-dahdi-#MODULE_VERSION#/dkms.conf
        /usr/src/osmocom-dahdi-0.0~git20241003.b2ea348
        /usr/src/osmocom-dahdi-0.0~git20241003.b2ea348/Makefile
        ...

This regression seems to be coming from this commit in the salsa
repository of the source package:

        commit 2b4c1196b441237bb30a469494379076d2980ee5
        Author: Andreas Beckmann <a...@debian.org>
        Date:   Sat Feb 8 00:02:10 2025 +0100

                simplify debian/rules

        ...

        diff --git a/debian/rules b/debian/rules
        index 3382d61..b46c561 100755
        --- a/debian/rules
        +++ b/debian/rules
        @@ -5,28 +5,11 @@

         include /usr/share/dpkg/pkg-info.mk

        -export DEB_BUILD_MAINT_OPTIONS = hardening=+all
        -
         %:
        -       dh $@ --with autoreconf
        -
        -# Don't want to build. Just send source code to
        -# package to be built by DKMS
        -override_dh_auto_build:
        +       dh $@ --buildsystem none

        ...

Switching to the "none" buildsystem seems to prevent dh_dkms from being
run, even if it Build-Depends on dh-sequence-dkms.

One simple solution to this problem that I have experimented locally is
to pass the "--with dkms" option to dh in the debian/rules file:

        diff --git c/debian/rules i/debian/rules
        index b46c561..991f6f0 100755
        --- c/debian/rules
        +++ i/debian/rules
        @@ -6,7 +6,7 @@
         include /usr/share/dpkg/pkg-info.mk

         %:
        -       dh $@ --buildsystem none
        +       dh $@ --buildsystem none --with dkms

Since "dh-sequence-dkms" is broken for this usecase, maybe the
Build-Depends should also be switched from "dh-sequence-dkms" to
"dh-dkms" if it is accepted.

After applying this patch the dkms.conf file is correctly located with
the source files in ./usr/src/osmocom-dahdi-0.0~git20241003.b2ea348/,
showing that dh_dkms was able to substitute the value correctly.

I will attach a patch to this bug, as well as create a merge request on
the salsa repository, as soon as I get back the bug number from the BTS.

Thanks.

Reply via email to