* [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb [not found] <004901d1785c$fb27d0f0$f17772d0$@neuf.fr> @ 2016-03-07 10:42 ` Herve Jourdain 2016-03-07 11:47 ` Anders Darander 0 siblings, 1 reply; 6+ messages in thread From: Herve Jourdain @ 2016-03-07 10:42 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 4266 bytes --] Systemd: - RESOLVED depends on GCRYPT, so GCRYPT should be enabled if RESOLVED is enabled - ${PN}-binfmt should be added to SYSTEMD_PACKAGES only if binfmt is enabled Without this patch, build fails when gcrypt is not in PACKAGECONFIG, but resolved is, or when binfmt is not in PACKAGECONFIG. Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr <mailto:herve.jourdain@neuf.fr> > --- diff --git a/meta/recipes-core/systemd/systemd_229.bb b/meta/recipes-core/systemd/systemd_229.bb index 16af0ac..6523e0a 100644 --- a/meta/recipes-core/systemd/systemd_229.bb +++ b/meta/recipes-core/systemd/systemd_229.bb @@ -97,11 +97,13 @@ PACKAGECONFIG_remove_libc-musl = "smack" PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" # Sign the journal for anti-tampering -PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of PACKAGECONFIG - done in EXTRA_OECONF +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt" PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup" PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd" PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils" -PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is in PACKAGECONFIG +PACKAGECONFIG[resolved] = "--enable-resolved --enable-gcrypt,--disable-resolved,libgcrypt" PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" PACKAGECONFIG[machined] = "--enable-machined,--disable-machined" PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight" @@ -180,6 +182,9 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ --with-firmware-path=/lib/firmware \ --with-testdir=${PTEST_PATH} \ " +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of PACKAGECONFIG +EXTRA_OECONF += "${@bb.utils.contains_any('PACKAGECONFIG', 'resolved gcrypt', '', '--disable-gcrypt', d)} <mailto:$%7b@bb.utils.contains_any('PACKAGECONFIG',%20'resolved%20gcrypt',%2 0'',%20'--disable-gcrypt',%20d)%7d> " + # per the systemd README, define VALGRIND=1 to run under valgrind CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)} <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'valgrind',%20'%20-DVALGRI ND=1',%20'',%20d)%7d> " @@ -196,6 +201,10 @@ do_configure_prepend() { else cp -r ${S}/units ${S}/units.pre_sed fi + if [ ${@bb.utils.contains('PACKAGECONFIG <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'resolved', 'true', 'false', d)} -a \ + ! ${@bb.utils.contains('PACKAGECONFIG <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'gcrypt', 'true', 'false', d)} ]; then + PACKAGECONFIG_append = "gcrypt" + fi } do_install() { @@ -298,8 +307,10 @@ PACKAGES =+ "\ ${PN}-extra-utils \ " -SYSTEMD_PACKAGES = "${PN}-binfmt" -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" +#SYSTEMD_PACKAGES = "${PN}-binfmt" +#SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'$%7bPN%7d-bin fmt',%20'',%20d)%7d> " +SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'systemd-binfmt.service', '', d)} <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'systemd-binfm t.service',%20'',%20d)%7d> " USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)} <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'microhttpd',%20'--system% 20-d%20/%20-M%20--shell%20/bin/nologin%20systemd-journal-gateway;',%20'',%20 d)%7d> " [-- Attachment #2: Type: text/html, Size: 11125 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb 2016-03-07 10:42 ` [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb Herve Jourdain @ 2016-03-07 11:47 ` Anders Darander 2016-03-07 12:01 ` Herve Jourdain 2016-03-07 12:29 ` Martin Jansa 0 siblings, 2 replies; 6+ messages in thread From: Anders Darander @ 2016-03-07 11:47 UTC (permalink / raw) To: Herve Jourdain; +Cc: openembedded-core (Resending as it didn't go to the list). Thanks! I've just ran into this myself this morning. A few comments are inlined. * Herve Jourdain <herve.jourdain@neuf.fr> [160307 11:51]: > # Sign the journal for anti-tampering > -PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" Please, keep this line as it is. If gcrypt isn't enabled, we need to pass --disable-gcrypt. Tnus, it should be part of this line. > +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt > are NOT part of PACKAGECONFIG - done in EXTRA_OECONF Remove the comment. > +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt" As above, keep the original line. > -PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" > +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is in > PACKAGECONFIG Either keep this comment, and keep enabling gcrypt. Though, I'd prefer to follow the precedence of importd, and just have the comment stating what you need to enable. > +PACKAGECONFIG[resolved] = "--enable-resolved > --enable-gcrypt,--disable-resolved,libgcrypt" No, don't add --enable-gcrypt to the resolved PACKAGECONFIG. > +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt > are NOT part of PACKAGECONFIG > +EXTRA_OECONF += "${@bb.utils.contains_any('PACKAGECONFIG', 'resolved > gcrypt', '', '--disable-gcrypt', d)} > <mailto:$%7b@bb.utils.contains_any('PACKAGECONFIG',%20'resolved%20gcrypt',%2 > 0'',%20'--disable-gcrypt',%20d)%7d> " Skip this part. > + if [ ${@bb.utils.contains('PACKAGECONFIG > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'resolved', 'true', > 'false', d)} -a \ > + ! ${@bb.utils.contains('PACKAGECONFIG > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'gcrypt', 'true', 'false', > d)} ]; then > + PACKAGECONFIG_append = "gcrypt" > + fi Isn't this too late? (I've not runtime tested this). If you go the route of modifying PACKAGECONFIG automatically, I'd prefer an anonymous python funtion doing this at the recipe processing stage. > -SYSTEMD_PACKAGES = "${PN}-binfmt" > -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" > +#SYSTEMD_PACKAGES = "${PN}-binfmt" > +#SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" > +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', > '${PN}-binfmt', '', d)} > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'$%7bPN%7d-bin > fmt',%20'',%20d)%7d> " > +SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', > 'binfmt', 'systemd-binfmt.service', '', d)} > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'systemd-binfm > t.service',%20'',%20d)%7d> " This looks good, but should probably be a separate patch. Cheers, Anders -- Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb 2016-03-07 11:47 ` Anders Darander @ 2016-03-07 12:01 ` Herve Jourdain 2016-03-07 12:11 ` Burton, Ross 2016-03-07 12:29 ` Martin Jansa 1 sibling, 1 reply; 6+ messages in thread From: Herve Jourdain @ 2016-03-07 12:01 UTC (permalink / raw) To: 'Anders Darander'; +Cc: openembedded-core Dear Anders, Regarding the binfmt part, you're right, it should be a second patch... I will resend it separately. For the gcrypt/resolved patch, I will rework it. One thing, though, the idea was to add the --disable-gcrypt in the EXTRA_OECONF, if neither gcrypt nor resolved are enabled. Hence the removal of "--disable-gcrypt" in the PACKAGECONFIG[gcrypt] line... That seemed easier at the time, but I'll try to find a different way to achieve this. This patch seems to build/work fine on my system, but I'll try to find a better one. Thanks, Herve -----Original Message----- From: Anders Darander [mailto:anders@chargestorm.se] Sent: lundi 7 mars 2016 12:47 To: Herve Jourdain <herve.jourdain@neuf.fr> Cc: openembedded-core@lists.openembedded.org Subject: Re: [OE-core] [oe-core][systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb (Resending as it didn't go to the list). Thanks! I've just ran into this myself this morning. A few comments are inlined. * Herve Jourdain <herve.jourdain@neuf.fr> [160307 11:51]: > # Sign the journal for anti-tampering > -PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" Please, keep this line as it is. If gcrypt isn't enabled, we need to pass --disable-gcrypt. Tnus, it should be part of this line. > +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and > +gcrypt > are NOT part of PACKAGECONFIG - done in EXTRA_OECONF Remove the comment. > +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt" As above, keep the original line. > -PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" > +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is > +in > PACKAGECONFIG Either keep this comment, and keep enabling gcrypt. Though, I'd prefer to follow the precedence of importd, and just have the comment stating what you need to enable. > +PACKAGECONFIG[resolved] = "--enable-resolved > --enable-gcrypt,--disable-resolved,libgcrypt" No, don't add --enable-gcrypt to the resolved PACKAGECONFIG. > +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and > +gcrypt > are NOT part of PACKAGECONFIG > +EXTRA_OECONF += "${@bb.utils.contains_any('PACKAGECONFIG', 'resolved > gcrypt', '', '--disable-gcrypt', d)} > <mailto:$%7b@bb.utils.contains_any('PACKAGECONFIG',%20'resolved%20gcry > pt',%2 > 0'',%20'--disable-gcrypt',%20d)%7d> " Skip this part. > + if [ ${@bb.utils.contains('PACKAGECONFIG > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'resolved', 'true', > 'false', d)} -a \ > + ! ${@bb.utils.contains('PACKAGECONFIG > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'gcrypt', 'true', > 'false', d)} ]; then > + PACKAGECONFIG_append = "gcrypt" > + fi Isn't this too late? (I've not runtime tested this). If you go the route of modifying PACKAGECONFIG automatically, I'd prefer an anonymous python funtion doing this at the recipe processing stage. > -SYSTEMD_PACKAGES = "${PN}-binfmt" > -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" > +#SYSTEMD_PACKAGES = "${PN}-binfmt" > +#SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" > +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', > '${PN}-binfmt', '', d)} > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'$%7bPN% > 7d-bin > fmt',%20'',%20d)%7d> " > +SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', > 'binfmt', 'systemd-binfmt.service', '', d)} > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'systemd > -binfm > t.service',%20'',%20d)%7d> " This looks good, but should probably be a separate patch. Cheers, Anders -- Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb 2016-03-07 12:01 ` Herve Jourdain @ 2016-03-07 12:11 ` Burton, Ross 2016-03-07 12:17 ` Anders Darander 0 siblings, 1 reply; 6+ messages in thread From: Burton, Ross @ 2016-03-07 12:11 UTC (permalink / raw) To: Herve Jourdain; +Cc: Anders Darander, OE-core [-- Attachment #1: Type: text/plain, Size: 652 bytes --] On 7 March 2016 at 12:01, Herve Jourdain <herve.jourdain@neuf.fr> wrote: > For the gcrypt/resolved patch, I will rework it. > One thing, though, the idea was to add the --disable-gcrypt in the > EXTRA_OECONF, if neither gcrypt nor resolved are enabled. > Hence the removal of "--disable-gcrypt" in the PACKAGECONFIG[gcrypt] > line... > That seemed easier at the time, but I'll try to find a different way to > achieve this. > Personally I prefer less magic in recipes, and if there are dependencies between PACKAGECONFIG flags then ensure that the default options actually build and that any dependencies are clearly commented. Ross [-- Attachment #2: Type: text/html, Size: 1075 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb 2016-03-07 12:11 ` Burton, Ross @ 2016-03-07 12:17 ` Anders Darander 0 siblings, 0 replies; 6+ messages in thread From: Anders Darander @ 2016-03-07 12:17 UTC (permalink / raw) To: OE-core * Burton, Ross <ross.burton@intel.com> [160307 13:11]: > On 7 March 2016 at 12:01, Herve Jourdain <herve.jourdain@neuf.fr> wrote: > > For the gcrypt/resolved patch, I will rework it. > > One thing, though, the idea was to add the --disable-gcrypt in the > > EXTRA_OECONF, if neither gcrypt nor resolved are enabled. > > Hence the removal of "--disable-gcrypt" in the PACKAGECONFIG[gcrypt] > > line... > > That seemed easier at the time, but I'll try to find a different way to > > achieve this. > Personally I prefer less magic in recipes, and if there are dependencies > between PACKAGECONFIG flags then ensure that the default options actually > build and that any dependencies are clearly commented. That's my preference as well, as might be seen from my first reply. Look at the importd feature as an example. If we should have magic, then it should be on PACKAGECONFIG, though. Cheers, Anders -- Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb 2016-03-07 11:47 ` Anders Darander 2016-03-07 12:01 ` Herve Jourdain @ 2016-03-07 12:29 ` Martin Jansa 1 sibling, 0 replies; 6+ messages in thread From: Martin Jansa @ 2016-03-07 12:29 UTC (permalink / raw) To: Herve Jourdain, openembedded-core [-- Attachment #1: Type: text/plain, Size: 3963 bytes --] On Mon, Mar 07, 2016 at 12:47:09PM +0100, Anders Darander wrote: > (Resending as it didn't go to the list). > > Thanks! > > I've just ran into this myself this morning. > > A few comments are inlined. > > * Herve Jourdain <herve.jourdain@neuf.fr> [160307 11:51]: > > > # Sign the journal for anti-tampering > > > -PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" > > Please, keep this line as it is. If gcrypt isn't enabled, we need to > pass --disable-gcrypt. Tnus, it should be part of this line. > > > +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt > > are NOT part of PACKAGECONFIG - done in EXTRA_OECONF > > Remove the comment. > > > +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt" > > As above, keep the original line. > > > > -PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" > > > +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is in > > PACKAGECONFIG > > Either keep this comment, and keep enabling gcrypt. > > Though, I'd prefer to follow the precedence of importd, and just have > the comment stating what you need to enable. I agree, I've updated all layers are care about to enable gcrypt when enabling resolved. It's pity that there isn't easy way to declaratively express dependencies between PACKAGECONFIGs (or even required PACKAGECONFIGs used in dependencies - or version of dependencies) like e.g. gentoo's USE flags do, but documenting this is imho better than each recipe introducing some (usually different) automagic to try to autoenable right combination. > > +PACKAGECONFIG[resolved] = "--enable-resolved > > --enable-gcrypt,--disable-resolved,libgcrypt" > > No, don't add --enable-gcrypt to the resolved PACKAGECONFIG. > > > > +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt > > are NOT part of PACKAGECONFIG > > > +EXTRA_OECONF += "${@bb.utils.contains_any('PACKAGECONFIG', 'resolved > > gcrypt', '', '--disable-gcrypt', d)} > > <mailto:$%7b@bb.utils.contains_any('PACKAGECONFIG',%20'resolved%20gcrypt',%2 > > 0'',%20'--disable-gcrypt',%20d)%7d> " > > Skip this part. > > > > + if [ ${@bb.utils.contains('PACKAGECONFIG > > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'resolved', 'true', > > 'false', d)} -a \ > > > + ! ${@bb.utils.contains('PACKAGECONFIG > > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG> ', 'gcrypt', 'true', 'false', > > d)} ]; then > > > + PACKAGECONFIG_append = "gcrypt" > > > + fi > > Isn't this too late? (I've not runtime tested this). > > If you go the route of modifying PACKAGECONFIG automatically, I'd prefer > an anonymous python funtion doing this at the recipe processing stage. > > > > -SYSTEMD_PACKAGES = "${PN}-binfmt" > > > -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" > > > +#SYSTEMD_PACKAGES = "${PN}-binfmt" > > > +#SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" > > > +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', > > '${PN}-binfmt', '', d)} > > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'$%7bPN%7d-bin > > fmt',%20'',%20d)%7d> " > > > +SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', > > 'binfmt', 'systemd-binfmt.service', '', d)} > > <mailto:$%7b@bb.utils.contains('PACKAGECONFIG',%20'binfmt',%20'systemd-binfm > > t.service',%20'',%20d)%7d> " > > This looks good, but should probably be a separate patch. > > Cheers, > Anders > > -- > Anders Darander, Senior System Architect > ChargeStorm AB / eStorm AB > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 188 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-07 12:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <004901d1785c$fb27d0f0$f17772d0$@neuf.fr>
2016-03-07 10:42 ` [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb Herve Jourdain
2016-03-07 11:47 ` Anders Darander
2016-03-07 12:01 ` Herve Jourdain
2016-03-07 12:11 ` Burton, Ross
2016-03-07 12:17 ` Anders Darander
2016-03-07 12:29 ` Martin Jansa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox