From patchwork Wed Aug 3 15:47:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9261557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A89B60865 for ; Wed, 3 Aug 2016 15:57:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CCC5283A6 for ; Wed, 3 Aug 2016 15:57:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3100628343; Wed, 3 Aug 2016 15:57:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 93EC028485 for ; Wed, 3 Aug 2016 15:57:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUyVS-0003sR-OR; Wed, 03 Aug 2016 15:54:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUyVS-0003sK-1r for xen-devel@lists.xenproject.org; Wed, 03 Aug 2016 15:54:54 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 0B/FD-27233-DC312A75; Wed, 03 Aug 2016 15:54:53 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRWlGSWpSXmKPExsXitHSDve4Z4UX hBnM2m1p83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBlnd+5nLFjMUzFt5izWBsZ+ri5GTg4JAX+J D52TWUBsNgFdiaYtf9m6GDk4RARUJG7vNQAJMwuESxydc5UVxBYWiJR4enQ+G4jNAlTypuU+I 0g5r4CHxKZZ/hAT5STOH//JDBIWElCTmLs+HiTMKyAocXLmExaIiRISB1+8ACuREOCW+NttP4 GRZxaSqllIqhYwMq1iVC9OLSpLLdI10ksqykzPKMlNzMzRNTQw1stNLS5OTE/NSUwq1kvOz93 ECAyNegYGxh2Mp5qdDzFKcjApifJOPLgwXIgvKT+lMiOxOCO+qDQntfgQowwHh5IEb5fQonAh waLU9NSKtMwcYJDCpCU4eJREeO+ApHmLCxJzizPTIVKnGBWlxHkngSQEQBIZpXlwbbDIuMQoK yXMy8jAwCDEU5BalJtZgir/ilGcg1FJmLcDZApPZl4J3PRXQIuZgBafMFgAsrgkESEl1cA4OT w8NtrXb+09A6EF5nOzFK6osD7fYebp98NJzqI5fcPCS4YvLxQwrC1//v+Uh+aszaGzOV9sYJ3 ZrqDQv7pu3Vl/puy/Jvd8uFKKNru8TlNl+uvybJabiPP1I9tq368MbXt720Ah7cN7BuuGS212 1Ya8MQfNFUPuLlJ74n9Vu+dUe7tjcrcSS3FGoqEWc1FxIgCF6rOchwIAAA== X-Env-Sender: prvs=016a56d21=Ian.Jackson@citrix.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1470239690!53896866!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12944 invoked from network); 3 Aug 2016 15:54:52 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-8.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 3 Aug 2016 15:54:52 -0000 X-IronPort-AV: E=Sophos;i="5.28,466,1464652800"; d="scan'208";a="377237951" From: Ian Jackson To: Date: Wed, 3 Aug 2016 16:47:22 +0100 Message-ID: <1470239242-5302-1-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: Andrew Cooper , Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH] ts-xen-build-prep: Use .gitconfig so _everything_ uses git cache X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP In particular, when xen.git clones a subtrees, whose url we didn't specify in the runvars, we end up using the url from xen.git's Config.mk. Arrange to use the git cache for all git urls, via the insteadOf feature. Note that the git config url insteadOf feature is backwards: one configures the config variable "url.NEW-URL.insteadOf.OLD-URL". So the key is the value, and the value is the key. Signed-off-by: Ian Jackson --- ts-xen-build-prep | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ts-xen-build-prep b/ts-xen-build-prep index 0450811..4dd10c4 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -243,6 +243,25 @@ sub ccache_setup () { } } +sub gitcache_setup () { + my $proxy = $c{GitCacheProxy}; + return unless $proxy; + + logm("setting up git cacheing proxy $proxy"); + + my $gitcfg = ''; + foreach my $urlprefix (qw(git:// http:// https://)) { + $gitcfg .= <{Flags}{'no-reinstall'}) { determine_vg_lv(); lvcreate(); @@ -251,6 +270,7 @@ if (!$ho->{Flags}{'no-reinstall'}) { lvextend_stage2(); replace_home(); ccache_setup(); + gitcache_setup(); } $mjobdb->jobdb_resource_shared_mark_ready ($ho->{Ident}, $ho->{Name}, "build-".$ho->{Suite}."-".$r{arch});