From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6462206452988641280 X-Received: by 10.99.126.23 with SMTP id z23mr2366314pgc.196.1504604118094; Tue, 05 Sep 2017 02:35:18 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.107.147.215 with SMTP id v206ls1798211iod.13.gmail; Tue, 05 Sep 2017 02:35:17 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6jWnr124jtwWd0ba9/QDIByMn8nG9ndJbFDvTpSUKYt2GCMQ3KJ68aSKFY9dUBqWTvipT+ X-Received: by 10.13.233.71 with SMTP id s68mr2162946ywe.217.1504604117707; Tue, 05 Sep 2017 02:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504604117; cv=none; d=google.com; s=arc-20160816; b=idO7gNZCrxMcdC5mm0efBYirICwdbe2WTnA5gUiw/q+/fnRpRJR2yMQZboW9uukP/d ui0z+EuU5GwsMmLbc8E5v29xG6Ibz2PiafBcsxcAimdOxYyH3vkaR2wWZ8j4iM94AgRF bk8AOQ9DjooQTKURW4Pahq2Ftsxft6wUyL2x9mn2Sk+ouiNIljgsI640GUnJIUFQBsxW b+Mx+44z1u1RDJNmBPExvPhFyrL4HzsM2dEFecrhI/1qsr9KOwMqcKkHpvZUItHMzBQp c96UFAtQbiJPlbcxj6xB5ICgjM4hdivznt9Vua8cFkcNTh/U784ipB05YgmsPAUDdIgc Iqeg== 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=2h30C1U0YEeUbqRQB2HUxSZnaP540QUhz/6aJ/sson0=; b=WBflVl9Pmy0vMqnw+l8h/weLBd63jlDo6HL7J4RvtoAaf8jU40HDqpVGByk+137mMX zOfUWEW91N0CqyitJBe56q3Qlqyjg7eSrlmVCAOLgUVuXqUE48owlfUmwkXRSjuMJKh0 E0uxh8Sygq+1G6nnySSNK+Ur/Oc6hqgOtqbQvfpnY7sANrXrp+imSeg60+sNXgl//LTP 4W/h8xAeeBg/FxRGtBVYACTU4FkCxG5KwQhlMl3lVeUvo1W1SHUyaAGK1g3QFYRLFKsR X5vUelD3jnmRYV6N3yTHH0jvvRWKRTY6oQR9w3cuSQTbm5PZ3mBEVajw8jC5v0xMLL9U DRmA== 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 b2si29729itg.3.2017.09.05.02.35.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 02:35:17 -0700 (PDT) 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 v859ZDTm012720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 5 Sep 2017 11:35:15 +0200 Subject: Re: Isar build tree structure To: Claudius Heine Cc: isar-users@googlegroups.com References: <7c829771-d78b-7409-ce86-74fae0f15dc4@ilbers.de> <2b9b891a-055a-2e4f-60ba-dc87972769d9@siemens.com> <44061e32-aa48-b432-ead5-5d6627b707b4@ilbers.de> From: Alexander Smirnov Message-ID: <1fb116bd-d3a6-bca9-9105-cc32b0ba276d@ilbers.de> Date: Tue, 5 Sep 2017 12:35:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: vwLIdjmpv6h0 On 09/05/2017 12:28 PM, Claudius Heine wrote: > On 09/05/2017 11:13 AM, Alexander Smirnov wrote: >> >> >> On 09/05/2017 12:06 PM, Claudius Heine wrote: >>> Hi, >>> >>> On 09/05/2017 10:21 AM, Alexander Smirnov wrote: >>>> Hi all, >>>> >>>> I'd like to discuss build folders tree to somehow chose more >>>> suitable approach. >>>> >>>> 1. How it's done at the moment. >>>> >>>> The folder tree contains the following main paths: >>>> >>>> - tmp/work/${PP} >>>> >>>> It's a $WORKDIR for each recipe, here is stored bibtbake logs and >>>> commands, and data for packages that doesn't require buildchroot >>>> (for example, buildchroot and isar-image-base). >>>> >>>> - tmp/work/buildchroot/${DISTRO}-${ARCH}/rootfs/home/build/${PN} >>>> >>>> This is the $BUILDROOT for packages, that require compilation in >>>> chroot. It is used as destination folder for unpack task. >>>> >>>> Benefits: >>>> >>>> - Maximal common OE-like folder structure for all kind of recipes. >>>> You can find the information about specific package in >>>> 'tmp/work/${PP}'. And it doesn't matter if this package uses dpkg >>>> class, or not. >>>> >>>> - After buildchroot cleanup, the build information is not loosed. >>>> >>>> - For multiple buildchroots in project, there will be single place >>>> for package meta information. >>>> >>>> 2. Remove $BUILDROOT. >>>> >>>> This would mean that $WORKDIR location may vary depending on recipe >>>> type. So the recipes data will be distributed across buildchroots >>>> and tmp/work dir. >>>> >>>> Benefits: >>>> >>>> - Each recipe will use single folder for everything. >>>> >>>> >>>> >>>> So... Ideas and opinions? :-) >>>> >>> >>> Why not both benefits? Using bind mount to put the workdir of recipes >>> into the buildchroot? >> >> Mount is very difficult to manage. For example if something failed >> during build, it's hard to check in next build what is already mounted >> and what is not yet. >> >> But your idea is good. Could we use symlinks instead? > > If you are in a chroot environment the paths of the symlinks are wrong > since they reference a different root directory. Yeah, you are right... So probably mount could be an option: = do_unpack = 1. unpack to WORKDIR (tmp/work/${PP}) = do_build = 1. mount respective folder in buildchroot 2. build 3. unmount respective folder in buildchroot This approach will be quite good compatible with OE. > >> >>> >>> Maybe we should take a look at proot [1] and use this instead of >>> chroot, because its more flexible, does not require privileges, etc. >>> >>> [1] https://github.com/proot-me/PRoot/blob/master/doc/proot/manual.txt >>> >> >> Do you know if it fully supports dpkg & Co? > > I currently use proot in some parts of my isar fork already. And from my > experience it works rather well. Since it uses the ptrace systemcall, > static binaries work work as well. > Do you have patch for this, could you please send it as RFC? > Claudius > -- 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