From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7057122428766388224 X-Received: by 2002:a05:600c:4248:: with SMTP id r8mr2318528wmm.56.1643981977868; Fri, 04 Feb 2022 05:39:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:a78a:: with SMTP id q132ls996401wme.0.gmail; Fri, 04 Feb 2022 05:39:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCHd2EPe2Co3IoSxmVdvuYNX9JrDdc/wanrwpdAi9VuLZcGyJV8WbJPFNN/+zqXsRdenxE X-Received: by 2002:a05:600c:1e1a:: with SMTP id ay26mr2297049wmb.75.1643981977040; Fri, 04 Feb 2022 05:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643981977; cv=none; d=google.com; s=arc-20160816; b=GCrg1zGWKxPwmlZnSfgIxvqy2KFru1oWcxrvVBNWGHnZGDLFmOaU7HFeOEmTsF3icm HS3Y+WBIbJHsYCDwEnIKh/zCW3KBW21EHNNqni+ueC9EU1ALZ4bI178F3KV9c1HzUTAr HrP61zDgCzUkslofTS+0HSL62JXDbkPmQxMXyXuT6yQ7KRc1GruJMWJNeqxOTxKGo0aj +gQdUz2G+b+H6p0NOymT/KneY9lXFShGW3n96DE8Z8eysKLlctXxUAg6Y81ihSbKVlIH uAv7AxqUqutkXvSzEAX7GRdXWcsRNQcLtZ0lvV0qEWAWNS1lgrOoWjXmwJYaymmPjRo2 stcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:in-reply-to:subject :organization:from:references:to:content-language:mime-version:date :message-id:dkim-signature; bh=h4t1B7I++TlNKZI6XR9hB6TZPDkdgouHJK85QurF4V4=; b=EPK9LuTfbMiSW/CZWFLzLigU+ZrdudBHqZNnM4qa2gfEeeGQ3om8Jn5/Tsf65juS5L Q8muBwiNr6Ev6xusqESp04m9Vq33v1FQmW4dJ5G//xLh/dFWWr5zbgZwfr6m2LhCeUQS PtjUZOJHGu5+62+cdrNi45e7TmPZImGYSCNjZEyjoXU4SgIZPivlRS7HtvehstJpZjPU WytFzSVUIBRRJ5iXNAcH3svWDEvMefubYlG/Wjw8wlSm+aoIBTNME/gLQ25HupNAq8XR s/zQz81Vchb3abNJ8Uow+Zlks2ayAQBck0Uo6RpC9YgL6mJGBcYHZ8exO43Yc+HyTRN/ uuGw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YW2bV4ai; spf=pass (google.com: domain of fm-51332-20220204133936a5c7f90c6e21749dd7-vciyx7@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-51332-20220204133936a5c7f90c6e21749dd7-VCIYx7@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id h16si122792wml.0.2022.02.04.05.39.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Feb 2022 05:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of fm-51332-20220204133936a5c7f90c6e21749dd7-vciyx7@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=YW2bV4ai; spf=pass (google.com: domain of fm-51332-20220204133936a5c7f90c6e21749dd7-vciyx7@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-51332-20220204133936a5c7f90c6e21749dd7-VCIYx7@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20220204133936a5c7f90c6e21749dd7 for ; Fri, 04 Feb 2022 14:39:36 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=quirin.gylstorff@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=h4t1B7I++TlNKZI6XR9hB6TZPDkdgouHJK85QurF4V4=; b=YW2bV4ain1nfqT0q5ycNm7QU1XYGgnMdmSmWTbPJhvsRjETXIn6bperT3D9QQ3W2Mzcl4z lbZiIBR9fCsEL067bifGS1KW0TwbHlek56WoFxdLI3QKf2kjj1CT8f1l1jnidFNjj8wVRMQu Yg/liHIfNTieJWSqmNTxkjEFxY6KU=; Message-ID: Date: Fri, 4 Feb 2022 14:39:35 +0100 MIME-Version: 1.0 Content-Language: en-US To: isar-users@googlegroups.com, ubely@ilbers.de References: <20220125123915.1053-1-ubely@ilbers.de> From: quirin.gylstorff@siemens.com Organization: Siemens Subject: Re: [PATCH v4 00/12] Sbuild/Schroot migration In-Reply-To: <20220125123915.1053-1-ubely@ilbers.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer X-TUID: WTb79vJuj4jt Hi, On 1/25/22 13:39, Uladzimir Bely wrote: > This is a patchset showing how sbuild/schroot tools can be integrated > into Isar build system. > > This patchset should be applied on top of "preparation" patchset > named "Avoid using shell environment during the build". > > Base schroot image is created with sbuild-chroot-target (or > sbuild-chroot-host in case of cross-build) recipe. These images are based > on isar-bootstrap ones, but include some build-related stuff preinstalled. > > To use this changes you need to have sbuild and schroot installed and > configured. Current user should be added to sbuild group. > > If 'kas-container' is used, it should be modified to support sbuild: > - /var/lib/schroot/union/overlay should be externally mounted (-v option) > > Currently, official `kas` images don't include all required software, so > there was an alternative docker image prepared: > `docker pull ghcr.io/wiselord/kas/kas-isar:next-sbuild` > > To use it with KAS: > - export KAS_IMAGE_VERSION=3.0.0-sbuild > - export KAS_CONTAINER_IMAGE_PATH=ghcr.io/wiselord/kas > > If 'gitlab' is used, the similar changes are required: > - 'image: ghcr.io/wiselord/kas/kas-isar:3.0.0-sbuild' in .gitlab-ci.yml > - external dir for schroot overlay should also be specified in > /etc/gitlab-runner/config.toml: > volumes = ["/path/to/overlay:/var/lib/schroot/union/overlay"] > > The patchset was tested with 'meta-iot2050' and 'xenomai-images' > downstreams. Some patches are required for these downstreams, > appropriate pull requests will be created soon. > > Current limitations: > - parallel building of several packages requires more free space in > comparison with buildchroot-based architecture. This happens due > the sbuild architecture which uses some basic layer (common for all > packages) and per-package separate layer (where builddeps are downloaded > and installed). > > Changes since v3: > - dpkg_do_mounts() and dpkg_undo_mounts() are not removed for downstreams > compatibility; > - dpkg_build_export is used for adjusting sbuild environment; > - DEB_BUILD_PROFILES support for sbuild is fixed in case of cross-build. > Changes since v2: > - patches reworked/squashed for easier reading and understanding; > - fixed building foreigh architectures with kas-docker; > - implemented support of ccache; > - fixed devshell and devshell_nodeps, > Changes since v1: > - parallel builds with different BUILD_DIR are supported; > - parallel multiconfig targets in one build are supported; > - per-task schroot configuration in /etc/schroot/ is now used; > - patchset now passes Jenkins CI (so patches changes RFC => PATCH). > > Anton Mikanovich (1): > dpkg: Build packages with sbuild > > Uladzimir Bely (11): > dpkg-gbp: Use separate command to export tarball > dpkg-gbp: Use host tools for dsc preparation > sbuild: Add recipes for host and target rootfs to run sbuild > sbuild: Introduce a class for another build method > sbuild: support of DEB_BUILD_PROFILES > sbuild: add ccache support > dpkg: Remove builddeps install task. > dpkg-base: Switch devshell to use schroot > dpkg-base: Switch apt_fetch and apt_unpack to use schroot > dpkg-base: Cleanup from buildchroot parts. > doc: Add sbuild-related documentation > > doc/user_manual.md | 22 ++- > meta/classes/dpkg-base.bbclass | 81 ++++---- > meta/classes/dpkg-gbp.bbclass | 26 +-- > meta/classes/dpkg.bbclass | 62 +++--- > meta/classes/sbuild.bbclass | 185 ++++++++++++++++++ > meta/conf/bitbake.conf | 2 + > .../sbuild-chroot/sbuild-chroot-host.bb | 13 ++ > .../sbuild-chroot/sbuild-chroot-target.bb | 10 + > .../sbuild-chroot/sbuild-chroot.inc | 39 ++++ > 9 files changed, 359 insertions(+), 81 deletions(-) > create mode 100644 meta/classes/sbuild.bbclass > create mode 100644 meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb > create mode 100644 meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb > create mode 100644 meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc > any thoughts on the clean source behavior[1]. "When running sbuild from within an unpacked source tree, run the 'clean' target before generating the source package. This might require some of the build dependencies necessary for running the 'clean' target to be installed on the host machine. Only disable if you start from a clean checkout and you know what you are doing."[1] [1]: https://manpages.debian.org/unstable/sbuild/sbuild.conf.5.en.html#CLEAN_SOURCE If this is necessary you need to install dh-*(e.g. dh-lua, dh-python) in the build environment. Quirin