From patchwork Tue Sep 14 05:57:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leann Ogasawara X-Patchwork-Id: 64673 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id A4B28B6F0D for ; Tue, 14 Sep 2010 15:57:43 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OvOWO-0006f2-Jf; Tue, 14 Sep 2010 06:57:36 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OvOWM-0006ev-3e for kernel-team@lists.ubuntu.com; Tue, 14 Sep 2010 06:57:34 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OvOWM-0001OO-2F for ; Tue, 14 Sep 2010 06:57:34 +0100 Received: from c-76-105-148-120.hsd1.or.comcast.net ([76.105.148.120] helo=[192.168.1.4]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OvOWL-0007b1-LB for kernel-team@lists.ubuntu.com; Tue, 14 Sep 2010 06:57:34 +0100 Subject: [Maverick] [PATCH] UBUNTU: execute module-inclusion within a subshell From: Leann Ogasawara To: kernel-team Date: Mon, 13 Sep 2010 22:57:27 -0700 Message-ID: <1284443847.2007.253.camel@emiko> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Hi All, LP Bug 621175 reports that the -virtual kernel .deb size is much larger than expected. They should be around 9.9M but are currently 33M: $ ls -sh *.deb 33M linux-image-2.6.35-21-virtual_2.6.35-21.31_amd64.deb 33M linux-image-2.6.35-21-virtual_2.6.35-21.31_i386.deb 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 resolve the issue. Feedback/comments appreciated. This is intended for Maverick. Thanks, Leann From 9699fb7763d3223441d66bdf980cbadec109395f Mon Sep 17 00:00:00 2001 From: Leann Ogasawara Date: Mon, 13 Sep 2010 22:26:20 -0700 Subject: [PATCH] UBUNTU: execute module-inclusion within a subshell BugLink: http://bugs.launchpad.net/bugs/621175 When uploading the kernel with the orig.tar.gz included, executable modes are not represented in the diff, eg: dpkg-source: warning: executable mode 0755 of 'debian/scripts/module-inclusion' will not be represented in diff As a result, when debian/scripts/module-inclusion is called when building the -virtual kernel .deb, we see the following error: /bin/bash: line 1: debian/scripts/module-inclusion: Permission denied This results in a larger -virtual kernel .deb size because the module-inclusion script is not run which prevents the removal of modules not in the inclusion list. The following patch calls debian/scripts/module-inclusion from within a subshell in order for it to execute. Signed-off-by: Leann Ogasawara Acked-by: Tim Gardner --- debian/rules.d/2-binary-arch.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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)-$* \