fwupd can not find required polkit actions

  • Open
  • quality assurance status badge
Details
One participant
  • Jelle Licht
Owner
unassigned
Submitted by
Jelle Licht
Severity
normal
J
J
Jelle Licht wrote on 14 Dec 2022 14:06
(address . bug-guix@gnu.org)
87tu1ym8xn.fsf@fsfe.org
The package description for fwupd looks for polkit actions in the polkit
output. There are multiple ways to patch this.

Toggle snippet (11 lines)
(add-before 'configure 'set-polkit-rules-dir
;; Locate actions in our {output,etc-dir}, not that of the polkit input.
(lambda _
(setenv "PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR"
;; This makes it 'Just Work':
;; (string-append #$output "/share/polkit-1/actions")
;; This only makes it work when we extend polkit-service-type:
(string-append "/etc/polkit-1/actions")
)))

Example service definition:
Toggle snippet (23 lines)
(define (fwupd-shepherd-service package)
"Return a Shepherd service to start fwupd."
(list (shepherd-service
(requirement '(dbus-system))
(provision '(fwupd))
(start #~(make-forkexec-constructor
(list #$(file-append package "/libexec/fwupd/fwupd"))))
(stop #~(make-kill-destructor)))))

(define-public fwupd-service-type
(service-type
(name 'fwupd)
(description "Setup the firmware update deamon.")
(default-value fwupd)
(extensions
(list
(service-extension profile-service-type list)
(service-extension polkit-service-type list)
(service-extension dbus-root-service-type list)
(service-extension shepherd-root-service-type
fwupd-shepherd-service)))))

If we go for the first fix, the polkit-service-type extension is not
required. If we go for the /etc fix, the polkit-service-type extension
is required. I know too little about polkit to make an informed choice
here, so with some guidance I could work on a patch to close this issue.

- Jelle
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 60065@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 60065
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch