From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6600683098303627264 X-Received: by 2002:a5d:64d2:: with SMTP id y18-v6mr642475wrv.17.1536842184342; Thu, 13 Sep 2018 05:36:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:650b:: with SMTP id z11-v6ls1339770wmb.10.canary-gmail; Thu, 13 Sep 2018 05:36:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJcAc1E1gneK7xC3CcYss6/YuJS/vH8FULDqR9d98TFlGre8hKHQcShHbDWxXxvrqDBJNW X-Received: by 2002:a1c:2dd3:: with SMTP id t202-v6mr706122wmt.19.1536842183931; Thu, 13 Sep 2018 05:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536842183; cv=none; d=google.com; s=arc-20160816; b=FC+sloNWFbz6U3TJNt/hR4kiWIsONd192BUwsTm5/aVXOPDM9OKj4Wz1Gxs4TQLtae VzQSrTqGH+9cHYBc71tNerdo1QCr7bnjUYxd7dTZYRVVFgjpsFjwzE/tUD/hfV+ZGCDr xpB/LDGpFiNVgmVIsDDlUr9ThVX2f/8LUzOJ0ogmRP+d5IeiNqxoXiCo02K+FVI15jgE EJlqIHD0/2/Eu3IkiJwTzkgrQxYveosx4GR8BBHgS+K24TU4Zra96jZ8jGmIr1v82ZSx YU8nWsNbJQBxPvK5NBhaBSYSx8hibNoGMOONcoOuem+6v9iISu0SfQbriXLtZFsABByd CzBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=h+dhriHxPIQzpjr1uwkj++xaQqt11dwOR5jRFjuFgTQ=; b=NHxPhtC/OMi8y83dj0ldf8Ou7gi0w0WVvNqy06FNzHtJfMK5LdVUsUFzgG4HRlr77h UWmgM2RRrOGivOOEn4c5WSTq3Xhquok/nWdMnaH9iWAAG+CVLdg0kD6wV7VMf6w4gf64 q9kmHojtz41Tno+rDCW8clkfd5bAx6WFbRuvenJUXEC3onJASJ5MZ5OUShnN+9WdNHYV /vCjBnJMWXclG60b2mOazx83TkKDpIct60jqL7m9gcYLjcVJ0FrItIMI7ppPjrx12OL3 T1ZJBYtOsGXPON2ern4SCZ+mktT3TgAm8+yAH3mdTNFasrXn6ymACGTSMJTP3dGoeE8R 0vsA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id y139-v6si74235wmc.3.2018.09.13.05.36.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 05:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w8DCaNM9021050 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Sep 2018 14:36:23 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w8DCaNDb022583; Thu, 13 Sep 2018 14:36:23 +0200 Date: Thu, 13 Sep 2018 14:36:22 +0200 From: Henning Schild To: Cedric Hombourger Cc: Subject: Re: [PATCH] isar-bootstrap: preserve environment in sudo'ed debootstrap call Message-ID: <20180913143622.09597d5e@md1pvb1c.ad001.siemens.net> In-Reply-To: <1536841258-161-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1536841258-161-1-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: swCn2aNrp5j5 Am Thu, 13 Sep 2018 14:20:58 +0200 schrieb Cedric Hombourger : > Make bitbake add proxy environment variables and preserve them when > calling debootstrap under sudo. This is required to get user-defined > proxies used while bootstraping Isar. > > Signed-off-by: Cedric Hombourger > --- > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index > 4010307..a936e7f 100644 --- > a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -171,7 > +171,8 @@ isar_bootstrap() { esac > shift > done > - sudo flock "${ISAR_BOOTSTRAP_LOCK}" -c "\ > + E="${@bb.utils.export_proxies(d)}" > + sudo -E flock "${ISAR_BOOTSTRAP_LOCK}" -c "\ > set -e > if [ ! -e "${DEPLOY_ISAR_BOOTSTRAP}" ]; then > if [ -e "${ROOTFSDIR}" ]; then > @@ -179,7 +180,6 @@ isar_bootstrap() { > umount -l "${ROOTFSDIR}/proc" || true > rm -rf "${ROOTFSDIR}" > fi > - E="${@bb.utils.export_proxies(d)}" > if [ ${IS_HOST} ]; then > ${DEBOOTSTRAP} --verbose \ > --variant=minbase \ So you are pulling that thing out of the sudo? How does that change what is happening? One way or the other, the environment should be as expected. The other thing i was wondering, why is this export_proxies expression in the flock-block twice? If there is a difference in doing the export_proxies before "sudo flock", please explain why it should be outside. And remove the second inner export_proxies if possible. Henning