From patchwork Mon Feb 20 09:05:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmidt, Adriaan" X-Patchwork-Id: 2666 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 20 Feb 2023 10:05:27 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f64.google.com (mail-wr1-f64.google.com [209.85.221.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 31K95QL7001953 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Feb 2023 10:05:26 +0100 Received: by mail-wr1-f64.google.com with SMTP id bu8-20020a056000078800b002c5699ff08asf225216wrb.9; Mon, 20 Feb 2023 01:05:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676883921; cv=pass; d=google.com; s=arc-20160816; b=yVIoxZIBrwvx4Wi2DYNjIGHX5IZfOZkDh8HL7LcvWBfF+f7SrSuGqNZ4+DtVoGB3PV rI61R1/qid7GVD6Sf7lN5sJM6w2lX5IH5eGh8IvVL4f0x1kLeh9BI3Xo1FPPqE8MK61M ZyhZShMD34JTosV6PN9X54U/m83vEO15Yjnf8/rchUbSLeLW4ikL+SzX6hNRGhBlonF7 SwDXNxhRdoQQF5gVeD49ZwXVoJw5hbLq6dEbX2KrYelUBjhDayZRA2la2YpDrP95ozDj v2DGQ3prx/C3eqYCmsmYLBv1mLG90tnph8p0Ob7a0j0cHVwgHW95DwqOApd/hgHs5Vrm OixQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=EjhGV/CAoBzhOydkxZHgwxoW1BCXrJ+9zrpbWDXClyU=; b=T9whXE/ou4fBNm0jpLCNaO0zk6U2nWJQKY2AHUI3qu3SLz40ZSZHClz5HR8D48+6L2 xukhsjXfyQRsNLRjasxqSlR6z+yVZaLP7WoF/WukPTb8Li0OwJR8nE3/QSiQs+a1r0An K1xU2f8djqYgxEoOSipTJTCFRkbD6is2xOZ34k//wxwaAb6AQM18XTEfk8dumWcxStfM UMsCBQTGzNiR20QmACU4BaWEHRdh6UAMc0x3QUZn4bbCbPR2Z6zYl9iVcYgmefWuA6e4 7I4ocAFhYkXbO7m0kUKSRJAB+6w6k/mGcQSFDy13WeMO1Lc2609lSvTzkZTz2No7bZXF WoDA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=O5i6kVHV; spf=pass (google.com: domain of fm-526363-2023022009051950342896cd3236b62b-eamtnh@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-526363-2023022009051950342896cd3236b62b-eAMTNh@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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=EjhGV/CAoBzhOydkxZHgwxoW1BCXrJ+9zrpbWDXClyU=; b=UnkC6k5mDsFekRSg0dZIkO7+lLHLSuOe6i9/WrrO8svNswuWsTsRoV2tEUFT3GD5vp y7acg5jIv32EkWW5xAs6nLlX3YSqhZdKVdS6nhNNYovP+1A552S4xnhozFG6gQB70HsP IgMNmsMxXRVLl5Tko3sJYjmexspGV9NmCJogyaRnxuP0SrSC9d1Dbcb90pEJal128tF1 P4DI1QTSmc9ddwMFvc2Ndbk7Bgv07t2/uLeT4ogmlS5mqRAY1IKSFP8hjpfO6c1I6sKT qbLVoe4hhKZzYfi7JSJxHwSWHAHWpx9EwCXRjHX5wK0yLzw4pimYgEJRhh0hPLX84CQv lw7w== 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:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=EjhGV/CAoBzhOydkxZHgwxoW1BCXrJ+9zrpbWDXClyU=; b=urasZ+6K/MjeXH8/0FyaLXDrjJyox/50/dzINIx7x7oNQivqajREagIBjuA/isTEmg /nx/vrCU228x8r4tQtDd5OhChFBAfQp6a0XPVWtVK0Tnqsz4LTok6RoVwwifSQctOcxn /y7346MZBkC7mUndPCAY30Js+/gLJQyphgGok291s8k2TJvKiP7D/5nUGBK4YBV2bera Go4dzZD68gop1O7SvXpktWvMYJoEmRGIaogtMFaX5sJmzYJYVBj9x1vYZ3ieq8YYejIG SaYq0TC4k3VSeadYuj3WdVanpJPZgBfWI5waGWHUwXGsNxlqQEUftexAfnCfRtP0Y/xj ancQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AO0yUKWCJaEnAp5fgSvog2GEdQdHBKGn1IuCIJLNMArf17hbkX6vZLiI g5vDyISCcgDesYNF310fWkU= X-Google-Smtp-Source: AK7set+z3HkxJXqDilvl5MANQ/L3CDeP2QpUsFudqsXD+7vjUUeE/t5rzodtppZymP0VF4udLvwSfg== X-Received: by 2002:a5d:4591:0:b0:2c5:5dcf:c0be with SMTP id p17-20020a5d4591000000b002c55dcfc0bemr96561wrq.503.1676883921281; Mon, 20 Feb 2023 01:05:21 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6000:1786:b0:2c5:55ca:3a3b with SMTP id e6-20020a056000178600b002c555ca3a3bls43489wrg.1.-pod-prod-gmail; Mon, 20 Feb 2023 01:05:19 -0800 (PST) X-Received: by 2002:adf:f3ce:0:b0:2c6:8dfd:d2bd with SMTP id g14-20020adff3ce000000b002c68dfdd2bdmr1478494wrp.15.1676883919824; Mon, 20 Feb 2023 01:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676883919; cv=none; d=google.com; s=arc-20160816; b=CpQJpv8UqIU7VXp1Nhl/RHNhTNhtpHKwov1f4epKP5cyMIF8si7l3Kixh2z6kfr1+5 J22nvf3EYVAAFlXB59LgAlP87UytRJW2ASLHjNKKT43epQOUlveqHd8KFKEpPAhq8yJg CnrYMuASPEkZNF3wF8FXMvf7fc89tKTmTtFmlO0lNqk6riF+t1R9ZSXVpET6Wuklhjfy +siGMDhwVnoetN+Omm9rGtn3S4iZ+TYzySFqrP8AWvZm3K3enoFdD+mDSdzCvIx6NiHc +8EZssh65JtbYG3u4nYfyN/QLdbKBSMSkOM3l+M8PrQLCV8hBFsbjV9y0Yt3Asty0YDt gjuw== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=RrISQiMduWPr7jRzTH1o0MF0c3YYBd/vYe/WIxNsfcw=; b=Lf0wlEOPvFHhVC5pAaPci6cr9wwTXyKl95WlY60pQSHJC39/5eFrB0+rZBXMdKn622 mGh0fNfmFTwr2I0+RSGiqx4fYXup9Pi+W33FpeswnIWUjoeN4xsktrtcJgxDcpFz0afJ w3e4jvl0J95/e+tQK+HGzX1FyRLzcy1JVRqerf3/5BbAQPXca/aDOnamFvPu3vZ/UwuK MtacxR/INpBPbE8H5vsbKp85DVpQ06ZSje5D9z48784P70UA1DPMJQN8W6Jlqnfonu4j ejnLtp+t09o59KzXK1m6kJQlECkVPdZdsaMZp2oZCOI6vcUTZ6D++HUenGEdmgPv1Gbu Sq1w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=O5i6kVHV; spf=pass (google.com: domain of fm-526363-2023022009051950342896cd3236b62b-eamtnh@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-526363-2023022009051950342896cd3236b62b-eAMTNh@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id bu26-20020a056000079a00b002c56aba93edsi14071wrb.4.2023.02.20.01.05.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2023 01:05:19 -0800 (PST) Received-SPF: pass (google.com: domain of fm-526363-2023022009051950342896cd3236b62b-eamtnh@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 2023022009051950342896cd3236b62b for ; Mon, 20 Feb 2023 10:05:19 +0100 From: Adriaan Schmidt To: isar-users@googlegroups.com Cc: Adriaan Schmidt Subject: [PATCH v2 3/4] remove obsolete compat-arch override Date: Mon, 20 Feb 2023 10:05:10 +0100 Message-Id: <20230220090511.2524881-4-adriaan.schmidt@siemens.com> In-Reply-To: <20230220090511.2524881-1-adriaan.schmidt@siemens.com> References: <20230220090511.2524881-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=O5i6kVHV; spf=pass (google.com: domain of fm-526363-2023022009051950342896cd3236b62b-eamtnh@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-526363-2023022009051950342896cd3236b62b-eAMTNh@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,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?= The compat-arch override is no longer needed, as PACKAGE_ARCH is controlled by DEPENDing on -compat. Also change the compat test: adding the compat package now happens via IMAGE_INSTALL in the config. Signed-off-by: Adriaan Schmidt --- meta-isar/recipes-app/hello-isar/hello-isar.bb | 3 --- meta-isar/recipes-app/libhello/libhello.bb | 3 --- meta/classes/multiarch.bbclass | 11 +++++++++++ meta/conf/bitbake.conf | 3 +-- .../recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 ++ .../sbuild-chroot/sbuild-chroot.inc | 14 ++++++++------ testsuite/cibuilder.py | 2 ++ 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/meta-isar/recipes-app/hello-isar/hello-isar.bb b/meta-isar/recipes-app/hello-isar/hello-isar.bb index 39ddecb9..7d9f8322 100644 --- a/meta-isar/recipes-app/hello-isar/hello-isar.bb +++ b/meta-isar/recipes-app/hello-isar/hello-isar.bb @@ -20,7 +20,4 @@ SRC_URI = " \ file://yet-another-change.txt;apply=yes;striplevel=0" SRCREV = "a18c14cc11ce6b003f3469e89223cffb4016861d" -# NOTE: This is just to test 32-bit building on 64-bit archs. -PACKAGE_ARCH:compat-arch = "${COMPAT_DISTRO_ARCH}" - inherit dpkg diff --git a/meta-isar/recipes-app/libhello/libhello.bb b/meta-isar/recipes-app/libhello/libhello.bb index 3770fdb4..8b10842f 100644 --- a/meta-isar/recipes-app/libhello/libhello.bb +++ b/meta-isar/recipes-app/libhello/libhello.bb @@ -13,7 +13,4 @@ PV = "0.1-98f2e41" SRC_URI = "git://github.com/ilbers/libhello.git;protocol=https;branch=master;destsuffix=${P}" SRCREV = "98f2e41e7d05ab8d19b0c5d160b104b725c8fd93" -# NOTE: This is just to test 32-bit building on 64-bit archs. -PACKAGE_ARCH:compat-arch = "${COMPAT_DISTRO_ARCH}" - inherit dpkg diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass index 09aaff52..791f8e0d 100644 --- a/meta/classes/multiarch.bbclass +++ b/meta/classes/multiarch.bbclass @@ -7,6 +7,15 @@ BBCLASSEXTEND += "native compat" BPN = "${PN}" python multiarch_virtclass_handler() { + # In compat/native builds, ${PN} includes the -compat/-native suffix, + # so recipe-writers need to be careful when using it. Most of the time, + # they probably want to use ${BPN}, and in general, it's their responsibility + # to do so. If they don't, then it's ok for the build of the compat/native + # variant to fail. However, some variables are evaluated at parse time, + # and this will break the recipe even when compat/native is not requested. + # e.g., SRC_URI="file://${PN}" will try to checksum the local file at + # parse time, and parsing always happens for all build variants. So in those + # few variables, we automatically replace ${PN} with ${BPN}. def fixup_pn_in_vars(d): vars = 'SRC_URI FILESPATH'.split() for var in vars: @@ -14,6 +23,8 @@ python multiarch_virtclass_handler() { if v is not None: d.setVar(var, v.replace('${PN}', '${BPN}')) + # When building compat/native, the corresponding suffix needs to be + # propagated to all bitbake dependency definitions. def fixup_depends(suffix, d): vars = 'PROVIDES RPROVIDES DEPENDS RDEPENDS'.split() for var in vars: diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index dd21319a..0c79a5b6 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -67,9 +67,8 @@ KERNEL_FILE:mipsel ?= "vmlinux" KERNEL_FILE:riscv64 ?= "vmlinux" KERNEL_FILE:arm64 ?= "vmlinux" -OVERRIDES = "${PACKAGE_ARCH}:${COMPAT_OVERRIDE}:${MACHINE}:${DISTRO}:${BASE_DISTRO_CODENAME}:forcevariable" +OVERRIDES = "${PACKAGE_ARCH}:${MACHINE}:${DISTRO}:${BASE_DISTRO_CODENAME}:forcevariable" FILESOVERRIDES = "${PACKAGE_ARCH}:${MACHINE}" -COMPAT_OVERRIDE = "${@'compat-arch' if d.getVar('ISAR_ENABLE_COMPAT_ARCH') == '1' else ''}" # Setting default QEMU_ARCH variables for different DISTRO_ARCH: QEMU_ARCH:amd64 = "x86_64" diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 99d75e21..21a2d92f 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -274,6 +274,8 @@ do_bootstrap[dirs] = "${DEPLOY_DIR_BOOTSTRAP}" do_bootstrap[depends] = "base-apt:do_cache isar-apt:do_cache_config" do_bootstrap[network] = "${TASK_USE_NETWORK_AND_SUDO}" +inherit compat + do_bootstrap() { if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then if [ -z "${COMPAT_DISTRO_ARCH}" ]; then diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc index fb061dac..fd8bb648 100644 --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260 PV = "1.0" inherit rootfs +inherit compat python() { distro_gcc = d.getVar('DISTRO_GCC') @@ -20,18 +21,19 @@ python() { d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON', ' libstdc++-{}-dev:{}'.format(distro_gcc, distro_arch)) - if d.getVar('ISAR_ENABLE_COMPAT_ARCH') == '1': - compat_arch = d.getVar('COMPAT_DISTRO_ARCH') + if d.getVar('ISAR_ENABLE_COMPAT_ARCH') == '1': + compat_arch = d.getVar('COMPAT_DISTRO_ARCH') + d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL', + ' libc6-dev:{}'.format(compat_arch)) + d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL', + ' crossbuild-essential-{}'.format(compat_arch)) + if d.getVar('DISTRO_GCC'): d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL', ' libgcc-{}-dev:{}'.format(distro_gcc, compat_arch)) d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL', ' libstdc++-{}-dev:{}'.format(distro_gcc, compat_arch)) } -SBUILD_CHROOT_COMPAT_PREINSTALL:compat-arch = " \ - libc6-dev:${COMPAT_DISTRO_ARCH} \ - crossbuild-essential-${COMPAT_DISTRO_ARCH}" - SBUILD_CHROOT_PREINSTALL_COMMON = " \ ${SBUILD_CHROOT_COMPAT_PREINSTALL} \ libc6-dev:${DISTRO_ARCH} \ diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index 72522f4d..f0ea2702 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -96,7 +96,9 @@ class CIBuilder(Test): with open(self.build_dir + '/conf/ci_build.conf', 'w') as f: if compat_arch: f.write('ISAR_ENABLE_COMPAT_ARCH:amd64 = "1"\n') + f.write('IMAGE_INSTALL:append:amd64 = " hello-isar-compat"\n') f.write('ISAR_ENABLE_COMPAT_ARCH:arm64 = "1"\n') + f.write('IMAGE_INSTALL:append:arm64 = " hello-isar-compat"\n') f.write('IMAGE_INSTALL += "kselftest"\n') if cross: f.write('ISAR_CROSS_COMPILE = "1"\n')