blob: df9d25e9f4291b2a061c9ed0d9dfc76c7454bfd7 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "PolicyKit Authorization Framework"
2DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes."
3HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit"
4LICENSE = "LGPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb"
6
Patrick Williams169d7bc2024-01-05 11:33:25 -06007SRC_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 Geissler517393d2023-01-13 08:55:19 -060011
12S = "${WORKDIR}/git"
Andrew Geissler220dafd2023-10-04 10:18:08 -050013SRCREV = "fc8b07e71d99f88a29258cde99b913b44da1846d"
Andrew Geissler517393d2023-01-13 08:55:19 -060014
15DEPENDS = "expat glib-2.0"
16
17inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check
18
19REQUIRED_DISTRO_FEATURES = "polkit"
20
21PACKAGECONFIG = " \
22 ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
23 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \
24 dbus \
25 mozjs \
26"
27PACKAGECONFIG[dbus] = ",,dbus"
28PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native"
29PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam"
30PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd"
31PACKAGECONFIG[consolekit] = ",,,consolekit"
32
33# Default to mozjs javascript library
Patrick Williams169d7bc2024-01-05 11:33:25 -060034PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape"
Andrew Geissler517393d2023-01-13 08:55:19 -060035# 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.
38PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs"
39
40USERADD_PACKAGES = "${PN}"
41USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd"
42
43SYSTEMD_SERVICE:${PN} = "${BPN}.service"
44SYSTEMD_AUTO_ENABLE = "disable"
45
46do_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 Williams73bd93f2024-02-20 08:07:48 -060049 chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d
Andrew Geissler517393d2023-01-13 08:55:19 -060050 chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
Patrick Williams73bd93f2024-02-20 08:07:48 -060051 chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d
Andrew Geissler517393d2023-01-13 08:55:19 -060052}
53
54FILES:${PN} += "${libdir}/polkit-1 ${nonarch_libdir}/polkit-1 ${datadir}"