From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7075595997826514944 X-Received: by 2002:a05:651c:1503:b0:244:c075:2103 with SMTP id e3-20020a05651c150300b00244c0752103mr19083773ljf.442.1647415570551; Wed, 16 Mar 2022 00:26:10 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:1509:0:b0:249:20e5:8215 with SMTP id s9-20020a2e1509000000b0024920e58215ls203974ljd.10.gmail; Wed, 16 Mar 2022 00:26:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPeGPh1C/FH6poRLQ977nnofTmATi1owUMfLbxIiAn67fS77BDMWTMigzhiVz1o7EeRlsX X-Received: by 2002:a2e:a7c7:0:b0:246:74ca:bc4e with SMTP id x7-20020a2ea7c7000000b0024674cabc4emr18392341ljp.491.1647415569396; Wed, 16 Mar 2022 00:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647415569; cv=none; d=google.com; s=arc-20160816; b=xXF98u86dDoTgxfTe5gKh3/fxohD5bwdzqNa3mRnL84hXc8iIBUk+WAXv2GtU/PANe vG4Y9vtIZJkBn81QNzkWixE/tfy/XiATOcdANk2J6nlUuxE6ynrAcjMcRaHKSbmubD9/ S42ZtJ/WLBPFH426X30QqorZYB9PNufuvOGQkKf4nLJ4uA3eQPyH+878Op3setWl8ZVx uW70shnvnd17KvvYlvbuK3YdXhswZQMktGRpjkROvpCZCnrQbMwWXC0iRh1VeErjN3kq mgSg1Q07I48g5XlsOYVuZGhyter/YQz/YfJhBC6UwTRd33KXffhdqr27sZjt6r00VI9h 6dAg== 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=EKHdU0LWm+0hCcQeAFmlXua1J9M5+gWR6Pai5XDvxZ4=; b=isGo4U+Z/ghjoaWhJvMTkWYAcUPHU9z4ITK1kQklcgAX7+bjDRZ5WlNRc8okvjli1U pNk42CqRVwBjx+ZfvZUffT6YmepEm/mRZIJKAjwxarwS6T+XxcV+kwlX40mhJutD5W4Q IcSk2KaIdqqRZKlqZn7B0Efd/P48QK35fkHX/8hPSmWFboM3s8OWs30ZHOFZX9fvflPx NXWbbFZBhUQuvkxcDkRfvaOWxOCyCjIJN5bXhFwWM/EzVOPMtz9KWg2Kj7mprmOjH38W EW2JNUMagZCnEEDYwIsUau8iNxkq+MCrm7nWX+vDQ+R6B3artAGXfD3CXGEM17C3KVpx nZOQ== 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 m20-20020a0565120a9400b00448a84db62dsi66892lfu.10.2022.03.16.00.26.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Mar 2022 00:26:09 -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 22G7Q7de021517 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Mar 2022 08:26:08 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v8 00/15] Sbuild/Schroot migration Date: Wed, 16 Mar 2022 08:25:52 +0100 Message-Id: <20220316072607.20518-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: Oaert3vtwmru 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 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 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 | 104 ++++++--- 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, 428 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