• Upgrade of single Linux v6.1.0 (unsigned) package from Debian/experimen

    From Sedat Dilek@21:1/5 to All on Sat Dec 24 20:00:01 2022
    Hi,

    this was possible with linux-image-6.1.0-0-amd64-unsigned
    (6.1~rc8-1~exp1) but fails now with linux-image-6.1.0-0-amd64-unsigned (6.1.1-1~exp2):

    root# LC_ALL=C apt-get install -o
    APT::Get::Upgrade-By-Source-Package=0 -t experimental linux-image-6.1.0-0-amd64-unsigned -y
    ...
    Use 'apt autoremove' to remove them.
    Suggested packages:
    linux-doc-6.1 debian-kernel-handbook
    The following NEW packages will be installed:
    linux-image-6.1.0-0-amd64-unsigned
    0 upgraded, 1 newly installed, 0 to remove and 306 not upgraded.
    Need to get 76.7 MB of archives.
    After this operation, 585 MB of additional disk space will be used.
    Get:1 https://incoming.debian.org/debian-buildd
    buildd-experimental/main amd64 linux-image-6.1.0-0-amd64-unsigned
    amd64 6.1.1-1~exp2 [76.7 MB]
    Fetched 76.7 MB in 1min 36s (797 kB/s)
    Selecting previously unselected package linux-image-6.1.0-0-amd64-unsigned. (Reading database ... 427330 files and directories currently installed.) Preparing to unpack .../linux-image-6.1.0-0-amd64-unsigned_6.1.1-1~exp2_amd64.deb ...
    Unpacking linux-image-6.1.0-0-amd64-unsigned (6.1.1-1~exp2) ...
    Setting up linux-image-6.1.0-0-amd64-unsigned (6.1.1-1~exp2) ...
    I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.0.10-1-amd64-clang15-kcfi
    I: /initrd.img.old is now a symlink to boot/initrd.img-6.0.10-1-amd64-clang15-kcfi
    I: /vmlinuz is now a symlink to boot/vmlinuz-6.1.0-0-amd64
    I: /initrd.img is now a symlink to boot/initrd.img-6.1.0-0-amd64 /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-0-amd64:Sign
    command: /lib/modules/6.1.0-0-amd64/build/scripts/sign-file
    Binary /lib/modules/6.1.0-0-amd64/build/scripts/sign-file not found,
    modules won't be signed
    Error! Your kernel headers for kernel 6.1.0-0-amd64 cannot be found at /lib/modules/6.1.0-0-amd64/build or /lib/modules/6.1.0-0-amd64/source.
    Please install the linux-headers-6.1.0-0-amd64 package or use the --kernelsourcedir option to tell DKMS where it's located.
    Error! One or more modules failed to install during autoinstall.
    Refer to previous errors for more information.
    failed!
    run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
    dpkg: error processing package linux-image-6.1.0-0-amd64-unsigned (--configure):
    installed linux-image-6.1.0-0-amd64-unsigned package post-installation
    script subprocess returned error exit status 1
    Errors were encountered while processing:
    linux-image-6.1.0-0-amd64-unsigned
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    This solves it:

    root@iniza:~/packages# LC_ALL=C apt-get install -o APT::Get::Upgrade-By-Source-Package=0 -t experimental linux-image-6.1.0-0-amd64-unsigned linux-headers-6.1.0-0-amd64 linux-headers-6.1.0-0-common -y
    ...
    Use 'apt autoremove' to remove them.
    The following NEW packages will be installed:
    linux-headers-6.1.0-0-amd64 linux-headers-6.1.0-0-common linux-kbuild-6.1
    0 upgraded, 3 newly installed, 0 to remove and 306 not upgraded.
    1 not fully installed or removed.
    Need to get 11.6 MB of archives.
    After this operation, 62.5 MB of additional disk space will be used.
    Get:1 https://incoming.debian.org/debian-buildd
    buildd-experimental/main amd64 linux-headers-6.1.0-0-common all
    6.1.1-1~exp2 [9703 kB]
    Get:2 https://incoming.debian.org/debian-buildd
    buildd-experimental/main amd64 linux-kbuild-6.1 amd64 6.1.1-1~exp2
    [816 kB]
    Get:3 https://incoming.debian.org/debian-buildd
    buildd-experimental/main amd64 linux-headers-6.1.0-0-amd64 amd64
    6.1.1-1~exp2 [1086 kB]
    Fetched 11.6 MB in 18s (632 kB/s)
    Selecting previously unselected package linux-headers-6.1.0-0-common.
    (Reading database ... 432240 files and directories currently installed.) Preparing to unpack .../linux-headers-6.1.0-0-common_6.1.1-1~exp2_all.deb ... Unpacking linux-headers-6.1.0-0-common (6.1.1-1~exp2) ...
    Selecting previously unselected package linux-kbuild-6.1.
    Preparing to unpack .../linux-kbuild-6.1_6.1.1-1~exp2_amd64.deb ...
    Unpacking linux-kbuild-6.1 (6.1.1-1~exp2) ...
    Selecting previously unselected package linux-headers-6.1.0-0-amd64.
    Preparing to unpack .../linux-headers-6.1.0-0-amd64_6.1.1-1~exp2_amd64.deb ... Unpacking linux-headers-6.1.0-0-amd64 (6.1.1-1~exp2) ...
    Setting up linux-image-6.1.0-0-amd64-unsigned (6.1.1-1~exp2) ... /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-0-amd64:Sign
    command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
    Signing key: /var/lib/dkms/mok.key
    Public certificate (MOK): /var/lib/dkms/mok.pub

    Building module:
    Cleaning build area...
    make -j4 KERNELRELEASE=6.1.0-0-amd64 -C
    /lib/modules/6.1.0-0-amd64/build M=/var/lib/dkms/virtualbox/7.0.4/build.............
    Signing module /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/vboxdrv.ko
    Signing module /var/lib/dkms/virtualbox/7.0.4/build/vboxnetadp/vboxnetadp.ko Signing module /var/lib/dkms/virtualbox/7.0.4/build/vboxnetflt/vboxnetflt.ko Cleaning build area...

    vboxdrv.ko:
    Running module version sanity check.
    - Original module
    - No original module exists within this kernel
    - Installation
    - Installing to /lib/modules/6.1.0-0-amd64/updates/dkms/

    vboxnetadp.ko:
    Running module version sanity check.
    - Original module
    - No original module exists within this kernel
    - Installation
    - Installing to /lib/modules/6.1.0-0-amd64/updates/dkms/

    vboxnetflt.ko:
    Running module version sanity check.
    - Original module
    - No original module exists within this kernel
    - Installation
    - Installing to /lib/modules/6.1.0-0-amd64/updates/dkms/
    depmod...
    .
    /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.1.0-0-amd64 /etc/kernel/postinst.d/zz-update-grub:
    Generating grub configuration file ...
    Found background image: /usr/share/images/desktop-base/desktop-grub.png
    Found linux image: /boot/vmlinuz-6.1.0-0-amd64
    Found initrd image: /boot/initrd.img-6.1.0-0-amd64
    Found linux image: /boot/vmlinuz-6.0.10-1-amd64-clang15-kcfi
    Found initrd image: /boot/initrd.img-6.0.10-1-amd64-clang15-kcfi
    Found linux image: /boot/vmlinuz-6.0.0-6-amd64
    Found initrd image: /boot/initrd.img-6.0.0-6-amd64
    Warning: os-prober will be executed to detect other bootable partitions.
    Its output will be used to detect bootable binaries on them and create
    new boot entries.
    Found Windows Recovery Environment on /dev/sdb3
    done
    Setting up linux-headers-6.1.0-0-common (6.1.1-1~exp2) ...
    Setting up linux-kbuild-6.1 (6.1.1-1~exp2) ...
    Setting up linux-headers-6.1.0-0-amd64 (6.1.1-1~exp2) ... /etc/kernel/header_postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-0-amd64:.

    Hmmm... Checking the ERROR...

    /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-0-amd64:Sign
    command: /lib/modules/6.1.0-0-amd64/build/scripts/sign-file

    root# LC_ALL=C ll /lib/modules/6.1.0-0-amd64/build/scripts/sign-file
    -rwxr-xr-x 1 root root 19K Dec 24 08:04 /lib/modules/6.1.0-0-amd64/build/scripts/sign-file

    root# LC_ALL=C dpkg -S /lib/modules/6.1.0-0-amd64/build/scripts/sign-file dpkg-query: no path found matching pattern /lib/modules/6.1.0-0-amd64/build/scripts/sign-file

    ...which packages is shipping sign-file?

    OK, looks like you need kbuild-6.1 package, too.

    root# cd /var/cache/apt/archives

    root# dpkg --contents linux-kbuild-6.1_6.1.1-1~exp2_amd64.deb | grep sign-file -rwxr-xr-x root/root 18920 2022-12-24 08:04 ./usr/lib/linux-kbuild-6.1/scripts/sign-file

    Might be good to have this as a Depends for linux-image (unsigned) and
    why is `dpkg -S /path/to/sign-file` not showing the responsible
    package?

    Thanks.

    Happy Xmas (if you celebrate it),
    -Sedat-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sedat Dilek@21:1/5 to All on Sat Dec 24 20:00:01 2022
    Sorry, here the relevant part of ERROR quote:

    /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-0-amd64:Sign
    command: /lib/modules/6.1.0-0-amd64/build/scripts/sign-file
    Binary /lib/modules/6.1.0-0-amd64/build/scripts/sign-file not found,
    modules won't be signed

    For an unsigned linux-image you do NOT need the sign-file binary:
    Might be a DKMS issue?

    -Sedat-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ben Hutchings@21:1/5 to Sedat Dilek on Tue Dec 27 20:50:01 2022
    On Sat, 2022-12-24 at 19:31 +0100, Sedat Dilek wrote:
    [...]
    root# LC_ALL=C ll /lib/modules/6.1.0-0-amd64/build/scripts/sign-file -rwxr-xr-x 1 root root 19K Dec 24 08:04 /lib/modules/6.1.0-0-amd64/build/scripts/sign-file

    root# LC_ALL=C dpkg -S /lib/modules/6.1.0-0-amd64/build/scripts/sign-file dpkg-query: no path found matching pattern /lib/modules/6.1.0-0-amd64/build/scripts/sign-file

    ...which packages is shipping sign-file?

    OK, looks like you need kbuild-6.1 package, too.

    root# cd /var/cache/apt/archives

    root# dpkg --contents linux-kbuild-6.1_6.1.1-1~exp2_amd64.deb | grep sign-file
    -rwxr-xr-x root/root 18920 2022-12-24 08:04 ./usr/lib/linux-kbuild-6.1/scripts/sign-file

    Might be good to have this as a Depends for linux-image (unsigned) and
    why is `dpkg -S /path/to/sign-file` not showing the responsible
    package?
    [...]

    linux-image shouldn't depend on linux-headers etc. as that would pull
    in a lot of big packages that are completely unnecessary for users that
    don't use OOT modules.

    "dpkg -S" is easily confused by symbolic links.

    We provide the linux-headers-<flavour> metapackages to make it easy to
    get the new kernel headers and rebuild OOT modules. By using "APT::Get::Upgrade-By-Source-Package=0" you prevented APT from
    upgrading linux-headers-amd64 together with linux-image-amd64. Maybe
    DKMS should have done a better job of reporting this, but it's really
    your mistake.

    Ben.

    --
    Ben Hutchings
    Horngren's Observation:
    Among economists, the real world is often a special case.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmOrS7EACgkQ57/I7JWG EQlr2Q//atDxXrolRxKB90jh9Tl9la4y63P7iaHGfo+ADiR/bjKZdBw1tmVrn1FV vBZqD4o1iSC75EHEve92wOLnv6UwCIqFyRw499+Fl3/TlItWkRb1i79dPkWWGjVA KOqArxLZgu5jrfbrg/byGGAyw8Dx8X9+9/xRT3IDg6UKMsomWaJT+LB+pXxwsFwf AxMU0+/J2VeVBUWQTf+2qi9siam+jokZXaUaZ+mAVr4LdlkGSpRK4/XwRqrkfCXG ruLXRk/RwwcNRtG6ReNEYUVrmpEEXJ0K2fNXI/RWNcb8XkQ++/1aj2hcDAlTq7io JKUl6pQq/upGeZ2LHWETleBPemW48dFMSs4KmZsKFNa9V8TvuVFGR41dXxJJcVY2 GweSdRNPb7nH8b4GUvpx9fVWaP8i7zUryohc0co+zHZlE551APYw6bvZ+wMCnltl W479nc6FuTNuxL7AqxX45F0iI0W4kxGdo2ycVuFdmyjrHTNxO50aa6AozmkteZbF BpCmDu7CybgXSBSVGc2kqC+I0nlWZ/YZaNwt0CVBIyveVUpbOE/STrKhgWURZjzs jY+xxvQE2QYfmB+XIqCaW8hiZmhxjPwlRo2XPK7XihtZZW/OuRduZ5PsrevBFAmc aFuY55VFignIn4r0FltJc2leL+hIVMz0cpLcmbl2cnDCz8eXCPE=
    =OjPd
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Ga