diff mbox

[kteam-tools] mainline-build: minor cleanups for control and clarity

Message ID 20110526181525.GG19633@outflux.net
State New
Headers show

Commit Message

Kees Cook May 26, 2011, 6:15 p.m. UTC
Update for better external control of mainline builds of patched trees.
Add -generic-pae build to the target list.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
---
 mainline-build/mainline-build-one |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

Comments

Andy Whitcroft June 8, 2011, 1:05 p.m. UTC | #1
On Thu, May 26, 2011 at 11:15:25AM -0700, Kees Cook wrote:
> Update for better external control of mainline builds of patched trees.
> Add -generic-pae build to the target list.
> 
> Signed-off-by: Kees Cook <kees.cook@canonical.com>
> ---
>  mainline-build/mainline-build-one |   15 ++++++++++++---
>  1 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/mainline-build/mainline-build-one b/mainline-build/mainline-build-one
> index 7e21b7e..31ce112 100755
> --- a/mainline-build/mainline-build-one
> +++ b/mainline-build/mainline-build-one
> @@ -3,7 +3,7 @@
>  P="build-mainline-one"
>  
>  if [ "$#" -ne 2 -a "$#" -ne 3 ]; then
> -	echo "Usage: $P <tag> <series> [<abinum>" 1>&2
> +	echo "Usage: $P <tag> <series> [<abinum> [<upload> [<basedir>]]]" 1>&2
>  	exit 1
You are adding two new parameters here, but the $# has not been
adjusted?  How does that work?

>  fi
>  
> @@ -16,6 +16,10 @@ esac
>  commit="$1"
>  series="$2"
>  abinum="$3"
> +upload="$4"
> +if [ -n "$5" ]; then
> +	here="$5"
> +fi
>  
>  build_release="hardy"
>  
> @@ -49,7 +53,9 @@ if [ "$abinum" = "" ]; then
>  fi
>  
>  # use the date as an upload number so we can tell different builds apart.
> -upload=".`date +%Y%m%d%H%M`"
> +if [ -z "$upload" ]; then
> +	upload="`date +%Y%m%d%H%M`"
> +fi
>  
>  # Produce CHANGES fragment.
>  if [ "$log_enabled" -eq 1 ]; then
> @@ -161,7 +167,7 @@ do
>  done 
>  changelog="$debian/changelog"
>  rm -f "$changelog"
> -EDITOR=":" dch -v "${version}-$abinum$upload" --distribution "$series" \
> +EDITOR=":" dch -v "${version}-$abinum.$upload" --distribution "$series" \
>  	--package linux --create -c "$changelog" </dev/null
>  sed -e "s/\* .*/* Mainline build at commit: $long/" \
>  	<"$changelog" >"$changelog.new"
> @@ -191,6 +197,7 @@ git clean -x -f -d
>  # Build the source package.
>  #
>  #dpkg-buildpackage -S -sd -rfakeroot -I.git -I.gitignore -i'\.git.*'
> +#dpkg-buildpackage -S -sa -rfakeroot -I.git -I.gitignore -i'\.git.*'
>  #dpkg-buildpackage -b
>  dchroot --directory=`pwd` -c "$build_release" \
>  	"fakeroot debian/rules clean"
> @@ -204,3 +211,5 @@ linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
>  	"fakeroot debian/rules clean"
>  linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
>  	"fakeroot debian/rules do_tools=0 no_dumpfile=1 binary-generic"
> +linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
> +	"fakeroot debian/rules do_tools=0 no_dumpfile=1 binary-generic-pae"

Ok, whats the rational for this, we are adding about an hour per flavour
here per build.  Thats a 50% uplift and I want to know its worth the time
zinc will spend grinding these out.  And if we are doing that one should
we be doing a server flavour too.

Otherwise the changes look fine.

-apw
Kees Cook June 8, 2011, 7:41 p.m. UTC | #2
Hi Andy,

On Wed, Jun 08, 2011 at 02:05:47PM +0100, Andy Whitcroft wrote:
> On Thu, May 26, 2011 at 11:15:25AM -0700, Kees Cook wrote:
> > Update for better external control of mainline builds of patched trees.
> > Add -generic-pae build to the target list.
> > 
> > Signed-off-by: Kees Cook <kees.cook@canonical.com>
> > ---
> >  mainline-build/mainline-build-one |   15 ++++++++++++---
> >  1 files changed, 12 insertions(+), 3 deletions(-)
> > 
> > diff --git a/mainline-build/mainline-build-one b/mainline-build/mainline-build-one
> > index 7e21b7e..31ce112 100755
> > --- a/mainline-build/mainline-build-one
> > +++ b/mainline-build/mainline-build-one
> > @@ -3,7 +3,7 @@
> >  P="build-mainline-one"
> >  
> >  if [ "$#" -ne 2 -a "$#" -ne 3 ]; then
> > -	echo "Usage: $P <tag> <series> [<abinum>" 1>&2
> > +	echo "Usage: $P <tag> <series> [<abinum> [<upload> [<basedir>]]]" 1>&2
> >  	exit 1
> You are adding two new parameters here, but the $# has not been
> adjusted?  How does that work?

They are optional arguments just like abinum, so the $# does not need
adjusting. Only "tag" and "series" are required, hence testing for 2 and 3.

> >  # Build the source package.
> >  #
> >  #dpkg-buildpackage -S -sd -rfakeroot -I.git -I.gitignore -i'\.git.*'
> > +#dpkg-buildpackage -S -sa -rfakeroot -I.git -I.gitignore -i'\.git.*'
> >  #dpkg-buildpackage -b
> >  dchroot --directory=`pwd` -c "$build_release" \
> >  	"fakeroot debian/rules clean"
> > @@ -204,3 +211,5 @@ linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
> >  	"fakeroot debian/rules clean"
> >  linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
> >  	"fakeroot debian/rules do_tools=0 no_dumpfile=1 binary-generic"
> > +linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
> > +	"fakeroot debian/rules do_tools=0 no_dumpfile=1 binary-generic-pae"
> 
> Ok, whats the rational for this, we are adding about an hour per flavour
> here per build.  Thats a 50% uplift and I want to know its worth the time
> zinc will spend grinding these out.  And if we are doing that one should
> we be doing a server flavour too.
> 
> Otherwise the changes look fine.

We probably need some way to configure a list of flavors to build, since I
only need -generic-pae for what I'm using this script for. Leave off this
chunk for now, and I'll send a follow-up that adds a flavor list option and
defaults to what zinc is currently building.

-Kees
diff mbox

Patch

diff --git a/mainline-build/mainline-build-one b/mainline-build/mainline-build-one
index 7e21b7e..31ce112 100755
--- a/mainline-build/mainline-build-one
+++ b/mainline-build/mainline-build-one
@@ -3,7 +3,7 @@ 
 P="build-mainline-one"
 
 if [ "$#" -ne 2 -a "$#" -ne 3 ]; then
-	echo "Usage: $P <tag> <series> [<abinum>" 1>&2
+	echo "Usage: $P <tag> <series> [<abinum> [<upload> [<basedir>]]]" 1>&2
 	exit 1
 fi
 
@@ -16,6 +16,10 @@  esac
 commit="$1"
 series="$2"
 abinum="$3"
+upload="$4"
+if [ -n "$5" ]; then
+	here="$5"
+fi
 
 build_release="hardy"
 
@@ -49,7 +53,9 @@  if [ "$abinum" = "" ]; then
 fi
 
 # use the date as an upload number so we can tell different builds apart.
-upload=".`date +%Y%m%d%H%M`"
+if [ -z "$upload" ]; then
+	upload="`date +%Y%m%d%H%M`"
+fi
 
 # Produce CHANGES fragment.
 if [ "$log_enabled" -eq 1 ]; then
@@ -161,7 +167,7 @@  do
 done 
 changelog="$debian/changelog"
 rm -f "$changelog"
-EDITOR=":" dch -v "${version}-$abinum$upload" --distribution "$series" \
+EDITOR=":" dch -v "${version}-$abinum.$upload" --distribution "$series" \
 	--package linux --create -c "$changelog" </dev/null
 sed -e "s/\* .*/* Mainline build at commit: $long/" \
 	<"$changelog" >"$changelog.new"
@@ -191,6 +197,7 @@  git clean -x -f -d
 # Build the source package.
 #
 #dpkg-buildpackage -S -sd -rfakeroot -I.git -I.gitignore -i'\.git.*'
+#dpkg-buildpackage -S -sa -rfakeroot -I.git -I.gitignore -i'\.git.*'
 #dpkg-buildpackage -b
 dchroot --directory=`pwd` -c "$build_release" \
 	"fakeroot debian/rules clean"
@@ -204,3 +211,5 @@  linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
 	"fakeroot debian/rules clean"
 linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
 	"fakeroot debian/rules do_tools=0 no_dumpfile=1 binary-generic"
+linux32 dchroot --directory=`pwd` -c "$build_release-i386" \
+	"fakeroot debian/rules do_tools=0 no_dumpfile=1 binary-generic-pae"