diff options
Diffstat (limited to 'meta-oe/recipes-extended/polkit/polkit_126.bb')
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit_126.bb | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/polkit/polkit_126.bb b/meta-oe/recipes-extended/polkit/polkit_126.bb new file mode 100644 index 0000000000..0438c4e464 --- /dev/null +++ b/meta-oe/recipes-extended/polkit/polkit_126.bb | |||
@@ -0,0 +1,65 @@ | |||
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 | |||
10 | SRCREV = "d627b0d1e1108563658dabe3fb8d2a065e64df10" | ||
11 | |||
12 | DEPENDS = "expat glib-2.0 duktape" | ||
13 | |||
14 | inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check | ||
15 | |||
16 | REQUIRED_DISTRO_FEATURES = "polkit" | ||
17 | |||
18 | # Prevent meson.build to try to autodetect host OS (which could lead to | ||
19 | # non-reproducibility) | ||
20 | EXTRA_OEMESON = "-Dos_type=openembedded" | ||
21 | |||
22 | PACKAGECONFIG = " \ | ||
23 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ | ||
24 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ | ||
25 | dbus \ | ||
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=logind,,systemd,,,consolekit elogind" | ||
31 | PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind" | ||
32 | PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit" | ||
33 | PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false" | ||
34 | |||
35 | USERADD_PACKAGES = "${PN}" | ||
36 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" | ||
37 | |||
38 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | ||
39 | SYSTEMD_AUTO_ENABLE = "disable" | ||
40 | |||
41 | do_install:append() { | ||
42 | #Fix up permissions on polkit rules.d to work with rpm4 constraints | ||
43 | if ${@bb.utils.contains('PACKAGECONFIG', 'libs-only', 'false', 'true', d)}; then | ||
44 | chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d | ||
45 | chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d | ||
46 | fi | ||
47 | |||
48 | # Polkit unconditionally installs a systemd service, remove it on SysVinit | ||
49 | # systems to avoid "installed but not packaged file" error. | ||
50 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
51 | rm -rf ${D}${nonarch_libdir}/systemd ${D}${libdir}/systemd | ||
52 | fi | ||
53 | } | ||
54 | |||
55 | FILES:${PN} += " \ | ||
56 | ${libdir}/pam.d/polkit-1 \ | ||
57 | ${libdir}/sysusers.d \ | ||
58 | ${libdir}/tmpfiles.d \ | ||
59 | ${libdir}/polkit-1 \ | ||
60 | ${nonarch_libdir}/pam.d/polkit-1 \ | ||
61 | ${nonarch_libdir}/sysusers.d \ | ||
62 | ${nonarch_libdir}/tmpfiles.d \ | ||
63 | ${nonarch_libdir}/polkit-1 \ | ||
64 | ${datadir} \ | ||
65 | " | ||