GNU bug report logs -
#27889
Polkit actions are not updated after guix system reconfigure
Previous Next
To reply to this bug, email your comments to 27889 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#27889
; Package
guix
.
(Mon, 31 Jul 2017 21:10:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ryan Moe <ryan.moe <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Mon, 31 Jul 2017 21:10:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When a service is added to or removed from the system configuration,
polkit actions are not appropriately registered or unregistered.
The policy files are added and deleted correctly but the polkitd
process needs a SIGHUP afterwards to update the list of registered
actions.
Steps to reproduce:
1. Add (xfce-desktop-service) to (services) in config.scm. [Or any
service which adds polkit actions]
2. Run guix system reconfigure.
3. Observe that the policy files are in place but not registered:
$ ls /etc/polkit-1/actions/*xfce*
/etc/polkit-1/actions/org.xfce.thunar.policy
$ pkaction | grep -i xfce
$
4. Run killall -HUP polkitd
5. Observe that actions are registered.
$ pkaction | grep -i xfce
org.xfce.thunar
Information forwarded
to
bug-guix <at> gnu.org
:
bug#27889
; Package
guix
.
(Mon, 31 Jul 2017 21:35:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 27889 <at> debbugs.gnu.org (full text, mbox):
Oops!
That's indeed still broken.
But gnu/services/shepherd.scm shepherd-service-file could be extended to provide a "restart" action (shepherd itself already supports it).
The general format for shepherd is:
(register-services
(make <service>
#:provides '(apache-2.0 apache httpd)
#:requires '()
#:start (...)
#:stop (...)
#:actions (make-actions
(restart (...)))))
^^^^^^^^^^^^^
But the Guix <shepherd-service> record, which is the source that is eventually compiled to the above, neither has an "actions" slot nor a "restart" slot. It would have to be extended with one.
I wonder whether it would make sense to make shepherd automatically default to a SIGHUP restart action for daemonized processes instead, though. It's not exactly rare for daemons to provide that.
Also, does "guix system reconfigure" already call this restart action if it's present?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#27889
; Package
guix
.
(Mon, 31 Jul 2017 23:11:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 27889 <at> debbugs.gnu.org (full text, mbox):
On Mon, Jul 31, 2017 at 2:34 PM, Danny Milosavljevic
<dannym <at> scratchpost.org> wrote:
> Oops!
>
> That's indeed still broken.
>
> But gnu/services/shepherd.scm shepherd-service-file could be extended to provide a "restart" action (shepherd itself already supports it).
>
> The general format for shepherd is:
>
> (register-services
> (make <service>
> #:provides '(apache-2.0 apache httpd)
> #:requires '()
> #:start (...)
> #:stop (...)
> #:actions (make-actions
> (restart (...)))))
> ^^^^^^^^^^^^^
>
> But the Guix <shepherd-service> record, which is the source that is eventually compiled to the above, neither has an "actions" slot nor a "restart" slot. It would have to be extended with one.
>
> I wonder whether it would make sense to make shepherd automatically default to a SIGHUP restart action for daemonized processes instead, though. It's not exactly rare for daemons to provide that.
>
> Also, does "guix system reconfigure" already call this restart action if it's present?
polkitd isn't managed by shepherd. It looks to be managed by dbus and
I'm not sure how to restart an individual dbus service (or if you even
can). Restarting dbus-system is obviously too intrusive (it does
reload the policy files at the expense of restarting my X session :)).
Information forwarded
to
bug-guix <at> gnu.org
:
bug#27889
; Package
guix
.
(Tue, 01 Aug 2017 07:19:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 27889 <at> debbugs.gnu.org (full text, mbox):
> polkitd isn't managed by shepherd. It looks to be managed by dbus and
> I'm not sure how to restart an individual dbus service (or if you even
> can). Restarting dbus-system is obviously too intrusive (it does
> reload the policy files at the expense of restarting my X session :)).
Yeah, we specifically don't restart dbus because of that.
But I guess we could still send SIGHUP to polkitd.
I'm not sure how to find out which polkitd it is - if we don't want to restart a superset.
Also, pstree says that polkitd forked and started another polkitd. There are two polkitd. Which one has to get the SIGHUP?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#27889
; Package
guix
.
(Tue, 01 Aug 2017 10:04:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 27889 <at> debbugs.gnu.org (full text, mbox):
Hello,
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> But gnu/services/shepherd.scm shepherd-service-file could be extended to provide a "restart" action (shepherd itself already supports it).
>
> The general format for shepherd is:
>
> (register-services
> (make <service>
> #:provides '(apache-2.0 apache httpd)
> #:requires '()
> #:start (...)
> #:stop (...)
> #:actions (make-actions
> (restart (...)))))
> ^^^^^^^^^^^^^
>
> But the Guix <shepherd-service> record, which is the source that is eventually compiled to the above, neither has an "actions" slot nor a "restart" slot. It would have to be extended with one.
>
> I wonder whether it would make sense to make shepherd automatically default to a SIGHUP restart action for daemonized processes instead, though. It's not exactly rare for daemons to provide that.
>
> Also, does "guix system reconfigure" already call this restart action if it's present?
Not yet, but it should. I think the patches at
<https://bugs.gnu.org/26830> would be sufficient if the action boils
down to sending SIGHUP. Perhaps time to revive that patch set!
Ludo’.
This bug report was last modified 7 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.