From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6736062139219312640 X-Received: by 2002:a5d:4708:: with SMTP id y8mr35211487wrq.318.1568372301200; Fri, 13 Sep 2019 03:58:21 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:6b0c:: with SMTP id v12ls400523wrw.6.gmail; Fri, 13 Sep 2019 03:58:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/bKtkQ1qZ10fGDsoBOuKTIkwno03gA1cm0PREbvIXUaFT3h11ALc4BzrqNGAvggi3D9W/ X-Received: by 2002:a5d:4d81:: with SMTP id b1mr41360409wru.27.1568372300803; Fri, 13 Sep 2019 03:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568372300; cv=none; d=google.com; s=arc-20160816; b=HNHqr4BRbBsjrSr3RjfXtj3nVCqfF/081rrJEneZRezfGfaHTbw7oTxcKeBZIT4kzB 5T9Kt0vMCY+E4NO64AfBeZnLP3Li8cnAx8ENvCfqNdmmn5fMfsOMN8MYh8WnC+UgU+Dr 2pHHafeTvsG33lStdMRloc8gaAkSsbitpGox4j+xNo7k+XX7M6A15DhtlQjqt3Sa1a9h IdYYmQIXL0eRTqqXp0vYi9OxRxyBes4VEywln2GKWqZSfzHnFHGsKUYIvX/BHHo5KjXP LEBAAeuoxKHlmNF9lJNmVAe/UI5ARNTR30zL+D09Qx5ucjlApxjLtcnCvT0NmLw7VFrb GauA== 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:to:subject; bh=ztFF8VnQrTI0ZgLFqr2NYLmNNNjkfkyz/b0SXIRYW3Y=; b=ucrDgnAbZgcu/zOlIVe/blOzJRHnFvnmSlPI5KO5j+GgWYBfPblZWjcCJUkilRBwZC n5hjZYLeogGb/La67uaj80Ee9rr0RkRDYvjl3g4S4j/8BV0+sWHLMJoqTB9mXSYR3i3P /oCeYD00PZWqUT5leN02jYnnQumSSSoIC5fn/TWTazn0cjNzcK8D3yGiuFZTA2QCRA1c fF1syeGMaqKRSKCpZ7y1fBwxvg6OGJPQqb/6zeZt0P7aheCrmmkUOWUxbO+1COjy3Bse /LZ8zwV0QZJDI385xlEnjrN+ITbf7MLR4f+SWG4pNAUP3vuXxhJPjPTmMJcf0q2kmD9h vDCQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=quirin.gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id s194si116564wme.2.2019.09.13.03.58.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Sep 2019 03:58:20 -0700 (PDT) Received-SPF: pass (google.com: domain of quirin.gylstorff@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=quirin.gylstorff@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 david.siemens.de (8.15.2/8.15.2) with ESMTPS id x8DAwKPq016846 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 13 Sep 2019 12:58:20 +0200 Received: from [139.25.69.120] ([139.25.69.120]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x8DAwKS4013841 for ; Fri, 13 Sep 2019 12:58:20 +0200 Subject: Re: fakechroot To: isar-users@googlegroups.com References: <87486b31-2560-1b78-6d7e-86bf10fc306f@siemens.com> <20190913081406.GJ6062@yssyq.m.ilbers.de> <8db6f5f1-8a36-768c-1b5d-0a0a3df866fb@siemens.com> <20190913093317.GL6062@yssyq.m.ilbers.de> From: Quirin Gylstorff Message-ID: Date: Fri, 13 Sep 2019 12:57:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190913093317.GL6062@yssyq.m.ilbers.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: g9zsdlh3HOl4 On 9/13/19 11:33 AM, Baurzhan Ismagulov wrote: > On Fri, Sep 13, 2019 at 11:08:21AM +0200, Quirin Gylstorff wrote: >> This was only an initial test but with fakechroot and fakeroot it should be >> possible to have a non-priviledged debootstrap and chroot process. >> >> - Initial Creating with debootstrap did work. e.g.: >> fakechroot fakeroot debootstrap buster amd64 >> - what also work was using chroot to enter the create rootfs. >> fakechroot chroot amd64 > > Thanks for sharing. That could be a welcome change. > > 1. How does fakechroot fakeroot perform privileged operations like chown, > mknod, accessing other's files, mounting, etc.? > > We need that information to be consistent across multiple commands in > multiple recipes (bootstrap, customize, install stuff, deploy, etc.). > Wrapping one command is probably possible with any tool -- but currently I > don't see how they could do what we need. > > Regarding keeping the information across multiple commands, Yocto's pseudo > should allegedly be able to do that (not sure whether it keeps the state in > a daemon or a file). Evaluating that was our next step (very low prio ATM) > -- maybe that could be interesting for you as well. > fakechroot, fakeroot and pseudo are all using a similar mechanism by modifying the LD_PRELOAD_PATH with there own Libraries and abstracting the necessary systemcalls. pseudo uses a sqlite Database to get a persistent view on the topic. > 2. fakechroot fakeroot is reported to work with foreign-arch chroots. Have you > tried that? I will test it. > > With kind regards, > Baurzhan. >