* [PATCH v2 1/2] do not add cross profile when building native package
@ 2025-11-04 15:44 'Felix Moessbauer' via isar-users
2025-11-04 15:44 ` [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2025-11-04 15:44 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, stefan-koch, jan.kiszka, Benedikt Niedermayr
When building a -native package, the cross profile must not be added as
otherwise stricter apt cache checks added in trixie trigger. It anyways
makes no sense to add the cross profile when BUILD_ARCH equals
PACKAGE_ARCH. Previously this check was implemented incorrectly, as the
build arch was compared to the DISTRO_ARCH, which is always the target
arch in isar terms. This resulted in the following error message in
sbuild:
E: The package cache was built for different architectures: amd64 vs arm64
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted
E: apt-get dist-upgrade failed
On bookworm, the incorrect check remained unnoticed, as apt did not have
the stricter checks yet.
Fixes: 872ef2e3 ("dpkg-base: Fix enabling of cross build profile")
Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes/dpkg-base.bbclass | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 4468a49a..d8287e8d 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -146,7 +146,7 @@ dpkg_runbuild() {
def isar_deb_build_profiles(d):
deb_build_profiles = d.getVar('DEB_BUILD_PROFILES')
- if d.getVar('BUILD_ARCH') != d.getVar('DISTRO_ARCH'):
+ if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH'):
deb_build_profiles += ' cross'
return deb_build_profiles.strip()
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index f2892921..01398697 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -109,7 +109,7 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-')[2]}"
# Determine cross-profile override
python() {
- if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
+ if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH') and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
d.appendVar("OVERRIDES", ":cross-profile")
}
--
2.51.0
--
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/20251104154448.2737940-1-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages
2025-11-04 15:44 [PATCH v2 1/2] do not add cross profile when building native package 'Felix Moessbauer' via isar-users
@ 2025-11-04 15:44 ` 'Felix Moessbauer' via isar-users
2025-11-06 11:07 ` 'Andreas Naumann' via isar-users
2025-11-04 16:19 ` [PATCH v2 1/2] do not add cross profile when building native package 'Jan Kiszka' via isar-users
2025-11-06 8:47 ` 'MOESSBAUER, Felix' via isar-users
2 siblings, 1 reply; 7+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2025-11-04 15:44 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer, stefan-koch, jan.kiszka, Benedikt Niedermayr
DPKG_ARCH=all packages are always build in their -native variant.
However, these packages still can have non-native dependencies which
must be built for the distro arch.
Fixes: 23a73895 ("multiarch: inject native variants of preferred providers")
Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes/multiarch.bbclass | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index c2bba21f..74b8f5b8 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -106,11 +106,13 @@ python multiarch_virtclass_handler() {
# 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.
+ # variant by adding a dependency. We further empty the non-native
+ # do_deploy_dep task and clear the internal dependency chain, but keep
+ # other attached variables like RDEPENDS 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)
+ # clear internal dependencies (e.g. to do_dpkg_build)
+ e.data.setVarFlag('do_deploy_deb', 'deps', [])
+ # dispatch to native variant
e.data.setVarFlag('do_deploy_deb', 'depends', f'{pn}-native:do_deploy_deb')
}
addhandler multiarch_virtclass_handler
--
2.51.0
--
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/20251104154448.2737940-2-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] do not add cross profile when building native package
2025-11-04 15:44 [PATCH v2 1/2] do not add cross profile when building native package 'Felix Moessbauer' via isar-users
2025-11-04 15:44 ` [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
@ 2025-11-04 16:19 ` 'Jan Kiszka' via isar-users
2025-11-04 18:24 ` 'MOESSBAUER, Felix' via isar-users
2025-11-06 8:47 ` 'MOESSBAUER, Felix' via isar-users
2 siblings, 1 reply; 7+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-11-04 16:19 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: stefan-koch, Benedikt Niedermayr
On 04.11.25 16:44, Felix Moessbauer wrote:
> When building a -native package, the cross profile must not be added as
> otherwise stricter apt cache checks added in trixie trigger. It anyways
> makes no sense to add the cross profile when BUILD_ARCH equals
> PACKAGE_ARCH. Previously this check was implemented incorrectly, as the
> build arch was compared to the DISTRO_ARCH, which is always the target
> arch in isar terms. This resulted in the following error message in
> sbuild:
>
> E: The package cache was built for different architectures: amd64 vs arm64
> W: You may want to run apt-get update to correct these problems
> E: The package cache file is corrupted
> E: apt-get dist-upgrade failed
>
> On bookworm, the incorrect check remained unnoticed, as apt did not have
> the stricter checks yet.
>
> Fixes: 872ef2e3 ("dpkg-base: Fix enabling of cross build profile")
> Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/classes/dpkg-base.bbclass | 2 +-
> meta/recipes-kernel/linux/linux-custom.inc | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 4468a49a..d8287e8d 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -146,7 +146,7 @@ dpkg_runbuild() {
>
> def isar_deb_build_profiles(d):
> deb_build_profiles = d.getVar('DEB_BUILD_PROFILES')
> - if d.getVar('BUILD_ARCH') != d.getVar('DISTRO_ARCH'):
> + if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH'):
> deb_build_profiles += ' cross'
> return deb_build_profiles.strip()
>
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index f2892921..01398697 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -109,7 +109,7 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-')[2]}"
>
> # Determine cross-profile override
> python() {
> - if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
> + if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH') and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
> d.appendVar("OVERRIDES", ":cross-profile")
> }
>
This looks like a separate patch, even if a dependency for this one. Or
would fixing linux-custom.inc not be possible before fixing dpkg-base?
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/1f9d015c-9ee7-4538-82db-e67eb68f18db%40siemens.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] do not add cross profile when building native package
2025-11-04 16:19 ` [PATCH v2 1/2] do not add cross profile when building native package 'Jan Kiszka' via isar-users
@ 2025-11-04 18:24 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 0 replies; 7+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2025-11-04 18:24 UTC (permalink / raw)
To: isar-users, Kiszka, Jan; +Cc: Niedermayr, BENEDIKT, Koch, Stefan
On Tue, 2025-11-04 at 17:19 +0100, Jan Kiszka wrote:
> On 04.11.25 16:44, Felix Moessbauer wrote:
> > When building a -native package, the cross profile must not be added as
> > otherwise stricter apt cache checks added in trixie trigger. It anyways
> > makes no sense to add the cross profile when BUILD_ARCH equals
> > PACKAGE_ARCH. Previously this check was implemented incorrectly, as the
> > build arch was compared to the DISTRO_ARCH, which is always the target
> > arch in isar terms. This resulted in the following error message in
> > sbuild:
> >
> > E: The package cache was built for different architectures: amd64 vs arm64
> > W: You may want to run apt-get update to correct these problems
> > E: The package cache file is corrupted
> > E: apt-get dist-upgrade failed
> >
> > On bookworm, the incorrect check remained unnoticed, as apt did not have
> > the stricter checks yet.
> >
> > Fixes: 872ef2e3 ("dpkg-base: Fix enabling of cross build profile")
> > Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> > meta/classes/dpkg-base.bbclass | 2 +-
> > meta/recipes-kernel/linux/linux-custom.inc | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> > index 4468a49a..d8287e8d 100644
> > --- a/meta/classes/dpkg-base.bbclass
> > +++ b/meta/classes/dpkg-base.bbclass
> > @@ -146,7 +146,7 @@ dpkg_runbuild() {
> >
> > def isar_deb_build_profiles(d):
> > deb_build_profiles = d.getVar('DEB_BUILD_PROFILES')
> > - if d.getVar('BUILD_ARCH') != d.getVar('DISTRO_ARCH'):
> > + if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH'):
> > deb_build_profiles += ' cross'
> > return deb_build_profiles.strip()
> >
> > diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> > index f2892921..01398697 100644
> > --- a/meta/recipes-kernel/linux/linux-custom.inc
> > +++ b/meta/recipes-kernel/linux/linux-custom.inc
> > @@ -109,7 +109,7 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-')[2]}"
> >
> > # Determine cross-profile override
> > python() {
> > - if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
> > + if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH') and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
> > d.appendVar("OVERRIDES", ":cross-profile")
> > }
> >
>
> This looks like a separate patch, even if a dependency for this one. Or
> would fixing linux-custom.inc not be possible before fixing dpkg-base?
This needs to be fixed in a lockstep, as otherwise the :cross-profile
override and the DEB_BUILD_PROFILE = cross are not in sync.
Felix
>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
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/c2f47610d0dc307cab17684870bbad3af53915d6.camel%40siemens.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] do not add cross profile when building native package
2025-11-04 15:44 [PATCH v2 1/2] do not add cross profile when building native package 'Felix Moessbauer' via isar-users
2025-11-04 15:44 ` [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
2025-11-04 16:19 ` [PATCH v2 1/2] do not add cross profile when building native package 'Jan Kiszka' via isar-users
@ 2025-11-06 8:47 ` 'MOESSBAUER, Felix' via isar-users
2 siblings, 0 replies; 7+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2025-11-06 8:47 UTC (permalink / raw)
To: isar-users
Cc: Niedermayr, BENEDIKT, Schmidt, Adriaan, Kiszka, Jan, Koch, Stefan
On Tue, 2025-11-04 at 16:44 +0100, Felix Moessbauer wrote:
> When building a -native package, the cross profile must not be added as
> otherwise stricter apt cache checks added in trixie trigger. It anyways
> makes no sense to add the cross profile when BUILD_ARCH equals
> PACKAGE_ARCH. Previously this check was implemented incorrectly, as the
> build arch was compared to the DISTRO_ARCH, which is always the target
> arch in isar terms. This resulted in the following error message in
> sbuild:
>
> E: The package cache was built for different architectures: amd64 vs arm64
> W: You may want to run apt-get update to correct these problems
> E: The package cache file is corrupted
> E: apt-get dist-upgrade failed
>
> On bookworm, the incorrect check remained unnoticed, as apt did not have
> the stricter checks yet.
>
> Fixes: 872ef2e3 ("dpkg-base: Fix enabling of cross build profile")
> Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/classes/dpkg-base.bbclass | 2 +-
> meta/recipes-kernel/linux/linux-custom.inc | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 4468a49a..d8287e8d 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -146,7 +146,7 @@ dpkg_runbuild() {
>
> def isar_deb_build_profiles(d):
> deb_build_profiles = d.getVar('DEB_BUILD_PROFILES')
> - if d.getVar('BUILD_ARCH') != d.getVar('DISTRO_ARCH'):
> + if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH'):
> deb_build_profiles += ' cross'
> return deb_build_profiles.strip()
>
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index f2892921..01398697 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -109,7 +109,7 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-')[2]}"
>
> # Determine cross-profile override
> python() {
> - if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
> + if d.getVar('BUILD_ARCH') != d.getVar('PACKAGE_ARCH') and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
> d.appendVar("OVERRIDES", ":cross-profile")
I again see the same build error as reported by ... in the v1, but I
can only reproduce it in 100% clean CI runs with just that target. To
me it looks like the linux-kbuild-phy:arm64 package is still lingering
around in some cache which hides the error.
Anyways, back to the error:
I'm pretty sure we now model the build-dependency chain of packages
correctly, however it looks like the build of the kbuild-<kernel>
package has logical errors:
Currently, the linux-kbuild-phy is generated from linux-phy-native, but
for the host architecture (instead of the target architecture). This is
correct from bitbake perspective, but incorrect from debian
perspective, as the module needs the kbuild-<> package for the target
architecture.
IOW, currently we have the following situation:
- linux-<name> generates the image and headers for the target arch
(arm64)
- linux-<name>-native generates the kbuild package in the host arch
(amd64)
All that is correct, but not helpful. In the past, we generated an
architecture specific package from a -native recipe - which IMHO is
plain wrong.
To move forward, someone familiar with the linux-custom recipe needs to
have a look and model the overrides correctly. We further need to
clearly state which profile does what in human readable terms.
Felix
> }
>
> --
> 2.51.0
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
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/4952db34aadf1d2a2471f2dce8c2c28b454abf06.camel%40siemens.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages
2025-11-04 15:44 ` [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
@ 2025-11-06 11:07 ` 'Andreas Naumann' via isar-users
2025-11-06 12:13 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 1 reply; 7+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-11-06 11:07 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: stefan-koch, jan.kiszka, Benedikt Niedermayr
Hi Felix,
Am 04.11.25 um 16:44 schrieb 'Felix Moessbauer' via isar-users:
> DPKG_ARCH=all packages are always build in their -native variant.
> However, these packages still can have non-native dependencies which
> must be built for the distro arch.
For me, this doesnt fix the testcase which I posted in my set on monday.
So I'm surprised that it does for you, at least that's what i understood
from your reply there. I was afraid gss wouldn't fail crosscompiling
in trixie, but it does, at least for arm64.
Now I reread your description carefully and assume it fixes something else
than I had in mind. So short of info what the actual problem with
23a73895 ("multiarch: inject native variants of preferred providers")
was, could you state it again? Do you have a specific testcase for it?
regards,
Andreas
> Fixes: 23a73895 ("multiarch: inject native variants of preferred providers")
> Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/classes/multiarch.bbclass | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
> index c2bba21f..74b8f5b8 100644
> --- a/meta/classes/multiarch.bbclass
> +++ b/meta/classes/multiarch.bbclass
> @@ -106,11 +106,13 @@ python multiarch_virtclass_handler() {
> # 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.
> + # variant by adding a dependency. We further empty the non-native
> + # do_deploy_dep task and clear the internal dependency chain, but keep
> + # other attached variables like RDEPENDS 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)
> + # clear internal dependencies (e.g. to do_dpkg_build)
> + e.data.setVarFlag('do_deploy_deb', 'deps', [])
> + # dispatch to native variant
> e.data.setVarFlag('do_deploy_deb', 'depends', f'{pn}-native:do_deploy_deb')
> }
> addhandler multiarch_virtclass_handler
--
Andreas Naumann
emlix GmbH
Headquarters: Berliner Str. 12, 37073 Goettingen, Germany
Phone +49 (0)551 30664-0, e-mail info@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/a1d770d4-288b-42db-9d1c-cd46f1e43adc%40emlix.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages
2025-11-06 11:07 ` 'Andreas Naumann' via isar-users
@ 2025-11-06 12:13 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 0 replies; 7+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2025-11-06 12:13 UTC (permalink / raw)
To: isar-users, anaumann; +Cc: Niedermayr, BENEDIKT, Kiszka, Jan, Koch, Stefan
On Thu, 2025-11-06 at 12:07 +0100, Andreas Naumann wrote:
> Hi Felix,
>
> Am 04.11.25 um 16:44 schrieb 'Felix Moessbauer' via isar-users:
> > DPKG_ARCH=all packages are always build in their -native variant.
> > However, these packages still can have non-native dependencies which
> > must be built for the distro arch.
> For me, this doesnt fix the testcase which I posted in my set on monday.
> So I'm surprised that it does for you, at least that's what i understood
> from your reply there. I was afraid gss wouldn't fail crosscompiling
> in trixie, but it does, at least for arm64.
There are currently so many moving bits (patches, kas bookworm vs kas
trixie environments, ...) it is hard to say what exactly worked and
what didn't.
> Now I reread your description carefully and assume it fixes something else
> than I had in mind. So short of info what the actual problem with
>
> 23a73895 ("multiarch: inject native variants of preferred providers")
>
> was, could you state it again? Do you have a specific testcase for it?
This problem was spotted in isar-cip-core when applying the
DPKG_ARCH=all transitive deps patch [1]. The problem hereby is that we
can no longer prefer-provide on the non native variant of a
DPKG_ARCH=all package. An example error message looks like the
following:
ERROR: Multiple .bb files are due to be built which each provide
secure-boot-secrets:
/work/build/../../repo/recipes-devtools/secure-boot-secrets/secure-
boot-snakeoil_0.3.bb
/work/build/../../repo/recipes-devtools/secure-boot-secrets/secure-
boot-key_0.2.bb
A list of tasks depending on these providers is shown and may help
explain where the dependency comes from.
Example kas file:
diff --git a/kas-cip.yml b/kas-cip.yml
index d76d6d94..4b18856d 100644
--- a/kas-cip.yml
+++ b/kas-cip.yml
@@ -22,7 +22,7 @@ repos:
isar:
url: https://github.com/ilbers/isar.git
- commit: d63a1cbae6f737aa843d00d8812547fe7b87104a
+ commit: 5a7c2f70045a27fe4073fa987ef07fe628062708
layers:
meta:
[1]
https://github.com/ilbers/isar/commit/5a7c2f70045a27fe4073fa987ef07fe628062708
Best regards,
Felix
> regards,
> Andreas
>
>
> > Fixes: 23a73895 ("multiarch: inject native variants of preferred providers")
> > Tested-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> > meta/classes/multiarch.bbclass | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
> > index c2bba21f..74b8f5b8 100644
> > --- a/meta/classes/multiarch.bbclass
> > +++ b/meta/classes/multiarch.bbclass
> > @@ -106,11 +106,13 @@ python multiarch_virtclass_handler() {
> > # 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.
> > + # variant by adding a dependency. We further empty the non-native
> > + # do_deploy_dep task and clear the internal dependency chain, but keep
> > + # other attached variables like RDEPENDS 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)
> > + # clear internal dependencies (e.g. to do_dpkg_build)
> > + e.data.setVarFlag('do_deploy_deb', 'deps', [])
> > + # dispatch to native variant
> > e.data.setVarFlag('do_deploy_deb', 'depends', f'{pn}-native:do_deploy_deb')
> > }
> > addhandler multiarch_virtclass_handler
>
> --
> Andreas Naumann
>
> emlix GmbH
> Headquarters: Berliner Str. 12, 37073 Goettingen, Germany
> Phone +49 (0)551 30664-0, e-mail info@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
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
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/67649f9484eba7fdc6ca69adf5d8f346efc1bbc9.camel%40siemens.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-06 12:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04 15:44 [PATCH v2 1/2] do not add cross profile when building native package 'Felix Moessbauer' via isar-users
2025-11-04 15:44 ` [PATCH v2 2/2] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
2025-11-06 11:07 ` 'Andreas Naumann' via isar-users
2025-11-06 12:13 ` 'MOESSBAUER, Felix' via isar-users
2025-11-04 16:19 ` [PATCH v2 1/2] do not add cross profile when building native package 'Jan Kiszka' via isar-users
2025-11-04 18:24 ` 'MOESSBAUER, Felix' via isar-users
2025-11-06 8:47 ` 'MOESSBAUER, Felix' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox