From patchwork Sun Apr 12 14:34:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 460503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 615C614027F for ; Mon, 13 Apr 2015 00:35:03 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=aR6LwHPq; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 317D89350D; Sun, 12 Apr 2015 14:35:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GExeJd3zMzOe; Sun, 12 Apr 2015 14:35:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1D9459CD3E; Sun, 12 Apr 2015 14:35:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 00EA21C229C for ; Sun, 12 Apr 2015 14:34:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BB8D89273C for ; Sun, 12 Apr 2015 14:34:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yg3uC0dapp7b for ; Sun, 12 Apr 2015 14:34:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F10ED8BF07 for ; Sun, 12 Apr 2015 14:34:57 +0000 (UTC) Received: by wgyo15 with SMTP id o15so57674114wgy.2 for ; Sun, 12 Apr 2015 07:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7Y7T7szJHblV8w/2hdtA1IRdr6Ps6GVHxjnNgV/3KMc=; b=aR6LwHPq2CY4xH6bE0RDUjg/AINTcb+hlllV9SMQHsHHONV4LSDY7xZw3iwre1bIUg kQvu453PcDXglOiyKGsMC/AlnDOOQF/vZz/BPK5e081sL0OG4khGO0JAMXVZ5d10RP7c TXDqZNREJz9Sd478uMXgndMPf2mGvv1uVo7wAmQFyTBwkv84EmhrRI+8WLIcdYJIEOhI BVMRAQCVmqR7u42tzisT1MN1yxNAjubpAHKekku2w8yv4w6WexBq7FRXbYH+cMSxgOXV C5tk8v/0KgcCVbPTuYOX2dZzXvc4HOETtwHB9c5euGz88Lo9AYUxTCmgIvCN3RtZ8Pp5 mBYQ== X-Received: by 10.194.176.162 with SMTP id cj2mr19109248wjc.93.1428849296676; Sun, 12 Apr 2015 07:34:56 -0700 (PDT) Received: from bobook.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id pa4sm7244535wjb.11.2015.04.12.07.34.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Apr 2015 07:34:55 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Sun, 12 Apr 2015 16:34:45 +0200 Message-Id: <1428849285-21092-4-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1428849285-21092-1-git-send-email-s.martin49@gmail.com> References: <1428849285-21092-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [autobuild 4/4] autobuild-run: allow to change default git uri and branch through env. vars. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This is useful when hacking the autobuild-run script on some specific Buildroot tree. Signed-off-by: Samuel Martin --- scripts/autobuild-run | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index dbfc33e..e1c6c5d 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -102,6 +102,16 @@ Format of the configuration file: Default values for the arguments are: %s + +Environment variables: + + BUILDROOT_GIT_REPO_URI + This environment variable allows to fetch the given Buildroot git repository + instead of the official one. + + BUILDROOT_GIT_BRANCH + This environment variable allows to change the Buildroot git branch instead + of master. """ % '\n '.join( ['%s = %s' % (key, val) for (key, val) in defaults.items()]) @@ -297,8 +307,10 @@ def prepare_build(**kwargs): # Clone Buildroot. This only happens if the source directory # didn't exist already. srcdir = os.path.join(idir, "buildroot") + br_repo = os.environ.get("BUILDROOT_GIT_REPO_URI", "git://git.busybox.net/buildroot") + br_branch = os.environ.get("BUILDROOT_GIT_BRANCH", "master") if not os.path.exists(srcdir): - ret = subprocess.call(["git", "clone", "git://git.busybox.net/buildroot", srcdir], + ret = subprocess.call(["git", "clone", "-b", br_branch, br_repo, srcdir], stdout=log, stderr=log) if ret != 0: log_write(log, "ERROR: could not clone Buildroot sources")