public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	isar-users <isar-users@googlegroups.com>,
	Arulpandiyan Vadivel <arulpandiyan.vadivel@siemens.com>
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>
Subject: Re: [PATCH v2] Revert "linux-custom: support to add linux-libc-dev package with kernel name"
Date: Tue, 21 Oct 2025 17:20:54 +0200	[thread overview]
Message-ID: <d8f6e5ed-a2cf-45c3-97e6-4a977109fc9f@ilbers.de> (raw)
In-Reply-To: <fcae98da-6825-4037-8edc-ce657e6735b1@siemens.com>

Applied to next, thanks.

Best regards,
Zhihang

On 10/14/25 15:56, '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>
> ---
>
> Changes in v2:
>   - rebased over next
>
>   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 2930ade9..21da672f 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -761,3 +761,10 @@ the following variables in your image recipe. For example, to use German, add:
>   LOCALE_GEN = "de_DE.UTF-8 UTF-8\n"
>   LOCALE_DEFAULT = "de_DE.UTF-8"
>   ```
> +
> +### 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 112ff9bf..c27fe0c7 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 ca90c4e9..9da10c31 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -150,9 +150,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 \

-- 
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/d8f6e5ed-a2cf-45c3-97e6-4a977109fc9f%40ilbers.de.

      parent reply	other threads:[~2025-10-21 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 13:56 'Jan Kiszka' via isar-users
2025-10-20  8:40 ` 'Zdenek Bouska' via isar-users
2025-10-21 15:20 ` Zhihang Wei [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=d8f6e5ed-a2cf-45c3-97e6-4a977109fc9f@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=arulpandiyan.vadivel@siemens.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=isar-users@googlegroups.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