public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/4] sbuild-chroot optimizations
@ 2023-01-09  5:32 Jan Kiszka
  2023-01-09  5:32 ` [PATCH 1/4] sbuild-chroot: Only install ccache is used Jan Kiszka
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Jan Kiszka @ 2023-01-09  5:32 UTC (permalink / raw)
  To: isar-users

This primarily brings back pre-installed crosstools for sbuild-chroot, a
feature that was lost in the migration from buildchroot. It even
improves this further by adding two more dev packages and its deps so
that packages with minimal BuildDepends do not any need extra
installations.

Jan Kiszka (4):
  sbuild-chroot: Only install ccache is used
  crossbuild-essential-riscv64: Drop unneeded crossbuild disabling
  sbuild-chroot: Pre-install cross-compiler and libc6-dev
  sbuild-chroot: Pre-install also libcpp-*-dev and libstdc++-*-dev

 meta-isar/conf/distro/raspios-bullseye.conf   |  2 ++
 meta-isar/conf/distro/ubuntu-focal.conf       |  2 ++
 meta/conf/distro/debian-bookworm.conf         |  2 ++
 meta/conf/distro/debian-bullseye.conf         |  2 ++
 meta/conf/distro/debian-buster.conf           |  2 ++
 .../crossbuild-essential-riscv64_0.2-isar.bb  |  2 --
 .../sbuild-chroot/sbuild-chroot-host.bb       | 11 +++++++
 .../sbuild-chroot/sbuild-chroot-target.bb     |  4 +++
 .../sbuild-chroot/sbuild-chroot.inc           | 30 +++++++++++++++----
 9 files changed, 50 insertions(+), 7 deletions(-)

-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] sbuild-chroot: Only install ccache is used
  2023-01-09  5:32 [PATCH 0/4] sbuild-chroot optimizations Jan Kiszka
@ 2023-01-09  5:32 ` Jan Kiszka
  2023-01-20  8:28   ` Jan Kiszka
  2023-01-09  5:32 ` [PATCH 2/4] crossbuild-essential-riscv64: Drop unneeded crossbuild disabling Jan Kiszka
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2023-01-09  5:32 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

Aligns sbuild-chroot with the behavior of buildchroot.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
index 4688da1d..fa4a295c 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
@@ -14,7 +14,7 @@ SBUILD_CHROOT_PREINSTALL_COMMON = " \
     fakeroot \
     build-essential \
     debhelper \
-    ccache \
+    ${@ 'ccache' if d.getVar('USE_CCACHE') == '1' else ''} \
     devscripts \
     equivs \
 "
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/4] crossbuild-essential-riscv64: Drop unneeded crossbuild disabling
  2023-01-09  5:32 [PATCH 0/4] sbuild-chroot optimizations Jan Kiszka
  2023-01-09  5:32 ` [PATCH 1/4] sbuild-chroot: Only install ccache is used Jan Kiszka
@ 2023-01-09  5:32 ` Jan Kiszka
  2023-01-09  5:32 ` [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev Jan Kiszka
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2023-01-09  5:32 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

There is no reason to build this meta package without using crossbuild.
In fact, we did that already prior to f2c2ee95aa1c.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../crossbuild-essential-riscv64_0.2-isar.bb                    | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb b/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb
index c7ef390f..9554f1f6 100644
--- a/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb
+++ b/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb
@@ -8,8 +8,6 @@ inherit dpkg-raw
 
 DPKG_ARCH = "all"
 
-ISAR_CROSS_COMPILE = "0"
-
 DEBIAN_DEPENDS = " \
     gcc-riscv64-linux-gnu, \
     g++-riscv64-linux-gnu, \
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev
  2023-01-09  5:32 [PATCH 0/4] sbuild-chroot optimizations Jan Kiszka
  2023-01-09  5:32 ` [PATCH 1/4] sbuild-chroot: Only install ccache is used Jan Kiszka
  2023-01-09  5:32 ` [PATCH 2/4] crossbuild-essential-riscv64: Drop unneeded crossbuild disabling Jan Kiszka
@ 2023-01-09  5:32 ` Jan Kiszka
  2023-01-09  5:56   ` Moessbauer, Felix
  2023-01-09  5:32 ` [PATCH 4/4] sbuild-chroot: Pre-install also libcpp-*-dev and libstdc++-*-dev Jan Kiszka
  2023-01-24  7:33 ` [PATCH 0/4] sbuild-chroot optimizations Uladzimir Bely
  4 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2023-01-09  5:32 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

This saves build setup time by pre-installing not only build-essential
but - for cross and compat-arch cases - also the cross-compiler as well
as libc6-dev.

The latter is coming via build-essential in the native case, it's not
installed by crossbuild-essential but sbuild is pulling it. We can
install libc6-dev:${DISTRO_ARCH} unconditionally as this becomes a not
in the native case.

Things brings sbuild on eye-level with buildchroot regarding the initial
build environment, even goes beyond as buildchroot used to install only
libc6:<target-arch>.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../sbuild-chroot/sbuild-chroot-host.bb               | 11 +++++++++++
 .../sbuild-chroot/sbuild-chroot-target.bb             |  4 ++++
 meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 10 ++++++----
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
index a37e49b7..c0015721 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
@@ -12,3 +12,14 @@ require sbuild-chroot.inc
 ROOTFS_ARCH = "${HOST_ARCH}"
 ROOTFS_DISTRO = "${HOST_DISTRO}"
 ROOTFS_BASE_DISTRO = "${HOST_BASE_DISTRO}"
+
+SBUILD_CHROOT_PREINSTALL ?= " \
+    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
+    crossbuild-essential-${DISTRO_ARCH} \
+    "
+
+SBUILD_CHROOT_PREINSTALL_riscv64 ?= " \
+    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
+    gcc-riscv64-linux-gnu \
+    g++-riscv64-linux-gnu \
+    dpkg-cross"
diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
index d75d783b..8f2da720 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
@@ -8,3 +8,7 @@ DESCRIPTION = "Isar sbuild/schroot filesystem for target"
 SBUILD_VARIANT = "target"
 
 require sbuild-chroot.inc
+
+SBUILD_CHROOT_PREINSTALL ?= " \
+    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
+    "
diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
index fa4a295c..08a2d55d 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
@@ -10,7 +10,13 @@ PV = "1.0"
 
 inherit rootfs
 
+SBUILD_CHROOT_COMPAT_PREINSTALL_compat-arch = " \
+    libc6-dev:${COMPAT_DISTRO_ARCH} \
+    crossbuild-essential-${COMPAT_DISTRO_ARCH}"
+
 SBUILD_CHROOT_PREINSTALL_COMMON = " \
+    ${SBUILD_CHROOT_COMPAT_PREINSTALL} \
+    libc6-dev:${DISTRO_ARCH} \
     fakeroot \
     build-essential \
     debhelper \
@@ -19,10 +25,6 @@ SBUILD_CHROOT_PREINSTALL_COMMON = " \
     equivs \
 "
 
-SBUILD_CHROOT_PREINSTALL ?= " \
-    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
-"
-
 SBUILD_CHROOT_DIR = "${WORKDIR}/rootfs"
 ROOTFSDIR = "${SBUILD_CHROOT_DIR}"
 ROOTFS_PACKAGES = "${SBUILD_CHROOT_PREINSTALL}"
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 4/4] sbuild-chroot: Pre-install also libcpp-*-dev and libstdc++-*-dev
  2023-01-09  5:32 [PATCH 0/4] sbuild-chroot optimizations Jan Kiszka
                   ` (2 preceding siblings ...)
  2023-01-09  5:32 ` [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev Jan Kiszka
@ 2023-01-09  5:32 ` Jan Kiszka
  2023-01-24  7:33 ` [PATCH 0/4] sbuild-chroot optimizations Uladzimir Bely
  4 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2023-01-09  5:32 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

Basically the same story as for libc6-dev: gcc and g++ pull those in for
the native case, but the cross-compilers will only pull the respective
dev-*-cross packages which do not help to fulfill build dependencies.

As those package names depend on the compiler version, introduce a new
distro configuration variable DISTRO_GCC. If it is set, it shall contain
the default gcc version number. If it is not set, the pre-installation
optimization is skipped by sbuild-chroot.

DISTRO_GCC is set for all in-tree distro versions except for sid as it
is too much of a moving target there.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta-isar/conf/distro/raspios-bullseye.conf    |  2 ++
 meta-isar/conf/distro/ubuntu-focal.conf        |  2 ++
 meta/conf/distro/debian-bookworm.conf          |  2 ++
 meta/conf/distro/debian-bullseye.conf          |  2 ++
 meta/conf/distro/debian-buster.conf            |  2 ++
 .../sbuild-chroot/sbuild-chroot.inc            | 18 ++++++++++++++++++
 6 files changed, 28 insertions(+)

diff --git a/meta-isar/conf/distro/raspios-bullseye.conf b/meta-isar/conf/distro/raspios-bullseye.conf
index 1f65c3cd..2ba2c75c 100644
--- a/meta-isar/conf/distro/raspios-bullseye.conf
+++ b/meta-isar/conf/distro/raspios-bullseye.conf
@@ -23,3 +23,5 @@ DISTRO_KERNELS ?= "kernel kernel7 kernel7l kernel8"
 THIRD_PARTY_APT_KEYS += "http://archive.raspberrypi.org/debian/raspberrypi.gpg.key;sha256sum=76603890d82a492175caf17aba68dc73acb1189c9fd58ec0c19145dfa3866d56"
 
 COMPAT_DISTRO_ARCH_arm64 = "armhf"
+
+DISTRO_GCC = "10"
diff --git a/meta-isar/conf/distro/ubuntu-focal.conf b/meta-isar/conf/distro/ubuntu-focal.conf
index 084f8e3d..eb7a1e80 100644
--- a/meta-isar/conf/distro/ubuntu-focal.conf
+++ b/meta-isar/conf/distro/ubuntu-focal.conf
@@ -26,3 +26,5 @@ IMAGE_PREINSTALL += "init"
 IMAGE_PREINSTALL += "initramfs-tools"
 
 WIC_IMAGER_INSTALL += "python3-distutils"
+
+DISTRO_GCC = "9"
diff --git a/meta/conf/distro/debian-bookworm.conf b/meta/conf/distro/debian-bookworm.conf
index 7e614bf2..d0599dc6 100644
--- a/meta/conf/distro/debian-bookworm.conf
+++ b/meta/conf/distro/debian-bookworm.conf
@@ -13,3 +13,5 @@ DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686-pae 686 alpha-generic alpha-smp \
 	mips64r6el octeon parisc parisc64 powerpc-smp powerpc powerpc64 \
 	powerpc64le riscv64 rpi rt-686-pae rt-amd64 rt-arm64 rt-armmp \
 	s390x sh7751r sh7785lcr sparc64-smp sparc64"
+
+DISTRO_GCC = "12"
diff --git a/meta/conf/distro/debian-bullseye.conf b/meta/conf/distro/debian-bullseye.conf
index 9e072692..9b76e68a 100644
--- a/meta/conf/distro/debian-bullseye.conf
+++ b/meta/conf/distro/debian-bullseye.conf
@@ -10,3 +10,5 @@ DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
 DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \
     armmp-lpae cloud-amd64 loongson-3 octeon powerpc64le rpi s390x marvell \
     rt-686-pae rt-amd64 rt-arm64 rt-armmp"
+
+DISTRO_GCC = "10"
diff --git a/meta/conf/distro/debian-buster.conf b/meta/conf/distro/debian-buster.conf
index c882460a..025fc936 100644
--- a/meta/conf/distro/debian-buster.conf
+++ b/meta/conf/distro/debian-buster.conf
@@ -10,3 +10,5 @@ DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
 DISTRO_KERNELS ?= "4kc-malta 5kc-malta 686 686-pae amd64 arm64 armmp \
     armmp-lpae cloud-amd64 loongson-3 marvell octeon powerpc64le rpi s390x \
     rt-686-pae rt-amd64 rt-arm64 rt-armmp"
+
+DISTRO_GCC = "8"
diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
index 08a2d55d..9336c0cc 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
@@ -10,6 +10,24 @@ PV = "1.0"
 
 inherit rootfs
 
+python() {
+    distro_gcc = d.getVar('DISTRO_GCC')
+    distro_arch = d.getVar('DISTRO_ARCH')
+
+    if d.getVar('DISTRO_GCC'):
+        d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON',
+                    ' libgcc-{}-dev:{}'.format(distro_gcc, distro_arch))
+        d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON',
+                    ' libstdc++-{}-dev:{}'.format(distro_gcc, distro_arch))
+
+        if d.getVar('ISAR_ENABLE_COMPAT_ARCH') == '1':
+            compat_arch = d.getVar('COMPAT_DISTRO_ARCH')
+            d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
+                        ' libgcc-{}-dev:{}'.format(distro_gcc, compat_arch))
+            d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
+                        ' libstdc++-{}-dev:{}'.format(distro_gcc, compat_arch))
+}
+
 SBUILD_CHROOT_COMPAT_PREINSTALL_compat-arch = " \
     libc6-dev:${COMPAT_DISTRO_ARCH} \
     crossbuild-essential-${COMPAT_DISTRO_ARCH}"
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev
  2023-01-09  5:32 ` [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev Jan Kiszka
@ 2023-01-09  5:56   ` Moessbauer, Felix
  2023-01-09  7:45     ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Moessbauer, Felix @ 2023-01-09  5:56 UTC (permalink / raw)
  To: isar-users, Kiszka, Jan; +Cc: amikan

On Mon, 2023-01-09 at 06:32 +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This saves build setup time by pre-installing not only build-
> essential
> but - for cross and compat-arch cases - also the cross-compiler as
> well
> as libc6-dev.
> 
> The latter is coming via build-essential in the native case, it's not
> installed by crossbuild-essential but sbuild is pulling it. We can
> install libc6-dev:${DISTRO_ARCH} unconditionally as this becomes a
> not
> in the native case.
> 
> Things brings sbuild on eye-level with buildchroot regarding the
> initial
> build environment, even goes beyond as buildchroot used to install
> only
> libc6:<target-arch>.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  .../sbuild-chroot/sbuild-chroot-host.bb               | 11
> +++++++++++
>  .../sbuild-chroot/sbuild-chroot-target.bb             |  4 ++++
>  meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 10 ++++++---
> -
>  3 files changed, 21 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-
> host.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
> index a37e49b7..c0015721 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
> @@ -12,3 +12,14 @@ require sbuild-chroot.inc
>  ROOTFS_ARCH = "${HOST_ARCH}"
>  ROOTFS_DISTRO = "${HOST_DISTRO}"
>  ROOTFS_BASE_DISTRO = "${HOST_BASE_DISTRO}"
> +
> +SBUILD_CHROOT_PREINSTALL ?= " \
> +    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
> +    crossbuild-essential-${DISTRO_ARCH} \

I proposed this a couple of month ago in
"[PATCH] install crossbuild-essential into base schroot"

In the end, it was rejected after having some build failures in risc64.

Citing Anton:

[...]

> I've just checked mc:qemuriscv64-sid-ports:isar-image-base target
manually and it fails with:
> | E: Unable to locate package crossbuild-essential-riscv64
> on do_rootfs_install task of sbuild-chroot-host recipe, which was
predictable.
> It was not failed on CI because of KFAIL on Sid-Ports targets (they
are not stable enough).
> Overall preinstalling is good idea and will improve building speed,
but we should implement it in the right way.

In case this is solved by your series, I really appreciate to have it
integrated.

Felix


> +    "
> +
> +SBUILD_CHROOT_PREINSTALL_riscv64 ?= " \
> +    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
> +    gcc-riscv64-linux-gnu \
> +    g++-riscv64-linux-gnu \
> +    dpkg-cross"
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-
> target.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-
> target.bb
> index d75d783b..8f2da720 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
> @@ -8,3 +8,7 @@ DESCRIPTION = "Isar sbuild/schroot filesystem for
> target"
>  SBUILD_VARIANT = "target"
>  
>  require sbuild-chroot.inc
> +
> +SBUILD_CHROOT_PREINSTALL ?= " \
> +    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
> +    "
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> index fa4a295c..08a2d55d 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> @@ -10,7 +10,13 @@ PV = "1.0"
>  
>  inherit rootfs
>  
> +SBUILD_CHROOT_COMPAT_PREINSTALL_compat-arch = " \
> +    libc6-dev:${COMPAT_DISTRO_ARCH} \
> +    crossbuild-essential-${COMPAT_DISTRO_ARCH}"
> +
>  SBUILD_CHROOT_PREINSTALL_COMMON = " \
> +    ${SBUILD_CHROOT_COMPAT_PREINSTALL} \
> +    libc6-dev:${DISTRO_ARCH} \
>      fakeroot \
>      build-essential \
>      debhelper \
> @@ -19,10 +25,6 @@ SBUILD_CHROOT_PREINSTALL_COMMON = " \
>      equivs \
>  "
>  
> -SBUILD_CHROOT_PREINSTALL ?= " \
> -    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
> -"
> -
>  SBUILD_CHROOT_DIR = "${WORKDIR}/rootfs"
>  ROOTFSDIR = "${SBUILD_CHROOT_DIR}"
>  ROOTFS_PACKAGES = "${SBUILD_CHROOT_PREINSTALL}"
> -- 
> 2.35.3
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev
  2023-01-09  5:56   ` Moessbauer, Felix
@ 2023-01-09  7:45     ` Jan Kiszka
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2023-01-09  7:45 UTC (permalink / raw)
  To: Moessbauer, Felix (T CED INW-CN), isar-users; +Cc: amikan

On 09.01.23 06:56, Moessbauer, Felix (T CED INW-CN) wrote:
> On Mon, 2023-01-09 at 06:32 +0100, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This saves build setup time by pre-installing not only build-
>> essential
>> but - for cross and compat-arch cases - also the cross-compiler as
>> well
>> as libc6-dev.
>>
>> The latter is coming via build-essential in the native case, it's not
>> installed by crossbuild-essential but sbuild is pulling it. We can
>> install libc6-dev:${DISTRO_ARCH} unconditionally as this becomes a
>> not
>> in the native case.
>>
>> Things brings sbuild on eye-level with buildchroot regarding the
>> initial
>> build environment, even goes beyond as buildchroot used to install
>> only
>> libc6:<target-arch>.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  .../sbuild-chroot/sbuild-chroot-host.bb               | 11
>> +++++++++++
>>  .../sbuild-chroot/sbuild-chroot-target.bb             |  4 ++++
>>  meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 10 ++++++---
>> -
>>  3 files changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-
>> host.bb b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
>> index a37e49b7..c0015721 100644
>> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
>> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
>> @@ -12,3 +12,14 @@ require sbuild-chroot.inc
>>  ROOTFS_ARCH = "${HOST_ARCH}"
>>  ROOTFS_DISTRO = "${HOST_DISTRO}"
>>  ROOTFS_BASE_DISTRO = "${HOST_BASE_DISTRO}"
>> +
>> +SBUILD_CHROOT_PREINSTALL ?= " \
>> +    ${SBUILD_CHROOT_PREINSTALL_COMMON} \
>> +    crossbuild-essential-${DISTRO_ARCH} \
> 
> I proposed this a couple of month ago in
> "[PATCH] install crossbuild-essential into base schroot"
> 
> In the end, it was rejected after having some build failures in risc64.
> 

This version works on riscv64 (with a working sid snaptshot, of course...).

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] sbuild-chroot: Only install ccache is used
  2023-01-09  5:32 ` [PATCH 1/4] sbuild-chroot: Only install ccache is used Jan Kiszka
@ 2023-01-20  8:28   ` Jan Kiszka
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2023-01-20  8:28 UTC (permalink / raw)
  To: isar-users

On 09.01.23 06:32, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Aligns sbuild-chroot with the behavior of buildchroot.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> index 4688da1d..fa4a295c 100644
> --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
> @@ -14,7 +14,7 @@ SBUILD_CHROOT_PREINSTALL_COMMON = " \
>      fakeroot \
>      build-essential \
>      debhelper \
> -    ccache \
> +    ${@ 'ccache' if d.getVar('USE_CCACHE') == '1' else ''} \
>      devscripts \
>      equivs \
>  "

Subject should read "...if used".

Can v2 if there are other changes requested on this series. If not,
please fix up on merge.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] sbuild-chroot optimizations
  2023-01-09  5:32 [PATCH 0/4] sbuild-chroot optimizations Jan Kiszka
                   ` (3 preceding siblings ...)
  2023-01-09  5:32 ` [PATCH 4/4] sbuild-chroot: Pre-install also libcpp-*-dev and libstdc++-*-dev Jan Kiszka
@ 2023-01-24  7:33 ` Uladzimir Bely
  4 siblings, 0 replies; 9+ messages in thread
From: Uladzimir Bely @ 2023-01-24  7:33 UTC (permalink / raw)
  To: isar-users; +Cc: Jan Kiszka

In mail from понедельник, 9 января 2023 г. 08:32:31 +03 user Jan Kiszka wrote:
> This primarily brings back pre-installed crosstools for sbuild-chroot, a
> feature that was lost in the migration from buildchroot. It even
> improves this further by adding two more dev packages and its deps so
> that packages with minimal BuildDepends do not any need extra
> installations.
> 
> Jan Kiszka (4):
>   sbuild-chroot: Only install ccache is used
>   crossbuild-essential-riscv64: Drop unneeded crossbuild disabling
>   sbuild-chroot: Pre-install cross-compiler and libc6-dev
>   sbuild-chroot: Pre-install also libcpp-*-dev and libstdc++-*-dev
> 
>  meta-isar/conf/distro/raspios-bullseye.conf   |  2 ++
>  meta-isar/conf/distro/ubuntu-focal.conf       |  2 ++
>  meta/conf/distro/debian-bookworm.conf         |  2 ++
>  meta/conf/distro/debian-bullseye.conf         |  2 ++
>  meta/conf/distro/debian-buster.conf           |  2 ++
>  .../crossbuild-essential-riscv64_0.2-isar.bb  |  2 --
>  .../sbuild-chroot/sbuild-chroot-host.bb       | 11 +++++++
>  .../sbuild-chroot/sbuild-chroot-target.bb     |  4 +++
>  .../sbuild-chroot/sbuild-chroot.inc           | 30 +++++++++++++++----
>  9 files changed, 50 insertions(+), 7 deletions(-)

Applied to next, thanks.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-01-24  7:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09  5:32 [PATCH 0/4] sbuild-chroot optimizations Jan Kiszka
2023-01-09  5:32 ` [PATCH 1/4] sbuild-chroot: Only install ccache is used Jan Kiszka
2023-01-20  8:28   ` Jan Kiszka
2023-01-09  5:32 ` [PATCH 2/4] crossbuild-essential-riscv64: Drop unneeded crossbuild disabling Jan Kiszka
2023-01-09  5:32 ` [PATCH 3/4] sbuild-chroot: Pre-install cross-compiler and libc6-dev Jan Kiszka
2023-01-09  5:56   ` Moessbauer, Felix
2023-01-09  7:45     ` Jan Kiszka
2023-01-09  5:32 ` [PATCH 4/4] sbuild-chroot: Pre-install also libcpp-*-dev and libstdc++-*-dev Jan Kiszka
2023-01-24  7:33 ` [PATCH 0/4] sbuild-chroot optimizations Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox