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