]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
opkg: add PACKAGECONFIG options for acl and xattr
authorEtienne Cordonnier <ecordonnier@snap.com>
Wed, 3 Dec 2025 10:25:14 +0000 (11:25 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Dec 2025 17:54:25 +0000 (17:54 +0000)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/opkg/opkg_0.9.0.bb

index f021fd9b5abe9c8c50cdca4a8fb6ea5a824c8fe5..7551f1bc49d255c7f364861da4c0417b1d272a37 100644 (file)
@@ -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"