Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "PolicyKit Authorization Framework" |
| 2 | DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." |
| 3 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" |
| 4 | LICENSE = "LGPL-2.0-or-later" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" |
| 6 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 7 | SRC_URI = "git://gitlab.freedesktop.org/polkit/polkit.git;protocol=https;branch=master \ |
| 8 | file://0001-polkit.service.in-disable-MemoryDenyWriteExecute.patch \ |
| 9 | file://0001-jsauthority-Bump-mozjs-to-115.patch \ |
| 10 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 11 | |
| 12 | S = "${WORKDIR}/git" |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 13 | SRCREV = "fc8b07e71d99f88a29258cde99b913b44da1846d" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 14 | |
| 15 | DEPENDS = "expat glib-2.0" |
| 16 | |
| 17 | inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check |
| 18 | |
| 19 | REQUIRED_DISTRO_FEATURES = "polkit" |
| 20 | |
| 21 | PACKAGECONFIG = " \ |
| 22 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ |
| 23 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ |
| 24 | dbus \ |
| 25 | mozjs \ |
| 26 | " |
| 27 | PACKAGECONFIG[dbus] = ",,dbus" |
| 28 | PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" |
| 29 | PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" |
| 30 | PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd" |
| 31 | PACKAGECONFIG[consolekit] = ",,,consolekit" |
| 32 | |
| 33 | # Default to mozjs javascript library |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 34 | PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 35 | # duktape javascript engine is much smaller and faster but is not compatible with |
| 36 | # same javascript standards as mozjs. For example array.includes() function is not |
| 37 | # supported. Test rule compatibility when switching to duktape. |
| 38 | PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" |
| 39 | |
| 40 | USERADD_PACKAGES = "${PN}" |
| 41 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" |
| 42 | |
| 43 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" |
| 44 | SYSTEMD_AUTO_ENABLE = "disable" |
| 45 | |
| 46 | do_install:append() { |
| 47 | #Fix up permissions on polkit rules.d to work with rpm4 constraints |
| 48 | chmod 700 ${D}/${datadir}/polkit-1/rules.d |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 49 | chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 50 | chown polkitd:root ${D}/${datadir}/polkit-1/rules.d |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 51 | chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | FILES:${PN} += "${libdir}/polkit-1 ${nonarch_libdir}/polkit-1 ${datadir}" |