Package contains generated module maps

Bug #250511 reported by Matt Zimmerman
6
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Tim Gardner

Bug Description

I noticed, by way of reporting a bug using apport (bug 250510), that the linux-image-* package ships the module maps which are generated by depmod:

Package: linux-image-2.6.26-4-generic 2.6.26-4.11 [modified: lib/modules/2.6.26-4-generic/modules.pcimap lib/modules/2.6.26-4-generic/modules.dep lib/modules/2.6.26-4-generic/modules.ieee1394map lib/modules/2.6.26-4-generic/modules.usbmap lib/modules/2.6.26-4-generic/modules.isapnpmap lib/modules/2.6.26-4-generic/modules.inputmap lib/modules/2.6.26-4-generic/modules.seriomap lib/modules/2.6.26-4-generic/modules.alias lib/modules/2.6.26-4-generic/modules.symbols]

These show up as modified files in apport, because they are updated by depmod when kernel module packages are installed (including linux-ubuntu-modules). The package postinst already runs depmod, so I don't think these files should be included in the package.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 250511] Re: Package contains generated module maps

On Fri, Aug 29, 2008 at 12:44:52AM -0000, Leann Ogasawara wrote:
> The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the
> upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would
> appreciate it if you could please test this newer 2.6.27 Ubuntu kernel.
> There are one of two ways you should be able to test:

This is NOT fixed in 2.6.27:

mizar:[~] dpkg -L linux-image-2.6.27-1-generic |grep 'map$'
/lib/modules/2.6.27-1-generic/modules.pcimap
/lib/modules/2.6.27-1-generic/modules.ieee1394map
/lib/modules/2.6.27-1-generic/modules.usbmap
/lib/modules/2.6.27-1-generic/modules.ccwmap
/lib/modules/2.6.27-1-generic/modules.isapnpmap
/lib/modules/2.6.27-1-generic/modules.inputmap
/lib/modules/2.6.27-1-generic/modules.ofmap
/lib/modules/2.6.27-1-generic/modules.seriomap

--
 - mdz

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Matt Zimmerman (mdz) wrote : Bug 250511: Package contains generated module maps

https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/250511

We want to encourage everyone to use ubuntu-bug for reporting kernel bugs so
that you get better quality reports, and this bug results in confusing noise
in every such report.

The basic problem is that the linux-image packages ship a copy of all of the
files generated by depmod. These are, of course, immediately overwritten
when the package is installed, because depmod is run from the postinst
script. Files which are included in the .deb should not be modified after
installation: this leads to programs like apport and debsums noticing that
the package's files have been modified and showing a warning or error to the
user, e.g.:

Package: linux-image-2.6.26-4-generic 2.6.26-4.11 [modified: lib/modules/2.6.26-4-generic/modules.pcimap lib/modules/2.6.26-4-generic/modules.dep lib/modules/2.6.26-4-generic/modules.ieee1394map lib/modules/2.6.26-4-generic/modules.usbmap lib/modules/2.6.26-4-generic/modules.isapnpmap lib/modules/2.6.26-4-generic/modules.inputmap lib/modules/2.6.26-4-generic/modules.seriomap lib/modules/2.6.26-4-generic/modules.alias lib/modules/2.6.26-4-generic/modules.symbols]

debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.pcimap
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.dep
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.ieee1394map
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.usbmap
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.isapnpmap
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.inputmap
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.seriomap
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.alias
debsums: checksum mismatch linux-image-2.6.27-7-generic file /lib/modules/2.6.27-7-generic/modules.symbols

The cause seems to be that depmod is run during the build, via
debian/rules.d/2-binary-arch.mk. Does anyone know why this is done?

> /sbin/depmod -b debian/linux-image-$(abi_release)-$$sub \
> -ea -F debian/linux-image-$(abi_release)-$$sub/boot/System.map-$(abi_release)-$* \
> $(abi_release)-$*; \

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

This bug goes back at least to 8.04, perhaps earlier.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

If memory serves, this last step verifies that there are no missing symbols in any modules. I think its likely those files can be removed before the package is created.

Changed in linux:
assignee: ubuntu-kernel-team → timg-tpi
milestone: none → ubuntu-8.10
status: Triaged → In Progress
Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 250511] Re: Package contains generated module maps

On Sun, Oct 12, 2008 at 03:35:37PM -0000, Tim Gardner wrote:
> If memory serves, this last step verifies that there are no missing
> symbols in any modules. I think its likely those files can be removed
> before the package is created.

Perhaps it should run using the -n option? I think that will give you the
exit code you want, but not write any files to disk (but check first, I'm
not sure).

--
 - mdz

Revision history for this message
Tim Gardner (timg-tpi) wrote :

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=5b28a2ae632698758bf84364a5d87c6fcaaff03b

postrm will still cleanup the depmod created modules files, even though they are no longer shipped in the linux-image package. This seems like it might be a violation of Debian policy, but it also seems benign.

Changed in linux:
status: In Progress → Fix Committed
Revision history for this message
Matt Zimmerman (mdz) wrote :

On Tue, Oct 14, 2008 at 08:34:06PM -0000, Tim Gardner wrote:
> http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-
> intrepid.git;a=commit;h=5b28a2ae632698758bf84364a5d87c6fcaaff03b
>
> postrm will still cleanup the depmod created modules files, even though
> they are no longer shipped in the linux-image package. This seems like
> it might be a violation of Debian policy, but it also seems benign.

Which part of policy are you concerned about? On its face, this seems
precisely correct.

postrm should unwind the changes which are made by maintainer scripts during
installation. It is explicitly not responsible for removing files which are
contained in the .deb: dpkg does this itself.

So if the depmod output is created in postinst, removing it in postrm is the
right thing to do.

--
 - mdz

Revision history for this message
Tim Gardner (timg-tpi) wrote :

I was simply displaying my ignorance of the fine details of Debian packaging policy. If you're happy, then I'm happy.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.27-7.12

---------------
linux (2.6.27-7.12) intrepid; urgency=low

  [ Chuck Short ]

  * xen: Add xen modules to virtual flavours.

  [ Mario Limonciello ]

  * SAUCE: Add back in lost commit for Apple BT Wireless Keyboard
    - LP: #162083

  [ Tim Gardner ]

  * Remove depmod created files from packages.
    - LP: #250511
  * Changed default TCP congestion algorithm to 'cubic' (again)
    - LP: #278801
  * Update configs for 'disable CONFIG_DYNAMIC_FTRACE'
    - LP: #263555

  [ Upstream Kernel Changes ]

  * x86: register a platform RTC device if PNP doesn't describe it
  * disable CONFIG_DYNAMIC_FTRACE due to possible memory corruption on
    module unload

 -- Tim Gardner <email address hidden> Fri, 17 Oct 2008 11:25:39 -0600

Changed in linux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.