From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
isar-users@googlegroups.com
Cc: stefan-koch@siemens.com, anaumann@emlix.com
Subject: Re: [PATCH v3 1/4] linux-custom: prefix profile names according to BuildProfileSpec
Date: Thu, 6 Nov 2025 17:55:01 +0100 [thread overview]
Message-ID: <52e9a304-eb51-41d7-a029-9bc060f50d4b@siemens.com> (raw)
In-Reply-To: <20251106141122.2887558-2-felix.moessbauer@siemens.com>
On 06.11.25 15:11, Felix Moessbauer wrote:
> We introduce custom profiles to control which packages are build from a
> custom kernel source package. To avoid collisions with upstream profile
> names, we have to use BuildProfileSpec compatible profile names [1].
>
> [1] https://wiki.debian.org/BuildProfileSpec#Registered_profile_names
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> .../linux/files/debian/control.tmpl | 16 ++++++++--------
> .../linux/files/debian/isar/install.tmpl | 2 +-
> meta/recipes-kernel/linux/linux-custom.inc | 17 +++++++++--------
> 3 files changed, 18 insertions(+), 17 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
> index 78e95105..01b1a63f 100644
> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> @@ -1,4 +1,4 @@
> -Source: linux-${KERNEL_NAME_PROVIDED}
> +Source: ${BPN}
Is this change related? Does it actually change anything in practice? If
so, the commit message should elaborate more.
> Section: kernel
> Priority: optional
> Maintainer: ${MAINTAINER}
> @@ -7,7 +7,7 @@ Homepage: http://www.kernel.org/
> Rules-Requires-Root: no
>
> Package: linux-image-${KERNEL_NAME_PROVIDED}
> -Build-Profiles: <kernel>
> +Build-Profiles: <pkg.${BPN}.kernel>
> Architecture: any
> Depends: ${KERNEL_DEBIAN_DEPENDS}
> Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> @@ -15,7 +15,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> files, version: @KR@.
>
> Package: linux-headers-${KERNEL_NAME_PROVIDED}
> -Build-Profiles: <kernel>
> +Build-Profiles: <pkg.${BPN}.kernel>
> Architecture: any
> Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlibs:Depends}
> Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
> @@ -24,7 +24,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
> This is useful for people who need to build external modules
>
> Package: linux-libc-dev
> -Build-Profiles: <!nolibcdev kernel>
> +Build-Profiles: <!pkg.${BPN}.nolibcdev pkg.${BPN}.kernel>
> Section: devel
> Provides: linux-kernel-headers
> Architecture: ${KERNEL_LIBC_DEV_ARCH}
> @@ -33,7 +33,7 @@ Description: Linux support headers for userspace development
> are used by the installed headers for GNU glibc and other system libraries.
>
> Package: linux-libc-dev-${DISTRO_ARCH}-cross
> -Build-Profiles: <!nolibcdev cross !kbuild>
> +Build-Profiles: <!pkg.${BPN}.nolibcdev cross !pkg.${BPN}.kbuild>
> Section: devel
> Provides: linux-kernel-headers-${DISTRO_ARCH}-cross
> Architecture: all
> @@ -45,7 +45,7 @@ Description: Linux Kernel Headers for development (for cross-compiling)
> your kernel. Use linux-headers-* packages for that.
>
> Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
> -Build-Profiles: <kernel>
> +Build-Profiles: <pkg.${BPN}.kernel>
> Section: debug
> Architecture: any
> Description: Linux kernel debugging symbols for @KR@
> @@ -53,7 +53,7 @@ Description: Linux kernel debugging symbols for @KR@
> all the necessary debug symbols for the kernel and its modules.
>
> Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
> -Build-Profiles: <kbuild !cross>
> +Build-Profiles: <pkg.${BPN}.kbuild !cross>
> Architecture: any
> Depends: ${perl:Depends}, ${shlibs:Depends}
> Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
> @@ -61,7 +61,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
> This is useful for people who need to build external modules
>
> Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
> -Build-Profiles: <kbuild cross>
> +Build-Profiles: <pkg.${BPN}.kbuild cross>
> Architecture: any
> Multi-Arch: foreign
> Depends: ${perl:Depends}, ${shlibs:Depends}
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> index fe0bd810..a1b00d39 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> @@ -168,7 +168,7 @@ headers_check() {
> libc_headers() {
> mkdir -p ${deb_libc_hdr_dir}
> arches="${DISTRO_ARCH}"
> - if echo "${DEB_BUILD_PROFILES}" | grep -q "libcdev-arch-all"; then
> + if echo "${DEB_BUILD_PROFILES}" | grep -q "pkg.${BPN}.libcdev-arch-all"; then
> arches="amd64 armhf arm64 i386 mipsel riscv64"
> fi
> for distro_arch in ${arches}; do
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index f2892921..1f46bb31 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -28,7 +28,7 @@ KBUILD_DEPENDS ?= "build-essential:native, \
> flex, \
> git, \
> kmod, \
> - linux-image-${KERNEL_NAME_PROVIDED}:${DISTRO_ARCH} <kbuild !kernel>, \
> + linux-image-${KERNEL_NAME_PROVIDED}:${DISTRO_ARCH} <pkg.${BPN}.kbuild !pkg.${BPN}.kernel>, \
> rsync,"
>
> KERNEL_DEBIAN_DEPENDS ?= "initramfs-tools | linux-initramfs-tool, \
> @@ -73,6 +73,7 @@ TEMPLATE_FILES += " \
> "
>
> TEMPLATE_VARS += " \
> + BPN \
> KBUILD_DEPENDS \
> KERNEL_ARCH \
> KERNEL_DEBIAN_DEPENDS \
> @@ -114,17 +115,17 @@ python() {
> }
>
> # Default profiles and provides
> -BUILD_PROFILES = "kernel kbuild"
> +BUILD_PROFILES = "pkg.${BPN}.kernel pkg.${BPN}.kbuild"
>
> # We only offer the -kbuildtarget variant when actually cross compiling
> BBCLASSEXTEND:append:cross-profile = " kbuildtarget"
>
> # When cross-profile is active:
> # build only kernel (including config) with the default variant of the recipe
> -BUILD_PROFILES:cross-profile = "kernel"
> +BUILD_PROFILES:cross-profile = "pkg.${BPN}.kernel"
>
> # -native: kbuild package for host
> -BUILD_PROFILES:class-native = "kbuild"
> +BUILD_PROFILES:class-native = "pkg.${BPN}.kbuild"
> RECIPE_PROVIDES:class-native = " \
> linux-headers-${KERNEL_NAME_PROVIDED} \
> linux-kbuild-${KERNEL_NAME_PROVIDED}"
> @@ -135,7 +136,7 @@ RECIPE_PROVIDES:class-native = " \
> DEPENDS:class-native += "${BPN}-pseudo"
>
> # -kbuildtarget: kbuild package for target, enforcing non-cross-build
> -BUILD_PROFILES:class-kbuildtarget = "kbuild"
> +BUILD_PROFILES:class-kbuildtarget = "pkg.${BPN}.kbuild"
> RECIPE_PROVIDES:class-kbuildtarget = " \
> linux-headers-${KERNEL_NAME_PROVIDED} \
> linux-kbuild-${KERNEL_NAME_PROVIDED}"
> @@ -214,12 +215,12 @@ def config_fragments(d):
> def get_additional_build_profiles(d):
> profiles = d.getVar('BASE_DISTRO')
> if not bb.utils.to_boolean(d.getVar('KERNEL_LIBC_DEV_DEPLOY')):
> - profiles += ' nolibcdev'
> + profiles += ' pkg.{}.nolibcdev'.format(d.getVar('BPN'))
> elif bb.utils.to_boolean(d.getVar('KERNEL_LIBC_DEV_ARCH_ALL')):
> - profiles += ' libcdev-arch-all'
> + profiles += ' pkg.{}.libcdev-arch-all'.format(d.getVar('BPN'))
> return profiles
>
> -KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'libcdev-arch-all', 'all\nMulti-Arch: foreign', 'any', d) }"
> +KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', 'any', d) }"
> DEB_BUILD_PROFILES += "${@get_additional_build_profiles(d)}"
>
> do_prepare_build:prepend() {
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/52e9a304-eb51-41d7-a029-9bc060f50d4b%40siemens.com.
next prev parent reply other threads:[~2025-11-06 16:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 14:11 [PATCH v3 0/4] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
2025-11-06 14:11 ` [PATCH v3 1/4] linux-custom: prefix profile names according to BuildProfileSpec 'Felix Moessbauer' via isar-users
2025-11-06 16:55 ` 'Jan Kiszka' via isar-users [this message]
2025-11-07 8:19 ` 'MOESSBAUER, Felix' via isar-users
2025-11-06 14:11 ` [PATCH v3 2/4] linux-custom: fix name collision on cross profile 'Felix Moessbauer' via isar-users
2025-11-06 14:11 ` [PATCH v3 3/4] do not add cross profile when building native package 'Felix Moessbauer' via isar-users
2025-11-06 14:11 ` [PATCH v3 4/4] propagate distro-specific dependencies of arch all packages 'Felix Moessbauer' via isar-users
2025-11-07 10:09 ` [PATCH v3 0/4] " Zhihang Wei
2025-11-07 10:20 ` 'MOESSBAUER, Felix' via isar-users
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=52e9a304-eb51-41d7-a029-9bc060f50d4b@siemens.com \
--to=isar-users@googlegroups.com \
--cc=anaumann@emlix.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=stefan-koch@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