You are not logged in.

#1 2012-09-16 08:47:34

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

[SOLVED] Polkit 0.107 in testing

Hi!
I today finally saw polkit 0.107 has hit testing repo!
Well, i've been using systemd without ck for a month, with a polkit 0.105 recompilet with systemd support enabled.
What is gonna change with this latest version? Should i recompile 0.107 too? Or it will magically work with either ck and logind? And, last but not least, i recompiled networkmanager too. Can I return back to repo's one?
Thanks!

Last edited by nierro (2012-09-16 13:02:54)

Offline

#2 2012-09-16 09:27:18

Awebb
Member
Registered: 2010-05-06
Posts: 4,331

Re: [SOLVED] Polkit 0.107 in testing

You can answer that question by yourself by klicking on Packages on the top navigation, then search for the polkit package in testing and klick on "Package Actions - Source Files" on the top right. The PKGBUILD should be there.

Last edited by Awebb (2012-09-16 09:27:39)

Offline

#3 2012-09-16 09:45:09

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

Yes, i know.
But i can't see anything, does it mean there is no patch? And i have to recompile it again then...

Last edited by nierro (2012-09-16 09:45:23)

Offline

#4 2012-09-16 10:15:55

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

Re: [SOLVED] Polkit 0.107 in testing

the patch is there. https://projects.archlinux.org/svntogit … ges/polkit

the web interface is showing the trunk version and trunk is used for gnome-unstable right now.


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#5 2012-09-16 10:17:23

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

So i won't have to rebuild it again from abs? This is a great news!!!:)
EDIT: thanks for the info, obviously smile
EDIT2: should i rebuild networkmanager with systemd support anyway?
EDIT3: uhm mount without password isn't working after the upgrade. I used to have a rule in /etc/polkit-1/localauthority/50-local.d/ to have udisks2 let my user mount internal and external drives. But it seems it will no longer work.
Here it is:

[Storage Permissions]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

.

Last edited by nierro (2012-09-16 11:27:23)

Offline

#6 2012-09-16 11:55:53

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Polkit 0.107 in testing

the rule probably doesn't work anymore because since polkit 107 you have to write your rules in JavaScript (yes, seriously, JavaScript).
but you shouldn't need this rule in the first place if you have your session set up correctly. This should work automatically (at least it does for me).

Offline

#7 2012-09-16 11:58:20

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

Uhm...loginctl says my session is the only session.
So i'll try to remove that rule and see what will happen...

Offline

#8 2012-09-16 11:59:20

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Polkit 0.107 in testing

nierro wrote:

Uhm...loginctl says my session is the only session.
So i'll try to remove that rule and see what will happen...

does "loginctl show-session 1" show Active=yes ? how are you starting your session anyway?

Offline

#9 2012-09-16 12:02:14

Awebb
Member
Registered: 2010-05-06
Posts: 4,331

Re: [SOLVED] Polkit 0.107 in testing

What do you need that patch for? I compiled it with "--enable-systemd" and it now asks me for passwords on polkit relevant events. I then wrote some rules and it worked. Not the one in testing though, I rebuilt the stable one via abs.

Offline

#10 2012-09-16 12:19:35

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

@65kid: Uhm it says active=no.

loginctl show-session 1
Id=1
Timestamp=Sun, 16 Sep 2012 14:13:52 +0200
TimestampMonotonic=10100120
DefaultControlGroup=name=systemd:/user/federico/1
VTNr=1
TTY=tty1
Remote=no
Service=login
Leader=182
Audit=1
Type=tty
Class=user
Active=no
State=closing
KillProcesses=no
IdleHint=no
IdleSinceHint=1347797630629978
IdleSinceHintMonotonic=8570165
Name=federico

I'm using the autologin to virtual console (https://wiki.archlinux.org/index.php/Au … th_systemd) + .bash_profile to startx when i'm autologged to tty1. My .xinitrc only contains "exec startxfce4"...
I removed consolekit, upower, udisks and xfce4-power-manager 2-3 weeks ago, if this can be useful.
@Awebb: polkit 0.107 should use logind automatically, without the need to recompile. And i think it's is pretty useful for arch-dev that people test their package instead of building their own.

Offline

#11 2012-09-16 12:23:09

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Polkit 0.107 in testing

nierro wrote:

I'm using the autologin to virtual console (https://wiki.archlinux.org/index.php/Au … th_systemd) + .bash_profile to startx when i'm autologged to tty1. My .xinitrc only contains "exec startxfce4"...
I removed consolekit, upower, udisks and xfce4-power-manager 2-3 weeks ago, if this can be useful.
@Awebb: polkit 0.107 should use logind automatically, without the need to recompile. And i think it's is pretty useful for arch-dev that people test their package instead of building their own.

you have to make sure that X starts on the same TTY that you use for the autologin, otherwise systemd can't keep track of the session:

http://blog.falconindy.com/articles/bac … stemd.html

Offline

#12 2012-09-16 12:30:14

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

So, i added my .xserverrc, as it was told in that post, and now my session is Active=yes.
I can't mount without password anyway...do you think I should remove all of my custom polkit rules?
EDIT: i can say that now hibernating, suspending, rebooting and poweroff will work without asking for a password. But why mount won't?
EDIT2: tried moving out of the /50-local.d/ folder every custom rule. I can't mount anyway.

Last edited by nierro (2012-09-16 12:39:34)

Offline

#13 2012-09-16 12:45:13

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Polkit 0.107 in testing

nierro wrote:

So, i added my .xserverrc, as it was told in that post, and now my session is Active=yes.
I can't mount without password anyway...do you think I should remove all of my custom polkit rules?
EDIT: i can say that now hibernating, suspending, rebooting and poweroff will work without asking for a password. But why mount won't?
EDIT2: tried moving out of the /50-local.d/ folder every custom rule. I can't mount anyway.

hm, not sure what is going on here. if suspend etc. works without password, the session should be set up right. is udisks2.service running (check "systemctl status udisks2")? it should be auto-activated via dbus.

Offline

#14 2012-09-16 12:46:55

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

Yes, it is.

systemctl status udisks2.service 
udisks2.service - Storage Daemon
	  Loaded: loaded (/usr/lib/systemd/system/udisks2.service; static)
	  Active: active (running) since Sun, 16 Sep 2012 14:36:58 +0200; 8min ago
	Main PID: 376 (udisksd)
	  CGroup: name=systemd:/system/udisks2.service
		  └ 376 /usr/lib/udisks2/udisksd --no-debug

Sep 16 14:36:58 arch udisksd[376]: udisks daemon version 1.94.0 starting
Sep 16 14:36:58 arch udisksd[376]: Acquired the name org.freedesktop.UDisks2 on the system message bus

Offline

#15 2012-09-16 12:50:43

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

Ok i found out something interesting: usb external drive mount now works. But internal drives can't still be mounted as normal user.
EDIT: may be it's because internal drives are Windows drives? Can it be the answer we're looking for?
EDIT2: this is my journalctl after have tried to mount windows partition:

Sep 16 14:52:06 arch polkitd[234]: Operator of unix-session:1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.20 [/usr/lib/gvfs/gvfs-udisks2-volume-monitor] (owned by unix-user:federico)

Last edited by nierro (2012-09-16 12:53:32)

Offline

#16 2012-09-16 13:00:30

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] Polkit 0.107 in testing

nierro wrote:

Ok i found out something interesting: usb external drive mount now works. But internal drives can't still be mounted as normal user.
EDIT: may be it's because internal drives are Windows drives? Can it be the answer we're looking for?
EDIT2: this is my journalctl after have tried to mount windows partition:

Sep 16 14:52:06 arch polkitd[234]: Operator of unix-session:1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.20 [/usr/lib/gvfs/gvfs-udisks2-volume-monitor] (owned by unix-user:federico)

why are you not using /etc/fstab for internal drives? Use x-systemd.automount if you don't want them mounted always...
maybe this is by design and users aren't allowed to mount internal drives by default. My guess is that udisks2 uses different polkit actions for internal drives than for external drives, so you would have to use a custom rule for this after all (but, as mentioned, in JavaScript).

Offline

#17 2012-09-16 13:02:39

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

Ok, so i'll mount them using fstab smile
Ok, so for me this is solved, really really thank you very much 65kid, you helped me a lot!
Bye!

Offline

#18 2012-09-16 19:10:43

Awebb
Member
Registered: 2010-05-06
Posts: 4,331

Re: [SOLVED] Polkit 0.107 in testing

nierro wrote:

@Awebb: polkit 0.107 should use logind automatically, without the need to recompile. And i think it's is pretty useful for arch-dev that people test their package instead of building their own.

It obviously does not. I had to recompile the package in testing with "--enable-systemd" as well.

Offline

#19 2012-09-16 19:11:48

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] Polkit 0.107 in testing

Indeed it worked for me.

Offline

#20 2012-09-16 20:56:13

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,094
Website

Re: [SOLVED] Polkit 0.107 in testing

Awebb wrote:
nierro wrote:

@Awebb: polkit 0.107 should use logind automatically, without the need to recompile. And i think it's is pretty useful for arch-dev that people test their package instead of building their own.

It obviously does not. I had to recompile the package in testing with "--enable-systemd" as well.

ELF dependencies say otherwise. Straight out of the package in testing...

$ readelf -d usr/lib/polkit-1/polkitd

Dynamic section at offset 0x19e8c contains 33 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libpolkit-gobject-1.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgio-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgobject-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libglib-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libsystemd-login.so.0]
 0x00000001 (NEEDED)                     Shared library: [libsystemd-daemon.so.0]
 0x00000001 (NEEDED)                     Shared library: [libexpat.so.1]
 0x00000001 (NEEDED)                     Shared library: [libmozjs185.so.1.0]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
...

Recompiling with --enable-systemd should yield the same binary.

Offline

#21 2012-09-16 23:39:28

Awebb
Member
Registered: 2010-05-06
Posts: 4,331

Re: [SOLVED] Polkit 0.107 in testing

I now tried it back and forth a few times. It works with the polkit package from testing, wether you add --enable-systemd or not.

However (I made two files with outpot, with and without --enable-systemd)

$ grep Shared polkit_*
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libpolkit-gobject-1.so.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libsystemd-login.so.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libexpat.so.1]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libmozjs185.so.1.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
polkit_enablesystemd: 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libpolkit-gobject-1.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libsystemd-login.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libsystemd-daemon.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libexpat.so.1]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libmozjs185.so.1.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
polkit_naked: 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

… enabling systemd makes libsystemd-daemon.so.0 go away. Why?

Offline

#22 2012-09-17 01:40:25

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,094
Website

Re: [SOLVED] Polkit 0.107 in testing

sd-daemon is needed for the patch we apply so that polkit works with both consolekit and logind (man sd_booted). You're compiling the latest from the SVN (the build in gnome-unstable, not testing), which is systemd only and doesn't need this linkage.

Offline

#23 2012-09-17 06:54:56

Awebb
Member
Registered: 2010-05-06
Posts: 4,331

Re: [SOLVED] Polkit 0.107 in testing

Thanks, falconindy. I just learned that one should read the Commit messages before engaging in discussions about testing packages :-)

Offline

Board footer

Powered by FluxBB