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 \ |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 9 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 10 | |
| 11 | S = "${WORKDIR}/git" |
Patrick Williams | b58112e | 2024-03-07 11:16:36 -0600 | [diff] [blame^] | 12 | SRCREV = "82f0924dc0eb23b9df68e88dbaf9e07c81940a5a" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 13 | |
| 14 | DEPENDS = "expat glib-2.0" |
| 15 | |
| 16 | inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check |
| 17 | |
| 18 | REQUIRED_DISTRO_FEATURES = "polkit" |
| 19 | |
| 20 | PACKAGECONFIG = " \ |
| 21 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ |
| 22 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ |
| 23 | dbus \ |
| 24 | mozjs \ |
| 25 | " |
| 26 | PACKAGECONFIG[dbus] = ",,dbus" |
| 27 | PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" |
| 28 | PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" |
| 29 | PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd" |
| 30 | PACKAGECONFIG[consolekit] = ",,,consolekit" |
| 31 | |
| 32 | # Default to mozjs javascript library |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 33 | PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 34 | # duktape javascript engine is much smaller and faster but is not compatible with |
| 35 | # same javascript standards as mozjs. For example array.includes() function is not |
| 36 | # supported. Test rule compatibility when switching to duktape. |
| 37 | PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" |
| 38 | |
| 39 | USERADD_PACKAGES = "${PN}" |
| 40 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" |
| 41 | |
| 42 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" |
| 43 | SYSTEMD_AUTO_ENABLE = "disable" |
| 44 | |
| 45 | do_install:append() { |
| 46 | #Fix up permissions on polkit rules.d to work with rpm4 constraints |
| 47 | chmod 700 ${D}/${datadir}/polkit-1/rules.d |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 48 | chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 49 | chown polkitd:root ${D}/${datadir}/polkit-1/rules.d |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 50 | chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 51 | } |
| 52 | |
Patrick Williams | b58112e | 2024-03-07 11:16:36 -0600 | [diff] [blame^] | 53 | FILES:${PN} += " \ |
| 54 | ${libdir}/pam.d/polkit-1 \ |
| 55 | ${libdir}/sysusers.d \ |
| 56 | ${libdir}/polkit-1 \ |
| 57 | ${nonarch_libdir}/pam.d/polkit-1 \ |
| 58 | ${nonarch_libdir}/sysusers.d \ |
| 59 | ${nonarch_libdir}/polkit-1 \ |
| 60 | ${datadir} \ |
| 61 | " |