FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 10-31-2009, 10:38 AM
Stefan Bader
 
Default SRU: Fix virtual package build on i386

SRU Justification:

Impact: Running the kernel build from within debuild (which is done by
the buildds) seems to imply the -e shell option being set. This in
turn causes the copy loop, which takes modules from one main flavour
to the subflavour, to exit on the first wildcard rule which fails to
find any files. This is the case as with the "drivers/xen/*" line.
Everything after that is not going into the package.

Fix: Prevent the find command in the script from being a failure point.
If no files are found, just continue.
[The patch also fixes a small issue on printing the copied modules to
stdout. Before only the main module was printed multiple times, if there
were depending modules. Now the real module name is printed]

Testcase: Run "debuild -B" for the i386 architecture. Without this
patch, there are quite a lot modules missing. (Tested in PPA)

-Stefan
 
Old 10-31-2009, 11:23 AM
Colin Ian King
 
Default SRU: Fix virtual package build on i386

On Sat, 2009-10-31 at 11:38 +0000, Stefan Bader wrote:
> SRU Justification:
>
> Impact: Running the kernel build from within debuild (which is done by
> the buildds) seems to imply the -e shell option being set. This in
> turn causes the copy loop, which takes modules from one main flavour
> to the subflavour, to exit on the first wildcard rule which fails to
> find any files. This is the case as with the "drivers/xen/*" line.
> Everything after that is not going into the package.
>
> Fix: Prevent the find command in the script from being a failure point.
> If no files are found, just continue.
> [The patch also fixes a small issue on printing the copied modules to
> stdout. Before only the main module was printed multiple times, if there
> were depending modules. Now the real module name is printed]
>
> Testcase: Run "debuild -B" for the i386 architecture. Without this
> patch, there are quite a lot modules missing. (Tested in PPA)
>
> -Stefan
>
>
> From ddcb071a37a446cb6ae62e4c6324daf55629c140 Mon Sep 17 00:00:00 2001
> From: Stefan Bader <stefan.bader@canonical.com>
> Date: Fri, 30 Oct 2009 17:26:27 +0000
> Subject: [PATCH] UBUNTU: SAUCE: Fix sub-flavour script to not stop on missing directories
>
> BugLink: http://bugs.launchpad.net/bugs/453073
>
> The way the builders run the sub-flavour script seems to include setting
> an option to exit loops when an error occurs within that loop. This will
> happen when a wildcard entry is not found. Fix this by catching the
> error condition and while being on it also fix the name printed on
> install.
>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
> debian.master/scripts/sub-flavour | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/debian.master/scripts/sub-flavour b/debian.master/scripts/sub-flavour
> index a5b7484..c0093a6 100644
> --- a/debian.master/scripts/sub-flavour
> +++ b/debian.master/scripts/sub-flavour
> @@ -27,7 +27,7 @@ do
> #
> if echo "$line" | grep '*' > /dev/null
> then
> - if [ `eval find "$line" -name '*.ko'|wc -l` -lt 1 ]
> + if [ `eval find "$line" -name '*.ko' 2>/dev/null|wc -l` -lt 1 ]
> then
> echo SUB_INST Warning - No files in $line
> fi
> @@ -46,7 +46,7 @@ cat ${DEBIAN}/sub-flavours/$TO.list | while read line; do
> cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel;
> if echo "$line" | grep '*' > /dev/null
> then
> - eval find "$line" -name '*.ko'
> + eval find "$line" -name '*.ko' 2>/dev/null || true
> elif [ -f "$line" ]
> then
> echo "$line"
> @@ -60,7 +60,7 @@ done | while read mod; do
> while read m; do
> m="${fromdir}$m"
> test -f debian/$to_pkg/$m && continue
> - echo "SUB_INST installing: $mod"
> + echo "SUB_INST installing: $m"
> install -D -m644 debian/$from_pkg/$m
> debian/$to_pkg/$m
> done
> --
> 1.6.3.3
>
>

OK, looks sane to me, and the fix to the module printing was a good
catch too.

Acked-by: Colin King <colin.king@canonical.com>


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 10-31-2009, 11:35 AM
Andy Whitcroft
 
Default SRU: Fix virtual package build on i386

On Sat, Oct 31, 2009 at 11:38:49AM +0000, Stefan Bader wrote:
> SRU Justification:
>
> Impact: Running the kernel build from within debuild (which is done by
> the buildds) seems to imply the -e shell option being set. This in
> turn causes the copy loop, which takes modules from one main flavour
> to the subflavour, to exit on the first wildcard rule which fails to
> find any files. This is the case as with the "drivers/xen/*" line.
> Everything after that is not going into the package.
>
> Fix: Prevent the find command in the script from being a failure point.
> If no files are found, just continue.
> [The patch also fixes a small issue on printing the copied modules to
> stdout. Before only the main module was printed multiple times, if there
> were depending modules. Now the real module name is printed]
>
> Testcase: Run "debuild -B" for the i386 architecture. Without this
> patch, there are quite a lot modules missing. (Tested in PPA)

It also cleans up some spurious error messages in the output (which is
good). Looks good to me, and the PPA packages look a lot bigger.

Acked-by: Andy Whitcroft <apw@canonical.com>

> From ddcb071a37a446cb6ae62e4c6324daf55629c140 Mon Sep 17 00:00:00 2001
> From: Stefan Bader <stefan.bader@canonical.com>
> Date: Fri, 30 Oct 2009 17:26:27 +0000
> Subject: [PATCH] UBUNTU: SAUCE: Fix sub-flavour script to not stop on missing directories
>
> BugLink: http://bugs.launchpad.net/bugs/453073
>
> The way the builders run the sub-flavour script seems to include setting
> an option to exit loops when an error occurs within that loop. This will
> happen when a wildcard entry is not found. Fix this by catching the
> error condition and while being on it also fix the name printed on
> install.
>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
> debian.master/scripts/sub-flavour | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/debian.master/scripts/sub-flavour b/debian.master/scripts/sub-flavour
> index a5b7484..c0093a6 100644
> --- a/debian.master/scripts/sub-flavour
> +++ b/debian.master/scripts/sub-flavour
> @@ -27,7 +27,7 @@ do
> #
> if echo "$line" | grep '*' > /dev/null
> then
> - if [ `eval find "$line" -name '*.ko'|wc -l` -lt 1 ]
> + if [ `eval find "$line" -name '*.ko' 2>/dev/null|wc -l` -lt 1 ]
> then
> echo SUB_INST Warning - No files in $line
> fi
> @@ -46,7 +46,7 @@ cat ${DEBIAN}/sub-flavours/$TO.list | while read line; do
> cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel;
> if echo "$line" | grep '*' > /dev/null
> then
> - eval find "$line" -name '*.ko'
> + eval find "$line" -name '*.ko' 2>/dev/null || true
> elif [ -f "$line" ]
> then
> echo "$line"
> @@ -60,7 +60,7 @@ done | while read mod; do
> while read m; do
> m="${fromdir}$m"
> test -f debian/$to_pkg/$m && continue
> - echo "SUB_INST installing: $mod"
> + echo "SUB_INST installing: $m"
> install -D -m644 debian/$from_pkg/$m
> debian/$to_pkg/$m
> done

-apw

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 10-31-2009, 11:45 AM
Stefan Bader
 
Default SRU: Fix virtual package build on i386

applied

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 10-31-2009, 12:52 PM
Tim Gardner
 
Default SRU: Fix virtual package build on i386

Stefan Bader wrote:
> SRU Justification:
>
> Impact: Running the kernel build from within debuild (which is done by
> the buildds) seems to imply the -e shell option being set. This in
> turn causes the copy loop, which takes modules from one main flavour
> to the subflavour, to exit on the first wildcard rule which fails to
> find any files. This is the case as with the "drivers/xen/*" line.
> Everything after that is not going into the package.
>
> Fix: Prevent the find command in the script from being a failure point.
> If no files are found, just continue.
> [The patch also fixes a small issue on printing the copied modules to
> stdout. Before only the main module was printed multiple times, if there
> were depending modules. Now the real module name is printed]
>
> Testcase: Run "debuild -B" for the i386 architecture. Without this
> patch, there are quite a lot modules missing. (Tested in PPA)
>
> -Stefan
>

The root cause for this change in behavior is bash which was revised
from 3.x to 4.x during the Karmic development cycle. Evidentally the 4.x
version strictly enforces '-e' semantics. I whacked on the sub-flavours
script when that happened, but I'm clearly not the best shell programmer
Good catches.

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 01:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org