From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.223.157.32 with SMTP id k32mr449418wre.23.1513079385548; Tue, 12 Dec 2017 03:49:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.172.99 with SMTP id v90ls463856wrc.1.gmail; Tue, 12 Dec 2017 03:49:45 -0800 (PST) X-Google-Smtp-Source: ACJfBouUOdSznEDmNWBT4qBGavNp5FPlyJzI9OLn4KifRhSELuWI+2hjI/VaEAbmyPPWXiSZuwHo X-Received: by 10.223.171.87 with SMTP id r23mr444249wrc.21.1513079385138; Tue, 12 Dec 2017 03:49:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513079385; cv=none; d=google.com; s=arc-20160816; b=FKcSlCl/8yH0glSdFROL0KS5g2kF10xA0E/9puBrAb/muoOz9v+oMdGz5l9p08HUVl FTKRqylXaUbtHpLf4Nc5Sv3irxVGORe0FCSyoCBkbRa/rjaVxqhgM7qcr1kdPFRaxQkN qEz7hekgB/JKWsB8LW3ZTUzkLIa8tvRAHEUzRYKVAIp0sojRCwJ8FKw8dxNxfTx/3rUQ qpMDEcN7R8Qy5kZsNth2dXCFi9x/oVhTEA6FAAT48QTQ3mFDOJjIxeSChaElr6M7/C3S w2by/FaQmbZwm127G2l3so2SSNWT2FwbGRguAou3BCvJL7lCD4SQffiI5A5zNAziXe0m 7fiQ== 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:arc-authentication-results; bh=oMtOO8egqptyti9DyGfFfGk7NQUM6mBqPU8fmDHvxUw=; b=rfPMEizWlXTulMxzEugWoCyEofWAFnxoCotFVzMQmKGULDh0LtrrtxTQSPMrseqdnT 96CmdXGv+wiVmlLuqI41PyKY1nQzo0vEOPnb2HyPAzC5mwKyqMxUtjmIMkzGwLtc8lVA LvK3vEPnN+XF+Z8xrpH2+Kx/buKvo9KaONNNW31q1nhsqJtAEIyV1d8+1vRPHtsQcbIt slDgGT2Xi/Q4CkAtYVHl57vsA55AGFAdd8WF3CC70MXNRqc5NDZSm7pob6GUJY5I0ZrX EwnK/tOWR3bRxEsz00f9FhhJEo2c8tFVz3G71AL5qQ+++JXSdqVs8zEMGYIbUJuQUtQc K+wg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id b123si743029wmf.1.2017.12.12.03.49.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 03:49:45 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id vBCBniSE005871 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Dec 2017 12:49:44 +0100 Received: from md1pvb1c (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vBCBnipk002265; Tue, 12 Dec 2017 12:49:44 +0100 Date: Tue, 12 Dec 2017 12:49:36 +0100 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH v3 4/4] dpkg-base: Update git alternates Message-ID: <20171212124936.2329ba8d@md1pvb1c> In-Reply-To: References: <20171126220025.14168-1-asmirnov@ilbers.de> <20171126220025.14168-5-asmirnov@ilbers.de> <20171211185646.02ca7be5@md1pvb1c> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: e3+uKSyDQ/lc Am Mon, 11 Dec 2017 22:45:15 +0300 schrieb Alexander Smirnov : > On 12/11/2017 08:56 PM, Henning Schild wrote: > > Well i thought about this again. This is a very nasty workaround > > for a problem this actually is in bitbake. > > That's an attempt to solve here and now git-3.0 issue reported by > Christian. So if in general it's not critical problem for now, I > could drop this series. > > > > > https://github.com/openembedded/bitbake/blob/ebce92bf8d71f8a6e8af1c6cf6ba335faf9d67c8/lib/bb/fetch2/git.py#L179 > > > > That problem should be fixed in bitbake, if they accept patches. The > > "-s" needs to depend on some condition. > > > > I'm not sure that this is the best solution. The main idea of using > '-s' was to avoid unnecessary copying of git repos within one build, > it costs disk space and extra time for copying (for example linux.git > is about 1GB). So usage of '-s' is quite reasonable here. I know why it is there, all i am saying it should maybe not be there unconditionally. We could probably try and fix that upstrem and introduce BB_GIT_SHARED or a new param "shared". And now you could say BB_GIT_SHARED=0 SRC_URI=git:// ....git or SRC_URI=git:// ....git;shared=0 Let me know what you think about that idea and i will prepare patches. If they get merged we could cherry-pick them into Isar and forget about the alternate-patching. We could also agree that "shared" is an important feature we want in Isar, in that case the alternates should get patched. And we need an updated version of the proposed patch. Thinking about that ... again ;) This is would i would now vote for. > Another solution could be deprecate 'downloads' directory and fetch > gits directly to package WORKDIR. I think having the downloads dir might eventually help with the reproducible builds. > > > For Isar i would tell people to fetch tarballs from git servers and > > avoid git://. > > This should not be the requirement, because it limits Isar > application area. Not all git repo could be fetched as tarball. Agreed, i am just talking about temporary workarounds until we have a solution. Fetching with git is something that, to me, does not sound like a high prio feature. Henning > Alex > > > > > Henning > > > > Am Mon, 27 Nov 2017 01:00:25 +0300 > > schrieb Alexander Smirnov : > > > >> Update git alternates to work in buildchroot. > >> > >> Signed-off-by: Alexander Smirnov > >> --- > >> meta/classes/dpkg-base.bbclass | 12 ++++++++++++ > >> 1 file changed, 12 insertions(+) > >> > >> diff --git a/meta/classes/dpkg-base.bbclass > >> b/meta/classes/dpkg-base.bbclass index 5d7f8b6..6a78a26 100644 > >> --- a/meta/classes/dpkg-base.bbclass > >> +++ b/meta/classes/dpkg-base.bbclass > >> @@ -18,12 +18,24 @@ dpkg_runbuild() { > >> > >> # Wrap the function dpkg_runbuild with the bind mount for > >> buildroot do_build() { > >> + if [ -d ${WORKDIR}/git/.git ]; then > >> + OBJ_PATH=$(cat > >> ${WORKDIR}/git/.git/objects/info/alternates) > >> + REPO_PATH=$(dirname $OBJ_PATH) > >> + REPO_NAME=$(basename $REPO_PATH) > >> + echo "/git/$REPO_NAME/objects" > > >> ${WORKDIR}/git/.git/objects/info/alternates > >> + fi > >> + > >> mkdir -p ${BUILDROOT} > >> sudo mount --bind ${WORKDIR} ${BUILDROOT} > >> _do_build_cleanup() { > >> ret=$? > >> sudo umount ${BUILDROOT} 2>/dev/null || true > >> sudo rmdir ${BUILDROOT} 2>/dev/null || true > >> + > >> + if [ -d ${WORKDIR}/git/.git ]; then > >> + echo $OBJ_PATH > > >> ${WORKDIR}/git/.git/objects/info/alternates > >> + fi > >> + > >> (exit $ret) || sudo umount ${BUILDCHROOT_DIR}/git > >> (exit $ret) || bb_exit_handler > >> } > > >