From patchwork Mon Jul 23 07:16:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hesse X-Patchwork-Id: 702 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 9B7F95A34C20 for ; Mon, 23 Jul 2018 07:16:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on apollo X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED=0.1, MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,T_DKIM_INVALID=1 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-BL-Results: [127.0.9.2] Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 23 Jul 2018 07:16:55 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 4BB48C45A19C2; Mon, 23 Jul 2018 07:16:48 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Mon, 23 Jul 2018 07:16:48 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id F0AC228E9A; Mon, 23 Jul 2018 07:16:47 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=eworm.de header.i=@eworm.de header.b=oAkmpyGv Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 505032804F for ; Mon, 23 Jul 2018 07:16:45 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Mon, 23 Jul 2018 07:16:45 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 17478C45A19BD for ; Mon, 23 Jul 2018 07:16:38 +0000 (UTC) Received: from mx.mylinuxtime.de (mx.mylinuxtime.de [195.201.174.144]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Mon, 23 Jul 2018 07:16:38 +0000 (UTC) Received: from leda.eworm.de (unknown [87.190.244.126]) (using TLSv1.2 with cipher DHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx.mylinuxtime.de (Postfix) with ESMTPSA id EA562D3569; Mon, 23 Jul 2018 09:16:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mx.mylinuxtime.de EA562D3569 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eworm.de; s=mail; t=1532330197; bh=be/iQE3tyHDYfOpT0+CtwojN94lhf6PANI0Nc6PammE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oAkmpyGv5Yq5VhS0NfgdZwQPNpubNAp2btqTKeWoX98QaRu6+RIPRkxfD+sb8GYaL Kn/cNhqRcnKJ+6lXZ23NZH+eLsE95avrhBRgQUvf4lXtLluQ891GpomxmDP1ySn2CW VdOEx/HKroI24WacNagSH0tJutuyxXIcUmNO9XcI= Received: by leda.eworm.de (Postfix, from userid 1000) id A9806102986; Mon, 23 Jul 2018 09:16:07 +0200 (CEST) From: Christian Hesse To: arch-projects@archlinux.org Date: Mon, 23 Jul 2018 09:16:02 +0200 Message-Id: <20180723071602.17449-1-list@eworm.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723070418.16657-1-list@eworm.de> References: <20180723070418.16657-1-list@eworm.de> Subject: [arch-projects] [devtools] [PATCH v2 1/1] arch-nspawn: ignore localhost for repository mirror X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Arch Linux projects development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Arch Linux projects development discussion Cc: Christian Hesse Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" From: Christian Hesse My system has a mirror configuration where only the host can access a local caching service on localhost. So ignore localhost urls. Signed-off-by: Christian Hesse --- arch-nspawn.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-nspawn.in b/arch-nspawn.in index b9c846e..020ed71 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -60,7 +60,7 @@ fi pacconf_cmd=$(command -v pacman-conf || command -v pacconf) # shellcheck disable=2016 -host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#') +host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | grep -E -v '(127\.0\.0\.1|localhost)' | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#') # shellcheck disable=2016 [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')