From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7197016923412889600 X-Received: by 2002:a17:906:2d51:b0:8af:3930:c38e with SMTP id e17-20020a1709062d5100b008af3930c38emr4007734eji.10.1678082756089; Sun, 05 Mar 2023 22:05:56 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:400c:b0:4ad:7c6c:4f6d with SMTP id d12-20020a056402400c00b004ad7c6c4f6dls19593eda.1.-pod-prod-gmail; Sun, 05 Mar 2023 22:05:54 -0800 (PST) X-Google-Smtp-Source: AK7set/9uN84C0VDusSUhf7gk6yBl8QV47+YJiLbIP/r2FoTO861m+k63xKf5f33Gga2vq7FfliH X-Received: by 2002:a05:6402:204a:b0:4c1:d49:3ecc with SMTP id bc10-20020a056402204a00b004c10d493eccmr9452916edb.29.1678082754405; Sun, 05 Mar 2023 22:05:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678082754; cv=none; d=google.com; s=arc-20160816; b=orU5UMDMdvh7brl08iJBFwbV+HoaolagkAC6EoJZtrEs5Vc+ed3DHgZOmDcSaRYD0K eiaAtazXvvftL5TS7WCcWHgLMeVOIOV+fyiRWkuxcDN1iH/bOTOZh1ctzg8GvJ+x2Lg5 NmbmNr47bENXudRACO9INxtZw3SVzWVCpnH60y5kiWEYWAhZyqzYwjW1Pxj7h2c7Rj3u NsvPRMVslnCiokOpHBA4t5fxQWvD/zEtkaYtlAREpjmLhva58QwaylsRXL2iwJSw0uRm yGMCdwTxedasFVfW8AmJs7NoS6kF/owNks/s7F2YAcFXmZ1Vj1EVqdSmlaqV1mEXIh0r mc3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=xNfFeCi0jTo8Z3uZRgSFdnev5vTNHsYqLsZLKEs3Cmk=; b=SxaKDcUrjMhBopFrEmsAM97JgA3iE/SkE/Zm7wJ3P+ALGCJa6TvmPSadFU5hom6efQ p2EhrT00AYnS0EoYnAIkIE8LFV7skjBxHnz3Zp/pArLW8ikQilSriAZMnK4j3zGn6kcF Xr92kNdRk34XSbGhX8In28iaZEXs6jDXrRw88L/IK3BX2jTKvwWCjJyl6j9l8pSWSiEP d2gapg1SOAhDSZexP8YOWNns0tDxjDa1U6WyfLboduKiR2C8EJKBr+asDPuCZjZC3sGy uxuz6B14TFAIMDw67T6anXVL2qGNIeFjYC4ujsCIz8X4WvjuMcZm0FO1lt0Ju5cSG/e9 NELg== 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 h7-20020a056402280700b004c1c06c20fdsi456386ede.3.2023.03.05.22.05.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Mar 2023 22:05:54 -0800 (PST) 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 home.localnet (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 32665rh9014253 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 6 Mar 2023 07:05:53 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: Re: [PATCH v4 0/4] multiarch support Date: Mon, 06 Mar 2023 09:05:56 +0300 Message-ID: <2212263.vFx2qVVIhK@home> In-Reply-To: <20230303102045.4140027-1-adriaan.schmidt@siemens.com> References: <20230303102045.4140027-1-adriaan.schmidt@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: IANd9ez0MV1c In the email from Friday, 3 March 2023 13:20:41 +03 user Adriaan Schmidt wrote: > This adds `-compat` and `-native` bitbake > targets to all recipes inheriting dpkg-base. > > The new -compat build variant replaces the old compat mechanism. > Note that `ISAR_ENABLE_COMPAT_ARCH="1"` is still required to > ensure that the bootstrap and buildchroot is prepared correctly. > > Regarding testing of the new features: > - we have (limited) testing of compat, by adding `hello-isar-compat` to > amd64 and arm64 builds. > - currently no testing of native. There are two main use cases for the feature: > - SDK that needs `-native`. This could be turned into a test > easily, by setting/appending SDK_INSTALL. Would require a new option > in testsuite, similar to `image_install` introduced in 57a0ade9a. > - A build tool that is provided by a recipe, when using it in cross > compilation. E.g. if someone needed a patched cmake, they would > write cmake.bb, and applications that need it would (in case cross > compilation is enabled) DEPEND+="cmake-native". Or, another real-world > example from a downstream layer: packaging applications with goreleaser, > which is not found in the Debian apt repos. Instead, I'm fetching it > via a dpkg-prebuilt recipe, written to support multiple architectures > (architecture is part of the download URL). Now if I want to cross > compile go applications, they DEPEND+="goreleaser-native", and > DEBIAN_BUILD_DEPENDS_append=", goreleaser:native". > These cases are more complex, but maybe we can find an example along > those lines and add it to meta-isar. > > As testing of the native feature would (in the simple case) need an > extension of the test classes (for SDK_INSTALL), or introduce something > completely new into meta-isar, I'd like to do that after discussion, in > a later series. > > Adriaan > > changes since v3: > - removed the unneeded (expand=)True argument from d.getVar() calls > - changed "calculate" to "determine" in comment > - added note to RECIPE-API-CHANGELOG > > changes since v2: > - fixed a bug that completely broke things for targets without a compat > arch (e.g., i386). The compat variant of packages is now only available > when it can actually be built. > - the native variant is only generated if it differs from the target. > If DISTRO_ARCH==HOST_ARCH, then `-native` is automatically > provided by the target package. > - also do the bitbake-target->debian-package transformation on SDK_INSTALL > - fix compat packages in testsuite: when we add hello-isar-compat, we > need to remove hello-isar. > > changes since v1: > - fixed an issue that prevented arch overrides of > ISAR_ENABLE_COMPAT_ARCH, which is used in testsuite > - added `-native` expansion to contents of IMAGE_INSTALL > - documentation in user_manual > > > Adriaan Schmidt (4): > bitbake.conf: use PACKAGE_ARCH in overrides > add multiarch support > remove obsolete compat-arch override > doc: add compat/native targets to user manual > > RECIPE-API-CHANGELOG.md | 8 ++ > doc/user_manual.md | 19 ++-- > .../recipes-app/hello-isar/hello-isar.bb | 3 - > meta-isar/recipes-app/libhello/libhello.bb | 3 - > .../recipes-app/samefile/samefile_2.14.bb | 2 +- > meta/classes/compat.bbclass | 40 +++++++++ > meta/classes/debianize.bbclass | 2 +- > meta/classes/dpkg-base.bbclass | 1 + > meta/classes/image.bbclass | 4 +- > meta/classes/multiarch.bbclass | 88 +++++++++++++++++++ > meta/classes/native.bbclass | 10 +++ > meta/classes/sdk.bbclass | 2 +- > meta/conf/bitbake.conf | 6 +- > .../isar-bootstrap/isar-bootstrap.inc | 2 + > .../sbuild-chroot/sbuild-chroot.inc | 14 +-- > testsuite/cibuilder.py | 4 + > 16 files changed, 182 insertions(+), 26 deletions(-) > create mode 100644 meta/classes/compat.bbclass > create mode 100644 meta/classes/multiarch.bbclass > create mode 100644 meta/classes/native.bbclass > > Applied to next, thanks.