Solved polkitd does not work since upgrade to 14.0-RELEASE

First of all, I think that this question is not an easy one. I don't expect a quick solution, but rather some ways of investigation.

Background: I have 3 FreeBSD installations with almost the same configuration: 14.0-RELEASE-p3 and Lxde/slim as DE.
I upgraded two of them from 13.2-RELEASE to 14-RELEASE without any trouble. The last one, however, has a problem and not a little one.

As the title says, polkitd doesn't work. It exits with a message like this:
Code:
Successfully changed to user polkitd
11:30:20.696: Loading rules from directory /usr/local/etc/polkit-1/rules.d
11:30:20.696: Loading rules from directory /usr/local/share/polkit-1/rules.d
11:30:20.696: Finished loading, compiling and executing 1 rules
Entering main event loop
Connected to the system bus
11:30:20.697: Lost the name org.freedesktop.PolicyKit1 - exiting
Shutting down
Exiting with code 1

Digging with dbus-monitor --system, I saw that:
Code:
method call time=1706439359.110346 sender=:1.87 -> destination=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RequestName
   string "org.freedesktop.PolicyKit1"
   uint32 1
error time=1706439359.110360 sender=org.freedesktop.DBus -> destination=:1.87 error_name=org.freedesktop.DBus.Error.AccessDenied reply_serial=3
   string "Connection ":1.87" is not allowed to own the service "org.freedesktop.PolicyKit1" due to security policies in the configuration file"

The files /usr/local/share/dbus-1/system.conf and /usr/local/share/dbus-1/session.conf are the same than the two others systems that work well.

And, of course, dbus is actually running.

Any suggestion? I'm really lost there.
 
I didn't see you mention the version of polkit you're using. I presume you're running the latest one available from the FreeBSD package repository (124), and that it's the same version on each host? Also, did you install it from the package repo, or install it as a port?
 
Thanks for the replies. I use packages and I'm on the latest repo. Can't tell the polkit version for the moment as I won't access to the machine until this evening.

I thought to running a pkg upgrade again. It's strange that only one of three systems is affected. Well, I upgraded the two others in 2023, just as 14.0-RELEASE was available. Perhaps this explains that. (However, the patch d4a06ae98e8b3e2a15d252cfc432cc0a7e698759 was commited the 20 and I upgraded this machine the 27...)
 
I have had the same problem. There is a bug in version 124. Just use version 124_1 that will fix it. At least it fixed it for me.
Version 124_1 is now in the latest repo.
 
124_1 is the latter one I've posted in my previous post.

Note for quarterly users (not relevant with this thread, though):
124 and 124_1 are not yet MFH'ed to quarterly (currently, 2024Q1) yet.
 
You (all) were right:
# pkg info polkit
polkit-124
Name : polkit
Version : 124

But alas:
# pkg upgrade polkit
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.

Yet:
# pkg -vv
(...)
Repositories:
FreeBSD: {
url : "pkg+http://pkg.freebsd.org/FreeBSD:14:amd64/latest",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}

I don't understand why I can't get the latest version of polkit...

Never, never, I had a so messy upgrade. :mad:
 
Maybe the latest one doesn't be built yet for some reason.
As a workaround, you can copy
/usr/local/share/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample
as
/usr/local/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
(not to confuse pkg for filename collision). Thecopied file can be removed once policykit is updated to 124_1. This was what I did until it was fixed.
 
Maybe the latest one doesn't be built yet for some reason.
As a workaround, you can copy
/usr/local/share/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample
as
/usr/local/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
(not to confuse pkg for filename collision). Thecopied file can be removed once policykit is updated to 124_1. This was what I did until it was fixed.
Thanks T-Aoki, but I already did that yesterday. polkit seems to work, but I have others problems like chrome that doesn't display correctly the pages (and is inusable). Maybe, it's related to the others parts of the patch, maybe not. I fear I have to wait for the 124_1 version to know.
 
polkit seems to work, but I have others problems like chrome that doesn't display correctly the pages (and is inusable). Maybe, it's related to the others parts of the patch, maybe not. I fear I have to wait for the 124_1 version to know.
Difference between 124 and 124_1 is just the rename of a configuration file. Dropping patch to add ".sample" to original file name and corresponding pkg-plist fix only. So it shouldn't matter for the problem of chromium.

Possibly, it could be because something which need to be bumped are not bumped, for example, sysutils/mate-polkit and sysutils/plasma5-polkit-kde-agent-1. I've forcibly rebuilt locally sysutils/*polkit* ports before I noticed the configuration file problem.
 
Charlie_, it's just a typo of T-Aoki, I didn't even see?
The file stayed in the same place, I've just removed ".sample". I will undo the name change before upgrade.

Edit: I didn't understand the exact workaround of T-Aoki. I see now, but this won't help me.
 
Charlie_, it's just a typo of T-Aoki, I didn't even see?
The file stayed in the same place, I've just removed ".sample". I will undo the name change before upgrade.

Edit: I didn't understand the exact workaround of T-Aoki. I see now, but this won't help me.
Not a typo. It is intentional not to confuse pkg to missingly think "there is already exists correct file in place even though PORTREVISION is not bumbed". polkit picks configuration file from /usr/local/etc/dbus-1/system.d/, too.
 
Ok. As there is no polkit-124_1 in the latest repo yet (commit has been made the 20/01...), I tried to force reinstall of polkit-123. polkit works, but the problem affecting chrome remained. So, it's two different issues.

Chrome reported: "Location of variable sk_FragColor conflicts with another variable.". Searching on the net brings a simple solution: rm -rf ~/.config/chromium. That worked.
 
I got confused about this polkit issue today again.
Emrion I was wondering why you say that the polkit_124_1 package is still not in the latest pkg repo.
I run a FreeBSD 13.2-RELEASE with latest packages and pkg upgrade installed polkit_124_1 for me and the
system runs fine after the upgrade without any problems. The upgrade was around a week ago.
However today I wanted to upgrade a 14.0-RELEASE machine and pkg have had only polkit_124 on offer.
So I canceled the upgrade as I know there are problems coming out of it.
But why has a 13.2-RELEASE latest machine a different version than a 14.0-RELEASE latest machine?
Scratching my head on this one.
 
2 possibilities I can imagine.
  1. The mirror server you've led to does not have it yet.
  2. Something in dependencies chain is broken or taking too much time, causing build of polkit 124_1 cannot start yet.
 
But why has a 13.2-RELEASE latest machine a different version than a 14.0-RELEASE latest machine?
Scratching my head on this one.
I would like to know too. Fifteen days have elapsed since the commit of polkit-124_1 and pkg upgrade on 14.0-RELEASE with the latest repository still proposes the 124 version. I'm surprised that we have so few SOS on the forum for this concern.
 
I'm surprised that we have so few SOS on the forum for this concern.
Maybe because 2024Q1 doesn't have even 124 yet.
If anyone usually bitten by these kind of problems are using quarterly (now 2024Q1), they shouldn't have been bitten. Only persons "chasing latest" && "using official pre-built pkgs" would be bitten for now.
 
I would like to know too. Fifteen days have elapsed since the commit of polkit-124_1 and pkg upgrade on 14.0-RELEASE with the latest repository still proposes the 124 version. I'm surprised that we have so few SOS on the forum for this concern.
I have the same problem too. I think we are a few waiting and not everyone writes here.
 
Back
Top