Package: dkms
Version: 2.2.0.2-1
Severity: important

Upgrading dkms drom squeeze (2.1.x.x) to wheezy (2.2.x.x) loses track of
previously built modules. This could be related to changing the
module installation location from /lib/modules/*/updates/dkms/ to
/lib/modules/*/updates/.

I discovered this during some squeeze -> wheezy distupgrade tests with
piuparts which unexpectedly left files in /lib/modules.

The following test was performed in a minimal squeeze pbuilder
environment with wheezy sources available additionally. The host is
running with the squeeze kernel, but in the pbuilder only the headers
are installed, no kernel or modules itself.

A few excerpts from the log showing the problematic behaviour, script
and full log can be found further below.

* install dkms + module-dkms from stable, build the module

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

* upgrade dkms to testing

* upgrade module-dkms to testing
  * first the old module gets removed ... but from the wrong location?

hdaps.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

  * now the new one gets built and installed - but where does this
    original module come from?

hdaps.ko:
Running module version sanity check.
 - Original module
   - Found /lib/modules/2.6.32-5-amd64/updates/dkms/hdaps.ko
   - Storing in /var/lib/dkms/tp-smapi/original_module/2.6.32-5-amd64/x86_64/
   - Archiving for uninstallation purposes
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/updates/

* removing module-dkms

hdaps.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/updates/
 - Original module
   - Archived original module found in the DKMS tree
   - Moving it to: /lib/modules/2.6.32-5-amd64/updates/

* oops, now some files are left on the system that don't belong to any
  package and dkms does not think that it "owns" them.


Andreas

# cat dkms-bug.sh
#!/bin/sh

apt-get install -t stable linux-headers-2.6-amd64
apt-get install -t stable tp-smapi-dkms
find /lib/modules
apt-get install dkms/testing
apt-get install tp-smapi-dkms/testing
find /lib/modules
apt-get remove tp-smapi-dkms
find /lib/modules

# sh -x dkms-bug.sh
+ apt-get install -t stable linux-headers-2.6-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cpp-4.3 gcc-4.3 gcc-4.3-base linux-headers-2.6.32-5-amd64 
linux-headers-2.6.32-5-common linux-kbuild-2.6.32
Suggested packages:
  gcc-4.3-locales gcc-4.3-multilib libmudflap0-4.3-dev gcc-4.3-doc libgcc1-dbg 
libgomp1-dbg libmudflap0-dbg
The following NEW packages will be installed:
  cpp-4.3 gcc-4.3 gcc-4.3-base linux-headers-2.6-amd64 
linux-headers-2.6.32-5-amd64 linux-headers-2.6.32-5-common linux-kbuild-2.6.32
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.7 MB of archives.
After this operation, 35.7 MB of additional disk space will be used.
Do you want to continue [Y/n]?
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based 
frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 
75, <> line 7.)
debconf: falling back to frontend: Readline
Selecting previously deselected package gcc-4.3-base.
(Reading database ... 12232 files and directories currently installed.)
Unpacking gcc-4.3-base (from .../gcc-4.3-base_4.3.5-4_amd64.deb) ...
Selecting previously deselected package cpp-4.3.
Unpacking cpp-4.3 (from .../cpp-4.3_4.3.5-4_amd64.deb) ...
Selecting previously deselected package gcc-4.3.
Unpacking gcc-4.3 (from .../gcc-4.3_4.3.5-4_amd64.deb) ...
Selecting previously deselected package linux-headers-2.6.32-5-common.
Unpacking linux-headers-2.6.32-5-common (from 
.../linux-headers-2.6.32-5-common_2.6.32-35_amd64.deb) ...
Selecting previously deselected package linux-kbuild-2.6.32.
Unpacking linux-kbuild-2.6.32 (from .../linux-kbuild-2.6.32_2.6.32-1_amd64.deb) 
...
Selecting previously deselected package linux-headers-2.6.32-5-amd64.
Unpacking linux-headers-2.6.32-5-amd64 (from 
.../linux-headers-2.6.32-5-amd64_2.6.32-35_amd64.deb) ...
Selecting previously deselected package linux-headers-2.6-amd64.
Unpacking linux-headers-2.6-amd64 (from 
.../linux-headers-2.6-amd64_2.6.32+29_amd64.deb) ...
Setting up gcc-4.3-base (4.3.5-4) ...
Setting up cpp-4.3 (4.3.5-4) ...
Setting up gcc-4.3 (4.3.5-4) ...
Setting up linux-headers-2.6.32-5-common (2.6.32-35) ...
Setting up linux-kbuild-2.6.32 (2.6.32-1) ...
Setting up linux-headers-2.6.32-5-amd64 (2.6.32-35) ...
Setting up linux-headers-2.6-amd64 (2.6.32+29) ...
+ apt-get install -t stable tp-smapi-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dkms module-init-tools
Recommended packages:
  menu sudo linux-image
The following NEW packages will be installed:
  dkms module-init-tools tp-smapi-dkms
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/229 kB of archives.
After this operation, 1036 kB of additional disk space will be used.
Do you want to continue [Y/n]?
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based 
frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 
75, <> line 3.)
debconf: falling back to frontend: Readline
Selecting previously deselected package module-init-tools.
(Reading database ... 19831 files and directories currently installed.)
Unpacking module-init-tools (from .../module-init-tools_3.12-1_amd64.deb) ...
Selecting previously deselected package dkms.
Unpacking dkms (from .../dkms_2.1.1.2-5_all.deb) ...
Selecting previously deselected package tp-smapi-dkms.
Unpacking tp-smapi-dkms (from .../tp-smapi-dkms_0.40-9_all.deb) ...
Setting up module-init-tools (3.12-1) ...
Setting up dkms (2.1.1.2-5) ...
Setting up tp-smapi-dkms (0.40-9) ...

Creating symlink /var/lib/dkms/tp-smapi/0.40/source ->
                 /usr/src/tp-smapi-0.40

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.32-5-amd64 -C /lib/modules/2.6.32-5-amd64/build 
M=/var/lib/dkms/tp-smapi/0.40/build....
cleaning build area....

DKMS: build Completed.

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

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

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

depmod....(bad exit status: 1)

DKMS: install Completed.
+ find /lib/modules
/lib/modules
/lib/modules/2.6.32-5-amd64
/lib/modules/2.6.32-5-amd64/updates
/lib/modules/2.6.32-5-amd64/updates/dkms
/lib/modules/2.6.32-5-amd64/updates/dkms/hdaps.ko
/lib/modules/2.6.32-5-amd64/updates/dkms/tp_smapi.ko
/lib/modules/2.6.32-5-amd64/updates/dkms/thinkpad_ec.ko
/lib/modules/2.6.32-5-amd64/source
/lib/modules/2.6.32-5-amd64/build
+ apt-get install dkms/testing
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '2.2.0.2-1' (Debian:testing [all]) for 'dkms'
Recommended packages:
  menu sudo linux-image
The following packages will be upgraded:
  dkms
1 upgraded, 0 newly installed, 0 to remove and 101 not upgraded.
Need to get 0 B/77.3 kB of archives.
After this operation, 16.4 kB disk space will be freed.
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based 
frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 
75, <> line 1.)
debconf: falling back to frontend: Readline
(Reading database ... 19921 files and directories currently installed.)
Preparing to replace dkms 2.1.1.2-5 (using .../dkms_2.2.0.2-1_all.deb) ...
Unpacking replacement dkms ...
Setting up dkms (2.2.0.2-1) ...
Installing new version of config file 
/etc/dkms/template-dkms-mkdeb/debian/postinst ...
Installing new version of config file /etc/bash_completion.d/dkms ...
Installing new version of config file /etc/kernel/header_postinst.d/dkms ...
Installing new version of config file /etc/kernel/postinst.d/dkms ...
+ apt-get install tp-smapi-dkms/testing
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '0.41-1' (Debian:testing [all]) for 'tp-smapi-dkms'
The following packages will be upgraded:
  tp-smapi-dkms
1 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
Need to get 46.3 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Get:1 $LOCALMIRROR testing/main tp-smapi-dkms all 0.41-1 [46.3 kB]
Fetched 46.3 kB in 0s (1956 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based 
frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 
75, <> line 1.)
debconf: falling back to frontend: Readline
(Reading database ... 19921 files and directories currently installed.)
Preparing to replace tp-smapi-dkms 0.40-9 (using 
.../tp-smapi-dkms_0.41-1_all.deb) ...

-------- Uninstall Beginning --------
Module:  tp-smapi
Version: 0.40
Kernel:  2.6.32-5-amd64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

thinkpad_ec.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


tp_smapi.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


hdaps.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall Completed.

------------------------------
Deleting module version: 0.40
completely from the DKMS tree.
------------------------------
Done.
Unpacking replacement tp-smapi-dkms ...
Setting up tp-smapi-dkms (0.41-1) ...

Creating symlink /var/lib/dkms/tp-smapi/0.41/source ->
                 /usr/src/tp-smapi-0.41

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.32-5-amd64 -C /lib/modules/2.6.32-5-amd64/build 
M=/var/lib/dkms/tp-smapi/0.41/build....
cleaning build area....

DKMS: build Completed.

thinkpad_ec:
Running module version sanity check.
 - Original module
   - Found /lib/modules/2.6.32-5-amd64/updates/dkms/thinkpad_ec.ko
   - Storing in /var/lib/dkms/tp-smapi/original_module/2.6.32-5-amd64/x86_64/
   - Archiving for uninstallation purposes
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/extra/

tp_smapi.ko:
Running module version sanity check.
 - Original module
   - Found /lib/modules/2.6.32-5-amd64/updates/dkms/tp_smapi.ko
   - Storing in /var/lib/dkms/tp-smapi/original_module/2.6.32-5-amd64/x86_64/
   - Archiving for uninstallation purposes
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/extra/

hdaps.ko:
Running module version sanity check.
 - Original module
   - Found /lib/modules/2.6.32-5-amd64/updates/dkms/hdaps.ko
   - Storing in /var/lib/dkms/tp-smapi/original_module/2.6.32-5-amd64/x86_64/
   - Archiving for uninstallation purposes
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/updates/

depmod....

DKMS: install Completed.
+ find /lib/modules
/lib/modules
/lib/modules/2.6.32-5-amd64
/lib/modules/2.6.32-5-amd64/modules.devname
/lib/modules/2.6.32-5-amd64/modules.symbols.bin
/lib/modules/2.6.32-5-amd64/modules.symbols
/lib/modules/2.6.32-5-amd64/modules.softdep
/lib/modules/2.6.32-5-amd64/modules.alias.bin
/lib/modules/2.6.32-5-amd64/modules.alias
/lib/modules/2.6.32-5-amd64/modules.dep.bin
/lib/modules/2.6.32-5-amd64/modules.dep
/lib/modules/2.6.32-5-amd64/extra
/lib/modules/2.6.32-5-amd64/extra/tp_smapi.ko
/lib/modules/2.6.32-5-amd64/extra/thinkpad_ec.ko
/lib/modules/2.6.32-5-amd64/updates
/lib/modules/2.6.32-5-amd64/updates/hdaps.ko
/lib/modules/2.6.32-5-amd64/updates/dkms
/lib/modules/2.6.32-5-amd64/source
/lib/modules/2.6.32-5-amd64/build
+ apt-get remove tp-smapi-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  dkms module-init-tools tp-smapi-dkms
0 upgraded, 0 newly installed, 3 to remove and 99 not upgraded.
After this operation, 1032 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 19924 files and directories currently installed.)
Removing tp-smapi-dkms ...

-------- Uninstall Beginning --------
Module:  tp-smapi
Version: 0.41
Kernel:  2.6.32-5-amd64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

thinkpad_ec.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/extra/
 - Original module
   - Archived original module found in the DKMS tree
   - Moving it to: /lib/modules/2.6.32-5-amd64/extra/

tp_smapi.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/extra/
 - Original module
   - Archived original module found in the DKMS tree
   - Moving it to: /lib/modules/2.6.32-5-amd64/extra/

hdaps.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.32-5-amd64/updates/
 - Original module
   - Archived original module found in the DKMS tree
   - Moving it to: /lib/modules/2.6.32-5-amd64/updates/
depmod....

Removing original_module from DKMS tree for kernel 2.6.32-5-amd64 (x86_64)

DKMS: uninstall Completed.

------------------------------
Deleting module version: 0.41
completely from the DKMS tree.
------------------------------
Done.
Removing dkms ...
Removing module-init-tools ...
+ find /lib/modules
/lib/modules
/lib/modules/2.6.32-5-amd64
/lib/modules/2.6.32-5-amd64/modules.devname
/lib/modules/2.6.32-5-amd64/modules.symbols.bin
/lib/modules/2.6.32-5-amd64/modules.symbols
/lib/modules/2.6.32-5-amd64/modules.softdep
/lib/modules/2.6.32-5-amd64/modules.alias.bin
/lib/modules/2.6.32-5-amd64/modules.alias
/lib/modules/2.6.32-5-amd64/modules.dep.bin
/lib/modules/2.6.32-5-amd64/modules.dep
/lib/modules/2.6.32-5-amd64/extra
/lib/modules/2.6.32-5-amd64/extra/tp_smapi.ko
/lib/modules/2.6.32-5-amd64/extra/thinkpad_ec.ko
/lib/modules/2.6.32-5-amd64/updates
/lib/modules/2.6.32-5-amd64/updates/hdaps.ko
/lib/modules/2.6.32-5-amd64/updates/dkms
/lib/modules/2.6.32-5-amd64/source
/lib/modules/2.6.32-5-amd64/build



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to