* PRoot: Drop sudo around buildchroot @ 2017-10-24 19:34 Alexander Smirnov 2017-10-24 20:22 ` Jan Kiszka 0 siblings, 1 reply; 11+ messages in thread From: Alexander Smirnov @ 2017-10-24 19:34 UTC (permalink / raw) To: isar-users 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 -- 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-10-24 19:34 PRoot: Drop sudo around buildchroot Alexander Smirnov @ 2017-10-24 20:22 ` Jan Kiszka 2017-10-25 9:48 ` Alexander Smirnov 0 siblings, 1 reply; 11+ messages in thread From: Jan Kiszka @ 2017-10-24 20:22 UTC (permalink / raw) To: Alexander Smirnov, isar-users 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! Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-10-24 20:22 ` Jan Kiszka @ 2017-10-25 9:48 ` Alexander Smirnov 2017-10-25 14:58 ` Benedikt Niedermayr 2017-11-02 17:19 ` Henning Schild 0 siblings, 2 replies; 11+ messages in thread From: Alexander Smirnov @ 2017-10-25 9:48 UTC (permalink / raw) To: Jan Kiszka, isar-users 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-10-25 9:48 ` Alexander Smirnov @ 2017-10-25 14:58 ` Benedikt Niedermayr 2017-10-25 15:29 ` Alexander Smirnov 2017-11-02 17:19 ` Henning Schild 1 sibling, 1 reply; 11+ messages in thread From: Benedikt Niedermayr @ 2017-10-25 14:58 UTC (permalink / raw) To: Alexander Smirnov, Jan Kiszka, isar-users Am 25.10.2017 um 11:48 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. > May there be a problem when all files belonging to the build user and not to root? Regards, Benedikt ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-10-25 14:58 ` Benedikt Niedermayr @ 2017-10-25 15:29 ` Alexander Smirnov 2017-10-26 8:57 ` Ben Brenson 0 siblings, 1 reply; 11+ messages in thread From: Alexander Smirnov @ 2017-10-25 15:29 UTC (permalink / raw) To: Benedikt Niedermayr, isar-users On 10/25/2017 05:58 PM, 'Benedikt Niedermayr' via isar-users wrote: > Am 25.10.2017 um 11:48 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. >> > May there be a problem when all files belonging to the build user and > not to root? That's exactly the topic why I started proot with buildchroot and why I'm asking about various test results (did you try? :-)). In the VM that I've built with proot patch I see the following: root@isar:~# ls -l /usr/bin/ | grep hello -rwxr-xr-x 1 root root 18068 Oct 24 18:52 hello root@isar:~# So the file from hello package (which is built using proot) has root ownership. In theory the problems could occur during generation of target filesystem, will see. But anyway, Yocto will do this without sudo, so probably here also this could be done. Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-10-25 15:29 ` Alexander Smirnov @ 2017-10-26 8:57 ` Ben Brenson 0 siblings, 0 replies; 11+ messages in thread From: Ben Brenson @ 2017-10-26 8:57 UTC (permalink / raw) To: Alexander Smirnov; +Cc: isar-users [-- Attachment #1: Type: text/plain, Size: 4187 bytes --] 2017-10-25 17:29 GMT+02:00 Alexander Smirnov <asmirnov@ilbers.de>: > > > On 10/25/2017 05:58 PM, 'Benedikt Niedermayr' via isar-users wrote: > >> Am 25.10.2017 um 11:48 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. >>> >>> May there be a problem when all files belonging to the build user and >> not to root? >> > > That's exactly the topic why I started proot with buildchroot and why I'm > asking about various test results (did you try? :-)). > > In the VM that I've built with proot patch I see the following: > > root@isar:~# ls -l /usr/bin/ | grep hello > -rwxr-xr-x 1 root root 18068 Oct 24 18:52 hello > root@isar:~# > > So the file from hello package (which is built using proot) has root > ownership. > > > In theory the problems could occur during generation of target filesystem, > will see. But anyway, Yocto will do this without sudo, so probably here > also this could be done. > > Alex > What I was trying, was to run a proot based build, from my current Isar fork. Then I had the problem with file permissions (files belonging to build user instead to root). The Problem can be located at the point when installing the deb packages to the rootfs (do_deploy() with fake root permissions). After exiting the proot all files there have the permissions of my build user. And after that wic will generate the rootfilesystem image with those permissions. So when the deb package is generated, all (faked) root permissions are stored but get lost in case of installing that package as normal user, or after exiting the proot. Yocto does somethin similiar but better: It starts pseudo, which in turn stores all (faked) file permissions and later runs mkfs.ext3 with the -d option, within pseudo environment. The -d <rootfs_dir> option makes mkfs to copy all files directly into the created filesystem in a single step. When mounting that filesystem image (which is only possible as root) I can see the correct file permissions. I think this similar to creating tar archives. When creating files as root within the fakeroot and compress them as fakeroot user, all root permissions where also stored within the archive. When extracting that archive as root, all files have root permissions. When extracting that archive as user, all files have user permissions. So the -d option is similiar to compressing files into an archive, I think. I have not tested that behavior with proot, yet. Reagards, Benedikt [-- Attachment #2: Type: text/html, Size: 5567 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-10-25 9:48 ` Alexander Smirnov 2017-10-25 14:58 ` Benedikt Niedermayr @ 2017-11-02 17:19 ` Henning Schild 2017-11-02 17:22 ` Henning Schild 2017-11-02 17:33 ` Jan Kiszka 1 sibling, 2 replies; 11+ messages in thread From: Henning Schild @ 2017-11-02 17:19 UTC (permalink / raw) To: Alexander Smirnov; +Cc: Jan Kiszka, isar-users Hi, i just gave that a try and failed to generate an image. When using docker you will need "--cap-add=SYS_PTRACE". Now i waited for a long time, proot seems to slow things down a lot. 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 <asmirnov@ilbers.de>: > 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. > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-11-02 17:19 ` Henning Schild @ 2017-11-02 17:22 ` Henning Schild 2017-11-03 9:00 ` Alexander Smirnov 2017-11-02 17:33 ` Jan Kiszka 1 sibling, 1 reply; 11+ messages in thread From: Henning Schild @ 2017-11-02 17:22 UTC (permalink / raw) To: Alexander Smirnov; +Cc: Jan Kiszka, isar-users Am Thu, 2 Nov 2017 18:19:08 +0100 schrieb "[ext] Henning Schild" <henning.schild@siemens.com>: > Hi, > > i just gave that a try and failed to generate an image. > > When using docker you will need "--cap-add=SYS_PTRACE". > Now i waited for a long time, proot seems to slow things down a lot. 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. 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 <asmirnov@ilbers.de>: > > > 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. > > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-11-02 17:22 ` Henning Schild @ 2017-11-03 9:00 ` Alexander Smirnov 2017-11-03 9:05 ` Jan Kiszka 0 siblings, 1 reply; 11+ messages in thread From: Alexander Smirnov @ 2017-11-03 9:00 UTC (permalink / raw) To: Henning Schild; +Cc: Jan Kiszka, isar-users Hi, On 11/02/2017 08:22 PM, Henning Schild wrote: > Am Thu, 2 Nov 2017 18:19:08 +0100 > schrieb "[ext] Henning Schild" <henning.schild@siemens.com>: > >> 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 <asmirnov@ilbers.de>: >> >>> 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-11-03 9:00 ` Alexander Smirnov @ 2017-11-03 9:05 ` Jan Kiszka 0 siblings, 0 replies; 11+ messages in thread From: Jan Kiszka @ 2017-11-03 9:05 UTC (permalink / raw) To: Alexander Smirnov, Henning Schild; +Cc: isar-users On 2017-11-03 10:00, Alexander Smirnov wrote: > Hi, > > On 11/02/2017 08:22 PM, Henning Schild wrote: >> Am Thu, 2 Nov 2017 18:19:08 +0100 >> schrieb "[ext] Henning Schild" <henning.schild@siemens.com>: >> >>> 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. Given that the goal is unprivileged execution, this is not the right solution. The path needs to be fixed inside the recipe. Jan ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PRoot: Drop sudo around buildchroot 2017-11-02 17:19 ` Henning Schild 2017-11-02 17:22 ` Henning Schild @ 2017-11-02 17:33 ` Jan Kiszka 1 sibling, 0 replies; 11+ messages in thread From: Jan Kiszka @ 2017-11-02 17:33 UTC (permalink / raw) To: Henning Schild, Alexander Smirnov; +Cc: isar-users On 2017-11-02 18:19, Henning Schild wrote: > Hi, > > i just gave that a try and failed to generate an image. > > When using docker you will need "--cap-add=SYS_PTRACE". > Now i waited for a long time, proot seems to slow things down a lot. If it is relying on ptrace, that would explain this... > > 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? Not yet. I suppose we also need to native run to find out if the slow-down and the failure are only docker-related. Jan > > Henning > > Am Wed, 25 Oct 2017 12:48:37 +0300 > schrieb Alexander Smirnov <asmirnov@ilbers.de>: > >> 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. >> > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-11-03 9:05 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-10-24 19:34 PRoot: Drop sudo around buildchroot Alexander Smirnov 2017-10-24 20:22 ` Jan Kiszka 2017-10-25 9:48 ` Alexander Smirnov 2017-10-25 14:58 ` Benedikt Niedermayr 2017-10-25 15:29 ` Alexander Smirnov 2017-10-26 8:57 ` Ben Brenson 2017-11-02 17:19 ` Henning Schild 2017-11-02 17:22 ` Henning Schild 2017-11-03 9:00 ` Alexander Smirnov 2017-11-03 9:05 ` Jan Kiszka 2017-11-02 17:33 ` Jan Kiszka
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox