From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: isar-users <isar-users@googlegroups.com>,
Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com>
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>
Subject: Re: [PATCH] Revert "linux-custom: support to add linux-libc-dev package with kernel name"
Date: Thu, 11 Sep 2025 17:29:24 +0200 [thread overview]
Message-ID: <02c5a740-8649-44bf-9e65-929408a33c3a@siemens.com> (raw)
In-Reply-To: <eba14343-b97f-4652-9fc3-d244b98fc4f7@siemens.com>
On 11.09.25 17:14, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This reverts commit 6cf35fc33d11f7d3feb0472a40e79dbd3ee3d759.
>
> Besides having multiple implementations flaws, the general approach
> turned out to be incompatible with Debian's dependency management: We
> cannot replace a package A with a package B which only provides A. The
> resolver will continue to prefer package A when it is requested,
> explicitly or implicitly.
>
> If a build enables multiple kernels, it is recommended to ensure at
> recipe-level that only one kernel build enables KERNEL_LIBC_DEV_DEPLOY.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> I'm still open to solve this while keeping per-kernel package names, but
> someone needs to find a solution for the "B replaces A, while A is still
> around" problem.
>
> RECIPE-API-CHANGELOG.md | 7 +++++++
> doc/custom_kernel.md | 4 ++--
> meta/recipes-kernel/linux/files/debian/control.tmpl | 10 +++-------
> .../recipes-kernel/linux/files/debian/isar/common.tmpl | 2 +-
> .../linux/files/debian/isar/install.tmpl | 2 +-
> meta/recipes-kernel/linux/linux-custom.inc | 2 --
> 6 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index 02bc1d93..e0dcd91f 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -741,3 +741,10 @@ By setting `MS_TPM_20_REF_DIR` in an optee-ftpm recipe, it is now possible to
> use the new optee_ftpm code base from the OP-TEE project. That variable has to
> point to a subdir in `WORKDIR` which contains the unpacked ms-tpm-20-ref source
> code.
Sorry, this was based on top of
https://patchwork.isar-build.org/project/isar/patch/3aa2c323-6299-4f65-a077-4cb7456f5fcf@siemens.com/
which is pending upstream as well. If there is need to rebase, let me
know (but the other patch is ready for merge as well).
Jan
> +
> +### Revert enabling of linux-libc-dev package with KERNEL_NAME
> +
> +The change "Enable linux-libc-dev package with KERNEL_NAME" turned out to be
> +incompatible with how Debian selects dependencies. It is therefore necessary
> +to only enable `KERNEL_LIBC_DEV_DEPLOY` for a single kernel in case multiples
> +are configured via `KERNEL_NAMES`.
> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
> index 2dca577c..ce5f1bf7 100644
> --- a/doc/custom_kernel.md
> +++ b/doc/custom_kernel.md
> @@ -51,9 +51,9 @@ The linux-custom recipe provides support for:
>
> Only the `host` specific package is built automatically at cross builds.
>
> - 10. Produce a `linux-libc-dev-${KERNEL_NAME}` package to support user-land builds
> + 10. Produce a `linux-libc-dev` package to support user-land builds
>
> - 11. Only build/ship the `linux-libc-dev-${KERNEL_NAME}` package if instructed to
> + 11. Only build/ship the `linux-libc-dev` package if instructed to
> (`KERNEL_LIBC_DEV_DEPLOY` equals to `"1"`)
>
> 12. Support both native and cross compiles (`ISAR_CROSS_COMPILE`)
> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
> index a79b86c4..ec0da1ab 100644
> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> @@ -22,23 +22,19 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
> .
> This is useful for people who need to build external modules
>
> -Package: linux-libc-dev-${KERNEL_NAME_PROVIDED}
> +Package: linux-libc-dev
> Build-Profiles: <!nolibcdev kernel>
> Section: devel
> -Conflicts: linux-libc-dev
> -Provides: linux-libc-dev
> -Replaces: linux-libc-dev
> +Provides: linux-kernel-headers
> Architecture: ${KERNEL_LIBC_DEV_ARCH}
> Description: Linux support headers for userspace development
> This package provides userspaces headers from the Linux kernel. These headers
> are used by the installed headers for GNU glibc and other system libraries.
>
> -Package: linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED}
> +Package: linux-libc-dev-${DISTRO_ARCH}-cross
> Build-Profiles: <!nolibcdev cross !kbuild>
> Section: devel
> -Conflicts: linux-kernel-headers-${DISTRO_ARCH}-cross
> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross
> -Replaces: linux-kernel-headers-${DISTRO_ARCH}-cross
> Architecture: all
> Description: Linux Kernel Headers for development (for cross-compiling)
> This package provides headers from the Linux kernel. These headers
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> index b004214f..f9cc2f02 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> @@ -8,7 +8,7 @@ set -e
> ARCH=${KERNEL_ARCH}
> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
> -KERNEL_PKG_LIBC_HEADERS=linux-libc-dev-${KERNEL_NAME_PROVIDED}
> +KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
> KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross
> KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
> KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> index d7e711ef..fe0bd810 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> @@ -240,7 +240,7 @@ install_headers() {
> if dpkg --compare-versions "${krel}" "lt" "5.4.24"; then
> headers_check
> fi
> - [ -z ${kern_pkgs["linux-libc-dev-${KERNEL_NAME_PROVIDED}"]} ] || libc_headers
> + [ -z ${kern_pkgs["linux-libc-dev"]} ] || libc_headers
> kernel_headers
> }
>
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index 01e9bff7..07e49ce7 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -155,9 +155,7 @@ RECIPE_PROVIDES = " \
> linux-image-${KERNEL_NAME_PROVIDED} \
> linux-headers-${KERNEL_NAME_PROVIDED} \
> linux-libc-dev \
> - linux-libc-dev-${KERNEL_NAME_PROVIDED} \
> linux-libc-dev-${DISTRO_ARCH}-cross \
> - linux-libc-dev-${DISTRO_ARCH}-cross-${KERNEL_NAME_PROVIDED} \
> linux-image-${KERNEL_NAME_PROVIDED}-dbg \
> linux-kbuild-${KERNEL_NAME_PROVIDED} \
> ${BPN}-pseudo-native \
--
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/02c5a740-8649-44bf-9e65-929408a33c3a%40siemens.com.
prev parent reply other threads:[~2025-09-11 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 15:14 'Jan Kiszka' via isar-users
2025-09-11 15:29 ` 'Jan Kiszka' via isar-users [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02c5a740-8649-44bf-9e65-929408a33c3a@siemens.com \
--to=isar-users@googlegroups.com \
--cc=arulpandiyan.vadivel@siemens.com \
--cc=cedric.hombourger@siemens.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox