From patchwork Fri Feb 24 14:24:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmidt, Adriaan" X-Patchwork-Id: 75 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 24 Feb 2023 15:24:42 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f56.google.com (mail-wr1-f56.google.com [209.85.221.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 31OEOfAQ025829 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Feb 2023 15:24:41 +0100 Received: by mail-wr1-f56.google.com with SMTP id i6-20020adffc06000000b002c5669766a8sf3243801wrr.4; Fri, 24 Feb 2023 06:24:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677248676; cv=pass; d=google.com; s=arc-20160816; b=l4P15UYtZ+wHXfBPA2d0gWeZ95n3kWJpboE/dsJcJyrY7LSeQkD9OBSTD3tC9TZ4La sYzyq64yvNeBtnzvgulmalNTfFEpronunXdxJ/bjzBgG5+W96ttz7nXwbRmkczY6Q7sy r1FAdX7+gxjiTYU2oxrmzs/7W3f/wwQhUFDLpdXjJ3Y3BzjHkWghKCEAslGP3vqr6uc8 A+NYcYrbrN02f4wUbh0MMDafprE//C2a6FNZWbYVFgR9ZadireaBTXsEHWyqQvRGnIUA 44vF/X2py7GrkVq24KldepyKHmYu1WwAFOmDjNw+Jncly2MaiRAsxsDLPN8sV0/dklN/ saow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:feedback-id:mime-version:message-id :date:subject:cc:to:from:sender:dkim-signature; bh=zG5Psaw5fyaxm4giCpNm8YuT/cYkQKA05Y+5lzZmPAE=; b=ugNDFmY5USVj/r3E8Xkcg3GrPIfprCTK2nLLdqsUZaRViTUSTtkJ7FF9RfTPW58hFx UGlwjyGmlUiahjp5v4t/oTMWyHbquLagOK30VvwddDaoCQ/VI5zM8GfV1CxsnJGqayev PO2Tp1jKeTTQmyubPbCB7ZKFcKMW4c1YTlxQd1jES1lxEEPBgvSlN+gKQNbgiF+tFWFz 7h89DQH1PCZ0z8BsEPsabRvKQHX2IaouiR6X7/hbT6qfjRHV+JGlWcGJOeAJ+vewYMSq TJuIFNfXRPVYNuhhjyHyvjYU9rXw4c8EEhd8gh/TIj8jKoOOVSMNKA4Njp7oKAyb5Xiv hY/Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=E3Rt5e5V; spf=pass (google.com: domain of fm-526363-2023022414243302b3d878aa720b9cdd-xy4zcg@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-526363-2023022414243302b3d878aa720b9cdd-XY4zCG@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:feedback-id:mime-version:message-id:date:subject :cc:to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=zG5Psaw5fyaxm4giCpNm8YuT/cYkQKA05Y+5lzZmPAE=; b=Y9WLa/jDQLuheiijnsSGbNtNklYSOEiGK7BOp1GJh6lXG0yENIJJapqy+x5lXSOo6k zNvW3Jwg9aikRLAabevT1P60H9dYJWO6lMB3L8ewzeoCeqYTNXBn+v3/OtW47uVQ4FTP rdXTphx8kkYO17UaJWL1DBRySA7zYC5PQ61Qwsnr5suevUqAkjIiOaqEBx2A/GB/FVcV lRGF8NqiRA1EBym4t8r/GHW//XuSCo/uTYbNvRUEsf4xic7l3l60lAfeY3/rLPozrvsb mD3SjIyQBuQjJbaE7Mkb6I5RQ8q9aKmCdONq17GJTqNBmzpWiAFBU/Z6EvFXzaisGRvd /VLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=zG5Psaw5fyaxm4giCpNm8YuT/cYkQKA05Y+5lzZmPAE=; b=ClIZT38IUsVxEzYuTeTsmjZsP0w9iXcPHayrS7lcFyb2cpwnkrPtDwWvYSES815/xl RLud7duE7UWye9aC/DPNlwLFjZ7bIyq3UT+xDpe5BOcJS+oniDKH1QpusqfnHi1uVnSI 28waY2Zj6/DPovZ8yymldI0alSLSLZWucoIybnLb8DARFJFaLHoJxc2oYxVfYiCmsPxR AyK7GI4KjhMB2K6NOeTUX4VbPTNycdnqCm7GRIIEGjwkingQo/nzbTA6M++ZW6TIJ49s ZiyjH4RCNDR3LPLVfDL8WfmKGqH451Sbi2DLx4mkfcQc5S+KHjTJSeV4Vodq7DpxgOm3 4YUQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AO0yUKV3DIhbvfP5/yk3IeYVOpKu9sTJdteKmFJJgH5jTHs5EHr4Q2eQ qEXwTixHS1P2se+Lc37foGE= X-Google-Smtp-Source: AK7set/JKXrz/PsSS/onNYvTMYCME1NJPBoNdBMnRP4uktSYvfubTLkFEymiDpeUM47q37e7pkOx/w== X-Received: by 2002:a05:6000:1d1:b0:2c5:63df:a545 with SMTP id t17-20020a05600001d100b002c563dfa545mr1140214wrx.0.1677248675874; Fri, 24 Feb 2023 06:24:35 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6000:a18:b0:2c5:55ca:3a3b with SMTP id co24-20020a0560000a1800b002c555ca3a3bls754978wrb.1.-pod-prod-gmail; Fri, 24 Feb 2023 06:24:34 -0800 (PST) X-Received: by 2002:a5d:6089:0:b0:2c5:5327:1b09 with SMTP id w9-20020a5d6089000000b002c553271b09mr14582980wrt.37.1677248674641; Fri, 24 Feb 2023 06:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677248674; cv=none; d=google.com; s=arc-20160816; b=MFkNB5NKTxfJ3t5OS6WIg47O9wh1/W7yHJEHsq+Xt4zUB/48JNEEk4/BFg1a4BdCon rGzoosK94hocEpuMh3OGDGRYbqPB2PaA1EKqhqdPqwYQ9ClTAOWDlICoz9RlowPICnFu VadLuvT7GSx3lip1A40/FmwEnLY5XUW58c640Pa79897LGE2khfgP75GjyMiZ2XsTs2U KG3G5YmnhhKRagMZy/TwM+aos2YyAuWCK0S9KkVu/2cOOP5EEvrbzlxZ64HEZCVvtCdl yMCXsSXKKQYocO8Cjm3+koJ69/4wakR9yT4WHcideqNK4yl5Ewv1zM8olBgTm2gRVuDr tCHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=10rmnVP4bBUWS8wuA87JE/OtB8iQ052yoEVx5PNJECg=; b=NOPdsqrzWWfEam47a1ifrG1H6DhT4aUx8MRFlSHFkJdct8nOB4GacP4uFbmxVLMFox ahW9fMHO9R2IFF5ya7hv8CBQM7BgALgJqPNVPXRq6SVDooHKXCFxCTUAU/DTVotyl5H3 Nlcy9iCWHLc+UFvJE8wtqHBOG+q2yOyFNoUYD1IMjDlmHVRqUaHJ06nK37fSK4kRXRAf LWUvMIBDhNQNcJ+pqtPSWL/FFCxiQC7y16SfJQ44l1nEYQCTvn2NvOlwGNT0F48dOpX9 ZjmCeFUthvkh18/h9xyIFR/AtqJqUGhafDPYUfphbt/7YOZsCns+pBFtnvganvGDvwnL dZ+Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=E3Rt5e5V; spf=pass (google.com: domain of fm-526363-2023022414243302b3d878aa720b9cdd-xy4zcg@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-526363-2023022414243302b3d878aa720b9cdd-XY4zCG@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id cc13-20020a5d5c0d000000b002c6eaaaac82si524674wrb.7.2023.02.24.06.24.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Feb 2023 06:24:34 -0800 (PST) Received-SPF: pass (google.com: domain of fm-526363-2023022414243302b3d878aa720b9cdd-xy4zcg@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 2023022414243302b3d878aa720b9cdd for ; Fri, 24 Feb 2023 15:24:34 +0100 From: Adriaan Schmidt To: isar-users@googlegroups.com Cc: Adriaan Schmidt Subject: [PATCH v3 0/4] multiarch support Date: Fri, 24 Feb 2023 15:24:28 +0100 Message-Id: <20230224142432.3767746-1-adriaan.schmidt@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-526363:519-21489:flowmailer X-Original-Sender: adriaan.schmidt@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=E3Rt5e5V; spf=pass (google.com: domain of fm-526363-2023022414243302b3d878aa720b9cdd-xy4zcg@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-526363-2023022414243302b3d878aa720b9cdd-XY4zCG@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 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 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 + 15 files changed, 174 insertions(+), 26 deletions(-) create mode 100644 meta/classes/compat.bbclass create mode 100644 meta/classes/multiarch.bbclass create mode 100644 meta/classes/native.bbclass