some dependencies in systemd seem not to be taken into account in systemd_229.bb
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 some dependencies in systemd seem not to be taken into account in systemd_229.bb
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.
<mailto:[email protected]> >
---
(quoted diff) +0 -0
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:$%[email protected]_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:$%[email protected]('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:$%[email protected]('PACKAGECONFIG> ', 'resolved', 'true', 'false', d)} -a \
+ ! ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('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:$%[email protected]('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:$%[email protected]('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:$%[email protected]('PACKAGECONFIG',%20'microhttpd',%20'--system% 20-d%20/%20-M%20--shell%20/bin/nologin%20systemd-journal-gateway;',%20'',%20 d)%7d> "
(Resending as it didn't go to the list).
Thanks!
I've just ran into this myself this morning.
A few comments are inlined.
Quoted 3 lines · Herve Jourdain
# 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.
Quoted 2 lines
+# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of PACKAGECONFIG - done in
EXTRA_OECONF
Remove the comment.
Quoted 1 line
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt"
As above, keep the original line.
Quoted 4 lines
(quoted diff) +1
-1-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is inPACKAGECONFIG
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.
Quoted 2 lines
+PACKAGECONFIG[resolved] = "--enable-resolved
--enable-gcrypt,--disable-resolved,libgcrypt"
No, don't add --enable-gcrypt to the resolved PACKAGECONFIG.
Quoted 7 lines
+# 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:$%[email protected]_any('PACKAGECONFIG',%20'resolved%20gcrypt',%2 0'',%20'--disable-gcrypt',%20d)%7d> "
Skip this part.
Review
Quoted 11 lines
+ if [ ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('PACKAGECONFIG> ', 'resolved', 'true', 'false', d)} -a \+ ! ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('PACKAGECONFIG> ', 'gcrypt', 'true', 'false', d)} ]; then(quoted diff) +2
-0+ 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.
Quoted 13 lines
(quoted diff) +3
-2-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:$%[email protected]('PACKAGECONFIG',%20'binfmt',%20'$%7bPN%7d-bin fmt',%20'',%20d)%7d> "
Quoted 4 lines
+SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'systemd-binfmt.service', '', d)} <mailto:$%[email protected]('PACKAGECONFIG',%20'binfmt',%20'systemd-binfm t.service',%20'',%20d)%7d> "
This looks good, but should probably be a separate patch.
Cheers,
Anders
Signature · 2 lines
Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB
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:[email protected]]
Sent: lundi 7 mars 2016 12:47
To: Herve Jourdain <[email protected]>
Cc: [email protected]
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.
Quoted 3 lines · Herve Jourdain
# 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.
Quoted 3 lines
(quoted diff) +2
-0+# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and +gcryptare NOT part of PACKAGECONFIG - done in
EXTRA_OECONF
Remove the comment.
Quoted 1 line
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt"
As above, keep the original line.
Quoted 5 lines
(quoted diff) +2
-1-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is +inPACKAGECONFIG
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.
Quoted 2 lines
+PACKAGECONFIG[resolved] = "--enable-resolved
--enable-gcrypt,--disable-resolved,libgcrypt"
No, don't add --enable-gcrypt to the resolved PACKAGECONFIG.
Quoted 9 lines
(quoted diff) +2
-0+# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and +gcryptare NOT part of PACKAGECONFIG
+EXTRA_OECONF += "${@bb.utils.contains_any('PACKAGECONFIG', 'resolved gcrypt', '', '--disable-gcrypt', d)} <mailto:$%[email protected]_any('PACKAGECONFIG',%20'resolved%20gcry pt',%2
0'',%20'--disable-gcrypt',%20d)%7d> "
Skip this part.
Review
Quoted 11 lines
+ if [ ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('PACKAGECONFIG> ', 'resolved', 'true', 'false', d)} -a \+ ! ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('PACKAGECONFIG> ', 'gcrypt', 'true', 'false', d)} ]; then(quoted diff) +2
-0+ 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.
Quoted 14 lines
(quoted diff) +3
-2-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:$%[email protected]('PACKAGECONFIG',%20'binfmt',%20'$%7bPN% 7d-bin
fmt',%20'',%20d)%7d> "
Quoted 5 lines
+SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'systemd-binfmt.service', '', d)} <mailto:$%[email protected]('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
Quoted 8 lines · Herve Jourdain
For the gcrypt/resolved patch, I will rework it.
One thing, though, the idea was to add the --disable-gcrypt in theEXTRA_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
Quoted 11 lines · Burton, Ross
Quoted 7 lines · Herve Jourdain
For the gcrypt/resolved patch, I will rework it.
One thing, though, the idea was to add the --disable-gcrypt in theEXTRA_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.
Quoted 3 lines
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
Signature · 2 lines
Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB
Quoted 29 lines · Anders Darander
(Resending as it didn't go to the list).
Thanks!
I've just ran into this myself this morning.
A few comments are inlined.
Quoted 3 lines · Herve Jourdain
# 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.
Quoted 2 lines
+# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of PACKAGECONFIG - done in
EXTRA_OECONFRemove the comment.
Quoted 1 line
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt"
As above, keep the original line.
Quoted 1 line
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
Quoted 7 lines
Quoted 2 lines
+# 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.
Quoted 66 lines
Quoted 2 lines
+PACKAGECONFIG[resolved] = "--enable-resolved
--enable-gcrypt,--disable-resolved,libgcrypt"No, don't add --enable-gcrypt to the resolved PACKAGECONFIG.
Quoted 7 lines
+# 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:$%[email protected]_any('PACKAGECONFIG',%20'resolved%20gcrypt',%2 0'',%20'--disable-gcrypt',%20d)%7d> "
Skip this part.
Review
Quoted 11 lines
+ if [ ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('PACKAGECONFIG> ', 'resolved', 'true', 'false', d)} -a \+ ! ${@bb.utils.contains('PACKAGECONFIG
<mailto:$%[email protected]('PACKAGECONFIG> ', 'gcrypt', 'true', 'false', d)} ]; then(quoted diff) +2
-0+ PACKAGECONFIG_append = "gcrypt" + fiIsn'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.
Quoted 13 lines
(quoted diff) +3
-2-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:$%[email protected]('PACKAGECONFIG',%20'binfmt',%20'$%7bPN%7d-bin fmt',%20'',%20d)%7d> "
Quoted 4 lines
+SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'systemd-binfmt.service', '', d)} <mailto:$%[email protected]('PACKAGECONFIG',%20'binfmt',%20'systemd-binfm t.service',%20'',%20d)%7d> "
This looks good, but should probably be a separate patch.
Cheers,
AndersSignature · 7 lines
Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]