summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk12
-rw-r--r--gnu/packages/bdw-gc.scm4
-rw-r--r--gnu/packages/calendar.scm10
-rw-r--r--gnu/packages/certs.scm4
-rw-r--r--gnu/packages/check.scm19
-rw-r--r--gnu/packages/crates-graphics.scm42
-rw-r--r--gnu/packages/crates-gtk.scm596
-rw-r--r--gnu/packages/crates-io.scm390
-rw-r--r--gnu/packages/databases.scm32
-rw-r--r--gnu/packages/freedesktop.scm48
-rw-r--r--gnu/packages/games.scm2
-rw-r--r--gnu/packages/gl.scm69
-rw-r--r--gnu/packages/gnome.scm86
-rw-r--r--gnu/packages/gnuzilla.scm242
-rw-r--r--gnu/packages/gstreamer.scm792
-rw-r--r--gnu/packages/gtk.scm19
-rw-r--r--gnu/packages/haskell.scm478
-rw-r--r--gnu/packages/image.scm22
-rw-r--r--gnu/packages/iso-codes.scm13
-rw-r--r--gnu/packages/libffi.scm21
-rw-r--r--gnu/packages/libunwind.scm14
-rw-r--r--gnu/packages/linux.scm82
-rw-r--r--gnu/packages/maths.scm4
-rw-r--r--gnu/packages/nss.scm220
-rw-r--r--gnu/packages/patches/freeglut-gcc-compat.patch53
-rw-r--r--gnu/packages/patches/gst-plugins-good-fix-test.patch94
-rw-r--r--gnu/packages/patches/mrustc-riscv64-support.patch48
-rw-r--r--gnu/packages/patches/polkit-CVE-2021-4034.patch82
-rw-r--r--gnu/packages/patches/polkit-configure-elogind.patch15
-rw-r--r--gnu/packages/patches/polkit-use-duktape.patch5030
-rw-r--r--gnu/packages/patches/postgresql-riscv-spinlocks.patch41
-rw-r--r--gnu/packages/patches/python-dateutil-pytest-compat.patch43
-rw-r--r--gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch11
-rw-r--r--gnu/packages/patches/rustc-1.39.0-src.patch99
-rw-r--r--gnu/packages/patches/rustc-1.54.0-src.patch117
-rw-r--r--gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch13
-rw-r--r--gnu/packages/perl.scm4
-rw-r--r--gnu/packages/polkit.scm110
-rw-r--r--gnu/packages/python-crypto.scm4
-rw-r--r--gnu/packages/python-science.scm2
-rw-r--r--gnu/packages/python-web.scm8
-rw-r--r--gnu/packages/python-xyz.scm57
-rw-r--r--gnu/packages/qt.scm285
-rw-r--r--gnu/packages/ruby.scm87
-rw-r--r--gnu/packages/rust.scm298
-rw-r--r--gnu/packages/sphinx.scm28
-rw-r--r--gnu/packages/tex.scm18
-rw-r--r--gnu/packages/time.scm1
-rw-r--r--gnu/packages/video.scm41
-rw-r--r--gnu/packages/webkit.scm2
50 files changed, 2598 insertions, 7214 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 027cb8e3cb..c433cf7d98 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1090,7 +1090,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/fp16-system-libraries.patch		\
   %D%/packages/patches/fpc-reproducibility.patch		\
   %D%/packages/patches/freedink-engine-fix-sdl-hints.patch	\
-  %D%/packages/patches/freeglut-gcc-compat.patch		\
   %D%/packages/patches/freeimage-unbundle.patch		\
   %D%/packages/patches/fuse-glibc-2.34.patch			\
   %D%/packages/patches/fuse-overlapping-headers.patch		\
@@ -1242,7 +1241,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/grub-setup-root.patch			\
   %D%/packages/patches/gspell-dash-test.patch			\
-  %D%/packages/patches/gst-plugins-good-fix-test.patch		\
   %D%/packages/patches/guile-1.8-cpp-4.5.patch			\
   %D%/packages/patches/guile-2.2-skip-oom-test.patch            \
   %D%/packages/patches/guile-2.2-skip-so-test.patch             \
@@ -1525,6 +1523,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/mono-mdoc-timestamping.patch		\
   %D%/packages/patches/mosaicatcher-unbundle-htslib.patch	\
   %D%/packages/patches/mrrescue-support-love-11.patch		\
+  %D%/packages/patches/mrustc-riscv64-support.patch		\
   %D%/packages/patches/mtools-mformat-uninitialized.patch	\
   %D%/packages/patches/mupen64plus-ui-console-notice.patch	\
   %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch    \
@@ -1652,13 +1651,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/plib-CVE-2011-4620.patch		\
   %D%/packages/patches/plib-CVE-2012-4552.patch		\
   %D%/packages/patches/plotutils-spline-test.patch		\
-  %D%/packages/patches/polkit-CVE-2021-4034.patch		\
-  %D%/packages/patches/polkit-configure-elogind.patch		\
-  %D%/packages/patches/polkit-use-duktape.patch			\
   %D%/packages/patches/portaudio-audacity-compat.patch		\
   %D%/packages/patches/portmidi-modular-build.patch		\
   %D%/packages/patches/postgresql-disable-resolve_symlinks.patch	\
-  %D%/packages/patches/postgresql-riscv-spinlocks.patch	\
   %D%/packages/patches/procmail-ambiguous-getline-debian.patch  \
   %D%/packages/patches/procmail-CVE-2014-3618.patch		\
   %D%/packages/patches/procmail-CVE-2017-16844.patch		\
@@ -1692,6 +1687,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch	\
   %D%/packages/patches/python-cross-compile.patch		\
   %D%/packages/patches/python-configobj-setuptools.patch	\
+  %D%/packages/patches/python-dateutil-pytest-compat.patch	\
   %D%/packages/patches/python-debugpy-unbundle-pydevd.patch	\
   %D%/packages/patches/python-docopt-pytest6-compat.patch	\
   %D%/packages/patches/python-execnet-read-only-fix.patch	\
@@ -1779,12 +1775,13 @@ dist_patch_DATA =						\
   %D%/packages/patches/rocm-comgr-3.1.0-dependencies.patch \
   %D%/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch \
   %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \
+  %D%/packages/patches/ruby-hydra-minimal-no-byebug.patch		\
   %D%/packages/patches/ruby-anystyle-data-immutable-install.patch	\
   %D%/packages/patches/ruby-anystyle-fix-dictionary-populate.patch	\
   %D%/packages/patches/ruby-latex-decode-fix-test.patch		\
   %D%/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch \
   %D%/packages/patches/ruby-sanitize-system-libxml.patch	\
-  %D%/packages/patches/rustc-1.39.0-src.patch			\
+  %D%/packages/patches/rustc-1.54.0-src.patch			\
   %D%/packages/patches/rust-adblock-ignore-live-tests.patch		\
   %D%/packages/patches/i3status-rust-enable-unstable-features.patch	\
   %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch	\
@@ -1860,6 +1857,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/telegram-purple-adjust-test.patch	\
   %D%/packages/patches/texi2html-document-encoding.patch	\
   %D%/packages/patches/texi2html-i18n.patch			\
+  %D%/packages/patches/texlive-hyph-utf8-no-byebug.patch	\
   %D%/packages/patches/thefuck-test-environ.patch		\
   %D%/packages/patches/tidy-CVE-2015-5522+5523.patch		\
   %D%/packages/patches/timescaledb-flaky-test.patch		\
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 268f0703b8..4dd559ef79 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -125,7 +125,7 @@ C or C++ programs, though that is not its primary goal.")
 (define-public libatomic-ops
   (package
     (name "libatomic-ops")
-    (version "7.6.10")
+    (version "7.6.12")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -133,7 +133,7 @@ C or C++ programs, though that is not its primary goal.")
                     version "/libatomic_ops-" version ".tar.gz"))
               (sha256
                (base32
-                "1bwry043f62pc4mgdd37zx3fif19qyrs8f5bw7qxlmkzh5hdyzjq"))))
+                "0glzah695wsf6c27hs5wwlw4mnq1vfivdshz1rb8pq7w4mp5dazh"))))
     (build-system gnu-build-system)
     (arguments
      `(,@(if (target-riscv64?)
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 0267a6dcf7..715d158241 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -119,7 +119,7 @@ the <tz.h> library for handling time zones and leap seconds.")
 (define-public libical
   (package
     (name "libical")
-    (version "3.0.10")
+    (version "3.0.14")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -127,7 +127,7 @@ the <tz.h> library for handling time zones and leap seconds.")
                     version "/libical-" version ".tar.gz"))
               (sha256
                (base32
-                "1d1nqcfilb4k8bc5x85fhnd26l1ski58wpk2nmds6mlxrzkb6czr"))))
+                "13ycghsi4iv8mnm0xv97bs0x6qvfhdxkw20n3yhcc7bg6n0bg122"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f ; test suite appears broken
@@ -143,8 +143,7 @@ the <tz.h> library for handling time zones and leap seconds.")
              (substitute* "doc/reference/libical-glib/libical-glib-docs.sgml.in"
                (("http://www.oasis-open.org/docbook/xml/4.3/")
                 (string-append (assoc-ref inputs "docbook-xml")
-                               "/xml/dtd/docbook/")))
-             #t))
+                               "/xml/dtd/docbook/")))))
          (add-before 'configure 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
              ;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded
@@ -156,8 +155,7 @@ the <tz.h> library for handling time zones and leap seconds.")
                   (string-append "\"" tzdata "/share/zoneinfo\""))
                  (("\\\"/usr/lib/zoneinfo\\\",") "")
                  (("\\\"/etc/zoneinfo\\\",") "")
-                 (("\\\"/usr/share/lib/zoneinfo\\\"") "")))
-             #t)))))
+                 (("\\\"/usr/share/lib/zoneinfo\\\"") ""))))))))
     (native-inputs
      (list docbook-xml-4.3
            gobject-introspection
diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm
index 53fb027563..b8dfe96e6d 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -131,7 +131,7 @@ that was originally contributed to Debian.")
     ;; XXX We used to refer to the nss package here, but that eventually caused
     ;; module cycles.  The below is a quick copy-paste job that must be kept in
     ;; sync manually.  Surely there's a better way…?
-    (version "3.71")
+    (version "3.81")
     (source (origin
               (method url-fetch)
               (uri (let ((version-with-underscores
@@ -142,7 +142,7 @@ that was originally contributed to Debian.")
                       "nss-" version ".tar.gz")))
               (sha256
                (base32
-                "0ly2l3dv6z5hlxs72h5x6796ni3x1bq60saavaf42ddgv4ax7b4r"))
+                "19ncvhz45dhr0nmymwkxspq9l44gaafkspxiwxbqs1hpnqxmzgx8"))
               ;; Create nss.pc and nss-config.
               (patches (search-patches "nss-3.56-pkgconfig.patch"
                                        "nss-getcwd-nonnull.patch"
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 26a49056a2..1cf953ca2a 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -2719,18 +2719,29 @@ create data based on random numbers and yet remain repeatable.")
 (define-public python-freezegun
   (package
     (name "python-freezegun")
-    (version "0.3.14")
+    (version "1.2.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "freezegun" version))
        (sha256
-        (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2"))))
+        (base32 "0ijlq32qvpm5zprfzbyzawpl9qjsknlxhryr1i0q84wl0sxd28nd"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Add an explicit case for static methods as they are callable
+        ;; in Python 3.10, breaking this conditional.
+        ;; XXX Taken from upstream pull request:
+        ;; https://github.com/spulec/freezegun/pull/397
+        '(substitute* "freezegun/api.py"
+           (("if not callable\\(attr_value\\) or \
+inspect\\.isclass\\(attr_value\\):")
+            "if (not callable(attr_value) or inspect.isclass(attr_value)\
+or isinstance(attr_value, staticmethod)):")))))
     (build-system python-build-system)
     (native-inputs
-     (list python-mock python-pytest))
+     (list python-pytest))
     (propagated-inputs
-     (list python-six python-dateutil))
+     (list python-dateutil))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index c5d9555599..f0414602bc 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2004,31 +2005,58 @@ interactive applications.")
      "This package provides a library for window abstraction.")
     (license license:expat)))
 
-(define-public rust-png-0.16
+(define-public rust-png-0.17
   (package
     (name "rust-png")
-    (version "0.16.8")
+    (version "0.17.5")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "png" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "1ipl44q3vy4kvx6j296vk7d4v8gvcg203lrkvvixwixq1j98fciw"))))
+        (base32 "1fp3vnaxmjdv71dcakc21k07ir5s31dlx1mrazfqddzgaynw0f6w"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
+     `(#:tests? #false                  ;XXX missing files in tarball
        #:cargo-inputs
        (("rust-bitflags" ,rust-bitflags-1)
         ("rust-crc32fast" ,rust-crc32fast-1)
-        ("rust-deflate" ,rust-deflate-0.8)
-        ("rust-miniz-oxide" ,rust-miniz-oxide-0.3))))
-    (home-page "https://github.com/image-rs/image-png.git")
+        ("rust-deflate" ,rust-deflate-1)
+        ("rust-miniz-oxide" ,rust-miniz-oxide-0.5))
+       #:cargo-development-inputs
+       (("rust-criterion" ,rust-criterion-0.3)
+        ("rust-getopts" ,rust-getopts-0.2)
+        ("rust-glium" ,rust-glium-0.31)
+        ("rust-glob" ,rust-glob-0.3)
+        ("rust-rand" ,rust-rand-0.8)
+        ("rust-term" ,rust-term-0.7))))
+    (home-page "https://github.com/image-rs/image-png")
     (synopsis "PNG decoding and encoding library in pure Rust")
     (description
      "This package is a PNG decoding and encoding library in pure Rust.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-png-0.16
+  (package
+    (inherit rust-png-0.17)
+    (name "rust-png")
+    (version "0.16.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "png" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1ipl44q3vy4kvx6j296vk7d4v8gvcg203lrkvvixwixq1j98fciw"))))
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-crc32fast" ,rust-crc32fast-1)
+        ("rust-deflate" ,rust-deflate-0.8)
+        ("rust-miniz-oxide" ,rust-miniz-oxide-0.3))))))
+
 (define-public rust-png-0.15
   (package
     (inherit rust-png-0.16)
diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index e392220a01..316e427522 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -168,8 +168,40 @@
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
+(define-public rust-cairo-rs-0.15
+  (package
+    (name "rust-cairo-rs")
+    (version "0.15.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "cairo-rs" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1g396fdz8crf74dmmjarcsdbsm8qgxy3a5x9kw6m2d9xn28y6vn7"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.15)
+        ("rust-freetype" ,rust-freetype-0.7)
+        ("rust-glib" ,rust-glib-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-thiserror" ,rust-thiserror-1))
+       #:cargo-development-inputs
+       (("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list cairo))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the Cairo library")
+    (description "Rust bindings for the Cairo library")
+    (license license:expat)))
+
 (define-public rust-cairo-rs-0.14
   (package
+    (inherit rust-cairo-rs-0.15)
     (name "rust-cairo-rs")
     (version "0.14.9")
     (source
@@ -191,13 +223,7 @@
         ("rust-libc" ,rust-libc-0.2)
         ("rust-thiserror" ,rust-thiserror-1))
        #:cargo-development-inputs
-       (("rust-tempfile" ,rust-tempfile-3))))
-    (inputs
-     (list cairo))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the Cairo library")
-    (description "Rust bindings for the Cairo library")
-    (license license:expat)))
+       (("rust-tempfile" ,rust-tempfile-3))))))
 
 (define-public rust-cairo-rs-0.9
   (package
@@ -277,8 +303,37 @@
        #:cargo-development-inputs
        (("rust-tempfile" ,rust-tempfile-3))))))
 
+(define-public rust-cairo-sys-rs-0.15
+  (package
+    (name "rust-cairo-sys-rs")
+    (version "0.15.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "cairo-sys-rs" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1j6k4pps3dv6g0vlpmxc2xyk0s40vj2wpzi55lbwjspmpqlx8m9w"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-glib-sys" ,rust-glib-sys-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-system-deps" ,rust-system-deps-6)
+        ("rust-winapi" ,rust-winapi-0.3)
+        ("rust-x11" ,rust-x11-2))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list cairo))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libcairo")
+    (description "This package provides FFI bindings to libcairo.")
+    (license license:expat)))
+
 (define-public rust-cairo-sys-rs-0.14
   (package
+    (inherit rust-cairo-sys-rs-0.15)
     (name "rust-cairo-sys-rs")
     (version "0.14.9")
     (source
@@ -288,7 +343,6 @@
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "0w3md4xk87ign30wb3rqfmmj0q6pvg5arbm35flgsd08jxvbhj5l"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build?
        #t
@@ -298,12 +352,7 @@
         ("rust-system-deps" ,rust-system-deps-3)
         ("rust-winapi" ,rust-winapi-0.3)
         ("rust-x11" ,rust-x11-2))))
-    (inputs
-     (list cairo))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libcairo")
-    (description "This package provides FFI bindings to libcairo.")
-    (license license:expat)))
+    (native-inputs '())))
 
 (define-public rust-cairo-sys-rs-0.10
   (package
@@ -440,8 +489,41 @@
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
+(define-public rust-gdk-pixbuf-0.15
+  (package
+    (name "rust-gdk-pixbuf")
+    (version "0.15.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gdk-pixbuf" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "16k1z21r76m620z61kfmgid1n6s8dnxpa4zlrppcr6dhr2fdsf5d"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; FIXME: error[E0277]: `Errors` doesn't implement `std::fmt::Display`
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.15)
+        ("rust-gio" ,rust-gio-0.15)
+        ("rust-glib" ,rust-glib-0.15)
+        ("rust-libc" ,rust-libc-0.2))
+       #:cargo-development-inputs
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list gdk-pixbuf))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the GdkPixbuf library")
+    (description "Rust bindings for the GdkPixbuf library")
+    (license license:expat)))
+
 (define-public rust-gdk-pixbuf-0.14
   (package
+    (inherit rust-gdk-pixbuf-0.15)
     (name "rust-gdk-pixbuf")
     (version "0.14.0")
     (source
@@ -461,13 +543,7 @@
         ("rust-glib" ,rust-glib-0.14)
         ("rust-libc" ,rust-libc-0.2))
        #:cargo-development-inputs
-       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
-    (inputs
-     (list gdk-pixbuf))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the GdkPixbuf library")
-    (description "Rust bindings for the GdkPixbuf library")
-    (license license:expat)))
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
 (define-public rust-gdk-pixbuf-0.9
   (package
@@ -549,8 +625,42 @@
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
+(define-public rust-gdk-pixbuf-sys-0.15
+  (package
+    (name "rust-gdk-pixbuf-sys")
+    (version "0.15.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gdk-pixbuf-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "19q2qjrzmmgc7bbs59sk6k0sv3xhpmnk9a2h0cajfr95g19jy2ql"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;#:skip-build?
+       ;#t
+       #:cargo-inputs
+       (("rust-gio-sys" ,rust-gio-sys-0.15)
+        ("rust-glib-sys" ,rust-glib-sys-0.15)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-system-deps" ,rust-system-deps-6))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list gdk-pixbuf))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libgdk_pixbuf-2.0")
+    (description "This package provides FFI bindings to @code{libgdk_pixbuf-2.0}.")
+    (license license:expat)))
+
 (define-public rust-gdk-pixbuf-sys-0.14
   (package
+    (inherit rust-gdk-pixbuf-sys-0.15)
     (name "rust-gdk-pixbuf-sys")
     (version "0.14.0")
     (source
@@ -572,13 +682,7 @@
         ("rust-system-deps" ,rust-system-deps-3))
        #:cargo-development-inputs
        (("rust-shell-words" ,rust-shell-words-0.1)
-        ("rust-tempfile" ,rust-tempfile-3))))
-    (inputs
-     (list gdk-pixbuf))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libgdk_pixbuf-2.0")
-    (description "This package provides FFI bindings to @code{libgdk_pixbuf-2.0}.")
-    (license license:expat)))
+        ("rust-tempfile" ,rust-tempfile-3))))))
 
 (define-public rust-gdk-pixbuf-sys-0.10
   (package
@@ -719,8 +823,48 @@
        (("rust-shell-words" ,rust-shell-words-0.1)
         ("rust-tempfile" ,rust-tempfile-3))))))
 
+(define-public rust-gio-0.15
+  (package
+    (name "rust-gio")
+    (version "0.15.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gio" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0fr8qiqjf9yzl8867kgqdsxpkcx2jrns3xwmlf0jfiid668brzb8"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; FIXME: error[E0277]: `Errors` doesn't implement `std::fmt::Display`
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-futures-channel" ,rust-futures-channel-0.3)
+        ("rust-futures-core" ,rust-futures-core-0.3)
+        ("rust-futures-io" ,rust-futures-io-0.3)
+        ("rust-futures-util" ,rust-futures-util-0.3)
+        ("rust-gio-sys" ,rust-gio-sys-0.15)
+        ("rust-glib" ,rust-glib-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-once-cell" ,rust-once-cell-1)
+        ("rust-thiserror" ,rust-thiserror-1))
+       #:cargo-development-inputs
+       (("rust-futures-util" ,rust-futures-util-0.3)
+        ("rust-gir-format-check" ,rust-gir-format-check-0.1)
+        ("rust-serial-test" ,rust-serial-test-0.6))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list glib))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the Gio library")
+    (description "Rust bindings for the Gio library")
+    (license license:expat)))
+
 (define-public rust-gio-0.14
   (package
+    (inherit rust-gio-0.15)
     (name "rust-gio")
     (version "0.14.8")
     (source
@@ -746,13 +890,7 @@
         ("rust-thiserror" ,rust-thiserror-1))
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1)
-        ("rust-serial-test" ,rust-serial-test-0.4))))
-    (inputs
-     (list glib))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the Gio library")
-    (description "Rust bindings for the Gio library")
-    (license license:expat)))
+        ("rust-serial-test" ,rust-serial-test-0.4))))))
 
 (define-public rust-gio-0.9
   (package
@@ -848,8 +986,51 @@
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
+(define-public rust-gio-sys-0.15
+  (package
+    (name "rust-gio-sys")
+    (version "0.15.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gio-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "13fgmc2xdzg9qk9l3nlp1bilwn6466mrqbiq4fhc9qkia93pl59j"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; FIXME: some GLib macros are not found
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-glib-sys" ,rust-glib-sys-0.15)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-system-deps" ,rust-system-deps-6)
+        ("rust-winapi" ,rust-winapi-0.3))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-1)
+        ("rust-tempfile" ,rust-tempfile-3))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'check 'extend-include-path
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((gio-headers (search-input-directory
+                                          inputs "include/gio-unix-2.0")))
+                        ;; Tests rely on these headers.
+                        (setenv "C_INCLUDE_PATH"
+                                (string-append gio-headers ":"
+                                               (getenv "C_INCLUDE_PATH")))))))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list glib))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libgio-2.0")
+    (description "This package provides FFI bindings to libgio-2.0.")
+    (license license:expat)))
+
 (define-public rust-gio-sys-0.14
   (package
+    (inherit rust-gio-sys-0.15)
     (name "rust-gio-sys")
     (version "0.14.0")
     (source
@@ -868,13 +1049,7 @@
         ("rust-gobject-sys" ,rust-gobject-sys-0.14)
         ("rust-libc" ,rust-libc-0.2)
         ("rust-system-deps" ,rust-system-deps-3)
-        ("rust-winapi" ,rust-winapi-0.3))))
-    (inputs
-     (list glib))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libgio-2.0")
-    (description "This package provides FFI bindings to libgio-2.0.")
-    (license license:expat)))
+        ("rust-winapi" ,rust-winapi-0.3))))))
 
 (define-public rust-gio-sys-0.10
   (package
@@ -939,8 +1114,51 @@
     (description "File format checker in Rust.")
     (license license:expat)))
 
+(define-public rust-glib-0.15
+  (package
+    (name "rust-glib")
+    (version "0.15.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "glib" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0pahikbwxr3vafdrr5l2hnlhkf9xi4illryan0l59ayhp9pk1c7d"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; FIXME: error[E0277]: `Errors` doesn't implement `std::fmt::Display`
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-futures-channel" ,rust-futures-channel-0.3)
+        ("rust-futures-core" ,rust-futures-core-0.3)
+        ("rust-futures-executor" ,rust-futures-executor-0.3)
+        ("rust-futures-task" ,rust-futures-task-0.3)
+        ("rust-glib-macros" ,rust-glib-macros-0.15)
+        ("rust-glib-sys" ,rust-glib-sys-0.15)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-log" ,rust-log-0.4)
+        ("rust-once-cell" ,rust-once-cell-1)
+        ("rust-smallvec" ,rust-smallvec-1)
+        ("rust-thiserror" ,rust-thiserror-1))
+       #:cargo-development-inputs
+       (("rust-futures-util" ,rust-futures-util-0.3)
+        ("rust-gir-format-check" ,rust-gir-format-check-0.1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list glib))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the GLib library")
+    (description "Rust bindings for the GLib library")
+    (license license:expat)))
+
 (define-public rust-glib-0.14
   (package
+    (inherit rust-glib-0.15)
     (name "rust-glib")
     (version "0.14.8")
     (source
@@ -966,13 +1184,7 @@
         ("rust-libc" ,rust-libc-0.2)
         ("rust-log" ,rust-log-0.4)
         ("rust-once-cell" ,rust-once-cell-1)
-        ("rust-smallvec" ,rust-smallvec-1))))
-    (inputs
-     (list glib))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the GLib library")
-    (description "Rust bindings for the GLib library")
-    (license license:expat)))
+        ("rust-smallvec" ,rust-smallvec-1))))))
 
 (define-public rust-glib-0.10
   (package
@@ -1057,8 +1269,37 @@
        #:cargo-development-inputs
        (("rust-tempfile" ,rust-tempfile-3))))))
 
+(define-public rust-glib-macros-0.15
+  (package
+    (name "rust-glib-macros")
+    (version "0.15.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "glib-macros" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0r3cr0c79rs91z0sps089nsf8ppnm8agp48qwwqlkc32lqqq39i5"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; XXX: Circular dependency on rust-glib??
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-anyhow" ,rust-anyhow-1)
+        ("rust-heck" ,rust-heck-0.4)
+        ("rust-proc-macro-crate" ,rust-proc-macro-crate-1)
+        ("rust-proc-macro-error" ,rust-proc-macro-error-1)
+        ("rust-proc-macro2" ,rust-proc-macro2-1)
+        ("rust-quote" ,rust-quote-1)
+        ("rust-syn" ,rust-syn-1))))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the GLib library, proc macros crate")
+    (description "Rust bindings for the GLib library, proc macros crate.")
+    (license license:expat)))
+
 (define-public rust-glib-macros-0.14
   (package
+    (inherit rust-glib-macros-0.15)
     (name "rust-glib-macros")
     (version "0.14.1")
     (source
@@ -1079,11 +1320,7 @@
         ("rust-proc-macro-error" ,rust-proc-macro-error-1)
         ("rust-proc-macro2" ,rust-proc-macro2-1)
         ("rust-quote" ,rust-quote-1)
-        ("rust-syn" ,rust-syn-1))))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the GLib library, proc macros crate")
-    (description "Rust bindings for the GLib library, proc macros crate.")
-    (license license:expat)))
+        ("rust-syn" ,rust-syn-1))))))
 
 (define-public rust-glib-macros-0.10
   (package
@@ -1109,8 +1346,40 @@
         ("rust-quote" ,rust-quote-1)
         ("rust-syn" ,rust-syn-1))))))
 
+(define-public rust-glib-sys-0.15
+  (package
+    (name "rust-glib-sys")
+    (version "0.15.10")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "glib-sys" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1m5sqm69fdk8vaw6hggyizhs1r1vivx73splrdvczsb5iqpijjzg"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; XXX: Tests are sensitive to the version of glib, even though
+       ;; the library supports a wide range.  Skip for now.
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-libc" ,rust-libc-0.2)
+        ("rust-system-deps" ,rust-system-deps-6))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list glib))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libglib-2.0")
+    (description "This package provides FFI bindings to libglib-2.0.")
+    (license license:expat)))
+
 (define-public rust-glib-sys-0.14
   (package
+    (inherit rust-glib-sys-0.15)
     (name "rust-glib-sys")
     (version "0.14.0")
     (source
@@ -1120,7 +1389,6 @@
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1bjlymn3fw4g8slij6iiggaipknf9072mr2qm3i4a91199an078w"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build?
        #t
@@ -1130,12 +1398,7 @@
        #:cargo-development-inputs
        (("rust-shell-words" ,rust-shell-words-0.1)
         ("rust-tempfile" ,rust-tempfile-3))))
-    (inputs
-     (list glib))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libglib-2.0")
-    (description "This package provides FFI bindings to libglib-2.0.")
-    (license license:expat)))
+    (native-inputs '())))
 
 (define-public rust-glib-sys-0.10
   (package
@@ -1181,28 +1444,32 @@
        (("rust-shell-words" ,rust-shell-words-0.1)
         ("rust-tempfile" ,rust-tempfile-3))))))
 
-(define-public rust-gobject-sys-0.14
+(define-public rust-gobject-sys-0.15
   (package
     (name "rust-gobject-sys")
-    (version "0.14.0")
+    (version "0.15.10")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "gobject-sys" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "1xf3jiwzrjingq8jr15bjkbv6m5dypzp67cjnm5f7njrjzicm4ma"))))
+        (base32 "02hyilvpi4hw4gr03z2plsbf1zicsfs5l0xxadqx3v3b4i2cwmqd"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build?
-       #t
+     `(;; FIXME: Constant value mismatch for G_TYPE_FUNDAMENTAL_MAX
+       ;; Rust: "255"
+       ;; C:    "1020"
+       #:tests? #f
        #:cargo-inputs
-       (("rust-glib-sys" ,rust-glib-sys-0.14)
+       (("rust-glib-sys" ,rust-glib-sys-0.15)
         ("rust-libc" ,rust-libc-0.2)
-        ("rust-system-deps" ,rust-system-deps-3))
+        ("rust-system-deps" ,rust-system-deps-6))
        #:cargo-development-inputs
-       (("rust-shell-words" ,rust-shell-words-0.1)
+       (("rust-shell-words" ,rust-shell-words-1)
         ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
     (inputs
      (list glib))
     (home-page "https://gtk-rs.org/")
@@ -1210,6 +1477,28 @@
     (description "This package provides FFI bindings to libgobject-2.0.")
     (license license:expat)))
 
+(define-public rust-gobject-sys-0.14
+  (package
+    (inherit rust-gobject-sys-0.15)
+    (version "0.14.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gobject-sys" version))
+       (file-name (string-append "rust-gobject-sys-" version ".tar.gz"))
+       (sha256
+        (base32 "1xf3jiwzrjingq8jr15bjkbv6m5dypzp67cjnm5f7njrjzicm4ma"))))
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-glib-sys" ,rust-glib-sys-0.14)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-system-deps" ,rust-system-deps-3))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-0.1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs '())))
+
 (define-public rust-gobject-sys-0.10
   (package
     (inherit rust-gobject-sys-0.14)
@@ -1482,29 +1771,31 @@
 library.")
     (license license:expat)))
 
-(define-public rust-pango-0.14
+(define-public rust-pango-0.15
   (package
     (name "rust-pango")
-    (version "0.14.8")
+    (version "0.15.10")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "pango" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "10c5q8wl9gkjh323whq6pg9yfvr2vmz00f98z1d77jp506cdavsl"))))
+        (base32 "0ksf85fqkw4y5pf21p84g5xn4fnqn21cbrmx2d9yx6k591ah9r12"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build?
-       #t
+     `(;; FIXME: error[E0277]: `Errors` doesn't implement `std::fmt::Display`
+       #:tests? #f
        #:cargo-inputs
        (("rust-bitflags" ,rust-bitflags-1)
-        ("rust-glib" ,rust-glib-0.14)
+        ("rust-glib" ,rust-glib-0.15)
         ("rust-libc" ,rust-libc-0.2)
         ("rust-once-cell" ,rust-once-cell-1)
-        ("rust-pango-sys" ,rust-pango-sys-0.14))
+        ("rust-pango-sys" ,rust-pango-sys-0.15))
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
+    (native-inputs
+     (list pkg-config))
     (inputs
      (list pango))
     (home-page "https://gtk-rs.org/")
@@ -1512,6 +1803,31 @@ library.")
     (description "Rust bindings for the Pango library")
     (license license:expat)))
 
+(define-public rust-pango-0.14
+  (package
+    (inherit rust-pango-0.15)
+    (name "rust-pango")
+    (version "0.14.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pango" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "10c5q8wl9gkjh323whq6pg9yfvr2vmz00f98z1d77jp506cdavsl"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build?
+       #t
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-glib" ,rust-glib-0.14)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-once-cell" ,rust-once-cell-1)
+        ("rust-pango-sys" ,rust-pango-sys-0.14))
+       #:cargo-development-inputs
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
+
 (define-public rust-pango-0.9
   (package
     (inherit rust-pango-0.14)
@@ -1592,8 +1908,39 @@ library.")
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
+(define-public rust-pango-sys-0.15
+  (package
+    (name "rust-pango-sys")
+    (version "0.15.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pango-sys" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1an3c931kbkr08n9d9d1dapsq3n26zs0xn4ixn11jrp4rn0h186j"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-glib-sys" ,rust-glib-sys-0.15)
+        ("rust-gobject-sys" ,rust-gobject-sys-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-system-deps" ,rust-system-deps-6))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list pango))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libpango-1.0")
+    (description "This package provides FFI bindings to @code{libpango-1.0}.")
+    (license license:expat)))
+
 (define-public rust-pango-sys-0.14
   (package
+    (inherit rust-pango-sys-0.15)
     (name "rust-pango-sys")
     (version "0.14.0")
     (source
@@ -1603,7 +1950,6 @@ library.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1zj236n9kjldf47wwlxvhshwm5zhg589a0fml5mm8qg7lnf0jrr3"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build?
        #t
@@ -1611,13 +1957,7 @@ library.")
        (("rust-glib-sys" ,rust-glib-sys-0.14)
         ("rust-gobject-sys" ,rust-gobject-sys-0.14)
         ("rust-libc" ,rust-libc-0.2)
-        ("rust-system-deps" ,rust-system-deps-3))))
-    (inputs
-     (list pango))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libpango-1.0")
-    (description "This package provides FFI bindings to @code{libpango-1.0}.")
-    (license license:expat)))
+        ("rust-system-deps" ,rust-system-deps-3))))))
 
 (define-public rust-pango-sys-0.10
   (package
@@ -1662,8 +2002,44 @@ library.")
        (("rust-shell-words" ,rust-shell-words-0.1)
         ("rust-tempfile" ,rust-tempfile-3))))))
 
+(define-public rust-pangocairo-0.15
+  (package
+    (name "rust-pangocairo")
+    (version "0.15.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pangocairo" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0rjk0clrjxah4kc0kybn7l7bxa5m5kpxkihxc2i7a6hx3xfa8xkq"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(;; FIXME: error[E0277]: `Errors` doesn't implement `std::fmt::Display`
+       #:tests? #f
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-cairo-rs" ,rust-cairo-rs-0.15)
+        ("rust-glib" ,rust-glib-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-pango" ,rust-pango-0.15)
+        ("rust-pangocairo-sys" ,rust-pangocairo-sys-0.15))
+       #:cargo-development-inputs
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list pango))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "Rust bindings for the PangoCairo library")
+    (description
+     "Rust bindings for the PangoCairo library.")
+    (license license:expat)))
+
 (define-public rust-pangocairo-0.9
   (package
+    (inherit rust-pangocairo-0.15)
     (name "rust-pangocairo")
     (version "0.9.0")
     (source
@@ -1690,14 +2066,7 @@ library.")
         ("rust-pangocairo-sys" ,rust-pangocairo-sys-0.10)
         ("rust-gtk-rs-lgpl-docs" ,rust-gtk-rs-lgpl-docs-0.1))
        #:cargo-development-inputs
-       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))
-    (inputs
-     (list gtk+))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "Rust bindings for the PangoCairo library")
-    (description
-     "Rust bindings for the PangoCairo library.")
-    (license license:expat)))
+       (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
 (define-public rust-pangocairo-0.8
   (package
@@ -1729,8 +2098,43 @@ library.")
        #:cargo-development-inputs
        (("rust-gir-format-check" ,rust-gir-format-check-0.1))))))
 
+(define-public rust-pangocairo-sys-0.15
+  (package
+    (name "rust-pangocairo-sys")
+    (version "0.15.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pangocairo-sys" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "154llaawy60zh8fkw2yq0r31ynpmqlsr7brryzaq2v4ijijp9kvq"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.15)
+        ("rust-glib-sys" ,rust-glib-sys-0.15)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-pango-sys" ,rust-pango-sys-0.15)
+        ("rust-system-deps" ,rust-system-deps-6))
+       #:cargo-development-inputs
+       (("rust-shell-words" ,rust-shell-words-1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     ;; XXX: Should these be propagated from their respective crates?
+     (list cairo glib pango))
+    (home-page "https://gtk-rs.org/")
+    (synopsis "FFI bindings to libgtk-3")
+    (description "This package provides FFI bindings to libgtk-3.")
+    (license license:expat)))
+
 (define-public rust-pangocairo-sys-0.10
   (package
+    (inherit rust-pangocairo-sys-0.15)
     (name "rust-pangocairo-sys")
     (version "0.10.1")
     (source
@@ -1752,13 +2156,7 @@ library.")
         ("rust-pkg-config" ,rust-pkg-config-0.3))
        #:cargo-development-inputs
        (("rust-shell-words" ,rust-shell-words-0.1)
-        ("rust-tempfile" ,rust-tempfile-3))))
-    (inputs
-     (list gtk+))
-    (home-page "https://gtk-rs.org/")
-    (synopsis "FFI bindings to libgtk-3")
-    (description "This package provides FFI bindings to libgtk-3.")
-    (license license:expat)))
+        ("rust-tempfile" ,rust-tempfile-3))))))
 
 (define-public rust-soup-sys-0.10
   (package
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7c5850791d..34514ea0c7 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -1860,7 +1860,7 @@ checksum, used in the zlib compression format.")
 (define-public rust-adler32-1
   (package
     (name "rust-adler32")
-    (version "1.1.0")
+    (version "1.2.0")
     (source
       (origin
         (method url-fetch)
@@ -1869,15 +1869,19 @@ checksum, used in the zlib compression format.")
           (string-append name "-" version ".tar.gz"))
         (sha256
          (base32
-          "0bgks405vz823bphgwhj4l9h6vpfh900s0phfk4qqijyh9xhfysn"))))
+          "0d7jq7jsjyhsgbhnfq5fvrlh9j0i9g1fqrl2735ibv5f75yjgqda"))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-compiler-builtins" ,rust-compiler-builtins-0.1)
         ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1))
        #:cargo-development-inputs
-       (("rust-bencher" ,rust-bencher-0.1)
-        ("rust-rand" ,rust-rand-0.4))))
+       (("rust-criterion" ,rust-criterion-0.3)
+        ("rust-getrandom" ,rust-getrandom-0.1)
+        ("rust-humansize" ,rust-humansize-1)
+        ("rust-rand" ,rust-rand-0.7)
+        ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
+        ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3))))
     (home-page "https://github.com/remram44/adler32-rs")
     (synopsis "Implementation of the Adler32 rolling hash algorithm")
     (description
@@ -10303,7 +10307,7 @@ box''.")
 (define-public rust-cc-1
   (package
     (name "rust-cc")
-    (version "1.0.67")
+    (version "1.0.73")
     (source
      (origin
        (method url-fetch)
@@ -10311,7 +10315,7 @@ box''.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1z9p27ys80shv09zhknmlal8jjra78agdwg97i6jjd6lg83rpip3"))))
+         "04ccylrjq94jssh8f7d7hxv64gs9f1m1jrsxb7wqgfxk4xljmzrg"))))
     (build-system cargo-build-system)
     (arguments
      `(#:tests? #f
@@ -10450,24 +10454,24 @@ that need to represent UTF-16 data as 8-bit characters.")
 winded @code{#[cfg()]} checks.")
     (license license:expat)))
 
-(define-public rust-cfg-expr-0.8
+(define-public rust-cfg-expr-0.10
   (package
     (name "rust-cfg-expr")
-    (version "0.8.1")
+    (version "0.10.3")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "cfg-expr" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "03lgv8psc2qrr93hxgdfmfwbj1crpzghxd7qh6w2nz0l4qryh4ml"))))
+        (base32 "1nw50j1sl6q96067399r1c6ppwp483q6vvmqdsnv493cv7sarb0a"))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-smallvec" ,rust-smallvec-1)
         ("rust-target-lexicon" ,rust-target-lexicon-0.12))
        #:cargo-development-inputs
-       (("rust-difference" ,rust-difference-2))))
+       (("rust-similar-asserts" ,rust-similar-asserts-1))))
     (home-page "https://github.com/EmbarkStudios/cfg-expr")
     (synopsis "Parser and evaluator for Rust @code{cfg()} expressions")
     (description
@@ -10475,6 +10479,26 @@ winded @code{#[cfg()]} checks.")
 expressions.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-cfg-expr-0.8
+  (package
+    (inherit rust-cfg-expr-0.10)
+    (name "rust-cfg-expr")
+    (version "0.8.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "cfg-expr" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "03lgv8psc2qrr93hxgdfmfwbj1crpzghxd7qh6w2nz0l4qryh4ml"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-smallvec" ,rust-smallvec-1)
+        ("rust-target-lexicon" ,rust-target-lexicon-0.12))
+       #:cargo-development-inputs
+       (("rust-difference" ,rust-difference-2))))))
+
 (define-public rust-cfg-expr-0.7
   (package
     (inherit rust-cfg-expr-0.8)
@@ -13988,7 +14012,7 @@ final xor value.  It has many built-in CRC functions.")
 (define-public rust-crc32fast-1
   (package
     (name "rust-crc32fast")
-    (version "1.2.0")
+    (version "1.3.2")
     (source
      (origin
        (method url-fetch)
@@ -13997,15 +14021,14 @@ final xor value.  It has many built-in CRC functions.")
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1c9dhkvf3brrzzplcijaywxi2w8wv5578i0ryhcm7x8dmzi5s4ms"))))
+         "03c8f29yx293yf43xar946xbls1g60c207m9drf8ilqhr25vsh5m"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
-       (("rust-cfg-if" ,rust-cfg-if-0.1))
+     `(#:cargo-inputs
+       (("rust-cfg-if" ,rust-cfg-if-1))
        #:cargo-development-inputs
        (("rust-bencher" ,rust-bencher-0.1)
-        ("rust-quickcheck" ,rust-quickcheck-0.8)
+        ("rust-quickcheck" ,rust-quickcheck-1)
         ("rust-rand" ,rust-rand-0.4))))
     (home-page "https://github.com/srijs/rust-crc32fast")
     (synopsis
@@ -16747,10 +16770,10 @@ the Debug trait manually.")
 thread.")
     (license license:mpl2.0)))
 
-(define-public rust-deflate-0.9
+(define-public rust-deflate-1
   (package
     (name "rust-deflate")
-    (version "0.9.1")
+    (version "1.0.0")
     (source
       (origin
         (method url-fetch)
@@ -16758,21 +16781,42 @@ thread.")
         (file-name (string-append name "-" version ".tar.gz"))
         (sha256
          (base32
-          "0w0ww0hrq4bjnihxgbnrri4lj5c8yzg31fyzx36fd9pvvw2vz5az"))))
+          "0bs319wa9wl7pn9j6jrrxg1gaqbak581rkx210cbix0qyljpwvy8"))))
     (build-system cargo-build-system)
     (arguments
      `(#:tests? #f      ; not all test files included
        #:cargo-inputs
        (("rust-adler32" ,rust-adler32-1)
-        ("rust-gzip-header" ,rust-gzip-header-0.3))
+        ("rust-gzip-header" ,rust-gzip-header-1))
        #:cargo-development-inputs
-       (("rust-miniz-oxide" ,rust-miniz-oxide-0.3))))
+       (("rust-miniz-oxide" ,rust-miniz-oxide-0.5))))
     (home-page "https://github.com/image-rs/deflate-rs")
     (synopsis "DEFLATE, zlib and gzip encoder written in rust")
     (description "This package provides a DEFLATE, zlib and gzip encoder
 written in rust.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-deflate-0.9
+  (package
+    (inherit rust-deflate-1)
+    (name "rust-deflate")
+    (version "0.9.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "deflate" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0w0ww0hrq4bjnihxgbnrri4lj5c8yzg31fyzx36fd9pvvw2vz5az"))))
+    (arguments
+     `(#:tests? #f      ; not all test files included
+       #:cargo-inputs
+       (("rust-adler32" ,rust-adler32-1)
+        ("rust-gzip-header" ,rust-gzip-header-0.3))
+       #:cargo-development-inputs
+       (("rust-miniz-oxide" ,rust-miniz-oxide-0.3))))))
+
 (define-public rust-deflate-0.8
   (package
     (inherit rust-deflate-0.9)
@@ -26140,19 +26184,18 @@ support.")
         ("rust-quote" ,rust-quote-1)
         ("rust-syn" ,rust-syn-1))))))
 
-(define-public rust-gzip-header-0.3
+(define-public rust-gzip-header-1
   (package
     (name "rust-gzip-header")
-    (version "0.3.0")
+    (version "1.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "gzip-header" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0fg6vm8sgsm69szwqyz7abfbyziv6pv0jkcailimlamvsfrzwc81"))))
+         "18lm2y96mahkmcd76pzyam2sl3v6lsl9mn8ajri9l0p6j9xm5k4m"))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
@@ -26164,6 +26207,25 @@ support.")
 of gzip files based on the gzip header implementation in the @code{flate2} crate.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-gzip-header-0.3
+  (package
+    (inherit rust-gzip-header-1)
+    (name "rust-gzip-header")
+    (version "0.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "gzip-header" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0fg6vm8sgsm69szwqyz7abfbyziv6pv0jkcailimlamvsfrzwc81"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-crc32fast" ,rust-crc32fast-1))))))
+
 (define-public rust-h2-0.3
   (package
     (name "rust-h2")
@@ -29814,14 +29876,14 @@ whether or not a given path points to an executable file.")
 (define-public rust-itertools-0.10
   (package
     (name "rust-itertools")
-    (version "0.10.0")
+    (version "0.10.3")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "itertools" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "06dkghwi1a6ah2103gibxnr2ys762m5x4rp75x0q43imis8p5m9p"))))
+        (base32 "1qy55fqbaisr9qgbn7cvdvqlfqbh1f4ddf99zwan56z7l6gx3ad9"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
@@ -35148,7 +35210,7 @@ drop-in replacement for miniz.")
 (define-public rust-mint-0.5
   (package
     (name "rust-mint")
-    (version "0.5.4")
+    (version "0.5.9")
     (source
      (origin
        (method url-fetch)
@@ -35157,8 +35219,13 @@ drop-in replacement for miniz.")
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0c4190gr348fkfijij7vm19iagwl36mssj1irc9f6m448hbhgn68"))))
+         "1zw5glv8z2d99c82jy2za97hh9p6377xmf4rbwz7jynsdfxfngg5"))))
     (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-serde" ,rust-serde-1))
+       #:cargo-development-inputs
+       (("rust-serde-json" ,rust-serde-json-1))))
     (home-page "https://github.com/kvark/mint")
     (synopsis "Math interoperability standard types")
     (description
@@ -46253,8 +46320,34 @@ they were parsed from")
 @code{LC_COLLATE} and @code{LC_CTYPE} are not yet supported.")
     (license license:expat)))
 
+(define-public rust-pyo3-build-config-0.16
+  (package
+    (name "rust-pyo3-build-config")
+    (version "0.16.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pyo3-build-config" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1j2jj5qnnpagi3gvkwjpydcxfsd5qv3vmpghnaqs7n1mdia5pdmm"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-once-cell" ,rust-once-cell-1)
+        ("rust-python3-dll-a" ,rust-python3-dll-a-0.2)
+        ("rust-target-lexicon" ,rust-target-lexicon-0.12))))
+    (native-inputs (list python))       ;for tests
+    (home-page "https://github.com/pyo3/pyo3")
+    (synopsis "Build configuration for PyO3")
+    (description
+     "This package contains build configuration helpers for the PyO3
+ecosystem.")
+    (license license:asl2.0)))
+
 (define-public rust-pyo3-build-config-0.15
   (package
+    (inherit rust-pyo3-build-config-0.16)
     (name "rust-pyo3-build-config")
     (version "0.15.1")
     (source
@@ -46264,20 +46357,63 @@ they were parsed from")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "0aw5zfqwzj5rzfxjyqvrqfam138d1009jh6kia4xrgdz538y9yfv"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
        (("rust-once-cell" ,rust-once-cell-1))))
+    (native-inputs '())))
+
+(define-public rust-pyo3-ffi-0.16
+  (package
+    (name "rust-pyo3-ffi")
+    (version "0.16.5")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "pyo3-ffi" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0avls4q393nmzhb124zg6kp5lj6xzy2f6qx564qa7b614xqs0xf2"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-libc" ,rust-libc-0.2)
+        ("rust-pyo3-build-config" ,rust-pyo3-build-config-0.16))))
     (home-page "https://github.com/pyo3/pyo3")
-    (synopsis "Build configuration for PyO3")
+    (synopsis "Python API bindings for the PyO3 ecosystem")
     (description
-     "This package contains build configuration helpers for the PyO3
-ecosystem.")
+     "This crate provides Rust FFI declarations for Python 3.")
+    (license license:asl2.0)))
+
+(define-public rust-pyo3-macros-backend-0.16
+  (package
+    (name "rust-pyo3-macros-backend")
+    (version "0.16.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pyo3-macros-backend" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1bvzvdx2a6hhliny12n2vy7v7gbsgzanxjckjr1cbxbkizss1gak"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-proc-macro2" ,rust-proc-macro2-1)
+        ("rust-pyo3-build-config" ,rust-pyo3-build-config-0.16)
+        ("rust-quote" ,rust-quote-1)
+        ("rust-syn" ,rust-syn-1))))
+    (home-page "https://github.com/pyo3/pyo3")
+    (synopsis "Code generation for PyO3")
+    (description
+     "This package provides code generation backends for PyO3.")
     (license license:asl2.0)))
 
 (define-public rust-pyo3-macros-backend-0.15
   (package
+    (inherit rust-pyo3-macros-backend-0.16)
     (name "rust-pyo3-macros-backend")
     (version "0.15.1")
     (source
@@ -46294,15 +46430,35 @@ ecosystem.")
        (("rust-proc-macro2" ,rust-proc-macro2-1)
         ("rust-pyo3-build-config" ,rust-pyo3-build-config-0.15)
         ("rust-quote" ,rust-quote-1)
-        ("rust-syn" ,rust-syn-1))))
+        ("rust-syn" ,rust-syn-1))))))
+
+(define-public rust-pyo3-macros-0.16
+  (package
+    (name "rust-pyo3-macros")
+    (version "0.16.5")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pyo3-macros" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1xwh7sl4n73746q80n5m5afd261zg0kxcqfnlr89ik7vbd4c8kr8"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-pyo3-macros-backend" ,rust-pyo3-macros-backend-0.16)
+         ("rust-quote" ,rust-quote-1)
+         ("rust-syn" ,rust-syn-1))))
     (home-page "https://github.com/pyo3/pyo3")
-    (synopsis "Code generation for PyO3")
+    (synopsis "Proc macros for PyO3")
     (description
-     "This package provides code generation backends for PyO3.")
+     "This package provides compiler macros for use with PyO3.")
     (license license:asl2.0)))
 
 (define-public rust-pyo3-macros-0.15
   (package
+    (inherit rust-pyo3-macros-0.16)
     (name "rust-pyo3-macros")
     (version "0.15.1")
     (source
@@ -46318,15 +46474,64 @@ ecosystem.")
         #:cargo-inputs
         (("rust-pyo3-macros-backend" ,rust-pyo3-macros-backend-0.15)
          ("rust-quote" ,rust-quote-1)
-         ("rust-syn" ,rust-syn-1))))
+         ("rust-syn" ,rust-syn-1))))))
+
+(define-public rust-pyo3-0.16
+  (package
+    (name "rust-pyo3")
+    (version "0.16.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pyo3" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1p5kjsj3jdw2gnahdjrzljmi93w3nxdp11qq8x3i80b0a3l04qqy"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-anyhow" ,rust-anyhow-1)
+        ("rust-cfg-if" ,rust-cfg-if-1)
+        ("rust-eyre" ,rust-eyre-0.6)
+        ("rust-hashbrown" ,rust-hashbrown-0.11)
+        ("rust-indexmap" ,rust-indexmap-1)
+        ("rust-indoc" ,rust-indoc-1)
+        ("rust-inventory" ,rust-inventory-0.2)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-num-bigint" ,rust-num-bigint-0.4)
+        ("rust-num-complex" ,rust-num-complex-0.4)
+        ("rust-parking-lot" ,rust-parking-lot-0.11)
+        ("rust-paste" ,rust-paste-0.1)
+        ("rust-pyo3-build-config" ,rust-pyo3-build-config-0.16)
+        ("rust-pyo3-ffi" ,rust-pyo3-ffi-0.16)
+        ("rust-pyo3-macros" ,rust-pyo3-macros-0.16)
+        ("rust-serde" ,rust-serde-1)
+        ("rust-unindent" ,rust-unindent-0.1))
+       #:cargo-development-inputs
+       (("rust-assert-approx-eq" ,rust-assert-approx-eq-1)
+        ("rust-bitflags" ,rust-bitflags-1.2)
+        ("rust-criterion" ,rust-criterion-0.3)
+        ("rust-half" ,rust-half-1)
+        ("rust-proptest" ,rust-proptest-0.10)
+        ("rust-rustversion" ,rust-rustversion-1)
+        ("rust-send-wrapper" ,rust-send-wrapper-0.5)
+        ("rust-serde-json" ,rust-serde-json-1)
+        ("rust-trybuild" ,rust-trybuild-1)
+        ("rust-widestring" ,rust-widestring-0.5))
+       ;; FIXME: fails to initialize Python interpreter.
+       #:tests? #f))
+    (inputs (list python))
     (home-page "https://github.com/pyo3/pyo3")
-    (synopsis "Proc macros for PyO3")
+    (synopsis "Rust bindings for the Python interpreter")
     (description
-     "This package provides compiler macros for use with PyO3.")
+     "This package provides Rust bindings for Python, including tools for
+creating native Python extension modules.  Running and interacting with
+Python code from a Rust binary is also supported.")
     (license license:asl2.0)))
 
 (define-public rust-pyo3-0.15
   (package
+    (inherit rust-pyo3-0.16)
     (name "rust-pyo3")
     (version "0.15.1")
     (source
@@ -46372,15 +46577,29 @@ ecosystem.")
         ("rust-serde-json" ,rust-serde-json-1)
         ("rust-trybuild" ,rust-trybuild-1))
        ;; FIXME: fails to initialize Python interpreter.
-       #:tests? #f))
-    (inputs (list python))
-    (home-page "https://github.com/pyo3/pyo3")
-    (synopsis "Rust bindings for the Python interpreter")
+       #:tests? #f))))
+
+(define-public rust-python3-dll-a-0.2
+  (package
+    (name "rust-python3-dll-a")
+    (version "0.2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "python3-dll-a" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "01k2nf4wq4f4xnaq3fy1gx12v10pndwmdrjq4x4pshhjxxnrpml9"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f                      ;Windows-like targets only
+       #:cargo-inputs (("rust-cc" ,rust-cc-1))))
+    (home-page "https://github.com/pyo3/python3-dll-a")
+    (synopsis "Python import library generator")
     (description
-     "This package provides Rust bindings for Python, including tools for
-creating native Python extension modules.  Running and interacting with
-Python code from a Rust binary is also supported.")
-    (license license:asl2.0)))
+     "This crate generates import libraries for the Python shared library
+for MinGW-w64 and MSVC (cross-)compile targets.")
+    (license license:expat)))
 
 (define-public rust-qstring-0.7
   (package
@@ -57860,7 +58079,7 @@ inline storage.")
 (define-public rust-smallvec-1
   (package
     (name "rust-smallvec")
-    (version "1.6.1")
+    (version "1.9.0")
     (source
      (origin
        (method url-fetch)
@@ -57869,11 +58088,12 @@ inline storage.")
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0kk08axr0ybfbjzk65a41k84mb6sfhyajmfndaka9igkx34kf3zy"))))
+         "1lfss4vs5z5njm3ac9c499s5m1gphzm5a7gxcbw1zncpjmsdpl1g"))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
-       (("rust-serde" ,rust-serde-1))
+       (("rust-arbitrary" ,rust-arbitrary-1)
+        ("rust-serde" ,rust-serde-1))
        #:cargo-development-inputs
        (("rust-bincode" ,rust-bincode-1))))
     (home-page "https://github.com/servo/rust-smallvec")
@@ -61523,31 +61743,31 @@ processors, disks, components and networks.")
     (description "Send log messages to syslog.")
     (license license:expat)))
 
-(define-public rust-system-deps-3
+(define-public rust-system-deps-6
   (package
     (name "rust-system-deps")
-    (version "3.2.0")
+    (version "6.0.2")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "system-deps" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "19ig3hxgyq9d7qy8cwpl74l75ay2w0y0a4rginqb68h7hygjc328"))))
+        (base32 "02g750rlhh7ynqa3p4a3qm7jrkjp3d0jlzrl29z225ch9hf5m951"))))
     (build-system cargo-build-system)
     (arguments
      `(#:tests? #f                      ;source is missing some test files
        #:cargo-inputs
        (("rust-anyhow" ,rust-anyhow-1)
-        ("rust-cfg-expr" ,rust-cfg-expr-0.8)
-        ("rust-heck" ,rust-heck-0.3)
+        ("rust-cfg-expr" ,rust-cfg-expr-0.10)
+        ("rust-heck" ,rust-heck-0.4)
         ("rust-itertools" ,rust-itertools-0.10)
         ("rust-pkg-config" ,rust-pkg-config-0.3)
         ("rust-strum" ,rust-strum-0.21)
         ("rust-strum-macros" ,rust-strum-macros-0.21)
         ("rust-thiserror" ,rust-thiserror-1)
         ("rust-toml" ,rust-toml-0.5)
-        ("rust-version-compare" ,rust-version-compare-0.0))
+        ("rust-version-compare" ,rust-version-compare-0.1))
        #:cargo-development-inputs
        (("rust-assert-matches" ,rust-assert-matches-1)
         ("rust-itertools" ,rust-itertools-0.10)
@@ -61560,6 +61780,37 @@ This makes those dependencies declarative, so other tools can read them as
 well.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-system-deps-3
+  (package
+    (inherit rust-system-deps-6)
+    (name "rust-system-deps")
+    (version "3.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "system-deps" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "19ig3hxgyq9d7qy8cwpl74l75ay2w0y0a4rginqb68h7hygjc328"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f                      ;source is missing some test files
+       #:cargo-inputs
+       (("rust-anyhow" ,rust-anyhow-1)
+        ("rust-cfg-expr" ,rust-cfg-expr-0.8)
+        ("rust-heck" ,rust-heck-0.3)
+        ("rust-itertools" ,rust-itertools-0.10)
+        ("rust-pkg-config" ,rust-pkg-config-0.3)
+        ("rust-strum" ,rust-strum-0.21)
+        ("rust-strum-macros" ,rust-strum-macros-0.21)
+        ("rust-thiserror" ,rust-thiserror-1)
+        ("rust-toml" ,rust-toml-0.5)
+        ("rust-version-compare" ,rust-version-compare-0.0))
+       #:cargo-development-inputs
+       (("rust-assert-matches" ,rust-assert-matches-1)
+        ("rust-itertools" ,rust-itertools-0.10)
+        ("rust-lazy-static" ,rust-lazy-static-1))))))
+
 (define-public rust-system-deps-1
   (package
     (inherit rust-system-deps-3)
@@ -61769,14 +62020,14 @@ memory all at once.")
 (define-public rust-target-lexicon-0.12
   (package
     (name "rust-target-lexicon")
-    (version "0.12.2")
+    (version "0.12.4")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "target-lexicon" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "1zsvillq0zsggg3fb0mfmcia0f68wfclahaqc0zgln14pkfzrgyr"))))
+        (base32 "1hfk4v8gbhczr6jwsy1ja6yg4npkvznym6b7r4fbgjc0fw428960"))))
     (build-system cargo-build-system)
     (arguments `(#:skip-build? #t))
     (home-page "https://github.com/CraneStation/target-lexicon")
@@ -64074,14 +64325,14 @@ C library.")
 (define-public rust-tinyvec-1
   (package
     (name "rust-tinyvec")
-    (version "1.1.1")
+    (version "1.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "tinyvec" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "08qhf0a9vxf85bj1hd38i8qzwiwm6v4vvwd11k7c728f59bwlz1i"))))
+        (base32 "0hn3fkpb9nca9nf9znz2dxlp4ccv37hnbh67aczpzpmpbgq20ljv"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
@@ -72712,6 +72963,23 @@ library.")
 for locating fonts.")
     (license license:expat)))
 
+(define-public rust-yeslogic-fontconfig-sys-2
+  (package
+    (inherit rust-yeslogic-fontconfig-sys-3)
+    (name "rust-yeslogic-fontconfig-sys")
+    (version "2.11.2")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "yeslogic-fontconfig-sys" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "13bzwn12dmxnc8iqd6za6q3j2ililnqjcplnlrfblbca4ia73r1q"))))
+    (arguments
+     `(#:cargo-inputs
+       (("rust-const-cstr" ,rust-const-cstr-0.3)
+        ("rust-pkg-config" ,rust-pkg-config-0.3))))))
+
 (define-public rust-zbase32-0.1
   (package
     (name "rust-zbase32")
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 209ad0f278..6c97dbe413 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1283,39 +1283,13 @@ pictures, sounds, or video.")
   (package
     (inherit postgresql-14)
     (version "13.6")
-    (replacement postgresql-13/replacement)
     (source (origin
               (inherit (package-source postgresql-14))
               (uri (string-append "https://ftp.postgresql.org/pub/source/v"
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "1z37ix80hb2bqa2smh1hbj9r507ypnl3pil43gkqznnlv6ipzz5s"))
-              (patches (search-patches "postgresql-riscv-spinlocks.patch"))))))
-
-;; The merge of commit ...
-;;  781dd2de230e3 gnu: postgresql-13: Fix building on riscv64-linux.
-;; ... in ...
-;;  49b350fafc2c3 Merge branch 'master' into staging.
-;; ... lost the inherited patch from postgresql-14, causing problems such as ...
-;;  05fef7bfc6005 gnu: timescaledb: Adjust test preparation to PostgreSQL 13.6.
-;;
-;; While at it, remove the RISC-V spinlock patch, which has been upstreamed
-;; in a different form (so the old patch still applies).
-;; TODO: Remove in the next rebuild cycle.
-(define postgresql-13/replacement
-  (package
-    (inherit postgresql-13)
-    (version "13.7")
-    (source
-     (origin
-       (inherit (package-source postgresql-13))
-       (uri (string-append "https://ftp.postgresql.org/pub/source/v"
-                           version "/postgresql-" version ".tar.bz2"))
-       (sha256
-        (base32
-         "16b3ljid7zd1v5l4l4pmwihx43wi8p9izidkjfii8dnqygs5p40v"))
-       (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
+                "1z37ix80hb2bqa2smh1hbj9r507ypnl3pil43gkqznnlv6ipzz5s"))))))
 
 (define-public postgresql-11
   (package
@@ -1328,9 +1302,7 @@ pictures, sounds, or video.")
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "1983a7y4y6zhbgh0qcdfkf99445j1zm5q1ncrbkrx555y08y3n9d"))
-              (patches (search-patches
-                        "postgresql-disable-resolve_symlinks.patch"))))
+                "1983a7y4y6zhbgh0qcdfkf99445j1zm5q1ncrbkrx555y08y3n9d"))))
     (native-inputs
      (modify-inputs (package-native-inputs postgresql-13)
        (replace "docbook-xml" docbook-xml-4.2)))))
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 037a247243..8546554c53 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -519,14 +519,14 @@ freedesktop.org project.")
   ;; Updating this will rebuild over 700 packages through libinput-minimal.
   (package
     (name "libinput")
-    (version "1.19.2")
+    (version "1.19.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://freedesktop.org/software/libinput/"
                                   "libinput-" version ".tar.xz"))
               (sha256
                (base32
-                "10xqk05mkvsyxfxpn3vwkwb7j22d38wlbg1l1k37f6pfyc59zhqg"))))
+                "0h5lz54rrl48bhi3vki6s08m6rn2h62rlf08dhgchdm9nmqaaczz"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags '("-Ddocumentation=false")
@@ -1493,7 +1493,7 @@ these interfaces, based on the useradd, usermod and userdel commands.")
 (define-public libmbim
   (package
     (name "libmbim")
-    (version "1.20.2")
+    (version "1.26.4")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1501,7 +1501,7 @@ these interfaces, based on the useradd, usermod and userdel commands.")
                     "libmbim-" version ".tar.xz"))
               (sha256
                (base32
-                "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
+                "1ncaarl4lgc7i52rwz50yq701wk2rr478cjybxbifsjqqk2cx27n"))))
     (build-system gnu-build-system)
     (native-inputs
      (list `(,glib "bin") ; for glib-mkenums
@@ -1523,7 +1523,7 @@ which speak the Mobile Interface Broadband Model (MBIM) protocol.")
 (define-public libqmi
   (package
     (name "libqmi")
-    (version "1.24.14")
+    (version "1.30.8")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1531,7 +1531,7 @@ which speak the Mobile Interface Broadband Model (MBIM) protocol.")
                     "libqmi-" version ".tar.xz"))
               (sha256
                (base32
-                "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
+                "140rmjw436rh6rqmnfw6yaflpffd27ilwcv4s9jvvl1skv784946"))))
     (build-system gnu-build-system)
     (inputs
      (list libgudev))
@@ -1553,7 +1553,7 @@ which speak the Qualcomm MSM Interface (QMI) protocol.")
 (define-public modem-manager
   (package
     (name "modem-manager")
-    (version "1.12.10")
+    (version "1.18.10")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1561,19 +1561,23 @@ which speak the Qualcomm MSM Interface (QMI) protocol.")
                     "ModemManager-" version ".tar.xz"))
               (sha256
                (base32
-                "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
+                "1sv53lvz9nfbq6jzprl5xhai0vylc01kglcdrgz2vszf5615y98n"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags
-       `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
+     (list
+      #:configure-flags
+      #~(list (string-append "--with-udev-base-dir=" #$output "/lib/udev"))))
     (native-inputs
-     `(("glib:bin" ,glib "bin") ; for glib-mkenums
-       ("gobject-introspection" ,gobject-introspection)
-       ("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)
-       ("vala" ,vala)
-       ;; For testing.
-       ("dbus" ,dbus)))
+     (list gettext-minimal
+           `(,glib "bin") ; for glib-mkenums
+           gobject-introspection
+           pkg-config
+           vala
+           ;; For testing.
+           dbus
+           python
+           python-dbus
+           python-pygobject))
     (propagated-inputs
      (list glib)) ; required by mm-glib.pc
     (inputs
@@ -1910,15 +1914,15 @@ manually by a user.")
 (define-public perl-file-basedir
   (package
     (name "perl-file-basedir")
-    (version "0.08")
+    (version "0.09")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
+       (uri (string-append "mirror://cpan/authors/id/P/PL/PLICEASE/"
                            "File-BaseDir-" version ".tar.gz"))
        (sha256
         (base32
-         "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
+         "1nb757cyyy80xln147qgns113i2ivfpgcfhsxw8qzb322llgg9kd"))))
     (build-system perl-build-system)
     (native-inputs
      (list perl-module-build perl-file-which perl-test-pod
@@ -1962,7 +1966,7 @@ applications define in those files.")
 (define-public perl-file-mimeinfo
   (package
     (name "perl-file-mimeinfo")
-    (version "0.29")
+    (version "0.33")
     (source
      (origin
        (method url-fetch)
@@ -1970,7 +1974,7 @@ applications define in those files.")
                            "File-MimeInfo-" version ".tar.gz"))
        (sha256
         (base32
-         "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
+         "1i5iw6ri0w9clwpqf40xmsh4isc8xvx2lyf2r5g34886i6rsdgpn"))))
     (build-system perl-build-system)
     (inputs
      ;; TODO(staging): Make unconditional.
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5dc7298acb..aa2e4e04b0 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6736,7 +6736,7 @@ fight against their plot and save his fellow rabbits from slavery.")
            libxcursor
            libxml2
            miniupnpc
-           mozjs
+           mozjs-78
            openal
            sdl2
            wxwidgets
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index c740c087dd..66db679342 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -68,6 +68,7 @@
   #:use-module (guix build-system waf)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (ice-9 match)
   #:use-module ((srfi srfi-1) #:hide (zip)))
@@ -75,15 +76,22 @@
 (define-public glu
   (package
     (name "glu")
-    (version "9.0.1")
+    (version "9.0.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-"
-                                  version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.freedesktop.org/mesa/glu")
+                    (commit (string-append "glu-" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1xqhk9bn10nbvffw3r4p4rjslwz1l7gaycc0x2pqkr2irp7q9x7n"))))
+                "1khxfidyglpx4yd8f3xvrj05ah823cz1ygcszhcaa4w7h9kd1lbr"))))
     (build-system gnu-build-system)
+    (native-inputs
+     (list pkg-config
+           autoconf
+           automake
+           libtool))
     (propagated-inputs
      (list mesa)) ; according to glu.pc
     (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm")
@@ -104,16 +112,15 @@ as ASCII text.")
 (define-public freeglut
   (package
     (name "freeglut")
-    (version "3.2.1")
+    (version "3.2.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "mirror://sourceforge/freeglut/freeglut/"
-                    version "/freeglut-" version ".tar.gz"))
-              (patches (search-patches "freeglut-gcc-compat.patch"))
+                    "https://github.com/FreeGLUTProject/freeglut/releases"
+                    "/download/v" version "/freeglut-" version ".tar.gz"))
               (sha256
                (base32
-                "0s6sk49q8ijgbsrrryb7dzqx2fa744jhx1wck5cz5jia2010w06l"))))
+                "0l3s57zw51fy3mn5qfdm4z775kfhflgxppanaxmskfzh5l44m565"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ;no test target
@@ -249,14 +256,14 @@ also known as DXTn or DXTC) for Mesa.")
     (package
       (inherit libva)
       (name "libva-without-mesa")
-      (inputs `(,@(fold alist-delete (package-inputs libva)
-                        '("mesa" "wayland"))))
+      (inputs (fold alist-delete (package-inputs libva)
+                    '("mesa" "wayland")))
       (arguments
        (strip-keyword-arguments
         '(#:make-flags)
         (substitute-keyword-arguments (package-arguments libva)
           ((#:configure-flags flags)
-           '(list "--disable-glx" "--disable-egl"))))))))
+           '(list "--disable-glx"))))))))
 
 (define-public mesa
   (package
@@ -717,37 +724,31 @@ OpenGL graphics API.")
 (define-public libepoxy
   (package
     (name "libepoxy")
-    (version "1.5.5")
+    (version "1.5.10")
+    (home-page "https://github.com/anholt/libepoxy")
     (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/anholt/libepoxy/releases/download/"
-                    version "/libepoxy-" version ".tar.xz"))
+              (method git-fetch)
+              (uri (git-reference (url home-page) (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0mh5bdgqfd8m4wj6jlvn4ac94sgfa8r6ish75ciwrhdw47dn65i6"))))
+                "0jw02bzdwynyrwsn5rhcacv92h9xx928j3xp436f8gdnwlyb5641"))))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (delete 'bootstrap)
-         (add-before
-           'configure 'patch-paths
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((python (assoc-ref inputs "python"))
-                   (mesa (assoc-ref inputs "mesa")))
-               (substitute* "src/gen_dispatch.py"
-                 (("/usr/bin/env python") python))
-               (substitute* (find-files "." "\\.[ch]$")
-                 (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
-                 (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))
-               #t))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'patch-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((mesa (dirname (search-input-file inputs "lib/libGL.so"))))
+                (substitute* (find-files "." "\\.[ch]$")
+                  (("libGL.so.1") (string-append mesa "/libGL.so.1"))
+                  (("libEGL.so.1") (string-append mesa "/libEGL.so.1")))))))))
     (build-system meson-build-system)
     (native-inputs
      (list pkg-config python))
     (propagated-inputs
      ;; epoxy.pc: 'Requires.private: gl egl'
      (list mesa))
-    (home-page "https://github.com/anholt/libepoxy/")
     (synopsis "Library for handling OpenGL function pointer management")
     (description
      "A library for handling OpenGL function pointer management.")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 251d08ae01..fe20a9fa20 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4997,7 +4997,7 @@ and the GLib main loop, to integrate well with GNOME applications.")
 (define-public libsecret
   (package
     (name "libsecret")
-    (version "0.20.4")
+    (version "0.20.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -5006,28 +5006,47 @@ and the GLib main loop, to integrate well with GNOME applications.")
                     "libsecret-" version ".tar.xz"))
               (sha256
                (base32
-                "0a4xnfmraxchd9cq5ai66j12jv2vrgjmaaxz25kl031jvda4qnij"))))
-    (build-system gnu-build-system)
-    (outputs '("out" "doc"))
+                "0k9bs47rzb3dwvznb4179d6nw7rbzjdyd4y8hx6vazfd1wscxcrz"))))
+    (build-system meson-build-system)
     (arguments
-     `(#:tests? #f ; FIXME: Testing hangs.
-       #:configure-flags
-       (list (string-append "--with-html-dir="
-                            (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))))
+     (list
+      #:configure-flags
+      #~(list "-Dgtk_doc=false")        ;requires gi-docgen
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-problematic-tests
+            (lambda _
+              (substitute* "libsecret/meson.build"
+                ;; The test-collection test fails non-deterministically (see:
+                ;; https://gitlab.gnome.org/GNOME/libsecret/-/issues/80).
+                ((".*'test-collection',.*") ""))))
+          (delete 'check)
+          (add-after 'install 'check
+            (lambda* (#:key tests? test-options #:allow-other-keys)
+              (when tests?
+                (setenv "HOME" "/tmp")
+                (setenv "XDG_DATA_DIRS" ;for /org/freedesktop/secrets/collection
+                        (string-append #$output "/share:"
+                                       (getenv "XDG_DATA_DIRS")))
+                (apply invoke "dbus-run-session" "--"
+                       "meson" "test" "--print-errorlogs" "-t" "0"
+                       test-options)))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
-       ("gobject-introspection" ,gobject-introspection)
-       ("pkg-config" ,pkg-config)
-       ("vala" ,vala)
-       ("xsltproc" ,libxslt)))
+     (list dbus
+           docbook-xml-4.2
+           docbook-xsl
+           gettext-minimal
+           `(,glib "bin")               ;for gdbus-codegen, etc.
+           gobject-introspection
+           libxml2                      ;for XML_CATALOG_FILES
+           libxslt
+           pkg-config
+           python
+           python-dbus
+           python-pygobject
+           vala))
     (propagated-inputs
-     (list glib)) ; required by libsecret-1.pc
-    (inputs
-     ;; The ‘build’ phase complains about missing docbook-xml-4.2 but adding it
-     ;; doesn't seem to affect the build result.
-     (list docbook-xsl libgcrypt libxml2)) ; for XML_CATALOG_FILES
+     (list glib libgcrypt))             ;required by libsecret-1.pc
     (home-page "https://wiki.gnome.org/Projects/Libsecret/")
     (synopsis "GObject bindings for \"Secret Service\" API")
     (description
@@ -7272,7 +7291,7 @@ configuration program to choose applications starting on login.")
 (define-public gjs
   (package
     (name "gjs")
-    (version "1.70.0")
+    (version "1.72.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -7280,7 +7299,7 @@ configuration program to choose applications starting on login.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0pqwhq0znprs0h5ixz396912acwzk9zvjfhi9qvh52ii38s2j1jb"))
+                "0xrrv9lsi087yb9yf146a1aarf5yh6rf4jw9blx30zasvjdkgvnx"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -7289,10 +7308,7 @@ configuration program to choose applications starting on login.")
                     (("☭") ""))))))
     (build-system meson-build-system)
     (arguments
-     ;; Use meson-0.59, otherwise we'd get "ERROR: "install_dir" must be
-     ;; specified when installing a target".
-     `(#:meson ,meson-0.59
-       #:configure-flags '("-Dinstalled_tests=false")
+     '(#:configure-flags '("-Dinstalled_tests=false")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
@@ -7304,17 +7320,17 @@ configuration program to choose applications starting on login.")
              ;; For the missing /etc/machine-id.
              (setenv "DBUS_FATAL_WARNINGS" "0"))))))
     (native-inputs
-     `(("glib:bin" ,glib "bin")       ; for glib-compile-resources
-       ("pkg-config" ,pkg-config)
-       ("xmllint" ,libxml2)
-       ;; For testing
-       ("dbus-launch" ,dbus)
-       ("dconf" ,dconf) ; required to properly store settings
-       ("uuidgen" ,util-linux)
-       ("xvfb" ,xorg-server-for-tests)))
+     (list `(,glib "bin")               ;for glib-compile-resources
+           pkg-config
+           libxml2
+           ;; For testing
+           dbus
+           dconf                        ;required to properly store settings
+           util-linux
+           xorg-server-for-tests))
     (propagated-inputs
      ;; These are all in the Requires.private field of gjs-1.0.pc.
-     (list cairo gobject-introspection mozjs))
+     (list cairo gobject-introspection mozjs-91))
     (inputs
      (list gtk+ readline))
     (synopsis "Javascript bindings for GNOME")
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 4c08ef6095..589f123029 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net>
 ;;; Copyright © 2020, 2021, 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -96,16 +96,16 @@
 (define-public mozjs
   (package
     (name "mozjs")
-    (version "78.15.0")
+    (version "102.2.0")
     (source (origin
               (method url-fetch)
               ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
-              (uri (string-append "https://archive.mozilla.org/pub/firefox"
+              (uri (string-append "https://ftp.mozilla.org/pub/firefox"
                                   "/releases/" version "esr/source/firefox-"
                                   version "esr.source.tar.xz"))
               (sha256
                (base32
-                "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4"))))
+                "1zwpgis7py1bf8p88pz3mpai6a02qrdb8ww2fa9kxxdl9b8r2k81"))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -126,10 +126,6 @@
          "--enable-hardening"
          "--enable-optimize"
          "--enable-release"
-         ;; FIXME: rust-simd is disabled otherwise the build fails with
-         ;; "error: `[u32; 64]` is forbidden as the type of a const generic
-         ;; parameter".
-         "--disable-rust-simd"
          "--enable-readline"
          "--enable-shared-js"
          "--with-system-icu"
@@ -151,7 +147,7 @@
                 (for-each generate-all-checksums
                           '("js" "third_party/rust")))))
           (replace 'configure
-            (lambda* (#:key inputs configure-flags #:allow-other-keys)
+            (lambda* (#:key configure-flags #:allow-other-keys)
               ;; The configure script does not accept environment variables as
               ;; arguments.  It also must be run from a different directory,
               ;; but not the root directory either.
@@ -160,43 +156,11 @@
               (setenv "SHELL" (which "sh"))
               (setenv "CONFIG_SHELL" (which "sh"))
               (setenv "AUTOCONF" (which "autoconf"))
-              (apply invoke "../js/src/configure"
-                     (cons (string-append "--prefix=" #$output)
-                           configure-flags))))
-          (add-after 'unpack 'adjust-for-icu-68
-            (lambda _
-              (with-directory-excursion "js/src/tests"
-                ;; The test suite expects a lightly patched ICU 67.  Since
-                ;; Guix is about to switch to ICU 68, massage the tests to
-                ;; work with that instead of patching ICU.  Try removing this
-                ;; phase for newer versions of mozjs.
-
-                ;; These tests look up locale names and expects to get
-                ;; "GB" instead of "UK".
-                (substitute* "non262/Intl/DisplayNames/language.js"
-                  (("Traditionell, GB")
-                   "Traditionell, UK"))
-                (substitute* "non262/Intl/DisplayNames/region.js"
-                  (("\"GB\": \"GB\"")
-                   "\"GB\": \"UK\""))
-
-                ;; XXX: Some localized time formats have changed, and
-                ;; substitution fails for accented characters, even though
-                ;; it works in the REPL(?).  Just delete these for now.
-                (delete-file "non262/Intl/Date/toLocaleString_timeZone.js")
-                (delete-file "non262/Intl/Date/toLocaleDateString_timeZone.js")
-
-                ;; Similarly, these get an unexpected "A" suffix when looking
-                ;; up a time in the "ar-MA-u-ca-islamicc" locale, which is
-                ;; tricky to substitute.
-                (delete-file "non262/Intl/DateTimeFormat/format_timeZone.js")
-                (delete-file "non262/Intl/DateTimeFormat/format.js")
-
-                ;; This file compares a generated list of ICU locale names
-                ;; with actual lookups.  Some have changed slightly, i.e.
-                ;; daf-Latn-ZZ -> daf-Latn-CI, so drop it for simplicity.
-                (delete-file "non262/Intl/Locale/likely-subtags-generated.js"))))
-          (add-before 'check 'pre-check
+              (apply invoke "python" "../configure.py"
+                     "--enable-project=js"
+                     (string-append "--prefix=" #$output)
+                     configure-flags)))
+          (add-before 'check 'adjust-tests
             (lambda _
               (with-directory-excursion "../js/src/tests"
                 (substitute* "shell/os.js"
@@ -204,35 +168,44 @@
                   ((".*killed process should not have exitStatus.*")
                    ""))
 
-                ;; XXX: Delete all tests that test time zone functionality,
-                ;; because the test suite uses /etc/localtime to figure out
-                ;; the offset from the hardware clock, which does not work
-                ;; in the build container.  See <tests/non262/Date/shell.js>.
-                (delete-file-recursively "non262/Date")
-                (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js")
+                ;; The test suite expects a lightly patched ICU.  Disable tests
+                ;; that do not work with the system version.  See
+                ;; "intl/icu-patches" for clues.
 
-                (setenv "JSTESTS_EXTRA_ARGS"
-                        (string-join
-                         (list
-                          ;; Do not run tests marked as "random".
-                          "--exclude-random"
-                          ;; Exclude web platform tests.
-                          "--wpt=disabled"
-                          ;; Respect the daemons configured number of jobs.
-                          (string-append "--worker-count="
-                                         (number->string (parallel-job-count))))))))))))
+                ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
+                ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
+                ;; related patch for why this is failing.
+                (delete-file "non262/Intl/DateTimeFormat/\
+fractional-second-digits-append-item.js")
+                ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
+                (delete-file "non262/Intl/DateTimeFormat/day-period-hour-cycle.js")
+                ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
+                (delete-file "non262/Intl/available-locales-supported.js")
+                ;; FIXME: got "en-US", expected "en-US-POSIX"
+                (delete-file "non262/Intl/available-locales-resolved.js"))))
+          (add-before 'check 'pre-check
+            (lambda _
+              (setenv "JSTESTS_EXTRA_ARGS"
+                      (string-join
+                       (list
+                        ;; Do not run tests marked as "random".
+                        "--exclude-random"
+                        ;; Exclude web platform tests.
+                        "--wpt=disabled"
+                        ;; Respect the daemons configured number of jobs.
+                        (string-append "--worker-count="
+                                       (number->string (parallel-job-count)))))))))))
     (native-inputs
-     (list autoconf-2.13
-           automake
-           ;; TODO(staging): Use the default LLVM in the next rebuild cycle.
-           llvm-9                       ;for llvm-objdump
+     (list autoconf
+           llvm                         ;for llvm-objdump
+           m4
            perl
            pkg-config
-           python-3
+           python-wrapper
            rust
            `(,rust "cargo")))
     (inputs
-     (list icu4c readline zlib))
+     (list icu4c-71 readline zlib))
     (propagated-inputs
      (list nspr))                ; in the Requires.private field of mozjs-*.pc
     (home-page
@@ -242,6 +215,139 @@
 in C/C++.")
     (license license:mpl2.0))) ; and others for some files
 
+(define-public mozjs-91
+  (package
+    (inherit mozjs)
+    (version "91.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://ftp.mozilla.org/pub/firefox"
+                                  "/releases/" version "esr/source/firefox-"
+                                  version "esr.source.tar.xz"))
+              (sha256
+               (base32
+                "0qh7j960wdp5zcfqhkj8ki47spp9i9ms12xx0v0kxvmmw36jpgjk"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments mozjs)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-before 'check 'disable-timezone-tests
+              (lambda _
+                (with-directory-excursion "../js/src/tests"
+                  ;; FIXME: Assertion failed: got "2021a", expected "2021a3"?
+                  (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js")
+                  ;; XXX: Delete all tests that test time zone functionality,
+                  ;; because the test suite uses /etc/localtime to figure out
+                  ;; the offset from the hardware clock, which does not work
+                  ;; in the build container.  See <tests/non262/Date/shell.js>.
+                  (delete-file-recursively "non262/Date")
+                  (delete-file
+                   "non262/Intl/DateTimeFormat/tz-environment-variable.js"))))))))
+    (inputs (modify-inputs (package-inputs mozjs)
+              (replace "icu4c" icu4c)))))
+
+(define-public mozjs-78
+  (package
+    (inherit mozjs)
+    (name "mozjs")
+    (version "78.15.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://archive.mozilla.org/pub/firefox"
+                                  "/releases/" version "esr/source/firefox-"
+                                  version "esr.source.tar.xz"))
+              (sha256
+               (base32
+                "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4"))))
+    (build-system gnu-build-system)
+    (arguments
+     (substitute-keyword-arguments (package-arguments mozjs)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'configure
+              (lambda* (#:key configure-flags #:allow-other-keys)
+                ;; The configure script does not accept environment variables as
+                ;; arguments.  It also must be run from a different directory,
+                ;; but not the root directory either.
+                (mkdir "run-configure-from-here")
+                (chdir "run-configure-from-here")
+                (setenv "SHELL" (which "sh"))
+                (setenv "CONFIG_SHELL" (which "sh"))
+                (setenv "AUTOCONF" (which "autoconf"))
+                (apply invoke "../js/src/configure"
+                       (cons (string-append "--prefix=" #$output)
+                             configure-flags))))
+            (replace 'adjust-tests
+              (lambda _
+                (with-directory-excursion "../js/src/tests"
+                  ;; The test suite expects a lightly patched ICU 67.  Since
+                  ;; Guix is about to switch to ICU 68, massage the tests to
+                  ;; work with that instead of patching ICU.  Try removing this
+                  ;; phase for newer versions of mozjs.
+
+                  ;; These tests look up locale names and expects to get
+                  ;; "GB" instead of "UK".
+                  (substitute* "non262/Intl/DisplayNames/language.js"
+                    (("Traditionell, GB")
+                     "Traditionell, UK"))
+                  (substitute* "non262/Intl/DisplayNames/region.js"
+                    (("\"GB\": \"GB\"")
+                     "\"GB\": \"UK\""))
+
+                  ;; XXX: Some localized time formats have changed, and
+                  ;; substitution fails for accented characters, even though
+                  ;; it works in the REPL(?).  Just delete these for now.
+                  (delete-file "non262/Intl/Date/toLocaleString_timeZone.js")
+                  (delete-file "non262/Intl/Date/toLocaleDateString_timeZone.js")
+
+                  ;; Similarly, these get an unexpected "A" suffix when looking
+                  ;; up a time in the "ar-MA-u-ca-islamicc" locale, which is
+                  ;; tricky to substitute.
+                  (delete-file "non262/Intl/DateTimeFormat/format_timeZone.js")
+                  (delete-file "non262/Intl/DateTimeFormat/format.js")
+
+                  ;; This file compares a generated list of ICU locale names
+                  ;; with actual lookups.  Some have changed slightly, i.e.
+                  ;; daf-Latn-ZZ -> daf-Latn-CI, so drop it for simplicity.
+                  (delete-file "non262/Intl/Locale/likely-subtags-generated.js"))))
+            (replace 'pre-check
+              (lambda _
+                (with-directory-excursion "../js/src/tests"
+                  (substitute* "shell/os.js"
+                    ;; FIXME: Why does the killed process have an exit status?
+                    ((".*killed process should not have exitStatus.*")
+                     ""))
+
+                  ;; XXX: Delete all tests that test time zone functionality,
+                  ;; because the test suite uses /etc/localtime to figure out
+                  ;; the offset from the hardware clock, which does not work
+                  ;; in the build container.  See <tests/non262/Date/shell.js>.
+                  (delete-file-recursively "non262/Date")
+                  (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js")
+
+                  (setenv "JSTESTS_EXTRA_ARGS"
+                          (string-join
+                           (list
+                            ;; Do not run tests marked as "random".
+                            "--exclude-random"
+                            ;; Exclude web platform tests.
+                            "--wpt=disabled"
+                            ;; Respect the daemons configured number of jobs.
+                            (string-append "--worker-count="
+                                           (number->string
+                                            (parallel-job-count)))))))))))))
+    (native-inputs
+     (list autoconf-2.13
+           automake
+           llvm                         ;for llvm-objdump
+           perl
+           pkg-config
+           python-3
+           rust
+           `(,rust "cargo")))
+    (inputs
+     (list icu4c readline zlib))))
+
 (define mozilla-compare-locales
   (origin
     (method hg-fetch)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a1503602ad..fc3f3eaaa6 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -29,6 +29,7 @@
 (define-module (gnu packages gstreamer)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
@@ -404,7 +405,7 @@ arrays of data.")
 (define-public gstreamer-docs
   (package
     (name "gstreamer-docs")
-    (version "1.18.5")
+    (version "1.20.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -412,7 +413,7 @@ arrays of data.")
                     "/gstreamer-docs-" version ".tar.xz"))
               (sha256
                (base32
-                "1xvqrqv1zxqdpvd02dvr0xspk30c8b940vvnr9x75a08nx0x75xh"))))
+                "1gziccq5f4fy23q6dm8nwbmzh68gn9rfbqw0xcn4r8yn82545z3k"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -464,7 +465,7 @@ the GStreamer multimedia framework.")
 (define-public gstreamer
   (package
     (name "gstreamer")
-    (version "1.18.5")
+    (version "1.20.3")
     (source
      (origin
        (method url-fetch)
@@ -473,33 +474,12 @@ the GStreamer multimedia framework.")
              version ".tar.xz"))
        (sha256
         (base32
-         "02p8my6dzmm4rvd93s3qnh8w5bm9bh4f7gdydbsvnn9llqr251jm"))))
+         "0aisl8nazcfi4b5j6fz8zwpp0k9csb022zniz65b2pxxpdjayzb0"))))
     (build-system meson-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ,@%common-gstreamer-phases
-         ;; FIXME: Since switching to the meson-build-system, two tests
-         ;; started failing on i686.  See
-         ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/499>.
-         ,@(if (string-prefix? "i686" (or (%current-target-system)
-                                          (%current-system)))
-               `((add-after 'unpack 'disable-some-tests
-                   (lambda _
-                     (substitute* "tests/check/gst/gstsystemclock.c"
-                       (("tcase_add_test \\(tc_chain, test_stress_cleanup_unschedule.*")
-                        "")
-                       (("tcase_add_test \\(tc_chain, test_stress_reschedule.*")
-                        "")))))
-               '())
-         (add-after 'unpack 'disable-problematic-tests
-           (lambda _
-             ;; Disable the 'pipelines-seek' test, which appears to be load
-             ;; sensitive (see:
-             ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/854).
-             (substitute* "tests/check/meson.build"
-               ((".*'pipelines/seek.c'.*")
-                "")))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               #$@%common-gstreamer-phases)))
     (propagated-inputs
      ;; In gstreamer-1.0.pc:
      ;;   Requires: glib-2.0, gobject-2.0
@@ -507,15 +487,14 @@ the GStreamer multimedia framework.")
      (list elfutils ; libdw
            glib libunwind))
     (native-inputs
-     `(("bash-completion" ,bash-completion)
-       ("bison" ,bison)
-       ("flex" ,flex)
-       ("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)))
+     (list bash-completion
+           bison flex
+           gettext-minimal
+           `(,glib "bin")
+           gobject-introspection
+           perl
+           pkg-config
+           python-wrapper))
     (inputs
      (list gmp libcap
            ;; For tests.
@@ -542,7 +521,7 @@ This package provides the core library and elements.")
 (define-public gst-plugins-base
   (package
     (name "gst-plugins-base")
-    (version "1.18.5")
+    (version "1.20.3")
     (source
      (origin
       (method url-fetch)
@@ -550,75 +529,76 @@ This package provides the core library and elements.")
                           name "-" version ".tar.xz"))
       (sha256
        (base32
-        "18vg8kk7p2p8za8zaqg0v7z6898yw5a3b12vvl7xn02pb3s7l2wn"))))
+        "17rw8wj1x1bg153m9z76pdvgz5k93m3riyalfpzq00x7h7fv6c3y"))))
     (build-system meson-build-system)
     (propagated-inputs
-     `(("glib" ,glib)              ;required by gstreamer-sdp-1.0.pc
-       ("gstreamer" ,gstreamer)    ;required by gstreamer-plugins-base-1.0.pc
-       ;; wayland-client.h is referred to in
-       ;; include/gstreamer-1.0/gst/gl/wayland/gstgldisplay_wayland.h
-       ("wayland" ,wayland)
-       ;; XXX: Do not enable Orc optimizations on ARM systems because
-       ;; it leads to two test failures.
-       ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
-       ,@(if (string-prefix? "arm" (or (%current-target-system)
-                                       (%current-system)))
-             '()
-             `(("orc" ,orc)))))         ;required by gstreamer-audio-1.0.pc
+     (cons* glib                    ;required by gstreamer-sdp-1.0.pc
+            gstreamer               ;required by gstreamer-plugins-base-1.0.pc
+            libgudev                ;required by gstreamer-gl-1.0.pc
+            ;; wayland-client.h is referred to in
+            ;; include/gstreamer-1.0/gst/gl/wayland/gstgldisplay_wayland.h
+            wayland
+            ;; XXX: Do not enable Orc optimizations on ARM systems because
+            ;; it leads to two test failures.
+            ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
+            (if (string-prefix? "arm" (or (%current-target-system)
+                                          (%current-system)))
+                '()
+                (list orc))))           ;required by gstreamer-audio-1.0.pc
     (inputs
      ;; TODO: Add libvorbisidec
-     `(("cdparanoia" ,cdparanoia)
-       ("pango" ,pango)
-       ("libogg" ,libogg)
-       ("libtheora" ,libtheora)
-       ("libvorbis" ,libvorbis)
-       ("libx11" ,libx11)
-       ("zlib" ,zlib)
-       ("libXext" ,libxext)
-       ("libxv" ,libxv)
-       ("alsa-lib" ,alsa-lib)
-       ("opus" ,opus)
-       ("graphene" ,graphene)
-       ("iso-codes" ,iso-codes)
-       ("libgudev" ,libgudev)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)
-       ("libvisual" ,libvisual)
-       ("mesa" ,mesa)
-       ("wayland-protocols" ,wayland-protocols)))
+     (list alsa-lib
+           cdparanoia
+           graphene
+           iso-codes
+           libjpeg-turbo
+           libogg
+           libpng
+           libtheora
+           libvisual
+           libvorbis
+           libx11
+           libxext
+           libxv
+           mesa
+           opus
+           pango
+           wayland-protocols
+           zlib))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib:bin" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("python-wrapper" ,python-wrapper)
-       ("gettext" ,gettext-minimal)
-       ("xorg-server" ,xorg-server-for-tests)))
+     (list pkg-config
+           `(,glib "bin")
+           gobject-introspection
+           python-wrapper
+           gettext-minimal
+           xorg-server-for-tests))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ,@%common-gstreamer-phases
-         (add-after 'unpack 'disable-problematic-tests
-           (lambda _
-             (substitute* "tests/check/meson.build"
-               ;; This test causes nondeterministic failures (see:
-               ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/950).
-               ((".*'elements/appsrc.c'.*")
-                ""))))
-         (add-before 'configure 'patch
-           (lambda _
-             (substitute* "tests/check/libs/pbutils.c"
-               (("/bin/sh") (which "sh")))))
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0"))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@%common-gstreamer-phases
+          (add-after 'unpack 'disable-problematic-tests
+            (lambda _
+              (substitute* "tests/check/meson.build"
+                ;; This test causes nondeterministic failures (see:
+                ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/950).
+                ((".*'elements/appsrc.c'.*")
+                 ""))))
+          (add-before 'configure 'patch
+            (lambda _
+              (substitute* "tests/check/libs/pbutils.c"
+                (("/bin/sh") (which "sh")))))
+          (add-before 'check 'pre-check
+            (lambda _
+              ;; Tests require a running X server.
+              (system "Xvfb :1 +extension GLX &")
+              (setenv "DISPLAY" ":1")
+              ;; Tests write to $HOME.
+              (setenv "HOME" (getcwd))
+              ;; Tests look for $XDG_RUNTIME_DIR.
+              (setenv "XDG_RUNTIME_DIR" (getcwd))
+              ;; For missing '/etc/machine-id'.
+              (setenv "DBUS_FATAL_WARNINGS" "0"))))))
     (home-page "https://gstreamer.freedesktop.org/")
     (synopsis
      "Plugins for the GStreamer multimedia library")
@@ -629,7 +609,7 @@ for the GStreamer multimedia library.")
 (define-public gst-plugins-good
   (package
     (name "gst-plugins-good")
-    (version "1.18.5")
+    (version "1.20.3")
     (source
      (origin
        (method url-fetch)
@@ -637,74 +617,87 @@ for the GStreamer multimedia library.")
         (string-append
          "https://gstreamer.freedesktop.org/src/" name "/"
          name "-" version ".tar.xz"))
-       (patches (search-patches "gst-plugins-good-fix-test.patch"))
        (sha256
-        (base32 "0svrapawych2s3lm4lx3x023zxq5kcx50jnfmh0qigszfskyxbis"))))
+        (base32 "1dv8b2md1xk6d45ir1wzbvqhxbvm6mxv881rjl0brnjwpw3c5wzq"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
-       #:phases
-       (modify-phases %standard-phases
-         ,@%common-gstreamer-phases
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0")
-             #t)))))
+     (list
+      #:glib-or-gtk? #t              ; To wrap binaries and/or compile schemas
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@%common-gstreamer-phases
+          (add-after 'unpack 'absolutize-libsoup-library
+            (lambda* (#:key inputs #:allow-other-keys)
+              (define libsoup
+                (search-input-file inputs "lib/libsoup-3.0.so"))
+
+              (substitute* "ext/soup/gstsouploader.c"
+                (("(#define LIBSOUP_3_SONAME ).+$" _ prefix)
+                 (string-append prefix "\"" libsoup "\"\n")))))
+          (add-after 'unpack 'skip-failing-tests
+            (lambda _
+              (substitute* "tests/check/meson.build"
+                ;; Reported as shaky upstream, see
+                ;; <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/785>
+                (("\\[ 'elements/flvmux' \\]") "[ 'elements/flvmux', true ]"))))
+          (add-before 'check 'pre-check
+            (lambda _
+              ;; Tests require a running X server.
+              (system "Xvfb :1 +extension GLX &")
+              (setenv "DISPLAY" ":1")
+              ;; Tests write to $HOME.
+              (setenv "HOME" (getcwd))
+              ;; Tests look for $XDG_RUNTIME_DIR.
+              (setenv "XDG_RUNTIME_DIR" (getcwd))
+              ;; For missing '/etc/machine-id'.
+              (setenv "DBUS_FATAL_WARNINGS" "0"))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)
-       ("xmllint" ,libxml2)
-       ("xorg-server" ,xorg-server-for-tests)))
+     (list gettext-minimal
+           `(,glib "bin")
+           gobject-introspection
+           gsettings-desktop-schemas
+           libxml2
+           perl
+           pkg-config
+           python-wrapper
+           xorg-server-for-tests))
     (inputs
-     `(("aalib" ,aalib)
-       ("bzip2" ,bzip2)
-       ("cairo" ,cairo)
-       ("flac" ,flac)
-       ("librsvg" ,(librsvg-for-system))
-       ("glib" ,glib)
-       ("glib-networking" ,glib-networking)
-       ("glu" ,glu)
-       ("gtk+" ,gtk+)
-       ("jack" ,jack-2)
-       ("lame" ,lame)
-       ("libavc1394" ,libavc1394)
-       ("libcaca" ,libcaca)
-       ("libdv" ,libdv)
-       ("libgudev" ,libgudev)
-       ("libiec61883" ,libiec61883)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)
-       ("libshout" ,libshout)
-       ("libsoup" ,libsoup)
-       ("libvpx" ,libvpx)
-       ("libx11" ,libx11)
-       ("libxdamage" ,libxdamage)
-       ("libxfixes" ,libxfixes)
-       ("libxext" ,libxext)
-       ("libxshm" ,libxshmfence)
-       ("mesa" ,mesa)
-       ("mpg123" ,mpg123)
-       ("orc" ,orc)
-       ("pulseaudio" ,pulseaudio)
-       ("speex" ,speex)
-       ("taglib" ,taglib)
-       ("twolame" ,twolame)
-       ("v4l-utils" ,v4l-utils)
-       ("wavpack" ,wavpack)
-       ("zlib" ,zlib)))
+     (list aalib
+           bzip2
+           cairo
+           flac
+           (librsvg-for-system)
+           glib
+           glib-networking
+           glu
+           gtk+
+           jack-2
+           lame
+           libavc1394
+           libcaca
+           libdv
+           libgudev
+           libiec61883
+           libjpeg-turbo
+           libpng
+           libshout
+           libsoup
+           libvpx
+           libx11
+           libxdamage
+           libxfixes
+           libxext
+           libxshmfence
+           mesa
+           mpg123
+           orc
+           pulseaudio
+           speex
+           taglib
+           twolame
+           v4l-utils
+           wavpack
+           zlib))
     (propagated-inputs
      (list gstreamer gst-plugins-base))
     (synopsis "GStreamer plugins and helper libraries")
@@ -719,14 +712,14 @@ model to base your own plug-in on, here it is.")
 (define-public gst-plugins-bad
   (package
     (name "gst-plugins-bad")
-    (version "1.18.5")
+    (version "1.20.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://gstreamer.freedesktop.org/src/"
                                   name "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "13k7mm2wmsbhd04a20v9lj4afpf0w33ambpwlrw8bl7hjhxr4r51"))
+                "0kys6m5hg5bc30wfg8qa3s7dmkdz3kj1j8lhvn3267fxalxw24bs"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -734,179 +727,177 @@ model to base your own plug-in on, here it is.")
                   (delete-file-recursively "ext/sctp/usrsctp")))))
     (build-system meson-build-system)
     (arguments
-     `(#:configure-flags '("-Dsctp-internal-usrsctp=disabled")
-       #:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
-       #:phases
-       (modify-phases %standard-phases
-         ,@%common-gstreamer-phases
-         ,@(if (string-prefix? "arm" (or (%current-target-system)
-                                         (%current-system)))
-               ;; Disable test that fails on ARMv7.
-               ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
-               `((add-after 'unpack 'disable-asfmux-test
-                   (lambda _
-                     (substitute* "tests/check/meson.build"
-                       (("\\[\\['elements/asfmux\\.c'\\]\\],")
-                        "")))))
-               '())
-         (add-after 'unpack 'adjust-tests
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             (let ((gst-plugins-good (assoc-ref (or native-inputs inputs)
-                                                "gst-plugins-good")))
-               (substitute* "tests/check/meson.build"
-                 ;; Make gst-plugin-good available for tests, see
-                 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1426
-                 (("'GST_PLUGIN_SYSTEM_PATH_1_0', ''")
-                  (string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '"
-                                 gst-plugins-good "/lib/gstreamer-1.0'"))
+     (list
+      #:configure-flags #~(list "-Dsctp-internal-usrsctp=disabled")
+      #:glib-or-gtk? #t              ; To wrap binaries and/or compile schemas
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@%common-gstreamer-phases
+          #$@(if (string-prefix? "arm" (or (%current-target-system)
+                                           (%current-system)))
+                 ;; Disable test that fails on ARMv7.
+                 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
+                 `((add-after 'unpack 'disable-asfmux-test
+                     (lambda _
+                       (substitute* "tests/check/meson.build"
+                         (("\\[\\['elements/asfmux\\.c'\\]\\],")
+                          "")))))
+                 '())
+          (add-after 'unpack 'adjust-tests
+            (lambda* (#:key native-inputs inputs #:allow-other-keys)
+              (let ((gst-plugins-good (assoc-ref (or native-inputs inputs)
+                                                 "gst-plugins-good")))
+                (substitute* "tests/check/meson.build"
+                  ;; Make gst-plugin-good available for tests, see
+                  ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1426
+                  (("'GST_PLUGIN_SYSTEM_PATH_1_0', ''")
+                   (string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '"
+                                  gst-plugins-good "/lib/gstreamer-1.0'"))
 
-                 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136
-                 ((".*elements/msdkh264enc\\.c.*") "")
-                 ((".*elements/svthevcenc\\.c.*") "")
+                  ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136
+                  ((".*elements/msdkh264enc\\.c.*") "")
+                  ((".*elements/svthevcenc\\.c.*") "")
 
-                 ;; The 'elements_shm.test_shm_live' test sometimes times out
-                 ;; (see:
-                 ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790).
-                 ((".*'elements/shm\\.c'.*") "")
+                  ;; The 'elements_shm.test_shm_live' test sometimes times out
+                  ;; (see:
+                  ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790).
+                  ((".*'elements/shm\\.c'.*") "")
 
-                 ;; FIXME: Why is this failing.
-                 ((".*elements/dash_mpd\\.c.*") "")
+                  ;; FIXME: Why is this failing.
+                  ((".*elements/dash_mpd\\.c.*") "")
 
-                 ;; These tests are flaky and occasionally time out:
-                 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/932
-                 ((".*elements/curlhttpsrc\\.c.*") "")
-                 ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412
-                 ((".*elements/dtls\\.c.*") ""))
-               (substitute* "tests/check/elements/zxing.c"
-                 ;; zxing 1.2.0 seemingly changed the type representation of
-                 ;; the EAN_13 structure; disable it.
-                 ((".*\"EAN_13\".*")
-                  "")))))
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0"))))))
+                  ;; These tests are flaky and occasionally time out:
+                  ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/932
+                  ((".*elements/curlhttpsrc\\.c.*") "")
+                  ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412
+                  ((".*elements/dtls\\.c.*") ""))
+                (substitute* "tests/check/elements/zxing.c"
+                  ;; zxing 1.2.0 seemingly changed the type representation of
+                  ;; the EAN_13 structure; disable it.
+                  ((".*\"EAN_13\".*")
+                   "")))))
+          (add-before 'check 'pre-check
+            (lambda _
+              ;; Tests require a running X server.
+              (system "Xvfb :1 +extension GLX &")
+              (setenv "DISPLAY" ":1")
+              ;; Tests write to $HOME.
+              (setenv "HOME" (getcwd))
+              ;; Tests look for $XDG_RUNTIME_DIR.
+              (setenv "XDG_RUNTIME_DIR" (getcwd))
+              ;; For missing '/etc/machine-id'.
+              (setenv "DBUS_FATAL_WARNINGS" "0"))))))
     (propagated-inputs
      (list gstreamer gst-plugins-base))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin")         ; for glib-mkenums, etc.
-       ("gobject-introspection" ,gobject-introspection)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("gst-plugins-good" ,gst-plugins-good) ;for tests
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)
-       ("xorg-server" ,xorg-server-for-tests)))
+     (list gettext-minimal
+           `(,glib "bin")               ; for glib-mkenums, etc.
+           gobject-introspection
+           gsettings-desktop-schemas
+           gst-plugins-good             ;for tests
+           perl
+           pkg-config
+           python-wrapper
+           xorg-server-for-tests))
     (inputs
-     `(("bluez" ,bluez)
-       ("bzip2" ,bzip2)
-       ("cairo" ,cairo)
-       ;; ("ccextractor" ,ccextractor)
-       ("chromaprint" ,chromaprint)
-       ("curl" ,curl)
-       ("directfb" ,directfb)
-       ;;("dssim" ,dssim)
-       ("faac" ,faac)
-       ("faad2" ,faad2)
-       ("flite" ,flite)
-       ("fluidsynth" ,fluidsynth)
-       ("glib" ,glib)
-       ("glib-networking" ,glib-networking)
-       ("glu" ,glu)
-       ("gsm" ,gsm)
-       ("gtk+" ,gtk+)
-       ("iqa" ,iqa)
-       ("ladspa" ,ladspa)
-       ("lcms" ,lcms)
-       ("libaom" ,libaom)
-       ("libass" ,libass)
-       ("libbs2b" ,libbs2b)
-       ("libdc1394" ,libdc1394)
-       ("libdca" ,libdca)
-       ("libde265" ,libde265)
-       ("libdrm" ,libdrm)
-       ("libdvdnav" ,libdvdnav)
-       ("libdvdread" ,libdvdread)
-       ("libexif" ,libexif)
-       ("libfdk" ,libfdk)
-       ("libgcrypt" ,libgcrypt)
-       ("libgme" ,libgme)
-       ("libgudev" ,libgudev)
-       ("libkate" ,libkate)
-       ,@(if (target-x86?)
-           `(("libmfx" ,mediasdk))
-           '())
-       ("libmms" ,libmms)
-       ("libmodplug" ,libmodplug)
-       ("libmpcdec" ,libmpcdec)
-       ("libnice" ,libnice)
-       ("libofa" ,libofa)
-       ("libopenmpt" ,libopenmpt)
-       ("librsvg" ,librsvg)
-       ("libsndfile" ,libsndfile)
-       ("libsrtp" ,libsrtp)
-       ("libssh2" ,libssh2)
-       ("libtiff" ,libtiff)
-       ("libusb" ,libusb)
-       ("libva" ,libva)
-       ("libvdpau" ,libvdpau)
-       ("libwebp" ,libwebp)
-       ("libx11" ,libx11)
-       ("libxcb" ,libxcb)
-       ("libxext" ,libxext)
-       ("libxkbcommon" ,libxkbcommon)
-       ("libxml2" ,libxml2)
-       ("libxshm" ,libxshmfence)
-       ("lilv" ,lilv)
-       ("lrdf" ,lrdf)
-       ("lv2" ,lv2)
-       ("mesa" ,mesa)
-       ("mjpegtools" ,mjpegtools)
-       ("neon" ,neon)
-       ("nettle" ,nettle)
-       ("openal" ,openal)
-       ;; ("opencv" ,opencv)
-       ("openexr" ,openexr)
-       ("openh264" ,openh264)
-       ("openjpeg" ,openjpeg)
-       ;; ("openni2" ,openni2)
-       ("opensles" ,opensles)
-       ("openssl" ,openssl)
-       ("opus" ,opus)
-       ("orc" ,orc)
-       ("pango" ,pango)
-       ("rtmp" ,rtmpdump)
-       ("sbc" ,sbc)
-       ("sctp" ,lksctp-tools)
-       ("soundtouch" ,soundtouch)
-       ("spandsp" ,spandsp)
-       ("srt" ,srt)
-       ,@(if (target-x86?)
-           `(("svthevcenc" ,svt-hevc))
-           '())
-       ("tinyalsa" ,tinyalsa)
-       ("transcode" ,transcode)
-       ("usrsctp" ,usrsctp)
-       ("v4l" ,v4l-utils)
-       ("voaacenc" ,vo-aacenc)
-       ("voamrwbenc" ,vo-amrwbenc)
-       ("vulkan-headers" ,vulkan-headers)
-       ("vulkan-loader" ,vulkan-loader)
-       ("x265" ,x265)
-       ("wayland" ,wayland)
-       ("webrtcdsp" ,webrtc-audio-processing)
-       ("wildmidi" ,wildmidi)
-       ("wpebackend-fdo" ,wpebackend-fdo)
-       ("zbar" ,zbar)
-       ("zxing" ,zxing-cpp-1.2)))
+     (append
+      (if (target-x86?) (list mediasdk svt-hevc) '())
+      (list bluez
+            bzip2
+            cairo
+            ;; ccextractor
+            chromaprint
+            curl
+            directfb
+            ;; dssim
+            faac
+            faad2
+            flite
+            fluidsynth
+            glib
+            glib-networking
+            glu
+            gsm
+            gtk+
+            iqa
+            ladspa
+            lcms
+            libaom
+            libass
+            libbs2b
+            libdc1394
+            libdca
+            libde265
+            libdrm
+            libdvdnav
+            libdvdread
+            libexif
+            libfdk
+            libgcrypt
+            libgme
+            libgudev
+            libkate
+            mediasdk
+            libmms
+            libmodplug
+            libmpcdec
+            libnice
+            libofa
+            libopenmpt
+            librsvg
+            libsndfile
+            libsrtp
+            libssh2
+            libtiff
+            libusb
+            libva
+            libvdpau
+            libwebp
+            libx11
+            libxcb
+            libxext
+            libxkbcommon
+            libxml2
+            libxshmfence
+            lilv
+            lrdf
+            lv2
+            mesa
+            mjpegtools
+            neon
+            nettle
+            openal
+            ;; opencv
+            openexr
+            openh264
+            openjpeg
+            ;; openni2
+            opensles
+            openssl
+            opus
+            orc
+            pango
+            rtmpdump
+            sbc
+            lksctp-tools
+            soundtouch
+            spandsp
+            srt
+            tinyalsa
+            transcode
+            usrsctp
+            v4l-utils
+            vo-aacenc
+            vo-amrwbenc
+            vulkan-headers
+            vulkan-loader
+            x265
+            wayland
+            webrtc-audio-processing
+            wildmidi
+            wpebackend-fdo
+            zbar
+            zxing-cpp-1.2)))
     (home-page "https://gstreamer.freedesktop.org/")
     (synopsis "Plugins for the GStreamer multimedia library")
     (description
@@ -917,7 +908,7 @@ par compared to the rest.")
 (define-public gst-plugins-ugly
   (package
     (name "gst-plugins-ugly")
-    (version "1.18.5")
+    (version "1.20.3")
     (source
      (origin
        (method url-fetch)
@@ -925,33 +916,33 @@ par compared to the rest.")
         (string-append "https://gstreamer.freedesktop.org/src/"
                        name "/" name "-" version ".tar.xz"))
        (sha256
-        (base32 "1nb6kz3gbn8r0sld6xkm16qpgyb2bvhafb7sff9rgagqk0z80cnz"))))
+        (base32 "1zdfsq0zm1d3wj3w3z44bf3v28clr8yd6qzmkjs09hq9k9w21alc"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
-       #:phases
-       (modify-phases %standard-phases
-         ,@%common-gstreamer-phases
-         (add-before 'check 'pre-check
-           (lambda _
-             ;; Tests require a running X server.
-             (system "Xvfb :1 +extension GLX &")
-             (setenv "DISPLAY" ":1")
-             ;; Tests write to $HOME.
-             (setenv "HOME" (getcwd))
-             ;; Tests look for $XDG_RUNTIME_DIR.
-             (setenv "XDG_RUNTIME_DIR" (getcwd))
-             ;; For missing '/etc/machine-id'.
-             (setenv "DBUS_FATAL_WARNINGS" "0"))))))
+     (list #:glib-or-gtk? #t         ; To wrap binaries and/or compile schemas
+           #:phases
+           #~(modify-phases %standard-phases
+               #$@%common-gstreamer-phases
+               (add-before 'check 'pre-check
+                 (lambda _
+                   ;; Tests require a running X server.
+                   (system "Xvfb :1 +extension GLX &")
+                   (setenv "DISPLAY" ":1")
+                   ;; Tests write to $HOME.
+                   (setenv "HOME" (getcwd))
+                   ;; Tests look for $XDG_RUNTIME_DIR.
+                   (setenv "XDG_RUNTIME_DIR" (getcwd))
+                   ;; For missing '/etc/machine-id'.
+                   (setenv "DBUS_FATAL_WARNINGS" "0"))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)
-       ("xorg-server" ,xorg-server-for-tests)))
+     (list gettext-minimal
+           `(,glib "bin")
+           gobject-introspection
+           gsettings-desktop-schemas
+           perl
+           pkg-config
+           python-wrapper
+           xorg-server-for-tests))
     (inputs
      (list glib
            glib-networking
@@ -974,7 +965,7 @@ think twice about shipping them.")
 (define-public gst-libav
   (package
     (name "gst-libav")
-    (version "1.18.5")
+    (version "1.20.3")
     (source
      (origin
        (method url-fetch)
@@ -983,7 +974,7 @@ think twice about shipping them.")
          "https://gstreamer.freedesktop.org/src/" name "/"
          name "-" version ".tar.xz"))
        (sha256
-        (base32 "0j55jgk9sbhinfx2gsg21q609x6yzrixrn5xxlxd378fj6500bl2"))))
+        (base32 "1zkxybdzdkn07wwmj0rrgxyvbry472dggjv2chdsmpzwc02x3v9z"))))
     (build-system meson-build-system)
     (native-inputs
      (list perl pkg-config python-wrapper ruby))
@@ -1000,7 +991,7 @@ decoders, muxers, and demuxers provided by FFmpeg.")
 (define-public gst-editing-services
   (package
     (name "gst-editing-services")
-    (version "1.18.5")
+    (version "1.20.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1008,27 +999,27 @@ decoders, muxers, and demuxers provided by FFmpeg.")
                     "gst-editing-services-" version ".tar.xz"))
               (sha256
                (base32
-                "1x8db4021qv4ypq1g6n5q2awrb7glr4xp1h650c3w7q59lwsix4a"))))
+                "18msiadg6wi1636ylp02yfiwphxlz39gh3vbxchl9qpvd7g9dn2z"))))
     (build-system meson-build-system)
     (arguments
-     ;; FIXME: 16/22 failing tests.
-     `(#:tests? #f
-       #:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
-       #:phases (modify-phases %standard-phases
-                  ,@%common-gstreamer-phases)))
+     (list
+      #:tests? #f                    ; FIXME: 16/23 failing tests.
+      #:glib-or-gtk? #t              ; To wrap binaries and/or compile schemas
+      #:phases #~(modify-phases %standard-phases
+                   #$@%common-gstreamer-phases)))
     (propagated-inputs
      (list gstreamer gst-plugins-base))
     (inputs
      (list glib glib-networking gtk+ libxml2))
     (native-inputs
-     `(("flex" ,flex)
-       ("gobject-introspection" ,gobject-introspection)
-       ("glib:bin" ,glib "bin")
-       ("gst-plugins-bad" ,gst-plugins-bad)
-       ("gst-plugins-good" ,gst-plugins-good)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)))
+     (list flex
+           gobject-introspection
+           `(,glib "bin")
+           gst-plugins-bad
+           gst-plugins-good
+           perl
+           pkg-config
+           python-wrapper))
     (home-page "https://gstreamer.freedesktop.org/")
     (synopsis "GStreamer library for non-linear editors")
     (description
@@ -1043,25 +1034,32 @@ given, also pass them to the build system instead of the ones used by PKG."
     (package/inherit pkg
       (arguments
        (substitute-keyword-arguments (package-arguments pkg)
-         ((#:configure-flags flags `(,@(or configure-flags '())))
-          `(append
+         ((#:configure-flags flags #~'())
+         #~(append
             (list
-             ,@(map (lambda (plugin)
-                      (string-append "-D" plugin "=enabled"))
-                    plugins))
-            (list ,@(or configure-flags flags))))
-          ((#:phases phases)
-           `(modify-phases ,phases
-              (add-after 'unpack 'disable-auto-plugins
-                (lambda _
-                  (substitute* "meson_options.txt"
-                    (("'auto'") "'disabled'"))
-                  #t)))))))))
+             #$@(map (lambda (plugin)
+                       (string-append "-D" plugin "=enabled"))
+                     plugins))
+            #$(or configure-flags flags)))
+         ((#:phases phases)
+           #~(modify-phases #$phases
+               (add-after 'unpack 'disable-auto-plugins
+                 (lambda _
+                   (substitute* "meson_options.txt"
+                     (("'auto'") "'disabled'")))))))))))
+
+(define-public gst-plugins-bad-minimal
+  (package
+    (inherit (gst-plugins/selection gst-plugins-bad #:plugins '()))
+    (name "gst-plugins-bad-minimal")
+    (description "This package provides the smallest selection of GStreamer's
+\"bad\" plugin set, essentially containing libraries and the gst-transcoder
+binary, but none of the actual plugins.")))
 
 (define-public python-gst
   (package
     (name "python-gst")
-    (version "1.18.5")
+    (version "1.20.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1069,18 +1067,19 @@ given, also pass them to the build system instead of the ones used by PKG."
                     "gst-python-" version ".tar.xz"))
               (sha256
                (base32
-                "0lmwwmr3wm56qlrdrb0d5cpmqxkcmarz61wmp1nrv5852f3qadjk"))))
+                "1p6g05k88nbbv5x9madsvphxcdkfl1z0lmp39p6bhmg9x8h82d6v"))))
     (build-system meson-build-system)
     (arguments
-     `(#:modules ((guix build meson-build-system)
+     (list
+      #:modules `((guix build meson-build-system)
                   (guix build utils)
                   ((guix build python-build-system) #:prefix python:))
-       #:imported-modules (,@%meson-build-system-modules
+      #:imported-modules `(,@%meson-build-system-modules
                            (guix build python-build-system))
-       #:configure-flags
-       (list (string-append
-              "-Dpygi-overrides-dir="
-              (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
+      #:configure-flags
+      #~(list (string-append
+               "-Dpygi-overrides-dir="
+               (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
     (native-inputs
      (list pkg-config python))
     (propagated-inputs
@@ -1090,7 +1089,8 @@ given, also pass them to the build system instead of the ones used by PKG."
     (description
      "This package contains GObject Introspection overrides for Python that can
 be used by Python applications using GStreamer.")
-    (license license:lgpl2.1+)))
+    (license license:lgpl2.1+)
+    (properties `((upstream-name . "gst-python")))))
 
 (define-public gst123
   (package
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 5e6e6892aa..c3ef7085a5 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -2243,13 +2243,13 @@ information.")
                              `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
                          (find-files (string-append out "/bin")))))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("itstool" ,itstool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python-wrapper" ,python-wrapper)))
+     (list gettext-minimal
+           `(,glib "bin")
+           gobject-introspection
+           itstool
+           perl
+           pkg-config
+           python-wrapper))
     (inputs
      (list bc
            dblatex
@@ -2263,7 +2263,6 @@ information.")
            python-lxml
            python-parameterized
            python-pygments
-           python-unittest2
            source-highlight
            yelp-tools))
     (home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc")
@@ -2288,8 +2287,8 @@ with some extra work.")
 (define-public gtk-doc/stable
   (hidden-package
    (package/inherit gtk-doc
-     (inputs (alist-replace "dblatex" `(,dblatex/stable)
-                            (package-inputs gtk-doc))))))
+     (inputs (modify-inputs (package-inputs gtk-doc)
+               (replace "dblatex" dblatex/stable))))))
 
 (define-public gtk-engines
   (package
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index effc6eeb1b..8a3c8d44c7 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -408,7 +408,7 @@ libraries are included in this package.")
 (define-public ghc-7
   (package
     (name "ghc")
-    (version "7.10.2")
+    (version "7.10.3")
     (source
      (origin
       (method url-fetch)
@@ -416,7 +416,7 @@ libraries are included in this package.")
                           version "/" name "-" version "-src.tar.xz"))
       (sha256
        (base32
-        "1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal"))))
+        "1vsgmic8csczl62ciz51iv8nhrkm72lyhbz7p7id13y2w7fcx46g"))))
     (build-system gnu-build-system)
     (supported-systems '("i686-linux" "x86_64-linux"))
     (outputs '("out" "doc"))
@@ -432,7 +432,7 @@ libraries are included in this package.")
                  version "/" name "-" version "-testsuite.tar.xz"))
            (sha256
             (base32
-             "0qp9da9ar87zbyn6wjgacd2ic1vgzbi3cklxnhsmjqyafv9qaj4b"))))))
+             "0fk4xjw1x5lk2ifvgqij06lrbf1vxq9qfix86h9r16c0bilm3hah"))))))
     (native-inputs
      `(("perl" ,perl)
        ("python" ,python-2)                ; for tests (fails with python-3)
@@ -444,7 +444,8 @@ libraries are included in this package.")
              ghc-bootstrap-x86_64-7.8.4
              ghc-bootstrap-i686-7.8.4))))
     (arguments
-     `(#:test-target "test"
+     (list
+       #:test-target "test"
        ;; We get a smaller number of test failures by disabling parallel test
        ;; execution.
        #:parallel-tests? #f
@@ -454,117 +455,108 @@ libraries are included in this package.")
        ;; then complains that they don't match.
        #:build #f
 
-       #:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-26)
-                  (srfi srfi-1))
+       #:modules '((guix build gnu-build-system)
+                   (guix build utils)
+                   (srfi srfi-26)
+                   (srfi srfi-1))
        #:configure-flags
-       (list
-        (string-append "--with-gmp-libraries="
-                       (assoc-ref %build-inputs "gmp") "/lib")
-        (string-append "--with-gmp-includes="
-                       (assoc-ref %build-inputs "gmp") "/include")
-        "--with-system-libffi"
-        (string-append "--with-ffi-libraries="
-                       (assoc-ref %build-inputs "libffi") "/lib")
-        (string-append "--with-ffi-includes="
-                       (assoc-ref %build-inputs "libffi") "/include"))
+       #~(list
+           (string-append "--with-gmp-libraries="
+                          (assoc-ref %build-inputs "gmp") "/lib")
+           (string-append "--with-gmp-includes="
+                          (assoc-ref %build-inputs "gmp") "/include")
+           "--with-system-libffi"
+           (string-append "--with-ffi-libraries="
+                          (assoc-ref %build-inputs "libffi") "/lib")
+           (string-append "--with-ffi-includes="
+                          (assoc-ref %build-inputs "libffi") "/include"))
        ;; FIXME: The user-guide needs dblatex, docbook-xsl and docbook-utils.
        ;; Currently we do not have the last one.
        ;; #:make-flags
        ;; (list "BUILD_DOCBOOK_HTML = YES")
        #:phases
-       (let* ((ghc-bootstrap-path
-               (string-append (getcwd) "/" ,name "-" ,version "/ghc-bin"))
-              (ghc-bootstrap-prefix
-               (string-append ghc-bootstrap-path "/usr" )))
-         (alist-cons-after
-          'unpack-bin 'unpack-testsuite-and-fix-bins
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            (with-directory-excursion ".."
-              (copy-file (assoc-ref inputs "ghc-testsuite")
-                         "ghc-testsuite.tar.xz")
-              (invoke "tar" "xvf" "ghc-testsuite.tar.xz"))
-            (substitute*
-                (list "testsuite/timeout/Makefile"
-                      "testsuite/timeout/timeout.py"
-                      "testsuite/timeout/timeout.hs"
-                      "testsuite/tests/rename/prog006/Setup.lhs"
-                      "testsuite/tests/programs/life_space_leak/life.test"
-                      "libraries/process/System/Process/Internals.hs"
-                      "libraries/unix/cbits/execvpe.c")
-              (("/bin/sh") (which "sh"))
-              (("/bin/rm") "rm"))
-            #t)
-          (alist-cons-after
-           'unpack 'unpack-bin
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (mkdir-p ghc-bootstrap-prefix)
-             (with-directory-excursion ghc-bootstrap-path
-               (copy-file (assoc-ref inputs "ghc-binary")
-                          "ghc-bin.tar.xz")
-               (invoke "tar" "xvf" "ghc-bin.tar.xz")))
-           (alist-cons-before
-            'install-bin 'configure-bin
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let* ((binaries
-                      (list
-                       "./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd"
-                       "./utils/hpc/dist-install/build/tmp/hpc"
-                       "./utils/haddock/dist/build/tmp/haddock"
-                       "./utils/hsc2hs/dist-install/build/tmp/hsc2hs"
-                       "./utils/runghc/dist-install/build/tmp/runghc"
-                       "./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal"
-                       "./utils/hp2ps/dist/build/tmp/hp2ps"
-                       "./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg"
-                       "./utils/unlit/dist/build/tmp/unlit"
-                       "./ghc/stage2/build/tmp/ghc-stage2"))
-                     (gmp (assoc-ref inputs "gmp"))
-                     (gmp-lib (string-append gmp "/lib"))
-                     (gmp-include (string-append gmp "/include"))
-                     (ncurses-lib
-                      (dirname (search-input-file inputs "/lib/libncurses.so")))
-                     (ld-so (search-input-file inputs ,(glibc-dynamic-linker)))
-                     (libtinfo-dir
-                      (string-append ghc-bootstrap-prefix
-                                     "/lib/ghc-7.8.4/terminfo-0.4.0.0")))
-                (with-directory-excursion
-                    (string-append ghc-bootstrap-path "/ghc-7.8.4")
-                  (setenv "CONFIG_SHELL" (which "bash"))
-                  (setenv "LD_LIBRARY_PATH" gmp-lib)
-                  ;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded.
-                  (for-each
-                   (cut invoke "patchelf" "--set-interpreter" ld-so <>)
-                   binaries)
-                  ;; The binaries include a reference to libtinfo.so.5 which
-                  ;; is a subset of libncurses.so.5.  We create a symlink in a
-                  ;; directory included in the bootstrap binaries rpath.
-                  (mkdir-p libtinfo-dir)
-                  (symlink
-                   (string-append ncurses-lib "/libncursesw.so."
-                                  ;; Extract "6.0" from "6.0-20170930" if a
-                                  ;; dash-separated version tag exists.
-                                  ,(let* ((v (package-version ncurses))
-                                          (d (or (string-index v #\-)
-                                                 (string-length v))))
-                                     (version-major+minor (string-take v d))))
-                   (string-append libtinfo-dir "/libtinfo.so.5"))
-
-                  (setenv "PATH"
-                          (string-append (getenv "PATH") ":"
-                                         ghc-bootstrap-prefix "/bin"))
-                  (invoke
-                   (string-append (getcwd) "/configure")
-                   (string-append "--prefix=" ghc-bootstrap-prefix)
-                   (string-append "--with-gmp-libraries=" gmp-lib)
-                   (string-append "--with-gmp-includes=" gmp-include)))))
-            (alist-cons-before
-             'configure 'install-bin
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (with-directory-excursion
+       #~(let* ((ghc-bootstrap-path
+                  (string-append (getcwd) "/" #$name "-" #$version "/ghc-bin"))
+                (ghc-bootstrap-prefix
+                  (string-append ghc-bootstrap-path "/usr" )))
+           (modify-phases %standard-phases
+             (add-after 'unpack 'unpack-bin
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                (mkdir-p ghc-bootstrap-prefix)
+                (with-directory-excursion ghc-bootstrap-path
+                  (invoke "tar" "xvf" (assoc-ref inputs "ghc-binary")))))
+             (add-after 'unpack-bin 'unpack-testsuite-and-fix-bins
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (with-directory-excursion ".."
+                   (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite")))
+                 (substitute*
+                   (list "testsuite/timeout/Makefile"
+                         "testsuite/timeout/timeout.py"
+                         "testsuite/timeout/timeout.hs"
+                         "testsuite/tests/rename/prog006/Setup.lhs"
+                         "testsuite/tests/programs/life_space_leak/life.test"
+                         "libraries/process/System/Process/Internals.hs"
+                         "libraries/unix/cbits/execvpe.c")
+                   (("/bin/sh") (search-input-file inputs "/bin/sh"))
+                   (("/bin/rm") "rm"))))
+             (add-before 'configure 'install-bin
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (with-directory-excursion
                    (string-append ghc-bootstrap-path "/ghc-7.8.4")
-                 (invoke "make" "install")))
-             %standard-phases)))))))
+                   (invoke "make" "install"))))
+             (add-before 'install-bin 'configure-bin
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (let* ((binaries
+                          (list
+                            "./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd"
+                            "./utils/hpc/dist-install/build/tmp/hpc"
+                            "./utils/haddock/dist/build/tmp/haddock"
+                            "./utils/hsc2hs/dist-install/build/tmp/hsc2hs"
+                            "./utils/runghc/dist-install/build/tmp/runghc"
+                            "./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal"
+                            "./utils/hp2ps/dist/build/tmp/hp2ps"
+                            "./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg"
+                            "./utils/unlit/dist/build/tmp/unlit"
+                            "./ghc/stage2/build/tmp/ghc-stage2"))
+                        (gmp (assoc-ref inputs "gmp"))
+                        (gmp-lib (string-append gmp "/lib"))
+                        (gmp-include (string-append gmp "/include"))
+                        (ncurses-lib
+                         (dirname (search-input-file inputs "/lib/libncurses.so")))
+                        (ld-so (search-input-file inputs #$(glibc-dynamic-linker)))
+                        (libtinfo-dir
+                         (string-append ghc-bootstrap-prefix
+                                        "/lib/ghc-7.8.4/terminfo-0.4.0.0")))
+                   (with-directory-excursion
+                     (string-append ghc-bootstrap-path "/ghc-7.8.4")
+                     (setenv "CONFIG_SHELL" (which "bash"))
+                     (setenv "LD_LIBRARY_PATH" gmp-lib)
+                     ;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded.
+                     (for-each
+                      (cut invoke "patchelf" "--set-interpreter" ld-so <>)
+                      binaries)
+                     ;; The binaries include a reference to libtinfo.so.5 which
+                     ;; is a subset of libncurses.so.5.  We create a symlink in a
+                     ;; directory included in the bootstrap binaries rpath.
+                     (mkdir-p libtinfo-dir)
+                     (symlink
+                      (string-append ncurses-lib "/libncursesw.so."
+                                     ;; Extract "6.0" from "6.0-20170930" if a
+                                     ;; dash-separated version tag exists.
+                                     #$(let* ((v (package-version ncurses))
+                                              (d (or (string-index v #\-)
+                                                     (string-length v))))
+                                         (version-major+minor (string-take v d))))
+                      (string-append libtinfo-dir "/libtinfo.so.5"))
+
+                     (setenv "PATH"
+                             (string-append (getenv "PATH") ":"
+                                            ghc-bootstrap-prefix "/bin"))
+                     (invoke
+                      (string-append (getcwd) "/configure")
+                      (string-append "--prefix=" ghc-bootstrap-prefix)
+                      (string-append "--with-gmp-libraries=" gmp-lib)
+                      (string-append "--with-gmp-includes=" gmp-include))))))))))
     (native-search-paths (list (search-path-specification
                                 (variable "GHC_PACKAGE_PATH")
                                 (files (list
@@ -595,25 +587,24 @@ interactive environment for the functional language Haskell.")
     (supported-systems '("i686-linux" "x86_64-linux"))
     (outputs '("out" "doc"))
     (inputs
-     `(("gmp" ,gmp)
-       ("ncurses" ,ncurses)
-       ("libffi" ,libffi)
-       ("ghc-testsuite"
-        ,(origin
-           (method url-fetch)
-           (uri (string-append
-                 "https://www.haskell.org/ghc/dist/"
-                 version "/" name "-" version "-testsuite.tar.xz"))
-           (sha256
-            (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj"))))))
+     (list gmp ncurses libffi))
     (native-inputs
      `(("perl" ,perl)
        ("python" ,python-2)                ; for tests
        ("ghostscript" ,ghostscript)        ; for tests
        ;; GHC is built with GHC.
-       ("ghc-bootstrap" ,ghc-7)))
+       ("ghc-bootstrap" ,ghc-7)
+       ("ghc-testsuite"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append
+                  "https://www.haskell.org/ghc/dist/"
+                  version "/" name "-" version "-testsuite.tar.xz"))
+           (sha256
+            (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj")))) ))
     (arguments
-     `(#:test-target "test"
+     (list
+       #:test-target "test"
        ;; We get a smaller number of test failures by disabling parallel test
        ;; execution.
        #:parallel-tests? #f
@@ -624,53 +615,48 @@ interactive environment for the functional language Haskell.")
        #:build #f
 
        #:configure-flags
-       (list
-        (string-append "--with-gmp-libraries="
-                       (assoc-ref %build-inputs "gmp") "/lib")
-        (string-append "--with-gmp-includes="
-                       (assoc-ref %build-inputs "gmp") "/include")
-        "--with-system-libffi"
-        (string-append "--with-ffi-libraries="
-                       (assoc-ref %build-inputs "libffi") "/lib")
-        (string-append "--with-ffi-includes="
-                       (assoc-ref %build-inputs "libffi") "/include")
-        (string-append "--with-curses-libraries="
-                       (assoc-ref %build-inputs "ncurses") "/lib")
-        (string-append "--with-curses-includes="
-                       (assoc-ref %build-inputs "ncurses") "/include"))
+       #~(list
+           (string-append "--with-gmp-libraries="
+                          (assoc-ref %build-inputs "gmp") "/lib")
+           (string-append "--with-gmp-includes="
+                          (assoc-ref %build-inputs "gmp") "/include")
+           "--with-system-libffi"
+           (string-append "--with-ffi-libraries="
+                          (assoc-ref %build-inputs "libffi") "/lib")
+           (string-append "--with-ffi-includes="
+                          (assoc-ref %build-inputs "libffi") "/include")
+           (string-append "--with-curses-libraries="
+                          (assoc-ref %build-inputs "ncurses") "/lib")
+           (string-append "--with-curses-includes="
+                          (assoc-ref %build-inputs "ncurses") "/include"))
        #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-testsuite
-           (lambda* (#:key inputs #:allow-other-keys)
-             (with-directory-excursion ".."
-               (copy-file (assoc-ref inputs "ghc-testsuite")
-                          "ghc-testsuite.tar.xz")
-               (zero? (system* "tar" "xvf" "ghc-testsuite.tar.xz")))))
-         (add-before 'build 'fix-lib-paths
-           (lambda _
-             (substitute*
+       #~(modify-phases %standard-phases
+           (add-after 'unpack 'unpack-testsuite
+             (lambda* (#:key inputs #:allow-other-keys)
+               (with-directory-excursion ".."
+                 (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite")))))
+           (add-before 'build 'fix-lib-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute*
                  (list "libraries/process/System/Process/Posix.hs"
                        "libraries/process/tests/process001.hs"
                        "libraries/process/tests/process002.hs"
                        "libraries/unix/cbits/execvpe.c")
-               (("/bin/sh") (which "sh"))
-               (("/bin/ls") (which "ls")))
-             #t))
-         (add-before 'build 'fix-environment
-           (lambda _
-             (unsetenv "GHC_PACKAGE_PATH")
-             (setenv "CONFIG_SHELL" (which "bash"))
-             #t))
-         (add-before 'check 'fix-testsuite
-           (lambda _
-             (substitute*
+                 (("/bin/sh") (search-input-file inputs "/bin/sh"))
+                 (("/bin/ls") (search-input-file inputs "/bin/ls")))))
+           (add-before 'build 'fix-environment
+             (lambda _
+               (unsetenv "GHC_PACKAGE_PATH")
+               (setenv "CONFIG_SHELL" (which "bash"))))
+           (add-before 'check 'fix-testsuite
+             (lambda _
+               (substitute*
                  (list "testsuite/timeout/Makefile"
                        "testsuite/timeout/timeout.py"
                        "testsuite/timeout/timeout.hs"
                        "testsuite/tests/programs/life_space_leak/life.test")
-               (("/bin/sh") (which "sh"))
-               (("/bin/rm") "rm"))
-             #t)))))
+                 (("/bin/sh") (which "sh"))
+                 (("/bin/rm") "rm")))))))
     (native-search-paths (list (search-path-specification
                                 (variable "GHC_PACKAGE_PATH")
                                 (files (list
@@ -695,13 +681,11 @@ interactive environment for the functional language Haskell.")
                            version "/" name "-" version "-src.tar.xz"))
        (sha256
         (base32 "1ch4j2asg7pr52ai1hwzykxyj553wndg7wq93i47ql4fllspf48i"))))
-    (inputs
-     (list gmp ncurses libffi))
     (native-inputs
      `(("perl" ,perl)
        ("python" ,python)               ; for tests
        ("ghostscript" ,ghostscript)     ; for tests
-       ;; GHC 8.4.3 is built with GHC 8.
+       ;; GHC 8.4.4 is built with GHC >= 8.0.
        ("ghc-bootstrap" ,ghc-8.0)
        ("ghc-testsuite"
         ,(origin
@@ -713,92 +697,39 @@ interactive environment for the functional language Haskell.")
             (base32
              "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))))))
     (arguments
-     `(#:test-target "test"
-       ;; We get a smaller number of test failures by disabling parallel test
-       ;; execution.
-       #:parallel-tests? #f
-
-       ;; Don't pass --build=<triplet>, because the configure script
-       ;; auto-detects slightly different triplets for --host and --target and
-       ;; then complains that they don't match.
-       #:build #f
-
-       #:configure-flags
-       (list
-        (string-append "--with-gmp-libraries="
-                       (assoc-ref %build-inputs "gmp") "/lib")
-        (string-append "--with-gmp-includes="
-                       (assoc-ref %build-inputs "gmp") "/include")
-        "--with-system-libffi"
-        (string-append "--with-ffi-libraries="
-                       (assoc-ref %build-inputs "libffi") "/lib")
-        (string-append "--with-ffi-includes="
-                       (assoc-ref %build-inputs "libffi") "/include")
-        (string-append "--with-curses-libraries="
-                       (assoc-ref %build-inputs "ncurses") "/lib")
-        (string-append "--with-curses-includes="
-                       (assoc-ref %build-inputs "ncurses") "/include"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-testsuite
-           (lambda* (#:key inputs #:allow-other-keys)
-             (invoke "tar" "xvf"
-                     (assoc-ref inputs "ghc-testsuite")
-                     "--strip-components=1")
-             #t))
-         ;; This phase patches the 'ghc-pkg' command so that it sorts the list
-         ;; of packages in the binary cache it generates.
-         (add-before 'build 'fix-ghc-pkg-nondeterminism
-           (lambda _
-             (substitute* "utils/ghc-pkg/Main.hs"
-               (("confs = map \\(path </>\\) \\$ filter \\(\".conf\" `isSuffixOf`\\) fs")
-                "confs = map (path </>) $ filter (\".conf\" `isSuffixOf`) (sort fs)"))
-             #t))
-         (add-after 'unpack-testsuite 'fix-shell-wrappers
-           (lambda _
-             (substitute* '("driver/ghci/ghc.mk"
-                            "utils/mkdirhier/ghc.mk"
-                            "rules/shell-wrapper.mk")
-               (("echo '#!/bin/sh'")
-                (format #f "echo '#!~a'" (which "sh"))))
-             #t))
-         ;; This is necessary because the configure system no longer uses
-         ;; “AC_PATH_” but “AC_CHECK_”, setting the variables to just the
-         ;; plain command names.
-         (add-before 'configure 'set-target-programs
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((binutils (assoc-ref inputs "binutils"))
-                   (gcc (assoc-ref inputs "gcc"))
-                   (ld-wrapper (assoc-ref inputs "ld-wrapper")))
-               (setenv "CC" (string-append gcc "/bin/gcc"))
-               (setenv "CXX" (string-append gcc "/bin/g++"))
-               (setenv "LD" (string-append ld-wrapper "/bin/ld"))
-               (setenv "NM" (string-append binutils "/bin/nm"))
-               (setenv "RANLIB" (string-append binutils "/bin/ranlib"))
-               (setenv "STRIP" (string-append binutils "/bin/strip"))
-               ;; The 'ar' command does not follow the same pattern.
-               (setenv "fp_prog_ar" (string-append binutils "/bin/ar"))
-               #t)))
-         (add-before 'build 'fix-references
-           (lambda _
-             (substitute* '("testsuite/timeout/Makefile"
-                            "testsuite/timeout/timeout.py"
-                            "testsuite/timeout/timeout.hs"
-                            "testsuite/tests/programs/life_space_leak/life.test"
-                            ;; libraries
-                            "libraries/process/System/Process/Posix.hs"
-                            "libraries/process/tests/process001.hs"
-                            "libraries/process/tests/process002.hs"
-                            "libraries/unix/cbits/execvpe.c")
-               (("/bin/sh") (which "sh"))
-               (("/bin/ls") (which "ls"))
-               (("/bin/rm") "rm"))
-             #t))
-         (add-before 'build 'fix-environment
-           (lambda _
-             (unsetenv "GHC_PACKAGE_PATH")
-             (setenv "CONFIG_SHELL" (which "bash"))
-             #t)))))
+     (substitute-keyword-arguments (package-arguments ghc-8.0)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            ;; This phase patches the 'ghc-pkg' command so that it sorts the list
+            ;; of packages in the binary cache it generates.
+            (add-before 'build 'fix-ghc-pkg-nondeterminism
+              (lambda _
+                (substitute* "utils/ghc-pkg/Main.hs"
+                  (("confs = map \\(path </>\\) \\$ filter \\(\".conf\" `isSuffixOf`\\) fs")
+                   "confs = map (path </>) $ filter (\".conf\" `isSuffixOf`) (sort fs)"))))
+            (add-after 'unpack-testsuite 'fix-shell-wrappers
+              (lambda _
+                (substitute* '("driver/ghci/ghc.mk"
+                               "utils/mkdirhier/ghc.mk"
+                               "rules/shell-wrapper.mk")
+                  (("echo '#!/bin/sh'")
+                   (format #f "echo '#!~a'" (which "sh"))))))
+            ;; This is necessary because the configure system no longer uses
+            ;; “AC_PATH_” but “AC_CHECK_”, setting the variables to just the
+            ;; plain command names.
+            (add-before 'configure 'set-target-programs
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((binutils (assoc-ref inputs "binutils"))
+                      (gcc (assoc-ref inputs "gcc"))
+                      (ld-wrapper (assoc-ref inputs "ld-wrapper")))
+                  (setenv "CC" (string-append gcc "/bin/gcc"))
+                  (setenv "CXX" (string-append gcc "/bin/g++"))
+                  (setenv "LD" (string-append ld-wrapper "/bin/ld"))
+                  (setenv "NM" (string-append binutils "/bin/nm"))
+                  (setenv "RANLIB" (string-append binutils "/bin/ranlib"))
+                  (setenv "STRIP" (string-append binutils "/bin/strip"))
+                  ;; The 'ar' command does not follow the same pattern.
+                  (setenv "fp_prog_ar" (string-append binutils "/bin/ar")))))))))
     (native-search-paths (list (search-path-specification
                                 (variable "GHC_PACKAGE_PATH")
                                 (files (list
@@ -838,10 +769,10 @@ interactive environment for the functional language Haskell.")
     (arguments
      (substitute-keyword-arguments (package-arguments ghc-8.4)
        ((#:make-flags make-flags ''())
-        `(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests"
-               ,make-flags))
+        #~(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests"
+                #$make-flags))
        ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
+        #~(modify-phases #$phases
            (add-after 'install 'remove-unnecessary-references
              (lambda* (#:key outputs #:allow-other-keys)
                (substitute* (find-files (string-append (assoc-ref outputs "out") "/lib/")
@@ -866,8 +797,7 @@ interactive environment for the functional language Haskell.")
                                     (new    (string-append out subdir)))
                                (mkdir-p (dirname new))
                                (rename-file haddock-file new)))
-                           (find-files doc "\\.haddock$")))
-               #t))
+                           (find-files doc "\\.haddock$")))))
            (add-after 'unpack-testsuite 'skip-tests
              (lambda _
                ;; These two tests refer to the root user, which doesn't exist
@@ -875,8 +805,7 @@ interactive environment for the functional language Haskell.")
                (substitute* "libraries/unix/tests/all.T"
                  (("^test\\('T8108'") "# guix skipped: test('T8108'"))
                (substitute* "libraries/unix/tests/libposix/all.T"
-                 (("^test\\('posix010'") "# guix skipped: test('posix010'"))
-               #t))))))
+                 (("^test\\('posix010'") "# guix skipped: test('posix010'"))))))))
     (native-search-paths (list (search-path-specification
                                 (variable "GHC_PACKAGE_PATH")
                                 (files (list
@@ -916,19 +845,17 @@ interactive environment for the functional language Haskell.")
     (arguments
      (substitute-keyword-arguments (package-arguments ghc-8.6)
        ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-after 'fix-references 'fix-cc-reference
+        #~(modify-phases #$phases
+           (add-before 'build 'fix-cc-reference
              (lambda _
                (substitute* "utils/hsc2hs/Common.hs"
-                 (("\"cc\"") "\"gcc\""))
-               #t))
+                 (("\"cc\"") "\"gcc\""))))
            (add-after 'unpack-testsuite 'skip-more-tests
              (lambda _
                ;; XXX: This test fails because our ld-wrapper script
                ;; mangles the response file passed to the linker.
                (substitute* "testsuite/tests/hp2ps/all.T"
-                 (("^test\\('T15904'") "# guix skipped: test('T15904'"))
-               #t))))))
+                 (("^test\\('T15904'") "# guix skipped: test('T15904'"))))))))
     (native-search-paths (list (search-path-specification
                                 (variable "GHC_PACKAGE_PATH")
                                 (files (list
@@ -949,7 +876,8 @@ interactive environment for the functional language Haskell.")
        (sha256
         (base32 "179ws2q0dinl1a39wm9j37xzwm84zfz3c5543vz8v479khigdvp3"))))
     (native-inputs
-     `(("ghc-bootstrap" ,ghc-8.8)
+     `(;; GHC 8.10.7 must be built with GHC >= 8.6.
+       ("ghc-bootstrap" ,ghc-8.6)
        ("ghc-testsuite"
         ,(origin
            (method url-fetch)
@@ -969,7 +897,7 @@ interactive environment for the functional language Haskell.")
     (arguments
      (substitute-keyword-arguments (package-arguments ghc-8.8)
        ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
+        #~(modify-phases #$phases
            (add-after 'unpack-testsuite 'patch-more-shebangs
              (lambda* (#:key inputs #:allow-other-keys)
                (let ((bash (assoc-ref inputs "bash")))
@@ -983,20 +911,16 @@ interactive environment for the functional language Haskell.")
                  (("extra_files" all) (string-append "[" all))
                  (("\\]\\), " all)
                   (string-append all "expect_broken(0)], ")))))
-           ;; TODO: Turn this into an undconditional patch on the next rebuild.
-           ,@(if (string-prefix? "i686" (or (%current-target-system)
-                                                  (%current-system)))
-              '((add-after 'skip-more-tests 'skip-failing-tests-i686
-                 (lambda _
-                   (substitute* '("testsuite/tests/codeGen/should_compile/all.T")
-                     (("(test\\('T15155l', )when\\(unregisterised\\(\\), skip\\)" all before)
-                      (string-append before "when(arch('i386'), skip)")))
-                   ;; Unexpected failures:
-                   ;;    quasiquotation/T14028.run  T14028 [bad stderr] (dyn)
-                   (substitute* '("testsuite/tests/quasiquotation/all.T")
-                     (("unless\\(config.have_ext_interp, skip\\),")
-                      "unless(config.have_ext_interp, skip), when(arch('i386'), skip),")))))
-              '())))))
+           (add-after 'skip-more-tests 'skip-failing-tests-i686
+             (lambda _
+               (substitute* '("testsuite/tests/codeGen/should_compile/all.T")
+                 (("(test\\('T15155l', )when\\(unregisterised\\(\\), skip\\)" all before)
+                  (string-append before "when(arch('i386'), skip)")))
+               ;; Unexpected failures:
+               ;;    quasiquotation/T14028.run  T14028 [bad stderr] (dyn)
+               (substitute* '("testsuite/tests/quasiquotation/all.T")
+                 (("unless\\(config.have_ext_interp, skip\\),")
+                  "unless(config.have_ext_interp, skip), when(arch('i386'), skip),"))))))))
     (native-search-paths (list (search-path-specification
                                 (variable "GHC_PACKAGE_PATH")
                                 (files (list
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index e679a73f9d..557a89aa6b 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -979,7 +979,7 @@ Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.")
 (define-public imlib2
   (package
     (name "imlib2")
-    (version "1.9.0")
+    (version "1.9.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -987,7 +987,7 @@ Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.")
                     "/imlib2-" version ".tar.xz"))
               (sha256
                (base32
-                "0l662h74i3mzl5ligj1352rf8bf48drasj97wygr2037gk5fijas"))))
+                "0hsdfs7wa5f7fwb5nfgqzvf29bp59rgy0i0c4m6mvgpzpww408ja"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags (list "--disable-static")))
@@ -1274,7 +1274,7 @@ language bindings to VIGRA.")
 (define-public libwebp
   (package
     (name "libwebp")
-    (version "1.2.0")
+    (version "1.2.2")
     (source
      (origin
        ;; No tarballs are provided for >0.6.1.
@@ -1285,14 +1285,14 @@ language bindings to VIGRA.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1rgblphsd56033w7lpkrzl7m5w0fi7wavxri1ayzlg8fhpmmqp4k"))))
+         "1khqkm5j9aiii9jfsbxzzyz3x33sifzcx537cyjyb3a2g2rl969k"))))
     (build-system gnu-build-system)
     (inputs
-     `(("freeglut" ,freeglut)
-       ("giflib" ,giflib)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)
-       ("libtiff" ,libtiff)))
+     (list freeglut
+           giflib
+           libjpeg-turbo
+           libpng
+           libtiff))
     (native-inputs
      (list autoconf automake libtool))
     (arguments
@@ -1327,9 +1327,7 @@ channels.")
     (build-system gnu-build-system)
     (propagated-inputs
      ;; These are all in the 'Libs.private' field of libmng.pc.
-     `(("lcms" ,lcms)
-       ("libjpeg" ,libjpeg-turbo)
-       ("zlib" ,zlib)))
+     (list lcms libjpeg-turbo zlib))
     (home-page "https://www.libmng.com/")
     (synopsis "Library for handling MNG files")
     (description
diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm
index f8775c5eaa..95ab9ca44f 100644
--- a/gnu/packages/iso-codes.scm
+++ b/gnu/packages/iso-codes.scm
@@ -46,19 +46,8 @@
               (base32
                "1q6x9c5x4x0x4q11iygldsmxdyzhz1mb4n8im76glwsgqsqyjs80"))))
     (build-system gnu-build-system)
-    ;; TODO(staging): Unconditionally move inputs to native-inputs.
     (native-inputs
-     (if (%current-target-system)
-         `(("python" ,python-wrapper)
-           ("perl" ,perl)
-           ("gettext" ,gettext-minimal))
-         '()))
-    (inputs
-     `(,@(if (%current-target-system)
-             '()
-             `(("gettext" ,gettext-minimal)
-               ("perl" ,perl)
-               ("python" ,python-wrapper)))))
+     (list gettext-minimal perl python-wrapper))
     (synopsis "Various ISO standards")
     (description
      "This package provides lists of various ISO standards (e.g. country,
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 99a07ceaac..6d16e6a03b 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -82,13 +82,13 @@ conversions for values passed between the two languages.")
 (define-public python-cffi
   (package
     (name "python-cffi")
-    (version "1.14.4")
+    (version "1.15.1")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "cffi" version))
       (sha256
-       (base32 "0v080s7vlrjz9z823x2yh36yc8drwpvvir6w8wfkkzd7k2z5qihs"))))
+       (base32 "1y9lr651svbzf1m03s4lqbnbv2byx8f6f0ml7hjm24vvlfwvy06l"))))
     (build-system python-build-system)
     (inputs
      (list libffi))
@@ -118,9 +118,8 @@ conversions for values passed between the two languages.")
              ;; using find_library or the like with their name fail when the
              ;; resolved .so object is a linker script rather than an ELF
              ;; binary (this is a limitation of the ctype library of Python).
-             (let* ((glibc (assoc-ref inputs "libc"))
-                    (libm (string-append glibc "/lib/libm.so.6"))
-                    (libc (string-append glibc "/lib/libc.so.6")))
+             (let ((libm (search-input-file inputs "lib/libm.so.6"))
+                   (libc (search-input-file inputs "lib/libc.so.6")))
                (substitute* '("testing/cffi0/test_function.py"
                               "testing/cffi0/test_parsing.py"
                               "testing/cffi0/test_unicode_literals.py"
@@ -140,18 +139,6 @@ conversions for values passed between the two languages.")
     (description "Foreign Function Interface for Python calling C code.")
     (license expat)))
 
-;; TODO(staging): Merge with the above.
-(define-public python-cffi-1.15
-  (package
-    (inherit python-cffi)
-    (version "1.15.0")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "cffi" version))
-      (sha256
-       (base32 "0m3rz2pqfmyfagx0bhj2jlbr2h58j3wr3cyv1agxkhlnm1k0s3wj"))))))
-
 (define-public python-cffi-documentation
   (package
     (name "python-cffi-documentation")
diff --git a/gnu/packages/libunwind.scm b/gnu/packages/libunwind.scm
index 03412edd25..5e690cf21c 100644
--- a/gnu/packages/libunwind.scm
+++ b/gnu/packages/libunwind.scm
@@ -2,6 +2,8 @@
 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,20 +30,20 @@
 (define-public libunwind
   (package
     (name "libunwind")
-    (version "1.5.0")
+    (version "1.6.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://savannah/libunwind/libunwind-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "05qhzcg1xag3l5m3c805np6k342gc0f3g087b7g16jidv59pccwh"))))
+               "0xj9g6a9q7v7zz6lymf3f6011synibgawi4wi384bywid5kfqsja"))))
     (build-system gnu-build-system)
     (arguments
-     ;; FIXME: As of glibc 2.25, we get 1 out of 34 test failures (2 are
-     ;; expected to fail).
-     ;; Report them upstream.
-     '(#:tests? #f))
+     '(#:make-flags
+       ;; Two tests are failing with newer toolchains:
+       ;; https://github.com/libunwind/libunwind/issues/363
+       '("XFAIL_TESTS=run-coredump-unwind run-coredump-unwind-mdi")))
     (home-page "https://www.nongnu.org/libunwind")
     (synopsis "Determining the call chain of a program")
     (description
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d8f1f6912e..d19d6b754f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5344,7 +5344,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
 (define-public bluez
   (package
     (name "bluez")
-    (version "5.61")
+    (version "5.64")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -5352,53 +5352,49 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "0fs2kjsdhylxniqhii63i85fjszbqbz3iddwmgz4nmbr472xdbw3"))))
+                "0d6yl7l5zrlx5w3y503k72m9xsydx6gi1c65icchq1xknrjpwhxf"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
-       (let ((out (assoc-ref %outputs "out")))
-         (list "--sysconfdir=/etc"
-               "--localstatedir=/var"
-               "--enable-library"
-               "--disable-systemd"
-               ;; TODO: is this needed?  Not installed by default since 5.55.
-               "--enable-hid2hci"
-               ;; Install dbus/udev files to the correct location.
-               (string-append "--with-dbusconfdir=" out "/etc")
-               (string-append "--with-udevdir=" out "/lib/udev")))
-       #:phases
-       (modify-phases %standard-phases
-         ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
-         ;; issue (discussion on upstream mailing list:
-         ;; https://marc.info/?t=149578476300002&r=1&w=2)
-         (add-before 'check 'skip-wonky-test
+     (list
+      #:configure-flags
+      #~(list "--sysconfdir=/etc"
+              "--localstatedir=/var"
+              "--enable-library"
+              "--disable-systemd"
+              ;; TODO: is this needed?  Not installed by default since 5.55.
+              "--enable-hid2hci"
+              ;; Install dbus/udev files to the correct location.
+              (string-append "--with-dbusconfdir=" #$output "/etc")
+              (string-append "--with-udevdir=" #$output "/lib/udev"))
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
+          ;; issue (discussion on upstream mailing list:
+          ;; https://marc.info/?t=149578476300002&r=1&w=2)
+          (add-before 'check 'skip-wonky-test
             (lambda _
               (substitute* "unit/test-gatt.c"
-                (("tester_init\\(&argc, &argv\\);") "return 77;"))
-              #t))
-         (add-after 'install 'post-install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out        (assoc-ref outputs "out"))
-                    (servicedir (string-append out "/share/dbus-1/services"))
-                    (service    "obexd/src/org.bluez.obex.service")
-                    (rule       (string-append
-                                 out "/lib/udev/rules.d/97-hid2hci.rules")))
-               ;; Install the obex dbus service file.
-               (substitute* service
-                 (("/bin/false")
-                  (string-append out "/libexec/bluetooth/obexd")))
-               (install-file service servicedir)
-               ;; Fix paths in the udev rule.
-               (substitute* rule
-                 (("hid2hci --method")
-                  (string-append out "/lib/udev/hid2hci --method"))
-                 (("/sbin/udevadm")
-                  (search-input-file inputs "/bin/udevadm")))
-               #t))))))
+                (("tester_init\\(&argc, &argv\\);") "return 77;"))))
+          (add-after 'install 'post-install
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((out        #$output)
+                     (servicedir (string-append out "/share/dbus-1/services"))
+                     (service    "obexd/src/org.bluez.obex.service")
+                     (rule       (string-append
+                                  out "/lib/udev/rules.d/97-hid2hci.rules")))
+                ;; Install the obex dbus service file.
+                (substitute* service
+                  (("/bin/false")
+                   (string-append out "/libexec/bluetooth/obexd")))
+                (install-file service servicedir)
+                ;; Fix paths in the udev rule.
+                (substitute* rule
+                  (("hid2hci --method")
+                   (string-append out "/lib/udev/hid2hci --method"))
+                  (("/sbin/udevadm")
+                   (search-input-file inputs "/bin/udevadm")))))))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("rst2man" ,python-docutils)
-       ("gettext" ,gettext-minimal)))
+     (list pkg-config python-docutils gettext-minimal))
     (inputs
      (list glib dbus eudev libical readline))
     (home-page "http://www.bluez.org/")
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 72d5e9a83a..94e14c8e49 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4873,7 +4873,7 @@ Fresnel integrals, and similar related functions as well.")
 (define-public suitesparse
   (package
     (name "suitesparse")
-    (version "5.10.1")
+    (version "5.12.0")
     (source
      (origin
        (method git-fetch)
@@ -4883,7 +4883,7 @@ Fresnel integrals, and similar related functions as well.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "19gx5wlgqnqpgz6mvam9lalyzpbfwgqhppps8z3np9sh0mgaiyw9"))
+         "0zpl51pfpv7ap7z97jlryba2la1qdmzm11bhzkn55wlb03xzi6k6"))
        (patches (search-patches "suitesparse-mongoose-cmake.patch"))
        (modules '((guix build utils)))
        (snippet
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 5e719ad5b8..0d18592be4 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -40,52 +40,52 @@
 (define-public nspr
   (package
     (name "nspr")
-    (version "4.31")
+    (version "4.34")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
-                   version "/src/nspr-" version ".tar.gz"))
-             (sha256
-              (base32
-               "1j5b2m8cjlhnnv8sq34587avaagkqvh521w4f95miwgvsn3xlaap"))))
+              (method url-fetch)
+              (uri (string-append
+                    "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
+                    version "/src/nspr-" version ".tar.gz"))
+              (sha256
+               (base32
+                "177rxcf3lglabs7sgwcvf72ww4v56qa71lc495wl13sxs4f03vxy"))))
     (build-system gnu-build-system)
     (inputs
-     ;; For 'compile-et.pl' and 'nspr-config'.
-     (list perl ;for 'compile-et.pl'
-           bash-minimal)) ;for 'nspr-config'
+     (list perl                         ;for 'compile-et.pl'
+           bash-minimal))               ;for 'nspr-config'
     (native-inputs
      (list perl))
     (arguments
-     `(;; Prevent the 'native' perl from sneaking into the closure.
-       ;; XXX it would be nice to do the same for 'bash-minimal',
-       ;; but using 'canonical-package' causes loops.
-       ,@(if (%current-target-system)
-             `(#:disallowed-references
-               (,(gexp-input (this-package-native-input "perl") #:native? #t)))
-             '())
-       #:tests? #f ; no check target
-       #:configure-flags
-       (list "--disable-static"
-             "--enable-64bit"
-             (string-append "LDFLAGS=-Wl,-rpath="
-                            (assoc-ref %outputs "out") "/lib")
-             ;; Mozilla deviates from Autotools conventions
-             ;; due to historical reasons.  Adjust to Mozilla conventions,
-             ;; otherwise the Makefile will try to use TARGET-gcc
-             ;; as a ‘native’ compiler.
-             ,@(if (%current-target-system)
-                   `(,(string-append "--host="
-                                     (nix-system->gnu-triplet (%current-system)))
-                     ,(string-append "--target=" (%current-target-system)))
-                   '()))
-       ;; Use fixed timestamps for reproducibility.
-       #:make-flags '("SH_DATE='1970-01-01 00:00:01'"
-                      ;; This is epoch 1 in microseconds.
-                      "SH_NOW=100000")
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'chdir
-                    (lambda _ (chdir "nspr") #t)))))
+     (list
+      ;; Prevent the 'native' perl from sneaking into the closure.
+      ;; XXX it would be nice to do the same for 'bash-minimal',
+      ;; but using 'canonical-package' causes loops.
+      #:disallowed-references
+      (if (%current-target-system)
+          (list (gexp-input (this-package-native-input "perl") #:native? #t))
+          #f)
+      #:tests? #f                       ;no check target
+      #:configure-flags
+      #~(list "--disable-static"
+              "--enable-64bit"
+              (string-append "LDFLAGS=-Wl,-rpath="
+                             (assoc-ref %outputs "out") "/lib")
+              ;; Mozilla deviates from Autotools conventions
+              ;; due to historical reasons.  Adjust to Mozilla conventions,
+              ;; otherwise the Makefile will try to use TARGET-gcc
+              ;; as a ‘native’ compiler.
+              #$@(if (%current-target-system)
+                     #~((string-append "--host="
+                                       #$(nix-system->gnu-triplet (%current-system)))
+                        (string-append "--target=" #$(%current-target-system)))
+                     #~()))
+      ;; Use fixed timestamps for reproducibility.
+      #:make-flags #~'("SH_DATE='1970-01-01 00:00:01'"
+                       ;; This is epoch 1 in microseconds.
+                       "SH_NOW=100000")
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'configure 'chdir
+                     (lambda _ (chdir "nspr") #t)))))
     (home-page
      "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR")
     (synopsis "Netscape API for system level and libc-like functions")
@@ -112,7 +112,7 @@ in the Mozilla clients.")
     (name "nss")
     ;; Also update and test the nss-certs package, which duplicates version and
     ;; source to avoid a top-level variable reference & module cycle.
-    (version "3.72")
+    (version "3.81")
     (source (origin
               (method url-fetch)
               (uri (let ((version-with-underscores
@@ -123,7 +123,7 @@ in the Mozilla clients.")
                       "nss-" version ".tar.gz")))
               (sha256
                (base32
-                "0bnh683nij6s0gvjcgwhyw5d3yx9fpm42pxj5bm97r0ky6ghm9kf"))
+                "19ncvhz45dhr0nmymwkxspq9l44gaafkspxiwxbqs1hpnqxmzgx8"))
               ;; Create nss.pc and nss-config.
               (patches (search-patches "nss-3.56-pkgconfig.patch"
                                        "nss-getcwd-nonnull.patch"
@@ -137,82 +137,84 @@ in the Mozilla clients.")
     (build-system gnu-build-system)
     (outputs '("out" "bin"))
     (arguments
-     `(#:make-flags
-       (let* ((out (assoc-ref %outputs "out"))
-              (nspr (string-append (assoc-ref %build-inputs "nspr")))
-              (rpath (string-append "-Wl,-rpath=" out "/lib/nss")))
-         (list "-C" "nss" (string-append "PREFIX=" out)
-               "NSDISTMODE=copy"
-               "NSS_USE_SYSTEM_SQLITE=1"
-               ;; The gtests fail to compile on riscv64.
-               ;; Skipping them doesn't affect the test suite.
-               ,@(if (target-riscv64?)
-                   `("NSS_DISABLE_GTESTS=1")
-                   '())
-               (string-append "NSPR_INCLUDE_DIR=" nspr "/include/nspr")
-               ;; Add $out/lib/nss to RPATH.
-               (string-append "RPATH=" rpath)
-               (string-append "LDFLAGS=" rpath)))
-       #:modules ((guix build gnu-build-system)
+     (list
+      #:make-flags
+      #~(let ((rpath (string-append "-Wl,-rpath=" #$output "/lib/nss")))
+          (list "-C" "nss"
+                (string-append "PREFIX=" #$output)
+                "NSDISTMODE=copy"
+                "NSS_USE_SYSTEM_SQLITE=1"
+                ;; The gtests fail to compile on riscv64.
+                ;; Skipping them doesn't affect the test suite.
+                #$@(if (target-riscv64?)
+                       #~("NSS_DISABLE_GTESTS=1")
+                       #~())
+                (string-append "NSPR_INCLUDE_DIR="
+                               (search-input-directory %build-inputs
+                                                       "include/nspr"))
+                ;; Add $out/lib/nss to RPATH.
+                (string-append "RPATH=" rpath)
+                (string-append "LDFLAGS=" rpath)))
+      #:modules '((guix build gnu-build-system)
                   (guix build utils)
                   (ice-9 ftw)
                   (ice-9 match)
                   (srfi srfi-26))
-       #:tests? ,(not (or (%current-target-system)
-                          ;; Tests take more than 30 hours on riscv64-linux.
-                          (target-riscv64?)))
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda _
-             (setenv "CC" ,(cc-for-target))
-             ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
-             ,@(if (target-64bit?)
-                   `((setenv "USE_64" "1"))
-                   '())))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (if tests?
-                 (begin
-                   ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for
-                   ;; testing.  The latter requires a working DNS or /etc/hosts.
-                   (setenv "DOMSUF" "localdomain")
-                   (setenv "USE_IP" "TRUE")
-                   (setenv "IP_ADDRESS" "127.0.0.1")
+      #:tests? (not (or (%current-target-system)
+                        ;; Tests take more than 30 hours on riscv64-linux.
+                        (target-riscv64?)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda _
+              (setenv "CC" #$(cc-for-target))
+              ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
+              #$@(if (target-64bit?)
+                     #~((setenv "USE_64" "1"))
+                     #~())))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (if tests?
+                  (begin
+                    ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for
+                    ;; testing.  The latter requires a working DNS or /etc/hosts.
+                    (setenv "DOMSUF" "localdomain")
+                    (setenv "USE_IP" "TRUE")
+                    (setenv "IP_ADDRESS" "127.0.0.1")
 
-                   ;; The "PayPalEE.cert" certificate expires every six months,
-                   ;; leading to test failures:
-                   ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>.  To
-                   ;; work around that, set the time to roughly the release date.
-                   (invoke "faketime" "2021-09-30" "./nss/tests/all.sh"))
-                 (format #t "test suite not run~%"))))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append (assoc-ref outputs "bin") "/bin"))
-                    (inc (string-append out "/include/nss"))
-                    (lib (string-append out "/lib/nss"))
-                    (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
-                           ((obj) (string-append "dist/" obj)))))
-               ;; Install nss-config to $out/bin.
-               (install-file (string-append obj "/bin/nss-config")
-                             (string-append out "/bin"))
-               (delete-file (string-append obj "/bin/nss-config"))
-               ;; Install nss.pc to $out/lib/pkgconfig.
-               (install-file (string-append obj "/lib/pkgconfig/nss.pc")
-                             (string-append out "/lib/pkgconfig"))
-               (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
-               (rmdir (string-append obj "/lib/pkgconfig"))
-               ;; Install other files.
-               (copy-recursively "dist/public/nss" inc)
-               (copy-recursively (string-append obj "/bin") bin)
-               (copy-recursively (string-append obj "/lib") lib)))))))
+                    ;; The "PayPalEE.cert" certificate expires every six months,
+                    ;; leading to test failures:
+                    ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>.  To
+                    ;; work around that, set the time to roughly the release date.
+                    (invoke "faketime" "2022-06-01" "./nss/tests/all.sh"))
+                  (format #t "test suite not run~%"))))
+          (replace 'install
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (bin (string-append (assoc-ref outputs "bin") "/bin"))
+                     (inc (string-append out "/include/nss"))
+                     (lib (string-append out "/lib/nss"))
+                     (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
+                            ((obj) (string-append "dist/" obj)))))
+                ;; Install nss-config to $out/bin.
+                (install-file (string-append obj "/bin/nss-config")
+                              (string-append out "/bin"))
+                (delete-file (string-append obj "/bin/nss-config"))
+                ;; Install nss.pc to $out/lib/pkgconfig.
+                (install-file (string-append obj "/lib/pkgconfig/nss.pc")
+                              (string-append out "/lib/pkgconfig"))
+                (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
+                (rmdir (string-append obj "/lib/pkgconfig"))
+                ;; Install other files.
+                (copy-recursively "dist/public/nss" inc)
+                (copy-recursively (string-append obj "/bin") bin)
+                (copy-recursively (string-append obj "/lib") lib)))))))
     (inputs
      (list sqlite zlib))
     (propagated-inputs
-     (list nspr))                 ;required by nss.pc.
+     (list nspr))                       ;required by nss.pc.
     (native-inputs
-     (list perl libfaketime))   ;for tests
+     (list perl libfaketime))           ;for tests
 
     ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
     ;; another build is happening concurrently on the same machine.
diff --git a/gnu/packages/patches/freeglut-gcc-compat.patch b/gnu/packages/patches/freeglut-gcc-compat.patch
deleted file mode 100644
index 126bbd89f4..0000000000
--- a/gnu/packages/patches/freeglut-gcc-compat.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Fix build failure with GCC 10.
-
-Taken from upstream:
-https://github.com/dcnieho/FreeGLUT/commit/b9998bbc1e1c329f6bf69c24606a2be7a4973b8c
-
-diff --git a/src/fg_gl2.c b/src/fg_gl2.c
---- a/src/fg_gl2.c
-+++ b/src/fg_gl2.c
-@@ -27,6 +27,20 @@
- #include "fg_internal.h"
- #include "fg_gl2.h"
- 
-+#ifndef GL_ES_VERSION_2_0
-+/* GLES2 has the corresponding entry points built-in, and these fgh-prefixed
-+ * names are defined in fg_gl2.h header to reference them, for any other case,
-+ * define them as function pointers here.
-+ */
-+FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
-+FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
-+FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
-+FGH_PFNGLBUFFERDATAPROC fghBufferData;
-+FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
-+FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
-+FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
-+#endif
-+
- void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) {
-   if (fgStructure.CurrentWindow != NULL)
-     fgStructure.CurrentWindow->Window.attribute_v_coord = attrib;
-diff --git a/src/fg_gl2.h b/src/fg_gl2.h
---- a/src/fg_gl2.h
-+++ b/src/fg_gl2.h
-@@ -67,13 +67,13 @@ typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
- typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
- typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
- 
--FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
--FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
--FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
--FGH_PFNGLBUFFERDATAPROC fghBufferData;
--FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
--FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
--FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
-+extern FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
-+extern FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
-+extern FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
-+extern FGH_PFNGLBUFFERDATAPROC fghBufferData;
-+extern FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
-+extern FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
-+extern FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
- 
- #    endif
- 
diff --git a/gnu/packages/patches/gst-plugins-good-fix-test.patch b/gnu/packages/patches/gst-plugins-good-fix-test.patch
deleted file mode 100644
index 38ec0ba802..0000000000
--- a/gnu/packages/patches/gst-plugins-good-fix-test.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-Fix a broken test:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803
-
-Patches copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/f5310ce346180a717f091f2f09bcbb3ddfb15436
-
-From 2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
-Date: Thu, 12 Nov 2020 23:38:21 +0000
-Subject: [PATCH 1/2] tests: qtdemux: fix crash on 32-bit architectures
-
-Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/815>
----
- tests/check/elements/qtdemux.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c
-index 5271c6576..0c748278b 100644
---- a/tests/check/elements/qtdemux.c
-+++ b/tests/check/elements/qtdemux.c
-@@ -797,9 +797,10 @@ GST_START_TEST (test_qtdemux_pad_names)
-       "protection-system", G_TYPE_STRING,
-       "9a04f079-9840-4286-ab92-e65be0885f95", NULL);
-   caps =
--      gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING,
--      "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps",
--      GST_TYPE_CAPS, mediacaps, NULL);
-+      gst_caps_new_simple ("video/quicktime",
-+      "variant", G_TYPE_STRING, "mss-fragmented",
-+      "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000),
-+      "media-caps", GST_TYPE_CAPS, mediacaps, NULL);
- 
-   /* Send segment event* */
-   event = gst_event_new_caps (caps);
-@@ -852,9 +853,10 @@ GST_START_TEST (test_qtdemux_pad_names)
-       "protection-system", G_TYPE_STRING,
-       "9a04f079-9840-4286-ab92-e65be0885f95", NULL);
-   caps =
--      gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING,
--      "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps",
--      GST_TYPE_CAPS, mediacaps, NULL);
-+      gst_caps_new_simple ("video/quicktime",
-+      "variant", G_TYPE_STRING, "mss-fragmented",
-+      "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000),
-+      "media-caps", GST_TYPE_CAPS, mediacaps, NULL);
- 
-   /* Send segment event* */
-   event = gst_event_new_caps (caps);
--- 
-2.30.0
-
-
-From f5310ce346180a717f091f2f09bcbb3ddfb15436 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
-Date: Thu, 12 Nov 2020 23:39:21 +0000
-Subject: [PATCH 2/2] tests: qtdemux: fix typo in caps field
-
-timesacle -> timescale
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/815>
----
- tests/check/elements/qtdemux.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c
-index 0c748278b..4a14c45c0 100644
---- a/tests/check/elements/qtdemux.c
-+++ b/tests/check/elements/qtdemux.c
-@@ -799,7 +799,7 @@ GST_START_TEST (test_qtdemux_pad_names)
-   caps =
-       gst_caps_new_simple ("video/quicktime",
-       "variant", G_TYPE_STRING, "mss-fragmented",
--      "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000),
-+      "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000),
-       "media-caps", GST_TYPE_CAPS, mediacaps, NULL);
- 
-   /* Send segment event* */
-@@ -855,7 +855,7 @@ GST_START_TEST (test_qtdemux_pad_names)
-   caps =
-       gst_caps_new_simple ("video/quicktime",
-       "variant", G_TYPE_STRING, "mss-fragmented",
--      "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000),
-+      "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000),
-       "media-caps", GST_TYPE_CAPS, mediacaps, NULL);
- 
-   /* Send segment event* */
--- 
-2.30.0
-
diff --git a/gnu/packages/patches/mrustc-riscv64-support.patch b/gnu/packages/patches/mrustc-riscv64-support.patch
new file mode 100644
index 0000000000..6312116585
--- /dev/null
+++ b/gnu/packages/patches/mrustc-riscv64-support.patch
@@ -0,0 +1,48 @@
+Patch sent upstream for review:
+https://github.com/thepowersgang/mrustc/pull/276
+
+diff --git a/src/trans/target.cpp b/src/trans/target.cpp
+index 420a2870..4d5eefb3 100644
+--- a/src/trans/target.cpp
++++ b/src/trans/target.cpp
+@@ -65,6 +65,13 @@ const TargetArch ARCH_POWERPC64LE = {
+     { /*atomic(u8)=*/true, true, true, true,  true },
+     TargetArch::Alignments(2, 4, 8, 16, 4, 8, 8)
+ };
++// This is a guess
++const TargetArch ARCH_RISCV64 = {
++    "riscv64",
++    64, false,
++    { /*atomic(u8)=*/true, true, true, true,  true },
++    TargetArch::Alignments(2, 4, 8, 16, 4, 8, 8)
++};
+ TargetSpec  g_target;
+ 
+ 
+@@ -455,6 +462,13 @@ namespace
+                 ARCH_POWERPC64LE
+                 };
+         }
++        else if(target_name == "riscv64-unknown-linux-gnu")
++        {
++            return TargetSpec {
++                "unix", "linux", "gnu", {CodegenMode::Gnu11, false, "riscv64-unknown-linux-gnu", BACKEND_C_OPTS_GNU},
++                ARCH_RISCV64
++                };
++        }
+         else if(target_name == "i586-pc-windows-gnu")
+         {
+             return TargetSpec {
+diff --git a/tools/common/target_detect.h b/tools/common/target_detect.h
+index a052da6b..42fea91a 100644
+--- a/tools/common/target_detect.h
++++ b/tools/common/target_detect.h
+@@ -34,6 +34,8 @@
+ #  define DEFAULT_TARGET_NAME "powerpc64-unknown-linux-gnu"
+ # elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)
+ #  define DEFAULT_TARGET_NAME "powerpc64le-unknown-linux-gnu"
++# elif defined(__riscv) && __riscv_xlen == 64
++#  define DEFAULT_TARGET_NAME "riscv64-unknown-linux-gnu"
+ # else
+ #  warning "Unable to detect a suitable default target (linux-gnu)"
+ # endif
diff --git a/gnu/packages/patches/polkit-CVE-2021-4034.patch b/gnu/packages/patches/polkit-CVE-2021-4034.patch
deleted file mode 100644
index ca766cb3be..0000000000
--- a/gnu/packages/patches/polkit-CVE-2021-4034.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-Fixes CVE-2021-4034, local privilege escalation with 'pkexec':
-
-  https://www.openwall.com/lists/oss-security/2022/01/25/11
-
-Patch from <https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683>.
-
-From a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 Mon Sep 17 00:00:00 2001
-From: Jan Rybar <jrybar@redhat.com>
-Date: Tue, 25 Jan 2022 17:21:46 +0000
-Subject: [PATCH] pkexec: local privilege escalation (CVE-2021-4034)
-
----
- src/programs/pkcheck.c |  5 +++++
- src/programs/pkexec.c  | 23 ++++++++++++++++++++---
- 2 files changed, 25 insertions(+), 3 deletions(-)
-
-diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c
-index f1bb4e1..768525c 100644
---- a/src/programs/pkcheck.c
-+++ b/src/programs/pkcheck.c
-@@ -363,6 +363,11 @@ main (int argc, char *argv[])
-   local_agent_handle = NULL;
-   ret = 126;
- 
-+  if (argc < 1)
-+    {
-+      exit(126);
-+    }
-+
-   /* Disable remote file access from GIO. */
-   setenv ("GIO_USE_VFS", "local", 1);
- 
-diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
-index 7698c5c..84e5ef6 100644
---- a/src/programs/pkexec.c
-+++ b/src/programs/pkexec.c
-@@ -488,6 +488,15 @@ main (int argc, char *argv[])
-   pid_t pid_of_caller;
-   gpointer local_agent_handle;
- 
-+
-+  /*
-+   * If 'pkexec' is called THIS wrong, someone's probably evil-doing. Don't be nice, just bail out.
-+   */
-+  if (argc<1)
-+    {
-+      exit(127);
-+    }
-+
-   ret = 127;
-   authority = NULL;
-   subject = NULL;
-@@ -614,10 +623,10 @@ main (int argc, char *argv[])
- 
-       path = g_strdup (pwstruct.pw_shell);
-       if (!path)
--	{
-+        {
-           g_printerr ("No shell configured or error retrieving pw_shell\n");
-           goto out;
--	}
-+        }
-       /* If you change this, be sure to change the if (!command_line)
- 	 case below too */
-       command_line = g_strdup (path);
-@@ -636,7 +645,15 @@ main (int argc, char *argv[])
-           goto out;
-         }
-       g_free (path);
--      argv[n] = path = s;
-+      path = s;
-+
-+      /* argc<2 and pkexec runs just shell, argv is guaranteed to be null-terminated.
-+       * /-less shell shouldn't happen, but let's be defensive and don't write to null-termination
-+       */
-+      if (argv[n] != NULL)
-+      {
-+        argv[n] = path;
-+      }
-     }
-   if (access (path, F_OK) != 0)
-     {
diff --git a/gnu/packages/patches/polkit-configure-elogind.patch b/gnu/packages/patches/polkit-configure-elogind.patch
deleted file mode 100644
index 8fefb7a0c2..0000000000
--- a/gnu/packages/patches/polkit-configure-elogind.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Even when the polkit configure script detects elogind, it does not use
-it.  This patch ensures that elogind is used when it is detected.
-
-diff -ruN a/configure b/configure
---- a/configure	1969-12-31 19:00:01.000000000 -0500
-+++ b/configure	2021-11-19 00:04:55.581385020 -0500
-@@ -20390,7 +20390,7 @@
- 
- 
- 
-- if test "$have_libsystemd" = "yes"; then
-+ if test "$have_libsystemd" = "yes" || test "$have_libelogind" = "yes"; then
-   HAVE_LIBSYSTEMD_TRUE=
-   HAVE_LIBSYSTEMD_FALSE='#'
- else
diff --git a/gnu/packages/patches/polkit-use-duktape.patch b/gnu/packages/patches/polkit-use-duktape.patch
deleted file mode 100644
index 4eaa7963c2..0000000000
--- a/gnu/packages/patches/polkit-use-duktape.patch
+++ /dev/null
@@ -1,5030 +0,0 @@
-From 4f66a9549a393e4d74b93eb85301a04ea94bc750 Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Wed, 24 Jul 2019 15:55:17 +0800
-Subject: [PATCH 01/16] Add duktape as javascript engine.
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- configure.ac                                  |   28 +-
- src/polkitbackend/Makefile.am                 |   14 +-
- .../polkitbackendduktapeauthority.c           | 1402 +++++++++++++++++
- 3 files changed, 1436 insertions(+), 8 deletions(-)
- create mode 100644 src/polkitbackend/polkitbackendduktapeauthority.c
-
-diff --git a/configure.ac b/configure.ac
-index e434ca2..5a03593 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -80,11 +80,22 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0])
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
- 
--PKG_CHECK_MODULES(LIBJS, [mozjs-78])
--
--AC_SUBST(LIBJS_CFLAGS)
--AC_SUBST(LIBJS_CXXFLAGS)
--AC_SUBST(LIBJS_LIBS)
-+dnl ---------------------------------------------------------------------------
-+dnl - Check javascript backend
-+dnl ---------------------------------------------------------------------------
-+AC_ARG_WITH(duktape, AS_HELP_STRING([--with-duktape],[Use Duktape as javascript backend]),with_duktape=yes,with_duktape=no)
-+AS_IF([test x${with_duktape} == xyes], [
-+  PKG_CHECK_MODULES(LIBJS, [duktape >= 2.0.0 ])
-+  AC_SUBST(LIBJS_CFLAGS)
-+  AC_SUBST(LIBJS_LIBS)
-+], [
-+  PKG_CHECK_MODULES(LIBJS, [mozjs-78])
-+
-+  AC_SUBST(LIBJS_CFLAGS)
-+  AC_SUBST(LIBJS_CXXFLAGS)
-+  AC_SUBST(LIBJS_LIBS)
-+])
-+AM_CONDITIONAL(USE_DUKTAPE, [test x$with_duktape == xyes], [Using duktape as javascript engine library])
- 
- EXPAT_LIB=""
- AC_ARG_WITH(expat, [  --with-expat=<dir>      Use expat from here],
-@@ -585,6 +596,13 @@ echo "
-         PAM support:                ${have_pam}
-         systemdsystemunitdir:       ${systemdsystemunitdir}
-         polkitd user:               ${POLKITD_USER}"
-+if test "x${with_duktape}" = xyes; then
-+echo "
-+        Javascript engine:          Duktape"
-+else
-+echo "
-+        Javascript engine:          Mozjs"
-+fi
- 
- if test "$have_pam" = yes ; then
- echo "
-diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am
-index 7e3c080..abcbc6f 100644
---- a/src/polkitbackend/Makefile.am
-+++ b/src/polkitbackend/Makefile.am
-@@ -33,7 +33,7 @@ libpolkit_backend_1_la_SOURCES =                                   			\
- 	polkitbackendprivate.h								\
- 	polkitbackendauthority.h		polkitbackendauthority.c		\
- 	polkitbackendinteractiveauthority.h	polkitbackendinteractiveauthority.c	\
--	polkitbackendjsauthority.h		polkitbackendjsauthority.cpp		\
-+	polkitbackendjsauthority.h				\
- 	polkitbackendactionpool.h		polkitbackendactionpool.c		\
- 	polkitbackendactionlookup.h		polkitbackendactionlookup.c		\
-         $(NULL)
-@@ -51,19 +51,27 @@ libpolkit_backend_1_la_CFLAGS =                                        	\
-         -D_POLKIT_BACKEND_COMPILATION                                  	\
-         $(GLIB_CFLAGS)							\
- 	$(LIBSYSTEMD_CFLAGS)						\
--	$(LIBJS_CFLAGS)							\
-+	$(LIBJS_CFLAGS)						\
-         $(NULL)
- 
- libpolkit_backend_1_la_CXXFLAGS = $(libpolkit_backend_1_la_CFLAGS)
- 
- libpolkit_backend_1_la_LIBADD =                               		\
-         $(GLIB_LIBS)							\
-+        $(DUKTAPE_LIBS)							\
- 	$(LIBSYSTEMD_LIBS)						\
- 	$(top_builddir)/src/polkit/libpolkit-gobject-1.la		\
- 	$(EXPAT_LIBS)							\
--	$(LIBJS_LIBS)							\
-+	$(LIBJS_LIBS)                                                   \
-         $(NULL)
- 
-+if USE_DUKTAPE
-+libpolkit_backend_1_la_SOURCES += polkitbackendduktapeauthority.c
-+libpolkit_backend_1_la_LIBADD += -lm
-+else
-+libpolkit_backend_1_la_SOURCES += polkitbackendjsauthority.cpp
-+endif
-+
- rulesdir = $(sysconfdir)/polkit-1/rules.d
- rules_DATA = 50-default.rules
- 
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-new file mode 100644
-index 0000000..ae98453
---- /dev/null
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -0,0 +1,1402 @@
-+/*
-+ * Copyright (C) 2008-2012 Red Hat, Inc.
-+ * Copyright (C) 2015 Tangent Space <jstpierre@mecheye.net>
-+ * Copyright (C) 2019 Wu Xiaotian <yetist@gmail.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General
-+ * Public License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ *
-+ * Author: David Zeuthen <davidz@redhat.com>
-+ */
-+
-+#include "config.h"
-+#include <sys/wait.h>
-+#include <errno.h>
-+#include <pwd.h>
-+#include <grp.h>
-+#include <netdb.h>
-+#include <string.h>
-+#include <glib/gstdio.h>
-+#include <locale.h>
-+#include <glib/gi18n-lib.h>
-+
-+#include <polkit/polkit.h>
-+#include "polkitbackendjsauthority.h"
-+
-+#include <polkit/polkitprivate.h>
-+
-+#ifdef HAVE_LIBSYSTEMD
-+#include <systemd/sd-login.h>
-+#endif /* HAVE_LIBSYSTEMD */
-+
-+#include "initjs.h" /* init.js */
-+#include "duktape.h"
-+
-+/**
-+ * SECTION:polkitbackendjsauthority
-+ * @title: PolkitBackendJsAuthority
-+ * @short_description: JS Authority
-+ * @stability: Unstable
-+ *
-+ * An implementation of #PolkitBackendAuthority that reads and
-+ * evalates Javascript files and supports interaction with
-+ * authentication agents (virtue of being based on
-+ * #PolkitBackendInteractiveAuthority).
-+ */
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+struct _PolkitBackendJsAuthorityPrivate
-+{
-+  gchar **rules_dirs;
-+  GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */
-+  duk_context *cx;
-+};
-+
-+#define WATCHDOG_TIMEOUT (15 * G_TIME_SPAN_SECOND)
-+
-+static void utils_spawn (const gchar *const  *argv,
-+                         guint                timeout_seconds,
-+                         GCancellable        *cancellable,
-+                         GAsyncReadyCallback  callback,
-+                         gpointer             user_data);
-+
-+gboolean utils_spawn_finish (GAsyncResult   *res,
-+                             gint           *out_exit_status,
-+                             gchar         **out_standard_output,
-+                             gchar         **out_standard_error,
-+                             GError        **error);
-+
-+static void on_dir_monitor_changed (GFileMonitor     *monitor,
-+                                    GFile            *file,
-+                                    GFile            *other_file,
-+                                    GFileMonitorEvent event_type,
-+                                    gpointer          user_data);
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+enum
-+{
-+  PROP_0,
-+  PROP_RULES_DIRS,
-+};
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static GList *polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *authority,
-+                                                                     PolkitSubject                     *caller,
-+                                                                     PolkitSubject                     *subject,
-+                                                                     PolkitIdentity                    *user_for_subject,
-+                                                                     gboolean                           subject_is_local,
-+                                                                     gboolean                           subject_is_active,
-+                                                                     const gchar                       *action_id,
-+                                                                     PolkitDetails                     *details);
-+
-+static PolkitImplicitAuthorization polkit_backend_js_authority_check_authorization_sync (
-+                                                          PolkitBackendInteractiveAuthority *authority,
-+                                                          PolkitSubject                     *caller,
-+                                                          PolkitSubject                     *subject,
-+                                                          PolkitIdentity                    *user_for_subject,
-+                                                          gboolean                           subject_is_local,
-+                                                          gboolean                           subject_is_active,
-+                                                          const gchar                       *action_id,
-+                                                          PolkitDetails                     *details,
-+                                                          PolkitImplicitAuthorization        implicit);
-+
-+G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static void
-+polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
-+{
-+  authority->priv = G_TYPE_INSTANCE_GET_PRIVATE (authority,
-+                                                 POLKIT_BACKEND_TYPE_JS_AUTHORITY,
-+                                                 PolkitBackendJsAuthorityPrivate);
-+}
-+
-+static gint
-+rules_file_name_cmp (const gchar *a,
-+                     const gchar *b)
-+{
-+  gint ret;
-+  const gchar *a_base;
-+  const gchar *b_base;
-+
-+  a_base = strrchr (a, '/');
-+  b_base = strrchr (b, '/');
-+
-+  g_assert (a_base != NULL);
-+  g_assert (b_base != NULL);
-+  a_base += 1;
-+  b_base += 1;
-+
-+  ret = g_strcmp0 (a_base, b_base);
-+  if (ret == 0)
-+    {
-+      /* /etc wins over /usr */
-+      ret = g_strcmp0 (a, b);
-+      g_assert (ret != 0);
-+    }
-+
-+  return ret;
-+}
-+
-+static void
-+load_scripts (PolkitBackendJsAuthority  *authority)
-+{
-+  duk_context *cx = authority->priv->cx;
-+  GList *files = NULL;
-+  GList *l;
-+  guint num_scripts = 0;
-+  GError *error = NULL;
-+  guint n;
-+
-+  files = NULL;
-+
-+  for (n = 0; authority->priv->rules_dirs != NULL && authority->priv->rules_dirs[n] != NULL; n++)
-+    {
-+      const gchar *dir_name = authority->priv->rules_dirs[n];
-+      GDir *dir = NULL;
-+
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Loading rules from directory %s",
-+                                    dir_name);
-+
-+      dir = g_dir_open (dir_name,
-+                        0,
-+                        &error);
-+      if (dir == NULL)
-+        {
-+          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                        "Error opening rules directory: %s (%s, %d)",
-+                                        error->message, g_quark_to_string (error->domain), error->code);
-+          g_clear_error (&error);
-+        }
-+      else
-+        {
-+          const gchar *name;
-+          while ((name = g_dir_read_name (dir)) != NULL)
-+            {
-+              if (g_str_has_suffix (name, ".rules"))
-+                files = g_list_prepend (files, g_strdup_printf ("%s/%s", dir_name, name));
-+            }
-+          g_dir_close (dir);
-+        }
-+    }
-+
-+  files = g_list_sort (files, (GCompareFunc) rules_file_name_cmp);
-+
-+  for (l = files; l != NULL; l = l->next)
-+    {
-+      const gchar *filename = l->data;
-+
-+#if (DUK_VERSION >= 20000)
-+      gchar *contents;
-+      gsize length;
-+      GError *error = NULL;
-+      if (!g_file_get_contents (filename, &contents, &length, &error)){
-+        g_warning("Error when file contents of %s: %s\n", filename, error->message);
-+        g_error_free (error);
-+        continue;
-+      }
-+      if (duk_peval_lstring_noresult(cx, contents,length) != 0)
-+#else
-+      if (duk_peval_file_noresult (cx, filename) != 0)
-+#endif
-+        {
-+          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                        "Error compiling script %s: %s",
-+                                        filename, duk_safe_to_string (authority->priv->cx, -1));
-+#if (DUK_VERSION >= 20000)
-+          g_free (contents);
-+#endif
-+          continue;
-+        }
-+#if (DUK_VERSION >= 20000)
-+      g_free (contents);
-+#endif
-+      num_scripts++;
-+    }
-+
-+  polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                "Finished loading, compiling and executing %d rules",
-+                                num_scripts);
-+  g_list_free_full (files, g_free);
-+}
-+
-+static void
-+reload_scripts (PolkitBackendJsAuthority *authority)
-+{
-+  duk_context *cx = authority->priv->cx;
-+
-+  duk_set_top (cx, 0);
-+  duk_get_global_string (cx, "polkit");
-+  duk_push_string (cx, "_deleteRules");
-+
-+  duk_call_prop (cx, 0, 0);
-+
-+  polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                "Collecting garbage unconditionally...");
-+
-+  load_scripts (authority);
-+
-+  /* Let applications know we have new rules... */
-+  g_signal_emit_by_name (authority, "changed");
-+}
-+
-+static void
-+on_dir_monitor_changed (GFileMonitor     *monitor,
-+                        GFile            *file,
-+                        GFile            *other_file,
-+                        GFileMonitorEvent event_type,
-+                        gpointer          user_data)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
-+
-+  /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
-+   *       Because when editing a file with emacs we get 4-8 events..
-+   */
-+
-+  if (file != NULL)
-+    {
-+      gchar *name;
-+
-+      name = g_file_get_basename (file);
-+
-+      /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
-+      if (!g_str_has_prefix (name, ".") &&
-+          !g_str_has_prefix (name, "#") &&
-+          g_str_has_suffix (name, ".rules") &&
-+          (event_type == G_FILE_MONITOR_EVENT_CREATED ||
-+           event_type == G_FILE_MONITOR_EVENT_DELETED ||
-+           event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
-+        {
-+          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                        "Reloading rules");
-+          reload_scripts (authority);
-+        }
-+      g_free (name);
-+    }
-+}
-+
-+
-+static void
-+setup_file_monitors (PolkitBackendJsAuthority *authority)
-+{
-+  guint n;
-+  GPtrArray *p;
-+
-+  p = g_ptr_array_new ();
-+  for (n = 0; authority->priv->rules_dirs != NULL && authority->priv->rules_dirs[n] != NULL; n++)
-+    {
-+      GFile *file;
-+      GError *error;
-+      GFileMonitor *monitor;
-+
-+      file = g_file_new_for_path (authority->priv->rules_dirs[n]);
-+      error = NULL;
-+      monitor = g_file_monitor_directory (file,
-+                                          G_FILE_MONITOR_NONE,
-+                                          NULL,
-+                                          &error);
-+      g_object_unref (file);
-+      if (monitor == NULL)
-+        {
-+          g_warning ("Error monitoring directory %s: %s",
-+                     authority->priv->rules_dirs[n],
-+                     error->message);
-+          g_clear_error (&error);
-+        }
-+      else
-+        {
-+          g_signal_connect (monitor,
-+                            "changed",
-+                            G_CALLBACK (on_dir_monitor_changed),
-+                            authority);
-+          g_ptr_array_add (p, monitor);
-+        }
-+    }
-+  g_ptr_array_add (p, NULL);
-+  authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
-+}
-+
-+static duk_ret_t js_polkit_log (duk_context *cx);
-+static duk_ret_t js_polkit_spawn (duk_context *cx);
-+static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
-+
-+static const duk_function_list_entry js_polkit_functions[] =
-+{
-+  { "log", js_polkit_log, 1 },
-+  { "spawn", js_polkit_spawn, 1 },
-+  { "_userIsInNetGroup", js_polkit_user_is_in_netgroup, 2 },
-+  { NULL, NULL, 0 },
-+};
-+
-+static void
-+polkit_backend_js_authority_constructed (GObject *object)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-+  duk_context *cx;
-+
-+  cx = duk_create_heap (NULL, NULL, NULL, authority, NULL);
-+  if (cx == NULL)
-+    goto fail;
-+
-+  authority->priv->cx = cx;
-+
-+  duk_push_global_object (cx);
-+  duk_push_object (cx);
-+  duk_put_function_list (cx, -1, js_polkit_functions);
-+  duk_put_prop_string (cx, -2, "polkit");
-+
-+  duk_eval_string (cx, init_js);
-+
-+  if (authority->priv->rules_dirs == NULL)
-+    {
-+      authority->priv->rules_dirs = g_new0 (gchar *, 3);
-+      authority->priv->rules_dirs[0] = g_strdup (PACKAGE_SYSCONF_DIR "/polkit-1/rules.d");
-+      authority->priv->rules_dirs[1] = g_strdup (PACKAGE_DATA_DIR "/polkit-1/rules.d");
-+    }
-+
-+  setup_file_monitors (authority);
-+  load_scripts (authority);
-+
-+  G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->constructed (object);
-+  return;
-+
-+ fail:
-+  g_critical ("Error initializing JavaScript environment");
-+  g_assert_not_reached ();
-+}
-+
-+static void
-+polkit_backend_js_authority_finalize (GObject *object)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-+  guint n;
-+
-+  for (n = 0; authority->priv->dir_monitors != NULL && authority->priv->dir_monitors[n] != NULL; n++)
-+    {
-+      GFileMonitor *monitor = authority->priv->dir_monitors[n];
-+      g_signal_handlers_disconnect_by_func (monitor,
-+                                            G_CALLBACK (on_dir_monitor_changed),
-+                                            authority);
-+      g_object_unref (monitor);
-+    }
-+  g_free (authority->priv->dir_monitors);
-+  g_strfreev (authority->priv->rules_dirs);
-+
-+  duk_destroy_heap (authority->priv->cx);
-+
-+  G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object);
-+}
-+
-+static void
-+polkit_backend_js_authority_set_property (GObject      *object,
-+                                          guint         property_id,
-+                                          const GValue *value,
-+                                          GParamSpec   *pspec)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-+
-+  switch (property_id)
-+    {
-+      case PROP_RULES_DIRS:
-+        g_assert (authority->priv->rules_dirs == NULL);
-+        authority->priv->rules_dirs = (gchar **) g_value_dup_boxed (value);
-+        break;
-+
-+      default:
-+        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-+        break;
-+    }
-+}
-+
-+static const gchar *
-+polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
-+{
-+  return "js";
-+}
-+
-+static const gchar *
-+polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
-+{
-+  return PACKAGE_VERSION;
-+}
-+
-+static PolkitAuthorityFeatures
-+polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
-+{
-+  return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
-+}
-+
-+static void
-+polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass)
-+{
-+  GObjectClass *gobject_class;
-+  PolkitBackendAuthorityClass *authority_class;
-+  PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
-+
-+
-+  gobject_class = G_OBJECT_CLASS (klass);
-+  gobject_class->finalize                               = polkit_backend_js_authority_finalize;
-+  gobject_class->set_property                           = polkit_backend_js_authority_set_property;
-+  gobject_class->constructed                            = polkit_backend_js_authority_constructed;
-+
-+  authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
-+  authority_class->get_name                             = polkit_backend_js_authority_get_name;
-+  authority_class->get_version                          = polkit_backend_js_authority_get_version;
-+  authority_class->get_features                         = polkit_backend_js_authority_get_features;
-+
-+  interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
-+  interactive_authority_class->get_admin_identities     = polkit_backend_js_authority_get_admin_auth_identities;
-+  interactive_authority_class->check_authorization_sync = polkit_backend_js_authority_check_authorization_sync;
-+
-+  g_object_class_install_property (gobject_class,
-+                                   PROP_RULES_DIRS,
-+                                   g_param_spec_boxed ("rules-dirs",
-+                                                       NULL,
-+                                                       NULL,
-+                                                       G_TYPE_STRV,
-+                                                       G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
-+
-+
-+  g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate));
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static void
-+set_property_str (duk_context *cx,
-+                  const gchar *name,
-+                  const gchar *value)
-+{
-+  duk_push_string (cx, value);
-+  duk_put_prop_string (cx, -2, name);
-+}
-+
-+static void
-+set_property_strv (duk_context *cx,
-+                   const gchar *name,
-+                   GPtrArray   *value)
-+{
-+  guint n;
-+  duk_push_array (cx);
-+  for (n = 0; n < value->len; n++)
-+    {
-+      duk_push_string (cx, g_ptr_array_index (value, n));
-+      duk_put_prop_index (cx, -2, n);
-+    }
-+  duk_put_prop_string (cx, -2, name);
-+}
-+
-+static void
-+set_property_int32 (duk_context *cx,
-+                    const gchar *name,
-+                    gint32       value)
-+{
-+  duk_push_int (cx, value);
-+  duk_put_prop_string (cx, -2, name);
-+}
-+
-+static void
-+set_property_bool (duk_context *cx,
-+                   const char  *name,
-+                   gboolean     value)
-+{
-+  duk_push_boolean (cx, value);
-+  duk_put_prop_string (cx, -2, name);
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static gboolean
-+push_subject (duk_context               *cx,
-+              PolkitSubject             *subject,
-+              PolkitIdentity            *user_for_subject,
-+              gboolean                   subject_is_local,
-+              gboolean                   subject_is_active,
-+              GError                   **error)
-+{
-+  gboolean ret = FALSE;
-+  pid_t pid;
-+  uid_t uid;
-+  gchar *user_name = NULL;
-+  GPtrArray *groups = NULL;
-+  struct passwd *passwd;
-+  char *seat_str = NULL;
-+  char *session_str = NULL;
-+
-+  duk_get_global_string (cx, "Subject");
-+  duk_new (cx, 0);
-+
-+  if (POLKIT_IS_UNIX_PROCESS (subject))
-+    {
-+      pid = polkit_unix_process_get_pid (POLKIT_UNIX_PROCESS (subject));
-+    }
-+  else if (POLKIT_IS_SYSTEM_BUS_NAME (subject))
-+    {
-+      PolkitSubject *process;
-+      process = polkit_system_bus_name_get_process_sync (POLKIT_SYSTEM_BUS_NAME (subject), NULL, error);
-+      if (process == NULL)
-+        goto out;
-+      pid = polkit_unix_process_get_pid (POLKIT_UNIX_PROCESS (process));
-+      g_object_unref (process);
-+    }
-+  else
-+    {
-+      g_assert_not_reached ();
-+    }
-+
-+#ifdef HAVE_LIBSYSTEMD
-+  if (sd_pid_get_session (pid, &session_str) == 0)
-+    {
-+      if (sd_session_get_seat (session_str, &seat_str) == 0)
-+        {
-+          /* do nothing */
-+        }
-+    }
-+#endif /* HAVE_LIBSYSTEMD */
-+
-+  g_assert (POLKIT_IS_UNIX_USER (user_for_subject));
-+  uid = polkit_unix_user_get_uid (POLKIT_UNIX_USER (user_for_subject));
-+
-+  groups = g_ptr_array_new_with_free_func (g_free);
-+
-+  passwd = getpwuid (uid);
-+  if (passwd == NULL)
-+    {
-+      user_name = g_strdup_printf ("%d", (gint) uid);
-+      g_warning ("Error looking up info for uid %d: %m", (gint) uid);
-+    }
-+  else
-+    {
-+      gid_t gids[512];
-+      int num_gids = 512;
-+
-+      user_name = g_strdup (passwd->pw_name);
-+
-+      if (getgrouplist (passwd->pw_name,
-+                        passwd->pw_gid,
-+                        gids,
-+                        &num_gids) < 0)
-+        {
-+          g_warning ("Error looking up groups for uid %d: %m", (gint) uid);
-+        }
-+      else
-+        {
-+          gint n;
-+          for (n = 0; n < num_gids; n++)
-+            {
-+              struct group *group;
-+              group = getgrgid (gids[n]);
-+              if (group == NULL)
-+                {
-+                  g_ptr_array_add (groups, g_strdup_printf ("%d", (gint) gids[n]));
-+                }
-+              else
-+                {
-+                  g_ptr_array_add (groups, g_strdup (group->gr_name));
-+                }
-+            }
-+        }
-+    }
-+
-+  set_property_int32 (cx, "pid", pid);
-+  set_property_str (cx, "user", user_name);
-+  set_property_strv (cx, "groups", groups);
-+  set_property_str (cx, "seat", seat_str);
-+  set_property_str (cx, "session", session_str);
-+  set_property_bool (cx, "local", subject_is_local);
-+  set_property_bool (cx, "active", subject_is_active);
-+
-+  ret = TRUE;
-+
-+ out:
-+  free (session_str);
-+  free (seat_str);
-+  g_free (user_name);
-+  if (groups != NULL)
-+    g_ptr_array_unref (groups);
-+
-+  return ret;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static gboolean
-+push_action_and_details (duk_context               *cx,
-+                         const gchar               *action_id,
-+                         PolkitDetails             *details,
-+                         GError                   **error)
-+{
-+  gchar **keys;
-+  guint n;
-+
-+  duk_get_global_string (cx, "Action");
-+  duk_new (cx, 0);
-+
-+  set_property_str (cx, "id", action_id);
-+
-+  keys = polkit_details_get_keys (details);
-+  for (n = 0; keys != NULL && keys[n] != NULL; n++)
-+    {
-+      gchar *key;
-+      const gchar *value;
-+      key = g_strdup_printf ("_detail_%s", keys[n]);
-+      value = polkit_details_lookup (details, keys[n]);
-+      set_property_str (cx, key, value);
-+      g_free (key);
-+    }
-+  g_strfreev (keys);
-+
-+  return TRUE;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static GList *
-+polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
-+                                                       PolkitSubject                     *caller,
-+                                                       PolkitSubject                     *subject,
-+                                                       PolkitIdentity                    *user_for_subject,
-+                                                       gboolean                           subject_is_local,
-+                                                       gboolean                           subject_is_active,
-+                                                       const gchar                       *action_id,
-+                                                       PolkitDetails                     *details)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
-+  GList *ret = NULL;
-+  guint n;
-+  GError *error = NULL;
-+  const char *ret_str = NULL;
-+  gchar **ret_strs = NULL;
-+  duk_context *cx = authority->priv->cx;
-+
-+  duk_set_top (cx, 0);
-+  duk_get_global_string (cx, "polkit");
-+  duk_push_string (cx, "_runAdminRules");
-+
-+  if (!push_action_and_details (cx, action_id, details, &error))
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error converting action and details to JS object: %s",
-+                                    error->message);
-+      g_clear_error (&error);
-+      goto out;
-+    }
-+
-+  if (!push_subject (cx, subject, user_for_subject, subject_is_local, subject_is_active, &error))
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error converting subject to JS object: %s",
-+                                    error->message);
-+      g_clear_error (&error);
-+      goto out;
-+    }
-+
-+  if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error evaluating admin rules: ",
-+                                    duk_safe_to_string (cx, -1));
-+      goto out;
-+    }
-+
-+  ret_str = duk_require_string (cx, -1);
-+
-+  ret_strs = g_strsplit (ret_str, ",", -1);
-+  for (n = 0; ret_strs != NULL && ret_strs[n] != NULL; n++)
-+    {
-+      const gchar *identity_str = ret_strs[n];
-+      PolkitIdentity *identity;
-+
-+      error = NULL;
-+      identity = polkit_identity_from_string (identity_str, &error);
-+      if (identity == NULL)
-+        {
-+          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                        "Identity `%s' is not valid, ignoring: %s",
-+                                        identity_str, error->message);
-+          g_clear_error (&error);
-+        }
-+      else
-+        {
-+          ret = g_list_prepend (ret, identity);
-+        }
-+    }
-+  ret = g_list_reverse (ret);
-+
-+ out:
-+  g_strfreev (ret_strs);
-+  /* fallback to root password auth */
-+  if (ret == NULL)
-+    ret = g_list_prepend (ret, polkit_unix_user_new (0));
-+
-+  return ret;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static PolkitImplicitAuthorization
-+polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
-+                                                      PolkitSubject                     *caller,
-+                                                      PolkitSubject                     *subject,
-+                                                      PolkitIdentity                    *user_for_subject,
-+                                                      gboolean                           subject_is_local,
-+                                                      gboolean                           subject_is_active,
-+                                                      const gchar                       *action_id,
-+                                                      PolkitDetails                     *details,
-+                                                      PolkitImplicitAuthorization        implicit)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
-+  PolkitImplicitAuthorization ret = implicit;
-+  GError *error = NULL;
-+  gchar *ret_str = NULL;
-+  gboolean good = FALSE;
-+  duk_context *cx = authority->priv->cx;
-+
-+  duk_set_top (cx, 0);
-+  duk_get_global_string (cx, "polkit");
-+  duk_push_string (cx, "_runRules");
-+
-+  if (!push_action_and_details (cx, action_id, details, &error))
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error converting action and details to JS object: %s",
-+                                    error->message);
-+      g_clear_error (&error);
-+      goto out;
-+    }
-+
-+  if (!push_subject (cx, subject, user_for_subject, subject_is_local, subject_is_active, &error))
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error converting subject to JS object: %s",
-+                                    error->message);
-+      g_clear_error (&error);
-+      goto out;
-+    }
-+
-+  if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
-+  {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error evaluating authorization rules: ",
-+                                    duk_safe_to_string (cx, -1));
-+      goto out;
-+  }
-+
-+  if (duk_is_null(cx, -1)) {
-+    good = TRUE;
-+    goto out;
-+  }
-+  ret_str = g_strdup (duk_require_string (cx, -1));
-+  if (!polkit_implicit_authorization_from_string (ret_str, &ret))
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Returned result `%s' is not valid",
-+                                    ret_str);
-+      goto out;
-+    }
-+
-+  good = TRUE;
-+
-+ out:
-+  if (!good)
-+    ret = POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED;
-+  g_free (ret_str);
-+
-+  return ret;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static duk_ret_t
-+js_polkit_log (duk_context *cx)
-+{
-+  const char *str = duk_require_string (cx, 0);
-+  fprintf (stderr, "%s\n", str);
-+  return 0;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+static const gchar *
-+get_signal_name (gint signal_number)
-+{
-+  switch (signal_number)
-+    {
-+#define _HANDLE_SIG(sig) case sig: return #sig;
-+    _HANDLE_SIG (SIGHUP);
-+    _HANDLE_SIG (SIGINT);
-+    _HANDLE_SIG (SIGQUIT);
-+    _HANDLE_SIG (SIGILL);
-+    _HANDLE_SIG (SIGABRT);
-+    _HANDLE_SIG (SIGFPE);
-+    _HANDLE_SIG (SIGKILL);
-+    _HANDLE_SIG (SIGSEGV);
-+    _HANDLE_SIG (SIGPIPE);
-+    _HANDLE_SIG (SIGALRM);
-+    _HANDLE_SIG (SIGTERM);
-+    _HANDLE_SIG (SIGUSR1);
-+    _HANDLE_SIG (SIGUSR2);
-+    _HANDLE_SIG (SIGCHLD);
-+    _HANDLE_SIG (SIGCONT);
-+    _HANDLE_SIG (SIGSTOP);
-+    _HANDLE_SIG (SIGTSTP);
-+    _HANDLE_SIG (SIGTTIN);
-+    _HANDLE_SIG (SIGTTOU);
-+    _HANDLE_SIG (SIGBUS);
-+#ifdef SIGPOLL
-+    _HANDLE_SIG (SIGPOLL);
-+#endif
-+    _HANDLE_SIG (SIGPROF);
-+    _HANDLE_SIG (SIGSYS);
-+    _HANDLE_SIG (SIGTRAP);
-+    _HANDLE_SIG (SIGURG);
-+    _HANDLE_SIG (SIGVTALRM);
-+    _HANDLE_SIG (SIGXCPU);
-+    _HANDLE_SIG (SIGXFSZ);
-+#undef _HANDLE_SIG
-+    default:
-+      break;
-+    }
-+  return "UNKNOWN_SIGNAL";
-+}
-+
-+typedef struct
-+{
-+  GMainLoop *loop;
-+  GAsyncResult *res;
-+} SpawnData;
-+
-+static void
-+spawn_cb (GObject       *source_object,
-+          GAsyncResult  *res,
-+          gpointer       user_data)
-+{
-+  SpawnData *data = user_data;
-+  data->res = g_object_ref (res);
-+  g_main_loop_quit (data->loop);
-+}
-+
-+static duk_ret_t
-+js_polkit_spawn (duk_context *cx)
-+{
-+#if (DUK_VERSION >= 20000)
-+  duk_ret_t ret = DUK_RET_ERROR;
-+#else
-+  duk_ret_t ret = DUK_RET_INTERNAL_ERROR;
-+#endif
-+  gchar *standard_output = NULL;
-+  gchar *standard_error = NULL;
-+  gint exit_status;
-+  GError *error = NULL;
-+  guint32 array_len;
-+  gchar **argv = NULL;
-+  GMainContext *context = NULL;
-+  GMainLoop *loop = NULL;
-+  SpawnData data = {0};
-+  char *err_str = NULL;
-+  guint n;
-+
-+  if (!duk_is_array (cx, 0))
-+    goto out;
-+
-+  array_len = duk_get_length (cx, 0);
-+
-+  argv = g_new0 (gchar*, array_len + 1);
-+  for (n = 0; n < array_len; n++)
-+    {
-+      duk_get_prop_index (cx, 0, n);
-+      argv[n] = g_strdup (duk_to_string (cx, -1));
-+      duk_pop (cx);
-+    }
-+
-+  context = g_main_context_new ();
-+  loop = g_main_loop_new (context, FALSE);
-+
-+  g_main_context_push_thread_default (context);
-+
-+  data.loop = loop;
-+  utils_spawn ((const gchar *const *) argv,
-+               10, /* timeout_seconds */
-+               NULL, /* cancellable */
-+               spawn_cb,
-+               &data);
-+
-+  g_main_loop_run (loop);
-+
-+  g_main_context_pop_thread_default (context);
-+
-+  if (!utils_spawn_finish (data.res,
-+                           &exit_status,
-+                           &standard_output,
-+                           &standard_error,
-+                           &error))
-+    {
-+      err_str = g_strdup_printf ("Error spawning helper: %s (%s, %d)",
-+                                 error->message, g_quark_to_string (error->domain), error->code);
-+      g_clear_error (&error);
-+      goto out;
-+    }
-+
-+  if (!(WIFEXITED (exit_status) && WEXITSTATUS (exit_status) == 0))
-+    {
-+      GString *gstr;
-+      gstr = g_string_new (NULL);
-+      if (WIFEXITED (exit_status))
-+        {
-+          g_string_append_printf (gstr,
-+                                  "Helper exited with non-zero exit status %d",
-+                                  WEXITSTATUS (exit_status));
-+        }
-+      else if (WIFSIGNALED (exit_status))
-+        {
-+          g_string_append_printf (gstr,
-+                                  "Helper was signaled with signal %s (%d)",
-+                                  get_signal_name (WTERMSIG (exit_status)),
-+                                  WTERMSIG (exit_status));
-+        }
-+      g_string_append_printf (gstr, ", stdout=`%s', stderr=`%s'",
-+                              standard_output, standard_error);
-+      err_str = g_string_free (gstr, FALSE);
-+      goto out;
-+    }
-+
-+  duk_push_string (cx, standard_output);
-+  ret = 1;
-+
-+ out:
-+  g_strfreev (argv);
-+  g_free (standard_output);
-+  g_free (standard_error);
-+  g_clear_object (&data.res);
-+  if (loop != NULL)
-+    g_main_loop_unref (loop);
-+  if (context != NULL)
-+    g_main_context_unref (context);
-+
-+  if (err_str)
-+    duk_error (cx, DUK_ERR_ERROR, err_str);
-+
-+  return ret;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+
-+static duk_ret_t
-+js_polkit_user_is_in_netgroup (duk_context *cx)
-+{
-+  const char *user;
-+  const char *netgroup;
-+  gboolean is_in_netgroup = FALSE;
-+
-+  user = duk_require_string (cx, 0);
-+  netgroup = duk_require_string (cx, 1);
-+
-+  if (innetgr (netgroup,
-+               NULL,  /* host */
-+               user,
-+               NULL)) /* domain */
-+    {
-+      is_in_netgroup = TRUE;
-+    }
-+
-+  duk_push_boolean (cx, is_in_netgroup);
-+  return 1;
-+}
-+
-+/* ---------------------------------------------------------------------------------------------------- */
-+
-+typedef struct
-+{
-+  GSimpleAsyncResult *simple; /* borrowed reference */
-+  GMainContext *main_context; /* may be NULL */
-+
-+  GCancellable *cancellable;  /* may be NULL */
-+  gulong cancellable_handler_id;
-+
-+  GPid child_pid;
-+  gint child_stdout_fd;
-+  gint child_stderr_fd;
-+
-+  GIOChannel *child_stdout_channel;
-+  GIOChannel *child_stderr_channel;
-+
-+  GSource *child_watch_source;
-+  GSource *child_stdout_source;
-+  GSource *child_stderr_source;
-+
-+  guint timeout_seconds;
-+  gboolean timed_out;
-+  GSource *timeout_source;
-+
-+  GString *child_stdout;
-+  GString *child_stderr;
-+
-+  gint exit_status;
-+} UtilsSpawnData;
-+
-+static void
-+utils_child_watch_from_release_cb (GPid     pid,
-+                                   gint     status,
-+                                   gpointer user_data)
-+{
-+}
-+
-+static void
-+utils_spawn_data_free (UtilsSpawnData *data)
-+{
-+  if (data->timeout_source != NULL)
-+    {
-+      g_source_destroy (data->timeout_source);
-+      data->timeout_source = NULL;
-+    }
-+
-+  /* Nuke the child, if necessary */
-+  if (data->child_watch_source != NULL)
-+    {
-+      g_source_destroy (data->child_watch_source);
-+      data->child_watch_source = NULL;
-+    }
-+
-+  if (data->child_pid != 0)
-+    {
-+      GSource *source;
-+      kill (data->child_pid, SIGTERM);
-+      /* OK, we need to reap for the child ourselves - we don't want
-+       * to use waitpid() because that might block the calling
-+       * thread (the child might handle SIGTERM and use several
-+       * seconds for cleanup/rollback).
-+       *
-+       * So we use GChildWatch instead.
-+       *
-+       * Avoid taking a references to ourselves. but note that we need
-+       * to pass the GSource so we can nuke it once handled.
-+       */
-+      source = g_child_watch_source_new (data->child_pid);
-+      g_source_set_callback (source,
-+                             (GSourceFunc) utils_child_watch_from_release_cb,
-+                             source,
-+                             (GDestroyNotify) g_source_destroy);
-+      g_source_attach (source, data->main_context);
-+      g_source_unref (source);
-+      data->child_pid = 0;
-+    }
-+
-+  if (data->child_stdout != NULL)
-+    {
-+      g_string_free (data->child_stdout, TRUE);
-+      data->child_stdout = NULL;
-+    }
-+
-+  if (data->child_stderr != NULL)
-+    {
-+      g_string_free (data->child_stderr, TRUE);
-+      data->child_stderr = NULL;
-+    }
-+
-+  if (data->child_stdout_channel != NULL)
-+    {
-+      g_io_channel_unref (data->child_stdout_channel);
-+      data->child_stdout_channel = NULL;
-+    }
-+  if (data->child_stderr_channel != NULL)
-+    {
-+      g_io_channel_unref (data->child_stderr_channel);
-+      data->child_stderr_channel = NULL;
-+    }
-+
-+  if (data->child_stdout_source != NULL)
-+    {
-+      g_source_destroy (data->child_stdout_source);
-+      data->child_stdout_source = NULL;
-+    }
-+  if (data->child_stderr_source != NULL)
-+    {
-+      g_source_destroy (data->child_stderr_source);
-+      data->child_stderr_source = NULL;
-+    }
-+
-+  if (data->child_stdout_fd != -1)
-+    {
-+      g_warn_if_fail (close (data->child_stdout_fd) == 0);
-+      data->child_stdout_fd = -1;
-+    }
-+  if (data->child_stderr_fd != -1)
-+    {
-+      g_warn_if_fail (close (data->child_stderr_fd) == 0);
-+      data->child_stderr_fd = -1;
-+    }
-+
-+  if (data->cancellable_handler_id > 0)
-+    {
-+      g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
-+      data->cancellable_handler_id = 0;
-+    }
-+
-+  if (data->main_context != NULL)
-+    g_main_context_unref (data->main_context);
-+
-+  if (data->cancellable != NULL)
-+    g_object_unref (data->cancellable);
-+
-+  g_slice_free (UtilsSpawnData, data);
-+}
-+
-+/* called in the thread where @cancellable was cancelled */
-+static void
-+utils_on_cancelled (GCancellable *cancellable,
-+                    gpointer      user_data)
-+{
-+  UtilsSpawnData *data = user_data;
-+  GError *error;
-+
-+  error = NULL;
-+  g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
-+  g_simple_async_result_take_error (data->simple, error);
-+  g_simple_async_result_complete_in_idle (data->simple);
-+  g_object_unref (data->simple);
-+}
-+
-+static gboolean
-+utils_read_child_stderr (GIOChannel *channel,
-+                         GIOCondition condition,
-+                         gpointer user_data)
-+{
-+  UtilsSpawnData *data = user_data;
-+  gchar buf[1024];
-+  gsize bytes_read;
-+
-+  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
-+  g_string_append_len (data->child_stderr, buf, bytes_read);
-+  return TRUE;
-+}
-+
-+static gboolean
-+utils_read_child_stdout (GIOChannel *channel,
-+                         GIOCondition condition,
-+                         gpointer user_data)
-+{
-+  UtilsSpawnData *data = user_data;
-+  gchar buf[1024];
-+  gsize bytes_read;
-+
-+  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
-+  g_string_append_len (data->child_stdout, buf, bytes_read);
-+  return TRUE;
-+}
-+
-+static void
-+utils_child_watch_cb (GPid     pid,
-+                      gint     status,
-+                      gpointer user_data)
-+{
-+  UtilsSpawnData *data = user_data;
-+  gchar *buf;
-+  gsize buf_size;
-+
-+  if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
-+    {
-+      g_string_append_len (data->child_stdout, buf, buf_size);
-+      g_free (buf);
-+    }
-+  if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
-+    {
-+      g_string_append_len (data->child_stderr, buf, buf_size);
-+      g_free (buf);
-+    }
-+
-+  data->exit_status = status;
-+
-+  /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
-+  data->child_pid = 0;
-+  data->child_watch_source = NULL;
-+
-+  /* we're done */
-+  g_simple_async_result_complete_in_idle (data->simple);
-+  g_object_unref (data->simple);
-+}
-+
-+static gboolean
-+utils_timeout_cb (gpointer user_data)
-+{
-+  UtilsSpawnData *data = user_data;
-+
-+  data->timed_out = TRUE;
-+
-+  /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
-+  data->timeout_source = NULL;
-+
-+  /* we're done */
-+  g_simple_async_result_complete_in_idle (data->simple);
-+  g_object_unref (data->simple);
-+
-+  return FALSE; /* remove source */
-+}
-+
-+static void
-+utils_spawn (const gchar *const  *argv,
-+             guint                timeout_seconds,
-+             GCancellable        *cancellable,
-+             GAsyncReadyCallback  callback,
-+             gpointer             user_data)
-+{
-+  UtilsSpawnData *data;
-+  GError *error;
-+
-+  data = g_slice_new0 (UtilsSpawnData);
-+  data->timeout_seconds = timeout_seconds;
-+  data->simple = g_simple_async_result_new (NULL,
-+                                            callback,
-+                                            user_data,
-+                                            utils_spawn);
-+  data->main_context = g_main_context_get_thread_default ();
-+  if (data->main_context != NULL)
-+    g_main_context_ref (data->main_context);
-+
-+  data->cancellable = cancellable != NULL ? g_object_ref (cancellable) : NULL;
-+
-+  data->child_stdout = g_string_new (NULL);
-+  data->child_stderr = g_string_new (NULL);
-+  data->child_stdout_fd = -1;
-+  data->child_stderr_fd = -1;
-+
-+  /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
-+  g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
-+
-+  error = NULL;
-+  if (data->cancellable != NULL)
-+    {
-+      /* could already be cancelled */
-+      error = NULL;
-+      if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
-+        {
-+          g_simple_async_result_take_error (data->simple, error);
-+          g_simple_async_result_complete_in_idle (data->simple);
-+          g_object_unref (data->simple);
-+          goto out;
-+        }
-+
-+      data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
-+                                                            G_CALLBACK (utils_on_cancelled),
-+                                                            data,
-+                                                            NULL);
-+    }
-+
-+  error = NULL;
-+  if (!g_spawn_async_with_pipes (NULL, /* working directory */
-+                                 (gchar **) argv,
-+                                 NULL, /* envp */
-+                                 G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
-+                                 NULL, /* child_setup */
-+                                 NULL, /* child_setup's user_data */
-+                                 &(data->child_pid),
-+                                 NULL, /* gint *stdin_fd */
-+                                 &(data->child_stdout_fd),
-+                                 &(data->child_stderr_fd),
-+                                 &error))
-+    {
-+      g_prefix_error (&error, "Error spawning: ");
-+      g_simple_async_result_take_error (data->simple, error);
-+      g_simple_async_result_complete_in_idle (data->simple);
-+      g_object_unref (data->simple);
-+      goto out;
-+    }
-+
-+  if (timeout_seconds > 0)
-+    {
-+      data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
-+      g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
-+      g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
-+      g_source_attach (data->timeout_source, data->main_context);
-+      g_source_unref (data->timeout_source);
-+    }
-+
-+  data->child_watch_source = g_child_watch_source_new (data->child_pid);
-+  g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
-+  g_source_attach (data->child_watch_source, data->main_context);
-+  g_source_unref (data->child_watch_source);
-+
-+  data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
-+  g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
-+  data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
-+  g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
-+  g_source_attach (data->child_stdout_source, data->main_context);
-+  g_source_unref (data->child_stdout_source);
-+
-+  data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
-+  g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
-+  data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
-+  g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
-+  g_source_attach (data->child_stderr_source, data->main_context);
-+  g_source_unref (data->child_stderr_source);
-+
-+ out:
-+  ;
-+}
-+
-+gboolean
-+utils_spawn_finish (GAsyncResult   *res,
-+                    gint           *out_exit_status,
-+                    gchar         **out_standard_output,
-+                    gchar         **out_standard_error,
-+                    GError        **error)
-+{
-+  GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
-+  UtilsSpawnData *data;
-+  gboolean ret = FALSE;
-+
-+  g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
-+  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-+
-+  g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == utils_spawn);
-+
-+  if (g_simple_async_result_propagate_error (simple, error))
-+    goto out;
-+
-+  data = g_simple_async_result_get_op_res_gpointer (simple);
-+
-+  if (data->timed_out)
-+    {
-+      g_set_error (error,
-+                   G_IO_ERROR,
-+                   G_IO_ERROR_TIMED_OUT,
-+                   "Timed out after %d seconds",
-+                   data->timeout_seconds);
-+      goto out;
-+    }
-+
-+  if (out_exit_status != NULL)
-+    *out_exit_status = data->exit_status;
-+
-+  if (out_standard_output != NULL)
-+    *out_standard_output = g_strdup (data->child_stdout->str);
-+
-+  if (out_standard_error != NULL)
-+    *out_standard_error = g_strdup (data->child_stderr->str);
-+
-+  ret = TRUE;
-+
-+ out:
-+  return ret;
-+}
--- 
-GitLab
-
-
-From d74aad8152a7c51999fffa9abe28e4306a052399 Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 13:15:17 +0800
-Subject: [PATCH 02/16] check netgroup.h header file
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index ae98453..543d6fd 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -26,7 +26,11 @@
- #include <errno.h>
- #include <pwd.h>
- #include <grp.h>
-+#ifdef HAVE_NETGROUP_H
-+#include <netgroup.h>
-+#else
- #include <netdb.h>
-+#endif
- #include <string.h>
- #include <glib/gstdio.h>
- #include <locale.h>
--- 
-GitLab
-
-
-From 69c761506cbe458807e4ae2742c9e05bc60dad3d Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 10:59:03 +0800
-Subject: [PATCH 03/16] check return value
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 543d6fd..a54ed5b 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -249,7 +249,11 @@ reload_scripts (PolkitBackendJsAuthority *authority)
-   duk_context *cx = authority->priv->cx;
- 
-   duk_set_top (cx, 0);
--  duk_get_global_string (cx, "polkit");
-+  if (!duk_get_global_string (cx, "polkit")) {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error deleting old rules, not loading new ones");
-+      return;
-+  }
-   duk_push_string (cx, "_deleteRules");
- 
-   duk_call_prop (cx, 0, 0);
--- 
-GitLab
-
-
-From f1536c4899934fd3c8243fda2d084a472fe57d2e Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 11:22:39 +0800
-Subject: [PATCH 04/16] check return value
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index a54ed5b..1a7e6d3 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -656,7 +656,10 @@ push_action_and_details (duk_context               *cx,
-   gchar **keys;
-   guint n;
- 
--  duk_get_global_string (cx, "Action");
-+  if (!duk_get_global_string (cx, "Action")) {
-+    return FALSE;
-+  }
-+
-   duk_new (cx, 0);
- 
-   set_property_str (cx, "id", action_id);
-@@ -699,7 +702,12 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
-   duk_context *cx = authority->priv->cx;
- 
-   duk_set_top (cx, 0);
--  duk_get_global_string (cx, "polkit");
-+  if (!duk_get_global_string (cx, "polkit")) {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                    "Error deleting old rules, not loading new ones");
-+      goto out;
-+  }
-+
-   duk_push_string (cx, "_runAdminRules");
- 
-   if (!push_action_and_details (cx, action_id, details, &error))
--- 
-GitLab
-
-
-From ca15eecf5dc7755947515c1bfc651fd8770aaf8f Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 13:17:16 +0800
-Subject: [PATCH 05/16] check return value
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 1a7e6d3..3f1b32d 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -550,7 +550,10 @@ push_subject (duk_context               *cx,
-   char *seat_str = NULL;
-   char *session_str = NULL;
- 
--  duk_get_global_string (cx, "Subject");
-+  if (!duk_get_global_string (cx, "Subject")) {
-+    return FALSE;
-+  }
-+
-   duk_new (cx, 0);
- 
-   if (POLKIT_IS_UNIX_PROCESS (subject))
-@@ -789,8 +792,11 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
-   gboolean good = FALSE;
-   duk_context *cx = authority->priv->cx;
- 
-+  if (!duk_get_global_string (cx, "polkit")) {
-+      goto out;
-+  }
-+
-   duk_set_top (cx, 0);
--  duk_get_global_string (cx, "polkit");
-   duk_push_string (cx, "_runRules");
- 
-   if (!push_action_and_details (cx, action_id, details, &error))
--- 
-GitLab
-
-
-From 870348365cc0166e14f28e0d144ed552bba4d794 Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 13:18:13 +0800
-Subject: [PATCH 06/16] check return value
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 3f1b32d..6294ad9 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -843,7 +843,8 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
-  out:
-   if (!good)
-     ret = POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED;
--  g_free (ret_str);
-+  if (ret_str != NULL)
-+      g_free (ret_str);
- 
-   return ret;
- }
--- 
-GitLab
-
-
-From 81c916ff08fdcee3c7340c4b2d4632086b89666c Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 11:23:04 +0800
-Subject: [PATCH 07/16] fix typecase
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 6294ad9..d466c9d 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -1191,7 +1191,7 @@ static void
- utils_on_cancelled (GCancellable *cancellable,
-                     gpointer      user_data)
- {
--  UtilsSpawnData *data = user_data;
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-   GError *error;
- 
-   error = NULL;
-@@ -1206,7 +1206,7 @@ utils_read_child_stderr (GIOChannel *channel,
-                          GIOCondition condition,
-                          gpointer user_data)
- {
--  UtilsSpawnData *data = user_data;
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-   gchar buf[1024];
-   gsize bytes_read;
- 
-@@ -1220,7 +1220,7 @@ utils_read_child_stdout (GIOChannel *channel,
-                          GIOCondition condition,
-                          gpointer user_data)
- {
--  UtilsSpawnData *data = user_data;
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-   gchar buf[1024];
-   gsize bytes_read;
- 
-@@ -1234,7 +1234,7 @@ utils_child_watch_cb (GPid     pid,
-                       gint     status,
-                       gpointer user_data)
- {
--  UtilsSpawnData *data = user_data;
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-   gchar *buf;
-   gsize buf_size;
- 
-@@ -1263,7 +1263,7 @@ utils_child_watch_cb (GPid     pid,
- static gboolean
- utils_timeout_cb (gpointer user_data)
- {
--  UtilsSpawnData *data = user_data;
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
- 
-   data->timed_out = TRUE;
- 
--- 
-GitLab
-
-
-From acb956bf52f0a78bf7aaf925876f96e97a146995 Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 18:04:27 +0800
-Subject: [PATCH 08/16] typecase
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index d466c9d..237b1ad 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -915,8 +915,8 @@ spawn_cb (GObject       *source_object,
-           GAsyncResult  *res,
-           gpointer       user_data)
- {
--  SpawnData *data = user_data;
--  data->res = g_object_ref (res);
-+  SpawnData *data = (SpawnData *)user_data;
-+  data->res = (GAsyncResult*)g_object_ref (res);
-   g_main_loop_quit (data->loop);
- }
- 
-@@ -1292,12 +1292,12 @@ utils_spawn (const gchar *const  *argv,
-   data->simple = g_simple_async_result_new (NULL,
-                                             callback,
-                                             user_data,
--                                            utils_spawn);
-+                                            (gpointer*)utils_spawn);
-   data->main_context = g_main_context_get_thread_default ();
-   if (data->main_context != NULL)
-     g_main_context_ref (data->main_context);
- 
--  data->cancellable = cancellable != NULL ? g_object_ref (cancellable) : NULL;
-+  data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
- 
-   data->child_stdout = g_string_new (NULL);
-   data->child_stderr = g_string_new (NULL);
-@@ -1397,7 +1397,7 @@ utils_spawn_finish (GAsyncResult   *res,
-   if (g_simple_async_result_propagate_error (simple, error))
-     goto out;
- 
--  data = g_simple_async_result_get_op_res_gpointer (simple);
-+  data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
- 
-   if (data->timed_out)
-     {
--- 
-GitLab
-
-
-From be060e4d48aceb09af34868b555b6c73c7afdabb Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 13:53:23 +0800
-Subject: [PATCH 09/16] some change
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- .../polkitbackendduktapeauthority.c           | 26 +++++++++++--------
- 1 file changed, 15 insertions(+), 11 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 237b1ad..fad9017 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -207,18 +207,22 @@ load_scripts (PolkitBackendJsAuthority  *authority)
- 
-   for (l = files; l != NULL; l = l->next)
-     {
--      const gchar *filename = l->data;
--
-+      const gchar *filename = (gchar *)l->data;
- #if (DUK_VERSION >= 20000)
--      gchar *contents;
--      gsize length;
--      GError *error = NULL;
--      if (!g_file_get_contents (filename, &contents, &length, &error)){
--        g_warning("Error when file contents of %s: %s\n", filename, error->message);
--        g_error_free (error);
--        continue;
--      }
--      if (duk_peval_lstring_noresult(cx, contents,length) != 0)
-+      GFile *file = g_file_new_for_path (filename);
-+      char *contents;
-+      gsize len;
-+      if (!g_file_load_contents (file, NULL, &contents, &len, NULL, NULL))
-+        {
-+          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                        "Error compiling script %s",
-+                                        filename);
-+          g_object_unref (file);
-+          continue;
-+        }
-+
-+      g_object_unref (file);
-+      if (duk_peval_lstring_noresult(cx, contents,len) != 0)
- #else
-       if (duk_peval_file_noresult (cx, filename) != 0)
- #endif
--- 
-GitLab
-
-
-From 2ffb62048a5ebedfe3bb053feb7385c7270ede28 Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 15:25:45 +0800
-Subject: [PATCH 10/16] some change
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- .../polkitbackendduktapeauthority.c           | 24 +++++++++----------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index fad9017..6fac3be 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -125,6 +125,18 @@ G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BAC
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
-+static duk_ret_t js_polkit_log (duk_context *cx);
-+static duk_ret_t js_polkit_spawn (duk_context *cx);
-+static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
-+
-+static const duk_function_list_entry js_polkit_functions[] =
-+{
-+  { "log", js_polkit_log, 1 },
-+  { "spawn", js_polkit_spawn, 1 },
-+  { "_userIsInNetGroup", js_polkit_user_is_in_netgroup, 2 },
-+  { NULL, NULL, 0 },
-+};
-+
- static void
- polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
- {
-@@ -347,18 +359,6 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
-   authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
- }
- 
--static duk_ret_t js_polkit_log (duk_context *cx);
--static duk_ret_t js_polkit_spawn (duk_context *cx);
--static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
--
--static const duk_function_list_entry js_polkit_functions[] =
--{
--  { "log", js_polkit_log, 1 },
--  { "spawn", js_polkit_spawn, 1 },
--  { "_userIsInNetGroup", js_polkit_user_is_in_netgroup, 2 },
--  { NULL, NULL, 0 },
--};
--
- static void
- polkit_backend_js_authority_constructed (GObject *object)
- {
--- 
-GitLab
-
-
-From edb70ef69eed3275f5654510d135e680eb46c85d Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 15:25:35 +0800
-Subject: [PATCH 11/16] remove WATCHDOG_TIMEOUT define
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 6fac3be..51e03fd 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -69,7 +69,6 @@ struct _PolkitBackendJsAuthorityPrivate
-   duk_context *cx;
- };
- 
--#define WATCHDOG_TIMEOUT (15 * G_TIME_SPAN_SECOND)
- 
- static void utils_spawn (const gchar *const  *argv,
-                          guint                timeout_seconds,
--- 
-GitLab
-
-
-From 906ae404f29f15ef8c529b999bf091b5d18ed7ac Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 12:46:40 +0800
-Subject: [PATCH 12/16] add meson build system support
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- meson.build                   | 11 ++++++++++-
- meson_options.txt             |  1 +
- src/polkitbackend/meson.build | 10 ++++++++--
- 3 files changed, 19 insertions(+), 3 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 858078d..4e44723 100644
---- a/meson.build
-+++ b/meson.build
-@@ -133,7 +133,13 @@ expat_dep = dependency('expat')
- assert(cc.has_header('expat.h', dependencies: expat_dep), 'Can\'t find expat.h. Please install expat.')
- assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t find expat library. Please install expat.')
- 
--mozjs_dep = dependency('mozjs-78')
-+js_engine = get_option('js_engine')
-+if js_engine == 'duktape'
-+  js_dep = dependency('duktape')
-+  libm_dep = cc.find_library('m')
-+elif js_engine == 'mozjs'
-+  js_dep = dependency('mozjs-78')
-+endif
- 
- dbus_dep = dependency('dbus-1', required: false)
- dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
-@@ -361,6 +367,9 @@ if enable_logind
-   output += '        systemdsystemunitdir:     ' + systemd_systemdsystemunitdir + '\n'
- endif
- output += '        polkitd user:             ' + polkitd_user + ' \n'
-+output += '        Javascript engine:        ' + js_engine + '\n'
-+if enable_logind
-+endif
- output += '        PAM support:              ' + enable_pam.to_string() + '\n\n'
- if enable_pam
-   output += '        PAM file auth:            ' + pam_conf['PAM_FILE_INCLUDE_AUTH'] + '\n'
-diff --git a/meson_options.txt b/meson_options.txt
-index 25e3e77..76aa311 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -16,3 +16,4 @@ option('introspection', type: 'boolean', value: true, description: 'Enable intro
- 
- option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
- option('man', type: 'boolean', value: false, description: 'build manual pages')
-+option('js_engine', type: 'combo', choices: ['mozjs', 'duktape'], value: 'duktape', description: 'javascript engine')
-diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build
-index 64f0e4a..489897d 100644
---- a/src/polkitbackend/meson.build
-+++ b/src/polkitbackend/meson.build
-@@ -5,7 +5,6 @@ sources = files(
-   'polkitbackendactionpool.c',
-   'polkitbackendauthority.c',
-   'polkitbackendinteractiveauthority.c',
--  'polkitbackendjsauthority.cpp',
- )
- 
- output = 'initjs.h'
-@@ -21,7 +20,7 @@ sources += custom_target(
- deps = [
-   expat_dep,
-   libpolkit_gobject_dep,
--  mozjs_dep,
-+  js_dep,
- ]
- 
- c_flags = [
-@@ -31,6 +30,13 @@ c_flags = [
-   '-DPACKAGE_SYSCONF_DIR="@0@"'.format(pk_prefix / pk_sysconfdir),
- ]
- 
-+if js_engine == 'duktape'
-+  sources += files('polkitbackendduktapeauthority.c')
-+  deps += libm_dep
-+elif js_engine == 'mozjs'
-+  sources += files('polkitbackendjsauthority.cpp')
-+endif
-+
- if enable_logind
-   sources += files('polkitbackendsessionmonitor-systemd.c')
- 
--- 
-GitLab
-
-
-From 1380b505c25be4aebe54b1b4223a570d64af83cc Mon Sep 17 00:00:00 2001
-From: Wu Xiaotian <yetist@gmail.com>
-Date: Sun, 22 Nov 2020 18:49:14 +0800
-Subject: [PATCH 13/16] fix run error
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/polkitbackendduktapeauthority.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 51e03fd..4b4f8fd 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -795,11 +795,11 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
-   gboolean good = FALSE;
-   duk_context *cx = authority->priv->cx;
- 
-+  duk_set_top (cx, 0);
-   if (!duk_get_global_string (cx, "polkit")) {
-       goto out;
-   }
- 
--  duk_set_top (cx, 0);
-   duk_push_string (cx, "_runRules");
- 
-   if (!push_action_and_details (cx, action_id, details, &error))
--- 
-GitLab
-
-
-From 6856a704b70378948ef5f66e9b09555d97d4070b Mon Sep 17 00:00:00 2001
-From: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
-Date: Fri, 10 Sep 2021 15:17:58 -0700
-Subject: [PATCH 14/16] Deduplicate code for "Add duktape as JS engine backend"
- effort/MR
-
-This leverages Wu Xiaotian (@yetist)'s original MR
-(https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35), in
-an effort to complete said work.
-
-This is the first of the requests from maintainers--to reduce
-eliminate code duplication.
-
-The runaway-killer missing functionality will come in the sequence.
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- src/polkitbackend/Makefile.am                 |   1 +
- src/polkitbackend/meson.build                 |   1 +
- src/polkitbackend/polkitbackendcommon.c       | 530 +++++++++++++
- src/polkitbackend/polkitbackendcommon.h       | 156 ++++
- .../polkitbackendduktapeauthority.c           | 714 ++----------------
- .../polkitbackendjsauthority.cpp              | 711 ++---------------
- 6 files changed, 790 insertions(+), 1323 deletions(-)
- create mode 100644 src/polkitbackend/polkitbackendcommon.c
- create mode 100644 src/polkitbackend/polkitbackendcommon.h
-
-diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am
-index abcbc6f..6a8b4ae 100644
---- a/src/polkitbackend/Makefile.am
-+++ b/src/polkitbackend/Makefile.am
-@@ -31,6 +31,7 @@ libpolkit_backend_1_la_SOURCES =                                   			\
-         polkitbackend.h									\
- 	polkitbackendtypes.h								\
- 	polkitbackendprivate.h								\
-+	polkitbackendcommon.h			polkitbackendcommon.c			\
- 	polkitbackendauthority.h		polkitbackendauthority.c		\
- 	polkitbackendinteractiveauthority.h	polkitbackendinteractiveauthority.c	\
- 	polkitbackendjsauthority.h				\
-diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build
-index 489897d..9ec01b2 100644
---- a/src/polkitbackend/meson.build
-+++ b/src/polkitbackend/meson.build
-@@ -4,6 +4,7 @@ sources = files(
-   'polkitbackendactionlookup.c',
-   'polkitbackendactionpool.c',
-   'polkitbackendauthority.c',
-+  'polkitbackendcommon.c',
-   'polkitbackendinteractiveauthority.c',
- )
- 
-diff --git a/src/polkitbackend/polkitbackendcommon.c b/src/polkitbackend/polkitbackendcommon.c
-new file mode 100644
-index 0000000..6783dff
---- /dev/null
-+++ b/src/polkitbackend/polkitbackendcommon.c
-@@ -0,0 +1,530 @@
-+/*
-+ * Copyright (C) 2008 Red Hat, Inc.
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General
-+ * Public License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ *
-+ * Author: David Zeuthen <davidz@redhat.com>
-+ */
-+
-+#include "polkitbackendcommon.h"
-+
-+static void
-+utils_child_watch_from_release_cb (GPid     pid,
-+                                   gint     status,
-+                                   gpointer user_data)
-+{
-+}
-+
-+static void
-+utils_spawn_data_free (UtilsSpawnData *data)
-+{
-+  if (data->timeout_source != NULL)
-+    {
-+      g_source_destroy (data->timeout_source);
-+      data->timeout_source = NULL;
-+    }
-+
-+  /* Nuke the child, if necessary */
-+  if (data->child_watch_source != NULL)
-+    {
-+      g_source_destroy (data->child_watch_source);
-+      data->child_watch_source = NULL;
-+    }
-+
-+  if (data->child_pid != 0)
-+    {
-+      GSource *source;
-+      kill (data->child_pid, SIGTERM);
-+      /* OK, we need to reap for the child ourselves - we don't want
-+       * to use waitpid() because that might block the calling
-+       * thread (the child might handle SIGTERM and use several
-+       * seconds for cleanup/rollback).
-+       *
-+       * So we use GChildWatch instead.
-+       *
-+       * Avoid taking a references to ourselves. but note that we need
-+       * to pass the GSource so we can nuke it once handled.
-+       */
-+      source = g_child_watch_source_new (data->child_pid);
-+      g_source_set_callback (source,
-+                             (GSourceFunc) utils_child_watch_from_release_cb,
-+                             source,
-+                             (GDestroyNotify) g_source_destroy);
-+      g_source_attach (source, data->main_context);
-+      g_source_unref (source);
-+      data->child_pid = 0;
-+    }
-+
-+  if (data->child_stdout != NULL)
-+    {
-+      g_string_free (data->child_stdout, TRUE);
-+      data->child_stdout = NULL;
-+    }
-+
-+  if (data->child_stderr != NULL)
-+    {
-+      g_string_free (data->child_stderr, TRUE);
-+      data->child_stderr = NULL;
-+    }
-+
-+  if (data->child_stdout_channel != NULL)
-+    {
-+      g_io_channel_unref (data->child_stdout_channel);
-+      data->child_stdout_channel = NULL;
-+    }
-+  if (data->child_stderr_channel != NULL)
-+    {
-+      g_io_channel_unref (data->child_stderr_channel);
-+      data->child_stderr_channel = NULL;
-+    }
-+
-+  if (data->child_stdout_source != NULL)
-+    {
-+      g_source_destroy (data->child_stdout_source);
-+      data->child_stdout_source = NULL;
-+    }
-+  if (data->child_stderr_source != NULL)
-+    {
-+      g_source_destroy (data->child_stderr_source);
-+      data->child_stderr_source = NULL;
-+    }
-+
-+  if (data->child_stdout_fd != -1)
-+    {
-+      g_warn_if_fail (close (data->child_stdout_fd) == 0);
-+      data->child_stdout_fd = -1;
-+    }
-+  if (data->child_stderr_fd != -1)
-+    {
-+      g_warn_if_fail (close (data->child_stderr_fd) == 0);
-+      data->child_stderr_fd = -1;
-+    }
-+
-+  if (data->cancellable_handler_id > 0)
-+    {
-+      g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
-+      data->cancellable_handler_id = 0;
-+    }
-+
-+  if (data->main_context != NULL)
-+    g_main_context_unref (data->main_context);
-+
-+  if (data->cancellable != NULL)
-+    g_object_unref (data->cancellable);
-+
-+  g_slice_free (UtilsSpawnData, data);
-+}
-+
-+/* called in the thread where @cancellable was cancelled */
-+static void
-+utils_on_cancelled (GCancellable *cancellable,
-+                    gpointer      user_data)
-+{
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-+  GError *error;
-+
-+  error = NULL;
-+  g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
-+  g_simple_async_result_take_error (data->simple, error);
-+  g_simple_async_result_complete_in_idle (data->simple);
-+  g_object_unref (data->simple);
-+}
-+
-+static gboolean
-+utils_timeout_cb (gpointer user_data)
-+{
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-+
-+  data->timed_out = TRUE;
-+
-+  /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
-+  data->timeout_source = NULL;
-+
-+  /* we're done */
-+  g_simple_async_result_complete_in_idle (data->simple);
-+  g_object_unref (data->simple);
-+
-+  return FALSE; /* remove source */
-+}
-+
-+static void
-+utils_child_watch_cb (GPid     pid,
-+                      gint     status,
-+                      gpointer user_data)
-+{
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-+  gchar *buf;
-+  gsize buf_size;
-+
-+  if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
-+    {
-+      g_string_append_len (data->child_stdout, buf, buf_size);
-+      g_free (buf);
-+    }
-+  if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
-+    {
-+      g_string_append_len (data->child_stderr, buf, buf_size);
-+      g_free (buf);
-+    }
-+
-+  data->exit_status = status;
-+
-+  /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
-+  data->child_pid = 0;
-+  data->child_watch_source = NULL;
-+
-+  /* we're done */
-+  g_simple_async_result_complete_in_idle (data->simple);
-+  g_object_unref (data->simple);
-+}
-+
-+static gboolean
-+utils_read_child_stderr (GIOChannel *channel,
-+                         GIOCondition condition,
-+                         gpointer user_data)
-+{
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-+  gchar buf[1024];
-+  gsize bytes_read;
-+
-+  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
-+  g_string_append_len (data->child_stderr, buf, bytes_read);
-+  return TRUE;
-+}
-+
-+static gboolean
-+utils_read_child_stdout (GIOChannel *channel,
-+                         GIOCondition condition,
-+                         gpointer user_data)
-+{
-+  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
-+  gchar buf[1024];
-+  gsize bytes_read;
-+
-+  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
-+  g_string_append_len (data->child_stdout, buf, bytes_read);
-+  return TRUE;
-+}
-+
-+void
-+polkit_backend_common_spawn (const gchar *const  *argv,
-+                             guint                timeout_seconds,
-+                             GCancellable        *cancellable,
-+                             GAsyncReadyCallback  callback,
-+                             gpointer             user_data)
-+{
-+  UtilsSpawnData *data;
-+  GError *error;
-+
-+  data = g_slice_new0 (UtilsSpawnData);
-+  data->timeout_seconds = timeout_seconds;
-+  data->simple = g_simple_async_result_new (NULL,
-+                                            callback,
-+                                            user_data,
-+                                            (gpointer*)polkit_backend_common_spawn);
-+  data->main_context = g_main_context_get_thread_default ();
-+  if (data->main_context != NULL)
-+    g_main_context_ref (data->main_context);
-+
-+  data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
-+
-+  data->child_stdout = g_string_new (NULL);
-+  data->child_stderr = g_string_new (NULL);
-+  data->child_stdout_fd = -1;
-+  data->child_stderr_fd = -1;
-+
-+  /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
-+  g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
-+
-+  error = NULL;
-+  if (data->cancellable != NULL)
-+    {
-+      /* could already be cancelled */
-+      error = NULL;
-+      if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
-+        {
-+          g_simple_async_result_take_error (data->simple, error);
-+          g_simple_async_result_complete_in_idle (data->simple);
-+          g_object_unref (data->simple);
-+          goto out;
-+        }
-+
-+      data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
-+                                                            G_CALLBACK (utils_on_cancelled),
-+                                                            data,
-+                                                            NULL);
-+    }
-+
-+  error = NULL;
-+  if (!g_spawn_async_with_pipes (NULL, /* working directory */
-+                                 (gchar **) argv,
-+                                 NULL, /* envp */
-+                                 G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
-+                                 NULL, /* child_setup */
-+                                 NULL, /* child_setup's user_data */
-+                                 &(data->child_pid),
-+                                 NULL, /* gint *stdin_fd */
-+                                 &(data->child_stdout_fd),
-+                                 &(data->child_stderr_fd),
-+                                 &error))
-+    {
-+      g_prefix_error (&error, "Error spawning: ");
-+      g_simple_async_result_take_error (data->simple, error);
-+      g_simple_async_result_complete_in_idle (data->simple);
-+      g_object_unref (data->simple);
-+      goto out;
-+    }
-+
-+  if (timeout_seconds > 0)
-+    {
-+      data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
-+      g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
-+      g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
-+      g_source_attach (data->timeout_source, data->main_context);
-+      g_source_unref (data->timeout_source);
-+    }
-+
-+  data->child_watch_source = g_child_watch_source_new (data->child_pid);
-+  g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
-+  g_source_attach (data->child_watch_source, data->main_context);
-+  g_source_unref (data->child_watch_source);
-+
-+  data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
-+  g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
-+  data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
-+  g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
-+  g_source_attach (data->child_stdout_source, data->main_context);
-+  g_source_unref (data->child_stdout_source);
-+
-+  data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
-+  g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
-+  data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
-+  g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
-+  g_source_attach (data->child_stderr_source, data->main_context);
-+  g_source_unref (data->child_stderr_source);
-+
-+ out:
-+  ;
-+}
-+
-+void
-+polkit_backend_common_on_dir_monitor_changed (GFileMonitor     *monitor,
-+                                              GFile            *file,
-+                                              GFile            *other_file,
-+                                              GFileMonitorEvent event_type,
-+                                              gpointer          user_data)
-+{
-+  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
-+
-+  /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
-+   *       Because when editing a file with emacs we get 4-8 events..
-+   */
-+
-+  if (file != NULL)
-+    {
-+      gchar *name;
-+
-+      name = g_file_get_basename (file);
-+
-+      /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
-+      if (!g_str_has_prefix (name, ".") &&
-+          !g_str_has_prefix (name, "#") &&
-+          g_str_has_suffix (name, ".rules") &&
-+          (event_type == G_FILE_MONITOR_EVENT_CREATED ||
-+           event_type == G_FILE_MONITOR_EVENT_DELETED ||
-+           event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
-+        {
-+          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                        "Reloading rules");
-+          polkit_backend_common_reload_scripts (authority);
-+        }
-+      g_free (name);
-+    }
-+}
-+
-+gboolean
-+polkit_backend_common_spawn_finish (GAsyncResult   *res,
-+                                    gint           *out_exit_status,
-+                                    gchar         **out_standard_output,
-+                                    gchar         **out_standard_error,
-+                                    GError        **error)
-+{
-+  GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
-+  UtilsSpawnData *data;
-+  gboolean ret = FALSE;
-+
-+  g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
-+  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-+
-+  g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == polkit_backend_common_spawn);
-+
-+  if (g_simple_async_result_propagate_error (simple, error))
-+    goto out;
-+
-+  data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
-+
-+  if (data->timed_out)
-+    {
-+      g_set_error (error,
-+                   G_IO_ERROR,
-+                   G_IO_ERROR_TIMED_OUT,
-+                   "Timed out after %d seconds",
-+                   data->timeout_seconds);
-+      goto out;
-+    }
-+
-+  if (out_exit_status != NULL)
-+    *out_exit_status = data->exit_status;
-+
-+  if (out_standard_output != NULL)
-+    *out_standard_output = g_strdup (data->child_stdout->str);
-+
-+  if (out_standard_error != NULL)
-+    *out_standard_error = g_strdup (data->child_stderr->str);
-+
-+  ret = TRUE;
-+
-+ out:
-+  return ret;
-+}
-+
-+static const gchar *
-+polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
-+{
-+  return "js";
-+}
-+
-+static const gchar *
-+polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
-+{
-+  return PACKAGE_VERSION;
-+}
-+
-+static PolkitAuthorityFeatures
-+polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
-+{
-+  return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
-+}
-+
-+void
-+polkit_backend_common_js_authority_class_init_common (PolkitBackendJsAuthorityClass *klass)
-+{
-+  GObjectClass *gobject_class;
-+  PolkitBackendAuthorityClass *authority_class;
-+  PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
-+
-+  gobject_class = G_OBJECT_CLASS (klass);
-+  gobject_class->finalize                               = polkit_backend_common_js_authority_finalize;
-+  gobject_class->set_property                           = polkit_backend_common_js_authority_set_property;
-+  gobject_class->constructed                            = polkit_backend_common_js_authority_constructed;
-+
-+  authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
-+  authority_class->get_name                             = polkit_backend_js_authority_get_name;
-+  authority_class->get_version                          = polkit_backend_js_authority_get_version;
-+  authority_class->get_features                         = polkit_backend_js_authority_get_features;
-+
-+  interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
-+  interactive_authority_class->get_admin_identities     = polkit_backend_common_js_authority_get_admin_auth_identities;
-+  interactive_authority_class->check_authorization_sync = polkit_backend_common_js_authority_check_authorization_sync;
-+
-+  g_object_class_install_property (gobject_class,
-+                                   PROP_RULES_DIRS,
-+                                   g_param_spec_boxed ("rules-dirs",
-+                                                       NULL,
-+                                                       NULL,
-+                                                       G_TYPE_STRV,
-+                                                       G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
-+}
-+
-+gint
-+polkit_backend_common_rules_file_name_cmp (const gchar *a,
-+                                           const gchar *b)
-+{
-+  gint ret;
-+  const gchar *a_base;
-+  const gchar *b_base;
-+
-+  a_base = strrchr (a, '/');
-+  b_base = strrchr (b, '/');
-+
-+  g_assert (a_base != NULL);
-+  g_assert (b_base != NULL);
-+  a_base += 1;
-+  b_base += 1;
-+
-+  ret = g_strcmp0 (a_base, b_base);
-+  if (ret == 0)
-+    {
-+      /* /etc wins over /usr */
-+      ret = g_strcmp0 (a, b);
-+      g_assert (ret != 0);
-+    }
-+
-+  return ret;
-+}
-+
-+const gchar *
-+polkit_backend_common_get_signal_name (gint signal_number)
-+{
-+  switch (signal_number)
-+    {
-+#define _HANDLE_SIG(sig) case sig: return #sig;
-+    _HANDLE_SIG (SIGHUP);
-+    _HANDLE_SIG (SIGINT);
-+    _HANDLE_SIG (SIGQUIT);
-+    _HANDLE_SIG (SIGILL);
-+    _HANDLE_SIG (SIGABRT);
-+    _HANDLE_SIG (SIGFPE);
-+    _HANDLE_SIG (SIGKILL);
-+    _HANDLE_SIG (SIGSEGV);
-+    _HANDLE_SIG (SIGPIPE);
-+    _HANDLE_SIG (SIGALRM);
-+    _HANDLE_SIG (SIGTERM);
-+    _HANDLE_SIG (SIGUSR1);
-+    _HANDLE_SIG (SIGUSR2);
-+    _HANDLE_SIG (SIGCHLD);
-+    _HANDLE_SIG (SIGCONT);
-+    _HANDLE_SIG (SIGSTOP);
-+    _HANDLE_SIG (SIGTSTP);
-+    _HANDLE_SIG (SIGTTIN);
-+    _HANDLE_SIG (SIGTTOU);
-+    _HANDLE_SIG (SIGBUS);
-+#ifdef SIGPOLL
-+    _HANDLE_SIG (SIGPOLL);
-+#endif
-+    _HANDLE_SIG (SIGPROF);
-+    _HANDLE_SIG (SIGSYS);
-+    _HANDLE_SIG (SIGTRAP);
-+    _HANDLE_SIG (SIGURG);
-+    _HANDLE_SIG (SIGVTALRM);
-+    _HANDLE_SIG (SIGXCPU);
-+    _HANDLE_SIG (SIGXFSZ);
-+#undef _HANDLE_SIG
-+    default:
-+      break;
-+    }
-+  return "UNKNOWN_SIGNAL";
-+}
-+
-+void
-+polkit_backend_common_spawn_cb (GObject       *source_object,
-+                                GAsyncResult  *res,
-+                                gpointer       user_data)
-+{
-+  SpawnData *data = (SpawnData *)user_data;
-+  data->res = (GAsyncResult*)g_object_ref (res);
-+  g_main_loop_quit (data->loop);
-+}
-diff --git a/src/polkitbackend/polkitbackendcommon.h b/src/polkitbackend/polkitbackendcommon.h
-new file mode 100644
-index 0000000..6d0d267
---- /dev/null
-+++ b/src/polkitbackend/polkitbackendcommon.h
-@@ -0,0 +1,156 @@
-+/*
-+ * Copyright (C) 2008 Red Hat, Inc.
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General
-+ * Public License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ *
-+ * Author: David Zeuthen <davidz@redhat.com>
-+ */
-+
-+#if !defined (_POLKIT_BACKEND_COMPILATION) && !defined(_POLKIT_BACKEND_INSIDE_POLKIT_BACKEND_H)
-+#error "Only <polkitbackend/polkitbackend.h> can be included directly, this file may disappear or change contents."
-+#endif
-+
-+#ifndef __POLKIT_BACKEND_COMMON_H
-+#define __POLKIT_BACKEND_COMMON_H
-+
-+#include "config.h"
-+#include <sys/wait.h>
-+#include <errno.h>
-+#include <pwd.h>
-+#include <grp.h>
-+#ifdef HAVE_NETGROUP_H
-+#include <netgroup.h>
-+#else
-+#include <netdb.h>
-+#endif
-+#include <string.h>
-+#include <glib/gstdio.h>
-+#include <locale.h>
-+#include <glib/gi18n-lib.h> //here, all things glib via glib.h (including -> gspawn.h)
-+
-+#include <polkit/polkit.h>
-+#include "polkitbackendjsauthority.h"
-+
-+#include <polkit/polkitprivate.h>
-+
-+#ifdef HAVE_LIBSYSTEMD
-+#include <systemd/sd-login.h>
-+#endif /* HAVE_LIBSYSTEMD */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+enum
-+{
-+  PROP_0,
-+  PROP_RULES_DIRS,
-+};
-+
-+typedef struct
-+{
-+  GSimpleAsyncResult *simple; /* borrowed reference */
-+  GMainContext *main_context; /* may be NULL */
-+
-+  GCancellable *cancellable;  /* may be NULL */
-+  gulong cancellable_handler_id;
-+
-+  GPid child_pid;
-+  gint child_stdout_fd;
-+  gint child_stderr_fd;
-+
-+  GIOChannel *child_stdout_channel;
-+  GIOChannel *child_stderr_channel;
-+
-+  GSource *child_watch_source;
-+  GSource *child_stdout_source;
-+  GSource *child_stderr_source;
-+
-+  guint timeout_seconds;
-+  gboolean timed_out;
-+  GSource *timeout_source;
-+
-+  GString *child_stdout;
-+  GString *child_stderr;
-+
-+  gint exit_status;
-+} UtilsSpawnData;
-+
-+typedef struct
-+{
-+  GMainLoop *loop;
-+  GAsyncResult *res;
-+} SpawnData;
-+
-+void polkit_backend_common_spawn (const gchar *const  *argv,
-+                                  guint                timeout_seconds,
-+                                  GCancellable        *cancellable,
-+                                  GAsyncReadyCallback  callback,
-+                                  gpointer             user_data);
-+void polkit_backend_common_spawn_cb (GObject       *source_object,
-+                                     GAsyncResult  *res,
-+                                     gpointer       user_data);
-+gboolean polkit_backend_common_spawn_finish (GAsyncResult   *res,
-+                                             gint           *out_exit_status,
-+                                             gchar         **out_standard_output,
-+                                             gchar         **out_standard_error,
-+                                             GError        **error);
-+
-+void polkit_backend_common_on_dir_monitor_changed (GFileMonitor     *monitor,
-+                                                   GFile            *file,
-+                                                   GFile            *other_file,
-+                                                   GFileMonitorEvent event_type,
-+                                                   gpointer          user_data);
-+
-+void polkit_backend_common_js_authority_class_init_common (PolkitBackendJsAuthorityClass *klass);
-+
-+gint polkit_backend_common_rules_file_name_cmp (const gchar *a,
-+                                                const gchar *b);
-+
-+const gchar *polkit_backend_common_get_signal_name (gint signal_number);
-+
-+/* To be provided by each JS backend, from here onwards  ---------------------------------------------- */
-+
-+void polkit_backend_common_reload_scripts (PolkitBackendJsAuthority *authority);
-+void polkit_backend_common_js_authority_finalize (GObject *object);
-+void polkit_backend_common_js_authority_constructed (GObject *object);
-+GList *polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
-+                                                                     PolkitSubject                     *caller,
-+                                                                     PolkitSubject                     *subject,
-+                                                                     PolkitIdentity                    *user_for_subject,
-+                                                                     gboolean                           subject_is_local,
-+                                                                     gboolean                           subject_is_active,
-+                                                                     const gchar                       *action_id,
-+                                                                     PolkitDetails                     *details);
-+void polkit_backend_common_js_authority_set_property (GObject      *object,
-+                                                      guint         property_id,
-+                                                      const GValue *value,
-+                                                      GParamSpec   *pspec);
-+PolkitImplicitAuthorization polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
-+                                                                                         PolkitSubject                     *caller,
-+                                                                                         PolkitSubject                     *subject,
-+                                                                                         PolkitIdentity                    *user_for_subject,
-+                                                                                         gboolean                           subject_is_local,
-+                                                                                         gboolean                           subject_is_active,
-+                                                                                         const gchar                       *action_id,
-+                                                                                         PolkitDetails                     *details,
-+                                                                                         PolkitImplicitAuthorization        implicit);
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* __POLKIT_BACKEND_COMMON_H */
-+
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index 4b4f8fd..a2b4420 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -21,32 +21,12 @@
-  * Author: David Zeuthen <davidz@redhat.com>
-  */
- 
--#include "config.h"
--#include <sys/wait.h>
--#include <errno.h>
--#include <pwd.h>
--#include <grp.h>
--#ifdef HAVE_NETGROUP_H
--#include <netgroup.h>
--#else
--#include <netdb.h>
--#endif
--#include <string.h>
--#include <glib/gstdio.h>
--#include <locale.h>
--#include <glib/gi18n-lib.h>
--
--#include <polkit/polkit.h>
--#include "polkitbackendjsauthority.h"
--
--#include <polkit/polkitprivate.h>
-+#include "polkitbackendcommon.h"
- 
--#ifdef HAVE_LIBSYSTEMD
--#include <systemd/sd-login.h>
--#endif /* HAVE_LIBSYSTEMD */
-+#include "duktape.h"
- 
-+/* Built source and not too big to worry about deduplication */
- #include "initjs.h" /* init.js */
--#include "duktape.h"
- 
- /**
-  * SECTION:polkitbackendjsauthority
-@@ -54,10 +34,9 @@
-  * @short_description: JS Authority
-  * @stability: Unstable
-  *
-- * An implementation of #PolkitBackendAuthority that reads and
-- * evalates Javascript files and supports interaction with
-- * authentication agents (virtue of being based on
-- * #PolkitBackendInteractiveAuthority).
-+ * An (Duktape-based) implementation of #PolkitBackendAuthority that reads and
-+ * evaluates Javascript files and supports interaction with authentication
-+ * agents (virtue of being based on #PolkitBackendInteractiveAuthority).
-  */
- 
- /* ---------------------------------------------------------------------------------------------------- */
-@@ -66,64 +45,16 @@ struct _PolkitBackendJsAuthorityPrivate
- {
-   gchar **rules_dirs;
-   GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */
--  duk_context *cx;
--};
--
--
--static void utils_spawn (const gchar *const  *argv,
--                         guint                timeout_seconds,
--                         GCancellable        *cancellable,
--                         GAsyncReadyCallback  callback,
--                         gpointer             user_data);
--
--gboolean utils_spawn_finish (GAsyncResult   *res,
--                             gint           *out_exit_status,
--                             gchar         **out_standard_output,
--                             gchar         **out_standard_error,
--                             GError        **error);
- 
--static void on_dir_monitor_changed (GFileMonitor     *monitor,
--                                    GFile            *file,
--                                    GFile            *other_file,
--                                    GFileMonitorEvent event_type,
--                                    gpointer          user_data);
--
--/* ---------------------------------------------------------------------------------------------------- */
--
--enum
--{
--  PROP_0,
--  PROP_RULES_DIRS,
-+  duk_context *cx;
- };
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static GList *polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *authority,
--                                                                     PolkitSubject                     *caller,
--                                                                     PolkitSubject                     *subject,
--                                                                     PolkitIdentity                    *user_for_subject,
--                                                                     gboolean                           subject_is_local,
--                                                                     gboolean                           subject_is_active,
--                                                                     const gchar                       *action_id,
--                                                                     PolkitDetails                     *details);
--
--static PolkitImplicitAuthorization polkit_backend_js_authority_check_authorization_sync (
--                                                          PolkitBackendInteractiveAuthority *authority,
--                                                          PolkitSubject                     *caller,
--                                                          PolkitSubject                     *subject,
--                                                          PolkitIdentity                    *user_for_subject,
--                                                          gboolean                           subject_is_local,
--                                                          gboolean                           subject_is_active,
--                                                          const gchar                       *action_id,
--                                                          PolkitDetails                     *details,
--                                                          PolkitImplicitAuthorization        implicit);
--
- G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--/* ---------------------------------------------------------------------------------------------------- */
--
- static duk_ret_t js_polkit_log (duk_context *cx);
- static duk_ret_t js_polkit_spawn (duk_context *cx);
- static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
-@@ -144,33 +75,6 @@ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
-                                                  PolkitBackendJsAuthorityPrivate);
- }
- 
--static gint
--rules_file_name_cmp (const gchar *a,
--                     const gchar *b)
--{
--  gint ret;
--  const gchar *a_base;
--  const gchar *b_base;
--
--  a_base = strrchr (a, '/');
--  b_base = strrchr (b, '/');
--
--  g_assert (a_base != NULL);
--  g_assert (b_base != NULL);
--  a_base += 1;
--  b_base += 1;
--
--  ret = g_strcmp0 (a_base, b_base);
--  if (ret == 0)
--    {
--      /* /etc wins over /usr */
--      ret = g_strcmp0 (a, b);
--      g_assert (ret != 0);
--    }
--
--  return ret;
--}
--
- static void
- load_scripts (PolkitBackendJsAuthority  *authority)
- {
-@@ -214,7 +118,7 @@ load_scripts (PolkitBackendJsAuthority  *authority)
-         }
-     }
- 
--  files = g_list_sort (files, (GCompareFunc) rules_file_name_cmp);
-+  files = g_list_sort (files, (GCompareFunc) polkit_backend_common_rules_file_name_cmp);
- 
-   for (l = files; l != NULL; l = l->next)
-     {
-@@ -258,8 +162,8 @@ load_scripts (PolkitBackendJsAuthority  *authority)
-   g_list_free_full (files, g_free);
- }
- 
--static void
--reload_scripts (PolkitBackendJsAuthority *authority)
-+void
-+polkit_backend_common_reload_scripts (PolkitBackendJsAuthority *authority)
- {
-   duk_context *cx = authority->priv->cx;
- 
-@@ -282,42 +186,6 @@ reload_scripts (PolkitBackendJsAuthority *authority)
-   g_signal_emit_by_name (authority, "changed");
- }
- 
--static void
--on_dir_monitor_changed (GFileMonitor     *monitor,
--                        GFile            *file,
--                        GFile            *other_file,
--                        GFileMonitorEvent event_type,
--                        gpointer          user_data)
--{
--  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
--
--  /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
--   *       Because when editing a file with emacs we get 4-8 events..
--   */
--
--  if (file != NULL)
--    {
--      gchar *name;
--
--      name = g_file_get_basename (file);
--
--      /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
--      if (!g_str_has_prefix (name, ".") &&
--          !g_str_has_prefix (name, "#") &&
--          g_str_has_suffix (name, ".rules") &&
--          (event_type == G_FILE_MONITOR_EVENT_CREATED ||
--           event_type == G_FILE_MONITOR_EVENT_DELETED ||
--           event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
--        {
--          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
--                                        "Reloading rules");
--          reload_scripts (authority);
--        }
--      g_free (name);
--    }
--}
--
--
- static void
- setup_file_monitors (PolkitBackendJsAuthority *authority)
- {
-@@ -349,7 +217,7 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
-         {
-           g_signal_connect (monitor,
-                             "changed",
--                            G_CALLBACK (on_dir_monitor_changed),
-+                            G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
-                             authority);
-           g_ptr_array_add (p, monitor);
-         }
-@@ -358,8 +226,8 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
-   authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
- }
- 
--static void
--polkit_backend_js_authority_constructed (GObject *object)
-+void
-+polkit_backend_common_js_authority_constructed (GObject *object)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-   duk_context *cx;
-@@ -395,8 +263,8 @@ polkit_backend_js_authority_constructed (GObject *object)
-   g_assert_not_reached ();
- }
- 
--static void
--polkit_backend_js_authority_finalize (GObject *object)
-+void
-+polkit_backend_common_js_authority_finalize (GObject *object)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-   guint n;
-@@ -405,7 +273,7 @@ polkit_backend_js_authority_finalize (GObject *object)
-     {
-       GFileMonitor *monitor = authority->priv->dir_monitors[n];
-       g_signal_handlers_disconnect_by_func (monitor,
--                                            G_CALLBACK (on_dir_monitor_changed),
-+                                            G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
-                                             authority);
-       g_object_unref (monitor);
-     }
-@@ -417,11 +285,11 @@ polkit_backend_js_authority_finalize (GObject *object)
-   G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object);
- }
- 
--static void
--polkit_backend_js_authority_set_property (GObject      *object,
--                                          guint         property_id,
--                                          const GValue *value,
--                                          GParamSpec   *pspec)
-+void
-+polkit_backend_common_js_authority_set_property (GObject      *object,
-+                                                 guint         property_id,
-+                                                 const GValue *value,
-+                                                 GParamSpec   *pspec)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
- 
-@@ -438,55 +306,10 @@ polkit_backend_js_authority_set_property (GObject      *object,
-     }
- }
- 
--static const gchar *
--polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
--{
--  return "js";
--}
--
--static const gchar *
--polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
--{
--  return PACKAGE_VERSION;
--}
--
--static PolkitAuthorityFeatures
--polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
--{
--  return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
--}
--
- static void
- polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass)
- {
--  GObjectClass *gobject_class;
--  PolkitBackendAuthorityClass *authority_class;
--  PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
--
--
--  gobject_class = G_OBJECT_CLASS (klass);
--  gobject_class->finalize                               = polkit_backend_js_authority_finalize;
--  gobject_class->set_property                           = polkit_backend_js_authority_set_property;
--  gobject_class->constructed                            = polkit_backend_js_authority_constructed;
--
--  authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
--  authority_class->get_name                             = polkit_backend_js_authority_get_name;
--  authority_class->get_version                          = polkit_backend_js_authority_get_version;
--  authority_class->get_features                         = polkit_backend_js_authority_get_features;
--
--  interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
--  interactive_authority_class->get_admin_identities     = polkit_backend_js_authority_get_admin_auth_identities;
--  interactive_authority_class->check_authorization_sync = polkit_backend_js_authority_check_authorization_sync;
--
--  g_object_class_install_property (gobject_class,
--                                   PROP_RULES_DIRS,
--                                   g_param_spec_boxed ("rules-dirs",
--                                                       NULL,
--                                                       NULL,
--                                                       G_TYPE_STRV,
--                                                       G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
--
--
-+  polkit_backend_common_js_authority_class_init_common (klass);
-   g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate));
- }
- 
-@@ -689,15 +512,15 @@ push_action_and_details (duk_context               *cx,
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static GList *
--polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
--                                                       PolkitSubject                     *caller,
--                                                       PolkitSubject                     *subject,
--                                                       PolkitIdentity                    *user_for_subject,
--                                                       gboolean                           subject_is_local,
--                                                       gboolean                           subject_is_active,
--                                                       const gchar                       *action_id,
--                                                       PolkitDetails                     *details)
-+GList *
-+polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
-+                                                              PolkitSubject                     *caller,
-+                                                              PolkitSubject                     *subject,
-+                                                              PolkitIdentity                    *user_for_subject,
-+                                                              gboolean                           subject_is_local,
-+                                                              gboolean                           subject_is_active,
-+                                                              const gchar                       *action_id,
-+                                                              PolkitDetails                     *details)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
-   GList *ret = NULL;
-@@ -777,16 +600,16 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static PolkitImplicitAuthorization
--polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
--                                                      PolkitSubject                     *caller,
--                                                      PolkitSubject                     *subject,
--                                                      PolkitIdentity                    *user_for_subject,
--                                                      gboolean                           subject_is_local,
--                                                      gboolean                           subject_is_active,
--                                                      const gchar                       *action_id,
--                                                      PolkitDetails                     *details,
--                                                      PolkitImplicitAuthorization        implicit)
-+PolkitImplicitAuthorization
-+polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
-+                                                             PolkitSubject                     *caller,
-+                                                             PolkitSubject                     *subject,
-+                                                             PolkitIdentity                    *user_for_subject,
-+                                                             gboolean                           subject_is_local,
-+                                                             gboolean                           subject_is_active,
-+                                                             const gchar                       *action_id,
-+                                                             PolkitDetails                     *details,
-+                                                             PolkitImplicitAuthorization        implicit)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
-   PolkitImplicitAuthorization ret = implicit;
-@@ -864,65 +687,6 @@ js_polkit_log (duk_context *cx)
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static const gchar *
--get_signal_name (gint signal_number)
--{
--  switch (signal_number)
--    {
--#define _HANDLE_SIG(sig) case sig: return #sig;
--    _HANDLE_SIG (SIGHUP);
--    _HANDLE_SIG (SIGINT);
--    _HANDLE_SIG (SIGQUIT);
--    _HANDLE_SIG (SIGILL);
--    _HANDLE_SIG (SIGABRT);
--    _HANDLE_SIG (SIGFPE);
--    _HANDLE_SIG (SIGKILL);
--    _HANDLE_SIG (SIGSEGV);
--    _HANDLE_SIG (SIGPIPE);
--    _HANDLE_SIG (SIGALRM);
--    _HANDLE_SIG (SIGTERM);
--    _HANDLE_SIG (SIGUSR1);
--    _HANDLE_SIG (SIGUSR2);
--    _HANDLE_SIG (SIGCHLD);
--    _HANDLE_SIG (SIGCONT);
--    _HANDLE_SIG (SIGSTOP);
--    _HANDLE_SIG (SIGTSTP);
--    _HANDLE_SIG (SIGTTIN);
--    _HANDLE_SIG (SIGTTOU);
--    _HANDLE_SIG (SIGBUS);
--#ifdef SIGPOLL
--    _HANDLE_SIG (SIGPOLL);
--#endif
--    _HANDLE_SIG (SIGPROF);
--    _HANDLE_SIG (SIGSYS);
--    _HANDLE_SIG (SIGTRAP);
--    _HANDLE_SIG (SIGURG);
--    _HANDLE_SIG (SIGVTALRM);
--    _HANDLE_SIG (SIGXCPU);
--    _HANDLE_SIG (SIGXFSZ);
--#undef _HANDLE_SIG
--    default:
--      break;
--    }
--  return "UNKNOWN_SIGNAL";
--}
--
--typedef struct
--{
--  GMainLoop *loop;
--  GAsyncResult *res;
--} SpawnData;
--
--static void
--spawn_cb (GObject       *source_object,
--          GAsyncResult  *res,
--          gpointer       user_data)
--{
--  SpawnData *data = (SpawnData *)user_data;
--  data->res = (GAsyncResult*)g_object_ref (res);
--  g_main_loop_quit (data->loop);
--}
--
- static duk_ret_t
- js_polkit_spawn (duk_context *cx)
- {
-@@ -962,21 +726,21 @@ js_polkit_spawn (duk_context *cx)
-   g_main_context_push_thread_default (context);
- 
-   data.loop = loop;
--  utils_spawn ((const gchar *const *) argv,
--               10, /* timeout_seconds */
--               NULL, /* cancellable */
--               spawn_cb,
--               &data);
-+  polkit_backend_common_spawn ((const gchar *const *) argv,
-+                               10, /* timeout_seconds */
-+                               NULL, /* cancellable */
-+                               polkit_backend_common_spawn_cb,
-+                               &data);
- 
-   g_main_loop_run (loop);
- 
-   g_main_context_pop_thread_default (context);
- 
--  if (!utils_spawn_finish (data.res,
--                           &exit_status,
--                           &standard_output,
--                           &standard_error,
--                           &error))
-+  if (!polkit_backend_common_spawn_finish (data.res,
-+                                           &exit_status,
-+                                           &standard_output,
-+                                           &standard_error,
-+                                           &error))
-     {
-       err_str = g_strdup_printf ("Error spawning helper: %s (%s, %d)",
-                                  error->message, g_quark_to_string (error->domain), error->code);
-@@ -998,7 +762,7 @@ js_polkit_spawn (duk_context *cx)
-         {
-           g_string_append_printf (gstr,
-                                   "Helper was signaled with signal %s (%d)",
--                                  get_signal_name (WTERMSIG (exit_status)),
-+                                  polkit_backend_common_get_signal_name (WTERMSIG (exit_status)),
-                                   WTERMSIG (exit_status));
-         }
-       g_string_append_printf (gstr, ", stdout=`%s', stderr=`%s'",
-@@ -1052,377 +816,3 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
- }
- 
- /* ---------------------------------------------------------------------------------------------------- */
--
--typedef struct
--{
--  GSimpleAsyncResult *simple; /* borrowed reference */
--  GMainContext *main_context; /* may be NULL */
--
--  GCancellable *cancellable;  /* may be NULL */
--  gulong cancellable_handler_id;
--
--  GPid child_pid;
--  gint child_stdout_fd;
--  gint child_stderr_fd;
--
--  GIOChannel *child_stdout_channel;
--  GIOChannel *child_stderr_channel;
--
--  GSource *child_watch_source;
--  GSource *child_stdout_source;
--  GSource *child_stderr_source;
--
--  guint timeout_seconds;
--  gboolean timed_out;
--  GSource *timeout_source;
--
--  GString *child_stdout;
--  GString *child_stderr;
--
--  gint exit_status;
--} UtilsSpawnData;
--
--static void
--utils_child_watch_from_release_cb (GPid     pid,
--                                   gint     status,
--                                   gpointer user_data)
--{
--}
--
--static void
--utils_spawn_data_free (UtilsSpawnData *data)
--{
--  if (data->timeout_source != NULL)
--    {
--      g_source_destroy (data->timeout_source);
--      data->timeout_source = NULL;
--    }
--
--  /* Nuke the child, if necessary */
--  if (data->child_watch_source != NULL)
--    {
--      g_source_destroy (data->child_watch_source);
--      data->child_watch_source = NULL;
--    }
--
--  if (data->child_pid != 0)
--    {
--      GSource *source;
--      kill (data->child_pid, SIGTERM);
--      /* OK, we need to reap for the child ourselves - we don't want
--       * to use waitpid() because that might block the calling
--       * thread (the child might handle SIGTERM and use several
--       * seconds for cleanup/rollback).
--       *
--       * So we use GChildWatch instead.
--       *
--       * Avoid taking a references to ourselves. but note that we need
--       * to pass the GSource so we can nuke it once handled.
--       */
--      source = g_child_watch_source_new (data->child_pid);
--      g_source_set_callback (source,
--                             (GSourceFunc) utils_child_watch_from_release_cb,
--                             source,
--                             (GDestroyNotify) g_source_destroy);
--      g_source_attach (source, data->main_context);
--      g_source_unref (source);
--      data->child_pid = 0;
--    }
--
--  if (data->child_stdout != NULL)
--    {
--      g_string_free (data->child_stdout, TRUE);
--      data->child_stdout = NULL;
--    }
--
--  if (data->child_stderr != NULL)
--    {
--      g_string_free (data->child_stderr, TRUE);
--      data->child_stderr = NULL;
--    }
--
--  if (data->child_stdout_channel != NULL)
--    {
--      g_io_channel_unref (data->child_stdout_channel);
--      data->child_stdout_channel = NULL;
--    }
--  if (data->child_stderr_channel != NULL)
--    {
--      g_io_channel_unref (data->child_stderr_channel);
--      data->child_stderr_channel = NULL;
--    }
--
--  if (data->child_stdout_source != NULL)
--    {
--      g_source_destroy (data->child_stdout_source);
--      data->child_stdout_source = NULL;
--    }
--  if (data->child_stderr_source != NULL)
--    {
--      g_source_destroy (data->child_stderr_source);
--      data->child_stderr_source = NULL;
--    }
--
--  if (data->child_stdout_fd != -1)
--    {
--      g_warn_if_fail (close (data->child_stdout_fd) == 0);
--      data->child_stdout_fd = -1;
--    }
--  if (data->child_stderr_fd != -1)
--    {
--      g_warn_if_fail (close (data->child_stderr_fd) == 0);
--      data->child_stderr_fd = -1;
--    }
--
--  if (data->cancellable_handler_id > 0)
--    {
--      g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
--      data->cancellable_handler_id = 0;
--    }
--
--  if (data->main_context != NULL)
--    g_main_context_unref (data->main_context);
--
--  if (data->cancellable != NULL)
--    g_object_unref (data->cancellable);
--
--  g_slice_free (UtilsSpawnData, data);
--}
--
--/* called in the thread where @cancellable was cancelled */
--static void
--utils_on_cancelled (GCancellable *cancellable,
--                    gpointer      user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  GError *error;
--
--  error = NULL;
--  g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
--  g_simple_async_result_take_error (data->simple, error);
--  g_simple_async_result_complete_in_idle (data->simple);
--  g_object_unref (data->simple);
--}
--
--static gboolean
--utils_read_child_stderr (GIOChannel *channel,
--                         GIOCondition condition,
--                         gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  gchar buf[1024];
--  gsize bytes_read;
--
--  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
--  g_string_append_len (data->child_stderr, buf, bytes_read);
--  return TRUE;
--}
--
--static gboolean
--utils_read_child_stdout (GIOChannel *channel,
--                         GIOCondition condition,
--                         gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  gchar buf[1024];
--  gsize bytes_read;
--
--  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
--  g_string_append_len (data->child_stdout, buf, bytes_read);
--  return TRUE;
--}
--
--static void
--utils_child_watch_cb (GPid     pid,
--                      gint     status,
--                      gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  gchar *buf;
--  gsize buf_size;
--
--  if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
--    {
--      g_string_append_len (data->child_stdout, buf, buf_size);
--      g_free (buf);
--    }
--  if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
--    {
--      g_string_append_len (data->child_stderr, buf, buf_size);
--      g_free (buf);
--    }
--
--  data->exit_status = status;
--
--  /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
--  data->child_pid = 0;
--  data->child_watch_source = NULL;
--
--  /* we're done */
--  g_simple_async_result_complete_in_idle (data->simple);
--  g_object_unref (data->simple);
--}
--
--static gboolean
--utils_timeout_cb (gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--
--  data->timed_out = TRUE;
--
--  /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
--  data->timeout_source = NULL;
--
--  /* we're done */
--  g_simple_async_result_complete_in_idle (data->simple);
--  g_object_unref (data->simple);
--
--  return FALSE; /* remove source */
--}
--
--static void
--utils_spawn (const gchar *const  *argv,
--             guint                timeout_seconds,
--             GCancellable        *cancellable,
--             GAsyncReadyCallback  callback,
--             gpointer             user_data)
--{
--  UtilsSpawnData *data;
--  GError *error;
--
--  data = g_slice_new0 (UtilsSpawnData);
--  data->timeout_seconds = timeout_seconds;
--  data->simple = g_simple_async_result_new (NULL,
--                                            callback,
--                                            user_data,
--                                            (gpointer*)utils_spawn);
--  data->main_context = g_main_context_get_thread_default ();
--  if (data->main_context != NULL)
--    g_main_context_ref (data->main_context);
--
--  data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
--
--  data->child_stdout = g_string_new (NULL);
--  data->child_stderr = g_string_new (NULL);
--  data->child_stdout_fd = -1;
--  data->child_stderr_fd = -1;
--
--  /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
--  g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
--
--  error = NULL;
--  if (data->cancellable != NULL)
--    {
--      /* could already be cancelled */
--      error = NULL;
--      if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
--        {
--          g_simple_async_result_take_error (data->simple, error);
--          g_simple_async_result_complete_in_idle (data->simple);
--          g_object_unref (data->simple);
--          goto out;
--        }
--
--      data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
--                                                            G_CALLBACK (utils_on_cancelled),
--                                                            data,
--                                                            NULL);
--    }
--
--  error = NULL;
--  if (!g_spawn_async_with_pipes (NULL, /* working directory */
--                                 (gchar **) argv,
--                                 NULL, /* envp */
--                                 G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
--                                 NULL, /* child_setup */
--                                 NULL, /* child_setup's user_data */
--                                 &(data->child_pid),
--                                 NULL, /* gint *stdin_fd */
--                                 &(data->child_stdout_fd),
--                                 &(data->child_stderr_fd),
--                                 &error))
--    {
--      g_prefix_error (&error, "Error spawning: ");
--      g_simple_async_result_take_error (data->simple, error);
--      g_simple_async_result_complete_in_idle (data->simple);
--      g_object_unref (data->simple);
--      goto out;
--    }
--
--  if (timeout_seconds > 0)
--    {
--      data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
--      g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
--      g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
--      g_source_attach (data->timeout_source, data->main_context);
--      g_source_unref (data->timeout_source);
--    }
--
--  data->child_watch_source = g_child_watch_source_new (data->child_pid);
--  g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
--  g_source_attach (data->child_watch_source, data->main_context);
--  g_source_unref (data->child_watch_source);
--
--  data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
--  g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
--  data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
--  g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
--  g_source_attach (data->child_stdout_source, data->main_context);
--  g_source_unref (data->child_stdout_source);
--
--  data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
--  g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
--  data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
--  g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
--  g_source_attach (data->child_stderr_source, data->main_context);
--  g_source_unref (data->child_stderr_source);
--
-- out:
--  ;
--}
--
--gboolean
--utils_spawn_finish (GAsyncResult   *res,
--                    gint           *out_exit_status,
--                    gchar         **out_standard_output,
--                    gchar         **out_standard_error,
--                    GError        **error)
--{
--  GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
--  UtilsSpawnData *data;
--  gboolean ret = FALSE;
--
--  g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
--  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
--
--  g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == utils_spawn);
--
--  if (g_simple_async_result_propagate_error (simple, error))
--    goto out;
--
--  data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
--
--  if (data->timed_out)
--    {
--      g_set_error (error,
--                   G_IO_ERROR,
--                   G_IO_ERROR_TIMED_OUT,
--                   "Timed out after %d seconds",
--                   data->timeout_seconds);
--      goto out;
--    }
--
--  if (out_exit_status != NULL)
--    *out_exit_status = data->exit_status;
--
--  if (out_standard_output != NULL)
--    *out_standard_output = g_strdup (data->child_stdout->str);
--
--  if (out_standard_error != NULL)
--    *out_standard_error = g_strdup (data->child_stderr->str);
--
--  ret = TRUE;
--
-- out:
--  return ret;
--}
-diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
-index ca17108..e28091d 100644
---- a/src/polkitbackend/polkitbackendjsauthority.cpp
-+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
-@@ -19,29 +19,7 @@
-  * Author: David Zeuthen <davidz@redhat.com>
-  */
- 
--#include "config.h"
--#include <sys/wait.h>
--#include <errno.h>
--#include <pwd.h>
--#include <grp.h>
--#ifdef HAVE_NETGROUP_H
--#include <netgroup.h>
--#else
--#include <netdb.h>
--#endif
--#include <string.h>
--#include <glib/gstdio.h>
--#include <locale.h>
--#include <glib/gi18n-lib.h>
--
--#include <polkit/polkit.h>
--#include "polkitbackendjsauthority.h"
--
--#include <polkit/polkitprivate.h>
--
--#ifdef HAVE_LIBSYSTEMD
--#include <systemd/sd-login.h>
--#endif /* HAVE_LIBSYSTEMD */
-+#include "polkitbackendcommon.h"
- 
- #include <js/CompilationAndEvaluation.h>
- #include <js/ContextOptions.h>
-@@ -52,6 +30,7 @@
- #include <js/Array.h>
- #include <jsapi.h>
- 
-+/* Built source and not too big to worry about deduplication */
- #include "initjs.h" /* init.js */
- 
- #ifdef JSGC_USE_EXACT_ROOTING
-@@ -67,10 +46,9 @@
-  * @short_description: JS Authority
-  * @stability: Unstable
-  *
-- * An implementation of #PolkitBackendAuthority that reads and
-- * evalates Javascript files and supports interaction with
-- * authentication agents (virtue of being based on
-- * #PolkitBackendInteractiveAuthority).
-+ * An (SpiderMonkey-based) implementation of #PolkitBackendAuthority that reads
-+ * and evaluates Javascript files and supports interaction with authentication
-+ * agents (virtue of being based on #PolkitBackendInteractiveAuthority).
-  */
- 
- /* ---------------------------------------------------------------------------------------------------- */
-@@ -100,57 +78,11 @@ static bool execute_script_with_runaway_killer (PolkitBackendJsAuthority *author
-                                     JS::HandleScript                 script,
-                                     JS::MutableHandleValue           rval);
- 
--static void utils_spawn (const gchar *const  *argv,
--                         guint                timeout_seconds,
--                         GCancellable        *cancellable,
--                         GAsyncReadyCallback  callback,
--                         gpointer             user_data);
--
--gboolean utils_spawn_finish (GAsyncResult   *res,
--                             gint           *out_exit_status,
--                             gchar         **out_standard_output,
--                             gchar         **out_standard_error,
--                             GError        **error);
--
--static void on_dir_monitor_changed (GFileMonitor     *monitor,
--                                    GFile            *file,
--                                    GFile            *other_file,
--                                    GFileMonitorEvent event_type,
--                                    gpointer          user_data);
--
--/* ---------------------------------------------------------------------------------------------------- */
--
--enum
--{
--  PROP_0,
--  PROP_RULES_DIRS,
--};
--
- /* ---------------------------------------------------------------------------------------------------- */
- 
- static gpointer runaway_killer_thread_func (gpointer user_data);
- static void runaway_killer_terminate (PolkitBackendJsAuthority *authority);
- 
--static GList *polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *authority,
--                                                                     PolkitSubject                     *caller,
--                                                                     PolkitSubject                     *subject,
--                                                                     PolkitIdentity                    *user_for_subject,
--                                                                     gboolean                           subject_is_local,
--                                                                     gboolean                           subject_is_active,
--                                                                     const gchar                       *action_id,
--                                                                     PolkitDetails                     *details);
--
--static PolkitImplicitAuthorization polkit_backend_js_authority_check_authorization_sync (
--                                                          PolkitBackendInteractiveAuthority *authority,
--                                                          PolkitSubject                     *caller,
--                                                          PolkitSubject                     *subject,
--                                                          PolkitIdentity                    *user_for_subject,
--                                                          gboolean                           subject_is_local,
--                                                          gboolean                           subject_is_active,
--                                                          const gchar                       *action_id,
--                                                          PolkitDetails                     *details,
--                                                          PolkitImplicitAuthorization        implicit);
--
- G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
- 
- /* ---------------------------------------------------------------------------------------------------- */
-@@ -229,33 +161,6 @@ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
-                                                  PolkitBackendJsAuthorityPrivate);
- }
- 
--static gint
--rules_file_name_cmp (const gchar *a,
--                     const gchar *b)
--{
--  gint ret;
--  const gchar *a_base;
--  const gchar *b_base;
--
--  a_base = strrchr (a, '/');
--  b_base = strrchr (b, '/');
--
--  g_assert (a_base != NULL);
--  g_assert (b_base != NULL);
--  a_base += 1;
--  b_base += 1;
--
--  ret = g_strcmp0 (a_base, b_base);
--  if (ret == 0)
--    {
--      /* /etc wins over /usr */
--      ret = g_strcmp0 (a, b);
--      g_assert (ret != 0);
--    }
--
--  return ret;
--}
--
- /* authority->priv->cx must be within a request */
- static void
- load_scripts (PolkitBackendJsAuthority  *authority)
-@@ -299,7 +204,7 @@ load_scripts (PolkitBackendJsAuthority  *authority)
-         }
-     }
- 
--  files = g_list_sort (files, (GCompareFunc) rules_file_name_cmp);
-+  files = g_list_sort (files, (GCompareFunc) polkit_backend_common_rules_file_name_cmp);
- 
-   for (l = files; l != NULL; l = l->next)
-     {
-@@ -365,8 +270,8 @@ load_scripts (PolkitBackendJsAuthority  *authority)
-   g_list_free_full (files, g_free);
- }
- 
--static void
--reload_scripts (PolkitBackendJsAuthority *authority)
-+void
-+polkit_backend_common_reload_scripts (PolkitBackendJsAuthority *authority)
- {
-   JS::RootedValueArray<1> args(authority->priv->cx);
-   JS::RootedValue rval(authority->priv->cx);
-@@ -395,42 +300,6 @@ reload_scripts (PolkitBackendJsAuthority *authority)
-   g_signal_emit_by_name (authority, "changed");
- }
- 
--static void
--on_dir_monitor_changed (GFileMonitor     *monitor,
--                        GFile            *file,
--                        GFile            *other_file,
--                        GFileMonitorEvent event_type,
--                        gpointer          user_data)
--{
--  PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
--
--  /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
--   *       Because when editing a file with emacs we get 4-8 events..
--   */
--
--  if (file != NULL)
--    {
--      gchar *name;
--
--      name = g_file_get_basename (file);
--
--      /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
--      if (!g_str_has_prefix (name, ".") &&
--          !g_str_has_prefix (name, "#") &&
--          g_str_has_suffix (name, ".rules") &&
--          (event_type == G_FILE_MONITOR_EVENT_CREATED ||
--           event_type == G_FILE_MONITOR_EVENT_DELETED ||
--           event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
--        {
--          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
--                                        "Reloading rules");
--          reload_scripts (authority);
--        }
--      g_free (name);
--    }
--}
--
--
- static void
- setup_file_monitors (PolkitBackendJsAuthority *authority)
- {
-@@ -462,7 +331,7 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
-         {
-           g_signal_connect (monitor,
-                             "changed",
--                            G_CALLBACK (on_dir_monitor_changed),
-+                            G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
-                             authority);
-           g_ptr_array_add (p, monitor);
-         }
-@@ -471,8 +340,8 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
-   authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
- }
- 
--static void
--polkit_backend_js_authority_constructed (GObject *object)
-+void
-+polkit_backend_common_js_authority_constructed (GObject *object)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
- 
-@@ -561,8 +430,8 @@ polkit_backend_js_authority_constructed (GObject *object)
-   g_assert_not_reached ();
- }
- 
--static void
--polkit_backend_js_authority_finalize (GObject *object)
-+void
-+polkit_backend_common_js_authority_finalize (GObject *object)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-   guint n;
-@@ -577,7 +446,7 @@ polkit_backend_js_authority_finalize (GObject *object)
-     {
-       GFileMonitor *monitor = authority->priv->dir_monitors[n];
-       g_signal_handlers_disconnect_by_func (monitor,
--                                            (gpointer*)G_CALLBACK (on_dir_monitor_changed),
-+                                            (gpointer*)G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
-                                             authority);
-       g_object_unref (monitor);
-     }
-@@ -594,11 +463,11 @@ polkit_backend_js_authority_finalize (GObject *object)
-   G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object);
- }
- 
--static void
--polkit_backend_js_authority_set_property (GObject      *object,
--                                          guint         property_id,
--                                          const GValue *value,
--                                          GParamSpec   *pspec)
-+void
-+polkit_backend_common_js_authority_set_property (GObject      *object,
-+                                                 guint         property_id,
-+                                                 const GValue *value,
-+                                                 GParamSpec   *pspec)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
- 
-@@ -615,57 +484,12 @@ polkit_backend_js_authority_set_property (GObject      *object,
-     }
- }
- 
--static const gchar *
--polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
--{
--  return "js";
--}
--
--static const gchar *
--polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
--{
--  return PACKAGE_VERSION;
--}
--
--static PolkitAuthorityFeatures
--polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
--{
--  return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
--}
--
- static void
- polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass)
- {
--  GObjectClass *gobject_class;
--  PolkitBackendAuthorityClass *authority_class;
--  PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
--
--
--  gobject_class = G_OBJECT_CLASS (klass);
--  gobject_class->finalize                               = polkit_backend_js_authority_finalize;
--  gobject_class->set_property                           = polkit_backend_js_authority_set_property;
--  gobject_class->constructed                            = polkit_backend_js_authority_constructed;
--
--  authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
--  authority_class->get_name                             = polkit_backend_js_authority_get_name;
--  authority_class->get_version                          = polkit_backend_js_authority_get_version;
--  authority_class->get_features                         = polkit_backend_js_authority_get_features;
--
--  interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
--  interactive_authority_class->get_admin_identities     = polkit_backend_js_authority_get_admin_auth_identities;
--  interactive_authority_class->check_authorization_sync = polkit_backend_js_authority_check_authorization_sync;
--
--  g_object_class_install_property (gobject_class,
--                                   PROP_RULES_DIRS,
--                                   g_param_spec_boxed ("rules-dirs",
--                                                       NULL,
--                                                       NULL,
--                                                       G_TYPE_STRV,
--                                                       GParamFlags(G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)));
--
-+  polkit_backend_common_js_authority_class_init_common (klass);
- 
-   g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate));
--
-   JS_Init ();
- }
- 
-@@ -1099,15 +923,15 @@ call_js_function_with_runaway_killer (PolkitBackendJsAuthority *authority,
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static GList *
--polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
--                                                       PolkitSubject                     *caller,
--                                                       PolkitSubject                     *subject,
--                                                       PolkitIdentity                    *user_for_subject,
--                                                       gboolean                           subject_is_local,
--                                                       gboolean                           subject_is_active,
--                                                       const gchar                       *action_id,
--                                                       PolkitDetails                     *details)
-+GList *
-+polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
-+                                                              PolkitSubject                     *caller,
-+                                                              PolkitSubject                     *subject,
-+                                                              PolkitIdentity                    *user_for_subject,
-+                                                              gboolean                           subject_is_local,
-+                                                              gboolean                           subject_is_active,
-+                                                              const gchar                       *action_id,
-+                                                              PolkitDetails                     *details)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
-   GList *ret = NULL;
-@@ -1202,16 +1026,16 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static PolkitImplicitAuthorization
--polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
--                                                      PolkitSubject                     *caller,
--                                                      PolkitSubject                     *subject,
--                                                      PolkitIdentity                    *user_for_subject,
--                                                      gboolean                           subject_is_local,
--                                                      gboolean                           subject_is_active,
--                                                      const gchar                       *action_id,
--                                                      PolkitDetails                     *details,
--                                                      PolkitImplicitAuthorization        implicit)
-+PolkitImplicitAuthorization
-+polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
-+                                                             PolkitSubject                     *caller,
-+                                                             PolkitSubject                     *subject,
-+                                                             PolkitIdentity                    *user_for_subject,
-+                                                             gboolean                           subject_is_local,
-+                                                             gboolean                           subject_is_active,
-+                                                             const gchar                       *action_id,
-+                                                             PolkitDetails                     *details,
-+                                                             PolkitImplicitAuthorization        implicit)
- {
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
-   PolkitImplicitAuthorization ret = implicit;
-@@ -1324,65 +1148,6 @@ js_polkit_log (JSContext  *cx,
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
--static const gchar *
--get_signal_name (gint signal_number)
--{
--  switch (signal_number)
--    {
--#define _HANDLE_SIG(sig) case sig: return #sig;
--    _HANDLE_SIG (SIGHUP);
--    _HANDLE_SIG (SIGINT);
--    _HANDLE_SIG (SIGQUIT);
--    _HANDLE_SIG (SIGILL);
--    _HANDLE_SIG (SIGABRT);
--    _HANDLE_SIG (SIGFPE);
--    _HANDLE_SIG (SIGKILL);
--    _HANDLE_SIG (SIGSEGV);
--    _HANDLE_SIG (SIGPIPE);
--    _HANDLE_SIG (SIGALRM);
--    _HANDLE_SIG (SIGTERM);
--    _HANDLE_SIG (SIGUSR1);
--    _HANDLE_SIG (SIGUSR2);
--    _HANDLE_SIG (SIGCHLD);
--    _HANDLE_SIG (SIGCONT);
--    _HANDLE_SIG (SIGSTOP);
--    _HANDLE_SIG (SIGTSTP);
--    _HANDLE_SIG (SIGTTIN);
--    _HANDLE_SIG (SIGTTOU);
--    _HANDLE_SIG (SIGBUS);
--#ifdef SIGPOLL
--    _HANDLE_SIG (SIGPOLL);
--#endif
--    _HANDLE_SIG (SIGPROF);
--    _HANDLE_SIG (SIGSYS);
--    _HANDLE_SIG (SIGTRAP);
--    _HANDLE_SIG (SIGURG);
--    _HANDLE_SIG (SIGVTALRM);
--    _HANDLE_SIG (SIGXCPU);
--    _HANDLE_SIG (SIGXFSZ);
--#undef _HANDLE_SIG
--    default:
--      break;
--    }
--  return "UNKNOWN_SIGNAL";
--}
--
--typedef struct
--{
--  GMainLoop *loop;
--  GAsyncResult *res;
--} SpawnData;
--
--static void
--spawn_cb (GObject       *source_object,
--          GAsyncResult  *res,
--          gpointer       user_data)
--{
--  SpawnData *data = (SpawnData *)user_data;
--  data->res = (GAsyncResult*)g_object_ref (res);
--  g_main_loop_quit (data->loop);
--}
--
- static bool
- js_polkit_spawn (JSContext  *cx,
-                  unsigned    js_argc,
-@@ -1440,21 +1205,21 @@ js_polkit_spawn (JSContext  *cx,
-   g_main_context_push_thread_default (context);
- 
-   data.loop = loop;
--  utils_spawn ((const gchar *const *) argv,
--               10, /* timeout_seconds */
--               NULL, /* cancellable */
--               spawn_cb,
--               &data);
-+  polkit_backend_common_spawn ((const gchar *const *) argv,
-+                               10, /* timeout_seconds */
-+                               NULL, /* cancellable */
-+                               polkit_backend_common_spawn_cb,
-+                               &data);
- 
-   g_main_loop_run (loop);
- 
-   g_main_context_pop_thread_default (context);
- 
--  if (!utils_spawn_finish (data.res,
--                           &exit_status,
--                           &standard_output,
--                           &standard_error,
--                           &error))
-+  if (!polkit_backend_common_spawn_finish (data.res,
-+                                           &exit_status,
-+                                           &standard_output,
-+                                           &standard_error,
-+                                           &error))
-     {
-       JS_ReportErrorUTF8 (cx,
-                       "Error spawning helper: %s (%s, %d)",
-@@ -1477,7 +1242,7 @@ js_polkit_spawn (JSContext  *cx,
-         {
-           g_string_append_printf (gstr,
-                                   "Helper was signaled with signal %s (%d)",
--                                  get_signal_name (WTERMSIG (exit_status)),
-+                                  polkit_backend_common_get_signal_name (WTERMSIG (exit_status)),
-                                   WTERMSIG (exit_status));
-         }
-       g_string_append_printf (gstr, ", stdout=`%s', stderr=`%s'",
-@@ -1542,381 +1307,5 @@ js_polkit_user_is_in_netgroup (JSContext  *cx,
-   return ret;
- }
- 
--
--
- /* ---------------------------------------------------------------------------------------------------- */
- 
--typedef struct
--{
--  GSimpleAsyncResult *simple; /* borrowed reference */
--  GMainContext *main_context; /* may be NULL */
--
--  GCancellable *cancellable;  /* may be NULL */
--  gulong cancellable_handler_id;
--
--  GPid child_pid;
--  gint child_stdout_fd;
--  gint child_stderr_fd;
--
--  GIOChannel *child_stdout_channel;
--  GIOChannel *child_stderr_channel;
--
--  GSource *child_watch_source;
--  GSource *child_stdout_source;
--  GSource *child_stderr_source;
--
--  guint timeout_seconds;
--  gboolean timed_out;
--  GSource *timeout_source;
--
--  GString *child_stdout;
--  GString *child_stderr;
--
--  gint exit_status;
--} UtilsSpawnData;
--
--static void
--utils_child_watch_from_release_cb (GPid     pid,
--                                   gint     status,
--                                   gpointer user_data)
--{
--}
--
--static void
--utils_spawn_data_free (UtilsSpawnData *data)
--{
--  if (data->timeout_source != NULL)
--    {
--      g_source_destroy (data->timeout_source);
--      data->timeout_source = NULL;
--    }
--
--  /* Nuke the child, if necessary */
--  if (data->child_watch_source != NULL)
--    {
--      g_source_destroy (data->child_watch_source);
--      data->child_watch_source = NULL;
--    }
--
--  if (data->child_pid != 0)
--    {
--      GSource *source;
--      kill (data->child_pid, SIGTERM);
--      /* OK, we need to reap for the child ourselves - we don't want
--       * to use waitpid() because that might block the calling
--       * thread (the child might handle SIGTERM and use several
--       * seconds for cleanup/rollback).
--       *
--       * So we use GChildWatch instead.
--       *
--       * Avoid taking a references to ourselves. but note that we need
--       * to pass the GSource so we can nuke it once handled.
--       */
--      source = g_child_watch_source_new (data->child_pid);
--      g_source_set_callback (source,
--                             (GSourceFunc) utils_child_watch_from_release_cb,
--                             source,
--                             (GDestroyNotify) g_source_destroy);
--      /* attach source to the global default main context */
--      g_source_attach (source, NULL);
--      g_source_unref (source);
--      data->child_pid = 0;
--    }
--
--  if (data->child_stdout != NULL)
--    {
--      g_string_free (data->child_stdout, TRUE);
--      data->child_stdout = NULL;
--    }
--
--  if (data->child_stderr != NULL)
--    {
--      g_string_free (data->child_stderr, TRUE);
--      data->child_stderr = NULL;
--    }
--
--  if (data->child_stdout_channel != NULL)
--    {
--      g_io_channel_unref (data->child_stdout_channel);
--      data->child_stdout_channel = NULL;
--    }
--  if (data->child_stderr_channel != NULL)
--    {
--      g_io_channel_unref (data->child_stderr_channel);
--      data->child_stderr_channel = NULL;
--    }
--
--  if (data->child_stdout_source != NULL)
--    {
--      g_source_destroy (data->child_stdout_source);
--      data->child_stdout_source = NULL;
--    }
--  if (data->child_stderr_source != NULL)
--    {
--      g_source_destroy (data->child_stderr_source);
--      data->child_stderr_source = NULL;
--    }
--
--  if (data->child_stdout_fd != -1)
--    {
--      g_warn_if_fail (close (data->child_stdout_fd) == 0);
--      data->child_stdout_fd = -1;
--    }
--  if (data->child_stderr_fd != -1)
--    {
--      g_warn_if_fail (close (data->child_stderr_fd) == 0);
--      data->child_stderr_fd = -1;
--    }
--
--  if (data->cancellable_handler_id > 0)
--    {
--      g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
--      data->cancellable_handler_id = 0;
--    }
--
--  if (data->main_context != NULL)
--    g_main_context_unref (data->main_context);
--
--  if (data->cancellable != NULL)
--    g_object_unref (data->cancellable);
--
--  g_slice_free (UtilsSpawnData, data);
--}
--
--/* called in the thread where @cancellable was cancelled */
--static void
--utils_on_cancelled (GCancellable *cancellable,
--                    gpointer      user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  GError *error;
--
--  error = NULL;
--  g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
--  g_simple_async_result_take_error (data->simple, error);
--  g_simple_async_result_complete_in_idle (data->simple);
--  g_object_unref (data->simple);
--}
--
--static gboolean
--utils_read_child_stderr (GIOChannel *channel,
--                         GIOCondition condition,
--                         gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  gchar buf[1024];
--  gsize bytes_read;
--
--  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
--  g_string_append_len (data->child_stderr, buf, bytes_read);
--  return TRUE;
--}
--
--static gboolean
--utils_read_child_stdout (GIOChannel *channel,
--                         GIOCondition condition,
--                         gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  gchar buf[1024];
--  gsize bytes_read;
--
--  g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
--  g_string_append_len (data->child_stdout, buf, bytes_read);
--  return TRUE;
--}
--
--static void
--utils_child_watch_cb (GPid     pid,
--                      gint     status,
--                      gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--  gchar *buf;
--  gsize buf_size;
--
--  if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
--    {
--      g_string_append_len (data->child_stdout, buf, buf_size);
--      g_free (buf);
--    }
--  if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
--    {
--      g_string_append_len (data->child_stderr, buf, buf_size);
--      g_free (buf);
--    }
--
--  data->exit_status = status;
--
--  /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
--  data->child_pid = 0;
--  data->child_watch_source = NULL;
--
--  /* we're done */
--  g_simple_async_result_complete_in_idle (data->simple);
--  g_object_unref (data->simple);
--}
--
--static gboolean
--utils_timeout_cb (gpointer user_data)
--{
--  UtilsSpawnData *data = (UtilsSpawnData *)user_data;
--
--  data->timed_out = TRUE;
--
--  /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
--  data->timeout_source = NULL;
--
--  /* we're done */
--  g_simple_async_result_complete_in_idle (data->simple);
--  g_object_unref (data->simple);
--
--  return FALSE; /* remove source */
--}
--
--static void
--utils_spawn (const gchar *const  *argv,
--             guint                timeout_seconds,
--             GCancellable        *cancellable,
--             GAsyncReadyCallback  callback,
--             gpointer             user_data)
--{
--  UtilsSpawnData *data;
--  GError *error;
--
--  data = g_slice_new0 (UtilsSpawnData);
--  data->timeout_seconds = timeout_seconds;
--  data->simple = g_simple_async_result_new (NULL,
--                                            callback,
--                                            user_data,
--                                            (gpointer*)utils_spawn);
--  data->main_context = g_main_context_get_thread_default ();
--  if (data->main_context != NULL)
--    g_main_context_ref (data->main_context);
--
--  data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
--
--  data->child_stdout = g_string_new (NULL);
--  data->child_stderr = g_string_new (NULL);
--  data->child_stdout_fd = -1;
--  data->child_stderr_fd = -1;
--
--  /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
--  g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
--
--  error = NULL;
--  if (data->cancellable != NULL)
--    {
--      /* could already be cancelled */
--      error = NULL;
--      if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
--        {
--          g_simple_async_result_take_error (data->simple, error);
--          g_simple_async_result_complete_in_idle (data->simple);
--          g_object_unref (data->simple);
--          goto out;
--        }
--
--      data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
--                                                            G_CALLBACK (utils_on_cancelled),
--                                                            data,
--                                                            NULL);
--    }
--
--  error = NULL;
--  if (!g_spawn_async_with_pipes (NULL, /* working directory */
--                                 (gchar **) argv,
--                                 NULL, /* envp */
--                                 GSpawnFlags(G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD),
--                                 NULL, /* child_setup */
--                                 NULL, /* child_setup's user_data */
--                                 &(data->child_pid),
--                                 NULL, /* gint *stdin_fd */
--                                 &(data->child_stdout_fd),
--                                 &(data->child_stderr_fd),
--                                 &error))
--    {
--      g_prefix_error (&error, "Error spawning: ");
--      g_simple_async_result_take_error (data->simple, error);
--      g_simple_async_result_complete_in_idle (data->simple);
--      g_object_unref (data->simple);
--      goto out;
--    }
--
--  if (timeout_seconds > 0)
--    {
--      data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
--      g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
--      g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
--      g_source_attach (data->timeout_source, data->main_context);
--      g_source_unref (data->timeout_source);
--    }
--
--  data->child_watch_source = g_child_watch_source_new (data->child_pid);
--  g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
--  g_source_attach (data->child_watch_source, data->main_context);
--  g_source_unref (data->child_watch_source);
--
--  data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
--  g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
--  data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
--  g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
--  g_source_attach (data->child_stdout_source, data->main_context);
--  g_source_unref (data->child_stdout_source);
--
--  data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
--  g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
--  data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
--  g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
--  g_source_attach (data->child_stderr_source, data->main_context);
--  g_source_unref (data->child_stderr_source);
--
-- out:
--  ;
--}
--
--gboolean
--utils_spawn_finish (GAsyncResult   *res,
--                    gint           *out_exit_status,
--                    gchar         **out_standard_output,
--                    gchar         **out_standard_error,
--                    GError        **error)
--{
--  GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
--  UtilsSpawnData *data;
--  gboolean ret = FALSE;
--
--  g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
--  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
--
--  g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == utils_spawn);
--
--  if (g_simple_async_result_propagate_error (simple, error))
--    goto out;
--
--  data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
--
--  if (data->timed_out)
--    {
--      g_set_error (error,
--                   G_IO_ERROR,
--                   G_IO_ERROR_TIMED_OUT,
--                   "Timed out after %d seconds",
--                   data->timeout_seconds);
--      goto out;
--    }
--
--  if (out_exit_status != NULL)
--    *out_exit_status = data->exit_status;
--
--  if (out_standard_output != NULL)
--    *out_standard_output = g_strdup (data->child_stdout->str);
--
--  if (out_standard_error != NULL)
--    *out_standard_error = g_strdup (data->child_stderr->str);
--
--  ret = TRUE;
--
-- out:
--  return ret;
--}
--- 
-GitLab
-
-
-From 4858128107be9c3ab11828ee8f35c5e26efd36ce Mon Sep 17 00:00:00 2001
-From: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
-Date: Tue, 14 Sep 2021 14:38:15 -0700
-Subject: [PATCH 15/16] Gitlab CI: add duktape pkgconfig dependency
-
-Make way for the CI to be able to build with duktape too
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- .gitlab-ci.yml | 1 +
- 1 file changed, 1 insertion(+)
-
-GitLab
-
-
-From cd5d6da837fce95f8831a355dad88c83347c7337 Mon Sep 17 00:00:00 2001
-From: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
-Date: Mon, 20 Sep 2021 17:17:26 -0700
-Subject: [PATCH 16/16] duktape: implement runaway scripts killer timeout
-
-This was missing on Duktape's JS backend proposal, now in. As
-discussed in
-https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35 and
-verified by the commit author, Duktape has no interrupt injection
-mechanism (it has no thread-safe API entry whatsoever, even). Using
-DUK_USE_EXEC_TIMEOUT_CHECK is also not feasible, because:
-
-  i) It must be enabled at build time and shared object builds of the
-  lib on distros go with the default options, something we cannot
-  change/control
-
-  ii) That does not account for non-ECMAScript explicit execution
-  contexts, like regex execution, native C calls, etc.
-
-It has been agreed, on that thread, that pthread_cond_timedwait()-ing
-and having proper Duktape evaluation/execution calls take place in a
-separate thread, to be killed after the runaway script killer's
-accorded timeout value, a reasonable approach. We have considered
-using glib wrappers for direct pthread usage, but that way would make
-it impossible to issue
-pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, ...) and we want to
-be paranoid in that regard.
-
-On Duktape, we don't get to err from the JS context (to be captured by
-the offending script), but to be forcibly killed on timeout scenarios,
-leading to null returns, thus polkit negation, by definition. It's a
-reasonable design/compromise.
-
-A fatal error handler routine, for the Duktape context, has also been
-added, using the polkit_backend_authority_log() logging infra to
-better assist users on what went wrong.
-
-Finally, the script evaluation routine has been made to use
-duk_peval_lstring() (previously using _noresult variant), so to able
-to present the user with proper error messages, should any occur.
-
-The original runaway script killer test has been adjusted to please
-both JS backends.
-
-Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
----
- meson.build                                   |   1 +
- src/polkitbackend/meson.build                 |   1 +
- src/polkitbackend/polkitbackendcommon.h       |   2 +
- .../polkitbackendduktapeauthority.c           | 236 ++++++++++++++----
- .../polkitbackendjsauthority.cpp              |  10 +-
- .../etc/polkit-1/rules.d/10-testing.rules     |   6 +-
- .../test-polkitbackendjsauthority.c           |   2 +-
- 7 files changed, 209 insertions(+), 49 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 4e44723..46956e3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -137,6 +137,7 @@ js_engine = get_option('js_engine')
- if js_engine == 'duktape'
-   js_dep = dependency('duktape')
-   libm_dep = cc.find_library('m')
-+  libpthread_dep = cc.find_library('pthread')
- elif js_engine == 'mozjs'
-   js_dep = dependency('mozjs-78')
- endif
-diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build
-index 9ec01b2..4dfea39 100644
---- a/src/polkitbackend/meson.build
-+++ b/src/polkitbackend/meson.build
-@@ -34,6 +34,7 @@ c_flags = [
- if js_engine == 'duktape'
-   sources += files('polkitbackendduktapeauthority.c')
-   deps += libm_dep
-+  deps += libpthread_dep
- elif js_engine == 'mozjs'
-   sources += files('polkitbackendjsauthority.cpp')
- endif
-diff --git a/src/polkitbackend/polkitbackendcommon.h b/src/polkitbackend/polkitbackendcommon.h
-index 6d0d267..dd700fc 100644
---- a/src/polkitbackend/polkitbackendcommon.h
-+++ b/src/polkitbackend/polkitbackendcommon.h
-@@ -50,6 +50,8 @@
- #include <systemd/sd-login.h>
- #endif /* HAVE_LIBSYSTEMD */
- 
-+#define RUNAWAY_KILLER_TIMEOUT (15)
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
-index a2b4420..80f1976 100644
---- a/src/polkitbackend/polkitbackendduktapeauthority.c
-+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
-@@ -47,8 +47,20 @@ struct _PolkitBackendJsAuthorityPrivate
-   GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */
- 
-   duk_context *cx;
-+
-+  pthread_t runaway_killer_thread;
-+};
-+
-+enum
-+{
-+  RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET,
-+  RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS,
-+  RUNAWAY_KILLER_THREAD_EXIT_STATUS_FAILURE,
- };
- 
-+static gboolean execute_script_with_runaway_killer(PolkitBackendJsAuthority *authority,
-+                                                   const gchar *filename);
-+
- /* ---------------------------------------------------------------------------------------------------- */
- 
- G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
-@@ -67,6 +79,15 @@ static const duk_function_list_entry js_polkit_functions[] =
-   { NULL, NULL, 0 },
- };
- 
-+static void report_error (void     *udata,
-+                          const char *msg)
-+{
-+    PolkitBackendJsAuthority *authority = udata;
-+    polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
-+                                  "fatal Duktape JS backend error: %s",
-+                                  (msg ? msg : "no message"));
-+}
-+
- static void
- polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
- {
-@@ -78,7 +99,6 @@ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
- static void
- load_scripts (PolkitBackendJsAuthority  *authority)
- {
--  duk_context *cx = authority->priv->cx;
-   GList *files = NULL;
-   GList *l;
-   guint num_scripts = 0;
-@@ -123,36 +143,9 @@ load_scripts (PolkitBackendJsAuthority  *authority)
-   for (l = files; l != NULL; l = l->next)
-     {
-       const gchar *filename = (gchar *)l->data;
--#if (DUK_VERSION >= 20000)
--      GFile *file = g_file_new_for_path (filename);
--      char *contents;
--      gsize len;
--      if (!g_file_load_contents (file, NULL, &contents, &len, NULL, NULL))
--        {
--          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
--                                        "Error compiling script %s",
--                                        filename);
--          g_object_unref (file);
--          continue;
--        }
- 
--      g_object_unref (file);
--      if (duk_peval_lstring_noresult(cx, contents,len) != 0)
--#else
--      if (duk_peval_file_noresult (cx, filename) != 0)
--#endif
--        {
--          polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
--                                        "Error compiling script %s: %s",
--                                        filename, duk_safe_to_string (authority->priv->cx, -1));
--#if (DUK_VERSION >= 20000)
--          g_free (contents);
--#endif
-+      if (!execute_script_with_runaway_killer(authority, filename))
-           continue;
--        }
--#if (DUK_VERSION >= 20000)
--      g_free (contents);
--#endif
-       num_scripts++;
-     }
- 
-@@ -232,7 +225,7 @@ polkit_backend_common_js_authority_constructed (GObject *object)
-   PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
-   duk_context *cx;
- 
--  cx = duk_create_heap (NULL, NULL, NULL, authority, NULL);
-+  cx = duk_create_heap (NULL, NULL, NULL, authority, report_error);
-   if (cx == NULL)
-     goto fail;
- 
-@@ -243,6 +236,9 @@ polkit_backend_common_js_authority_constructed (GObject *object)
-   duk_put_function_list (cx, -1, js_polkit_functions);
-   duk_put_prop_string (cx, -2, "polkit");
- 
-+  /* load polkit objects/functions into JS context (e.g. addRule(),
-+   * _deleteRules(), _runRules() et al)
-+   */
-   duk_eval_string (cx, init_js);
- 
-   if (authority->priv->rules_dirs == NULL)
-@@ -510,6 +506,167 @@ push_action_and_details (duk_context               *cx,
- 
- /* ---------------------------------------------------------------------------------------------------- */
- 
-+typedef struct {
-+  PolkitBackendJsAuthority *authority;
-+  const gchar *filename;
-+  pthread_cond_t cond;
-+  pthread_mutex_t mutex;
-+  gint ret;
-+} RunawayKillerCtx;
-+
-+static gpointer
-+runaway_killer_thread_execute_js (gpointer user_data)
-+{
-+  RunawayKillerCtx *ctx = user_data;
-+  duk_context *cx = ctx->authority->priv->cx;
-+
-+  int oldtype;
-+
-+  pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
-+
-+#if (DUK_VERSION >= 20000)
-+  GFile *file = g_file_new_for_path(ctx->filename);
-+  char *contents;
-+  gsize len;
-+
-+  if (!g_file_load_contents(file, NULL, &contents, &len, NULL, NULL)) {
-+    polkit_backend_authority_log(POLKIT_BACKEND_AUTHORITY(ctx->authority),
-+                                 "Error compiling script %s", ctx->filename);
-+    g_object_unref(file);
-+    goto err;
-+  }
-+
-+  g_object_unref(file);
-+
-+  /* evaluate the script, trying to print context in any syntax errors
-+     found */
-+  if (duk_peval_lstring(cx, contents, len) != 0)
-+#else
-+  if (duk_peval_file(cx, ctx->filename) != 0)
-+#endif
-+  {
-+    polkit_backend_authority_log(POLKIT_BACKEND_AUTHORITY(ctx->authority),
-+                                 "Error compiling script %s: %s", ctx->filename,
-+                                 duk_safe_to_string(cx, -1));
-+    duk_pop(cx);
-+    goto free_err;
-+  }
-+#if (DUK_VERSION >= 20000)
-+  g_free(contents);
-+#endif
-+
-+  ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
-+  goto end;
-+
-+free_err:
-+#if (DUK_VERSION >= 20000)
-+  g_free(contents);
-+#endif
-+err:
-+  ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_FAILURE;
-+end:
-+  pthread_cond_signal(&ctx->cond);
-+  return NULL;
-+}
-+
-+static gpointer
-+runaway_killer_thread_call_js (gpointer user_data)
-+{
-+  RunawayKillerCtx *ctx = user_data;
-+  duk_context *cx = ctx->authority->priv->cx;
-+  int oldtype;
-+
-+  pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
-+
-+  if (duk_pcall_prop (cx, 0, 2) != DUK_EXEC_SUCCESS)
-+    {
-+      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (ctx->authority),
-+                                    "Error evaluating admin rules: ",
-+                                    duk_safe_to_string (cx, -1));
-+      goto err;
-+    }
-+
-+  ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
-+  goto end;
-+
-+err:
-+  ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_FAILURE;
-+end:
-+  pthread_cond_signal(&ctx->cond);
-+  return NULL;
-+}
-+
-+/* Blocking for at most for RUNAWAY_KILLER_TIMEOUT */
-+static gboolean
-+execute_script_with_runaway_killer(PolkitBackendJsAuthority *authority,
-+                                   const gchar *filename)
-+{
-+  gint64 end_time;
-+  gboolean cancel = FALSE;
-+  RunawayKillerCtx ctx = {.authority = authority, .filename = filename,
-+                          .ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET,
-+                          .mutex = PTHREAD_MUTEX_INITIALIZER,
-+                          .cond = PTHREAD_COND_INITIALIZER};
-+  struct timespec abs_time;
-+
-+  pthread_mutex_lock(&ctx.mutex);
-+
-+  clock_gettime(CLOCK_REALTIME, &abs_time);
-+  abs_time.tv_sec += RUNAWAY_KILLER_TIMEOUT;
-+
-+  pthread_create(&authority->priv->runaway_killer_thread, NULL, runaway_killer_thread_execute_js, &ctx);
-+
-+  while (ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET) /* loop to treat spurious wakeups */
-+    if (pthread_cond_timedwait(&ctx.cond, &ctx.mutex, &abs_time) == ETIMEDOUT) {
-+      cancel = TRUE;
-+      break;
-+    }
-+
-+  pthread_mutex_unlock(&ctx.mutex);
-+
-+  if (cancel)
-+    pthread_cancel (authority->priv->runaway_killer_thread);
-+  pthread_join (authority->priv->runaway_killer_thread, NULL);
-+
-+  return ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
-+}
-+
-+/* Calls already stacked function and args. Blocking for at most for
-+ * RUNAWAY_KILLER_TIMEOUT
-+ */
-+static gboolean
-+call_js_function_with_runaway_killer(PolkitBackendJsAuthority *authority)
-+{
-+  gint64 end_time;
-+  gboolean cancel = FALSE;
-+  RunawayKillerCtx ctx = {.authority = authority,
-+                          .ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET,
-+                          .mutex = PTHREAD_MUTEX_INITIALIZER,
-+                          .cond = PTHREAD_COND_INITIALIZER};
-+  struct timespec abs_time;
-+
-+  pthread_mutex_lock(&ctx.mutex);
-+
-+  clock_gettime(CLOCK_REALTIME, &abs_time);
-+  abs_time.tv_sec += RUNAWAY_KILLER_TIMEOUT;
-+
-+  pthread_create(&authority->priv->runaway_killer_thread, NULL, runaway_killer_thread_call_js, &ctx);
-+
-+  while (ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET) /* loop to treat spurious wakeups */
-+    if (pthread_cond_timedwait(&ctx.cond, &ctx.mutex, &abs_time) == ETIMEDOUT) {
-+      cancel = TRUE;
-+      break;
-+    }
-+
-+  pthread_mutex_unlock(&ctx.mutex);
-+
-+  if (cancel)
-+    pthread_cancel (authority->priv->runaway_killer_thread);
-+  pthread_join (authority->priv->runaway_killer_thread, NULL);
-+
-+  return ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
-+}
-+
- /* ---------------------------------------------------------------------------------------------------- */
- 
- GList *
-@@ -557,13 +714,8 @@ polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInter
-       goto out;
-     }
- 
--  if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
--    {
--      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
--                                    "Error evaluating admin rules: ",
--                                    duk_safe_to_string (cx, -1));
--      goto out;
--    }
-+  if (!call_js_function_with_runaway_killer (authority))
-+    goto out;
- 
-   ret_str = duk_require_string (cx, -1);
- 
-@@ -643,15 +795,11 @@ polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendIntera
-       goto out;
-     }
- 
--  if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
--  {
--      polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
--                                    "Error evaluating authorization rules: ",
--                                    duk_safe_to_string (cx, -1));
--      goto out;
--  }
-+  if (!call_js_function_with_runaway_killer (authority))
-+    goto out;
- 
-   if (duk_is_null(cx, -1)) {
-+    /* this fine, means there was no match, use implicit authorizations */
-     good = TRUE;
-     goto out;
-   }
-diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
-index e28091d..11e91c0 100644
---- a/src/polkitbackend/polkitbackendjsauthority.cpp
-+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
-@@ -829,11 +829,14 @@ runaway_killer_setup (PolkitBackendJsAuthority *authority)
- {
-   g_assert (authority->priv->rkt_source == NULL);
- 
--  /* set-up timer for runaway scripts, will be executed in runaway_killer_thread */
-+  /* set-up timer for runaway scripts, will be executed in
-+     runaway_killer_thread, that is one, permanent thread running a glib
-+     mainloop (rkt_loop) whose context (rkt_context) has a timeout source
-+     (rkt_source) */
-   g_mutex_lock (&authority->priv->rkt_timeout_pending_mutex);
-   authority->priv->rkt_timeout_pending = FALSE;
-   g_mutex_unlock (&authority->priv->rkt_timeout_pending_mutex);
--  authority->priv->rkt_source = g_timeout_source_new_seconds (15);
-+  authority->priv->rkt_source = g_timeout_source_new_seconds (RUNAWAY_KILLER_TIMEOUT);
-   g_source_set_callback (authority->priv->rkt_source, rkt_on_timeout, authority, NULL);
-   g_source_attach (authority->priv->rkt_source, authority->priv->rkt_context);
- 
-@@ -893,6 +896,9 @@ execute_script_with_runaway_killer (PolkitBackendJsAuthority *authority,
- {
-   bool ret;
- 
-+  // tries to JS_ExecuteScript(), may hang for > RUNAWAY_KILLER_TIMEOUT,
-+  // runaway_killer_thread makes sure the call returns, due to exception
-+  // injection
-   runaway_killer_setup (authority);
-   ret = JS_ExecuteScript (authority->priv->cx,
-                           script,
-diff --git a/test/data/etc/polkit-1/rules.d/10-testing.rules b/test/data/etc/polkit-1/rules.d/10-testing.rules
-index 98bf062..e346b5d 100644
---- a/test/data/etc/polkit-1/rules.d/10-testing.rules
-+++ b/test/data/etc/polkit-1/rules.d/10-testing.rules
-@@ -189,8 +189,10 @@ polkit.addRule(function(action, subject) {
-                 ;
-         } catch (error) {
-             if (error == "Terminating runaway script")
--                return polkit.Result.YES;
--            return polkit.Result.NO;
-+                // Inverted logic to accomodate Duktape's model as well, which
-+                // will always fail with negation, on timeouts
-+                return polkit.Result.NO;
-+            return polkit.Result.YES;
-         }
-     }
- });
-diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c
-index f97e0e0..2103b17 100644
---- a/test/polkitbackend/test-polkitbackendjsauthority.c
-+++ b/test/polkitbackend/test-polkitbackendjsauthority.c
-@@ -328,7 +328,7 @@ static const RulesTestCase rules_test_cases[] = {
-     "net.company.run_away_script",
-     "unix-user:root",
-     NULL,
--    POLKIT_IMPLICIT_AUTHORIZATION_AUTHORIZED,
-+    POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED,
-   },
- 
-   {
--- 
-GitLab
-
diff --git a/gnu/packages/patches/postgresql-riscv-spinlocks.patch b/gnu/packages/patches/postgresql-riscv-spinlocks.patch
deleted file mode 100644
index 984a573642..0000000000
--- a/gnu/packages/patches/postgresql-riscv-spinlocks.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://www.postgresql.org/message-id/dea97b6d-f55f-1f6d-9109-504aa7dfa421@gentoo.org
-
-The attached patch adds native spinlock support to PostgreSQL on RISC-V 
-systems. As suspected by Richard W.M. Jones of Red Hat back in 2016, the 
-__sync_lock_test_and_set() approach applied on arm and arm64 works here 
-as well.
-
-
-Tested against PostgreSQL 13.3 on a physical rv64gc system (BeagleV 
-Starlight beta board) - builds and installs fine, all tests pass. From 
-what I can see in gcc documentation this should in theory work on rv32 
-(and possibly rv128) as well, therefore the patch as it stands covers 
-all RISC-V systems (i.e. doesn't check the value of __risc_xlen) - but I 
-haven't confirmed this experimentally.
-
---- a/src/include/storage/s_lock.h
-+++ b/src/include/storage/s_lock.h
-@@ -315,12 +315,12 @@
- #endif	 /* __ia64__ || __ia64 */
- 
- /*
-- * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available.
-+ * On ARM, ARM64 and RISC-V, we use __sync_lock_test_and_set(int *, int) if available.
-  *
-  * We use the int-width variant of the builtin because it works on more chips
-  * than other widths.
-  */
--#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64)
-+#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv)
- #ifdef HAVE_GCC__SYNC_INT32_TAS
- #define HAS_TEST_AND_SET
- 
-@@ -337,7 +337,7 @@
- #define S_UNLOCK(lock) __sync_lock_release(lock)
- 
- #endif	 /* HAVE_GCC__SYNC_INT32_TAS */
--#endif	 /* __arm__ || __arm || __aarch64__ || __aarch64 */
-+#endif	 /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
- 
- 
- /* S/390 and S/390x Linux (32- and 64-bit zSeries) */
diff --git a/gnu/packages/patches/python-dateutil-pytest-compat.patch b/gnu/packages/patches/python-dateutil-pytest-compat.patch
new file mode 100644
index 0000000000..5cff57e94c
--- /dev/null
+++ b/gnu/packages/patches/python-dateutil-pytest-compat.patch
@@ -0,0 +1,43 @@
+Add compatibility with newer versions of pytest.
+
+Taken from upstream:
+
+  https://github.com/dateutil/dateutil/commit/2bdd63158b7f981fc6d70a869680451bdfd8d848
+
+diff --git a/dateutil/test/test_internals.py b/dateutil/test/test_internals.py
+index 53081314..b32e6723 100644
+--- a/dateutil/test/test_internals.py
++++ b/dateutil/test/test_internals.py
+@@ -9,6 +9,7 @@
+ 
+ import sys
+ import pytest
++import warnings
+ 
+ from dateutil.parser._parser import _ymd
+ from dateutil import tz
+@@ -65,18 +66,17 @@ def test_parser_parser_private_not_warns():
+     from dateutil.parser._parser import _timelex, _tzparser
+     from dateutil.parser._parser import _parsetz
+ 
+-    with pytest.warns(None) as recorder:
++    with warnings.catch_warnings():
++        warnings.simplefilter("error")
+         _tzparser()
+-        assert len(recorder) == 0
+ 
+-    with pytest.warns(None) as recorder:
++    with warnings.catch_warnings():
++        warnings.simplefilter("error")
+         _timelex('2014-03-03')
+ 
+-        assert len(recorder) == 0
+-
+-    with pytest.warns(None) as recorder:
++    with warnings.catch_warnings():
++        warnings.simplefilter("error")
+         _parsetz('+05:00')
+-        assert len(recorder) == 0
+ 
+ 
+ @pytest.mark.tzstr
diff --git a/gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch b/gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch
new file mode 100644
index 0000000000..7b338ca03e
--- /dev/null
+++ b/gnu/packages/patches/ruby-hydra-minimal-no-byebug.patch
@@ -0,0 +1,11 @@
+Description: Avoid dependency on byebug to reduce package closure
+  significantly, see https://issues.guix.gnu.org/55997
+diff --git a/lib/hydra.rb b/lib/hydra.rb
+index 29fbad2..6b5058a 100644
+--- a/lib/hydra.rb
++++ b/lib/hydra.rb
+@@ -1,4 +1,3 @@
+-require 'byebug' unless ENV['RACK_ENV'] == "production"
+ require 'pp'
+ 
+ module CoreExt
diff --git a/gnu/packages/patches/rustc-1.39.0-src.patch b/gnu/packages/patches/rustc-1.39.0-src.patch
deleted file mode 100644
index 7859bd44d5..0000000000
--- a/gnu/packages/patches/rustc-1.39.0-src.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-# This modified patch is to disable the hunk applying to LLVM, unbundled in Guix.
-
-# Add mrustc slice length intrinsics
---- src/libcore/intrinsics.rs
-+++ src/libcore/intrinsics.rs
-@@ -685,4 +685,8 @@
-     pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
- 
-+    /// Obtain the length of a slice pointer
-+    #[cfg(rust_compiler="mrustc")]
-+    pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize;
-+
-     /// Gets a static string slice containing the name of a type.
-     pub fn type_name<T: ?Sized>() -> &'static str;
-
---- src/libcore/slice/mod.rs
-+++ src/libcore/slice/mod.rs
-@@ -68,5 +68,8 @@
-     pub const fn len(&self) -> usize {
--        unsafe {
--            crate::ptr::Repr { rust: self }.raw.len
--        }
-+        #[cfg(not(rust_compiler="mrustc"))]
-+        #[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_union))]
-+        const fn len_inner<T>(s: &[T]) -> usize { unsafe { crate::ptr::Repr { rust: s }.raw.len } };
-+        #[cfg(rust_compiler="mrustc")]
-+        const fn len_inner<T>(s: &[T]) -> usize { unsafe { crate::intrinsics::mrustc_slice_len(s) } }
-+        len_inner(self)
-     }
-#
-# Static-link rustc_codegen_llvm so the generated rustc is standalone
-# > Note: Interacts with `rustc-1.39.0-overrides.toml`
-#
---- src/librustc_interface/util.rs
-+++ src/librustc_interface/util.rs
-@@ -421,2 +421,4 @@
- pub fn get_codegen_sysroot(backend_name: &str) -> fn() -> Box<dyn CodegenBackend> {
-+    #[cfg(rust_compiler="mrustc")]
-+    { if(backend_name == "llvm") { extern "Rust" { fn __rustc_codegen_backend() -> Box<dyn CodegenBackend>; } return || unsafe { __rustc_codegen_backend() } } }
-     // For now we only allow this function to be called once as it'll dlopen a
-# Disable most architecture intrinsics
---- src/stdarch/crates/std_detect/src/detect/mod.rs
-+++ src/stdarch/crates/std_detect/src/detect/mod.rs
-@@ -74,4 +74,7 @@
-         // this run-time detection logic is never called.
-         #[path = "os/other.rs"]
-         mod os;
-+    } else if #[cfg(rust_compiler="mrustc")] {
-+        #[path = "os/other.rs"]
-+        mod os;
-     } else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
---- vendor/ppv-lite86/src/lib.rs
-+++ vendor/ppv-lite86/src/lib.rs
-@@ -12,10 +12,10 @@
--#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
-+#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler="mrustc")))]
- pub mod x86_64;
--#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
-+#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler="mrustc")))]
- use self::x86_64 as arch;
-
--#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
-+#[cfg(any(miri, rust_compiler="mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
- pub mod generic;
--#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
-+#[cfg(any(miri, rust_compiler="mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
- use self::generic as arch;
-
-# diff --git a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
-# index da9d9d5bfdc0..3d47471f0ef0 100644
-# --- src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
-# +++ src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
-# @@ -16,6 +16,8 @@
-#  #include "llvm/Demangle/DemangleConfig.h"
-#  #include "llvm/Demangle/StringView.h"
-#  #include <array>
-# +#include <cstdint>
-# +#include <string>
-
-#  namespace llvm {
-#  namespace itanium_demangle {
-##
-## gcc (used by mrustc) has 16-byte uint128_t alignment, while rustc uses 8
-##
-#--- src/libsyntax/ast.rs
-#+++ src/libsyntax/ast.rs
-#@@ -986,2 +986,2 @@
-#-#[cfg(target_arch = "x86_64")]
-#-static_assert_size!(Expr, 96);
-#+//#[cfg(target_arch = "x86_64")]
-#+//static_assert_size!(Expr, 96);
-#--- src/librustc/ty/sty.rs
-#+++ src/librustc/ty/sty.rs
-#@@ -2258,2 +2258,2 @@
-#-#[cfg(target_arch = "x86_64")]
-#-static_assert_size!(Const<'_>, 40);
-#+//#[cfg(target_arch = "x86_64")]
-#+//static_assert_size!(Const<'_>, 40);
-
diff --git a/gnu/packages/patches/rustc-1.54.0-src.patch b/gnu/packages/patches/rustc-1.54.0-src.patch
new file mode 100644
index 0000000000..d075dce39b
--- /dev/null
+++ b/gnu/packages/patches/rustc-1.54.0-src.patch
@@ -0,0 +1,117 @@
+# mrustc is much better at enum packing, so causes almost all of these to be smaller by one pointer
+--- compiler/rustc_ast/src/ast.rs
++++ compiler/rustc_ast/src/ast.rs
+@@ -1075,7 +1075,7 @@ pub struct Expr {
+ }
+ 
+ // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Expr, 104);
+ 
+ impl Expr {
+@@ -2779,7 +2779,7 @@ pub enum AssocItemKind {
+     MacCall(MacCall),
+ }
+ 
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(AssocItemKind, 72);
+ 
+ impl AssocItemKind {
+@@ -2831,7 +2831,7 @@ pub enum ForeignItemKind {
+     MacCall(MacCall),
+ }
+ 
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(ForeignItemKind, 72);
+ 
+ impl From<ForeignItemKind> for ItemKind {
+--- compiler/rustc_hir/src/hir.rs
++++ compiler/rustc_hir/src/hir.rs
+@@ -3050,3 +3050,3 @@
+ // Some nodes are used a lot. Make sure they don't unintentionally get bigger.
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
+ mod size_asserts {
+--- compiler/rustc_middle/src/mir/interpret/error.rs
++++ compiler/rustc_middle/src/mir/interpret/error.rs
+@@ -452,2 +452,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ static_assert_size!(InterpError<'_>, 64);
+--- compiler/rustc_middle/src/mir/mod.rs
++++ compiler/rustc_middle/src/mir/mod.rs
+@@ -2203,2 +2203,2 @@
+-#[cfg(target_arch = "x86_64")]
++#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64"))]
+ static_assert_size!(AggregateKind<'_>, 48);
+--- compiler/rustc_middle/src/thir.rs
++++ compiler/rustc_middle/src/thir.rs
+@@ -147,2 +147,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Expr<'_>, 144);
+--- compiler/rustc_mir/src/interpret/place.rs
++++ compiler/rustc_mir/src/interpret/place.rs
+@@ -91,2 +91,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Place, 64);
+@@ -100,2 +100,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80);
+--- compiler/rustc_mir/src/interpret/operand.rs
++++ compiler/rustc_mir/src/interpret/operand.rs
+@@ -35,2 +35,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Immediate, 56);
+@@ -90,2 +90,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(ImmTy<'_>, 72);
+
+#
+# Disable crc32fast's use of stdarch
+#
+--- vendor/crc32fast/src/specialized/mod.rs
++++ vendor/crc32fast/src/specialized/mod.rs
+@@ -1,5 +1,6 @@
+ cfg_if! {
+     if #[cfg(all(
++        not(rust_compiler = "mrustc"),
+         crc32fast_stdarchx86,
+         any(target_arch = "x86", target_arch = "x86_64")
+     ))] {
+
+#
+# Disable std_detect's detection logic (use the same logic as miri)
+#
+--- library/stdarch/crates/std_detect/src/detect/mod.rs
++++ library/stdarch/crates/std_detect/src/detect/mod.rs
+@@ -88,2 +88,2 @@
+ cfg_if! {
+-    if #[cfg(miri)] {
++    if #[cfg(any(miri, rust_compiler = "mrustc"))] {
+
+# PPV-Lite also needs to know that we're pretending to be miri
+--- vendor/ppv-lite86/src/lib.rs
++++ vendor/ppv-lite86/src/lib.rs
+@@ -12,9 +12,9 @@
+-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
++#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
+ pub mod x86_64;
+-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
++#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
+ use self::x86_64 as arch;
+ 
+-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
++#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
+ pub mod generic;
+-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
++#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
+ use self::generic as arch;
+
diff --git a/gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch b/gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch
new file mode 100644
index 0000000000..fb29b76ef2
--- /dev/null
+++ b/gnu/packages/patches/texlive-hyph-utf8-no-byebug.patch
@@ -0,0 +1,13 @@
+Description: Avoid dependency on byebug to reduce package closure
+  significantly, see https://issues.guix.gnu.org/55997
+diff --git a/lib/tex/hyphen/language.rb b/lib/tex/hyphen/language.rb
+index 12831417..df6daa39 100644
+--- a/lib/tex/hyphen/language.rb
++++ b/lib/tex/hyphen/language.rb
+@@ -1,6 +1,5 @@
+ require 'yaml'
+ require 'hydra'
+-require 'byebug'
+ 
+ require_relative 'path'
+ 
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 42c7d18c9d..755f5932ce 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -8573,7 +8573,7 @@ for a given module is comprehensive.")
 (define-public perl-pod-parser
   (package
     (name "perl-pod-parser")
-    (version "1.63")
+    (version "1.65")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -8581,7 +8581,7 @@ for a given module is comprehensive.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1k8clxxdjag56zm6cv38c3q81gj7xphfhh98l21jynwp55hvbq6v"))))
+                "12mj07a34shx5h203l693fra7ip9hc49zrd7w8gsa5llcpnbv9rv"))))
     (build-system perl-build-system)
     (home-page "https://metacpan.org/release/Pod-Parser")
     (synopsis "Modules for parsing/translating POD format documents")
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index a75608cd43..18d299bbd1 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -9,6 +9,8 @@
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,14 +30,16 @@
 (define-module (gnu packages polkit)
   #:use-module ((guix licenses) #:select (lgpl2.0+))
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix memoization)
   #:use-module (guix utils)
   #:use-module (guix build utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
@@ -53,7 +57,7 @@
 (define-public polkit-mozjs
   (package
     (name "polkit")
-    (version "0.120")
+    (version "121")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -61,22 +65,15 @@
                    name "-" version ".tar.gz"))
              (sha256
               (base32
-               "00zfg9b9ivkcj2jcf5b92cpvvyljz8cmfwj86lkvy5rihnd5jypf"))
-             (patches (search-patches "polkit-configure-elogind.patch"
-                                      "polkit-CVE-2021-4034.patch"))
+               "1apz3bh7nbpmlp1cr00pb8z8wp0c7yb23ninb959jz3r38saxiwx"))
              (modules '((guix build utils)))
              (snippet
               '(begin
-                 (use-modules (guix build utils))
-                 ;; Disable broken test.
-                 (substitute* "test/Makefile.in"
-                   (("SUBDIRS = mocklibc . polkit polkitbackend")
-                    "SUBDIRS = mocklibc . polkit"))
                  ;; Disable a test that requires Python, D-Bus and a few
                  ;; libraries and fails with "ERROR: timed out waiting for bus
                  ;; process to terminate".
-                 (substitute* "test/polkitbackend/Makefile.am"
-                   (("TEST_PROGS \\+= polkitbackendjsauthoritytest-wrapper.py")
+                 (substitute* "test/meson.build"
+                   (("subdir\\('polkitbackend'\\)")
                     ""))
                  ;; Guix System's polkit
                  ;; service stores actions under /etc/polkit-1/actions.
@@ -87,57 +84,39 @@
                  (substitute* "src/polkitagent/polkitagentsession.c"
                    (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
                     "\"/run/setuid-programs/polkit-agent-helper-1\""))))))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (inputs
-     (list expat linux-pam elogind mozjs nspr))
+     (list elogind
+           expat
+           linux-pam
+           mozjs-91
+           nspr))
     (propagated-inputs
-     (list glib)) ; required by polkit-gobject-1.pc
+     (list glib))                       ;required by polkit-gobject-1.pc
     (native-inputs
      (list pkg-config
-           `(,glib "bin")                         ;for glib-mkenums
-           intltool
+           gettext-minimal
+           perl
+           `(,glib "bin")               ;for glib-mkenums
            gobject-introspection
-           libxslt                                ;for man page generation
-           docbook-xsl))                          ;for man page generation
+           libxml2                      ;for man page generation
+           libxslt                      ;for man page generation
+           docbook-xsl))                ;for man page generation
     (arguments
-     `(#:configure-flags '("--sysconfdir=/etc"
-                           "--enable-man-pages"
-                           ;; Prevent ‘configure: error: cannot check for
-                           ;; file existence when cross compiling’.
-                           ,@(if (%current-target-system)
-                                 '("--with-os-type=unknown")
-                                 '()))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after
-          'unpack 'fix-introspection-install-dir
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              (substitute* (find-files "." "Makefile.in")
-                (("@INTROSPECTION_GIRDIR@")
-                 (string-append out "/share/gir-1.0/"))
-                (("@INTROSPECTION_TYPELIBDIR@")
-                 (string-append out "/lib/girepository-1.0/"))))))
-         (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)))))
-         (replace
-          'install
-          (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
-            ;; Override sysconfdir during "make install", to avoid attempting
-            ;; to install in /etc, and to instead install the skeletons in the
-            ;; output directory.
-            (let ((out (assoc-ref outputs "out")))
-             (apply invoke "make" "install"
-                           (string-append "sysconfdir=" out "/etc")
-                           (string-append "polkit_actiondir="
-                                          out "/share/polkit-1/actions")
-                           make-flags)))))))
+     (list #:configure-flags
+           #~'("-Dman=true"
+               "-Dtests=true"
+               "-Djs_engine=mozjs"
+               ;; Work around broken gobject-introspection detection when
+               ;; cross-compiling.  The build system probes for the _target_
+               ;; gobject-introspection, but if we change it to native, Meson
+               ;; fails with:
+               ;; ERROR: Pkg-config binary for machine MachineChoice.BUILD
+               ;; not found, giving up.
+               ;; Just disable introspection for now.
+               #$@(if (%current-target-system)
+                      '("-Dintrospection=false")
+                      '()))))
     (home-page "https://www.freedesktop.org/wiki/Software/polkit/")
     (synopsis "Authorization API for privilege management")
     (description "Polkit is an application-level toolkit for defining and
@@ -153,25 +132,10 @@ for unprivileged applications.")
   (let ((base polkit-mozjs))
     (package/inherit base
       (name "polkit-duktape")
-      (source
-       (origin
-         (inherit (package-source base))
-         (patches
-          (append
-              (search-patches "polkit-use-duktape.patch")
-              (origin-patches (package-source base))))))
       (arguments
        (substitute-keyword-arguments (package-arguments base)
          ((#:configure-flags flags)
-          `(cons "--with-duktape" ,flags))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'force-gnu-build-system-bootstrap
-               (lambda _
-                 (delete-file "configure")))))))
-      (native-inputs
-       (modify-inputs (package-native-inputs base)
-         (prepend autoconf automake libtool)))
+          #~(delete "-Djs_engine=mozjs" #$flags))))
       (inputs
        (modify-inputs (package-inputs base)
          (replace "mozjs" duktape))))))
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 5e78417042..3ff05c0c9f 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -422,13 +422,13 @@ for example, for recording or replaying web content.")
 (define-public python-certifi
   (package
     (name "python-certifi")
-    (version "2021.10.8")
+    (version "2022.6.15")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "certifi" version))
               (sha256
                (base32
-                "0wl8ln7acd797i1q7mmb430l6hqwhmk4bd37x8ycw02b3my4x23q"))))
+                "03c2l11lgljx0kz17cvdc4hlc3p1594ajdih9zq0a4dig285mj44"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f))          ;no tests
     (home-page "https://certifi.io/")
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 95f60aae7b..ce0ba4b6d2 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -146,7 +146,7 @@ atlas_libs = openblas~%"  #$(this-package-input "openblas"))))))
            python-pydata-sphinx-theme
            python-pytest
            python-pytest-xdist
-           python-sphinx
+           python-sphinx-4
            python-sphinx-panels
            python-threadpoolctl
            which))
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index d060d5b27c..8760b3968f 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2790,13 +2790,13 @@ APIs.")
 (define-public python-requests
   (package
     (name "python-requests")
-    (version "2.27.1")
+    (version "2.28.1")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "requests" version))
              (sha256
               (base32
-               "0qcsbi919d689xqlgyhw9zkppp1fs6k09wwffa3ri6d8smpwbmv8"))))
+               "10vrr7bijzrypvms3g2sgz8vya7f9ymmcv423ikampgy0aqrjmbw"))))
     (build-system python-build-system)
     (propagated-inputs
      (list python-certifi
@@ -3140,14 +3140,14 @@ addon for removing tracking fields from URLs.")
 (define-public python-urllib3
   (package
     (name "python-urllib3")
-    (version "1.26.8")
+    (version "1.26.9")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "urllib3" version))
         (sha256
          (base32
-          "0g18xk7gfm88gr4bp3f58vgvsbzwps3sq2kqhv5xyz9ylvck6z0f"))))
+          "13j4mkk6vgix4bixfqk3fhydsl3r5f61z94ss4fmwsl0fxjg3fma"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f))
     (propagated-inputs
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 30645fc4a0..73d2954d23 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1326,14 +1326,14 @@ by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
 (define-public python-babel
   (package
     (name "python-babel")
-    (version "2.9.0")
+    (version "2.10.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Babel" version))
        (sha256
         (base32
-         "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
+         "0l9cvfmsz0hlvcinxaf6xf2f02ldgw3xq9i1fc7lk5zf24vma53n"))))
     (build-system python-build-system)
     (native-inputs
      (list python-freezegun python-pytest tzdata-for-tests))
@@ -3428,14 +3428,14 @@ interfaces.")
 (define-public python-click
   (package
     (name "python-click")
-    (version "8.1.2")
+    (version "8.1.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "click" version))
        (sha256
         (base32
-         "0whs38a2i0561kwbgigs6vic9r0a1887m2v1aw3rmv6r2kz0g5s7"))))
+         "13kvp8visj5xh9d43brnda6q0kc1s40flxa5cw0p0a9hzf5dr0kn"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -3824,21 +3824,14 @@ JavaScript-like message boxes.  Types of dialog boxes include:
   (package
     (name "python-pympler")
     (home-page "https://pythonhosted.org/Pympler/")
-    (version "0.9")
+    (version "1.0.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "Pympler" version))
               (sha256
                (base32
-                "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
+                "1ynkqpv2akldmvkll5vh5zhwj433s1d59iv0f76lygyak4silgwr"))))
     (build-system python-build-system)
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (delete 'check)
-                  (add-after 'install 'check
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      (add-installed-pythonpath inputs outputs)
-                      (invoke "python" "setup.py" "test"))))))
     (synopsis "Measure, monitor and analyze memory behavior")
     (description
      "Pympler is a development tool to measure, monitor and analyze
@@ -5530,13 +5523,13 @@ provides additional functionality on the produced Mallard documents.")
 (define-public python-cython
   (package
     (name "python-cython")
-    (version "0.29.24")
+    (version "0.29.32")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Cython" version))
        (sha256
-        (base32 "0hw4gs18rh4slij1fg252argxhraypld9apbqbl60230qc3lvw6d"))))
+        (base32 "1xqsihpqnfal29nb5kmw8z71nd4jbsnbz7p3lkr094xpb13wycw7"))))
     (build-system python-build-system)
     ;; we need the full python package and not just the python-wrapper
     ;; because we need libpython3.3m.so
@@ -5767,7 +5760,7 @@ capabilities.")
            python-pandas
            python-pydata-sphinx-theme
            python-scipy                 ;used by matplotlib
-           python-sphinx
+           python-sphinx-4
            python-sphinx-panels
            texinfo
            texlive-bin
@@ -7072,13 +7065,13 @@ retrieve text and metadata from PDFs as well as merge entire files together.")
 (define-public python-pillow
   (package
     (name "python-pillow")
-    (version "9.0.0")
+    (version "9.2.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "Pillow" version))
               (sha256
                (base32
-                "0gjry0yqryd2678sm47jhdnbghzxn5wk8pgyaqwr4qi7x5ijjvpf"))
+                "011wgm1mssjchpva9wsi2a07im9czyjvik137xlp5f0g7vykdrkm"))
               (modules '((guix build utils)))
               (snippet '(begin
                           (delete-file-recursively "src/thirdparty")))))
@@ -13619,14 +13612,14 @@ simulation, statistical modeling, machine learning and much more.")
 (define-public python-chardet
   (package
     (name "python-chardet")
-    (version "4.0.0")
+    (version "5.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "chardet" version))
        (sha256
         (base32
-         "1ykr04qyhgpc0h5b7dhqw4g92b1xv7ki2ky910mhy4mlbnhm6vqd"))))
+         "1amqmz8731ly6f9rkbk09w4jqgmmgyxykd1bawhgrdbqzlmxys03"))))
     (native-inputs
      (list python-pytest))
     (build-system python-build-system)
@@ -13635,7 +13628,10 @@ simulation, statistical modeling, machine learning and much more.")
            #~(modify-phases %standard-phases
                (replace 'check
                  (lambda _
-                   (invoke "pytest" "-vv")))
+                   (invoke "pytest" "-vv" "-k"
+                           ;; Disable test that fails sporadically:
+                           ;; https://github.com/chardet/chardet/issues/256
+                           "not test_detect_all_and_detect_one_should_agree")))
                ;; This package provides a 'chardetect' executable that only
                ;; depends on Python, so customize the wrap phase to avoid
                ;; adding pytest and friends in order to save size.
@@ -13663,13 +13659,13 @@ automatically detect a wide range of file encodings.")
 (define-public python-charset-normalizer
   (package
     (name "python-charset-normalizer")
-    (version "2.0.11")
+    (version "2.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "charset-normalizer" version))
        (sha256
-        (base32 "071pi2kd222rjjrjdllffqv3iz4bfaj93a9bfs65907fd6fqlfcq"))))
+        (base32 "04zlajr77f6c7ai59l46as1idi0jjgbvj72lh4v5wfpz2s070pjp"))))
     (build-system python-build-system)
     (arguments
      (list #:phases
@@ -19182,15 +19178,12 @@ from the header, as well as section details and data available.")
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
-                  ,@(if (target-riscv64?)
-                      ;; TODO: Remove the conditional on staging.
-                      `((add-after 'unpack 'remove-test-hypothesis-deadlines
-                          (lambda _
-                            (substitute* "tests/test_make.py"
-                              (("assume, given") "assume, given, settings")
-                              (("( +)@given" all spaces)
-                               (string-append spaces "@settings(deadline=None)\n" all))))))
-                      '())
+                  (add-after 'unpack 'remove-test-hypothesis-deadlines
+                    (lambda _
+                      (substitute* "tests/test_make.py"
+                        (("assume, given") "assume, given, settings")
+                        (("( +)@given" all spaces)
+                         (string-append spaces "@settings(deadline=None)\n" all)))))
                   (replace 'check
                     (lambda* (#:key tests? #:allow-other-keys)
                       (when tests?
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 53166980e8..5a1d3f22c8 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -268,28 +268,32 @@ system, and the core design of Django is reused in Grantlee.")
   ;; the layout differs between them.
   (list (string-append "https://download.qt.io/official_releases/qt/"
                        (version-major+minor version) "/" version
+                       "/submodules/" component "-everywhere-opensource-src-"
+                       version ".tar.xz")
+        (string-append "https://download.qt.io/official_releases/qt/"
+                       (version-major+minor version) "/" version
                        "/submodules/" component "-everywhere-src-"
                        version ".tar.xz")
         (string-append "https://download.qt.io/archive/qt/"
                        (version-major+minor version) "/" version
-                       "/submodules/" component "-everywhere-src-"
+                       "/submodules/" component "-everywhere-opensource-src-"
                        version ".tar.xz")
         (let ((directory (string-append "qt5" (string-drop component 2))))
           (string-append "http://sources.buildroot.net/" directory "/"
-                         component "-everywhere-src-" version ".tar.xz"))
+                         component "-everywhere-opensource-src-" version ".tar.xz"))
         (string-append "https://distfiles.macports.org/qt5/"
-                       component "-everywhere-src-" version ".tar.xz")))
+                       component "-everywhere-opensource-src-" version ".tar.xz")))
 
 (define-public qtbase-5
   (package
     (name "qtbase")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
               (method url-fetch)
               (uri (qt-urls name version))
               (sha256
                (base32
-                "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
+                "1p2fa94m1y8qzhdfi2d7dck93qh1lgsinibwl1wy92bwmacwfhhc"))
               ;; Use TZDIR to avoid depending on package "tzdata".
               (patches (search-patches "qtbase-use-TZDIR.patch"
                                        "qtbase-moc-ignore-gcc-macro.patch"
@@ -343,8 +347,7 @@ system, and the core design of Django is reused in Grantlee.")
        ("nss" ,nss)
        ("openssl" ,openssl)
        ("pcre2" ,pcre2)
-       ;; TODO: Switch to 'postgres' in the next rebuild cycle.
-       ("postgresql" ,postgresql-13)
+       ("postgresql" ,postgresql)
        ("pulseaudio" ,pulseaudio)
        ("sqlite" ,sqlite)
        ("unixodbc" ,unixodbc)
@@ -849,13 +852,13 @@ came with the @{qtgraphicaleffects} Qt 5 package.")
   (package
     (inherit qtbase-5)
     (name "qtsvg")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
               (method url-fetch)
               (uri (qt-urls name version))
               (sha256
                (base32
-                "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb"))))
+                "0cdhmhxngv4y7kl5vbcii4l4anbz0hj7dvhlddy1agyl19j9xky4"))))
     (propagated-inputs `())
     (native-inputs (list perl))
     (inputs
@@ -900,8 +903,7 @@ HostLibraries=lib
 [EffectiveSourcePaths]
 HostPrefix=~a
 HostData=lib/qt5
-" out out qtbase)))
-               #t)))
+" out out qtbase))))))
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Valid QT_BUILD_PARTS variables are:
@@ -910,8 +912,7 @@ HostData=lib/qt5
          (add-before 'check 'set-display
            (lambda _
              ;; make Qt render "offscreen", required for tests
-             (setenv "QT_QPA_PLATFORM" "offscreen")
-             #t)))))
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
     (synopsis "Qt module for displaying SVGs")
     (description "The QtSvg module provides classes for displaying the
  contents of SVG files.")))
@@ -950,28 +951,17 @@ HostData=lib/qt5
 (define-public qtimageformats
   (package (inherit qtsvg-5)
     (name "qtimageformats")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz"))
+               "1xjb2z2h1ajw7z9cwq8djpdvjwalpnmirwcwrlbjqv5r4ghmi82a"))
              (modules '((guix build utils)))
              (snippet
               '(begin
-                 (delete-file-recursively "src/3rdparty")
-                 #t))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments qtsvg-5)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'fix-build
-             (lambda _
-               (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
-                 (("^#include <jasper/jasper.h>")
-                  "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
-               #t))))))
+                 (delete-file-recursively "src/3rdparty")))))
     (native-inputs `())
     (inputs
      (list jasper
@@ -988,13 +978,13 @@ support for MNG, TGA, TIFF and WBMP image formats.")))
 (define-public qtx11extras
   (package (inherit qtsvg-5)
     (name "qtx11extras")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h"))))
+               "0wxsrnnkkn68myy211rfz98brs7j3qmx3hmy097vh5avgsmw11bn"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1008,23 +998,24 @@ from within Qt 5.")))
 (define-public qtxmlpatterns
   (package (inherit qtsvg-5)
     (name "qtxmlpatterns")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn"))))
+               "065vj1gk5i4cg0f9spksyb9ps4px0vssx262y77aakvw408vfmq5"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
-       ((#:tests? _ #f) #f) ; TODO: Enable the tests
        ((#:phases phases)
         `(modify-phases ,phases
            (add-after 'unpack 'disable-network-tests
              (lambda _ (substitute* "tests/auto/auto.pro"
                          (("qxmlquery") "# qxmlquery")
-                         (("xmlpatterns ") "# xmlpatterns"))
-               #t))))))
+                         (("xmlpatterns ") "# xmlpatterns"))))
+           (add-after 'unpack 'skip-qquickxmllistmodel-test
+             (lambda _ (substitute* "tests/auto/auto.pro"
+                         ((".*qquickxmllistmodel.*") ""))))))))
     (native-inputs (list perl qtdeclarative-5))
     (inputs (list qtbase-5))
     (synopsis "Qt XML patterns module")
@@ -1035,13 +1026,13 @@ xmlpatternsvalidator.")))
 (define-public qtdeclarative-5
   (package (inherit qtsvg-5)
     (name "qtdeclarative")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066"))))
+               "0ji5131g7h2mrgxw1wxc5mcvmsn3fbw64j28gzpa25gv3vcnkhaw"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f)             ;TODO: Enable the tests
@@ -1054,8 +1045,7 @@ xmlpatternsvalidator.")))
                  ;; is provided by qtdeclarative-5.
                  (substitute*
                      "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
-                   (("\\$\\{_qt5Core_install_prefix\\}") out)))
-               #t))))))
+                   (("\\$\\{_qt5Core_install_prefix\\}") out)))))))))
     (native-inputs
      (list perl
            pkg-config
@@ -1203,13 +1193,13 @@ integrate QML code with JavaScript and C++.")
 (define-public qtconnectivity
   (package (inherit qtsvg-5)
     (name "qtconnectivity")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003"))))
+               "0b2dnxw1rjbp1srhgns148cwl99f50mx29588dal3avv0f73s597"))))
     (native-inputs
      (list perl pkg-config qtdeclarative-5))
     (inputs
@@ -1221,13 +1211,13 @@ with Bluetooth and NFC.")))
 (define-public qtwebsockets-5
   (package (inherit qtsvg-5)
     (name "qtwebsockets")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50"))))
+               "0f120rfqnmlffjhrm5jbpipk1qsbzp1a2v3q8gz94hz6n9dqpav6"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1283,13 +1273,13 @@ consume data received from the server, or both.")
 (define-public qtsensors
   (package (inherit qtsvg-5)
     (name "qtsensors")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z"))))
+               "0zlhm4js02niibb23rw87wf4ik0gy4ai08fwprnwy7zf4rm1ss3d"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:parallel-tests? _ #f) #f) ; can lead to race condition
@@ -1298,9 +1288,8 @@ consume data received from the server, or both.")
            (add-after 'unpack 'fix-tests
              (lambda _
                (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
-                 (("2000") "5000")      ;lengthen test timeout
-                 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
-               #t))))))
+                 (("2000") "5000")                                      ;lengthen test timeout
+                 (("QTest::newRow(\"twist\") << \"twist\"") ""))))))))  ;failing test
     (native-inputs
      (list perl qtdeclarative-5))
     (inputs (list qtbase-5))
@@ -1313,13 +1302,13 @@ recognition API for devices.")))
   (package
     (inherit qtsvg-5)
     (name "qtmultimedia")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc"))
+               "0q76iy1frcgm85mid17lh4p6gnn04n19n6zklgpv4w3md1ng97xw"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -1327,8 +1316,7 @@ recognition API for devices.")))
                    "examples/multimedia/spectrum/3rdparty")
                  ;; We also prevent the spectrum example from being built.
                  (substitute* "examples/multimedia/multimedia.pro"
-                   (("spectrum") "#"))
-                 #t))))
+                   (("spectrum") "#"))))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -1452,14 +1440,14 @@ set of plugins for interacting with pulseaudio and GStreamer.")
 (define-public qtwayland
   (package (inherit qtsvg-5)
     (name "qtwayland")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (patches (search-patches "qtwayland-gcc-11.patch"))
              (sha256
               (base32
-               "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr"))))
+               "0yy8qf9kn15iqsxi2r7jbcsc0vsdyfz7bbxmfn4i9qmz1yvg0jgr"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -1473,13 +1461,11 @@ set of plugins for interacting with pulseaudio and GStreamer.")
                                   "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
                   "")
                  (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
-                  ""))
-               #t))
+                  ""))))
            (add-before 'check 'set-test-environment
              (lambda _
                ;; Do not fail just because /etc/machine-id is missing.
-               (setenv "DBUS_FATAL_WARNINGS" "0")
-               #t))))))
+               (setenv "DBUS_FATAL_WARNINGS" "0")))))))
     (native-inputs
      (list glib perl pkg-config qtdeclarative-5))
     (inputs
@@ -1502,13 +1488,13 @@ compositor libraries.")))
 (define-public qtserialport
   (package (inherit qtsvg-5)
     (name "qtserialport")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
+               "0xg2djwhrj5jqamawlp75g70nmwbp2ph2hh1pm45s36jkxm0k7al"))))
     (native-inputs (list perl))
     (inputs
      (list qtbase-5 eudev))
@@ -1523,8 +1509,7 @@ compositor libraries.")))
                ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
                ;; typically is not set in guix.
                (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
-                (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
-             #t))))))
+                (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))))))))
     (synopsis "Qt Serial Port module")
     (description "The Qt Serial Port module provides the library for
 interacting with serial ports from within Qt.")))
@@ -1532,13 +1517,13 @@ interacting with serial ports from within Qt.")))
 (define-public qtserialbus
   (package (inherit qtsvg-5)
     (name "qtserialbus")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
+               "180gm1jvqfn0h3251zafdd1wd3af00phwaa5qljsbrj6s6ywj79j"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases '%standard-phases)
@@ -1550,8 +1535,7 @@ interacting with serial ports from within Qt.")))
                                                       "/lib/libsocketcan.so")))
                  (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
                    (("QStringLiteral\\(\"socketcan\"\\)")
-                    (format #f "QStringLiteral(~s)" libcansocket.so)))
-                 #t)))))))
+                    (format #f "QStringLiteral(~s)" libcansocket.so))))))))))
     (inputs
      (list libsocketcan qtbase-5 qtserialport))
     (synopsis "Qt Serial Bus module")
@@ -1562,13 +1546,13 @@ and others.")))
 (define-public qtwebchannel-5
   (package (inherit qtsvg-5)
     (name "qtwebchannel")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
+               "1w8mcpdqlphgg3a6yfq18liwlj2nkwrafv0n80h242x5l2mk3ljf"))))
     (native-inputs
      (list perl qtdeclarative-5 qtwebsockets-5))
     (inputs (list qtbase-5))
@@ -1618,21 +1602,20 @@ application).")
 (define-public qtwebglplugin
   (package (inherit qtsvg-5)
     (name "qtwebglplugin")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
+               "1m0p4ssykw07lbip2qyv6w34f8ng13bxb63j0w446f5w0492nn9f"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
         `(modify-phases ,phases
            (add-after 'unpack 'disable-network-tests
              (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
-                         (("webgl") "# webgl"))
-               #t))))))
+                         (("webgl") "# webgl"))))))))
     (native-inputs '())
     (inputs
      (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
@@ -1647,13 +1630,13 @@ OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
 (define-public qtwebview
   (package (inherit qtsvg-5)
     (name "qtwebview")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
+               "0arwaky3jy5ql3z4d8f7k7diidzb1kncdans7pn50hsa1bzacfal"))))
     (native-inputs
      (list perl))
     (inputs
@@ -1666,19 +1649,21 @@ native APIs where it makes sense.")))
 (define-public qtlocation
   (package (inherit qtsvg-5)
     (name "qtlocation")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
-             (uri (string-append "https://download.qt.io/official_releases/qt/"
-                                 (version-major+minor version) "/" version
-                                 "/submodules/" name "-everywhere-src-"
-                                 version ".tar.xz"))
+             (uri (qt-urls name version))
              (sha256
               (base32
-               "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
+               "0mlhhhcxx3gpr9kh04c6fljxcj50c2j21r0wb9f7d7nk4flip7b2"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
-       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+       ((#:tests? _ #f) #f)   ; TODO: Enable the tests
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'check 'pre-check
+             (lambda _
+               (setenv "HOME" "/tmp")))))))
     (native-inputs
      (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
     (inputs
@@ -1722,13 +1707,13 @@ plugin for Adobe After Effects.")
 (define-public qttools-5
   (package (inherit qtsvg-5)
     (name "qttools")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
+               "0v7wkzq9i8w3qrw0z8al7lb6clr57lfisyb1fm9cnhi73fvph1vd"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1771,13 +1756,13 @@ that helps in Qt development.")
 (define-public qtscript
   (package (inherit qtsvg-5)
     (name "qtscript")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
+               "17yk0p8ci47xlfpllc17arlycng47wrnnskimskzz85bspabc8pm"))
              (patches (search-patches "qtscript-disable-tests.patch"))))
     (native-inputs
      (list perl qttools-5))
@@ -1791,13 +1776,13 @@ ECMAScript and Qt.")))
 (define-public qtquickcontrols-5
   (package (inherit qtsvg-5)
     (name "qtquickcontrols")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
+               "0mjw25wcgd2bvjz9rr4qjydb423c63615rcx1vws4jmydqdihssr"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1811,13 +1796,13 @@ can be used to build complete interfaces in Qt Quick.")))
 (define-public qtquickcontrols2-5
   (package (inherit qtsvg-5)
     (name "qtquickcontrols2")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
+               "1cxg4ml07k1zcyi5m4lx06sz8f5l67isb5vhk7nakxm0wnn7p8y4"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1838,13 +1823,13 @@ not available.")))
 (define-public qtgraphicaleffects
   (package (inherit qtsvg-5)
     (name "qtgraphicaleffects")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
+               "0xznn5zqp6xrqfgl54l8cig9asqf9m2hz0p3ga514rh8spmdazr3"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1861,13 +1846,13 @@ coloring, and many more.")))
 (define-public qtgamepad
   (package (inherit qtsvg-5)
     (name "qtgamepad")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
+               "0wa4d8f025hlp4bmdzdy5wcahm9wjg6bkwig8dpw9nrsj3idz5b0"))))
     (native-inputs
      (list perl pkg-config))
     (inputs
@@ -1887,21 +1872,23 @@ and mobile applications targeting TV-like form factors.")))
 (define-public qtscxml
   (package (inherit qtsvg-5)
     (name "qtscxml")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
+               "0xf5mqsrw16h8xjglymgfc8qg2qa5bi4fgdl4j3dkhvvpr7vrphp"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  (delete-file-recursively "tests/3rdparty")
                  ;; the scion test refers to the bundled 3rd party test code.
                  (substitute* "tests/auto/auto.pro"
-                   (("scion") "#"))
-                 #t))))
+                   (("scion") "#"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg-5)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
      (list qtbase-5 qtdeclarative-5))
     (synopsis "Qt SCXML module")
@@ -1944,13 +1931,13 @@ information and perform area based monitoring.")
 (define-public qtpurchasing
   (package (inherit qtsvg-5)
     (name "qtpurchasing")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
+               "04z6mwzn73gg56hgs7gividinfgndx4kmcnp7w6h3wamrdlkfdx7"))))
     (inputs
      (list qtbase-5 qtdeclarative-5))
     (synopsis "Qt Purchasing module")
@@ -1960,16 +1947,22 @@ purchasing goods and services.")))
 (define-public qtcharts
   (package (inherit qtsvg-5)
     (name "qtcharts")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
+               "0y051i1837bfybkf8cm7cx8k5wjmbi47pxawaaz6wm0hd2z5b4qi"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
-       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'remove-failing-test
+             (lambda _
+               (substitute* "tests/auto/auto.pro"
+                 (("qml") "# qml")
+                 (("qml-qtquicktest") "# qml-qtquicktest"))))))))
     (inputs
      (list qtbase-5 qtdeclarative-5))
     (synopsis "Qt Charts module")
@@ -1983,13 +1976,13 @@ selecting one of the charts themes.")
 (define-public qtdatavis3d
   (package (inherit qtsvg-5)
     (name "qtdatavis3d")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
+               "0sczwqlc36jdywf7bqxz0hm6mr7fn8p1fsnc33jliiqzn9yrg77x"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2006,23 +1999,13 @@ customized by using themes or by adding custom items and labels to them.")
 (define-public qtnetworkauth-5
   (package (inherit qtsvg-5)
     (name "qtnetworkauth")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments qtsvg-5)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'remove-failing-test
-             (lambda _
-               ;; These tests can't find their test data.
-               (substitute* "tests/auto/auto.pro"
-                 (("oauth1 ") "# oauth1 "))
-               #t))))))
+               "0c7mz715rlpg0cqgs6s0aszmslyamkhnpamc1iij6i571sj5j2f1"))))
     (inputs
      (list qtbase-5))
     (synopsis "Qt Network Authorization module")
@@ -2052,13 +2035,13 @@ implementation of OAuth and OAuth2 authenticathon methods for Qt.")
 (define-public qtremoteobjects
   (package (inherit qtsvg-5)
     (name "qtremoteobjects")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
+               "1m0xcqlbxsfn0cd4ajin1h3i4l51dajmkw91v0r4a61xi14i0kks"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -2072,8 +2055,7 @@ implementation of OAuth and OAuth2 authenticathon methods for Qt.")
                ;; disable failing tests: they need network
                (substitute* "tests/auto/auto.pro"
                  (("integration_multiprocess proxy_multiprocess integration_external restart")
-                   "integration_multiprocess"))
-               #t))))))
+                   "integration_multiprocess"))))))))
     (inputs
      (list qtbase-5 qtdeclarative-5))
     (synopsis "Qt Remote Objects module")
@@ -2085,14 +2067,13 @@ processes or computers.")))
 (define-public qtspeech
   (package (inherit qtsvg-5)
     (name "qtspeech")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
-
+               "0xskp9dzjy5nqszygk8gwvjyiylgynx5sq3nk2vi3zwgfdh5jpm4"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2141,14 +2122,14 @@ using the Enchant spell-checking library.")
   (package
     (inherit qtsvg-5)
     (name "qtwebengine")
-    (version (package-version qtbase-5))
+    (version "5.15.5")
     (source
      (origin
        (method url-fetch)
        (uri (qt-urls name version))
        (sha256
         (base32
-         "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
+         "0zahr9w6rqdxwh2whsgk3fhcszs7wa9j95lq4sqi8xzin2wcgl17"))
        (modules '((ice-9 ftw)
                   (ice-9 match)
                   (srfi srfi-1)
@@ -2184,6 +2165,13 @@ using the Enchant spell-checking library.")
                     "third_party/boringssl/src/third_party/fiat"
                     "third_party/breakpad"
                     "third_party/brotli"
+                    "third_party/catapult/common/py_vulcanize/py_vulcanize"
+                    "third_party/catapult/common/py_vulcanize/third_party"
+                    "third_party/catapult/third_party/beautifulsoup4"
+                    "third_party/catapult/third_party/html5lib-python"
+                    "third_party/catapult/third_party/polymer/components"
+                    "third_party/catapult/tracing"
+                    "third_party/catapult/tracing/third_party"
                     "third_party/ced"
                     "third_party/cld_3"
                     "third_party/closure_compiler"
@@ -2194,10 +2182,8 @@ using the Enchant spell-checking library.")
                     "third_party/dav1d"
                     "third_party/dawn"
                     "third_party/devtools-frontend"
-                    "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
-                    "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
-                    "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
-                    "third_party/devtools-frontend/src/third_party/axe-core"
+                    "third_party/devtools-frontend/src/front_end/third_party"
+                    "third_party/devtools-frontend/src/third_party/typescript"
                     "third_party/emoji-segmenter"
                     "third_party/ffmpeg"
                     "third_party/googletest"
@@ -2212,6 +2198,7 @@ using the Enchant spell-checking library.")
                     "third_party/khronos"
                     "third_party/leveldatabase"
                     "third_party/libaddressinput"
+                    "third_party/libavif"
                     "third_party/libgifcodec"
                     "third_party/libjingle_xmpp"
                     "third_party/libjpeg_turbo"
@@ -2225,6 +2212,7 @@ using the Enchant spell-checking library.")
                     "third_party/libxml"
                     "third_party/libxslt"
                     "third_party/libyuv"
+                    "third_party/lottie"
                     "third_party/lss"
                     "third_party/mako"
                     "third_party/markupsafe"
@@ -2232,6 +2220,7 @@ using the Enchant spell-checking library.")
                     "third_party/metrics_proto"
                     "third_party/modp_b64"
                     "third_party/nasm"
+                    "third_party/node"
                     "third_party/one_euro_filter"
                     "third_party/openh264/src/codec/api/svc"
                     "third_party/opus"
@@ -2256,15 +2245,16 @@ using the Enchant spell-checking library.")
                     "third_party/skia/include/third_party/skcms/skcms.h"
                     "third_party/skia/include/third_party/vulkan"
                     "third_party/skia/third_party/skcms"
-                    "third_party/skia/third_party/vulkanmemoryallocator"
                     "third_party/smhasher"
                     "third_party/snappy"
                     "third_party/sqlite"
                     "third_party/usb_ids"
                     "third_party/usrsctp"
+                    "third_party/vulkan_memory_allocator"
                     "third_party/web-animations-js"
                     "third_party/webrtc"
-                    "third_party/webrtc/common_audio/third_party/fft4g"
+                    "third_party/webrtc/common_audio/third_party/ooura/fft_size_128"
+                    "third_party/webrtc/common_audio/third_party/ooura/fft_size_256"
                     "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
                     "third_party/webrtc/modules/third_party/fft"
                     "third_party/webrtc/modules/third_party/g711"
@@ -2275,7 +2265,7 @@ using the Enchant spell-checking library.")
                     "third_party/widevine/cdm/widevine_cdm_common.h"
                     "third_party/widevine/cdm/widevine_cdm_version.h"
                     "third_party/woff2"
-                    "third_party/yasm"
+                    "third_party/xcbproto"
                     "third_party/zlib"
                     "url/third_party/mozilla"
                     "v8/src/third_party/utf8-decoder"
@@ -2348,16 +2338,19 @@ using the Enchant spell-checking library.")
 
                  ;; Use relative header locations instead of hard coded ones.
                  (substitute*
-                     "base/third_party/dynamic_annotations/dynamic_annotations.c"
+                   "base/third_party/dynamic_annotations/dynamic_annotations.c"
                    (("base/third_party/valgrind") "valgrind"))
                  (substitute*
-                     "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
+                   '("third_party/breakpad/breakpad/src/common/linux/http_upload.cc"
+                     "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h")
                    (("third_party/curl") "curl"))
                  (substitute*
-                     '("components/viz/common/gpu/vulkan_context_provider.h"
-                       "components/viz/common/resources/resource_format_utils_vulkan.h"
-                       "gpu/config/gpu_util.cc")
-                   (("third_party/vulkan/include/")
+                   '("components/viz/common/gpu/vulkan_context_provider.h"
+                     "components/viz/common/resources/resource_format_utils.h"
+                     "gpu/config/gpu_info_collector_win.cc"
+                     "gpu/config/gpu_util.cc"
+                     "gpu/config/vulkan_info.h")
+                   (("third_party/vulkan_headers/include/")
                     ""))
 
                  ;; Replace Google Analytics bundle with an empty file and hope
@@ -2377,6 +2370,7 @@ using the Enchant spell-checking library.")
            flex
            gperf
            ninja
+           node
            perl
            pkg-config
            python2-six
@@ -2404,6 +2398,7 @@ using the Enchant spell-checking library.")
            libxcb
            libxcomposite
            libxcursor
+           libxkbfile
            libxi
            libxkbcommon
            ;; FIXME: libxml2 needs to built with icu support though it links to
@@ -2980,7 +2975,7 @@ module provides support functions to the automatically generated code.")
 (define-public python-pyqt
   (package
     (name "python-pyqt")
-    (version "5.15.2")
+    (version "5.15.5")
     (source
       (origin
         (method url-fetch)
@@ -2993,7 +2988,7 @@ module provides support functions to the automatically generated code.")
         (file-name (string-append "PyQt5-" version ".tar.gz"))
         (sha256
          (base32
-          "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
+          "0aya963kkmbwfwmpd0p6k85y4g7wl5zarjqxxfgir403zalbf4dl"))
         (patches (search-patches "pyqt-configure.patch"))))
     (build-system gnu-build-system)
     (native-inputs
@@ -3071,14 +3066,14 @@ contain over 620 classes.")
 (define-public python-pyqt5-sip
   (package
     (name "python-pyqt5-sip")
-    (version "12.8.1")
+    (version "12.10.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "PyQt5_sip" version))
        (sha256
         (base32
-         "1gg032ys4pccwkdzmdryadc9a4lq85nr05pag9swrsdykbdl9s9h"))))
+         "09771b6fdn0rx34l5a0wzcd899yd57zxp5sw3bsqhd25biwhiq4p"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;; No test code.
@@ -3090,7 +3085,7 @@ contain over 620 classes.")
 (define-public python-pyqtwebengine
   (package
     (name "python-pyqtwebengine")
-    (version "5.15.2")
+    (version "5.15.5")
     (source
      (origin
        (method url-fetch)
@@ -3102,7 +3097,7 @@ contain over 620 classes.")
                                  "/PyQtWebEngine-" version ".tar.gz")))
        (sha256
         (base32
-         "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
+         "0hdr0g0rzlhsnylhfk826pq1lw8p9dqcr8yma2wy9dgjrj6n0ixb"))))
     (build-system gnu-build-system)
     (native-inputs
      (list python python-sip
@@ -3749,7 +3744,7 @@ color-related widgets.")
 (define-public python-shiboken-2
   (package
     (name "python-shiboken-2")
-    (version "5.15.2")
+    (version "5.15.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.qt.io/official_releases"
@@ -3758,7 +3753,7 @@ color-related widgets.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "060ljj1nzyp4zfz2vasbv2i7gs5rfkkjwxxbisd0fdw01d5m01mk"))))
+                "0cwvw6695215498rsbm2xzkwaxdr3w7zfvy4kc62c01k6pxs881r"))))
     (build-system cmake-build-system)
     (inputs
      (list clang-toolchain
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index cc95bd8d6e..4757c5d35b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3126,24 +3126,40 @@ two hashes.")
     (home-page "https://github.com/liufengyun/hashdiff")
     (license license:expat)))
 
-(define-public ruby-hydra
+(define-public ruby-hydra-minimal
   ;; No releases yet.
   (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
         (revision "0"))
     (package
-      (name "ruby-hydra")
+      (name "ruby-hydra-minimal")
       (version (git-version "0.0" revision commit))
       (home-page "https://github.com/hyphenation/hydra")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference (url home-page) (commit commit)))
                 (file-name (git-file-name name version))
+                ;; byebug is a non-essential debugging utility that brings in
+                ;; many dependencies.
+                (patches (search-patches "ruby-hydra-minimal-no-byebug.patch"))
                 (sha256
                  (base32
                   "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
       (build-system ruby-build-system)
       (arguments
-       '(#:phases (modify-phases %standard-phases
+       ;; Avoid rspec dependency.
+       '(#:tests? #f))
+      (synopsis "Ruby hyphenation patterns")
+      (description
+       "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
+It is a low-dependency variant of ruby-hydra.")
+      (license license:expat))))
+
+(define-public ruby-hydra
+  (package
+    (inherit ruby-hydra-minimal)
+    (name "ruby-hydra")
+    (arguments
+        '(#:phases (modify-phases %standard-phases
                     (add-after 'unpack 'make-files-writable
                       (lambda _
                         (for-each make-file-writable (find-files "."))
@@ -3151,14 +3167,12 @@ two hashes.")
                     (replace 'check
                       (lambda _
                         (invoke "rspec"))))))
-      (native-inputs
-       (list ruby-rspec))
-      (propagated-inputs
-       (list ruby-byebug))
-      (synopsis "Ruby hyphenation patterns")
-      (description
-       "ruby-hydra is a Ruby library for working with hyphenation patterns.")
-      (license license:expat))))
+    (native-inputs
+     (list ruby-rspec))
+    (propagated-inputs
+     (list ruby-byebug))
+    (description
+     "ruby-hydra is a Ruby library for working with hyphenation patterns.")))
 
 (define-public ruby-shindo
   (package
@@ -5019,19 +5033,16 @@ to reproduce user environments.")
                (base32
                 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
 
-;; TODO: In the next rebuild cycle, provide texlive a version of ruby-hydra
-;; that does not depend on byebug and rspec, so that their dependencies can
-;; be updated more freely.  For now pin this version to avoid rebuilds.
-(define-public ruby-nokogiri-1.10
+(define-public ruby-nokogiri
   (package
     (name "ruby-nokogiri")
-    (version "1.10.9")
+    (version "1.12.5")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "nokogiri" version))
               (sha256
                (base32
-                "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
+                "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b"))))
     (build-system ruby-build-system)
     (arguments
      ;; Tests fail because Nokogiri can only test with an installed extension,
@@ -5040,28 +5051,13 @@ to reproduce user environments.")
        #:gem-flags (list "--" "--use-system-libraries"
                          (string-append "--with-xml2-include="
                                         (assoc-ref %build-inputs "libxml2")
-                                        "/include/libxml2" ))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'patch-extconf
-           ;; 'pkg-config' is not included in the GEM_PATH during
-           ;; installation, so we add it directly to the load path.
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
-               (substitute* "ext/nokogiri/extconf.rb"
-                 (("gem 'pkg-config'.*")
-                  (string-append "$:.unshift '"
-                                 pkg-config "/lib/ruby/vendor_ruby"
-                                 "/gems/pkg-config-"
-                                 ,(package-version ruby-pkg-config)
-                                 "/lib'\n"))))
-             #t)))))
+                                        "/include/libxml2" ))))
     (native-inputs
      (list ruby-hoe))
     (inputs
      (list zlib libxml2 libxslt))
     (propagated-inputs
-     (list ruby-mini-portile-2 ruby-pkg-config))
+     (list ruby-mini-portile-2.6.1 ruby-pkg-config))
     (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
     (description "Nokogiri (鋸) parses and searches XML/HTML, and features
 both CSS3 selector and XPath 1.0 support.")
@@ -5080,26 +5076,6 @@ both CSS3 selector and XPath 1.0 support.")
                (base32
                 "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq"))))))
 
-(define-public ruby-nokogiri
-  (package
-    (inherit ruby-nokogiri-1.10)
-    (version "1.12.5")
-    (source (origin
-              (method url-fetch)
-              (uri (rubygems-uri "nokogiri" version))
-              (sha256
-               (base32
-                "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b"))))
-    (arguments
-     '(#:tests? #f                      ;XXX: no tests in rubygem
-       #:gem-flags (list "--" "--use-system-libraries"
-                         (string-append "--with-xml2-include="
-                                        (assoc-ref %build-inputs "libxml2")
-                                        "/include/libxml2"))))
-    (propagated-inputs
-     (modify-inputs (package-propagated-inputs ruby-nokogiri-1.10)
-       (replace "ruby-mini-portile" ruby-mini-portile-2.6.1)))))
-
 (define-public ruby-method-source
   (package
     (name "ruby-method-source")
@@ -6728,8 +6704,7 @@ tree-like structures.  It is similar to Ruby's built-in @code{TSort} module.")
       (build-system ruby-build-system)
       (propagated-inputs
        (list ruby-tdiff
-             ;; Use a fixed version to prevent rebuilds; see ruby-nokogiri TODO.
-             ruby-nokogiri-1.10))
+             ruby-nokogiri))
       (native-inputs
        (list ruby-rspec ruby-yard ruby-rubygems-tasks))
       (synopsis "Calculate the differences between two XML/HTML documents")
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 67dc5cdaf3..9d70232cff 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017, 2018 Nikolai Merinov <nikolai.merinov@member.fsf.org>
-;;; Copyright © 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019-2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 (unmatched parenthesis <paren@disroot.org>
 ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2022 Jim Newsome <jnewsome@torproject.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -99,6 +100,7 @@
     ("armhf-linux"    "armv7-unknown-linux-gnueabihf")
     ("aarch64-linux"  "aarch64-unknown-linux-gnu")
     ("mips64el-linux" "mips64el-unknown-linux-gnuabi64")
+    ("riscv64-linux"  "riscv64gc-unknown-linux-gnu")
     (_                (nix-system->gnu-triplet system))))
 
 (define* (rust-uri version #:key (dist "static"))
@@ -136,25 +138,26 @@
       (file-name (git-file-name name (git-version version revision commit)))
       (sha256
        (base32
-        "0f7kh4n2663sn0z3xib8gzw0s97qpvwag40g2vs3bfjlrbpgi9z0")))))
+        "0f7kh4n2663sn0z3xib8gzw0s97qpvwag40g2vs3bfjlrbpgi9z0"))
+      (patches (search-patches "mrustc-riscv64-support.patch")))))
 
-;;; Rust 1.39 is special in that it is built with mrustc, which shortens the
+;;; Rust 1.54 is special in that it is built with mrustc, which shortens the
 ;;; bootstrap path.
-(define rust-1.39
+(define rust-bootstrap
   (package
     (name "rust")
-    (version "1.39.0")
+    (version "1.54.0")
     (source
      (origin
        (method url-fetch)
        (uri (rust-uri version))
-       (sha256 (base32 "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl"))
+       (sha256 (base32 "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc"))
        (modules '((guix build utils)))
-       (snippet '(for-each delete-file-recursively
-                           '("src/llvm-emscripten"
-                             "src/llvm-project"
-                             "vendor/jemalloc-sys/jemalloc")))
-       (patches (search-patches "rustc-1.39.0-src.patch"))
+       (snippet
+        '(begin
+           (for-each delete-file-recursively
+                     '("src/llvm-project"))))
+       (patches (search-patches "rustc-1.54.0-src.patch"))
        (patch-flags '("-p0"))))         ;default is -p1
     (outputs '("out" "cargo"))
     (properties '((timeout . 72000)           ;20 hours
@@ -162,12 +165,19 @@
     (build-system gnu-build-system)
     (inputs
      `(("libcurl" ,curl)
-       ("libssh2" ,libssh2)
-       ("llvm" ,llvm-9)
+       ("llvm" ,llvm)
        ("openssl" ,openssl)
        ("zlib" ,zlib)))
     (native-inputs
      `(("bison" ,bison)
+       ;; A compiler bug in gcc 10/11/12/13 prevents us from using gcc-10.4. See:
+       ;; https://github.com/thepowersgang/mrustc/issues/266
+       ;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105860
+       ("gcc" ,gcc-9)
+       ;; TODO: STARTFILE_PREFIX_SPEC is fixed on gcc<10 on core-updates.
+       ,@(if (target-riscv64?)
+           `(("gcc:lib" ,gcc-9 "lib"))
+           '())
        ("flex" ,flex)
        ("pkg-config" ,pkg-config)
        ;; Required for the libstd sources.
@@ -206,25 +216,24 @@
              ;; to be at this location, and it simplifies things to make it
              ;; so.
              (symlink (getcwd)
-                      (string-append "../mrustc/rustc-" ,version "-src"))))
+                      (string-append "../mrustc/rustc-" ,version "-src"))
+             (with-output-to-file "dl-version"
+               (lambda _
+                 (format #t "~a~%"
+                         ,version)))))
          (add-after 'setup-mrustc-sources 'patch-makefiles
            ;; This disables building the (unbundled) LLVM.
            (lambda* (#:key inputs parallel-build? #:allow-other-keys)
-             (let ((llvm (assoc-ref inputs "llvm"))
-                   (job-spec (format #f "-j~a"
-                                     (if parallel-build?
-                                         (number->string (parallel-job-count))
-                                         "1"))))
+             (let ((llvm (assoc-ref inputs "llvm")))
                (with-directory-excursion "../mrustc"
                  (substitute* '("minicargo.mk"
                                 "run_rustc/Makefile")
                    ;; Use the system-provided LLVM.
                    (("LLVM_CONFIG := .*")
-                    (string-append "LLVM_CONFIG := " llvm "/bin/llvm-config\n"))
-                   (("\\$\\(LLVM_CONFIG\\): .*")
-                    "$(LLVM_CONFIG):\n")
-                   (("\\$Vcd \\$\\(RUSTCSRC\\)build && \\$\\(MAKE\\).*")
-                    "true\n"))
+                    (string-append "LLVM_CONFIG := " llvm "/bin/llvm-config\n")))
+                 (substitute* "minicargo.mk"
+                   ;; Do not try to fetch sources from the Internet.
+                   (("@curl.*") ""))
                  (substitute* "Makefile"
                    ;; Patch date and git obtained version information.
                    ((" -D VERSION_GIT_FULLHASH=.*")
@@ -269,9 +278,6 @@
              (setenv "CXX" "g++")
              ;; The Guix LLVM package installs only shared libraries.
              (setenv "LLVM_LINK_SHARED" "1")
-             ;; This is a workaround for
-             ;; https://github.com/thepowersgang/mrustc/issues/138.
-             (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "yes")
              ;; rustc still insists on having 'cc' on PATH in some places
              ;; (e.g. when building the 'test' library crate).
              (mkdir-p "/tmp/bin")
@@ -283,22 +289,36 @@
              (let* ((src-root (getcwd))
                     (job-count (if parallel-build?
                                    (parallel-job-count)
-                                   1))
-                    (job-spec (string-append "-j" (number->string job-count))))
+                                   1)))
                ;; Adapted from:
-               ;; https://github.com/dtolnay/bootstrap/blob/master/build.sh.
+               ;; https://github.com/dtolnay/bootstrap/blob/master/build-1.54.0.sh.
                (chdir "../mrustc")
-               (setenv "MINICARGO_FLAGS" job-spec)
+               ;; Use PARLEVEL since both minicargo and mrustc use it
+               ;; to set the level of parallelism.
+               (setenv "PARLEVEL" (number->string job-count))
                (setenv "CARGO_BUILD_JOBS" (number->string job-count))
+               (display "Building mrustc...\n")
+               (apply invoke "make" make-flags)
+
+               ;; This doesn't seem to build anything, but it
+               ;; sets additional minicargo flags.
+               (display "Building RUSTCSRC...\n")
+               (apply invoke "make" "RUSTCSRC" make-flags)
+
+               ;; This probably doesn't need to be called explicitly.
+               (display "Building LIBS...\n")
+               (apply invoke "make" "-f" "minicargo.mk" "LIBS" make-flags)
+
                (display "Building rustc...\n")
                (apply invoke "make" "-f" "minicargo.mk" "output/rustc"
-                      job-spec make-flags)
+                      make-flags)
+
                (display "Building cargo...\n")
                (apply invoke "make" "-f" "minicargo.mk" "output/cargo"
-                      job-spec make-flags)
+                      make-flags)
+
+               ;; This one isn't listed in the build script.
                (display "Rebuilding stdlib with rustc...\n")
-               ;; Note: invoking make with -j would cause a compiler error
-               ;; (unexpected panic).
                (apply invoke "make" "-C" "run_rustc" make-flags))))
          (replace 'install
            (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -324,42 +344,38 @@
 safety and thread safety guarantees.")
     (home-page "https://github.com/thepowersgang/mrustc")
 
-    ;; So far mrustc is (x86_64|aarch64)-only.  It may support i686 soon:
+    ;; The intermediate generated code is known to be inefficient and
+    ;; therefore the build process needs 8GB of RAM while building.
+    ;; It may support i686 soon:
     ;; <https://github.com/thepowersgang/mrustc/issues/78>.
-    (supported-systems '("x86_64-linux" "aarch64-linux"))
+    (supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux"))
 
     ;; Dual licensed.
     (license (list license:asl2.0 license:expat))))
 
-(define rust-1.40
+(define rust-1.55
   (package
     (name "rust")
-    (version "1.40.0")
+    (version "1.55.0")
     (source
      (origin
        (method url-fetch)
        (uri (rust-uri version))
-       (sha256 (base32 "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx"))
+       (sha256 (base32 "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rldxj"))
        (modules '((guix build utils)))
-       ;; llvm-emscripten is no longer bundled, as that codegen backend got
-       ;; removed.
-       (snippet '(for-each delete-file-recursively
-                           '("src/llvm-project"
-                             "vendor/jemalloc-sys/jemalloc")))))
+       (snippet
+        '(begin
+           (for-each delete-file-recursively
+                     '("src/llvm-project"
+                       "vendor/tikv-jemalloc-sys/jemalloc"))
+           ;; Add support for riscv64-linux.
+           (substitute* "vendor/tikv-jemallocator/src/lib.rs"
+             (("    target_arch = \"s390x\"," all)
+              (string-append all "\n    target_arch = \"riscv64\",")))))))
     (outputs '("out" "cargo"))
     (properties '((timeout . 72000)           ;20 hours
                   (max-silent-time . 18000))) ;5 hours (for armel)
     (build-system gnu-build-system)
-    ;; Rust 1.40 does not ship rustc-internal libraries by default (see
-    ;; rustc-dev-split). This means that librustc_driver.so is no longer
-    ;; available in lib/rustlib/$target/lib, which is the directory
-    ;; included in the runpath of librustc_codegen_llvm-llvm.so.  This is
-    ;; detected by our validate-runpath phase as an error, but it is
-    ;; harmless as the codegen backend is loaded by librustc_driver.so
-    ;; itself, which must at that point have been already loaded.  As such,
-    ;; we skip validating the runpath for Rust 1.40.  Rust 1.41 stopped
-    ;; putting the codegen backend in a separate library, which makes this
-    ;; workaround only necessary for this release.
     (arguments
      `(#:validate-runpath? #f
        ;; Only the final Rust is tested, not the intermediate bootstrap ones,
@@ -380,24 +396,16 @@ safety and thread safety guarantees.")
              (setenv "CC" (search-input-file inputs "/bin/gcc"))
              ;; The Guix LLVM package installs only shared libraries.
              (setenv "LLVM_LINK_SHARED" "1")))
+         (add-after 'unpack 'set-linker-locale-to-utf8
+           (lambda _
+             (substitute* (find-files "." "^linker.rs$")
+               (("linker.env\\(\"LC_ALL\", \"C\"\\);")
+                "linker.env(\"LC_ALL\", \"en_US.UTF-8\");"))))
          (add-after 'unpack 'add-cc-shim-to-path
            (lambda _
              (mkdir-p "/tmp/bin")
              (symlink (which "gcc") "/tmp/bin/cc")
              (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
-         (add-after 'unpack 'neuter-tidy
-           ;; We often need to patch tests with various Guix-specific paths.
-           ;; This often increases the line length and makes tidy, rustc's
-           ;; style checker, complain.  We could insert additional newlines or
-           ;; add an "// ignore-tidy-linelength" comment, but as an ignore
-           ;; comment must be used, both approaches are fragile due to
-           ;; upstream formatting changes.  As such, disable running the
-           ;; linter during tests, since it's intended for rustc developers
-           ;; anyway.
-           (lambda _
-             (substitute* "src/bootstrap/builder.rs"
-               ((".*::Tidy,.*")
-                ""))))
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -443,13 +451,14 @@ ar = \"" binutils "/bin/ar" "\"
 [dist]
 ") port))))))
          (replace 'build
+           ;; The standard library source location moved in this release.
            (lambda* (#:key parallel-build? #:allow-other-keys)
              (let ((job-spec (string-append
                               "-j" (if parallel-build?
                                        (number->string (parallel-job-count))
                                        "1"))))
                (invoke "./x.py" job-spec "build" "--stage=1"
-                       "src/libstd"
+                       "library/std"
                        "src/tools/cargo"))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
@@ -490,12 +499,12 @@ ar = \"" binutils "/bin/ar" "\"
      `(("cmake" ,cmake-minimal)
        ("pkg-config" ,pkg-config)       ; For "cargo"
        ("python" ,python-wrapper)
-       ("rustc-bootstrap" ,rust-1.39)
-       ("cargo-bootstrap" ,rust-1.39 "cargo")
+       ("rustc-bootstrap" ,rust-bootstrap)
+       ("cargo-bootstrap" ,rust-bootstrap "cargo")
        ("which" ,which)))
     (inputs
      `(("jemalloc" ,jemalloc)
-       ("llvm" ,llvm-9)
+       ("llvm" ,llvm)
        ("openssl" ,openssl)
        ("libssh2" ,libssh2)             ; For "cargo"
        ("libcurl" ,curl)))              ; For "cargo"
@@ -519,10 +528,10 @@ safety and thread safety guarantees.")
     ;; Dual licensed.
     (license (list license:asl2.0 license:expat))))
 
-(define rust-1.41
+(define rust-1.56
   (let ((base-rust (rust-bootstrapped-package
-                    rust-1.40 "1.41.1"
-                    "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q")))
+                    rust-1.55 "1.56.1"
+                    "04cmqx7nn63hzz7z27b2b0dj2qx18rck9ifvip43s6dampx8v2f3")))
     (package
       (inherit base-rust)
       (arguments
@@ -539,115 +548,46 @@ safety and thread safety guarantees.")
                     (string-append name "\"" ,%cargo-reference-hash "\"")))
                  (generate-all-checksums "vendor"))))))))))
 
-(define rust-1.42
-  (rust-bootstrapped-package
-   rust-1.41 "1.42.0" "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j"))
-
-(define rust-1.43
-  (rust-bootstrapped-package
-   rust-1.42 "1.43.0" "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm"))
-
-;; This version requires llvm <= 11.
-(define rust-1.44
-  (rust-bootstrapped-package
-   rust-1.43 "1.44.1"
-   "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
-
-(define rust-1.45
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.44 "1.45.2"
-                    "0273a1g3f59plyi1n0azf21qjzwml1yqdnj5z472crz37qggr8xp")))
-    (package
-      (inherit base-rust)
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'set-linker-locale-to-utf8
-               (lambda _
-                 (substitute* (find-files "." "^linker.rs$")
-                   (("linker.env\\(\"LC_ALL\", \"C\"\\);")
-                    "linker.env(\"LC_ALL\", \"en_US.UTF-8\");")))))))))))
-
-(define rust-1.46
-  (rust-bootstrapped-package
-   rust-1.45 "1.46.0" "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"))
-
-(define rust-1.47
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.46 "1.47.0"
-                    "07fqd2vp7cf1ka3hr207dnnz93ymxml4935vp74g4is79h3dz19i")))
-    (package/inherit base-rust
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               ;; The standard library source location moved in this release.
-               (lambda* (#:key parallel-build? #:allow-other-keys)
-                 (let ((job-spec (string-append
-                                  "-j" (if parallel-build?
-                                           (number->string (parallel-job-count))
-                                           "1"))))
-                   (invoke "./x.py" job-spec "build" "--stage=1"
-                           "library/std"
-                           "src/tools/cargo")))))))))))
-
-(define rust-1.48
-  (rust-bootstrapped-package
-   rust-1.47 "1.48.0" "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwxhf"))
-
-(define rust-1.49
+(define rust-1.57
   (rust-bootstrapped-package
-   rust-1.48 "1.49.0" "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm"))
+   ;; Verified that it *doesn't* build with 1.55. e.g.:
+   ;; * feature `edition2021` is required
+   rust-1.56 "1.57.0" "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim"))
 
-(define rust-1.50
+(define rust-1.58
   (rust-bootstrapped-package
-   rust-1.49 "1.50.0" "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
+   ;; Verified that it *doesn't* build with 1.56. e.g.:
+   ;; * error: attributes starting with `rustc` are reserved for use by the
+   ;;   `rustc` compiler
+   ;; * error: cannot find attribute `rustc_do_not_const_check` in this scope
+   ;; * error[E0522]: definition of an unknown language item:
+   ;;   `const_eval_select_ct`
+   rust-1.57 "1.58.1" "1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8"))
 
-(define rust-1.51
+(define rust-1.59
   (rust-bootstrapped-package
-   rust-1.50 "1.51.0" "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs"))
-
-;;; The LLVM requiriment has been bumped to version 10 in Rust 1.52.  Use the
-;;; latest available.
-(define rust-1.52
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.51 "1.52.1"
-                    "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs")))
-    (package
-      (inherit base-rust)
-      (inputs (alist-replace "llvm" (list llvm-12)
-                             (package-inputs base-rust))))))
+   ;; Verified that it *doesn't* build with 1.57. e.g.:
+   ;; * error: `doc(primitive)` should never have been stable
+   ;; * error[E0522]: definition of an unknown language item:
+   ;;   `generator_return`
+   ;; * error[E0206]: the trait `Copy` may not be implemented for this type
+   rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))
 
-(define rust-1.53
+(define rust-1.60
   (rust-bootstrapped-package
-   rust-1.52 "1.53.0" "1f95p259dfp5ca118bg107rj3rqwlswy65dxn3hg8sqgl4wwmxsw"))
+   ;; Verified that it *doesn't* build with 1.58. e.g.:
+   ;; * error: unknown codegen option: `symbol-mangling-version`
+   rust-1.59 "1.60.0" "1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0"))
 
-(define rust-1.54
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.53
-          "1.54.0" "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc")))
-    (package/inherit base-rust
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet '(delete-file-recursively "src/llvm-project")))))))
-
-(define rust-1.55
-  (rust-bootstrapped-package
-   rust-1.54 "1.55.0" "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rldxj"))
-
-(define rust-1.56
-  (rust-bootstrapped-package
-   rust-1.55 "1.56.1" "04cmqx7nn63hzz7z27b2b0dj2qx18rck9ifvip43s6dampx8v2f3"))
-
-(define rust-1.57
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.56 "1.57.0"
-          "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim")))
+;;; Note: Only the latest versions of Rust are supported and tested.  The
+;;; intermediate rusts are built for bootstrapping purposes and should not
+;;; be relied upon.  This is to ease maintenance and reduce the time
+;;; required to build the full Rust bootstrap chain.
+;;;
+;;; Here we take the latest included Rust, make it public, and re-enable tests
+;;; and extra components such as rustfmt.
+(define-public rust
+  (let ((base-rust rust-1.60))
     (package
       (inherit base-rust)
       (outputs (cons "rustfmt" (package-outputs base-rust)))
@@ -786,12 +726,6 @@ safety and thread safety guarantees.")
                             `("procps" ,procps)
                             (package-native-inputs base-rust))))))
 
-;;; Note: Only the latest versions of Rust are supported and tested.  The
-;;; intermediate rusts are built for bootstrapping purposes and should not
-;;; be relied upon.  This is to ease maintenance and reduce the time
-;;; required to build the full Rust bootstrap chain.
-(define-public rust rust-1.57)
-
 (define-public rust-src
   (hidden-package
    (package
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index bbb070ddf6..cded866c90 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -62,17 +62,17 @@
 (define-public python-sphinx
   (package
     (name "python-sphinx")
-    (version "4.5.0")
+    (version "5.1.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Sphinx" version))
        (sha256
         (base32
-         "1rp28jryxwy24y8vpacclqihbizyi6b1s6id86pibvm46ybcmy3v"))))
+         "12cdy3m5c09lpf2bbxzbhm5v5y9fk7jgm94qrzggpq86waj28cms"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
+     '(#:phases
        (modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
@@ -111,10 +111,6 @@
            texlive-etoolbox
            texlive-generic-ltxcmds
            texlive-hyperref
-           ;; TODO: Remove texlive-stringenc and texlive-zapfding after
-           ;; propagating them in texlive-hyperref in next rebuild cycle.
-           texlive-stringenc
-           texlive-zapfding
            texlive-latex-base           ;alltt, atbegshi, makeidx, textcomp
            texlive-latex-cmap
            texlive-latex-fancyhdr
@@ -148,6 +144,18 @@ for Python projects or other documents consisting of multiple reStructuredText
 sources.")
     (license license:bsd-2)))
 
+;; Some packages do not support Sphinx 5 yet.  Remove when unused.
+(define-public python-sphinx-4
+  (package
+    (inherit python-sphinx)
+    (version "4.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "Sphinx" version))
+              (sha256
+               (base32
+                "1rp28jryxwy24y8vpacclqihbizyi6b1s6id86pibvm46ybcmy3v"))))))
+
 (define-public python-sphinxcontrib-apidoc
   (package
     (name "python-sphinxcontrib-apidoc")
@@ -365,14 +373,16 @@ Blog, News or Announcements section to a Sphinx website.")
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
                (invoke "pytest")))))))
-    (propagated-inputs (list python-docutils python-sphinx))
+    (propagated-inputs (list python-docutils python-sphinx-4))
     (native-inputs
      (list python-pytest
            python-pytest-regressions))
     (home-page "https://github.com/executablebooks/sphinx-panels")
     (synopsis "Sphinx extension for creating panels in a grid layout")
     (description
-     "This package provides a sphinx extension for creating panels in a grid layout.")
+     "This package provides a sphinx extension for creating panels in a
+grid layout.  It is no longer maintained and users are encouraged to use
+@code{sphinx-design} instead.")
     (license license:expat)))
 
 (define-public python-sphinxcontrib-programoutput
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6d3572cf25..3f44c6239d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -159,6 +159,7 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
     (file-name (string-append "hyph-utf8-scripts-"
                               (number->string %texlive-revision)
                               "-checkout"))
+    (patches (search-patches "texlive-hyph-utf8-no-byebug.patch"))
     (sha256
      (base32
       "04xzf5gr3ylyh3ls09imrx4mwq3qp1k97r9njzlan6hlff875rx2"))))
@@ -188,7 +189,8 @@ files from LOCATIONS with expected checksum HASH.  CODE is not currently in use.
                          (string-append root "/tex/generic/hyph-utf8/patterns/quote")))
                    (mkdir "scripts")
                    (copy-recursively
-                    (assoc-ref inputs "hyph-utf8-scripts") "scripts")
+                    (dirname (search-input-file inputs "hyph-utf8.rb"))
+                    "scripts")
 
                    ;; Prepare target directories
                    (mkdir-p patterns)
@@ -226,9 +228,7 @@ files from LOCATIONS with expected checksum HASH.  CODE is not currently in use.
                         (string-append "File.join(\"" ptex "\"")))
                      (invoke "ruby" "generate-ptex-patterns.rb")))))))))
       (native-inputs
-       `(("ruby" ,ruby)
-         ("ruby-hydra" ,ruby-hydra)
-         ("hyph-utf8-scripts" ,hyph-utf8-scripts)))
+       (list ruby ruby-hydra-minimal hyph-utf8-scripts))
       (home-page "https://ctan.org/pkg/hyph-utf8"))))
 
 (define texlive-extra-src
@@ -3429,12 +3429,10 @@ XML, using UTF-8 or a suitable 8-bit encoding.")
              texlive-latex-refcount
              texlive-latex-rerunfilecheck
              texlive-url
-             ;; TODO: Add this in next rebuild cycle.
-             ;;texlive-cm
-             ;;texlive-latex-graphics    ;for keyval
-             ;;texlive-stringenc
-             ;;texlive-zapfding
-             ))
+             texlive-cm
+             texlive-latex-graphics     ;for keyval
+             texlive-stringenc
+             texlive-zapfding))
       (home-page "https://www.ctan.org/pkg/hyperref")
       (synopsis "Extensive support for hypertext in LaTeX")
       (description
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index fea9ff25f7..9128056f78 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -196,6 +196,7 @@ Pendulum instances.")
      (origin
        (method url-fetch)
        (uri (pypi-uri "python-dateutil" version))
+       (patches (search-patches "python-dateutil-pytest-compat.patch"))
        (sha256
         (base32
          "11iy7m4bp2lgfkcl0r6xzf34bvk7ppjmsyn2ygfikbi72v6cl8q1"))))
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 556eb46df4..1e2bbd221a 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1495,14 +1495,14 @@ quality and performance.")
 (define-public libva
   (package
     (name "libva")
-    (version "2.13.0")
+    (version "2.15.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/intel/libva/releases/download/"
                            version "/libva-" version ".tar.bz2"))
        (sha256
-        (base32 "0q6l193x9whd80sjd5mx8cb7c0fcljb19nhfpla5h49nkzrq7lzs"))))
+        (base32 "1jhy8qzfp4ydbxs9qd9km7k5wq8r4s2vq20r1q07lgld8l4x93i5"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config))
@@ -1514,27 +1514,24 @@ quality and performance.")
            mesa
            wayland))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before
-          'build 'fix-dlopen-paths
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
+     (list
+      ;; Most drivers are in mesa's $prefix/lib/dri, so use that.  (Can be
+      ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
+      #:configure-flags
+      #~(list (string-append "--with-drivers-path="
+                             (search-input-directory %build-inputs "lib/dri")))
+      ;; However, we can't write to mesa's store directory, so override the
+      ;; following make variable to install the dummy driver to libva's
+      ;; $prefix/lib/dri directory.
+      #:make-flags
+      #~(list (string-append "dummy_drv_video_ladir=" #$output "/lib/dri"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'fix-dlopen-paths
+            (lambda _
               (substitute* "va/drm/va_drm_auth_x11.c"
                 (("\"libva-x11\\.so\\.%d\"")
-                 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
-              #t))))
-       ;; Most drivers are in mesa's $prefix/lib/dri, so use that.  (Can be
-       ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
-       #:configure-flags
-       (list (string-append "--with-drivers-path="
-                            (assoc-ref %build-inputs "mesa") "/lib/dri"))
-       ;; However, we can't write to mesa's store directory, so override the
-       ;; following make variable to install the dummy driver to libva's
-       ;; $prefix/lib/dri directory.
-       #:make-flags
-       (list (string-append "dummy_drv_video_ladir="
-                            (assoc-ref %outputs "out") "/lib/dri"))))
+                 (string-append "\"" #$output "/lib/libva-x11.so.%d\""))))))))
     (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
     (synopsis "Video acceleration library")
     (description "The main motivation for VA-API (Video Acceleration API) is
@@ -4381,7 +4378,7 @@ tools for styling them, including a built-in real-time video preview.")
            (gst-plugins/selection gst-plugins-bad #:plugins
                                   '("debugutils" "transcode")
                                   #:configure-flags
-                                  '("-Dintrospection=enabled"))
+                                  #~'("-Dintrospection=enabled"))
            gst-libav
            gsound
            gtk+
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index 7f9610149d..1af610b17f 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -236,12 +236,14 @@ engine that uses Wayland for graphics output.")
            enchant
            geoclue
            gst-plugins-base
+           gst-plugins-bad-minimal
            gtk+-2
            harfbuzz
            hyphen
            icu4c
            lcms
            libgcrypt
+           libgudev
            libjpeg-turbo
            libmanette
            libnotify