Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [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" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "LGPL-2.0-or-later" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \ |
| 6 | file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4" |
| 7 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 8 | DEPENDS = "expat glib-2.0 intltool-native duktape" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9 | |
| 10 | inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection features_check |
| 11 | |
| 12 | REQUIRED_DISTRO_FEATURES = "polkit" |
| 13 | |
| 14 | PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ |
| 15 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ |
| 16 | bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ |
| 17 | " |
| 18 | |
| 19 | PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam" |
| 20 | PACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunitdir=${systemd_unitdir}/system/,--enable-libsystemd-login=no --with-systemdsystemunitdir=,systemd" |
| 21 | # there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS |
| 22 | PACKAGECONFIG[consolekit] = ",,,consolekit" |
| 23 | |
| 24 | PAM_SRC_URI = "file://polkit-1_pam.patch" |
| 25 | SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ |
| 26 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
| 27 | file://0003-make-netgroup-support-optional.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 28 | file://0001-pkexec-local-privilege-escalation-CVE-2021-4034.patch \ |
| 29 | file://0002-CVE-2021-4115-GHSL-2021-077-fix.patch \ |
| 30 | file://0003-Added-support-for-duktape-as-JS-engine.patch \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 31 | " |
| 32 | SRC_URI[sha256sum] = "c8579fdb86e94295404211285fee0722ad04893f0213e571bd75c00972fd1f5c" |
| 33 | |
| 34 | EXTRA_OECONF = "--with-os-type=moblin \ |
| 35 | --disable-man-pages \ |
| 36 | --disable-libelogind \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 37 | --with-duktape \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 38 | " |
| 39 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 40 | do_configure:prepend () { |
| 41 | rm -f ${S}/buildutil/lt*.m4 ${S}/buildutil/libtool.m4 |
| 42 | } |
| 43 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 44 | do_compile:prepend () { |
| 45 | export GIR_EXTRA_LIBS_PATH="${B}/src/polkit/.libs" |
| 46 | } |
| 47 | |
| 48 | PACKAGES =+ "${PN}-examples" |
| 49 | |
| 50 | FILES:${PN}:append = " \ |
| 51 | ${libdir}/${BPN}-1 \ |
| 52 | ${nonarch_libdir}/${BPN}-1 \ |
| 53 | ${datadir}/dbus-1 \ |
| 54 | ${datadir}/${BPN}-1 \ |
| 55 | ${datadir}/gettext \ |
| 56 | " |
| 57 | |
| 58 | FILES:${PN}-examples = "${bindir}/*example*" |
| 59 | |
| 60 | USERADD_PACKAGES = "${PN}" |
| 61 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd" |
| 62 | |
| 63 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" |
| 64 | SYSTEMD_AUTO_ENABLE = "disable" |