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 | |
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>
-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 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" DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native" -inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache +inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd SRC_URI = " \ git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \ @@ -23,6 +23,7 @@ SYSTEMD_AUTO_ENABLE:${PN} = "disable" RRECOMMENDS:${PN} += "adwaita-icon-theme" RDEPENDS:${PN} += " \ python3-core \ + python3-ctypes \ python3-dbus \ python3-pygobject \ python3-terminal \ @@ -58,3 +59,28 @@ do_install:append() { ${D}${bindir}/blueman-tray } +do_install:append() { + install -d ${D}${datadir}/polkit-1/rules.d + cat >${D}${datadir}/polkit-1/rules.d/51-blueman.rules <<EOF +/* Allow users in wheel group to use blueman feature requiring root without authentication */ +polkit.addRule(function(action, subject) { + if ((action.id == "org.blueman.network.setup" || + action.id == "org.blueman.dhcp.client" || + action.id == "org.blueman.rfkill.setstate" || + action.id == "org.blueman.pppd.pppconnect") && + subject.isInGroup("wheel")) { + + return polkit.Result.YES; + } +}); +EOF +} + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" + +do_install:append() { + # Fix up permissions on polkit rules.d to work with rpm4 constraints + chmod 700 ${D}/${datadir}/polkit-1/rules.d + chown polkitd:root ${D}/${datadir}/polkit-1/rules.d +} |