From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7075595997826514944 X-Received: by 2002:adf:eb87:0:b0:1ef:85f5:6ab4 with SMTP id t7-20020adfeb87000000b001ef85f56ab4mr2558195wrn.158.1647492623656; Wed, 16 Mar 2022 21:50:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:6d8d:0:b0:203:dadb:4a0c with SMTP id l13-20020a5d6d8d000000b00203dadb4a0cls462135wrs.1.gmail; Wed, 16 Mar 2022 21:50:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9LVdBuFq8/lv03dCfdj4CETIvMVX3UMtIOsvE0sY/ok+jZLfCykQRCpqtbxP061FjBY1C X-Received: by 2002:a5d:648c:0:b0:1ed:b04d:300 with SMTP id o12-20020a5d648c000000b001edb04d0300mr2340587wri.347.1647492622645; Wed, 16 Mar 2022 21:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647492622; cv=none; d=google.com; s=arc-20160816; b=nRBJ6VpvyE4w23H2LPFvgnh4QQ9eyZSmzYeUte1zHcdJKc1hAXAS258zXHHr5u+KNl j98tsirsd5UsdG3XVYkgqp5NCxgzUuO8ESV5cMJz4sT62aYA4DPLp5LvkLlGZ7CWtZRs J7dDsHpio2wrYdCL95lpF7lYYyddTCxwwoG0GRZRAAYbi9uCz4YS0TuwPisqOvENbNX+ IgOQe225VKMMTq9O66vv1QN812erDDDDhDPGI6qa0zGUF3eBmGbnLKednxG9W6XFWu+U GLf7swFMK09Gfq24TZgZ64DevhvSTDNCu8WaUIr9rNH8hakUSFTWP2Jtp5rdbkGhZnYf gnhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=7DeCcpTMHx2ERmaxhKO96OJTCkU25VYjgSQjiYzwTko=; b=ZHG+wTBdxhMNK/G7EwWEzJ8827xc8E5C6qedObwNrJELDGxroa45YfodtL3DPSxHw7 u+cYLaaXX33OBVYqrTcYE6FdGf0o5iFiAMDSzUBNgDy7ucDspiCd8cmNLNrOXBFvl5ep DC0Z8uioTmCqmZWyp+g2hPjae9X9BJrH3YpIWdAuALhBKuU1dkhRC/VmCIzFk87M7v5H HnqVMtz2VCVN2CO+uheLwmeYB+nYOnS/6jgJRSTMPZZXxgir72rxlxykLwgdIy6M/rb/ B4y1N1tm3zzdRpGdLHn8RfL+/w+e/rytyXMOjt3NAefxhGoIvtatHFcFxqPWA+CQtEZ3 7HZA== 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 r81-20020a1c4454000000b0038c1011d2e4si357715wma.3.2022.03.16.21.50.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Mar 2022 21:50:22 -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 baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 22H4oLHX025716 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Mar 2022 05:50:21 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v8 00/16] Sbuild/Schroot migration Date: Thu, 17 Mar 2022 05:50:05 +0100 Message-Id: <20220317045021.4018-1-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED 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: gndPQiWgnYkm This is a patchset showing how sbuild/schroot tools can be integrated into Isar build system. Base schroot images are created with sbuild-chroot-target or, in case of cross-build, sbuild-chroot-host recipes. These images are based on isar-bootstrap ones, but include some build-related stuff preinstalled. To use these changes you need to have sbuild and schroot installed and configured. User who runs build should be added to sbuild group. Currently, sbuild-related stuff is supported in latest kas. If Gilab CI is used, the following configuration changes are required: - external dir for schroot overlay should be set in the config /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 in combination with kas image mentioned above. 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 v8: - Added patch with support of package versions with epochs Changes since v7: - fixed work with proxy by adding some environment filters in sbuild; - DEB_BUILD_PROFILES support simplified and improved - Fixed gbp-based recipes rebuilding (get back --git-ignore-new option previously removed) - fixed base-apt caching for packages and source packages temporary installed in sbuild isolated environment - fixed rare build error related to ccache setup (added locking) Changes since v6: - added patch that switches sbuild from using source directory to using .dsc file. The file is generated before sbuild call by `dpkg-source`. Changes since v5: - warning about shell exports in dpkg_runbuild_prepend. This should avoided be reworked to templates. Changes since v4: - consider shell exports done in dpkg_runbuild_prepend and pass them to sbuild environment; - fixed ccache work. 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 Felix Moessbauer (1): fix: support build of packages with epoch version Uladzimir Bely (14): 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: Support of shell exports from dpkg_runbuild_prepend dpkg: Remove builddeps install task. sbuild: Add ccache support dpkg-base: Switch devshell to use schroot dpkg-base: Switch apt_fetch and apt_unpack to use schroot doc: Add sbuild-related documentation sbuild: Use .dsc file instead of source directory. sbuild: Fixed proxy support sbuild: Fix debsrc_download for packages dependencies doc/user_manual.md | 22 +- meta/classes/deb-dl-dir.bbclass | 4 + meta/classes/dpkg-base.bbclass | 78 ++++--- meta/classes/dpkg-gbp.bbclass | 26 +-- meta/classes/dpkg.bbclass | 106 ++++++--- meta/classes/sbuild.bbclass | 211 ++++++++++++++++++ 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 ++++ 10 files changed, 430 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 -- 2.20.1