From patchwork Fri Apr 20 15:32:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 901987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 40SKbx30Jyz9s08; Sat, 21 Apr 2018 01:32:29 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1f9Y1P-0000uk-JR; Fri, 20 Apr 2018 15:32:23 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1f9Y1N-0000tu-VY for kernel-team@lists.ubuntu.com; Fri, 20 Apr 2018 15:32:21 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1f9Y1N-0003zg-JR; Fri, 20 Apr 2018 15:32:21 +0000 Received: from kamal by fourier with local (Exim 4.86_2) (envelope-from ) id 1f9Y1L-0001R5-56; Fri, 20 Apr 2018 08:32:19 -0700 Date: Fri, 20 Apr 2018 08:32:18 -0700 From: Kamal Mostafa To: Juerg Haefliger Subject: ACK+cmnt: [kteam-tools][PATCH] git-build-kernel: Don't hard-code the location of the build script Message-ID: <20180420153217.GA32599@whence.com> References: <20180326144032.28726-1-juergh@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-team@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" On Fri, Apr 20, 2018 at 09:12:50AM +0200, Juerg Haefliger wrote: > Ping. > > On 03/26/2018 04:40 PM, Juerg Haefliger wrote: > > Instead, deduce its location from the location of the post-receive hook. > > With this, one can use a local build script, for example for testing or > > special builds. > > > > Signed-off-by: Juerg Haefliger > > --- > > git-build-kernel/post-receive | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/git-build-kernel/post-receive b/git-build-kernel/post-receive > > index dd8451f35dd5..43671f97a82a 100755 > > --- a/git-build-kernel/post-receive > > +++ b/git-build-kernel/post-receive > > @@ -2,8 +2,9 @@ > > # .git/hooks/post-receive --> git-build-kernel automatic push builder > > # Kamal Mostafa > > > > -### directory containing the git-build-kernel script > > -GBK_DIR=/usr3/ubuntu/kteam-tools/git-build-kernel > > +### directory containing the git-build-kernel script (the same directory where > > +### the post-receive hook is located) > > +GBK_DIR="$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")" > > > > option_only_build_refs_build=0 > > option_only_build_predefined_refs=1 > > > > Acked-by: Kamal Mostafa And here's a patch to the README that could go along with the code change. diff --git a/git-build-kernel/README b/git-build-kernel/README index 03b8c00..875ffb9 100644 --- a/git-build-kernel/README +++ b/git-build-kernel/README @@ -75,8 +75,9 @@ Notes: To set up your git push auto-builder -1. On the build server (tangerine or gomeisa), cd into your own ubuntu-* - repo .git/hooks/ directory, and symlink to my post-receive script: +1. On the build server, cd into your own ubuntu-* repo .git/hooks/ directory, + and create a symlink to the builder's post-receive script. This + post-receive MUST be created as a symlink (not a copy): cd .../ubuntu-something/.git/hooks/ ln -s /usr3/ubuntu/kteam-tools/git-build-kernel/post-receive .