From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6480563028650622976 X-Received: by 10.28.103.139 with SMTP id b133mr630767wmc.14.1509699644687; Fri, 03 Nov 2017 02:00:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.18.19 with SMTP id 19ls848717wms.11.canary-gmail; Fri, 03 Nov 2017 02:00:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TyuidzchGdkMoGmmX9PqyQzRvDlH0VeBY5y44g6s48uErcqmfNMz5CyH0SC/OWdlN94dTg X-Received: by 10.28.144.210 with SMTP id s201mr667040wmd.20.1509699644370; Fri, 03 Nov 2017 02:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509699644; cv=none; d=google.com; s=arc-20160816; b=ArWWhfpWLp1TgSa9Ai+nymIyakIojIc1bJSuoN0efkHhPLBmkzxE3VuCYybbR4/NXc XHfd+LR2HuDJBv9sWL57Z7hHx+Qt9m/eCJ4VA8wjaG+B46lQ/qPwr/GHrCeWG6yAT8Kb ZaY8e64DuXoKaDCxSAL38M5bzGRXmhUByxdwqmEyIKEDyHRWV8nqojh/mGY7ZB/bxMXX d8g0fiWPs9dI9IETq8p24e3dVOBdHNdLotZFGEEmnsraoFC3eyDBYLlllsshsinE7dNO RXbIfR3nsr7nJBq5+mZ0rb9s8QwDvx40REan/9DrHTluZ7RxlnZquE1wcs0HlUHQFH4P mfig== 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=tqk+Gm27VXiAo+h5cjIokDQpVoGMEuK2SCSsorJ+syk=; b=u6aClsQ3+PbnpPOEAsnLLq5W8TahhZ0Gp8bfcjE6KvVwaKUXj1CfTda7nx2Xsv4K/a RQk/9S4i98rSxq/5gglRq5D78l89Ute1eotuxq/X/BO7OY13FxqWEFUo1ssQdC1nDwU6 S+eyAm4Sxy7OoKwmYE8Bb9su7k3AHDSabFVcYnFOXAQEPR0tzCCexGjpjEx++Lt7klAf otknbGD+MDKdDIVZQC0bzGKeXLNu8aO8B6MT8K+Jx48hAFUAU1qC6HBk6H2hBzfeosc+ 56c4pIzaRwyC9+GazpfpP8DdBvZav7CKRoy0HkFAfitHBScFim01CrwClGJ403NuraDH NBMg== 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 f8si449111wrf.0.2017.11.03.02.00.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 02:00:44 -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 vA390eNB032198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 3 Nov 2017 10:00:42 +0100 Subject: Re: PRoot: Drop sudo around buildchroot To: Henning Schild Cc: Jan Kiszka , isar-users References: <8e0fb678-085a-1403-3ee9-f3afef3c080a@ilbers.de> <00b0017a-62e0-1e1b-4d67-786af7702f8d@siemens.com> <20171102181908.6108f3be@md1em3qc> <20171102182207.4af15dfe@md1em3qc> From: Alexander Smirnov Message-ID: Date: Fri, 3 Nov 2017 12:00:35 +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: <20171102182207.4af15dfe@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: vEJsgSgTBIdm Hi, On 11/02/2017 08:22 PM, Henning Schild wrote: > Am Thu, 2 Nov 2017 18:19:08 +0100 > schrieb "[ext] Henning Schild" : > >> Hi, >> >> i just gave that a try and failed to generate an image. >> >> When using docker you will need "--cap-add=SYS_PTRACE". Yes, proot uses PTRACE system call. >> Now i waited for a long time, proot seems to slow things down a lot. > The default isar-image-base base has the following results: === sudo === $ source isar-init-build-env b-sudo $ time bitbake multiconfig:qemuarm-wheezy:isar-image-base real 10m59.270s user 6m16.220s sys 0m54.772s === PRoot === $ source isar-init-build-env b-proot $ time bitbake multiconfig:qemuarm-wheezy:isar-image-base real 16m4.493s user 6m9.423s sys 3m17.692s So, building of buildchroot, hello and example-raw adds extra 6 minutes on my host. > I also needed to change multistrap to /usr/sbin/multistrap because the > PATH inside proot does not cover /usr/sbin ... in case anyone wants to > try. proot uses your current user's environment, so export PATH=$PATH:/usr/sbin before running bitbake should resolve your issue. Alex > > Henning > >> And then i ended up with a long list of packages where "Errors were >> encountered while processing:". Might be connected to docker... >> >> Did anyone else give that a try? >> >> Henning >> >> Am Wed, 25 Oct 2017 12:48:37 +0300 >> schrieb Alexander Smirnov : >> >>> On 10/24/2017 11:22 PM, Jan Kiszka wrote: >>>> On 2017-10-24 21:34, Alexander Smirnov wrote: >>>>> Hello all, >>>>> >>>>> I've successfully dropped 'sudo' around buildchroot operations: >>>>> >>>>> - Create buildchroot >>>>> - Build dpkg-base package (hello) >>>>> - Build dpkg-raw package (example-raw) >>>>> >>>>> The patch is quite small, proot works out-of-the box. I've tested >>>>> the following configurations: >>>>> >>>>> - multiconfig:qemuarm-wheezy:isar-image-base >>>>> - multiconfig:qemuarm-jessie:isar-image-base >>>>> - multiconfig:qemuarm-stretch:isar-image-base >>>>> - multiconfig:qemui386-jessie:isar-image-base >>>>> - multiconfig:qemui386-stretch:isar-image-base >>>>> - multiconfig:qemuamd64-jessie:isar-image-base >>>>> - multiconfig:qemuamd64-stretch:isar-image-base >>>>> >>>>> So proot is really good tool :-) >>>>> >>>>> If you'd like to reproduce the test, please try my branch: >>>>> asmirnov/devel >>>>> >>>>> NOTE: do not forget to install proot: apt-get install proot >>>>> >>>>> Build command: >>>>> $ bitbake multiconfig:qemuarm-wheezy:isar-image-base >>>>> multiconfig:qemuarm-jessie:isar-image-base >>>>> multiconfig:qemuarm-stretch:isar-image-base >>>>> multiconfig:qemui386-jessie:isar-image-base >>>>> multiconfig:qemui386-stretch:isar-image-base >>>>> multiconfig:qemuamd64-jessie:isar-image-base >>>>> multiconfig:qemuamd64-stretch:isar-image-base >>>>> >>>> >>>> Great news! Hope this passes all tests and then makes it into >>>> master soon! >>> >>> I've tested QEMU machines for images listed above, no difference >>> observed in comparison with original 'sudo' approach. But anyway, >>> it would be nice if somebody else will test this, especially in >>> customer project environment. >>> >> > -- 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