aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/polkit.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-09-08 21:12:52 +0200
committerMarius Bakke <marius@gnu.org>2022-09-08 21:12:52 +0200
commit884548b476f2ee27c01cb0c9ad93c0cf9d33fa5e (patch)
tree20650b3917b1292470ecc4ded13fbb04e5dbfa6d /gnu/packages/polkit.scm
parent0e305798454c558ab6e722cf66ba351c326a1a8d (diff)
parentfa894b3f4db835bd0bb52b32c7ec412e72b7e03a (diff)
downloadguix-884548b476f2ee27c01cb0c9ad93c0cf9d33fa5e.tar
guix-884548b476f2ee27c01cb0c9ad93c0cf9d33fa5e.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/packages/polkit.scm')
-rw-r--r--gnu/packages/polkit.scm40
1 files changed, 27 insertions, 13 deletions
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index b63635618b..6fe7824a57 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -64,9 +64,34 @@
(uri (string-append
"https://www.freedesktop.org/software/polkit/releases/"
name "-" version ".tar.gz"))
+ (patches (search-patches "polkit-disable-systemd.patch"))
(sha256
(base32
- "1apz3bh7nbpmlp1cr00pb8z8wp0c7yb23ninb959jz3r38saxiwx"))))
+ "1apz3bh7nbpmlp1cr00pb8z8wp0c7yb23ninb959jz3r38saxiwx"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; This is so that the default example rules files can be
+ ;; installed along the package; otherwise it would fail
+ ;; attempting to write to /etc. Unlike with GNU Autotools,
+ ;; Meson can't override the pkgsysconfdir value at install
+ ;; time; instead, we rewrite the pkgsysconfdir references
+ ;; in the build system to point to #$output/etc.
+ ;; Look up actions and rules from /etc/polkit ...
+ (substitute* "src/polkitbackend/meson.build"
+ (("'-DPACKAGE_SYSCONF_DIR=.*,")
+ "'-DPACKAGE_SYSCONF_DIR=\"/etc\"',"))
+ (substitute* "src/polkitbackend/polkitbackendinteractiveauthority.c"
+ (("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
+ "PACKAGE_SYSCONF_DIR \"/polkit-1/actions\""))
+ ;; ... but install package files below the prefix.
+ (substitute* "meson.build"
+ (("pk_sysconfdir = get_option\\('sysconfdir'\\)")
+ "pk_sysconfdir = get_option('prefix') + '/etc'"))
+ ;; Set the setuid helper's real location.
+ (substitute* "src/polkitagent/polkitagentsession.c"
+ (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
+ "\"/run/setuid-programs/polkit-agent-helper-1\""))))))
(build-system meson-build-system)
(arguments
(list
@@ -78,6 +103,7 @@
(ice-9 match))
#:configure-flags
#~(list "--sysconfdir=/etc"
+ "-Dsession_tracking=libelogind"
"-Dman=true"
"-Dtests=true"
;; Work around cross-compilation failure. The build system
@@ -91,18 +117,6 @@
'()))
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'adjust-install-time-etc-directory
- ;; This is so that the default example rules files can be
- ;; installed along the package; otherwise it would fail attempting
- ;; to write to /etc. Unlike with GNU Autotools, Meson can't
- ;; override the pkgsysconfdir value at install time; instead, we
- ;; rewrite the pkgsysconfdir references in the build system to
- ;; point to #$output/etc.
- (lambda _
- (substitute* "meson.build"
- (("pk_sysconfdir = get_option\\('sysconfdir')")
- (format #f "pk_sysconfdir = '~a'"
- (string-append #$output "/etc"))))))
(add-before 'check 'patch-bash
(lambda _
(substitute* (list "subprojects/mocklibc-1.0/bin/mocklibc"