78df8ec3cbdae064c6b55a17662282124f585174
[AGL/meta-agl.git] / meta-security / recipes-core / dbus-cynara / dbus_%.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/dbus-cynara:"
2 SRC_URI_append = "\
3    file://0001-Integration-of-Cynara-asynchronous-security-checks.patch \
4    file://0002-Disable-message-dispatching-when-send-rule-result-is.patch \
5    file://0003-Handle-unavailability-of-policy-results-for-broadcas.patch \
6    file://0004-Add-own-rule-result-unavailability-handling.patch \
7    file://0005-Perform-Cynara-runtime-policy-checks-by-default.patch \
8 "
9
10 # Optionally, compilation of the main package with the daemon gets moved into
11 # dbus-cynara. That is necessary to break a dependency cycle once the
12 # daemon gets compiled with Cynara support (dbus -> cynara -> systemd
13 # -> dbus).
14 do_install_append_class-target () {
15     if ${@bb.utils.contains('DISTRO_FEATURES', 'dbus-cynara', 'true', 'false', d)}; then
16         for i in ${@' '.join([d.getVar('D', True) + x for x in (d.getVar('FILES_${PN}', True) or '').split()])}; do
17             rm -rf $i
18         done
19
20         # Try to remove empty directories, starting with the
21         # longest path (= deepest directory) first.
22         # Find needs a valid current directory. Somehow the directory
23         # we get called in is gone by the time that we get invoked.
24         ( cd ${D}
25           for i in `find . -type d | sort -r`; do
26             rmdir $i || true
27           done
28         )
29     fi
30 }
31
32 # The main package will be empty, but we want to have it created
33 # anyway because of the dependencies on it. Installing it will pull in
34 # the replacement dbus-cynara package.
35 ALLOW_EMPTY_${PN}_class-target = "1"
36 RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'dbus-cynara', ' dbus-cynara', '', d)}"