public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Uladzimir Bely <ubely@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH v2 00/24] Sbuild/Schroot migration
Date: Fri, 26 Nov 2021 07:43:58 +0100	[thread overview]
Message-ID: <ea0e877d-a25e-0299-a526-4fbfb372b7cb@siemens.com> (raw)
In-Reply-To: <2071114.yiUUSuA9gR@home>

On 23.11.21 14:05, Uladzimir Bely wrote:
> In the email from Friday, 19 Nov 2021 г. 15:13:09 +03 user Uladzimir Bely 
> wrote:
>> This is a patchset showing how sbuild/schroot tools can be integrated
>> into Isar build system.
>>
>> ...
>>
>> Current limitations:
>> - there is an unsolved problem with building foreigh architectures
>> using kas-docker.

What exactly is the problem here?

>>
>> - qemuamd64 images are buildable in kas-docker, but some changes
>> in kas are reqired (like installing additional packages and adding
>> 'builder' user to 'sbuild group). I used the following changes to
>> build ghcr.io/siemens/kas/kas-isar:2.6.2-sbuild image based on
>> current ghcr.io/siemens/kas/kas-isar:2.6.2:
>> https://github.com/WiseLord/kas/commit/5b7b02aa33
>>
>> ...
>> meta/recipes-kernel/linux-module/files/debian/{rules => rules.tmpl} (50%)
> 
> Here I would like to add some info regarding running the patchset with `kas-
> docker` and/or using Gitlab CI.
> 
> Initially, the patchset was checked in Jenkins CI (that doesn't use docker) 
> and sent to the maillist then. But there are some docker-related issues solved 
> a bit later. So here I'll try to explain them (and this is to be added to user 
> docs in the following patchset version), so someone could play with sbuild 
> patchset.
> 
> 1. Additional packages required.
> 
> The patchset requires 'schroot' and 'sbuild' packages to be installed on the 
> host. Also, they both should have at least "bullseye" version, otherwise some 
> things won't work properly (like caching .deb via 'sbuild' or foreign 
> architectures support in 'schroot').
> 
> While current (ghcr.io/siemens/kas/kas-isar:2.6.2) image doesn't include the 
> required packages, I temporary prepared and upuloaded one based on it 
> (ghcr.io/wiselord/kas-isar:2.6.2-sbuild). Look at Dockerfile.isar.sbuild chunk 
> in the patch https://github.com/WiseLord/kas/commit/38f4f11f11 for details.
> 
> Gitlab
> 
> Gitlab uses .gitlab-ci.yml for setup. So, to use modified image in Gitlab CI 
> user should simply change the first line:
> 
>> - image: ghcr.io/siemens/kas/kas-isar:latest
>> + image: ghcr.io/wiselord/kas-isar:2.6.2-sbuild
> 
> This is required until official kas-isar image have everything included.
> 
> 2. User should be added to 'sbuild' group.
> 
> In case of 'kas-docker' it happend to be a bit tricky, because 'builder' user 
> is created 'on the fly', when container is run. I'm not an expert in 'kas' so 
> I simply pathced container-entrypoint to add user to sbuild group. Look at
> `container.entrypoint` chunk in the patch for details.
> 
> 3. Overlayfs restrictions.
> 
> Docker uses overlayfs to mount dockerimage rootfs. Schroot uses /var/lib/
> schroot/union/{overlay,underlay} directories to keep 'basic' image and 
> temporary layers on top of it.
> 
> So we happen to have 'overlayfs over overlayfs' situation that is not 
> supported by overlayfs kernel driver.
> 
> The solutionis to use an external volume for the /var/lib/schroot/union/. Look 
> at 'kas-container' chunk in the patch for details.
> 

I've commented on some aspects of you kas patch. It generally looks
feasible, just some smaller details should be improved.

> Gitlab
> 
> It seems there is no way to say gitlab using external volume via the 
> configuration file `.gitlab-ci.yml`. But it can be done by the following 
> changes in /etc/gitlab/runner/config.toml:
> 
>> -volumes = ["/cache"]
>> +volumes = ["/m/ws-10/schroot-10a/union:/var/lib/schroot/union", "/cache"]
> 
> So, gitlab will use external ("/m/ws-10/schroot-10a/union") directory on host. 
> Also, there should be empty "overlay" and "underlay" directories created in 
> it.

That's also not unrealistic, given that we already need to provide
special runners for the purpose of granting privileges and allowing
binfmt_misc. One target would be
https://gitlab.com/cip-project/cip-testing/gitlab-cloud-ci, the backend
for many of our gitlab CI runners that are Isar-compatible.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

  reply	other threads:[~2021-11-26  6:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 12:13 Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 01/24] dpkg: Install raw package files to source root Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 02/24] dpkg-gbp: Use separate command to export tarball Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 03/24] isar-bootstrap: Export bootstrap to schroot config Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 04/24] linux-module: Do not use shell environment Uladzimir Bely
2021-11-19 12:44   ` Jan Kiszka
2021-11-19 12:45     ` Jan Kiszka
2021-11-23 12:24     ` Uladzimir Bely
2021-11-24  6:13       ` Jan Kiszka
2021-11-25  5:47     ` Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 05/24] u-boot: " Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 06/24] trusted-firmware: " Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 07/24] optee-os: " Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 08/24] kselftest: " Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 09/24] dpkg: Build packages with sbuild Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 10/24] sbuild: Introduce environment variables export API Uladzimir Bely
2021-11-21  9:07   ` Jan Kiszka
2021-11-19 12:13 ` [PATCH v2 11/24] dpkg-gbp: Migrate to schroot Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 12/24] linux-mainline: Move cfg fragment test to debian/rules Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 13/24] linux-custom: Prepare kernel config inside sbuild Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 14/24] sbuild: Add recipes for host and target rootfs to run sbuild Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 15/24] sbuild: Mount base-apt in schroot Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 16/24] sbuild: Add sbuildshell task Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 17/24] dpkg-gbp: Preinstall gbp utils in schroot Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 18/24] dpkg: Remove builddeps install task Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 19/24] dpkg-base: Switch devshell to use schroot Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 20/24] dpkg-base: Switch apt_fetch and apt_unpack " Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 21/24] dpkg-base: Cleanup from buildchroot parts Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 22/24] dpkg-gbp: Use host tools for dsc preparation Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 23/24] doc: Add sbuild-related documentation Uladzimir Bely
2021-11-19 12:13 ` [PATCH v2 24/24] sbuild: Replace isar-apt mounting with copying Uladzimir Bely
2021-11-19 21:48 ` [PATCH v2 00/24] Sbuild/Schroot migration Henning Schild
2021-11-21  9:07   ` Jan Kiszka
2021-11-23 13:05 ` Uladzimir Bely
2021-11-26  6:43   ` Jan Kiszka [this message]
2021-11-26  8:03     ` Uladzimir Bely
2021-11-26  8:50       ` Jan Kiszka
2021-12-01 12:11         ` Jan Kiszka
2021-11-26 12:09   ` Michael Adler
2021-11-26 12:57     ` Uladzimir Bely
2021-11-26 14:58     ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea0e877d-a25e-0299-a526-4fbfb372b7cb@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=ubely@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox