| Message ID | 20251127174140.906490-1-skandigraun@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | opkg: enable ACL only when present in DISTRO_FEATURES | expand |
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:
--- a/libopkg/opkg_archive.c
+++ b/libopkg/opkg_archive.c
@@ -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
On Thu, Nov 27, 2025 at 6:41 PM Gyorgy Sarvari <skandigraun@gmail.com>
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 <skandigraun@gmail.com>
> ---
> meta/recipes-devtools/opkg/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
> b/meta/recipes-devtools/opkg/opkg_0.9.0.bb
> index ed2f36d636..0b3bb3d24c 100644
> --- a/meta/recipes-devtools/opkg/opkg_0.9.0.bb
> +++ b/meta/recipes-devtools/opkg/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}')}"
>
On 11/27/25 19:22, Etienne Cordonnier wrote: > 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: > > --- a/libopkg/opkg_archive.c > +++ b/libopkg/opkg_archive.c > @@ -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? > Please feel free to send your patch - I just sent this as one possible solution, but I am not particularly attached to it :) > Étienne > > On Thu, Nov 27, 2025 at 6:41 PM Gyorgy Sarvari <skandigraun@gmail.com> > 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 <skandigraun@gmail.com> > --- > 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}')}" >
On Thu, 27 Nov 2025 at 19:26, Gyorgy Sarvari via lists.openembedded.org <skandigraun=gmail.com@lists.openembedded.org> wrote: > > On 11/27/25 19:22, Etienne Cordonnier wrote: > > 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
diff --git a/meta/recipes-devtools/opkg/opkg_0.9.0.bb b/meta/recipes-devtools/opkg/opkg_0.9.0.bb index ed2f36d636..0b3bb3d24c 100644 --- a/meta/recipes-devtools/opkg/opkg_0.9.0.bb +++ b/meta/recipes-devtools/opkg/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}')}"
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 <skandigraun@gmail.com> --- meta/recipes-devtools/opkg/opkg_0.9.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)