From ba3f3481aa30311926e32f42e82735998ae577f1 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 3 Jan 2024 16:43:29 +0100 Subject: [PATCH] libcap: prevent linking against libpam In theory, libcap's pam_cap module should use libpam's dlopen runtime linking mechanism, but starting in libcap 2.53, this changed in order to support distros that can only link it at build-time. Then, in 2.54, a compile-time option was added (FORCELINKPAM) to allow users to force the link or not. In the poky recipe for libcap, this option isn't set, so the library was getting linked by default, dragging all of its dependencies with it. For more info: https://bugzilla.kernel.org/show_bug.cgi?id=214023 Set the flag to "no" to avoid linking against libpam, removing its dependency from the recovery image and saving some space. Signed-off-by: Gabriel Valcazar --- meta-digi-dey/recipes-support/libcap/libcap_%.bbappend | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta-digi-dey/recipes-support/libcap/libcap_%.bbappend diff --git a/meta-digi-dey/recipes-support/libcap/libcap_%.bbappend b/meta-digi-dey/recipes-support/libcap/libcap_%.bbappend new file mode 100644 index 000000000..d36eea536 --- /dev/null +++ b/meta-digi-dey/recipes-support/libcap/libcap_%.bbappend @@ -0,0 +1,7 @@ +# Copyright (C) 2024 Digi International Inc. + +# Don't link the pam_cap module against libpam at build-time to avoid +# a libpam dependency in the recovery initramfs- +EXTRA_OEMAKE += " \ + FORCELINKPAM=no \ +"