• Bug#1095728: mimic-dkms: dkms fails on a module for 6.12.13-cloud-amd64

    From Andreas Beckmann@21:1/5 to Eric Long on Tue Feb 11 14:30:01 2025
    Hi Eric,

    thanks for explaining whats' going on here, now I also understand the
    need for your other "weird" dependencies.

    On 2/11/25 12:32, Eric Long wrote:
    `extract-linux` from kernel source code tries to do it at first (it only supports bzImage, so another custom binary runs to extract vmlinux from zImage, etc.). -cloud variant of kernel compresses with LZ4 unlike XZ
    found in other variants, and `extract-linux` fails without lz4 installed
    in the chroot.

    That wasn't obvious from the error message I got.

    To support all kernel compression methods, I included lz4, xz-utils and others in mimic-dkms' Recommends.

    Seems like autopkgtest does not bring
    in recommended packages,

    intentionally ;-)

    and xz is brought in by other packages that
    Depends on it.

    You don't need to care about xz-utils:
    mimic-dkms -> dkms -> dpkg-dev -> xz-utils

    How should I make it work? Should I include lz4 and xz-utils in Depends rather than Recommends, or is there a way to bring in extra packages in autopkgtest?

    While we could add extra dependencies for the autopkgtest, I'm not sure
    whether that's the right way.
    I think you should promote lz4 (and any other compressor used for
    official linux-image-*, but I doubt there are more) to Depends s.t. your package works out-of-the box for all official Debian kernel images.
    All other decompressors that could be used by other kernel builds can
    stay in Recommends.

    mimic-dkms + Depends has a footprint of 43.7 MB on a really minimal
    amd64 chroot, lz4 has a footprint of additional 274kb, so that is
    negligible.


    I'm going to try again with lz4 and on more architectures ...

    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Beckmann@21:1/5 to All on Wed Feb 12 10:40:01 2025
    This is a multi-part MIME message sent by reportbug.


    Followup-For: Bug #1095728

    autopkgtest also works for ppc64el and arm64 in qemu chroots.
    I'm updating the autopkgtest patch since we need an arch restriction
    because the package is not arch:any, otherwise the tests would fail on unsupported architectures.


    That oldest supported kernel seems to be 6.6, for 6.5 I get

    DKMS (dkms-3.1.5) make.log for mimic/0.6.3+ds for kernel 6.5.0-5-amd64 (x86_64) Wed Feb 12 08:01:44 UTC 2025

    Cleaning build area
    # command: make clean KERNEL_UNAME=6.5.0-5-amd64
    rm -rf build dkms.conf AKMBUILD
    [ ! -d /lib/modules/6.5.0-5-amd64/build ] || make -C /lib/modules/6.5.0-5-amd64/build M=/var/lib/dkms/mimic/0.6.3+ds/build clean
    make[1]: Entering directory '/usr/src/linux-headers-6.5.0-5-amd64'
    make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-5-amd64'

    # exit code: 0
    # elapsed time: 00:00:00 ----------------------------------------------------------------

    Building module(s)
    # command: make -j14 KERNELRELEASE=6.5.0-5-amd64 KERNEL_UNAME=6.5.0-5-amd64 CHECKSUM_HACK=kfunc
    cp -rL /lib/modules/6.5.0-5-amd64/build build PATH="$PATH:/usr/lib/mimic:/var/lib/dkms/mimic/0.6.3+ds/build/../out:/var/lib/dkms/mimic/0.6.3+ds/build/../tools" vmlinux-to-btf >build/vmlinux
    ERROR: no boot image found; specify BOOT_DIR and VMLINUX_SUFFIX to match $BOOT_DIR/vmlinu{x,z}$VMLINUX_SUFFIX
    make: *** [Makefile:69: build] Error 1

    # exit code: 2
    # elapsed time: 00:00:00 ----------------------------------------------------------------

    This is probably nothing that needs to be fixed.
    Instead I'm documenting the fact in dkms.conf by setting BUILD_EXCLUSIVE_KERNEL_MIN="6.6". You may want to add a comment with an explanation.


    Andreas

    From 92a1b779da1a4926e229d2c95c981d63e93fcc54 Mon Sep 17 00:00:00 2001
    From: Andreas Beckmann <anbe@debian.org>
    Date: Tue, 11 Feb 2025 00:26:56 +0100
    Subject: [PATCH 1/3] declare Testsuite: autopkgtest-pkg-dkms

    ---
    debian/changelog | 6 ++++++
    debian/control | 1 +
    debian/tests/autopkgtest-pkg-dkms.conf | 1 +
    3 files changed, 8 insertions(+)
    create mode 100644 debian/tests/autopkgtest-pkg-dkms.conf

    diff --git a/debian/changelog b/debian/changelog
    index 111b2fd..42ea3fb 100644
    --- a/debian/changelog
    +++ b/debian/changelog
    @@ -1,3 +1,9 @@
    +mimic (0.6.3+ds-2) UNRELEASED; urgency=medium
    +
    + * Declare Testsuite: autopkgtest-pkg-dkms.
    +
    + -- Andreas Beckmann <anbe@debian.org> Tue, 11 Feb 2025 00:26:16 +0100
    +
    mimic (0.6.3+ds-1) unstable; urgency=medium

    * New upstream release
    diff --git a/debian/control b/debian/control
    index a57da54..4998cd0 100644
    --- a/debian/control
    +++ b/debian/control
    @@ -21,6 +21,7 @@ Homepage: https://github.com/hack3ric/mimic
    Rules-Requires-Root: no
    Vcs-Browser: https://salsa.debian.org/hacker/mimic
    Vcs-Git: https://salsa.debian.org/hacker/mimic.git
    +Testsuite: autopkgtest-pkg-dkms

    Package: mimic
    Archite
  • From Andreas Beckmann@21:1/5 to Andreas Beckmann on Wed Mar 5 14:40:02 2025
    Hi Eric,

    On 2/11/25 14:21, Andreas Beckmann wrote:
    thanks for explaining whats' going on here, now I also understand the
    need for your other "weird" dependencies.

    The current kernel headers in sid and experimental now ship the BTF bits
    and tools (e.g. linux-headers-* depends on pahole now).
    Is this sufficient for your module to build without touching vmlinux to
    extract the btf bits or relying on tools you ship?
    If that works, I'm fine with moving lz4, pahole, ... back to Recommends.
    Do you need binutils at all? It's already pulled in via dkms->dpkg-dev->binutils.


    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)