From a2f649ecc4659a01a7b75099a0c43cc57b513075 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 16 Jan 2025 11:05:52 +0000 Subject: polkit: update 125 -> 126 Patch merged upstream. mozjs support dropped, remove PACKAGECONFIG. Signed-off-by: Luca Boccassi Signed-off-by: Khem Raj --- ...ld-Support-openembedded-OS-for-PAM-config.patch | 48 -------------- meta-oe/recipes-extended/polkit/polkit_125.bb | 76 ---------------------- meta-oe/recipes-extended/polkit/polkit_126.bb | 67 +++++++++++++++++++ 3 files changed, 67 insertions(+), 124 deletions(-) delete mode 100644 meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch delete mode 100644 meta-oe/recipes-extended/polkit/polkit_125.bb create mode 100644 meta-oe/recipes-extended/polkit/polkit_126.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch b/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch deleted file mode 100644 index 445f2fbdb0..0000000000 --- a/meta-oe/recipes-extended/polkit/files/meson-build-Support-openembedded-OS-for-PAM-config.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 7c89b88f0f81ad220d08d69d212c14c6eeefb647 Mon Sep 17 00:00:00 2001 -From: Yoann Congal -Date: Tue, 3 Sep 2024 12:17:42 +0200 -Subject: [PATCH] meson.build: Support "openembedded" OS for PAM config - -In Openembedded, same as Suse/Solaris: PAM files are common-*: -* PAM_FILE_INCLUDE_AUTH: common-auth -* PAM_FILE_INCLUDE_ACCOUNT: common-account -* PAM_FILE_INCLUDE_PASSWORD: common-password -* PAM_FILE_INCLUDE_SESSION: common-session -See OE-Core libpam recipe. - -NB: This is also the same config as Debian but its not mentioned in the -code. - -Signed-off-by: Yoann Congal -Upstream-Status: Backport [https://github.com/polkit-org/polkit/commit/1d4f7f4d9f3d74fb2649c96faa8677416c1aefc2] ---- - meson.build | 2 +- - meson_options.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 302c189..a55f2d6 100644 ---- a/meson.build -+++ b/meson.build -@@ -311,7 +311,7 @@ endif - - pam_include = get_option('pam_include') - if pam_include == '' -- if ['suse', 'solaris'].contains(os_type) -+ if ['suse', 'solaris', 'openembedded'].contains(os_type) - pam_conf = { - 'PAM_FILE_INCLUDE_AUTH': 'common-auth', - 'PAM_FILE_INCLUDE_ACCOUNT': 'common-account', -diff --git a/meson_options.txt b/meson_options.txt -index c2e4a6c..14d7a50 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -6,7 +6,7 @@ option('polkitd_user', type: 'string', value: 'polkitd', description: 'User for - option('polkitd_uid', type: 'string', value: '-', description: 'Fixed UID for user running polkitd (polkitd)') - - option('authfw', type: 'combo', choices: ['pam', 'shadow', 'bsdauth'], value: 'pam', description: 'Authentication framework (pam/shadow)') --option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', 'lfs', ''], value: '', description: 'distribution or OS') -+option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', 'lfs', 'openembedded', ''], value: '', description: 'distribution or OS') - - option('pam_include', type: 'string', value: '', description: 'pam file to include') - option('pam_module_dir', type: 'string', value: '', description: 'directory to install PAM security module') diff --git a/meta-oe/recipes-extended/polkit/polkit_125.bb b/meta-oe/recipes-extended/polkit/polkit_125.bb deleted file mode 100644 index a67aaf908f..0000000000 --- a/meta-oe/recipes-extended/polkit/polkit_125.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "Polkit Authorization Framework" -DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" -LICENSE = "LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" -BUGTRACKER = "https://github.com/polkit-org/polkit/issues" - -SRC_URI = "git://github.com/polkit-org/polkit.git;protocol=https;branch=main \ - file://meson-build-Support-openembedded-OS-for-PAM-config.patch \ - " - -S = "${WORKDIR}/git" -SRCREV = "112752c12da812a163dac67d7f675b60de8f7d7b" - -DEPENDS = "expat glib-2.0" - -inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check - -REQUIRED_DISTRO_FEATURES = "polkit" - -# Prevent meson.build to try to autodetect host OS (which could lead to -# non-reproducibility) -EXTRA_OEMESON = "-Dos_type=openembedded" - -PACKAGECONFIG = " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ - dbus \ - mozjs \ -" -PACKAGECONFIG[dbus] = ",,dbus" -PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" -PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" -PACKAGECONFIG[systemd] = "-Dsession_tracking=logind,,systemd,,,consolekit elogind" -PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind" -PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit" -PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false" - -# Default to mozjs javascript library -PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape" -# duktape javascript engine is much smaller and faster but is not compatible with -# same javascript standards as mozjs. For example array.includes() function is not -# supported. Test rule compatibility when switching to duktape. -PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" - -SYSTEMD_SERVICE:${PN} = "${BPN}.service" -SYSTEMD_AUTO_ENABLE = "disable" - -do_install:append() { - #Fix up permissions on polkit rules.d to work with rpm4 constraints - if ${@bb.utils.contains('PACKAGECONFIG', 'libs-only', 'false', 'true', d)}; then - chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d - chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d - fi - - # Polkit unconditionally installs a systemd service, remove it on SysVinit - # systems to avoid "installed but not packaged file" error. - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - rm -r ${D}${libdir}/systemd - fi -} - -FILES:${PN} += " \ - ${libdir}/pam.d/polkit-1 \ - ${libdir}/sysusers.d \ - ${libdir}/tmpfiles.d \ - ${libdir}/polkit-1 \ - ${nonarch_libdir}/pam.d/polkit-1 \ - ${nonarch_libdir}/sysusers.d \ - ${nonarch_libdir}/tmpfiles.d \ - ${nonarch_libdir}/polkit-1 \ - ${datadir} \ -" 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..a2f5449c2f --- /dev/null +++ b/meta-oe/recipes-extended/polkit/polkit_126.bb @@ -0,0 +1,67 @@ +SUMMARY = "Polkit Authorization Framework" +DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" +LICENSE = "LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb" +BUGTRACKER = "https://github.com/polkit-org/polkit/issues" + +SRC_URI = "git://github.com/polkit-org/polkit.git;protocol=https;branch=main" + +S = "${WORKDIR}/git" +SRCREV = "d627b0d1e1108563658dabe3fb8d2a065e64df10" + +DEPENDS = "expat glib-2.0 duktape" + +inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check + +REQUIRED_DISTRO_FEATURES = "polkit" + +# Prevent meson.build to try to autodetect host OS (which could lead to +# non-reproducibility) +EXTRA_OEMESON = "-Dos_type=openembedded" + +PACKAGECONFIG = " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \ + dbus \ + mozjs \ +" +PACKAGECONFIG[dbus] = ",,dbus" +PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native" +PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam" +PACKAGECONFIG[systemd] = "-Dsession_tracking=logind,,systemd,,,consolekit elogind" +PACKAGECONFIG[consolekit] = "-Dsession_tracking=ConsoleKit,,,consolekit,,systemd elogind" +PACKAGECONFIG[elogind] = "-Dsession_tracking=libelogin,,elogind,,,systemd consolekit" +PACKAGECONFIG[libs-only] = "-Dlibs-only=true,-Dlibs-only=false" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install:append() { + #Fix up permissions on polkit rules.d to work with rpm4 constraints + if ${@bb.utils.contains('PACKAGECONFIG', 'libs-only', 'false', 'true', d)}; then + chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d + chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d + fi + + # Polkit unconditionally installs a systemd service, remove it on SysVinit + # systems to avoid "installed but not packaged file" error. + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + rm -r ${D}${libdir}/systemd + fi +} + +FILES:${PN} += " \ + ${libdir}/pam.d/polkit-1 \ + ${libdir}/sysusers.d \ + ${libdir}/tmpfiles.d \ + ${libdir}/polkit-1 \ + ${nonarch_libdir}/pam.d/polkit-1 \ + ${nonarch_libdir}/sysusers.d \ + ${nonarch_libdir}/tmpfiles.d \ + ${nonarch_libdir}/polkit-1 \ + ${datadir} \ +" -- cgit v1.2.3-54-g00ecf