From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 19 Sep 2025 09:16:08 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f192.google.com (mail-lj1-f192.google.com [209.85.208.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 58J7G5A1002922 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 19 Sep 2025 09:16:05 +0200 Received: by mail-lj1-f192.google.com with SMTP id 38308e7fff4ca-3365be0c13asf6127961fa.1 for ; Fri, 19 Sep 2025 00:16:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1758266159; cv=pass; d=google.com; s=arc-20240605; b=PWGom1GXWwHxOAPzHAzx8Yr0NtizMnTyMaJMIqOhwyKjfTby1wPJpcIMBuGR4g6nj0 2Hhfg9t6PHXroBPHF4weH2P0PpDbRSujhz8PvH6RmrXcee++b5E/ElB5h4jdVutxRPvF PwkqFika0HQcLw/R7ye67iu5T3jiAATcYBr1AvuiFn7EaH6KQxGwD6TCMhfv9EosVVa1 dgrlSwDLiTee11tzkdyPhGBpmCH9vsD0/+24V1hJlC+lhZZHhKCtMGW1D9m4L4B85Dag 8oB/s+QVm7OmmtUxc0jG6unu+Bvid7dEL4V/P8RmLsIS5S/VA5u9EB28R4Obij8fpmdK rQaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:content-language :references:to:subject:from:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=2Be57C4c9hFDyD+tedM9NSyg34Q71/Huaj+n2/1Ob48=; fh=OQKsk7Jm+GO3p7dVEfajNNGlyvmHcVYABATHfrpf+E0=; b=VoX6xxHPQNq5GKS1gT4FL/ItcHIoNMmIAZgTm+HuL1AZz4Vhx2QJPkOWzDyNpqmMdL BTJCc/azKgQQfjmIBLJWyOW9esyqizINmhQ0KsFALTu5xoWzNBO8ZlCTKieYYaq1OyEi kH5TrFaeWH5y6vTEVcM//QoJ54kq1IO3NdtPdq3VzuydWFbqYb/IuzNBzOy78Vr4qDoV X0raGPiVczcIrqTnGyKgfNCYWcoZirPsWDk7Xevht35Y8gyr6mrBLW6cQVLaRMe0zh4f 7gkZZVXuMj5PVoG0JtzfFue6bRWcmwP4cIgBdjewcKTeTnOcqj3weTidfRYJ3SbnyDg1 rtEg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1758266159; x=1758870959; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:in-reply-to:content-language:references:to :subject:from:user-agent:mime-version:date:message-id:sender:from:to :cc:subject:date:message-id:reply-to; bh=2Be57C4c9hFDyD+tedM9NSyg34Q71/Huaj+n2/1Ob48=; b=vDNtY1XWb5/NlR0ZmPs58B3p+J9D6Cp5VFHD1YPNSvoUitQZfCQO9GkuzEgUPWs93/ y6hycRXOpI5v/tkXQwjJMJouBTwjNeRDa6Ec3cdfYB299XclI71VebBdUlokqDfalW28 P5Kh4aZ94m8j1azQAkE9HRdmPgLpio5CsRb8y4EPzH1YTKG+NCC44PbFcs2gI/JJzf0Q rOTmzm9x2H0cFp/IRV42d8k6/gc6SDoYFB5ZtcJrNuP6GL87sSkvjnV6zRpcM18Ot+v7 Nh0nUtZr0ziw792PxS+pD+iaDQ55DWFTkgAYzbjqxObNMbmeWF5HanGwsJ83PPF37MN1 jxfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758266159; x=1758870959; 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:in-reply-to :content-language:references:to:subject:from:user-agent:mime-version :date:message-id:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=2Be57C4c9hFDyD+tedM9NSyg34Q71/Huaj+n2/1Ob48=; b=V5F5/cCEcMHVHKvrZxeTsgav73uYQXk7khbqn3Q3yjhNE2BhBYYsi1xl13/Et5Z3wL 9jRSlAGO5tFBGOTyOh42z25QaJC8YZXOyiBZFgkkhq0W8h57wK7v7WKx4iVEI0l29KVo Cx4E3UPju1FMTBuSwQLY1FfnIDnOx7X50tuPVPubHqH381KDH++JbHKqlqiw/93YPwBc SigSZSKbrTBUsfUfO3ubXc5G9kWOgGJycOL5EFnBrA9uuyPfZzb7hWYj5CesESdp39uY AEK8z7zQ7zOhwQVdFzT/GKvck23/DrLHL1b20yTv0VegRjq91mvuMcwRZSVTDfPZUl+T zjvg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUOX3TeZDFJfW9NJsdRk+b+mnLHvNdJsfEUIS/Oo1pRCXI4UTzBZv30XGFC0DIsrf3VRlLI@ilbers.de X-Gm-Message-State: AOJu0Yxrj4FggJjhPm4AQ3B0SIWZweqFrkvJbo7Pwn5N8zG+eVBruR9M oP5pcE8VNAEnY7GH0ZLF0TfwN1FhsEZQ//qJF72+oKbKo4Uzsig43MFi X-Google-Smtp-Source: AGHT+IGblqroP8ab9TTqFTV32t0xoQJZxwG2ETFbyZRXNizbSDD58tEorMr/w382hnASeSXEQr0QpA== X-Received: by 2002:a2e:a99d:0:b0:364:7561:d78f with SMTP id 38308e7fff4ca-3647561e25fmr4554771fa.15.1758266158821; Fri, 19 Sep 2025 00:15:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARHlJd5fbQABaDIpt1u/hHuftxs8axPdLQfZKFO8ZFBmNLD8eQ== Received: by 2002:a2e:a37b:0:b0:335:7e09:e3da with SMTP id 38308e7fff4ca-361ca3d87bfls4171141fa.2.-pod-prod-04-eu; Fri, 19 Sep 2025 00:15:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUp4SguroWeGVMcdrbXlryW/1K34PsPQRJyx+n4B/7zWepW+OLZzTONCAkQYeS9QgafJc3nUeyCYM/f@googlegroups.com X-Received: by 2002:a05:651c:1116:20b0:336:72be:3339 with SMTP id 38308e7fff4ca-3641784ccd6mr6522011fa.28.1758266155657; Fri, 19 Sep 2025 00:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1758266155; cv=none; d=google.com; s=arc-20240605; b=EJqsszoBGq8OCxc41GWVgIapb3x6IdnATnev30x+W1MMjWPtDRWyfQruMGfuJxu8CG 8ZNFPqDp6rx3UqPt4OG0tjOez8kFhzXRF28giURQEFrBXVv8VCKexV00UMbauarv+iLk gCjbnBJbMLYNv/hWiVL0DPmM7LGkXweY0HHoHr5xTvkXjcvOUmlWgV+uCUQv/acHED40 dLUlvCNVDFdiuBOYO04uagwXRyVww3CW6ZO1pRWmgTeQP/lRZFuw56SPYeXg5TUDc596 aMZ6r5gehuOJlhSdcXPeK0VImcI/sDKIQU4eSMwLPP4+6pen2AQ1mGyauU0yAoRThpzT h+DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:from:user-agent:mime-version:date:message-id; bh=7E2tfEGvz/LrjJ0azleZr7dTme/2m82EaFfptvdx6BQ=; fh=kbVlvp6y7JHUFOd1DoPQH8vydo1R/5QMHlXWmLKeUMY=; b=JWK7XoEujYWtypiUAnmd0mXKnnyxq5D6rWvzWyoejc+ibDxsmIM6Duwgeq9ul1OP3w 2smNDWmePLzoAlbXhpBZVqG7CSG2NYD8SXSfqogalRwDBVTo2688j+F2WiTHo5moLyC7 ALxL3gnutcjnSx8ICpr3np6xwl+2m6OMyeSjzD9fleqvvNqDwUbr19erLAW4ZYzLinj6 kv4eOkLxi6SOkyTnVhyhPkB1PDcjdm5f115HIXBM/nvdsdxNRPxyIWmJ2W0OjUKNDkue gKcjFD0JT7y79W8ckrTLvWPZmKUQIywTSXgQgtU2jTnO0CKBkwaqala1qCnVIhdfP0Sp NxrQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com Received: from mx1.emlix.com (mx1.emlix.com. [178.63.209.131]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-361a7cfde68si770851fa.8.2025.09.19.00.15.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Sep 2025 00:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) client-ip=178.63.209.131; Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id D32D05F8CC; Fri, 19 Sep 2025 09:15:54 +0200 (CEST) Message-ID: <45ecefef-bbc3-4506-b9b3-c945d0d77e65@emlix.com> Date: Fri, 19 Sep 2025 09:15:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Andreas Naumann Subject: Re: [PATCH 2/2] handle DPKG_ARCH=all case for transitive deps To: "MOESSBAUER, Felix" , "isar-users@googlegroups.com" , Jan Kiszka , "Steiger, Christoph" References: <20250820124140.281190-1-felix.moessbauer@siemens.com> <20250820124140.281190-3-felix.moessbauer@siemens.com> <05c06d5d-5248-4d56-b470-a096411b2844@emlix.com> <9af00c922ab12ee5961d377babb3a87f49efac6c.camel@siemens.com> Content-Language: en-US In-Reply-To: <9af00c922ab12ee5961d377babb3a87f49efac6c.camel@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Original-Sender: anaumann@emlix.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.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=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,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-TUID: IPZQlXz4NtJe Hi Felix, all Am 16.09.25 um 09:16 schrieb MOESSBAUER, Felix: > On Mon, 2025-09-15 at 19:49 +0200, Andreas Naumann wrote: >> Hi Felix, >> >> Am 20.08.25 um 14:41 schrieb 'Felix Moessbauer' via isar-users: >>> Arch=all packages might build depend on other arch=all packages, hence we >>> need to correctly model the dependency chain. Otherwise the transitive >>> dependencies are built for the distro arch instead of the native arch. >>> >>> We implement this by dispatching the non-native variant of DPKG_ARCH=all >>> packages to the -native variant by adding a dependency. We further >>> replace the non-native do_deploy_dep task with a noop to preserve the >>> dependency chain. >>> >>> Co-developed-by: Adriaan Schmidt >>> Signed-off-by: Felix Moessbauer >>> --- >>> meta/classes/multiarch.bbclass | 18 +++++++++++++++++- >>> 1 file changed, 17 insertions(+), 1 deletion(-) >>> >>> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass >>> index babdfbd4..c2bba21f 100644 >>> --- a/meta/classes/multiarch.bbclass >>> +++ b/meta/classes/multiarch.bbclass >>> @@ -29,7 +29,11 @@ python() { >>> d.appendVar('BBCLASSEXTEND', ' compat') >>> >>> # build native separately only when it differs from the target variant >>> - if not archIsAll and archDiffers: >>> + # We must not short-circuit for DPKG_ARCH=all packages, as they might >>> + # have transitive dependencies which need to be built for -native. >>> + # This special handling for DPKG_ARCH=all packages is left to the >>> + # multiarch_virtclass_handler >>> + if archDiffers: >>> d.appendVar('BBCLASSEXTEND', ' native') >>> else: >>> extend_provides(pn, 'native', d) >>> @@ -86,6 +90,8 @@ python multiarch_virtclass_handler() { >>> d.setVar(var, ' '.join(multiarch_var)) >>> >>> pn = e.data.getVar('PN') >>> + archDiffers = d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH') >>> + archIsAll = d.getVar('DPKG_ARCH') == 'all' >>> if pn.endswith('-compat'): >>> e.data.setVar('BPN', pn[:-len('-compat')]) >>> e.data.appendVar('OVERRIDES', ':class-compat') >>> @@ -96,6 +102,16 @@ python multiarch_virtclass_handler() { >>> e.data.appendVar('OVERRIDES', ':class-native') >>> fixup_pn_in_vars(e.data) >>> fixup_depends('-native', e.data) >>> + elif archIsAll and archDiffers: >>> + # Arch=all packages might build depend on other arch=all packages, >>> + # hence we need to correctly model the dependency chain. >>> + # We implement this by dispatching the non-native variant to the -native >>> + # variant by adding a dependency. We further replace the non-native >>> + # do_deploy_dep task with a noop to preserve the dependency chain. >>> + e.data.setVar('do_deploy_deb', '') >>> + bb.build.deltask('deploy_deb', e.data) >>> + bb.build.addtask('deploy_deb', 'do_build', '', e.data) >>> + e.data.setVarFlag('do_deploy_deb', 'depends', f'{pn}-native:do_deploy_deb') >> I have now done some more testing and unfortunately find that this >> causes failures when building the -native variant of some dpkg-raw >> packages we have. >> > Hi, do you have an example for such a package? Just to be clear: There > is no "native" variant of a dpkg-raw package. The dpkg-raw packages are > always build on the host architecture (in bitbake terms) and of Debian > arch=all. > >> We use them for certain config files and they are >> intended for the target. >> > Do these configs contain data that is not the same on all > architectures? If so, DPKG_ARCH="all" is wrong. After some debugging, it seems to be a combination of your patch and "2ca3a7e dpkg-source: Build source package only once". There is no problem building our dpkg-raw packages explicitly in the non-native form, e.g. in the host environment for the target arch. But through your patch, the package also runs as -native, which then triggers a problem with 2ca3a7e. ... I only now discover that the other part of your patchset "dpkg-raw: add files to source package" fixes this. Ok. However, because of this I went digging on why you introduced the patch. And I wonder why sbom-chroot doesn't just depend on python3-debsbom-native directly? (Which still breaks as long as 2ca3a7e sets the dependency on a function of the non-native package). >> I dont know why exactly they fail and I'm sure >> this could be fixed, but actually there is no need to build those >> packages in the native environment. >> > There is need to do so, as otherwise we emulate the build process which > is super slow. Yes you're right. I meant there is no need to build them *for* the native architecture. >> So I'm somewhat surprised to see >> that and could image that this causes confusion for others that dont >> know about the "all" intricacies as well. > Probably, but in the end we are building a debian system and by that > the users should be aware of the debian architecture specifiers. Yes sure, they were new to me, but no problem, they are not that complicated. But when I deliberately build -native packages (which I assume to be a valid use case according to the doc), and somehow the buildsystem goes back and forth running functions from the native and the base package, it's difficult to follow why that would be necessary. It doesnt make for ease of debugging when working on new packages either. For the use cases I have in sight right now it would be fine if a package build breaks because it cannot be done cross-architecture. I'd hope to being able to fix this by either improving the package or making sure to call it -native only. But if that's not what the expectation is for Debian Crossbuilding I'm eager to learn. best regards, Andreas >> Another observation that I see is that dpkg-prebuilt "any" packages, >> which are probably in the dependency chain of an "all" package, now are >> always also built as -native, even though they are needed for the target >> only. > Same here, even if bitbake tells you that they are build as "-native", > there is no difference in the output, as the binary is simply copied. > > Best regards, > Felix > >> best, >> Andras >> >>> } >>> addhandler multiarch_virtclass_handler >>> multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" >> -- >> Andreas Naumann >> >> emlix GmbH >> Headquarters: Berliner Str. 12, 37073 Goettingen, Germany >> Phone +49 (0)551 30664-0, e-mailinfo@emlix.com >> District Court of Goettingen, Registry Number HR B 3160 >> Managing Directors: Heike Jordan, Dr. Uwe Kracke >> VAT ID No. DE 205 198 055 >> Office Berlin: Panoramastr. 1, 10178 Berlin, Germany >> Office Bonn: Bachstr. 6, 53115 Bonn, Germany >> http://www.emlix.com -- Andreas Naumann emlix GmbH Headquarters: Berliner Str. 12, 37073 Goettingen, Germany Phone +49 (0)551 30664-0, e-mailinfo@emlix.com District Court of Goettingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/45ecefef-bbc3-4506-b9b3-c945d0d77e65%40emlix.com.