From patchwork Mon Jul 23 07:04:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hesse X-Patchwork-Id: 701 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 260A55A33F6F for ; Mon, 23 Jul 2018 07:05:05 +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 [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 23 Jul 2018 07:05:05 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id EDFBFC4591070; Mon, 23 Jul 2018 07:04:59 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (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:04:59 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id BEE2528EA6; Mon, 23 Jul 2018 07:04:59 +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=Ui1JguHp Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 0F32928E9A for ; Mon, 23 Jul 2018 07:04:54 +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:04:54 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id B081EC459106C for ; Mon, 23 Jul 2018 07:04:52 +0000 (UTC) Received: from mx.mylinuxtime.de (mx.mylinuxtime.de [IPv6:2a01:4f8:13a:16c2::25]) (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:04:52 +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 8BB5AD341A; Mon, 23 Jul 2018 09:04:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mx.mylinuxtime.de 8BB5AD341A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eworm.de; s=mail; t=1532329492; bh=b/+Es7ogOGMTgRt53MPNSzWzKAAi/AVY6s3k1669Fqs=; h=From:To:Cc:Subject:Date; b=Ui1JguHppStUBPAtEea3X2vD0InZ+WY1jF8rNZi+HUe4ZQPYmOjOpjZnXEbrZ8i0h E0HQtr2thIhNXJgUIe7o8EaKvozIeUKmCzAw3nB4gBnlpck71K3hDOKKL+e0b29hRv hJvEPP4elnn9rTMMGl3GR/jJXCeCK66NFdoB5NQg= Received: by leda.eworm.de (Postfix, from userid 1000) id 47B1B102986; Mon, 23 Jul 2018 09:04:22 +0200 (CEST) From: Christian Hesse To: arch-projects@archlinux.org Date: Mon, 23 Jul 2018 09:04:18 +0200 Message-Id: <20180723070418.16657-1-list@eworm.de> X-Mailer: git-send-email 2.18.0 Subject: [arch-projects] [devtools] [PATCH 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')