Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757579 - sys-auth/polkit-0.118 breaks kde-plasma mount usb-flash by user
Summary: sys-auth/polkit-0.118 breaks kde-plasma mount usb-flash by user
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-29 09:23 UTC by Sergey Torokhov
Modified: 2020-12-22 17:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge_info.txt (emerge_info.txt,6.45 KB, text/plain)
2020-11-29 09:24 UTC, Sergey Torokhov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Torokhov 2020-11-29 09:23:08 UTC
After upgrade from polkit-0.116-r1 to polkit-0.118 I'm not able to mount usb flash drive by user via kde-plasma system tray notification area or dolphin file manager. In case of dolphin I get error:

> An error occurred while accessing 'Home', the system responded: 
> You are not authorized to perform this operation: 
> Not authorized to perform operation (polkit authority not available and caller is not uid 0)

Downgrade to sys-auth/polkit-0.116-r1 resolve this issue. 

For mount I use udesks2 rule:

># cat 10-udisks.rules 
>polkit.addRule(function(action, subject) {
>    if (action.id == "org.freedesktop.udisks2.filesystem-mount" 
>    && subject.isInGroup("users")) {
>        return "yes";
>    }
>});


With polkit-0.118 after trying to mount flash drive by user "messages" file contains:

> # grep polkit /var/log/messages
> Nov 29 11:19:05 fenrir polkitd[2135]: Unregistered Authentication Agent for unix-session:2 (system bus name :1.11, object path /org/kde/PolicyKit1/AuthenticationAgent, locale C)
> Nov 29 11:19:06 fenrir polkitd[2135]: Lost the name org.freedesktop.PolicyKit1 - exiting
> Nov 29 11:21:58 fenrir polkitd[2126]: Started polkitd version 0.118
> Nov 29 11:21:59 fenrir polkitd[2241]: Started polkitd version 0.118
> Nov 29 11:22:35 fenrir polkitd[2241]: Loading rules from directory /etc/polkit-1/rules.d
> Nov 29 11:22:35 fenrir polkitd[2126]: Loading rules from directory /etc/polkit-1/rules.d
> Nov 29 11:22:35 fenrir polkitd[2126]: Loading rules from directory /usr/share/polkit-1/rules.d
> Nov 29 11:22:35 fenrir polkitd[2241]: Loading rules from directory /usr/share/polkit-1/rules.d
> Nov 29 11:22:35 fenrir polkitd[2126]: Finished loading, compiling and executing 2 rules
> Nov 29 11:22:35 fenrir polkitd[2241]: Finished loading, compiling and executing 2 rules
> Nov 29 11:22:35 fenrir polkitd[2126]: Lost the name org.freedesktop.PolicyKit1 - exiting
> Nov 29 11:22:35 fenrir polkitd[2241]: Acquired the name org.freedesktop.PolicyKit1 on the system bus



I tried to use this way [1] instead with addition of user to plugdev group but without success.

[1] https://wiki.gentoo.org/wiki/KDE/Troubleshooting#Unable_to_mount_devices_using_KDE_Plasma_Device_Notifier 

Reproducible: Always
Comment 1 Sergey Torokhov 2020-11-29 09:24:13 UTC
Created attachment 675673 [details]
emerge_info.txt
Comment 2 Sergey Torokhov 2020-11-29 09:30:43 UTC
# emerge -1av polkit

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] sys-auth/polkit-0.118::gentoo [0.116-r1::gentoo] USE="elogind gtk introspection nls pam -examples -jit -kde (-selinux) -systemd -test"
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-11-29 13:44:07 UTC
Have you tried enabling the "kde" USE flag in sys-auth/polkit-0.118?
Comment 4 Sergey Torokhov 2020-11-29 14:15:10 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #3)
> Have you tried enabling the "kde" USE flag in sys-auth/polkit-0.118?

This use flag adds runtime dependency kde-plasma/polkit-kde-agent that is already installed in my system before I emerge polkit.
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-11-29 15:56:50 UTC
Did you logout and re-login after polkit update?

For the record, I haven't experienced any issues mounting any removable devices in KDE with polkit-0.118 on three Gentoo systems. So I doubt there really is a bug but rather some misconfiguration.
Comment 6 Sergey Torokhov 2020-11-30 12:05:47 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #5)
> Did you logout and re-login after polkit update?
> 
> For the record, I haven't experienced any issues mounting any removable
> devices in KDE with polkit-0.118 on three Gentoo systems. So I doubt there
> really is a bug but rather some misconfiguration.

Yes, I rebooted after upgrade or downgrade. It's strange but last time I have no access mount the same usb flash drive with polkit-0.116 too while I didn't change preferences or didn't update any related pkgs: only installed lua and gimp-2.99.2 to check build.log. 

I'll try to recheck polkit prefs and udisks2 rules.
Comment 7 Francois Chenier 2020-12-03 01:20:10 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #5)
> For the record, I haven't experienced any issues mounting any removable
> devices in KDE with polkit-0.118 on three Gentoo systems. So I doubt there
> really is a bug but rather some misconfiguration.

Same for me. I upgraded to polkit-0.118 today, no issue mounting removable devices on latest KDE. Tested on AMD64, with patched polkit-0.118 that uses duktape instead of spidermonkey as JS engine.
Comment 8 Sergey Torokhov 2020-12-22 14:06:34 UTC
It's works again for me with config of plugdev user addition that I tried early to.

Since 30 Nov 2020 I merged some packages. I suspect issue is resolved due to re-emerge of kde-plasma/plasma-disks or/and dev-util/desktop-file-utils.
Comment 9 Andreas Sturmlechner gentoo-dev 2020-12-22 15:59:14 UTC
(In reply to Sergey Torokhov from comment #8)
> Since 30 Nov 2020 I merged some packages. I suspect issue is resolved due to
> re-emerge of kde-plasma/plasma-disks or/and dev-util/desktop-file-utils.

Those packages definitely are not involved here.
Comment 10 Sergey Torokhov 2020-12-22 17:22:52 UTC
(In reply to Andreas Sturmlechner from comment #9)
> (In reply to Sergey Torokhov from comment #8)
> > Since 30 Nov 2020 I merged some packages. I suspect issue is resolved due to
> > re-emerge of kde-plasma/plasma-disks or/and dev-util/desktop-file-utils.
> 
> Those packages definitely are not involved here.

On some linux community forum I was recommended re-emerge sys-libs/libblockdev and
on 15 Dec the sys-libs/libblockdev-2.24 was re-emerge in system too.

The kmod, e2fsprog and then udisks was recommended to re-emerge also. But I didn't touch them.