From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7127692007916437504 X-Received: by 2002:a05:6602:2b8a:b0:67b:c57f:b4bc with SMTP id r10-20020a0566022b8a00b0067bc57fb4bcmr342287iov.55.1659600575607; Thu, 04 Aug 2022 01:09:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5e:df0a:0:b0:67c:1716:57cf with SMTP id f10-20020a5edf0a000000b0067c171657cfls103726ioq.9.-pod-prod-gmail; Thu, 04 Aug 2022 01:09:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR4nvVg/dGv968jMX+wuS7/11qC6DhMiHFlSfYi78vtZis7yoecP9VWoFYJkBjJHEu9dxlpg X-Received: by 2002:a6b:2a42:0:b0:67c:5ab8:a34e with SMTP id q63-20020a6b2a42000000b0067c5ab8a34emr327759ioq.143.1659600574892; Thu, 04 Aug 2022 01:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659600574; cv=none; d=google.com; s=arc-20160816; b=N4DmbvgnKvwnZAiPuAF7q3lsq8epeVF/ASXy7+N1mor3BCQW95ExyWEcQ8vX/RHu64 a0PUK9eOYtjDq5toF38BHRxkZM80Z7WAxvWVyaQwYvYHExXAvhE4L9+it15KV+4xbQgv U2GVsMqL2K4KEyl1zyBMVhVv8QWwYGI2IwoKC730zFn/hIR9j1StrGM9FGl0I+0WIKi3 Qj+NI/giDYnfXXPEVsq1vjxfPob/hO2GgVud2EnCwvWo82jEbSPzfKa0P7Ccl1AOh5bY KyVff6cZkgaWRgg50GguDwo2mCibeFRln2HtIPNwXc+sMajm7hwzS3jF6AHbkmXN4kEX Kelg== 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:date:subject:to:from; bh=82iKkyM4hZmdjkVlPUavNQDLv+mwCTGZuLgakHJ8HGs=; b=rbJ4i0Bern+UQKnaIV6FO8OFhjp+3lKtGichKyi3VjPkHs4I3wq5ek5ublXlPZ0rSR m7IrU/9QfnmOgGfUiG8DenxUZAFJE8zB2KV5TGooUTSPh39Clbm7Gei/1/oYTMkedyhq zoGp2C9qGwF1hGn5dYH+FQCr8FPesXzDIpqLOF6M4tMv/WIbHvGT/0Y8lnRPMwUvo3Zd uuAx+bgBevkvgjB2RGvVEujJyUFW5tyxuvBpqflNx7XYn0vEhAhVwpWPAPycapaEE2Ik eYHgDmBtLdG4GLfGXEAobjch3epqacuLHDKpOv4CgGznGn6l0dzdB/WLqbjP+WStapxg Kkww== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id j25-20020a02cc79000000b003427169802bsi23781jaq.1.2022.08.04.01.09.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Aug 2022 01:09:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from home.localnet (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 27489WQX032396 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Aug 2022 10:09:32 +0200 From: Uladzimir Bely To: "isar-users@googlegroups.com" , "Moessbauer, Felix" Subject: Re: [PATCH] install crossbuild-essential into base schroot Date: Thu, 04 Aug 2022 11:09:29 +0300 Message-ID: <3351240.LZWGnKmheA@home> In-Reply-To: References: <20220803164458.429368-1-felix.moessbauer@siemens.com> <4dc7c88f-a373-1f90-29a6-734a14ceae43@ilbers.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart6779151.9J7NaK4W3v" Content-Transfer-Encoding: 7Bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 2QPkJerNbko3 This is a multi-part message in MIME format. --nextPart6779151.9J7NaK4W3v Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="iso-8859-1" In the email from Thursday, 4 August 2022 10:56:40 +03 user Moessbauer, Felix wrote: > > -----Original Message----- > > From: Anton Mikanovich > > Sent: Thursday, August 4, 2022 9:36 AM > > To: Moessbauer, Felix (T CED SES-DE) ; > > isar-users@googlegroups.com > > Cc: Kiszka, Jan (T CED) ; Uladzimir Bely > > > > Subject: Re: [PATCH] install crossbuild-essential into base schroot > > > > 03.08.2022 19:44, Felix Moessbauer wrote: > > > > > This patch always installs the crossbuild-essential- package > > > into the lower dir of the host sbuild schroot. > > > > > > > > > > > > This avoids having to install this package in the upper-dir when > > > cross-compiling, and is identical to build-essential when natively > > > compiling. > > > By that, the parallel cross-build of packages is significantly faster. > > > > > > > > > > > > Signed-off-by: Felix Moessbauer > > > --- > > > > > > meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > > > > > > > diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb > > > b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb > > > index aa82846b..f7c7d11b 100644 > > > --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb > > > +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb > > > @@ -9,5 +9,10 @@ SBUILD_VARIANT = "host" > > > > > > > > > > > > require sbuild-chroot.inc > > > > > > > > > > > > +# always add the crossbuild-essentials package which is # a noop for > > > +the host distro, but significantly reduces # the download + install > > > +time when cross-compiling SBUILD_CHROOT_PREINSTALL_COMMON += > > > +"crossbuild-essential-${DISTRO_ARCH}" > > > + > > > > > > ROOTFS_ARCH = "${HOST_ARCH}" > > > ROOTFS_DISTRO = "${HOST_DISTRO}" > > > > > > This will probably not work on riscv64 and any other targets with > > self-build crossbuild-essential. > > > The CI did not report any issues with this patch, but maybe an riscv64 test > is missing... Either we exclude these community-ports of Debian, or we > simply just apply the patches for the architectures we support and we know > it works (like armhf, arm64). > Even if this is just a performance thing, in layers with dozens of packages > the overhead of just installing the compilers is huge. It also bloats the > upper-dir of the schroot leading to significant disk consumption. > Jan recently reported that the build time raised a lot when switching an > arm64 layer to from ISAR v0.9 to ISAR-next (sbuild). Very likely most of > that came from the crossbuild-essential packages. > Felix We could also simply control it from local.conf at downstream level: SBUILD_CHROOT_PREINSTALL += "${@ 'crossbuild-essential-${DISTRO_ARCH}' if d.getVar('SBUILD_VARIANT') == 'host' else ''}" This still just needs a small change in SBUILD_CHROOT_PREINSTALL definition in sbuild- chroot.inc (replace '?=' with '+=') builder@9f6a3f775537:/build/bc$ bitbake -e mc:qemuarm-bullseye:sbuild-chroot-target | grep "SBUILD_CHROOT_PREINSTALL=" SBUILD_CHROOT_PREINSTALL="fakeroot build-essential debhelper ccache devscripts equivs" builder@9f6a3f775537:/build/bc$ bitbake -e mc:qemuarm-bullseye:sbuild-chroot-host | grep "SBUILD_CHROOT_PREINSTALL=" SBUILD_CHROOT_PREINSTALL="crossbuild-essential-armhf fakeroot build- essential debhelper ccache devscripts equivs " This approach looks more flexible for me. -- Uladzimir Bely --nextPart6779151.9J7NaK4W3v Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-8859-1"

In the email from Thursday, 4 August 2022 10:56:40 +03 user Moessbauer, = =46elix wrote:

>= ; > -----Original Message-----

>= ; > From: Anton Mikanovich <amikan@ilbers.de>

>= ; > Sent: Thursday, August 4, 2022 9:36 AM

>= ; > To: Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.co= m>;

>= ; > isar-users@googlegroups.com

>= ; > Cc: Kiszka, Jan (T CED) <jan.kiszka@siemens.com>; Uladzimir Be= ly

>= ; > <ubely@ilbers.de>

>= ; > Subject: Re: [PATCH] install crossbuild-essential into base schroot<= /p>

>= ; >

>= ; > 03.08.2022 19:44, Felix Moessbauer wrote:

>= ; >

>= ; > > This patch always installs the crossbuild-essential-<distro&= gt; package

>= ; > > into the lower dir of the host sbuild schroot.

>= ; > >

>= ; > >

>= ; > >

>= ; > > This avoids having to install this package in the upper-dir whe= n

>= ; > > cross-compiling, and is identical to build-essential when nativ= ely

>= ; > > compiling.

>= ; > > By that, the parallel cross-build of packages is significantly = faster.

>= ; > >

>= ; > >

>= ; > >

>= ; > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.co= m>

>= ; > > ---

>= ; > >

>= ; > >   meta/recipes-devtools/sbuild-chroot/sbuild-chroot-h= ost.bb | 5 +++++

>= ; > >   1 file changed, 5 insertions(+)

>= ; > >

>= ; > >

>= ; > >

>= ; > > diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-= host.bb

>= ; > > b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb

>= ; > > index aa82846b..f7c7d11b 100644

>= ; > > --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb=

>= ; > > +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb=

>= ; > > @@ -9,5 +9,10 @@ SBUILD_VARIANT =3D "host"

>= ; > >

>= ; > >

>= ; > >

>= ; > >   require sbuild-chroot.inc

>= ; > >

>= ; > >

>= ; > >

>= ; > > +# always add the crossbuild-essentials package which is # a no= op for

>= ; > > +the host distro, but significantly reduces # the download + in= stall

>= ; > > +time when cross-compiling SBUILD_CHROOT_PREINSTALL_COMMON +=3D=

>= ; > > +"crossbuild-essential-${DISTRO_ARCH}"

>= ; > > +

>= ; > >

>= ; > >   ROOTFS_ARCH =3D "${HOST_ARCH}"

>= ; > >   ROOTFS_DISTRO =3D "${HOST_DISTRO}"

>= ; >

>= ; >

>= ; > This will probably not work on riscv64 and any other targets with

>= ; > self-build

&nb= sp;crossbuild-essential.

>= ;

>= ;

>= ; The CI did not report any issues with this patch, but maybe an riscv64 te= st

>= ; is missing...

&nb= sp;Either we exclude these community-ports of Debian, or we

>= ; simply just apply the patches for the architectures we support and we kno= w

>= ; it works (like armhf, arm64).

>= ; Even if this is just a performance thing, in layers with dozens of packag= es

>= ; the overhead of just installing the compilers is huge.

&nb= sp;It also bloats the

>= ; upper-dir of the schroot leading to significant disk consumption.

>= ; Jan recently reported that the build time raised a lot when switching an<= /p>

>= ; arm64 layer to from ISAR v0.9 to ISAR-next (sbuild).

&nb= sp;Very likely most of

>= ; that came from the crossbuild-essential packages.

>= ; Felix


We could also simply control it from local.conf at downstream level:


SBUILD_CHROOT_PREINSTALL +=3D=  "${@ 'crossbuild-essential-${DISTRO_ARCH}' if d= =2EgetVar('SBUILD_VARIANT') =3D= =3D 'host' else ''}&q= uot;


This still just needs a small change in SBUILD_CHROOT_PREINSTALL definit= ion in sbuild-chroot.inc (replace '?=3D' with '+=3D')


builder@9f6a3f775537:/build/bc$ bit= bake -e mc:qemuarm-bullseye:sbuild-chroot-target | grep "SBUILD_CHROOT= _PREINSTALL=3D"
SBUILD_CHROOT_PREINSTALL=3D"f= akeroot build-essential debhelper ccache=A0devscripts=A0equivs"
= builder@9f6a3f775537:/build/bc$ bitbake -e mc:qemuarm-bullseye:sbuild-chroo= t-host | grep "SBUILD_CHROOT_PREINSTALL=3D" =A0=A0=A0=A0=A0=A0SBUILD_CHROOT_PREINSTALL=3D"crossbuild-essential-armhf fakeroot bui= ld-essential=A0debhelper ccache devscripts equivs =A0"
This appro= ach looks more flexible for me.


--

Ula= dzimir Bely


--nextPart6779151.9J7NaK4W3v--