From 8fe91ea02ef2892146ee7cf4c7ced4c76410288f Mon Sep 17 00:00:00 2001 From: Jan Rybar Date: Thu, 22 Aug 2024 13:52:41 +0200 Subject: [PATCH] late easyfix for new release Resolves: RHEL-55287 --- polkit.spec | 7 ++++++- pthread_condattr_loglevel.patch | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 pthread_condattr_loglevel.patch diff --git a/polkit.spec b/polkit.spec index 054573b..6a27aaa 100644 --- a/polkit.spec +++ b/polkit.spec @@ -4,12 +4,13 @@ Summary: An authorization framework Name: polkit Version: 125 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.0-or-later URL: https://github.com/polkit-org/polkit Source0: https://github.com/polkit-org/polkit/archive/refs/tags/%{version}.tar.gz Source1: polkit.sysusers +Patch1: pthread_condattr_loglevel.patch BuildRequires: gcc-c++ BuildRequires: glib2-devel >= 2.30.0 @@ -162,6 +163,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_libdir}/girepository-1.0/*.typelib %changelog +* Thu Aug 22 2024 Jan Rybar - 125-2 +- late easyfix for new release +- Resolves: RHEL-55287 + * Tue Aug 20 2024 Jan Rybar - 125-1 - rebase to polkit-125 - Resolves: RHEL-55287 diff --git a/pthread_condattr_loglevel.patch b/pthread_condattr_loglevel.patch new file mode 100644 index 0000000..e064c88 --- /dev/null +++ b/pthread_condattr_loglevel.patch @@ -0,0 +1,35 @@ +commit 13bea3e08f924002a6a5c2f275d4bf1588fc3d02 +Author: Sertonix +Date: Sun Aug 11 00:26:51 2024 +0200 + + Fix missing arguments with HAVE_PTHREAD_CONDATTR_SETCLOCK + + Fixes <64f5e4dda52> Add syslog-style log levels support + +diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c +index 3e665c7..a55e1c1 100644 +--- a/src/polkitbackend/polkitbackendduktapeauthority.c ++++ b/src/polkitbackend/polkitbackendduktapeauthority.c +@@ -767,12 +767,14 @@ runaway_killer_common(PolkitBackendJsAuthority *authority, RunawayKillerCtx *ctx + #ifdef HAVE_PTHREAD_CONDATTR_SETCLOCK + if ((pthread_err = pthread_condattr_init(&attr))) { + polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), ++ LOG_LEVEL_ERROR, + "Error initializing condition variable attributes: %s", + strerror(pthread_err)); + return FALSE; + } + if ((pthread_err = pthread_condattr_setclock(&attr, PK_CLOCK))) { + polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), ++ LOG_LEVEL_ERROR, + "Error setting condition variable attributes: %s", + strerror(pthread_err)); + goto err_clean_condattr; +@@ -780,6 +782,7 @@ runaway_killer_common(PolkitBackendJsAuthority *authority, RunawayKillerCtx *ctx + /* Init again, with needed attr */ + if ((pthread_err = pthread_cond_init(&ctx->cond, &attr))) { + polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), ++ LOG_LEVEL_ERROR, + "Error initializing condition variable: %s", + strerror(pthread_err)); + goto err_clean_condattr;