diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-03-27 11:05:46 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-04-04 21:19:22 +0200 |
commit | 1b847a21fac05e88510fe37db63d0d9e4b72e633 (patch) | |
tree | 2034b132f94888bd7c6c6263a438c3f642183489 /meta-security/recipes-core/dbus-cynara/dbus_%.bbappend | |
parent | ea00cb6f79616987d7e3c7e83a6ee01cb73eb170 (diff) |
dbus-cynara: Avoid dependency loop
The dependency loop appeared when compiling
with DISTRO_FEATURE ptest.
To avoid it, I restore the logic implemented before in
meta-intel-iot-security. I also remove unless files.
Bug-AGL: SPEC-1334
Change-Id: Ibe8b9359a65fec034df2534c5fceb4769e63aa99
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'meta-security/recipes-core/dbus-cynara/dbus_%.bbappend')
-rw-r--r-- | meta-security/recipes-core/dbus-cynara/dbus_%.bbappend | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend b/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend new file mode 100644 index 000000000..78df8ec3c --- /dev/null +++ b/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend @@ -0,0 +1,36 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/dbus-cynara:" +SRC_URI_append = "\ + file://0001-Integration-of-Cynara-asynchronous-security-checks.patch \ + file://0002-Disable-message-dispatching-when-send-rule-result-is.patch \ + file://0003-Handle-unavailability-of-policy-results-for-broadcas.patch \ + file://0004-Add-own-rule-result-unavailability-handling.patch \ + file://0005-Perform-Cynara-runtime-policy-checks-by-default.patch \ +" + +# Optionally, compilation of the main package with the daemon gets moved into +# dbus-cynara. That is necessary to break a dependency cycle once the +# daemon gets compiled with Cynara support (dbus -> cynara -> systemd +# -> dbus). +do_install_append_class-target () { + if ${@bb.utils.contains('DISTRO_FEATURES', 'dbus-cynara', 'true', 'false', d)}; then + for i in ${@' '.join([d.getVar('D', True) + x for x in (d.getVar('FILES_${PN}', True) or '').split()])}; do + rm -rf $i + done + + # Try to remove empty directories, starting with the + # longest path (= deepest directory) first. + # Find needs a valid current directory. Somehow the directory + # we get called in is gone by the time that we get invoked. + ( cd ${D} + for i in `find . -type d | sort -r`; do + rmdir $i || true + done + ) + fi +} + +# The main package will be empty, but we want to have it created +# anyway because of the dependencies on it. Installing it will pull in +# the replacement dbus-cynara package. +ALLOW_EMPTY_${PN}_class-target = "1" +RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'dbus-cynara', ' dbus-cynara', '', d)}" |