From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6876351789037256704 X-Received: by 2002:a05:6512:32a8:: with SMTP id q8mr1771763lfe.209.1601051279665; Fri, 25 Sep 2020 09:27:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:554:: with SMTP id 81ls975236lff.1.gmail; Fri, 25 Sep 2020 09:27:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHhzr/NsH23jIelk7MmmGRGmpliUthEib4eOHQMSHIHscPWgDJcNRfRE7AJBXTb4Z82dSm X-Received: by 2002:ac2:5f63:: with SMTP id c3mr1531868lfc.283.1601051278534; Fri, 25 Sep 2020 09:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601051278; cv=none; d=google.com; s=arc-20160816; b=iewWnnpP7hgQEs4Njh4COe2KEGzQVkg50VnzjTgbBZaAxwdcUDkofpgKBBNQHU/dUo wvnWpB+z6337Qkvd+2N/q3p8kCdVPzCERC60khgxbEBeAl6l7dxOXm8C3z/w8tKOy67i luCypbMspSjsTZ+bpF+8N9vT7jQuE3JYsPXJq1Ke7T10VmAHC+qxxYSJgxvwFRZqoxjG mlT8hM51ARU0SSmXtwPkfx5/Mspqph0LzSUTDrPg+46ZrVN7PyzfRswO4VgA2+rO2Xd1 WUUQMYhgvnHe9stNWYQJz3g8rrL4ufYI8Iu/oVpofGTsKWF2B+0E99rhS5crgtXY1W+Q wRTQ== 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=IF6vDsSv/NfFe9dvIdn38r0Li9v4BGtFBCxBZFIQBsI=; b=Aapsfd2B31vIHJhYh0zr7LdcFYdNAeHS/PE4kcOEw++JVHZ40yXyPGhsuTvo2bpXDj IVderKmpA7HiQ4mTXHSE4BAh6tPLKAVxAuArPN3soc+5ZMbHZS0itL7cVDicvf9rye7t S0nQsjqGY+BCBoxVYgC88chQL9dzbanYY/W069e2Pe8LhXeNfoo0lQYeai1nPogrGnKX 670praOlyBumwzC8xIUtCiCUpYGaUxEFJg6KwVyHEO8FXzfvGdbTZypYMlcCOWUY1lUI RmGUAyslvPFrMzyQeBpoXem21p/QolM7dl5QLqhoHKtIaIFUHjn32GEmPaahAo64bw3e uOyw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id x74si77851lff.12.2020.09.25.09.27.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Sep 2020 09:27:58 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 08PGRvYc022272 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Sep 2020 18:27:57 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.29.103]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 08PGRvR1002614; Fri, 25 Sep 2020 18:27:57 +0200 Date: Fri, 25 Sep 2020 18:27:53 +0200 From: Henning Schild To: Cedric Hombourger Cc: isar-users Subject: Re: [PATCH] buildchroot: do not mk-build-deps in ${S} Message-ID: <20200925182753.1f6949a0@md1za8fc.ad001.siemens.net> In-Reply-To: References: <20200925091632.43333-1-Cedric_Hombourger@mentor.com> X-Mailer: Claws Mail 3.17.6 (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: cKHPF3soBVR4 On Fri, 25 Sep 2020 11:33:15 +0200 Cedric Hombourger wrote: > just found that Jan already posted something rather similar > > https://groups.google.com/g/isar-users/c/FUC6QGcKD8Y/m/dr95lm2pAgAJ > > I should have re-checked the mailing list before submitting (I wanted > to ci-build.sh this change before submitting) > > One difference though is the use of a temp directory and no relative > paths (I did not want to make any assumptions about the file-system > view we get when we enter the buildchroot) > > We definitely want either patches applied so we can get more people > to start porting their projects to bullseye! You found it yourself. Cool to see you guys working on bullseye. Jan recently posted bullseye related stuff as well. What is worrying is that the ci test does not fully cover it anymore. > If we go with Jan's, we should definitely address the comment from > Henning (i.e. changing "cd .." to something more adequate) I think i am fine with that ".." after all. And your tempdir + rm trick is neat as well. But if the tool decided to leave logs, we probably want them. Henning > Cedric > > On 9/25/2020 11:16 AM, Cedric Hombourger wrote: > > mk-build-deps may leave .changes and/or .buildinfo files behind > > despite use of the -r option (which seems to only remove the > > generated .deb file). Having new files in the source tree causes > > dh_clean to complain (at least when the package uses quilt to > > manage patches). This problem was observed while re-building some > > upstream bullseye packages. Since there are no requirements to > > execute the mk-build-deps tool from the source tree, create a > > temporary directory and run it from there. > > > > Signed-off-by: Cedric Hombourger > > --- > > meta/recipes-devtools/buildchroot/files/deps.sh | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh > > b/meta/recipes-devtools/buildchroot/files/deps.sh index > > 93bc9cf..40d4a1c 100644 --- > > a/meta/recipes-devtools/buildchroot/files/deps.sh +++ > > b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -34,17 +34,22 > > @@ if ! grep "^Architecture:" debian/control | grep -qv "all"; then > > fi > > # Install all build deps > > +srcdir=$(pwd) > > +tmpdir=$(mktemp -d) > > +cd ${tmpdir} > > if [ "$3" = "--download-only" ]; then > > # this will not return 0 even when it worked > > - mk-build-deps $set_arch -t "${install_cmd}" -i -r > > debian/control &> \ > > + mk-build-deps $set_arch -t "${install_cmd}" -i -r > > ${srcdir}/debian/control &> \ mk-build-deps.output || true > > cat mk-build-deps.output > > # we assume success when we find this > > grep "mk-build-deps: Unable to install all build-dep > > packages" mk-build-deps.output rm -f mk-build-deps.output > > else > > - mk-build-deps $set_arch -t "${install_cmd}" -i -r > > debian/control > > + mk-build-deps $set_arch -t "${install_cmd}" -i -r > > ${srcdir}/debian/control > > # Upgrade any already installed packages in case we are > > partially rebuilding apt-get upgrade -y --allow-downgrades > > fi > > +cd ${srcdir} > > +rm -rf ${tmpdir} >