> The size of this deb should be correct, this is a meta-package, aka it
> only depends on other packages.

Oh, I was expecting it to be a real pkg and figured it must be the
root cause of things falling over (this caused me to disregard the
other errors a red herring). This fooled some collaborators as
well. So indeed I need to give more info.

> What do you want to say?  This message is from apt and is pretty clearly
> a missconfiguration, why does it try to find a package from the Debian
> archive in your home?

This is the full transcript:

===8<----------------------------------------
$ apt -t bookworm-backports install linux-image-amd64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-image-amd64 is already the newest version (6.6.13-1~bpo12+1).
The following packages were automatically installed and are no longer required:
  libwpe-1.0-1 libwpebackend-fdo-1.0-1 linux-headers-6.1.0-20-amd64 
linux-headers-6.1.0-20-common linux-image-5.10.0-16-amd64
  linux-image-5.10.0-19-amd64 linux-image-5.10.0-28-amd64 
linux-image-5.10.0-7-amd64 linux-image-5.10.0-8-amd64
  linux-image-6.1.0-15-amd64 linux-image-6.1.0-20-amd64
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-6.6.13+bpo-amd64 (6.6.13-1~bpo12+1) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.6.13+bpo-amd64.
Sign command: /lib/modules/6.6.13+bpo-amd64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...
make -j2 KERNELRELEASE=6.6.13+bpo-amd64 -C /lib/modules/6.6.13+bpo-amd64/build 
M=/var/lib/dkms/tp_smapi/0.43/build HDAPS=1...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.6.13+bpo-amd64 (x86_64)
Consult /var/lib/dkms/tp_smapi/0.43/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.6.13+bpo-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.6.13+bpo-amd64 (--configure):
 installed linux-image-6.6.13+bpo-amd64 package post-installation script 
subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-6.6.13+bpo-amd64 (= 
6.6.13-1~bpo12+1); however:
  Package linux-image-6.6.13+bpo-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of 
linux-headers-6.6.13+bpo-amd64:
 linux-headers-6.6.13+bpo-amd64 depends on linux-image-6.6.13+bpo-amd64 (= 
6.6.13-1~bpo12+1) | linux-image-6.6.13+bpo-amd64-unsigned (= 6.6.13-1~bpo12+1); 
however:
  Package linux-image-6.6.13+bpo-amd64 is not configured yet.
  Package linux-image-6.6.13+bpo-amd64-unsigned is not installed.

dpkg: error processing package linux-headers-6.6.13+bpo-amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-amd64:
 linux-headers-amd64 depends on linux-headers-6.6.13+bpo-amd64 (= 
6.6.13-1~bpo12+1); however:
  Package linux-headers-6.6.13+bpo-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-6.6.13+bpo-amd64
 linux-image-amd64
 linux-headers-6.6.13+bpo-amd64
 linux-headers-amd64   
E: Sub-process /usr/bin/dpkg returned an error code (1)
===8<----------------------------------------

/var/lib/dkms/tp_smapi/0.43/build/make.log:

===8<----------------------------------------
DKMS make.log for tp_smapi-0.43 for kernel 6.6.13+bpo-amd64 (x86_64)
Tue May 14 05:01:10 PM CEST 2024
make: Entering directory '/usr/src/linux-headers-6.6.13+bpo-amd64'
  CC [M]  /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.o
  CC [M]  /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.o
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:42: error: macro 
"DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given
   94 | static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
      |                                          ^
In file included from /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:45:
/usr/src/linux-headers-6.6.13+bpo-common/include/linux/semaphore.h:34: note: 
macro "DEFINE_SEMAPHORE" defined here
   34 | #define DEFINE_SEMAPHORE(_name, _n)     \
      | 
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:8: error: type defaults to 
‘int’ in declaration of ‘DEFINE_SEMAPHORE’ [-Werror=implicit-int]
   94 | static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
      |        ^~~~~~~~~~~~~~~~
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function ‘thinkpad_ec_lock’:
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:112:35: error: 
‘thinkpad_ec_mutex’ undeclared (first use in this function); did you mean 
‘thinkpad_ec_lock’?
  112 |         ret = down_interruptible(&thinkpad_ec_mutex);
      |                                   ^~~~~~~~~~~~~~~~~
      |                                   thinkpad_ec_lock
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:112:35: note: each undeclared 
identifier is reported only once for each function it appears in
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function 
‘thinkpad_ec_try_lock’:
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:126:30: error: 
‘thinkpad_ec_mutex’ undeclared (first use in this function); did you mean 
‘thinkpad_ec_lock’?
  126 |         return down_trylock(&thinkpad_ec_mutex);
      |                              ^~~~~~~~~~~~~~~~~
      |                              thinkpad_ec_lock
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function 
‘thinkpad_ec_unlock’:
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:138:13: error: 
‘thinkpad_ec_mutex’ undeclared (first use in this function); did you mean 
‘thinkpad_ec_lock’?
  138 |         up(&thinkpad_ec_mutex);
      |             ^~~~~~~~~~~~~~~~~
      |             thinkpad_ec_lock
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function 
‘thinkpad_ec_try_lock’:
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:127:1: error: control reaches 
end of non-void function [-Werror=return-type]
  127 | }
      | ^
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: At top level:
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:8: warning: 
‘DEFINE_SEMAPHORE’ defined but not used [-Wunused-variable]
   94 | static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
      |        ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** 
[/usr/src/linux-headers-6.6.13+bpo-common/scripts/Makefile.build:248: 
/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:115:36: error: macro 
"DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given
  115 | static DEFINE_SEMAPHORE(smapi_mutex);
      |                                    ^
In file included from 
/usr/src/linux-headers-6.6.13+bpo-common/include/linux/fs.h:25,
                 from 
/usr/src/linux-headers-6.6.13+bpo-common/include/linux/proc_fs.h:10,
                 from /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:41:
/usr/src/linux-headers-6.6.13+bpo-common/include/linux/semaphore.h:34: note: 
macro "DEFINE_SEMAPHORE" defined here
   34 | #define DEFINE_SEMAPHORE(_name, _n)     \
      | 
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:115:8: error: type defaults to 
‘int’ in declaration of ‘DEFINE_SEMAPHORE’ [-Werror=implicit-int]
  115 | static DEFINE_SEMAPHORE(smapi_mutex);
      |        ^~~~~~~~~~~~~~~~
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c: In function 
‘store_battery_start_charge_thresh’:
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:780:15: error: ‘smapi_mutex’ 
undeclared (first use in this function)
  780 |         down(&smapi_mutex);
      |               ^~~~~~~~~~~
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:780:15: note: each undeclared 
identifier is reported only once for each function it appears in
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c: In function 
‘store_battery_stop_charge_thresh’:
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:822:15: error: ‘smapi_mutex’ 
undeclared (first use in this function)
  822 |         down(&smapi_mutex);
      |               ^~~~~~~~~~~
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c: At top level:
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:115:8: warning: ‘DEFINE_SEMAPHORE’ 
defined but not used [-Wunused-variable]
  115 | static DEFINE_SEMAPHORE(smapi_mutex);
      |        ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** 
[/usr/src/linux-headers-6.6.13+bpo-common/scripts/Makefile.build:248: 
/var/lib/dkms/tp_smapi/0.43/build/tp_smapi.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.6.13+bpo-common/Makefile:1938: 
/var/lib/dkms/tp_smapi/0.43/build] Error 2
make: *** [/usr/src/linux-headers-6.6.13+bpo-common/Makefile:246: __sub-make] 
Error 2
make: Leaving directory '/usr/src/linux-headers-6.6.13+bpo-amd64'
===8<----------------------------------------

Apparently the Thinkpad battery modules break in the latest backports
kernel. You might recall from this bug:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071381

that the Thinkpad modules are suspect of causing freezes in kernel
versions 6.1.x. I am currently running one of those versions with the
two modules removed, as an experiment per your suggestion (so far, no
freezing with the modules removed but it’s a bit early to conclude
anything from that). The above attempt to install the latest backports
kernel (performed last week) was another effort to diagnose the same
problem.. to test whether the newest kernel also freezes.

Regarding the permission error, that came from another command and I
inadvertently pasted the output without the command:

===8<----------------------------------------
  $ apt -t bookworm-backports download linux-image-amd64 -d
  Get:1 tor://artfiles.org/debian bookworm-backports/main amd64 
linux-image-amd64 amd64 6.6.13-1~bpo12+1 [1,480 B]
  Fetched 1,480 B in 5s (288 B/s)               
  W: Download is performed unsandboxed as root as file 
'/root/linux-image-amd64_6.6.13-1~bpo12+1_amd64.deb' couldn't be accessed by 
user '_apt'. - pkgAcquire::Run (13: Permission denied)
===8<----------------------------------------

Using both apt’s “download” subcommand and the “-d” option is
rudundant and an error on my part. But actually, this seems like an
apt bug. I don’t expect a download operation as root to lead to a
permission problem in a directory where root has write access. So I
thought: apt must be trying to open the deb file to check the metadata
or check the integrity or something. This led me to look closer at the
file, at which point the small size seemed suspicious for a kernel
image.

Reply via email to