unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60065: fwupd can not find required polkit actions
@ 2022-12-14 13:06 Jelle Licht
  0 siblings, 0 replies; only message in thread
From: Jelle Licht @ 2022-12-14 13:06 UTC (permalink / raw)
  To: 60065

The package description for fwupd looks for polkit actions in the polkit
output. There are multiple ways to patch this.

--8<---------------cut here---------------start------------->8---
(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")
                        )))
--8<---------------cut here---------------end--------------->8---

Example service definition: 
--8<---------------cut here---------------start------------->8---
(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)))))
--8<---------------cut here---------------end--------------->8---

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-14 13:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 13:06 bug#60065: fwupd can not find required polkit actions Jelle Licht

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).