Bug 276409 - sysutils/polkit: update to 124
Summary: sysutils/polkit: update to 124
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL: https://gitlab.freedesktop.org/polkit...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-17 21:41 UTC by Olivier Duchateau
Modified: 2024-01-20 20:55 UTC (History)
5 users (show)

See Also:
arrowd: maintainer-feedback+


Attachments
Patch to update sysutils/polkit (2.80 KB, patch)
2024-01-17 21:41 UTC, Olivier Duchateau
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Duchateau 2024-01-17 21:41:24 UTC
Created attachment 247733 [details]
Patch to update sysutils/polkit

- Update to 124

Note: lang/spidermonkey115 is available for review D43221
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2024-01-18 06:06:43 UTC
Can't we just pass pam_prefix from the port's Makefile instead of patching?
Comment 2 Olivier Duchateau 2024-01-18 16:04:00 UTC
(In reply to Gleb Popov from comment #1)

Build fails, if we enable pam_prefix option (error says it is problem from meson build system).
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-01-18 18:02:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5ac622032d86c28eddc023436ce8dc9e50387b3c

commit 5ac622032d86c28eddc023436ce8dc9e50387b3c
Author:     Olivier Duchateau <duchateau.olivier@gmail.com>
AuthorDate: 2024-01-18 18:00:55 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-01-18 18:02:00 +0000

    sysutils/polkit: Update to 124

    PR:             276409
    Co-authored-by: Gleb Popov <arrowd@FreeBSD.org>

 sysutils/polkit/Makefile                       |  8 ++++----
 sysutils/polkit/distinfo                       |  6 +++---
 sysutils/polkit/files/patch-meson.build (gone) | 11 -----------
 sysutils/polkit/pkg-plist                      |  2 +-
 4 files changed, 8 insertions(+), 19 deletions(-)
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2024-01-18 18:04:16 UTC
Thanks for the patch. I made the pam_prefix option work and also removed the spidermonkey dependency bump for now.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-01-18 19:38:17 UTC
(In reply to Gleb Popov from comment #4)
> also removed the spidermonkey dependency bump for now.
But it mandatory require newer version.
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2024-01-18 19:40:56 UTC
(In reply to Vladimir Druzenko from comment #5)
How is that? The port defaults to duktape as JS engine.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-01-18 20:14:36 UTC
(In reply to Gleb Popov from comment #6)
Just turn on SPIDERMONKEY option.
Comment 8 Dima Panov freebsd_committer freebsd_triage 2024-01-18 20:49:44 UTC
(In reply to Vladimir Druzenko from comment #5)
Nope.

No reason to force newest (and absend) spidermonkey while duktape is already exist, used by default and closes ANY requirements for JS execution.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-01-18 21:16:37 UTC
(In reply to Dima Panov from comment #8)
Force??? What are you talking about?
I said how to reproduce this build error.
Comment 10 fgorter 2024-01-19 09:13:27 UTC
(In reply to Olivier Duchateau from comment #0)

Pray tell, my dear man, where on Earth is "libmozjs-115.so:lang/spidermonkey115" supposed to come from?

Building polkit with duktape enabled has broken polkit authorizations. Ditto with spidermonkey option. Actual compilation might be successful, but resulting install does not.

plasma5-polkit-kde-agent-1-5.27.10 and polkit-gnome-0.105_4 no longer work, undermining PolKit & ConsoleKit functionality of interactive authorization framework.

It is a rather deliberately confusing thing to do, to allow a non-existent spidermonkey to remain in build options when version 115 specifically isn't available.
Comment 11 Gleb Popov freebsd_committer freebsd_triage 2024-01-19 10:21:25 UTC
(In reply to fgorter from comment #10)
When did the breakage happen? polkit-123 with duktape is working for me right now.
Comment 12 Olivier Duchateau 2024-01-19 14:54:13 UTC
(In reply to fgorter from comment #10)

lang/spidermonkey115 is on review for almost 1 month, nobody cared. Blame ports committers!

I use this port since I use GNOME 45.

polkit-gnome is not anymore maintained by upstream. It should have been removed long time ago.

GNOME Shell provides a polkit agent (like budgie-desktop, also tested with pantheon-agent-polkit), and they work fine with polkit 123 and 124.
Comment 13 Guido Falsi freebsd_committer freebsd_triage 2024-01-20 11:09:32 UTC
(In reply to Gleb Popov from comment #11)

Using XFCE I am now noticing a change that could be caused by the polkit update from 123 to 124.

When trying to logout/reboot XFCE by default shows a requester giving options to shutdown, reboot, logout (or cancel). To choose which are available polkit is interrogated.

After the update there is a delay like something is timing out, before the requester . Did not measure the delay, but it is around 30 seconds.

What are the best steps to verify this? Should I try to revert to version 123 locally?

Thanks!
Comment 14 Gleb Popov freebsd_committer freebsd_triage 2024-01-20 11:25:00 UTC
(In reply to Guido Falsi from comment #13)
I'd try following:

1. Call pkaction to figure out what action is checked for shutdown/reboot. Most likely it is "org.freedesktop.consolekit.system.restart"
2. Get a PID of some of your processes. A browser or a file manager will do.
3. Run "dbus-monitor --system" as root
4. Run "pkcheck -p <your PID> -a <your action>"

The command should exit with code 0 instantly if your user is allowed to initiate the reboot. Otherwise you'll get a error message. In the dbus-monitor output you should see how "pkcheck" talks to "polkitd".
Comment 15 Guido Falsi freebsd_committer freebsd_triage 2024-01-20 13:58:32 UTC
(In reply to Gleb Popov from comment #14)

I'm getting an error at the first step:

> pkaction -v
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Launch helper exited with unknown return code 1


And polkit is actually not running. It used to. Not sure what part of the login is supposed to launch it. launching it manually as root gives:

Successfully changed to user polkitd
14:57:30.902: Loading rules from directory /usr/local/etc/polkit-1/rules.d
14:57:30.902: Loading rules from directory /usr/local/share/polkit-1/rules.d
14:57:30.902: Finished loading, compiling and executing 1 rules
Entering main event loop
Connected to the system bus
14:57:30.903: Lost the name org.freedesktop.PolicyKit1 - exiting
Shutting down
Exiting with code 1
Comment 16 commit-hook freebsd_committer freebsd_triage 2024-01-20 16:54:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d4a06ae98e8b3e2a15d252cfc432cc0a7e698759

commit d4a06ae98e8b3e2a15d252cfc432cc0a7e698759
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-01-20 16:49:04 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-01-20 16:53:12 +0000

    sysutils/polkit: Install policy config with a proper name.

    PR:             276409
    Reported by:    madpilot
    Fixes:  5ac622032d86c28eddc023436ce8dc9e50387b3c

 sysutils/polkit/Makefile                            |  1 +
 sysutils/polkit/files/patch-data_meson.build (gone) | 11 -----------
 sysutils/polkit/pkg-plist                           |  2 +-
 3 files changed, 2 insertions(+), 12 deletions(-)
Comment 17 Gleb Popov freebsd_committer freebsd_triage 2024-01-20 16:55:46 UTC
I did a silly mistake in that commit, sorry for the breakage and thanks for noticing!
Comment 18 Guido Falsi freebsd_committer freebsd_triage 2024-01-20 20:55:57 UTC
Thanks for the fast feedback and quick fix!