summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb28
1 files changed, 27 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
index 2343cec71a..eb42e62f45 100644
--- a/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
+++ b/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
4 4
5DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native" 5DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native"
6 6
7inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache 7inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd
8 8
9SRC_URI = " \ 9SRC_URI = " \
10 git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \ 10 git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \
@@ -23,6 +23,7 @@ SYSTEMD_AUTO_ENABLE:${PN} = "disable"
23RRECOMMENDS:${PN} += "adwaita-icon-theme" 23RRECOMMENDS:${PN} += "adwaita-icon-theme"
24RDEPENDS:${PN} += " \ 24RDEPENDS:${PN} += " \
25 python3-core \ 25 python3-core \
26 python3-ctypes \
26 python3-dbus \ 27 python3-dbus \
27 python3-pygobject \ 28 python3-pygobject \
28 python3-terminal \ 29 python3-terminal \
@@ -58,3 +59,28 @@ do_install:append() {
58 ${D}${bindir}/blueman-tray 59 ${D}${bindir}/blueman-tray
59} 60}
60 61
62do_install:append() {
63 install -d ${D}${datadir}/polkit-1/rules.d
64 cat >${D}${datadir}/polkit-1/rules.d/51-blueman.rules <<EOF
65/* Allow users in wheel group to use blueman feature requiring root without authentication */
66polkit.addRule(function(action, subject) {
67 if ((action.id == "org.blueman.network.setup" ||
68 action.id == "org.blueman.dhcp.client" ||
69 action.id == "org.blueman.rfkill.setstate" ||
70 action.id == "org.blueman.pppd.pppconnect") &&
71 subject.isInGroup("wheel")) {
72
73 return polkit.Result.YES;
74 }
75});
76EOF
77}
78
79USERADD_PACKAGES = "${PN}"
80USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd"
81
82do_install:append() {
83 # Fix up permissions on polkit rules.d to work with rpm4 constraints
84 chmod 700 ${D}/${datadir}/polkit-1/rules.d
85 chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
86}