[PATCH staging] gnu: polkit: Update to 0.118.

  • Done
  • quality assurance status badge
Details
2 participants
  • Morgan.J.Smith
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Morgan.J.Smith
Severity
normal

Debbugs page

Morgan.J.Smith wrote 4 years ago
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
BYAPR05MB4023419661E6F445552F506DC5949@BYAPR05MB4023.namprd05.prod.outlook.com
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(-)

Toggle diff (96 lines)
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)
--
2.30.1
Maxim Cournoyer wrote 3 years ago
(address . Morgan.J.Smith@outlook.com)(address . 46995-done@debbugs.gnu.org)
87mtnh1ng2.fsf@gmail.com
Hello,

Morgan.J.Smith@outlook.com writes:

Toggle quote (11 lines)
> 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) :-).

Toggle quote (3 lines)
> 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).

Toggle quote (6 lines)
> 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
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 46995
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help