diff mbox series

[v2,2/2] opkg: add PACKAGECONFIG options for acl and xattr

Message ID 20251203102514.3969401-2-ecordonnier@snap.com
State New
Headers show
Series [v2,1/2] opkg: fix WITH_ACL and USE_ATTR being enabled per default | expand

Commit Message

Etienne Cordonnier Dec. 3, 2025, 10:25 a.m. UTC
From: Etienne Cordonnier <ecordonnier@snap.com>

During the last opkg update the application's ACL feature was
enabled by default, which requires acl recipe as a dependency,
however it wasn't enabled in the recipe, making compilation
fail when libacl wasn't in the sysroot.

This change adds a PACKAGECONFIG that makes acl an optional
dependency, and it is only enabled automatically if "acl"
is present in DISTRO_FEATURES.

It also enables xattr per default when the corresponding DISTRO_FEATURES
is enabled.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 meta/recipes-devtools/opkg/opkg_0.9.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/opkg/opkg_0.9.0.bb b/meta/recipes-devtools/opkg/opkg_0.9.0.bb
index f021fd9b5a..7551f1bc49 100644
--- a/meta/recipes-devtools/opkg/opkg_0.9.0.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.9.0.bb
@@ -32,7 +32,7 @@  inherit cmake pkgconfig ptest
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
-PACKAGECONFIG ??= "libsolv"
+PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}"
 
 PACKAGECONFIG[gpg] = "-DWITH_GPGME=ON,-DWITH_GPGME=OFF,\
     gnupg gpgme libgpg-error,\
@@ -41,6 +41,8 @@  PACKAGECONFIG[gpg] = "-DWITH_GPGME=ON,-DWITH_GPGME=OFF,\
 PACKAGECONFIG[curl] = "-DWITH_CURL=ON,-DWITH_CURL=OFF,curl"
 PACKAGECONFIG[ssl-curl] = "-DWITH_SSLCURL=ON,-DWITH_SSLCURL=OFF,curl openssl"
 PACKAGECONFIG[sha256] = "-DWITH_SHA256=ON,-DWITH_SHA256=OFF"
+PACKAGECONFIG[acl] = "-DWITH_ACL=ON, -DWITH_ACL=OFF, acl"
+PACKAGECONFIG[xattr] = "-DUSE_XATTR=ON, -DUSE_XATTR=OFF"
 PACKAGECONFIG[libsolv] = "-DUSE_SOLVER_LIBSOLV=ON,-DUSE_SOLVER_LIBSOLV=OFF,libsolv"
 
 EXTRA_OECMAKE = "-DWITH_ZSTD=ON"