polkit_126.bb 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. SRC_URI = "git://github.com/polkit-org/polkit.git;protocol=https;branch=main"
  8. S = "${WORKDIR}/git"
  9. SRCREV = "d627b0d1e1108563658dabe3fb8d2a065e64df10"
  10. DEPENDS = "expat glib-2.0 duktape"
  11. inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check
  12. REQUIRED_DISTRO_FEATURES = "polkit"
  13. # Prevent meson.build to try to autodetect host OS (which could lead to
  14. # non-reproducibility)
  15. EXTRA_OEMESON = "-Dos_type=openembedded"
  16. PACKAGECONFIG = " \
  17. ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
  18. ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \
  19. dbus \
  20. "
  21. PACKAGECONFIG[dbus] = ",,dbus"
  22. PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native"
  23. PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam"
  24. PACKAGECONFIG[systemd] = "-Dsession_tracking=logind,,systemd,,,consolekit elogind"
  25. PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind"
  26. PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit"
  27. PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false"
  28. USERADD_PACKAGES = "${PN}"
  29. USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd"
  30. SYSTEMD_SERVICE:${PN} = "${BPN}.service"
  31. SYSTEMD_AUTO_ENABLE = "disable"
  32. do_install:append() {
  33. #Fix up permissions on polkit rules.d to work with rpm4 constraints
  34. if ${@bb.utils.contains('PACKAGECONFIG', 'libs-only', 'false', 'true', d)}; then
  35. chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d
  36. chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d
  37. fi
  38. # Polkit unconditionally installs a systemd service, remove it on SysVinit
  39. # systems to avoid "installed but not packaged file" error.
  40. if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
  41. rm -rf ${D}${nonarch_libdir}/systemd ${D}${libdir}/systemd
  42. fi
  43. }
  44. FILES:${PN} += " \
  45. ${libdir}/pam.d/polkit-1 \
  46. ${libdir}/sysusers.d \
  47. ${libdir}/tmpfiles.d \
  48. ${libdir}/polkit-1 \
  49. ${nonarch_libdir}/pam.d/polkit-1 \
  50. ${nonarch_libdir}/sysusers.d \
  51. ${nonarch_libdir}/tmpfiles.d \
  52. ${nonarch_libdir}/polkit-1 \
  53. ${datadir} \
  54. "