uutils-coreutils: make selinux PACKAGECONFIG dependend on clang-layer
PATCH 1/1 uutils-coreutils: make selinux PACKAGECONFIG dependend on clang-layer
SELinux layer build fails if 'meta-clang' is not present, which shouldn't happen, since 'meta-clang' isn't a dependency.
If 'selinux' is on DISTRO_FEATURES, PACKAGECONFIG calls 'clang-native' even if uutils-coreutils is not being used (this is enough to make the recipe fails on parsing time if meta-clang is not present).
Make 'selinux' PACKAGECONFIG dependend on clang-layer, and print a warning if the user wants selinux support on uutils-coreutils but haven't add clang-layer.
---
Hello,
This is the result of a dissussion from a patch I sent to the master branch [0]. On master, this issue is actually already fixed, but not on Scarthgap.
This patch will behave like the same as before, however it now trigers a warning instead of forcing the user to have meta-clang layer added even if is not being used at all.
[0] https://lore.kernel.org/openembedded-devel/[email protected]/
Regards,
Hiago.
--- .../uutils-coreutils/uutils-coreutils_0.0.28.bb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb +9 -1
@@ -22,7 +22,15 @@ require ${BPN}-crates.inc PROVIDES = "coreutils" RPROVIDES:${PN} = "coreutils" -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'selinux', True, False, d): + if bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', True, False, d): + d.appendVar('PACKAGECONFIG', ' selinux') + else: + bb.warn("selinux is enabled but clang-layer is not in BBFILE_COLLECTIONS, " + "selinux support will be disabled. Add meta-clang to your bblayers.conf " + "if selinux support on uutils-coreutils is required.") +} PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
Signature · 1 line
2.47.3
+CC Khem Raj <[email protected]>
Quoted 15 lines · Hiago De Franco
SELinux layer build fails if 'meta-clang' is not present, which shouldn't happen, since 'meta-clang' isn't a dependency.
If 'selinux' is on
DISTRO_FEATURES, PACKAGECONFIG calls 'clang-native' even if uutils-coreutils is not being used (this is enough to make the recipe fails on parsing time if meta-clang is not present).Make 'selinux' PACKAGECONFIG dependend on clang-layer, and print a warning if the user wants selinux support on uutils-coreutils but haven't add clang-layer.
Signed-off-by Hiago De Franco <[email protected]>---
Hello,
Quoted 8 lines
This is the result of a dissussion from a patch I sent to the master branch [0]. On master, this issue is actually already fixed, but not on Scarthgap.
This patch will behave like the same as before, however it now trigers a warning instead of forcing the user to have meta-clang layer added even if is not being used at all.
[0] https://lore.kernel.org/openembedded-devel/[email protected]/
Hi,
just a friendly ping about this patch.
Thanks,
Hiago.
Quoted 32 lines
Regards,
Hiago.--- .../uutils-coreutils/uutils-coreutils_0.0.28.bb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.28.bb +9
-1@@ -22,7 +22,15 @@ require ${BPN}-crates.inc PROVIDES = "coreutils" RPROVIDES:${PN} = "coreutils" -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'selinux', True, False, d): + if bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', True, False, d): + d.appendVar('PACKAGECONFIG', ' selinux') + else: + bb.warn("selinux is enabled but clang-layer is not in BBFILE_COLLECTIONS, " + "selinux support will be disabled. Add meta-clang to your bblayers.conf " + "if selinux support on uutils-coreutils is required.") +} PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"Signature · 1 line
2.47.3