opkg: enable ACL only when present in DISTRO_FEATURES
PATCH 1/1 opkg: enable ACL only when present in DISTRO_FEATURES
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.
--- meta/recipes-devtools/opkg/opkg_0.9.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/opkg/opkg_0.9.0.bb +2 -1
@@ -31,7 +31,7 @@ inherit cmake pkgconfig ptest target_localstatedir := "${localstatedir}" OPKGLIBDIR ??= "${target_localstatedir}/lib" -PACKAGECONFIG ??= "libsolv" +PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" PACKAGECONFIG[gpg] = "-DWITH_GPGME=ON,-DWITH_GPGME=OFF,\ gnupg gpgme libgpg-error,\
@@ -41,6 +41,7 @@ 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[libsolv] = "-DUSE_SOLVER_LIBSOLV=ON,-DUSE_SOLVER_LIBSOLV=OFF,libsolv" +PACKAGECONFIG[acl] = "-DUSE_ACL=ON, -DUSE_ACL=OFF, acl" EXTRA_OECMAKE = "-DWITH_ZSTD=ON" EXTRA_OECMAKE:append:class-native = " -DVARDIR=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} -DSYSCONFDIR=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
Hi Gyorgy,
I have sent a patch to opkg upstream to fix this issue (
https://lists.yoctoproject.org/g/opkg/message/175 ).
I think it would be better to either:
- add my opkg patch to oe-core and not merge yours
- or to keep your patch and not add mine, but at least add those lines as os-core patch:
libopkg/opkg_archive.c +0 -0
@@ -914,11 +914,11 @@ struct opkg_ar *ar_open_pkg_data_archive(const char
*filename)
ar->extract_flags = ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM |
ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK |ARCHIVE_EXTRACT_NO_OVERWRITE;
-#ifdef USE_ACL
+#if USE_ACL
ar->extract_flags |= ARCHIVE_EXTRACT_ACL;
#endif
What do you think?
Étienne
Quoted 43 lines · Gyorgy Sarvari
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.Signed-off-by Gyorgy Sarvari <[email protected]>--- meta/recipes-devtools/opkg/opkg_0.9.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-devtools/opkg/opkg_0.9.0.bb +1
-1@@ -31,7 +31,7 @@ inherit cmake pkgconfig ptest target_localstatedir := "${localstatedir}" OPKGLIBDIR ??= "${target_localstatedir}/lib" -PACKAGECONFIG ??= "libsolv" +PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl',d)}"
PACKAGECONFIG[gpg] = "-DWITH_GPGME=ON,-DWITH_GPGME=OFF,\ gnupg gpgme libgpg-error,\meta/recipes-devtools/opkg/opkg_0.9.0.bb +0
-0@@ -41,6 +41,7 @@ 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[libsolv] =
"-DUSE_SOLVER_LIBSOLV=ON,-DUSE_SOLVER_LIBSOLV=OFF,libsolv"meta/recipes-devtools/opkg/opkg_0.9.0.bb +1
-2+PACKAGECONFIG[acl] = "-DUSE_ACL=ON, -DUSE_ACL=OFF, acl" EXTRA_OECMAKE = "-DWITH_ZSTD=ON" EXTRA_OECMAKE:append:class-native = " -DVARDIR=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} -DSYSCONFDIR=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
Quoted 21 lines · Etienne Cordonnier
Hi Gyorgy,
I have sent a patch to opkg upstream to fix this issue
( https://lists.yoctoproject.org/g/opkg/message/175 ).
I think it would be better to either:
- add my opkg patch to oe-core and not merge yours
- or to keep your patch and not add mine, but at least add those lines as os-core patch:libopkg/opkg_archive.c +0
-0@@ -914,11 +914,11 @@ struct opkg_ar *ar_open_pkg_data_archive(const char *filename)ar->extract_flags =
ARCHIVE_EXTRACT_OWNER|ARCHIVE_EXTRACT_PERM|ARCHIVE_EXTRACT_TIME|ARCHIVE_EXTRACT_UNLINK|ARCHIVE_EXTRACT_NO_OVERWRITE;libopkg/opkg_archive.c +1
-1-#ifdef USE_ACL +#if USE_ACL ar->extract_flags |=
ARCHIVE_EXTRACT_ACL;
#endif
Quoted 2 lines
What do you think?
Please feel free to send your patch - I just sent this as one possible solution, but I am not particularly attached to it :)
Quoted 52 lines
Étienne
On Thu, Nov 27, 2025 at 6:41 PM Gyorgy Sarvari <[email protected]> wrote:
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. Signed-off-by: Gyorgy Sarvari <[email protected]> --- meta/recipes-devtools/opkg/opkg_0.9.0.bb <http://opkg_0.9.0.bb> | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/opkg/opkg_0.9.0.bb <http://opkg_0.9.0.bb> b/meta/recipes-devtools/opkg/opkg_0.9.0.bb <http://opkg_0.9.0.bb> index ed2f36d636..0b3bb3d24c 100644 --- a/meta/recipes-devtools/opkg/opkg_0.9.0.bb <http://opkg_0.9.0.bb> +++ b/meta/recipes-devtools/opkg/opkg_0.9.0.bb <http://opkg_0.9.0.bb> @@ -31,7 +31,7 @@ inherit cmake pkgconfig ptest target_localstatedir := "${localstatedir}" OPKGLIBDIR ??= "${target_localstatedir}/lib" -PACKAGECONFIG ??= "libsolv" +PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)}" PACKAGECONFIG[gpg] = "-DWITH_GPGME=ON,-DWITH_GPGME=OFF,\ gnupg gpgme libgpg-error,\ @@ -41,6 +41,7 @@ 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[libsolv] = "-DUSE_SOLVER_LIBSOLV=ON,-DUSE_SOLVER_LIBSOLV=OFF,libsolv" +PACKAGECONFIG[acl] = "-DUSE_ACL=ON, -DUSE_ACL=OFF, acl" EXTRA_OECMAKE = "-DWITH_ZSTD=ON" EXTRA_OECMAKE:append:class-native = " -DVARDIR=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} -DSYSCONFDIR=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
Quoted 11 lines · Gyorgy Sarvari via lists.openembedded.org
Quoted 7 lines · Etienne Cordonnier
Hi Gyorgy,
I have sent a patch to opkg upstream to fix this issue
( https://lists.yoctoproject.org/g/opkg/message/175 ).
I think it would be better to either:
- add my opkg patch to oe-core and not merge yours
- or to keep your patch and not add mine, but at least add those lines as os-core patch:Please feel free to send your patch - I just sent this as one possible solution, but I am not particularly attached to it :)
Option three: both patches are correct :) Regardless of upstream behaviour, adding missing packageconfigs to recipes is always desirable as it lowers the chance of build non-determinism and floating configurations.
Alex
"Option three: both patches are correct :)"
I agree in general, but in this particular case both patches are logically interfering with each other (one patch adds a PACKAGECONFIG option for USE_ACL, and the other patch renames USE_ACL to WITH_ACL).
I will wait a couple days in the hope that my opkg patch gets reviewed/merged upstream and then send a backport to oe-core.
Étienne
Quoted 24 lines · Alexander Kanavin
Quoted 5 lines · Gyorgy Sarvari via lists.openembedded.org
Quoted 3 lines · Etienne Cordonnier
Hi Gyorgy,
I have sent a patch to opkg upstream to fix this issue (Quoted 6 lines
Quoted 4 lines
I think it would be better to either:
- add my opkg patch to oe-core and not merge yours
- or to keep your patch and not add mine, but at least add those lines as os-core patch:Please feel free to send your patch - I just sent this as one possible solution, but I am not particularly attached to it :)
Option three: both patches are correct :) Regardless of upstream behaviour, adding missing packageconfigs to recipes is always desirable as it lowers the chance of build non-determinism and floating configurations.
Alex