diff options
author | Markus Volk <f_l_k@t-online.de> | 2023-01-31 18:08:48 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-02-01 09:11:49 -0800 |
commit | 65ac92781f0f47013caba34aa1461b9a6ee7abe1 (patch) | |
tree | d4ab0c62f624a1b08ed7362a472a2bcf8eac23a8 /meta-networking/recipes-connectivity/blueman | |
parent | 670bd4e3aeb1e3410704ad18968af82a89e6a2b1 (diff) | |
download | meta-openembedded-65ac92781f0f47013caba34aa1461b9a6ee7abe1.tar.gz |
blueman: add missing runtime dependency, add polkit rule
Add a missing runtime dependency on python3-ctypes
Add a polkit rule to allow users of group wheel to use blueman without authentification
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/blueman')
-rw-r--r-- | meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb | 28 |
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 2343cec71..eb42e62f4 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 | ||
5 | DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native" | 5 | DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native" |
6 | 6 | ||
7 | inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache | 7 | inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd |
8 | 8 | ||
9 | SRC_URI = " \ | 9 | SRC_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" | |||
23 | RRECOMMENDS:${PN} += "adwaita-icon-theme" | 23 | RRECOMMENDS:${PN} += "adwaita-icon-theme" |
24 | RDEPENDS:${PN} += " \ | 24 | RDEPENDS:${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 | ||
62 | do_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 */ | ||
66 | polkit.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 | }); | ||
76 | EOF | ||
77 | } | ||
78 | |||
79 | USERADD_PACKAGES = "${PN}" | ||
80 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" | ||
81 | |||
82 | do_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 | } | ||