Comment 6 for bug 621175

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

I examined the build logs from the actual buildd's:

http://launchpadlibrarian.net/55565061/buildlog_ubuntu-maverick-amd64.linux_2.6.35-21.31_FULLYBUILT.txt.gz

I noticed something peculiar in the 2.6.35-21.31 build log:

#
# Remove all modules not in the inclusion list.
#
if [ -f debian.master/control.d/virtual.inclusion-list ] ; then \
  debian/scripts/module-inclusion /build/buildd/linux-2.6.35/debian/linux-image-2.6.35-21-virtual/lib/modules/2.6.35-21-virtual/kernel \
   debian.master/control.d/virtual.inclusion-list 2>&1 | \
    tee virtual.inclusion-list.log; \
  /sbin/depmod -b /build/buildd/linux-2.6.35/debian/linux-image-2.6.35-21-virtual -ea -F /build/buildd/linux-2.6.35/debian/linux-image-2.6.35-21-virtual/boot/System.map-2.6.35-21-virtual \
   2.6.35-21-virtual 2>&1 |tee virtual.depmod.log; \
 fi
/bin/bash: line 1: debian/scripts/module-inclusion: Permission denied

Due to the Permission denied error, the virtual images are not removing all the modules not in the inclusion list, thus resulting in the larger -virtual deb size. When doing dpkg-buildpackage -S -rfakeroot... with the orig.tar.gz I noticed the following warning:

dpkg-source: warning: executable mode 0755 of 'debian/scripts/module-inclusion' will not be represented in diff

Thus it seems the executable permissions for debian/scripts/module-inclusion are not represented which results in the Permission denied error. To test this, I removed the executable permissions for debian/scripts/module-inclusion from my local test build and was able to reproduce the Permission denied error. Applying the following patch to execute debian/scripts/module-inclusion within a sub-shell seems to have resolved the issue. I've sent this to the Ubuntu kernel team mailing list for feedback. Thanks.

https://lists.ubuntu.com/archives/kernel-team/2010-September/012763.html

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index da93e4d..1d26496 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -82,7 +82,7 @@ endif
  # Remove all modules not in the inclusion list.
  #
  if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
- $(DROOT)/scripts/module-inclusion $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
+ $(SHELL) $(DROOT)/scripts/module-inclusion $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
    $(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
     tee $(target_flavour).inclusion-list.log; \
   /sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \