From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6522335879194738688 X-Received: by 10.129.62.28 with SMTP id l28mr1991337ywa.114.1518601438225; Wed, 14 Feb 2018 01:43:58 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.129.114.135 with SMTP id n129ls888607ywc.4.gmail; Wed, 14 Feb 2018 01:43:56 -0800 (PST) X-Google-Smtp-Source: AH8x224Eq6eGvxtH0tujkWeTaxq08+0FkMpWK5NzrFoYwXvaq5PQnmJlWc6T5TzUz7BwZhfsA8+O X-Received: by 10.129.101.84 with SMTP id z81mr2068741ywb.217.1518601436269; Wed, 14 Feb 2018 01:43:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518601435; cv=none; d=google.com; s=arc-20160816; b=Ns20acQP1s4JnIoPMUTGQ3nXWMoS6rZ7DZFnuQQvWkpzap0bzCc0DM0WVADi+bbhO8 IBXY2khewjMDhaqlqcCqQZqIGdix5s6ljKMSy9YVcRy2djICqJQNlbYW+RlbONWz1cAk lpvkr9BP7Dc6LFBFsuCYzx/SVxsIygobm3M0Dls7Ce12xXo1me1Kpf2gRkRFCM50CH8u ckcd6tLRtiEe6/sOuYLCaaYRXnh0vwbdPtMvdATkqxMsxVOg0/H+0FVhaPI1k9qhyJt4 LkN7OSOSb2Y9nsyeOTf7Jo9CaCRW0P+Nw6X8P90SNk2IfySNG7tJGdN7wfkjzSMj4cm+ lW9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=UPOfrkVEtYxMNs96N4yg/StZ9vWxaF87b1Hb9ds2BtM=; b=Ga/PTx3/tJ8zybBRh0HgcnsgWm3iwl7V6Z3fYT6GQJHqd7MxlWTZ3tKjZCD/Uq488v NRUQWpNxZGQ0iwCawCJgcqV/n9EF22X5z7s+JW+QLcxTrocSqDJCMD7GC0lc3+tuvSWu E7KThtUt58wZck8QQ8yi6cRWRURhmq0vE05eTQg4jO1m2jWOnPgGu76Aby8hz6XsC+Nn WXD3BPASrIkiP8P/EGq/de+fWZns6XwZ69bdqkSrlTn73Qc7Xh4lWO8TSmJhcNgrbqYv snFS+zoBMyMaVJcue6i59tIbnBGGXbqcU1bCBU6Lu5ISyPPERg91c+xRyVjwZE2SvpQw SFPg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id u201si122424ywf.3.2018.02.14.01.43.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 01:43:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w1E9hm4X009633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 14 Feb 2018 10:43:50 +0100 Subject: Re: [PATCH] Make sure git repos are usable inside buildchroot To: Henning Schild , Jan Kiszka Cc: isar-users References: <20180214103027.2c4a7606@mmd1pvb1c.ad001.siemens.net> From: Alexander Smirnov Message-ID: Date: Wed, 14 Feb 2018 12:43:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180214103027.2c4a7606@mmd1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: OICUSesQfUFA On 02/14/2018 12:30 PM, Henning Schild wrote: > There is a similar patch from Alex floating around. My opinion is Thanks for the reference ;-) > still, this should be fixed upstream and we can wait. After all nobody > forces anyone to use git and most git-servers should offer tarballs, > which are probably often faster than git. > > I would rather mark git as broken in the fetcher, but that might just > me a result of me not liking git at all ;). More easy workaround is also floating on the list: https://groups.google.com/forum/#!msg/isar-users/sAcJqSx_vqs/wetXTcMLCQAJ;context-place=forum/isar-users Just repack objects to working dir. Alex > > Henning > > Am Wed, 14 Feb 2018 10:14:18 +0100 > schrieb Jan Kiszka : > >> From: Jan Kiszka >> >> bitbake clones git repos into the package workdir in shared mode. This >> creates an alternates link to the original download folder. However, >> that path is invalid inside buildchroot. This disturbs package builds >> which try to derive information from the git repo, such as tags or the >> delta to the last release. >> >> Bind-mount the downloads folder and patch the alternates file to >> restore the git repo access inside buildchroot. >> >> Signed-off-by: Jan Kiszka >> --- >> >> Applies on top of "Move buildchroot mounts into dpkg-base class", v3. >> >> This obsoletes the bitbake patch Henning developed to disable sharing. >> >> Tested via jailhouse-images (required changes not yet pushed) where >> the Jailhouse recipe makes use of this. >> >> meta/classes/dpkg-base.bbclass | 10 ++++++++++ >> meta/recipes-devtools/buildchroot/buildchroot.bb | 1 + >> 2 files changed, 11 insertions(+) >> >> diff --git a/meta/classes/dpkg-base.bbclass >> b/meta/classes/dpkg-base.bbclass index 895ff26..241dc2c 100644 >> --- a/meta/classes/dpkg-base.bbclass >> +++ b/meta/classes/dpkg-base.bbclass >> @@ -1,6 +1,15 @@ >> # This software is a part of ISAR. >> # Copyright (C) 2017 Siemens AG >> >> +do_adjust_git() { >> + if [ -f ${WORKDIR}/${S}/.git/objects/info/alternates ]; then >> + sed -i ${WORKDIR}/${S}/.git/objects/info/alternates \ >> + -e 's|${DL_DIR}|/downloads|' >> + fi >> +} >> + >> +addtask adjust_git after do_unpack before do_build >> + >> # Add dependency from buildchroot creation >> do_build[depends] = "buildchroot:do_build" >> >> @@ -30,6 +39,7 @@ do_build() { >> sudo flock ${MOUNT_LOCKFILE} -c ' \ >> if ! grep -q ${BUILDCHROOT_DIR}/isar-apt /proc/mounts; then \ >> mount --bind ${DEPLOY_DIR_APT}/${DISTRO} >> ${BUILDCHROOT_DIR}/isar-apt; \ >> + mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads; \ >> mount -t devtmpfs -o mode=0755,nosuid devtmpfs >> ${BUILDCHROOT_DIR}/dev; \ mount -t proc none ${BUILDCHROOT_DIR}/proc; >> \ fi' >> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb >> b/meta/recipes-devtools/buildchroot/buildchroot.bb index >> 62979f5..9b4e7d3 100644 --- >> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++ >> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -38,6 +38,7 @@ >> do_build() { >> sudo rm -rf ${BUILDCHROOT_DIR} >> mkdir -p ${BUILDCHROOT_DIR}/isar-apt >> + mkdir -p ${BUILDCHROOT_DIR}/downloads >> mkdir -p ${BUILDCHROOT_DIR}/dev >> mkdir -p ${BUILDCHROOT_DIR}/proc >> mkdir -p ${BUILDCHROOT_DIR}/sys > -- With best regards, Alexander Smirnov ilbers GmbH Baierbrunner Str. 28c D-81379 Munich +49 (89) 122 67 24-0 http://ilbers.de/ Commercial register Munich, HRB 214197 General manager: Baurzhan Ismagulov