From patchwork Wed Jun 27 08:36:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erich Eckner X-Patchwork-Id: 658 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 DBCE0517DA9F for ; Wed, 27 Jun 2018 08:41:07 +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 ; Wed, 27 Jun 2018 08:41:07 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id CC407B69AB228; Wed, 27 Jun 2018 08:41:01 +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; Wed, 27 Jun 2018 08:41:01 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 964492C0FB; Wed, 27 Jun 2018 08:41:01 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=eckner.net header.i=@eckner.net header.b=TFZClNtx Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id D32F62C2C0 for ; Wed, 27 Jun 2018 08:40:59 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Wed, 27 Jun 2018 08:40:59 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id EAFBBB69AB221 for ; Wed, 27 Jun 2018 08:40:51 +0000 (UTC) Received: from v1.homerecords.de (v1.homerecords.de [62.141.45.186]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Wed, 27 Jun 2018 08:40:51 +0000 (UTC) Received: from localhost (nlopc43.ioq.uni-jena.de [141.35.50.156]) by v1.homerecords.de (Postfix) with ESMTPSA id 693EA598939D; Wed, 27 Jun 2018 10:40:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eckner.net; s=default; t=1530088851; bh=4csi65IlDxnZqz53ChqFTT4ovoR2l+opB7oGdUy1ezc=; l=820; h=Authentication-Results:Received-SPF:From:To:Cc:Subject:Date: Message-Id:X-Mailer; b=TFZClNtx/R6VuSSO2t1j49zp+KjMV8CbAbMD0YwGHT0+inLHdJhnTtkZb3nYAZd0q PWOJutTvGo5N8drJ+lvj0w3sNishoJtHZ6FF7b5aYb1vthllNYuBa0XDCwOwQU8iIr WoBPjevZRaqcv3NX5QK8vkVX0dVcW8LsjbcYYNkk= Authentication-Results: 45186.vs.webtropia.com; spf=pass (sender IP is 141.35.50.156) smtp.mailfrom=erich@eckner.net smtp.helo=localhost Received-SPF: pass (45186.vs.webtropia.com: connection is authenticated) From: arch@eckner.net To: arch-projects@archlinux.org Date: Wed, 27 Jun 2018 10:36:28 +0200 Message-Id: <20180627083627.29540-1-arch@eckner.net> X-Mailer: git-send-email 2.18.0 Subject: [arch-projects] [devtools] [PATCH] mkarchroot.in: copy host's /etc/hosts into the chroot 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: Erich Eckner Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" From: Erich Eckner Otherwise any information necessary to connect to servers (source / pacman mirrors) from the host's /etc/hosts is unavailable inside the chroot. Signed-off-by: Erich Eckner --- mkarchroot.in | 1 + 1 file changed, 1 insertion(+) diff --git a/mkarchroot.in b/mkarchroot.in index 52e363f..5983abc 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -87,6 +87,7 @@ pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \ "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen" +cat '/etc/hosts' > "$working_dir/etc/hosts" echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf" echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"