* [RFC 0/5] Improving multiarch support for arch-incompatible packages
@ 2025-10-01 10:59 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 1/5] rootfs: Do not recursively deploy every dependent package 'Andreas Naumann' via isar-users
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-01 10:59 UTC (permalink / raw)
To: isar-users; +Cc: Andreas Naumann
Fixing the recursive dependency issue of "all" packages, as proposed by
Felix, showed that currently the Isar multiarch support seems to assume that
custom dpkg recipes are always valid for the host as well as target architecure.
Or, if they are not, Isar would make an effort to redirect if possible.
However, there are situations where this is not the case, e.g. packages
supporting a certain architecture only or packages intended for the host
without full crosscompile compatibility.
This series is to allow for such cases by supporting DPKG_ARCH being set
to a specific architecture if it is not truly "all" or "any".
The first patch fixes unnecessary, possibly incompatible packages being added
to the overall rootfs dependency chain. It's also sort of an alternative solution
to the fix that Felix provided in his original patch which I took the
freedom to rework to contain the recursive dependency fix only.
The reason I'm going another way is that I was looking for a way to
generically handle all incompatible packages, not just "Architecutre: all".
Of course this comes with the "drawback" that "all" packages, suited to be
compiled in and only for -native, need to be added with their -native name
whereever they are depended upon.
As for reverting recrdeptask: IMHO, the alternative to keeping it would be to
not being able to use cross-package inter-task dependencies, like Jan's
patch for avoiding the duplicate creation of the dpkg-source package
does. That would be kind of limiting.
As for the cache related reasons for which recrdeptask was actually
introduced: I could not find the do_prepare_build-A -> do_deploy-B
dependency, but only do_deploy-A -> do_deploy-B. So I'd just hope that
this is no longer a problem, but havnt invested testing effort to prove so.
The image patch is preparational, so images are not unintentionally
skipped by the actual main patch (#4) which handles incompatible
packages.
It was made before handling of packages with unset DPKG_ARCH variable
was added, so it's no longer strictly needed, but may be worthwhile
anyway.
Andreas Naumann (4):
rootfs: Do not recursively deploy every dependent package
image: Do not inherit multiarch
multiarch: Prevent providing incompatible native packages
multiarch: Do not re-extend real -native recipes
Felix Moessbauer' via isar-users (1):
multiarch: handle DPKG_ARCH=all case for transitive deps
meta/classes/image.bbclass | 1 -
meta/classes/multiarch.bbclass | 33 ++++++++++++++-------------------
meta/classes/rootfs.bbclass | 19 ++++++++++++++++++-
3 files changed, 32 insertions(+), 21 deletions(-)
--
2.43.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/20251001105929.3731537-1-anaumann%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/5] rootfs: Do not recursively deploy every dependent package
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
@ 2025-10-01 10:59 ` 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 2/5] multiarch: handle DPKG_ARCH=all case for transitive deps 'Andreas Naumann' via isar-users
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-01 10:59 UTC (permalink / raw)
To: isar-users; +Cc: Andreas Naumann
Using recrdeptask has the side effect that every package in the
dependency will be built and deployed, even though for some packages
just a subset of tasks was needed to fulfil the inter-task dependencies.
For coupled packages like the native/compat ones, which can share part of
their tasks, see 2ca3a7e dpkg-source: Build source package only once,
this leads to a full build of the base package, while e.g. only the native
part needed to be produced.
Refrain from doing so by going back to using deptask which only adds the deploy
task of the direct dependencies and rely on correct cache and inter-task
settings of the used classes/recipes.
Add rdeptask handling to allow for runtime dependency settings.
This is a partial revert of 7c7628e rootfs: recursively depend on packages.
This fixes build failures with custom packages which dont support crosscompiling
(-native only), improves performance as no unneeded compiling is being done,
and avoids ambiguity when both packages produce the same artifact (deb-file).
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
meta/classes/rootfs.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 11e6367e..53e60a81 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -347,7 +347,8 @@ do_rootfs_install[root_cleandirs] = "${ROOTFSDIR}"
do_rootfs_install[vardeps] += "${ROOTFS_CONFIGURE_COMMAND} ${ROOTFS_INSTALL_COMMAND}"
do_rootfs_install[vardepsexclude] += "IMAGE_ROOTFS"
do_rootfs_install[depends] = "bootstrap-${@'target' if d.getVar('ROOTFS_ARCH') == d.getVar('DISTRO_ARCH') else 'host'}:do_build"
-do_rootfs_install[recrdeptask] = "do_deploy_deb"
+do_rootfs_install[deptask] = "do_deploy_deb"
+do_rootfs_install[rdeptask] = "do_deploy_deb"
do_rootfs_install[network] = "${TASK_USE_SUDO}"
python do_rootfs_install() {
configure_cmds = (d.getVar("ROOTFS_CONFIGURE_COMMAND") or "").split()
--
2.43.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/20251001105929.3731537-2-anaumann%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/5] multiarch: handle DPKG_ARCH=all case for transitive deps
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 1/5] rootfs: Do not recursively deploy every dependent package 'Andreas Naumann' via isar-users
@ 2025-10-01 10:59 ` 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 3/5] image: Do not inherit multiarch 'Andreas Naumann' via isar-users
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-01 10:59 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Andreas Naumann
From: Felix Moessbauer' via isar-users <isar-users@googlegroups.com>
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.
Co-developed-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Co-developed-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
meta/classes/multiarch.bbclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index babdfbd4..ae465aec 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -29,7 +29,9 @@ 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.
+ if archDiffers:
d.appendVar('BBCLASSEXTEND', ' native')
else:
extend_provides(pn, 'native', d)
--
2.43.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/20251001105929.3731537-3-anaumann%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/5] image: Do not inherit multiarch
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 1/5] rootfs: Do not recursively deploy every dependent package 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 2/5] multiarch: handle DPKG_ARCH=all case for transitive deps 'Andreas Naumann' via isar-users
@ 2025-10-01 10:59 ` 'Andreas Naumann' via isar-users
2025-10-02 12:09 ` 'Jan Kiszka' via isar-users
2025-10-01 10:59 ` [PATCH 4/5] multiarch: Prevent providing incompatible native packages 'Andreas Naumann' via isar-users
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-01 10:59 UTC (permalink / raw)
To: isar-users; +Cc: Andreas Naumann
Images don't need multiarch functionality. Remove the inheritance.
In order to keep the bb2deb conversion function in scope for the image class,
move it to rootfs, which it inherits from.
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
meta/classes/image.bbclass | 1 -
meta/classes/multiarch.bbclass | 16 ----------------
meta/classes/rootfs.bbclass | 16 ++++++++++++++++
3 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 57e66632..354ec85e 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -62,7 +62,6 @@ DEPENDS += "${IMAGE_INSTALL}"
ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
-inherit multiarch
inherit essential
ROOTFSDIR = "${IMAGE_ROOTFS}"
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index ae465aec..5b67d779 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -101,19 +101,3 @@ python multiarch_virtclass_handler() {
}
addhandler multiarch_virtclass_handler
multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
-
-# function to convert bitbake targets to installable debian packages,
-# e.g., "hello-compat" to "hello:i386".
-def isar_multiarch_packages(var, d):
- bb_targets = (d.getVar(var) or '').split()
- packages = []
- compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
- host_arch = d.getVar('HOST_ARCH')
- for t in bb_targets:
- if t.endswith('-compat') and compat_distro_arch is not None:
- packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
- elif t.endswith('-native'):
- packages.append(t[:-len('-native')] + ':' + host_arch)
- else:
- packages.append(t)
- return ' '.join(packages)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 53e60a81..f60be99c 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -632,3 +632,19 @@ python do_rootfs_install_setscene() {
sstate_setscene(d)
}
addtask do_rootfs_install_setscene
+
+# function to convert bitbake targets to installable debian packages,
+# e.g., "hello-compat" to "hello:i386".
+def isar_multiarch_packages(var, d):
+ bb_targets = (d.getVar(var) or '').split()
+ packages = []
+ compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
+ host_arch = d.getVar('HOST_ARCH')
+ for t in bb_targets:
+ if t.endswith('-compat') and compat_distro_arch is not None:
+ packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
+ elif t.endswith('-native'):
+ packages.append(t[:-len('-native')] + ':' + host_arch)
+ else:
+ packages.append(t)
+ return ' '.join(packages)
--
2.43.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/20251001105929.3731537-4-anaumann%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/5] multiarch: Prevent providing incompatible native packages
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
` (2 preceding siblings ...)
2025-10-01 10:59 ` [PATCH 3/5] image: Do not inherit multiarch 'Andreas Naumann' via isar-users
@ 2025-10-01 10:59 ` 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 5/5] multiarch: Do not re-extend real -native recipes 'Andreas Naumann' via isar-users
2025-10-02 12:10 ` [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Jan Kiszka' via isar-users
5 siblings, 0 replies; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-01 10:59 UTC (permalink / raw)
To: isar-users; +Cc: Andreas Naumann
When extending/providing native packages, we must not do so with packages
that are incompatible with the HOST_ARCH because otherwise, depending on the PV,
they may override a sibling package which does support the HOST_ARCH but with
a lower PV.
To do this introduce a check for the packages DPKG_ARCH compatibility.
- For cross-target configurations, just prevent providing the extended package.
- For native-target configurations, skip the recipe altogether as the base variant
will not be compatible as well.
- Excempt the recipe skipping in case DPKG_ARCH is not set which may be the case for
- a recipe that produces multiple debian packages with varying Architecture
settings
- a recipe is not suited to native/compat handling but inherits multiarch
indirectly anyway.
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
meta/classes/multiarch.bbclass | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index 5b67d779..03c55bbe 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -8,6 +8,9 @@ python() {
pn = d.getVar('PN')
archDiffers = d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH')
archIsAll = d.getVar('DPKG_ARCH') == 'all'
+ archIsAny = d.getVar('DPKG_ARCH') == 'any'
+ archIsNative = d.getVar('DPKG_ARCH') == d.getVar('HOST_ARCH')
+ archIsKnown = d.getVar("DPKG_ARCH", True)
def pn_multiarch_target(pn):
return pn.endswith('-native') or pn.endswith('-compat')
@@ -32,9 +35,15 @@ python() {
# We must not short-circuit for DPKG_ARCH=all packages, as they might
# have transitive dependencies which need to be built for -native.
if archDiffers:
- d.appendVar('BBCLASSEXTEND', ' native')
+ if archIsNative or archIsAll or archIsAny:
+ d.appendVar('BBCLASSEXTEND', ' native')
+ elif archIsKnown:
+ bb.debug(2, "Package %s is not compatible with the host architecture. Skipped extending as -native" % pn)
else:
- extend_provides(pn, 'native', d)
+ if archIsAll or archIsAny or archIsNative:
+ extend_provides(pn, 'native', d)
+ elif archIsKnown:
+ raise bb.parse.SkipRecipe("Incompatible with the target architecture %s" % d.getVar('DISTRO_ARCH'))
# drop own -native build dependencies at recipe level if building natively
# and not for the builder architecture
--
2.43.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/20251001105929.3731537-5-anaumann%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/5] multiarch: Do not re-extend real -native recipes
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
` (3 preceding siblings ...)
2025-10-01 10:59 ` [PATCH 4/5] multiarch: Prevent providing incompatible native packages 'Andreas Naumann' via isar-users
@ 2025-10-01 10:59 ` 'Andreas Naumann' via isar-users
2025-10-02 12:10 ` [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Jan Kiszka' via isar-users
5 siblings, 0 replies; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-01 10:59 UTC (permalink / raw)
To: isar-users; +Cc: Andreas Naumann
This is mainly to prevent confusion when <pkg>-native.bb recipes would be
extended to <pkg>-native-native.
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
meta/classes/multiarch.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index 03c55bbe..2a0d8abb 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -34,7 +34,7 @@ python() {
# build native separately only when it differs from the target variant
# We must not short-circuit for DPKG_ARCH=all packages, as they might
# have transitive dependencies which need to be built for -native.
- if archDiffers:
+ if archDiffers and not pn.endswith('-native'):
if archIsNative or archIsAll or archIsAny:
d.appendVar('BBCLASSEXTEND', ' native')
elif archIsKnown:
--
2.43.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/20251001105929.3731537-6-anaumann%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/5] image: Do not inherit multiarch
2025-10-01 10:59 ` [PATCH 3/5] image: Do not inherit multiarch 'Andreas Naumann' via isar-users
@ 2025-10-02 12:09 ` 'Jan Kiszka' via isar-users
2025-10-02 14:17 ` 'Andreas Naumann' via isar-users
0 siblings, 1 reply; 11+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-10-02 12:09 UTC (permalink / raw)
To: Andreas Naumann, isar-users
On 01.10.25 12:59, 'Andreas Naumann' via isar-users wrote:
> Images don't need multiarch functionality. Remove the inheritance.
>
Either you didn't test it, or the inheritance still comes implicitly
because it IS needed: isar_multiarch_packages
Jan
> In order to keep the bb2deb conversion function in scope for the image class,
> move it to rootfs, which it inherits from.
>
> Signed-off-by: Andreas Naumann <anaumann@emlix.com>
> ---
> meta/classes/image.bbclass | 1 -
> meta/classes/multiarch.bbclass | 16 ----------------
> meta/classes/rootfs.bbclass | 16 ++++++++++++++++
> 3 files changed, 16 insertions(+), 17 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 57e66632..354ec85e 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -62,7 +62,6 @@ DEPENDS += "${IMAGE_INSTALL}"
> ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
> ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
>
> -inherit multiarch
> inherit essential
>
> ROOTFSDIR = "${IMAGE_ROOTFS}"
> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
> index ae465aec..5b67d779 100644
> --- a/meta/classes/multiarch.bbclass
> +++ b/meta/classes/multiarch.bbclass
> @@ -101,19 +101,3 @@ python multiarch_virtclass_handler() {
> }
> addhandler multiarch_virtclass_handler
> multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
> -
> -# function to convert bitbake targets to installable debian packages,
> -# e.g., "hello-compat" to "hello:i386".
> -def isar_multiarch_packages(var, d):
> - bb_targets = (d.getVar(var) or '').split()
> - packages = []
> - compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
> - host_arch = d.getVar('HOST_ARCH')
> - for t in bb_targets:
> - if t.endswith('-compat') and compat_distro_arch is not None:
> - packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
> - elif t.endswith('-native'):
> - packages.append(t[:-len('-native')] + ':' + host_arch)
> - else:
> - packages.append(t)
> - return ' '.join(packages)
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 53e60a81..f60be99c 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -632,3 +632,19 @@ python do_rootfs_install_setscene() {
> sstate_setscene(d)
> }
> addtask do_rootfs_install_setscene
> +
> +# function to convert bitbake targets to installable debian packages,
> +# e.g., "hello-compat" to "hello:i386".
> +def isar_multiarch_packages(var, d):
> + bb_targets = (d.getVar(var) or '').split()
> + packages = []
> + compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
> + host_arch = d.getVar('HOST_ARCH')
> + for t in bb_targets:
> + if t.endswith('-compat') and compat_distro_arch is not None:
> + packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
> + elif t.endswith('-native'):
> + packages.append(t[:-len('-native')] + ':' + host_arch)
> + else:
> + packages.append(t)
> + return ' '.join(packages)
--
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/f2f14dc7-ac51-4493-ada7-247707c3a63d%40siemens.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFC 0/5] Improving multiarch support for arch-incompatible packages
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
` (4 preceding siblings ...)
2025-10-01 10:59 ` [PATCH 5/5] multiarch: Do not re-extend real -native recipes 'Andreas Naumann' via isar-users
@ 2025-10-02 12:10 ` 'Jan Kiszka' via isar-users
5 siblings, 0 replies; 11+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-10-02 12:10 UTC (permalink / raw)
To: Andreas Naumann, isar-users, Schmidt, Adriaan
On 01.10.25 12:59, 'Andreas Naumann' via isar-users wrote:
> Fixing the recursive dependency issue of "all" packages, as proposed by
> Felix, showed that currently the Isar multiarch support seems to assume that
> custom dpkg recipes are always valid for the host as well as target architecure.
> Or, if they are not, Isar would make an effort to redirect if possible.
>
> However, there are situations where this is not the case, e.g. packages
> supporting a certain architecture only or packages intended for the host
> without full crosscompile compatibility.
>
> This series is to allow for such cases by supporting DPKG_ARCH being set
> to a specific architecture if it is not truly "all" or "any".
>
> The first patch fixes unnecessary, possibly incompatible packages being added
> to the overall rootfs dependency chain. It's also sort of an alternative solution
> to the fix that Felix provided in his original patch which I took the
> freedom to rework to contain the recursive dependency fix only.
> The reason I'm going another way is that I was looking for a way to
> generically handle all incompatible packages, not just "Architecutre: all".
> Of course this comes with the "drawback" that "all" packages, suited to be
> compiled in and only for -native, need to be added with their -native name
> whereever they are depended upon.
>
> As for reverting recrdeptask: IMHO, the alternative to keeping it would be to
> not being able to use cross-package inter-task dependencies, like Jan's
> patch for avoiding the duplicate creation of the dpkg-source package
> does. That would be kind of limiting.
> As for the cache related reasons for which recrdeptask was actually
> introduced: I could not find the do_prepare_build-A -> do_deploy-B
> dependency, but only do_deploy-A -> do_deploy-B. So I'd just hope that
> this is no longer a problem, but havnt invested testing effort to prove so.
>
> The image patch is preparational, so images are not unintentionally
> skipped by the actual main patch (#4) which handles incompatible
> packages.
> It was made before handling of packages with unset DPKG_ARCH variable
> was added, so it's no longer strictly needed, but may be worthwhile
> anyway.
>
>
>
>
> Andreas Naumann (4):
> rootfs: Do not recursively deploy every dependent package
> image: Do not inherit multiarch
> multiarch: Prevent providing incompatible native packages
> multiarch: Do not re-extend real -native recipes
>
> Felix Moessbauer' via isar-users (1):
> multiarch: handle DPKG_ARCH=all case for transitive deps
>
> meta/classes/image.bbclass | 1 -
> meta/classes/multiarch.bbclass | 33 ++++++++++++++-------------------
> meta/classes/rootfs.bbclass | 19 ++++++++++++++++++-
> 3 files changed, 32 insertions(+), 21 deletions(-)
>
Adriaan, someone is touching your bits :)
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/3051e65f-e4b0-4729-8ac5-9c8dfb77a7ac%40siemens.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/5] image: Do not inherit multiarch
2025-10-02 12:09 ` 'Jan Kiszka' via isar-users
@ 2025-10-02 14:17 ` 'Andreas Naumann' via isar-users
2025-10-02 14:55 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-02 14:17 UTC (permalink / raw)
To: Jan Kiszka, isar-users
Am 02.10.25 um 14:09 schrieb Jan Kiszka:
> On 01.10.25 12:59, 'Andreas Naumann' via isar-users wrote:
>> Images don't need multiarch functionality. Remove the inheritance.
>>
> Either you didn't test it, or the inheritance still comes implicitly
> because it IS needed: isar_multiarch_packages
>
> Jan
See below, I moved the function to rootfs.
Andreas
>> In order to keep the bb2deb conversion function in scope for the image class,
>> move it to rootfs, which it inherits from.
>>
>> Signed-off-by: Andreas Naumann <anaumann@emlix.com>
>> ---
>> meta/classes/image.bbclass | 1 -
>> meta/classes/multiarch.bbclass | 16 ----------------
>> meta/classes/rootfs.bbclass | 16 ++++++++++++++++
>> 3 files changed, 16 insertions(+), 17 deletions(-)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index 57e66632..354ec85e 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -62,7 +62,6 @@ DEPENDS += "${IMAGE_INSTALL}"
>> ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
>> ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
>>
>> -inherit multiarch
>> inherit essential
>>
>> ROOTFSDIR = "${IMAGE_ROOTFS}"
>> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
>> index ae465aec..5b67d779 100644
>> --- a/meta/classes/multiarch.bbclass
>> +++ b/meta/classes/multiarch.bbclass
>> @@ -101,19 +101,3 @@ python multiarch_virtclass_handler() {
>> }
>> addhandler multiarch_virtclass_handler
>> multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
>> -
>> -# function to convert bitbake targets to installable debian packages,
>> -# e.g., "hello-compat" to "hello:i386".
>> -def isar_multiarch_packages(var, d):
>> - bb_targets = (d.getVar(var) or '').split()
>> - packages = []
>> - compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
>> - host_arch = d.getVar('HOST_ARCH')
>> - for t in bb_targets:
>> - if t.endswith('-compat') and compat_distro_arch is not None:
>> - packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
>> - elif t.endswith('-native'):
>> - packages.append(t[:-len('-native')] + ':' + host_arch)
>> - else:
>> - packages.append(t)
>> - return ' '.join(packages)
>> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
>> index 53e60a81..f60be99c 100644
>> --- a/meta/classes/rootfs.bbclass
>> +++ b/meta/classes/rootfs.bbclass
>> @@ -632,3 +632,19 @@ python do_rootfs_install_setscene() {
>> sstate_setscene(d)
>> }
>> addtask do_rootfs_install_setscene
>> +
>> +# function to convert bitbake targets to installable debian packages,
>> +# e.g., "hello-compat" to "hello:i386".
>> +def isar_multiarch_packages(var, d):
>> + bb_targets = (d.getVar(var) or '').split()
>> + packages = []
>> + compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
>> + host_arch = d.getVar('HOST_ARCH')
>> + for t in bb_targets:
>> + if t.endswith('-compat') and compat_distro_arch is not None:
>> + packages.append(t[:-len('-compat')] + ':' + compat_distro_arch)
>> + elif t.endswith('-native'):
>> + packages.append(t[:-len('-native')] + ':' + host_arch)
>> + else:
>> + packages.append(t)
>> + return ' '.join(packages)
>
--
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/c59299b2-f6b8-40f7-bafe-f5e64db72094%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/5] image: Do not inherit multiarch
2025-10-02 14:17 ` 'Andreas Naumann' via isar-users
@ 2025-10-02 14:55 ` 'Jan Kiszka' via isar-users
2025-10-06 7:05 ` 'Andreas Naumann' via isar-users
0 siblings, 1 reply; 11+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-10-02 14:55 UTC (permalink / raw)
To: Andreas Naumann, isar-users
On 02.10.25 16:17, Andreas Naumann wrote:
>
> Am 02.10.25 um 14:09 schrieb Jan Kiszka:
>> On 01.10.25 12:59, 'Andreas Naumann' via isar-users wrote:
>>> Images don't need multiarch functionality. Remove the inheritance.
>>>
>> Either you didn't test it, or the inheritance still comes implicitly
>> because it IS needed: isar_multiarch_packages
>>
>> Jan
>
> See below, I moved the function to rootfs.
>
Then the description is highly misleading.
Jan
>
>
>>> In order to keep the bb2deb conversion function in scope for the
>>> image class,
>>> move it to rootfs, which it inherits from.
>>>
>>> Signed-off-by: Andreas Naumann <anaumann@emlix.com>
>>> ---
>>> meta/classes/image.bbclass | 1 -
>>> meta/classes/multiarch.bbclass | 16 ----------------
>>> meta/classes/rootfs.bbclass | 16 ++++++++++++++++
>>> 3 files changed, 16 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>> index 57e66632..354ec85e 100644
>>> --- a/meta/classes/image.bbclass
>>> +++ b/meta/classes/image.bbclass
>>> @@ -62,7 +62,6 @@ DEPENDS += "${IMAGE_INSTALL}"
>>> ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags
>>> --dirty --match 'v[0-9].[0-9]*'"
>>> ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
>>> -inherit multiarch
>>> inherit essential
>>> ROOTFSDIR = "${IMAGE_ROOTFS}"
>>> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/
>>> multiarch.bbclass
>>> index ae465aec..5b67d779 100644
>>> --- a/meta/classes/multiarch.bbclass
>>> +++ b/meta/classes/multiarch.bbclass
>>> @@ -101,19 +101,3 @@ python multiarch_virtclass_handler() {
>>> }
>>> addhandler multiarch_virtclass_handler
>>> multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
>>> -
>>> -# function to convert bitbake targets to installable debian packages,
>>> -# e.g., "hello-compat" to "hello:i386".
>>> -def isar_multiarch_packages(var, d):
>>> - bb_targets = (d.getVar(var) or '').split()
>>> - packages = []
>>> - compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
>>> - host_arch = d.getVar('HOST_ARCH')
>>> - for t in bb_targets:
>>> - if t.endswith('-compat') and compat_distro_arch is not None:
>>> - packages.append(t[:-len('-compat')] + ':' +
>>> compat_distro_arch)
>>> - elif t.endswith('-native'):
>>> - packages.append(t[:-len('-native')] + ':' + host_arch)
>>> - else:
>>> - packages.append(t)
>>> - return ' '.join(packages)
>>> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
>>> index 53e60a81..f60be99c 100644
>>> --- a/meta/classes/rootfs.bbclass
>>> +++ b/meta/classes/rootfs.bbclass
>>> @@ -632,3 +632,19 @@ python do_rootfs_install_setscene() {
>>> sstate_setscene(d)
>>> }
>>> addtask do_rootfs_install_setscene
>>> +
>>> +# function to convert bitbake targets to installable debian packages,
>>> +# e.g., "hello-compat" to "hello:i386".
>>> +def isar_multiarch_packages(var, d):
>>> + bb_targets = (d.getVar(var) or '').split()
>>> + packages = []
>>> + compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
>>> + host_arch = d.getVar('HOST_ARCH')
>>> + for t in bb_targets:
>>> + if t.endswith('-compat') and compat_distro_arch is not None:
>>> + packages.append(t[:-len('-compat')] + ':' +
>>> compat_distro_arch)
>>> + elif t.endswith('-native'):
>>> + packages.append(t[:-len('-native')] + ':' + host_arch)
>>> + else:
>>> + packages.append(t)
>>> + return ' '.join(packages)
>>
--
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/a1ee68d5-9f52-4429-a6d7-868fa5fda578%40siemens.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/5] image: Do not inherit multiarch
2025-10-02 14:55 ` 'Jan Kiszka' via isar-users
@ 2025-10-06 7:05 ` 'Andreas Naumann' via isar-users
0 siblings, 0 replies; 11+ messages in thread
From: 'Andreas Naumann' via isar-users @ 2025-10-06 7:05 UTC (permalink / raw)
To: Jan Kiszka, isar-users
Am 02.10.25 um 16:55 schrieb Jan Kiszka:
> On 02.10.25 16:17, Andreas Naumann wrote:
>> Am 02.10.25 um 14:09 schrieb Jan Kiszka:
>>> On 01.10.25 12:59, 'Andreas Naumann' via isar-users wrote:
>>>> Images don't need multiarch functionality. Remove the inheritance.
>>>>
>>> Either you didn't test it, or the inheritance still comes implicitly
>>> because it IS needed: isar_multiarch_packages
>>>
>>> Jan
>> See below, I moved the function to rootfs.
>>
> Then the description is highly misleading.
Ok, I'll change the description.
Would rootfs be an ok place for isar_multiarch_packages? I perceived it
to be a helper more or less.
Andreas
> Jan
>
>>
>>>> In order to keep the bb2deb conversion function in scope for the
>>>> image class,
>>>> move it to rootfs, which it inherits from.
>>>>
>>>> Signed-off-by: Andreas Naumann <anaumann@emlix.com>
>>>> ---
>>>> meta/classes/image.bbclass | 1 -
>>>> meta/classes/multiarch.bbclass | 16 ----------------
>>>> meta/classes/rootfs.bbclass | 16 ++++++++++++++++
>>>> 3 files changed, 16 insertions(+), 17 deletions(-)
>>>>
>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>> index 57e66632..354ec85e 100644
>>>> --- a/meta/classes/image.bbclass
>>>> +++ b/meta/classes/image.bbclass
>>>> @@ -62,7 +62,6 @@ DEPENDS += "${IMAGE_INSTALL}"
>>>> ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags
>>>> --dirty --match 'v[0-9].[0-9]*'"
>>>> ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
>>>> -inherit multiarch
>>>> inherit essential
>>>> ROOTFSDIR = "${IMAGE_ROOTFS}"
>>>> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/
>>>> multiarch.bbclass
>>>> index ae465aec..5b67d779 100644
>>>> --- a/meta/classes/multiarch.bbclass
>>>> +++ b/meta/classes/multiarch.bbclass
>>>> @@ -101,19 +101,3 @@ python multiarch_virtclass_handler() {
>>>> }
>>>> addhandler multiarch_virtclass_handler
>>>> multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
>>>> -
>>>> -# function to convert bitbake targets to installable debian packages,
>>>> -# e.g., "hello-compat" to "hello:i386".
>>>> -def isar_multiarch_packages(var, d):
>>>> - bb_targets = (d.getVar(var) or '').split()
>>>> - packages = []
>>>> - compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
>>>> - host_arch = d.getVar('HOST_ARCH')
>>>> - for t in bb_targets:
>>>> - if t.endswith('-compat') and compat_distro_arch is not None:
>>>> - packages.append(t[:-len('-compat')] + ':' +
>>>> compat_distro_arch)
>>>> - elif t.endswith('-native'):
>>>> - packages.append(t[:-len('-native')] + ':' + host_arch)
>>>> - else:
>>>> - packages.append(t)
>>>> - return ' '.join(packages)
>>>> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
>>>> index 53e60a81..f60be99c 100644
>>>> --- a/meta/classes/rootfs.bbclass
>>>> +++ b/meta/classes/rootfs.bbclass
>>>> @@ -632,3 +632,19 @@ python do_rootfs_install_setscene() {
>>>> sstate_setscene(d)
>>>> }
>>>> addtask do_rootfs_install_setscene
>>>> +
>>>> +# function to convert bitbake targets to installable debian packages,
>>>> +# e.g., "hello-compat" to "hello:i386".
>>>> +def isar_multiarch_packages(var, d):
>>>> + bb_targets = (d.getVar(var) or '').split()
>>>> + packages = []
>>>> + compat_distro_arch = d.getVar('COMPAT_DISTRO_ARCH')
>>>> + host_arch = d.getVar('HOST_ARCH')
>>>> + for t in bb_targets:
>>>> + if t.endswith('-compat') and compat_distro_arch is not None:
>>>> + packages.append(t[:-len('-compat')] + ':' +
>>>> compat_distro_arch)
>>>> + elif t.endswith('-native'):
>>>> + packages.append(t[:-len('-native')] + ':' + host_arch)
>>>> + else:
>>>> + packages.append(t)
>>>> + return ' '.join(packages)
>
--
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/c9477c16-2de1-49f7-af08-73147d4805ed%40emlix.com.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-10-06 7:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-01 10:59 [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 1/5] rootfs: Do not recursively deploy every dependent package 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 2/5] multiarch: handle DPKG_ARCH=all case for transitive deps 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 3/5] image: Do not inherit multiarch 'Andreas Naumann' via isar-users
2025-10-02 12:09 ` 'Jan Kiszka' via isar-users
2025-10-02 14:17 ` 'Andreas Naumann' via isar-users
2025-10-02 14:55 ` 'Jan Kiszka' via isar-users
2025-10-06 7:05 ` 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 4/5] multiarch: Prevent providing incompatible native packages 'Andreas Naumann' via isar-users
2025-10-01 10:59 ` [PATCH 5/5] multiarch: Do not re-extend real -native recipes 'Andreas Naumann' via isar-users
2025-10-02 12:10 ` [RFC 0/5] Improving multiarch support for arch-incompatible packages 'Jan Kiszka' 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