From patchwork Fri Feb 4 11:21:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 81851 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 CC00FB711F for ; Fri, 4 Feb 2011 22:21:40 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PlJjA-0007Ph-SX; Fri, 04 Feb 2011 11:21:24 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1PlJj8-0007P3-2i for kernel-team@lists.ubuntu.com; Fri, 04 Feb 2011 11:21:22 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PlJj8-000164-08 for ; Fri, 04 Feb 2011 11:21:22 +0000 Received: from 189.58.21.52.dynamic.adsl.gvt.net.br ([189.58.21.52] helo=[192.168.0.3]) by youngberry.canonical.com with esmtpsa (SSL3.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PlJj7-0006vu-Bq for kernel-team@lists.ubuntu.com; Fri, 04 Feb 2011 11:21:21 +0000 Subject: Building testing kernels From: Herton Ronaldo Krzesinski To: kernel-team@lists.ubuntu.com Organization: Canonical Date: Fri, 04 Feb 2011 09:21:18 -0200 Message-ID: <1296818478.2240.16.camel@herton-IdeaPad-Y430> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 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, what's the common used way to provide test kernels for users to test, is it fine to use ppa in launchpad? Yesterday I started playing with ppa/building packages, and found that we have on kteam-tools a script to build ppa packages more or less with everything sorted out, build-mkppa But I found some problems, when trying to build a ppa for maverick's kernel, using build-mkppa: - It got confused by some tags in ubuntu maverick git repository, as abi in them had a higher number than the last released mavericks kernel, it thought that last kernel was Ubuntu-2.6.35-903.21, while the last one is Ubuntu-2.6.35-26.46. I ended up removing all Ubuntu-2.6.35-90?.* tags to overcome this. - build-mkppa looks outdated compared with build procedures of today, not knowing about debian.master in current repo. I fixed this along another little nits, and then was able to build sources for a ppa. I created a kteam-tools repository to provide the fixes under my account, please check and see if they are ok, if yes here is the pull request: The following changes since commit 94116bd51b2b27829ea4edc517ffefc8e147d9ec: Added regular expression which can be used by other code. (2011-02-02 14:58:10 -0800) are available in the git repository at: ssh://kernel.ubuntu.com/srv/kernel.ubuntu.com/git/herton/kteam-tools fixes Herton Ronaldo Krzesinski (4): Trivial typo fix in build-mkppa build-mkppa: change default PPAEXT to "ppa" build-mkppa: abort if git am fails build-mkppa: make sure we use proper debian master directory buildscripts/build-mkppa | 48 ++++++++++++++++++++++++++++----------------- 1 files changed, 30 insertions(+), 18 deletions(-) diff --git a/buildscripts/build-mkppa b/buildscripts/build-mkppa index 2e0b89b..8bed21b 100755 --- a/buildscripts/build-mkppa +++ b/buildscripts/build-mkppa @@ -30,7 +30,7 @@ # DEBEMAIL: Those two environment variables (exported) are used by dch to # set the email address and the name of the maintainer. #============================================================================== -PPAEXT=smb +PPAEXT=ppa if [ "$PPADIR" = "" ]; then PPADIR="../$(basename $(pwd))-ppa" fi @@ -106,12 +106,14 @@ while [ $# -gt 0 ]; do esac shift done +DEBIAN=$(debian/rules printdebian) +[ -n "$DEBIAN" ] || DEBIAN=debian # # If this is missing, there is really something odd. # -if [ ! -f debian/changelog ]; then - echo "debian/changlog not found!" >&2 +if [ ! -f $DEBIAN/changelog ]; then + echo "$DEBIAN/changelog not found!" >&2 exit 1 fi DIST=$(awk ' @@ -123,7 +125,7 @@ DIST=$(awk ' exit } } -' debian/changelog) +' $DEBIAN/changelog) case $DIST in dapper|hardy|jaunty|karmic|lucid|maverick) @@ -216,9 +218,17 @@ fi # If one of the patches is marked "BumpABI: yes", then bump the ABI later. # BUMPABI=false +applied=0 if [ -r "$PATCHDIR/series" ]; then for i in $(cat $PATCHDIR/series); do git am $PATCHDIR/$i + if [ "$?" -ne 0 ]; then + git am --abort + [ "$applied" -eq 0 ] || git reset --hard HEAD~$applied + echo "Aborted as one of the patches doesn't apply" + exit 1 + fi + let "applied++" if [ "$(GetPatchTag BumpABI "$PATCHDIR/$i")" = "yes" ]; then BUMPABI=true fi @@ -305,13 +315,14 @@ awk ' !silent{ print } -' debian/changelog >debian/changelog.$$ && \ - mv debian/changelog.$$ debian/changelog +' $DEBIAN/changelog >$DEBIAN/changelog.$$ && \ + mv $DEBIAN/changelog.$$ $DEBIAN/changelog -dch -b -v"$PPAVER" -D"$DIST" "!!!PLACEHOLDER!!!" +dch -c $DEBIAN/changelog -b -v"$PPAVER" -D"$DIST" "!!!PLACEHOLDER!!!" awk -vTEXT="$CHANGES" '/!!!PLACEHOLDER!!!/{print TEXT; next} {print}' \ - debian/changelog >debian/changelog.$$ && \ - mv debian/changelog.$$ debian/changelog + $DEBIAN/changelog >$DEBIAN/changelog.$$ && \ + mv $DEBIAN/changelog.$$ $DEBIAN/changelog +[ "$DEBIAN" = "debian" ] || cp -f $DEBIAN/changelog debian/changelog # # Update the debian control file @@ -322,7 +333,8 @@ debian/rules debian/control.stub >/dev/null # Stupid ABI check possibly wants stuff # LASTFULLVER=$VER-$LASTRELEASE -if [ -d debian/abi ]; then +debian/scripts/misc/getabis $VER $LASTRELEASE +if [ -d $DEBIAN/abi ]; then # # No kABI files for the last release. If there is a tarball # that provides those relative to the kernel top level dir, @@ -331,27 +343,27 @@ if [ -d debian/abi ]; then if [ -f $PPADIR/abi-$LASTFULLVER.tar.gz ]; then echo "Found and use $FULLVER tarball." tar -xzf $PPADIR/abi-$LASTFULLVER.tar.gz - git add debian/abi/$LASTFULLVER + git add $DEBIAN/abi/$LASTFULLVER fi - if [ ! -d debian/abi/$LASTFULLVER ]; then + if [ ! -d $DEBIAN/abi/$LASTFULLVER ]; then # # If the directory is still missing, there was no tarbal. # Maybe the files from an older release are there. # - if [ ! -d debian/abi/$LASTFULLVER ]; then + if [ ! -d $DEBIAN/abi/$LASTFULLVER ]; then echo "WARNING: No kABI files for $LASTRELEASE!!!" - LASTRELEASE=$(ls -1 debian/abi|tail -1|cut -d- -f2) + LASTRELEASE=$(ls -1 $DEBIAN/abi|tail -1|cut -d- -f2) if [ "$LASTRELEASE" = "" ]; then echo "Unable to continue!" >&2 exit 1 fi echo "Using $LASTRELEASE instead. Hope this works..." echo "Generate ABI modules files..." - cp -r debian/abi/$VER-$LASTRELEASE \ - debian/abi/$LASTFULLVER - echo $ABI >debian/abi/$LASTFULLVER/abiname + cp -r $DEBIAN/abi/$VER-$LASTRELEASE \ + $DEBIAN/abi/$LASTFULLVER + echo $ABI >$DEBIAN/abi/$LASTFULLVER/abiname fi - git add debian/abi/$LASTFULLVER + git add $DEBIAN/abi/$LASTFULLVER fi fi