summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/polkit/polkit_125.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/polkit/polkit_125.bb')
-rw-r--r--meta-oe/recipes-extended/polkit/polkit_125.bb76
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/polkit/polkit_125.bb b/meta-oe/recipes-extended/polkit/polkit_125.bb
new file mode 100644
index 000000000..a67aaf908
--- /dev/null
+++ b/meta-oe/recipes-extended/polkit/polkit_125.bb
@@ -0,0 +1,76 @@
1SUMMARY = "Polkit 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"
6BUGTRACKER = "https://github.com/polkit-org/polkit/issues"
7
8SRC_URI = "git://github.com/polkit-org/polkit.git;protocol=https;branch=main \
9 file://meson-build-Support-openembedded-OS-for-PAM-config.patch \
10 "
11
12S = "${WORKDIR}/git"
13SRCREV = "112752c12da812a163dac67d7f675b60de8f7d7b"
14
15DEPENDS = "expat glib-2.0"
16
17inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check
18
19REQUIRED_DISTRO_FEATURES = "polkit"
20
21# Prevent meson.build to try to autodetect host OS (which could lead to
22# non-reproducibility)
23EXTRA_OEMESON = "-Dos_type=openembedded"
24
25PACKAGECONFIG = " \
26 ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
27 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \
28 dbus \
29 mozjs \
30"
31PACKAGECONFIG[dbus] = ",,dbus"
32PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native"
33PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam"
34PACKAGECONFIG[systemd] = "-Dsession_tracking=logind,,systemd,,,consolekit elogind"
35PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind"
36PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit"
37PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false"
38
39# Default to mozjs javascript library
40PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape"
41# duktape javascript engine is much smaller and faster but is not compatible with
42# same javascript standards as mozjs. For example array.includes() function is not
43# supported. Test rule compatibility when switching to duktape.
44PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs"
45
46USERADD_PACKAGES = "${PN}"
47USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd"
48
49SYSTEMD_SERVICE:${PN} = "${BPN}.service"
50SYSTEMD_AUTO_ENABLE = "disable"
51
52do_install:append() {
53 #Fix up permissions on polkit rules.d to work with rpm4 constraints
54 if ${@bb.utils.contains('PACKAGECONFIG', 'libs-only', 'false', 'true', d)}; then
55 chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d
56 chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d
57 fi
58
59 # Polkit unconditionally installs a systemd service, remove it on SysVinit
60 # systems to avoid "installed but not packaged file" error.
61 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
62 rm -r ${D}${libdir}/systemd
63 fi
64}
65
66FILES:${PN} += " \
67 ${libdir}/pam.d/polkit-1 \
68 ${libdir}/sysusers.d \
69 ${libdir}/tmpfiles.d \
70 ${libdir}/polkit-1 \
71 ${nonarch_libdir}/pam.d/polkit-1 \
72 ${nonarch_libdir}/sysusers.d \
73 ${nonarch_libdir}/tmpfiles.d \
74 ${nonarch_libdir}/polkit-1 \
75 ${datadir} \
76"