meta-agl: split wireplumber to run in multiple instances
[AGL/meta-agl.git] / meta-app-framework / recipes-connectivity / connman / connman_appfw.inc
1 # Recent ConnMan releases started limiting the capabilities of
2 # ConnMan. When running on a Smack-enabled system, that change has the
3 # effect that connmand can no longer change network settings under
4 # /proc/net because the Smack label of /proc is "_", and connmand
5 # running with label "System" has no write access to that.
6 #
7 # It works when running as normal root with unrestricted capabilities
8 # because then CAP_MAC_OVERRIDE (a Smack-specific capability) allows
9 # the process to ignore Smack rules.
10 #
11 # We need to ensure that connmand still has that capability.
12 #
13 # The alternative would be to set up fine-grained labelling of
14 # /proc with corresponding rules, which is considerably more work
15 # and also may depend on kernel changes (like supporting smackfsroot
16 # for procfs, which seems to be missing at the moment).
17 #
18 # Because the solution is to some extend specific to the environment
19 # in which connmand runs, this change is not submitted upstream
20 # and it can be overridden by a distro via FIX_CONNMAN_CAPABILITIES.
21
22 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
23
24 SRC_URI:append:with-lsm-smack = "\
25   file://connman.service.conf \
26 "
27
28 RDEPENDS:${PN}:append:with-lsm-smack = " smack"
29
30 FILES:${PN}:append = " ${systemd_unitdir}"
31
32 do_install:append:with-lsm-smack() {
33   install -Dm0644 ${WORKDIR}/connman.service.conf ${D}${systemd_unitdir}/system/connman.service.d/smack.conf
34 }