diff mbox series

[bug#46995,staging] gnu: polkit: Update to 0.118.

Message ID BYAPR05MB4023419661E6F445552F506DC5949@BYAPR05MB4023.namprd05.prod.outlook.com
State Accepted
Headers show
Series [bug#46995,staging] gnu: polkit: Update to 0.118. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Morgan Smith March 7, 2021, 9:23 p.m. UTC
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/polkit.scm (polkit): Update to 0.118.
[origin]: Update url and remove libsystemd-login substitution
[inputs]: Update mozjs-60 to mozjs-78
[native-inputs]: Add libxslt and docbook-xsl for manpage generation
[arguments]: Add phase to fix manpage generation
---

I think this belongs in the staging branch. I'm really not sure.

Also I'm not sure how to test packages that go in a system configuration
without risking my system, so I didn't test this at all.

The only reason I decided to package this was because the previous package
didn't have man pages.

The libsystemd-login substitution was removed because the configure script
seems to have good automatic detection.

---
 gnu/packages/polkit.scm | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

Comments

Maxim Cournoyer Oct. 10, 2021, 5:03 a.m. UTC | #1
Hello,

Morgan.J.Smith@outlook.com writes:

> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/polkit.scm (polkit): Update to 0.118.
> [origin]: Update url and remove libsystemd-login substitution
> [inputs]: Update mozjs-60 to mozjs-78
> [native-inputs]: Add libxslt and docbook-xsl for manpage generation
> [arguments]: Add phase to fix manpage generation
> ---
>
> I think this belongs in the staging branch. I'm really not sure.

Technically yes, since it has above 300 dependents (guix refresh -l
polkit) :-).

> Also I'm not sure how to test packages that go in a system configuration
> without risking my system, so I didn't test this at all.

There is the elogind system test which seems to cover it (I ran it with
'make check-system TESTS=elogind', it passed!).  You could also use
'guix system vm' to virtualize your own system config (or a variant).

> The only reason I decided to package this was because the previous package
> didn't have man pages.
>
> The libsystemd-login substitution was removed because the configure script
> seems to have good automatic detection.

Indeed, it seems there were improvements in this regard.

Applied as 9c0c07e4af, with the copyright fix in the preceding commit.

Thank you!

Closing.

Maxim
diff mbox series

Patch

diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index d868aceec2..1a705712a9 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -6,6 +6,7 @@ 
 ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@  (define-module (gnu packages polkit)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages docbook)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages nss)
@@ -43,15 +45,15 @@  (define-module (gnu packages polkit)
 (define-public polkit
   (package
     (name "polkit")
-    (version "0.116")
+    (version "0.118")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "https://www.freedesktop.org/software/polkit/releases/"
+                   "https://gitlab.freedesktop.org/polkit/polkit/releases/"
                    name "-" version ".tar.gz"))
              (sha256
               (base32
-               "1c9lbpndh5zis22f154vjrhnqw65z8s85nrgl42v738yf6g0q5w8"))
+               "0swmg37jsxsxfsd2b3qm0l3zxr9ldvhpjw8lsgq3j8q7wy2fjm3d"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -60,18 +62,6 @@  (define-public polkit
                  (substitute* "test/Makefile.in"
                    (("SUBDIRS = mocklibc . polkit polkitbackend")
                     "SUBDIRS = mocklibc . polkit"))
-                 (substitute* "configure"
-                   ;; Replace libsystemd-login with libelogind.
-                   (("libsystemd-login") "libelogind")
-                   ;; Skip the sanity check that the current system runs
-                   ;; systemd.
-                   (("test ! -d /sys/fs/cgroup/systemd/") "false"))
-                 (substitute* "src/polkit/polkitunixsession-systemd.c"
-                   (("systemd") "elogind"))
-                 (substitute* "src/polkitbackend/polkitbackendsessionmonitor-systemd.c"
-                   (("systemd") "elogind"))
-                 (substitute* "src/polkitbackend/polkitbackendjsauthority.cpp"
-                   (("systemd") "elogind"))
 
                  ;; Guix System's polkit service stores actions under
                  ;; /etc/polkit-1/actions.
@@ -89,7 +79,7 @@  (define-public polkit
      `(("expat" ,expat)
        ("linux-pam" ,linux-pam)
        ("elogind" ,elogind)
-       ("mozjs" ,mozjs-60)
+       ("mozjs" ,mozjs-78)
        ("nspr" ,nspr)))
     (propagated-inputs
      `(("glib" ,glib))) ; required by polkit-gobject-1.pc
@@ -97,7 +87,9 @@  (define-public polkit
      `(("pkg-config" ,pkg-config)
        ("glib:bin" ,glib "bin") ; for glib-mkenums
        ("intltool" ,intltool)
-       ("gobject-introspection" ,gobject-introspection)))
+       ("gobject-introspection" ,gobject-introspection)
+       ("libxslt" ,libxslt) ; for man page generation
+       ("docbook-xsl" ,docbook-xsl))) ; for man page generation
     (arguments
      `(#:configure-flags '("--sysconfdir=/etc"
                            "--enable-man-pages")
@@ -113,6 +105,15 @@  (define-public polkit
                 (("@INTROSPECTION_TYPELIBDIR@")
                  (string-append out "/lib/girepository-1.0/")))
               #t)))
+         (add-after 'unpack 'fix-manpage-generation
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((xsldoc (string-append (assoc-ref inputs "docbook-xsl")
+                                          "/xml/xsl/docbook-xsl-"
+                                          ,(package-version docbook-xsl))))
+               (substitute* '("docs/man/Makefile.am" "docs/man/Makefile.in")
+                 (("http://docbook.sourceforge.net/release/xsl/current")
+                  xsldoc)))
+             #t))
          (replace
           'install
           (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)