Re: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak dependencies, if enabled
On Fri, 2020-12-11 at 20:34 +, Peter Kjellerstedt wrote: > > -Original Message- > > From: openembedded-core@lists.openembedded.org > c...@lists.openembedded.org> On Behalf Of Luca Bocassi > > Sent: den 10 december 2020 13:53 > > To: openembedded-core@lists.openembedded.org > > Subject: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak > > dependencies, if enabled > > > > From: Luca Boccassi > > > > Some libraries are now dlopen'ed and skipped at runtime if > > not available. Add them to the RRECOMMENDS list, to allow > > users to exclude them for smaller images even if generally > > enabled at build time. > > > > Signed-off-by: Luca Boccassi > > --- > > meta/recipes-core/systemd/systemd_247.1.bb | 7 +++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/meta/recipes-core/systemd/systemd_247.1.bb > > b/meta/recipes-core/systemd/systemd_247.1.bb > > index f20e86d94b..951bffa23f 100644 > > --- a/meta/recipes-core/systemd/systemd_247.1.bb > > +++ b/meta/recipes-core/systemd/systemd_247.1.bb > > @@ -603,6 +603,13 @@ RRECOMMENDS_${PN} += "systemd-extra-utils \ > >systemd-conf \ > > " > > > > +# Weak dlopen-style dependencies: if explicitly requested via > > PACKAGECONFIG, recommend them > > +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'qrencode', > > 'qrencode', '', d)} \ > > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn', > > 'libidn', '', d)} \ > > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn2', > > 'libidn2', '', d)} \ > > + ${@bb.utils.contains('PACKAGECONFIG', 'cryptsetup', > > 'cryptsetup', '', d)} \ > > +" > > Please write this as: > > RRECOMMENDS_${PN} += "${@bb.utils.filter('PACKAGECONFIG', 'cryptsetup libidn > libidn2 qrencode', d)}" Andre suggested instead to add the rrecommends directly in the packageconfig definition. -- Kind regards, Luca Boccassi -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#145540): https://lists.openembedded.org/g/openembedded-core/message/145540 Mute This Topic: https://lists.openembedded.org/mt/78853215/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak dependencies, if enabled
On Fri, 2020-12-11 at 12:55 -0800, Andre McCurdy wrote: > On Thu, Dec 10, 2020 at 4:53 AM Luca Bocassi wrote: > > From: Luca Boccassi > > > > Some libraries are now dlopen'ed and skipped at runtime if > > not available. Add them to the RRECOMMENDS list, to allow > > users to exclude them for smaller images even if generally > > enabled at build time. > > This seems to imply that these options have some basic level of > functionality even when the corresponding shared library isn't found > at runtime. Is that right? Yes - or more precisely, the options themselves are not available at runtime without the related library, but fallback is graceful. Eg: you don't get a QR encoded printout when generating a recovery key, just the textual form, and a warning that libqrencode is missing. The system is designed to allow building just once with these features enabled, but then make the decision on whether to include the additional library when building the image. > If there's no functionality at all without the corresponding shared > library then these should just be regular dependencies (and users who > need smaller images should disable via the PACKAGECONFIG rather than > leaving the PACKAGECONFIG enabled but then excluding the shared > library). > > Note also that PACKAGECONFIG gives a way to express recommended > dependencies (the 5th argument). > > > https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG Thanks for the suggestion, will send a v2. -- Kind regards, Luca Boccassi -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#145538): https://lists.openembedded.org/g/openembedded-core/message/145538 Mute This Topic: https://lists.openembedded.org/mt/78853215/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak dependencies, if enabled
On Thu, Dec 10, 2020 at 4:53 AM Luca Bocassi wrote: > > From: Luca Boccassi > > Some libraries are now dlopen'ed and skipped at runtime if > not available. Add them to the RRECOMMENDS list, to allow > users to exclude them for smaller images even if generally > enabled at build time. This seems to imply that these options have some basic level of functionality even when the corresponding shared library isn't found at runtime. Is that right? If there's no functionality at all without the corresponding shared library then these should just be regular dependencies (and users who need smaller images should disable via the PACKAGECONFIG rather than leaving the PACKAGECONFIG enabled but then excluding the shared library). Note also that PACKAGECONFIG gives a way to express recommended dependencies (the 5th argument). https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG > Signed-off-by: Luca Boccassi > --- > meta/recipes-core/systemd/systemd_247.1.bb | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/meta/recipes-core/systemd/systemd_247.1.bb > b/meta/recipes-core/systemd/systemd_247.1.bb > index f20e86d94b..951bffa23f 100644 > --- a/meta/recipes-core/systemd/systemd_247.1.bb > +++ b/meta/recipes-core/systemd/systemd_247.1.bb > @@ -603,6 +603,13 @@ RRECOMMENDS_${PN} += "systemd-extra-utils \ >systemd-conf \ > " > > +# Weak dlopen-style dependencies: if explicitly requested via PACKAGECONFIG, > recommend them > +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'qrencode', > 'qrencode', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn', > 'libidn', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn2', > 'libidn2', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'cryptsetup', > 'cryptsetup', '', d)} \ > +" > + > INSANE_SKIP_${PN} += "dev-so libdir" > INSANE_SKIP_${PN}-dbg += "libdir" > INSANE_SKIP_${PN}-doc += " libdir" > -- > 2.29.2 > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#145483): https://lists.openembedded.org/g/openembedded-core/message/145483 Mute This Topic: https://lists.openembedded.org/mt/78853215/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak dependencies, if enabled
> -Original Message- > From: openembedded-core@lists.openembedded.org c...@lists.openembedded.org> On Behalf Of Luca Bocassi > Sent: den 10 december 2020 13:53 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak > dependencies, if enabled > > From: Luca Boccassi > > Some libraries are now dlopen'ed and skipped at runtime if > not available. Add them to the RRECOMMENDS list, to allow > users to exclude them for smaller images even if generally > enabled at build time. > > Signed-off-by: Luca Boccassi > --- > meta/recipes-core/systemd/systemd_247.1.bb | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/meta/recipes-core/systemd/systemd_247.1.bb > b/meta/recipes-core/systemd/systemd_247.1.bb > index f20e86d94b..951bffa23f 100644 > --- a/meta/recipes-core/systemd/systemd_247.1.bb > +++ b/meta/recipes-core/systemd/systemd_247.1.bb > @@ -603,6 +603,13 @@ RRECOMMENDS_${PN} += "systemd-extra-utils \ >systemd-conf \ > " > > +# Weak dlopen-style dependencies: if explicitly requested via PACKAGECONFIG, > recommend them > +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'qrencode', > 'qrencode', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn', > 'libidn', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'libidn2', > 'libidn2', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'cryptsetup', > 'cryptsetup', '', d)} \ > +" Please write this as: RRECOMMENDS_${PN} += "${@bb.utils.filter('PACKAGECONFIG', 'cryptsetup libidn libidn2 qrencode', d)}" > + > INSANE_SKIP_${PN} += "dev-so libdir" > INSANE_SKIP_${PN}-dbg += "libdir" > INSANE_SKIP_${PN}-doc += " libdir" > -- > 2.29.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#145482): https://lists.openembedded.org/g/openembedded-core/message/145482 Mute This Topic: https://lists.openembedded.org/mt/78853215/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH 5/5] systemd: add RRECOMMENDS for weak dependencies, if enabled
From: Luca Boccassi Some libraries are now dlopen'ed and skipped at runtime if not available. Add them to the RRECOMMENDS list, to allow users to exclude them for smaller images even if generally enabled at build time. Signed-off-by: Luca Boccassi --- meta/recipes-core/systemd/systemd_247.1.bb | 7 +++ 1 file changed, 7 insertions(+) diff --git a/meta/recipes-core/systemd/systemd_247.1.bb b/meta/recipes-core/systemd/systemd_247.1.bb index f20e86d94b..951bffa23f 100644 --- a/meta/recipes-core/systemd/systemd_247.1.bb +++ b/meta/recipes-core/systemd/systemd_247.1.bb @@ -603,6 +603,13 @@ RRECOMMENDS_${PN} += "systemd-extra-utils \ systemd-conf \ " +# Weak dlopen-style dependencies: if explicitly requested via PACKAGECONFIG, recommend them +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'qrencode', 'qrencode', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'libidn', 'libidn', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'libidn2', 'libidn2', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'cryptsetup', 'cryptsetup', '', d)} \ +" + INSANE_SKIP_${PN} += "dev-so libdir" INSANE_SKIP_${PN}-dbg += "libdir" INSANE_SKIP_${PN}-doc += " libdir" -- 2.29.2 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#145445): https://lists.openembedded.org/g/openembedded-core/message/145445 Mute This Topic: https://lists.openembedded.org/mt/78853215/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-