consolekit: Upgrade to ConsoleKit2 2.0.0
PATCH 1/3 consolekit: Upgrade to ConsoleKit2 2.0.0
From: Khem Raj <[email protected]>
ConsoleKit is unmaintained since 0.4.6 (2011); ConsoleKit2 is the maintained fork used by FreeBSD and others. Keep the recipe name so existing consumers continue to work.
* Use git fetcher, upstream does not publish release tarballs
* Drop add-polkit-configure-argument.patch, polkit support is now selectable via --enable/--disable-polkit
* Refresh sepbuildfix.patch
* X11 is now optional, so drop REQUIRED_DISTRO_FEATURES = "x11" and add an x11 PACKAGECONFIG
* Add explicit PACKAGECONFIGs for automagic dependencies (selinux, udev/libdrm, libevdev, udev-acl) and disable cgmanager
* AC_CONFIG_AUX_DIR is autotools/, point AUTOTOOLS_AUXDIR there so config.rpath is found
* Pre-seed AC_CHECK_FILE result for /sys/class/tty/tty0/active
* Drop -Wno-error=incompatible-pointer-types, no longer needed
Note that 2.0.0 changes session and seat IDs on D-Bus from object paths to bare IDs, which needs a matching fix in polkit's ConsoleKit backend.
https://github.com/ConsoleKit2/ConsoleKit2/releases/tag/2.0.0
--- .../add-polkit-configure-argument.patch | 33 ---------- .../consolekit/consolekit/sepbuildfix.patch | 18 ++--- .../consolekit/consolekit_0.4.6.bb | 53 --------------- .../consolekit/consolekit_2.0.0.bb | 66 +++++++++++++++++++ 4 files changed, 76 insertions(+), 94 deletions(-) delete mode 100644 meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch delete mode 100644 meta/recipes-support/consolekit/consolekit_0.4.6.bb create mode 100644 meta/recipes-support/consolekit/consolekit_2.0.0.bb
meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch deleted +0 -33
@@ -1,33 +0,0 @@ -Upstream-Status: Pending - ---- ConsoleKit-0.4.6.orig/configure.ac -+++ ConsoleKit-0.4.6/configure.ac -@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT, - gthread-2.0 >= $GLIB_REQUIRED_VERSION - ) - --PKG_CHECK_MODULES(POLKIT, -- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, -- have_polkit=yes, -- have_polkit=no) -+AC_ARG_WITH([polkit], -+ [AS_HELP_STRING([--with-polkit], -+ [support PolicyKit @<:@default=check@:>@])], -+ [], -+ [with_polkit=check]) -+ -+AS_IF([test "x$with_polkit" != xno], -+ [PKG_CHECK_MODULES(POLKIT, -+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, -+ have_polkit=yes, -+ [if test "x$with_polkit" != xcheck; then -+ AC_MSG_FAILURE( -+ [--with-polkit was given, but test for polkit failed]) -+ else -+ have_polkit=no -+ fi -+ ])]) -+ - if test "x$have_polkit" = "xyes" ; then - AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit]) - fi
meta/recipes-support/consolekit/consolekit/sepbuildfix.patch +10 -8
@@ -1,16 +1,18 @@ -Fix builds in the case of seprate source from the build directory. +Fix builds in the case of separate source from the build directory. RP 2013/4/17 Upstream-Status: Pending - -Index: pam-ck-connector/Makefile.am -=================================================================== ---- consolekit/pam-ck-connector.orig/Makefile.am 2010-09-03 13:54:31.000000000 +0000 -+++ consolekit/pam-ck-connector/Makefile.am 2013-04-17 09:06:49.093524918 +0000 -@@ -4,7 +4,7 @@ +--- + pam-ck-connector/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/pam-ck-connector/Makefile.am b/pam-ck-connector/Makefile.am +index 7778d16..9b960a7 100644 +--- a/pam-ck-connector/Makefile.am ++++ b/pam-ck-connector/Makefile.am +@@ -4,7 +4,7 @@ if ENABLE_PAM_MODULE - INCLUDES = \ + AM_CFLAGS = \ $(LIBDBUS_CFLAGS) \ - -I$(top_builddir)/libck-connector \ + -I$(top_srcdir)/libck-connector \
meta/recipes-support/consolekit/consolekit_0.4.6.bb deleted +0 -53
53 lines not on this page · raw message
meta/recipes-support/consolekit/consolekit_2.0.0.bb new file +66 -0
66 lines not on this page · raw message
PATCH 2/3 pulseaudio: Drop x11 requirement for consolekit RDEPENDS
From: Khem Raj <[email protected]>
ConsoleKit2 no longer requires X11, so pulseaudio-module-console-kit can pull in consolekit on any sysvinit distro.
AI-Generated: Uses Claude Code
--- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-multimedia/pulseaudio/pulseaudio.inc +1 -2
@@ -274,8 +274,7 @@ RDEPENDS:pulseaudio-server = " \ RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" # pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG -# but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES -RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit x11', 'consolekit', '', d)}" +RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'consolekit', '', d)}" RDEPENDS:pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" FILES:${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
PATCH 3/3 piglit: Fix build with glibc 2.43+ and clang
In reply to Khem RajFrom: Khem Raj <[email protected]>
shader_runner assigns the result of strchr() on a const string to a non-const pointer, which clang rejects now that glibc's strchr() preserves const. Add a patch to declare the pointer const.
AI-Generated: Uses Claude Code
--- ...ader_runner-Keep-strchr-result-const.patch | 31 +++++++++++++++++++ meta/recipes-graphics/piglit/piglit_git.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-graphics/piglit/piglit/0001-shader_runner-Keep-strchr-result-const.patch
meta/recipes-graphics/piglit/piglit/0001-shader_runner-Keep-strchr-result-const.patch new file +31 -0
@@ -0,0 +1,31 @@ +From: Khem Raj <[email protected]> +Date: Sat, 24 Oct 2026 10:00:00 -0700 +Subject: [PATCH] shader_runner: Keep strchr() result const + +The include path parsing walks a const char cursor and stores the +result of strchr() in a plain char pointer. Since glibc 2.43, strchr() +preserves the const qualifier of its argument when C23 features are +enabled, which _GNU_SOURCE does, so clang fails the build: + + tests/shaders/shader_runner.c:1665:10: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] + +line_end is only read, so declare it const. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1281] +Signed-off-by: Khem Raj <[email protected]> +--- + tests/shaders/shader_runner.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c +--- a/tests/shaders/shader_runner.c ++++ b/tests/shaders/shader_runner.c +@@ -1662,7 +1662,7 @@ leave_state(enum states state, const char *line, const char *script_name) + + cursor = shader_string; + for (unsigned i = 0; i < num_shader_include_paths; i++) { +- char *line_end = strchr(cursor, '\n'); ++ const char *line_end = strchr(cursor, '\n'); + unsigned path_len = line_end - cursor - 1; + char *path = malloc(path_len + 1); + path[path_len] = '\0';
meta/recipes-graphics/piglit/piglit_git.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ file://0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch \ file://0001-tests-no_error.py-modify-_command-and-not-command.patch \ + file://0001-shader_runner-Keep-strchr-result-const.patch \ " UPSTREAM_CHECK_COMMITS = "1"
Quoted 3 lines · Khem Raj via lists.openembedded.org
Note that 2.0.0 changes session and seat IDs on D-Bus from object paths to bare IDs, which needs a matching fix in polkit's ConsoleKit backend.
This makes me worry about switching consolekit -> consolekit2 in the same recipe. There are a number of recipes in oe-core and meta-oe that depend on consolekit so might be impacted, have these been reviewed:
- pulseaudio
- networkmanager
- polkit
- lxdm
- xfce4-power-manager
Ross
Quoted 10 lines · Ross Burton
Quoted 3 lines · Khem Raj via lists.openembedded.org
Note that 2.0.0 changes session and seat IDs on D-Bus from object paths to bare IDs, which needs a matching fix in polkit's ConsoleKit backend.
This makes me worry about switching consolekit -> consolekit2 in the same recipe. There are a number of recipes in oe-core and meta-oe that depend on consolekit so might be impacted, have these been reviewed:
Quoted 6 lines
- pulseaudio
- networkmanager
- polkit
- lxdm
- xfce4-power-manager
I have patches for polkit and networkmanager, others did not show any problems, ptests worked where applicable
and XFCE image came up on qemu as well.
Quoted 2 lines
Ross
ping. Is there any concern about this change?
Quoted 1 line · Khem Raj
ping. Is there any concern about this change?
I think we just need to confirm whether all recipes which have a dependency on consolekit are compatible with its v2.0.0 release. IIRC there were a number of backwards-incompatible changes.
We may have to carry separate consolekit and consolekit2 recipes if there are recipes which aren't ready for consolekit v2.0.0.
This is still in the queue as no-one has yet had the time to go and look in to that. Sorry Khem!
Best regards,
Signature · 1 line
Paul Barker
Quoted 7 lines · Paul Barker
Quoted 1 line · Khem Raj
ping. Is there any concern about this change?
I think we just need to confirm whether all recipes which have a dependency on consolekit are compatible with its v2.0.0 release. IIRC there were a number of backwards-incompatible changes.
In OE-Core, pulseaudio is the only consumer
Pulseadio also only uses object paths from GetSessionsForUnixUser and the Seat signals.
It then calls GetUnixUser on those paths. All of these still return paths in 2.0
so it should work without changes. It skips ConsoleKit when logind is running.
are you or anyone else aware of something else that is impacted ?
Quoted 12 lines
We may have to carry separate
consolekitandconsolekit2recipes if there are recipes which aren't ready for consolekit v2.0.0.This is still in the queue as no-one has yet had the time to go and look in to that. Sorry Khem!
Best regards,
--
Paul Barker