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 <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2024-01-03 16:43:29 +01:00
parent efd5f898d8
commit ba3f3481aa
1 changed files with 7 additions and 0 deletions

View File

@ -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 \
"