GNU bug report logs - #51972
[PATCH core-updates-frozen] gnu: elogind: Revert changes to polkit build time detection.

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Fri, 19 Nov 2021 11:10:01 UTC

Severity: normal

Tags: patch

Done: Timothy Sample <samplet <at> ngyro.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51972 in the body.
You can then email your comments to 51972 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51972; Package guix-patches. (Fri, 19 Nov 2021 11:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Poiret <dev <at> jpoiret.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 19 Nov 2021 11:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: guix-patches <at> gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH core-updates-frozen] gnu: elogind: Revert changes to polkit
 build time detection.
Date: Fri, 19 Nov 2021 11:09:49 +0000
* gnu/packages/patches/elogind-revert-polkit-detection.patch:
Add it.
* gnu/packages/freedesktop.scm (elogind): Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  |  4 +-
 .../elogind-revert-polkit-detection.patch     | 41 +++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/elogind-revert-polkit-detection.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cc6d4fab7b..521142148f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1009,6 +1009,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/elixir-path-length.patch			\
   %D%/packages/patches/elm-compiler-disable-reactor.patch	\
   %D%/packages/patches/elm-compiler-fix-map-key.patch		\
+  %D%/packages/patches/elogind-revert-polkit-detection.patch	\
   %D%/packages/patches/emacs-exec-path.patch			\
   %D%/packages/patches/emacs-fix-scheme-indent-function.patch	\
   %D%/packages/patches/emacs-ignore-empty-xim-styles.patch	\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 06b1fc952c..f2b92036e9 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -591,7 +591,9 @@ (define-public elogind
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq"))))
+                "16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq"))
+              (patches (search-patches
+                      "elogind-revert-polkit-detection.patch"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags
diff --git a/gnu/packages/patches/elogind-revert-polkit-detection.patch b/gnu/packages/patches/elogind-revert-polkit-detection.patch
new file mode 100644
index 0000000000..43dd1684b6
--- /dev/null
+++ b/gnu/packages/patches/elogind-revert-polkit-detection.patch
@@ -0,0 +1,41 @@
+From 715ce0a6459e418f92e74c7ce52df3244c18f383 Mon Sep 17 00:00:00 2001
+From: Sven Eden <sven.eden <at> prydeworx.com>
+Date: Mon, 8 Mar 2021 08:40:08 +0100
+Subject: [PATCH] Revert "Disable polkit support if libpolkit is not installed"
+
+This reverts commit 1194dec4f8f2d1b8bd14e1625f34418ecfce817e.
+
+Removing polkit support with -Dpolkit=auto when libpolkit is not
+installed, removes the whole interface. This makes it impossible to
+add polkit support as a runtime dependency.
+
+Bug: #167
+Closes: #206
+Signed-off-by: Sven Eden <sven.eden <at> prydeworx.com>
+---
+ meson.build | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 2dd05db3c..f38551f55 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1157,15 +1157,6 @@ if want_polkit != 'false' and not skip_deps
+                 message('Old polkit detected, will install pkla files')
+                 install_polkit_pkla = true
+         endif
+-#if 1 /// Disable polkit completely if libpolkit is not there. See elogind issue #167
+-        if not libpolkit.found()
+-                if want_polkit != 'auto'
+-                        error('Polkit requested but libpolkit was not found.')
+-                endif
+-                install_polkit = false
+-                want_polkit    = false
+-        endif
+-#endif // 1
+ endif
+ conf.set10('ENABLE_POLKIT', install_polkit)
+ 
+-- 
+2.33.1
+
-- 
2.33.1





Information forwarded to guix-patches <at> gnu.org:
bug#51972; Package guix-patches. (Fri, 19 Nov 2021 13:28:01 GMT) Full text and rfc822 format available.

Message #8 received at 51972 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 51972 <at> debbugs.gnu.org
Subject: Re: bug#51972: [PATCH core-updates-frozen] gnu: elogind: Revert
 changes to polkit build time detection.
Date: Fri, 19 Nov 2021 14:27:16 +0100
Josselin Poiret <dev <at> jpoiret.xyz> skribis:

> * gnu/packages/patches/elogind-revert-polkit-detection.patch:
> Add it.
> * gnu/packages/freedesktop.scm (elogind): Use it.
> * gnu/local.mk (dist_patch_DATA): Add it.

[...]

> +++ b/gnu/packages/patches/elogind-revert-polkit-detection.patch
> @@ -0,0 +1,41 @@
> +From 715ce0a6459e418f92e74c7ce52df3244c18f383 Mon Sep 17 00:00:00 2001
> +From: Sven Eden <sven.eden <at> prydeworx.com>
> +Date: Mon, 8 Mar 2021 08:40:08 +0100
> +Subject: [PATCH] Revert "Disable polkit support if libpolkit is not installed"
> +
> +This reverts commit 1194dec4f8f2d1b8bd14e1625f34418ecfce817e.
> +
> +Removing polkit support with -Dpolkit=auto when libpolkit is not
> +installed, removes the whole interface. This makes it impossible to
> +add polkit support as a runtime dependency.
> +
> +Bug: #167
> +Closes: #206

Could you explain what user-visible bug that fixes?

I suppose commit abc9a9b74549016bc749392d3cecf86386286145 by Timothy
this morning did not put an end to our polkit problems, right?

(Double-checking because this will lead us to rebuild many things yet
another time…)

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#51972; Package guix-patches. (Fri, 19 Nov 2021 14:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 51972 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: dev <at> jpoiret.xyz, 51972 <at> debbugs.gnu.org
Subject: Re: bug#51972: [PATCH core-updates-frozen] gnu: elogind: Revert
 changes to polkit build time detection.
Date: Fri, 19 Nov 2021 14:52:31 +0000
Ludovic Courtès <ludo <at> gnu.org> writes:

> Could you explain what user-visible bug that fixes?
>
> I suppose commit abc9a9b74549016bc749392d3cecf86386286145 by Timothy
> this morning did not put an end to our polkit problems, right?

Right!

elogind doesn't depend on polkit when building it, but uses it when
running to check permissions of users to interact with the login daemon:
shutting down, rebooting, or changing VTs.  However, elogind checks for
the VT changing permission (org.freedesktop.login1.chvt) when trying to
activate a session.  An upstream commit that found its way into his
release broke the runtime detection of polkit, and so it was impossible
for elogind to check for the needed permissions.  This meant that among
other things, wlroots-based compositors could not take control of a seat
and so would not start.

I think we're not entirely through for polkit/elogind and friends
though, as GDM isn't able to initiate shutdowns curretly if I'm not
mistaken, but that might just need some polkit rules tweaking.  I'll
look into it when I finish rebuilding elogind dependents locally (I was
using grafts to test this patch).  At least I'm able to run sway now!

Best,
Josselin Poiret




Reply sent to Timothy Sample <samplet <at> ngyro.com>:
You have taken responsibility. (Fri, 19 Nov 2021 22:25:02 GMT) Full text and rfc822 format available.

Notification sent to Josselin Poiret <dev <at> jpoiret.xyz>:
bug acknowledged by developer. (Fri, 19 Nov 2021 22:25:02 GMT) Full text and rfc822 format available.

Message #16 received at 51972-done <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 51972-done <at> debbugs.gnu.org
Subject: Re: bug#51972: [PATCH core-updates-frozen] gnu: elogind: Revert
 changes to polkit build time detection.
Date: Fri, 19 Nov 2021 17:24:10 -0500
Hi Josselin,

Pushed as 2db788fe74ee2db52b6cf7c473c05c12a8f9b770.

Thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Dec 2021 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.