From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7189683592595767296 X-Received: by 2002:a05:6512:1086:b0:4cc:53bf:d5f4 with SMTP id j6-20020a056512108600b004cc53bfd5f4mr362642lfg.600.1674022182266; Tue, 17 Jan 2023 22:09:42 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:3681:b0:4d1:8575:2d31 with SMTP id d1-20020a056512368100b004d185752d31ls4612452lfs.0.-pod-prod-gmail; Tue, 17 Jan 2023 22:09:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuUmtpCAG+AouwgGQkyN2V5AGUPNUuSffrvyOEM3+3XKMFwAywKwezidBfjBNjQ+hQolOhQ X-Received: by 2002:a19:6b04:0:b0:4b5:b7a7:ebf1 with SMTP id d4-20020a196b04000000b004b5b7a7ebf1mr1342972lfa.12.1674022180636; Tue, 17 Jan 2023 22:09:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674022180; cv=pass; d=google.com; s=arc-20160816; b=y9VvtmAfcHxDY38gxJR8ApruZXHmZ4bRU9qrFajWYgqV33UnXc5P+/82gtsiuwiJgN cWxCAbJ+3bjioLeDKVTtelgZosHb6TkrCVpGhlQzOFMyRRqDBkqqgqVXmnt20ZcMIzBP zF9TqwveWgSt56nm2wK0czQqBrItMCBbEw82Pvzx3+oIIanvwbCzQ4bUMQfro/OCutcM aFkyyyWXRjX2c6c6ch5XxwmDWLMXLi5pdSs56CtZX9WFm0A+ZTCANzfUV5esMpbAFiwo Q9aUy0yS+zFA4F3sWHsKWyGZwg241K6xIDpCU46OpMfAGCQA9hz7/TlKIZuarLnGtNFm g3Qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:in-reply-to:from:references :to:content-language:subject:user-agent:date:message-id :dkim-signature; bh=DD2McFbukGCL2mO0L/qTWBMiiJgLLdpi5SERBJFsiCI=; b=AnpgcEBP1hLYOXC5mMILoIMudmOhbqDd+s5xo5qNPapOdSjC6tMVb5I3F8UdM3EX5K AW7vClkhQR8hhD6cne+XeHmS3yw73OkDzZmVEedtWYPrGUS3xQxiDyvVoucexqtN1K7f MXQ6I49I42AcYTGVpF2+MvV1DRCZZ8Oyd/2ql1gcYfpVBza/RZjdN5yx0G+mpC6oPZ6A 52yhMbw6paPSrm5CcMtt5rGYvH44YsJBpuUu/VVemzgYJzWZUNjEB5z8KJfzVEkqlQsj fKkTlysHT8tudwL1GBDcEJqEkTfSVpbXdJi+wT+Fa9Rj7ymLmGVt9HnOsfKJAUrUoXil JVew== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="tnI/XzmS"; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 40.107.7.57 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2057.outbound.protection.outlook.com. [40.107.7.57]) by gmr-mx.google.com with ESMTPS id c5-20020a056512324500b004b069b33a43si1437452lfr.3.2023.01.17.22.09.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2023 22:09:40 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 40.107.7.57 as permitted sender) client-ip=40.107.7.57; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="tnI/XzmS"; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 40.107.7.57 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pywtfq1kfjhzHCPPpovoV9rs3coVdyb5Lpccsa04IzmAlef+GAYPDyD6CDYoFWqTdiJ78iZC+xp2fGUho02k51zCLZJstrK7zALd3Ns1hKJ8ViMrEkuwLi5zNxtD+5hejP2JGxVRy4e7ZsKG/IpLekkBJKlMxXEOtmgtEn8VZQOWnoCWICsD8nBNVu+nngIwera4XHZf2SY/QPRO0p2BRwTxfYUgicnrM4+/0iUmc2uMANvu0X1v1aNkdcp1xLGY6a9/JC+ogiPx6UilotiJwd/TX7JsPjeMbFXMYrdNha7/Wfx/TV/Lfs2XpaNiNZT3B0lTTHzR59C+UAxcHJEWrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DD2McFbukGCL2mO0L/qTWBMiiJgLLdpi5SERBJFsiCI=; b=Ms93brD6//xxWQ7r55ys8rQUKVnIta3KWmkOefZONFYBLo/r8lRPFWQnjxnVhbx9dPTdLPe7AFTRAjKFYpjgtoLdL5ek9VQfprjQE+/SXTSuIP8Ax4NzSGD9SkDPmTkVRrZ29NT5O9IMbLRkUsvPvx2E3jkq/G/hJGc0+GcoXWS2tGFb50oGkVvL3Y4Y0s41KP75MBvF35tZ4rRHIlQdlh43ldbHVm4+5kX95Tyb+Yidpd4hRrAjrMQ3U3iZn+d7VeP3jUgHjR2uipA1w9Nw55tcIpaS/oRrbAf65BxJxCZUCxepN5NUPxvuyWmdHiQPoJZnMxyB+Xgf3TF+MkjXLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DD2McFbukGCL2mO0L/qTWBMiiJgLLdpi5SERBJFsiCI=; b=tnI/XzmSzp18clbClYIt9IH1rNKSiKmr3WjBNzcoLxGXNZKAcdQxwraQNZCk/nB1+xSje4DpdCcXHsQNnA7x7QU1DKmOymOa3oaePil0NzLq8iwU/qU21HVMX+G25FUlHQpzkyikbLbgx3BTyWGAdpBuD8nrk6oQ2x5XTtVafaV5gJdltVezcgCTXdZ45T/bWblVxxRtLd6V61jXX4j0MMAHb3+agXUSTJYuuRwENPoNzu7EdlIHDiS7ONeButPz/0qvVyI4hA9jTOuqoD47t/CS1h91NXr3VzMR+iLYq9Zs/uBb0mJN1KUjTFU/TKjYSbT43m/J1QnNFePzCPV+kA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by AS8PR10MB5950.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:529::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Wed, 18 Jan 2023 06:09:37 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::784b:e95b:b855:dcc5]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::784b:e95b:b855:dcc5%7]) with mapi id 15.20.5986.019; Wed, 18 Jan 2023 06:09:37 +0000 Message-ID: <86b3e3fb-9b80-1a36-f30c-c25f15da71ab@siemens.com> Date: Wed, 18 Jan 2023 07:09:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RFC PATCH] native.bbclass Content-Language: en-US To: Adriaan Schmidt , isar-users@googlegroups.com, "Koch, Stefan" References: <20230117180358.1499566-1-adriaan.schmidt@siemens.com> From: Jan Kiszka In-Reply-To: <20230117180358.1499566-1-adriaan.schmidt@siemens.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0175.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a0::12) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) Return-Path: jan.kiszka@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|AS8PR10MB5950:EE_ X-MS-Office365-Filtering-Correlation-Id: 9387ec18-7897-422f-2145-08daf91a9404 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PINT3Y9orlqCjfEyrUVYXSI/TAsaNKqmLA4VYDO+U1nWa7b8s966ZxkYEFSpgDBz6ezyhLcyR0diR12t3mZgvkl2vgpYHlXT5hHvjTcziY0c/Pr2Y57VRFx8lj9dcFREDiQgFoi4EumtbA3OYc/wDVdLOlg+S3G/aFQnqFkLZX39AA5+tfYkOojmScF94rHyg0sxfoAi7aSeBvkpC0czanZ7mcs1eUogVnij0MyiSYr+ETs11dieoOXmqhdoMmveJ3CqSey+zUBAJVmVT3K0mbi+reo2E9aR9EvYMrrD7WlcAaxLdp9POGFPVXavn45pZbmMZaxE8RgeIxoNzyMiOgLaemciCTXS1INJLxpU8XXCLoqOHqVR0GYJR2ZVO2C844/5OQD6fjItjbrMBoVkeABKoPpgXagiVObsm/fYNqZcCbnD9yPzBsFC/yBN91ulHn5xUEM4rV4N1M+kNdhFeNl/qQ0A/pejLPCo+e7DpLeIyC7ewH+dtZlJ6csDyd4LKf8tMgCA31tq5Tpwy5krpggutb4ziFtjSLi8yv8IKZGwLP3AnD8p28mc/znqC7qrU+D0czQpJrOFA1iN711jxn17er68l6WMCvM/Nvybpk+lTHr2TvrAifZ+Zm2Je4mbKkUdTJWwpFkVflpvhAozMRP6Z+SSEtPhvozP/xr9NFtBIEPX82UUXAlmQMziu8DX7h0zDxXlODQIf+H5alBeS9CxBnXavE7JIY1lXYKeMq4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(136003)(39860400002)(366004)(396003)(451199015)(36756003)(31696002)(86362001)(2616005)(66476007)(66946007)(8676002)(41300700001)(26005)(6512007)(66556008)(186003)(83380400001)(316002)(6506007)(110136005)(6636002)(478600001)(44832011)(2906002)(6486002)(38100700002)(82960400001)(8936002)(53546011)(5660300002)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dUMrTDUvcUx2WVFvNjlRY29kb1Bmb29vVStlWXpraVp2WERBTXV4T3ZUd3RB?= =?utf-8?B?LzUrdVNNTERTbi9SVzJBTWNSTk81STJjanFEdFJXemcyM2ZxY3dGMnJaMzZl?= =?utf-8?B?cG44enYydEYzbVZTRUtYN0xOZjVyRmh0WTBzQlpOQUxsWFBEVmVEcDFrR1BU?= =?utf-8?B?d0dlbHU2eHNtbWpORmF4UUJpWTYvb2JTak9DTFNGbTlkSGdhNEN0dEEzQ0hH?= =?utf-8?B?SFFuNzJnOVNReUdFbkdoNWZra2Y3N0JTZFd5ajJjeDJVcitkb0xxTE1KaTFP?= =?utf-8?B?RTF0ZmFCWFhGN2M0RlVnWWxJV1grZmc2RFQ0V00xL2FSVS9nTGRSSGt3a05G?= =?utf-8?B?NWlPTlR1K0tEeGtvVU10R2lPdTF2L01nY0lyWTZvVVVmNHRhNlBmMnVyMGlt?= =?utf-8?B?emp3Vyt2dTNiN0o5eXJ2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message-Id: 9387ec18-7897-422f-2145-08daf91a9404 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 06:09:37.5673 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1TQIIJOrGwD5Sh1RNL5SlQ4mnLMFTWQME319ck/uBM8rOqhKMnxH4/iNfk5ViEzhR/hRqVodietv8T3LPMfeCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB5950 X-TUID: LslffBuaoM68 On 17.01.23 19:03, Adriaan Schmidt wrote: > Hi all, > > as mentioned by Jan, I have another approach of building native/host/compat > arch packages, inspired by OE's native class. > > The way it works is: > - A recipe can inherit native.bbclass (or, if we like we could even add it > to all recipes via the dpkg class). I think we should not start spreading these inherits across random recipes when there are no costs and risks (as I believe) in adding that to dpkg directly, likely even dpkg-base. > - For recipes that inherit native.bbclass, bitbake generates a new bitbake > target with suffix `-native`. Recipes can DEPEND on those `-native` packages. > My use case that made me develop this is goreleaser, a build tool > for which I have a bitbake recipe. If I want to crosscompile, I need it > for the host architecture. By DEPENDing on `goreleaser-native`, I can > then add `goreleaser:native` to the build dependencies in my control file > (the `:native` makes dpkg-buildpackage choose the right architecture). > - When building the recipe, the only change is that we set PACKAGE_ARCH=HOST_ARCH. > In addition we have the override `class-native`, which is set when building > the native variant of the recipe and lets us make conditional changes to > what is built. So, if I decide to pre-populate an image with libfoo not only for the target arch but maybe also others (thinking of compat here), I would have to do IMAGE_INSTALL += "meta-package" and meta-package would have DEBIAN_DEPENDS += "libfoo, libfoo:${COMPAT_DISTRO_ARCH}" DEPENDS += "libfoo libfoo-compat" Unless we find a way to teach IMAGE_INSTALL resolving "...:" into the right -native/-compat DEPENDS. Obviously simpler is to have some 32-bit-only legacy app that states PACKAGE_ARCH = "${COMPAT_DISTRO_ARCH}" DEBIAN_DEPENDS = "libfoo:${COMPAT_DISTRO_ARCH}" DEPENDS = "libfoo-compat" libfoo itself would no longer have to worry about becoming compat as well. > > Some caveats/notes: > - Both "normal" target arch and `-native` builds generate ARCH=all packages > and source packages. So there is potential duplication. In theory those > packages should be identical, but we currently don't have any way of knowing. > This is in part due to using shared isar-apt to transfer packages between > jobs, where the last job to push a package always wins. > My earlier RFC on removing (that use of) isar-apt and explicitly > transferring dependent packages might help here. In that case we have full > control of what packages are provided, and can detect such duplicates. We have a second duplication issue, and that is around the debian source package. Again, all targets should normally generate a bit-identical version of that so that only identical versions will be found when collecting them for potential redistribution. I was assuming Isar would already build a deb-src repo for isar-apt, but it this feature seems to be missing. Once we add it, the topic above will become relevant for it as well. > - I'm changing the default overrides to include PACKAGE_ARCH instead of > DISTRO_ARCH. Maybe this is how it always should have been? > - This is currently only for "native", but I think we can simply duplicate > the pattern to also support compat arch packages. This should be done in the same run, we already need it as urgently as -native. > - Using PN in recipes can become tricky. For example, I sometimes see the > pattern of setting SRC_URI="git://github.com/${PN}/${PN}.git". > This would break when building the native variant, as this will then > have a different PN. Personally, I don't think this is a big problem. > Using ${PN} in SRC_URI may not be a good idea anyways, and if we really > need a variable, there is BPN, which does not have the -native suffix. I agree. > - We currently don't have a use case for this in meta-isar. But maybe we > can come up with a good example. Typical use cases are self-built build tools for other self-built packages. Or cleaning up the kbuild issue that also Stefan Koch was working on. In fact, kbuild is an existing in-tree -native use case that we hacked so far to generate only -native packages. When converting that, we could add a test case that uses the to-be-generated kbuild:target package on the generated image, e.g. to install a dkms kernel module live. Jan > > I'd like to try if this approach works for the other use cases we have. > > Adriaan > > PS: If you'd like some more examples of the BBCLASSEXTEND feature, have > a look at the SDK generation, which has been refactored in that way. > > --- > meta/classes/native.bbclass | 13 +++++++++++++ > meta/conf/bitbake.conf | 5 +++-- > 2 files changed, 16 insertions(+), 2 deletions(-) > create mode 100644 meta/classes/native.bbclass > > diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass > new file mode 100644 > index 00000000..896c8a06 > --- /dev/null > +++ b/meta/classes/native.bbclass > @@ -0,0 +1,13 @@ > +BBCLASSEXTEND = "native" > +BPN = "${PN}" > + > +python native_virtclass_handler() { > + pn = e.data.getVar('PN') > + if pn.endswith('-native'): > + e.data.setVar('BPN', pn[:-len('-native')]) > + e.data.appendVar('OVERRIDES', ':class-native') > +} > +addhandler native_virtclass_handler > +native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" > + > +PACKAGE_ARCH_class-native = "${HOST_ARCH}" > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf > index 98412e02..ef962fc7 100644 > --- a/meta/conf/bitbake.conf > +++ b/meta/conf/bitbake.conf > @@ -67,8 +67,8 @@ KERNEL_FILE_mipsel ?= "vmlinux" > KERNEL_FILE_riscv64 ?= "vmlinux" > KERNEL_FILE_arm64 ?= "vmlinux" > > -OVERRIDES = "${DISTRO_ARCH}:${COMPAT_OVERRIDE}:${MACHINE}:${DISTRO}:${BASE_DISTRO_CODENAME}:forcevariable" > -FILESOVERRIDES = "${DISTRO_ARCH}:${MACHINE}" > +OVERRIDES = "${PACKAGE_ARCH}:${COMPAT_OVERRIDE}:${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: > @@ -81,6 +81,7 @@ QEMU_ARCH_riscv64 = "riscv64" > > # Codename of the repository created by the caching class > DEBDISTRONAME ?= "isar" > +NATIVELSBSTRING ?= "isarnative" > > # Strings used in sstate signature files > TARGET_VENDOR = "" -- Siemens AG, Technology Competence Center Embedded Linux