diff options
Diffstat (limited to 'meta-oe/recipes-extended/polkit/polkit_125.bb')
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit_125.bb | 76 |
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 @@ | |||
1 | SUMMARY = "Polkit 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 | BUGTRACKER = "https://github.com/polkit-org/polkit/issues" | ||
7 | |||
8 | SRC_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 | |||
12 | S = "${WORKDIR}/git" | ||
13 | SRCREV = "112752c12da812a163dac67d7f675b60de8f7d7b" | ||
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 | # Prevent meson.build to try to autodetect host OS (which could lead to | ||
22 | # non-reproducibility) | ||
23 | EXTRA_OEMESON = "-Dos_type=openembedded" | ||
24 | |||
25 | PACKAGECONFIG = " \ | ||
26 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ | ||
27 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ | ||
28 | dbus \ | ||
29 | mozjs \ | ||
30 | " | ||
31 | PACKAGECONFIG[dbus] = ",,dbus" | ||
32 | PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" | ||
33 | PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" | ||
34 | PACKAGECONFIG[systemd] = "-Dsession_tracking=logind,,systemd,,,consolekit elogind" | ||
35 | PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind" | ||
36 | PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit" | ||
37 | PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false" | ||
38 | |||
39 | # Default to mozjs javascript library | ||
40 | PACKAGECONFIG[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. | ||
44 | PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" | ||
45 | |||
46 | USERADD_PACKAGES = "${PN}" | ||
47 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" | ||
48 | |||
49 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | ||
50 | SYSTEMD_AUTO_ENABLE = "disable" | ||
51 | |||
52 | do_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 | |||
66 | FILES:${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 | " | ||