[1/2] linux-custom.inc: drop library dependencies from kernel headers

Message ID 20250822120141.855793-1-Quirin.Gylstorff@siemens.com
State Superseded, archived
Headers show
Series [1/2] linux-custom.inc: drop library dependencies from kernel headers | expand

Commit Message

Quirin Gylstorff Aug. 22, 2025, noon UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

The upstream headers do not have dependencies to the runtime libraries.
The ${shlibs:Depends} macro will correctly generate the necessary
dependencies.

libssl is only used in extract-cert which is necessary during the kerneln build
if CONFIG_SYSTEM_TRUSTED_KEYRING is enabled.
This config element is not necessary for the module build
and is therefore removed from the kbuild packages.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 meta/recipes-kernel/linux/linux-custom.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Jan Kiszka Aug. 22, 2025, 12:29 p.m. UTC | #1
On 22.08.25 14:00, 'Quirin Gylstorff' via isar-users wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> The upstream headers do not have dependencies to the runtime libraries.
> The ${shlibs:Depends} macro will correctly generate the necessary
> dependencies.
> 
> libssl is only used in extract-cert which is necessary during the kerneln build
> if CONFIG_SYSTEM_TRUSTED_KEYRING is enabled.
> This config element is not necessary for the module build
> and is therefore removed from the kbuild packages.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  meta/recipes-kernel/linux/linux-custom.inc | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index 01e9bff7..ca90c4e9 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -35,12 +35,7 @@ KERNEL_DEBIAN_DEPENDS ?= "initramfs-tools | linux-initramfs-tool, \
>                            kmod, \
>                            linux-base (>= 4.3~),"
>  
> -LIBSSL_DEP = "libssl3"
> -LIBSSL_DEP:buster = "libssl1.1"
> -LIBSSL_DEP:bullseye = "libssl1.1"
> -
> -KERNEL_HEADERS_DEBIAN_DEPENDS ?= "libc6, \
> -                                  ${LIBSSL_DEP},"
> +KERNEL_HEADERS_DEBIAN_DEPENDS ?= ""
>  
>  KERNEL_LIBC_DEV_ARCH_ALL = "0"
>  KERNEL_LIBC_DEV_ARCH_ALL:trixie = "1"

Patch ordering: Fix the shlibs thing in patch 2 first so that you can
safely drop the THEN no longer needed header deps.

Jan

Patch

diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 01e9bff7..ca90c4e9 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -35,12 +35,7 @@  KERNEL_DEBIAN_DEPENDS ?= "initramfs-tools | linux-initramfs-tool, \
                           kmod, \
                           linux-base (>= 4.3~),"
 
-LIBSSL_DEP = "libssl3"
-LIBSSL_DEP:buster = "libssl1.1"
-LIBSSL_DEP:bullseye = "libssl1.1"
-
-KERNEL_HEADERS_DEBIAN_DEPENDS ?= "libc6, \
-                                  ${LIBSSL_DEP},"
+KERNEL_HEADERS_DEBIAN_DEPENDS ?= ""
 
 KERNEL_LIBC_DEV_ARCH_ALL = "0"
 KERNEL_LIBC_DEV_ARCH_ALL:trixie = "1"