summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/admin.scm78
-rw-r--r--gnu/packages/adns.scm8
-rw-r--r--gnu/packages/algebra.scm2
-rw-r--r--gnu/packages/android.scm34
-rw-r--r--gnu/packages/aspell.scm14
-rw-r--r--gnu/packages/autotools.scm449
-rw-r--r--gnu/packages/backup.scm120
-rw-r--r--gnu/packages/base.scm109
-rw-r--r--gnu/packages/bash.scm69
-rw-r--r--gnu/packages/bdw-gc.scm55
-rw-r--r--gnu/packages/bioinformatics.scm16
-rw-r--r--gnu/packages/bison.scm4
-rw-r--r--gnu/packages/bittorrent.scm2
-rw-r--r--gnu/packages/boost.scm340
-rw-r--r--gnu/packages/bootstrap.scm108
-rw-r--r--gnu/packages/build-tools.scm3
-rw-r--r--gnu/packages/calendar.scm54
-rw-r--r--gnu/packages/certs.scm4
-rw-r--r--gnu/packages/check.scm348
-rw-r--r--gnu/packages/chemistry.scm2
-rw-r--r--gnu/packages/chromium.scm16
-rw-r--r--gnu/packages/cluster.scm2
-rw-r--r--gnu/packages/cmake.scm256
-rw-r--r--gnu/packages/commencement.scm1596
-rw-r--r--gnu/packages/compression.scm336
-rw-r--r--gnu/packages/cpp.scm2
-rw-r--r--gnu/packages/cran.scm10
-rw-r--r--gnu/packages/crates-io.scm44
-rw-r--r--gnu/packages/crypto.scm4
-rw-r--r--gnu/packages/cups.scm529
-rw-r--r--gnu/packages/curl.scm172
-rw-r--r--gnu/packages/cyrus-sasl.scm70
-rw-r--r--gnu/packages/databases.scm4
-rw-r--r--gnu/packages/dbm.scm4
-rw-r--r--gnu/packages/dejagnu.scm100
-rw-r--r--gnu/packages/diffoscope.scm7
-rw-r--r--gnu/packages/django.scm6
-rw-r--r--gnu/packages/djvu.scm15
-rw-r--r--gnu/packages/docbook.scm118
-rw-r--r--gnu/packages/documentation.scm73
-rw-r--r--gnu/packages/ed.scm12
-rw-r--r--gnu/packages/elf.scm6
-rw-r--r--gnu/packages/emacs.scm2
-rw-r--r--gnu/packages/file-systems.scm11
-rw-r--r--gnu/packages/file.scm24
-rw-r--r--gnu/packages/finance.scm33
-rw-r--r--gnu/packages/fonts.scm2
-rw-r--r--gnu/packages/fontutils.scm55
-rw-r--r--gnu/packages/freedesktop.scm58
-rw-r--r--gnu/packages/fribidi.scm4
-rw-r--r--gnu/packages/gawk.scm69
-rw-r--r--gnu/packages/gcc.scm140
-rw-r--r--gnu/packages/gd.scm15
-rw-r--r--gnu/packages/geo.scm1
-rw-r--r--gnu/packages/gettext.scm10
-rw-r--r--gnu/packages/ghostscript.scm412
-rw-r--r--gnu/packages/gl.scm101
-rw-r--r--gnu/packages/glib.scm448
-rw-r--r--gnu/packages/gnome.scm518
-rw-r--r--gnu/packages/gnupg.scm127
-rw-r--r--gnu/packages/gnuzilla.scm38
-rw-r--r--gnu/packages/graphics.scm114
-rw-r--r--gnu/packages/graphviz.scm51
-rw-r--r--gnu/packages/gsasl.scm4
-rw-r--r--gnu/packages/gstreamer.scm31
-rw-r--r--gnu/packages/gtk.scm667
-rw-r--r--gnu/packages/guile.scm161
-rw-r--r--gnu/packages/haskell.scm54
-rw-r--r--gnu/packages/ibus.scm2
-rw-r--r--gnu/packages/icu4c.scm163
-rw-r--r--gnu/packages/image.scm123
-rw-r--r--gnu/packages/inkscape.scm101
-rw-r--r--gnu/packages/java.scm35
-rw-r--r--gnu/packages/jemalloc.scm66
-rw-r--r--gnu/packages/jrnl.scm64
-rw-r--r--gnu/packages/kde-plasma.scm6
-rw-r--r--gnu/packages/kerberos.scm13
-rw-r--r--gnu/packages/libbsd.scm39
-rw-r--r--gnu/packages/libevent.scm6
-rw-r--r--gnu/packages/libffi.scm29
-rw-r--r--gnu/packages/libidn.scm10
-rw-r--r--gnu/packages/libreoffice.scm1
-rw-r--r--gnu/packages/libsigsegv.scm4
-rw-r--r--gnu/packages/libunistring.scm30
-rw-r--r--gnu/packages/libusb.scm4
-rw-r--r--gnu/packages/linux.scm423
-rw-r--r--gnu/packages/llvm.scm74
-rw-r--r--gnu/packages/lxde.scm2
-rw-r--r--gnu/packages/m4.scm37
-rw-r--r--gnu/packages/make-bootstrap.scm268
-rw-r--r--gnu/packages/man.scm56
-rw-r--r--gnu/packages/maths.scm148
-rw-r--r--gnu/packages/matrix.scm4
-rw-r--r--gnu/packages/messaging.scm12
-rw-r--r--gnu/packages/moreutils.scm2
-rw-r--r--gnu/packages/multiprecision.scm8
-rw-r--r--gnu/packages/music.scm6
-rw-r--r--gnu/packages/ncurses.scm301
-rw-r--r--gnu/packages/nettle.scm6
-rw-r--r--gnu/packages/networking.scm6
-rw-r--r--gnu/packages/ninja.scm6
-rw-r--r--gnu/packages/node.scm16
-rw-r--r--gnu/packages/nss.scm46
-rw-r--r--gnu/packages/ocaml.scm10
-rw-r--r--gnu/packages/onc-rpc.scm9
-rw-r--r--gnu/packages/openldap.scm53
-rw-r--r--gnu/packages/package-management.scm2
-rw-r--r--gnu/packages/patches/autotrace-glib-compat.patch50
-rw-r--r--gnu/packages/patches/bash-completion-directories.patch20
-rw-r--r--gnu/packages/patches/bc-fix-cross-compilation.patch74
-rw-r--r--gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch231
-rw-r--r--gnu/packages/patches/binutils-CVE-2021-45078.patch257
-rw-r--r--gnu/packages/patches/camlboot-dynamically-allocate-stack-signal.patch52
-rw-r--r--gnu/packages/patches/cmake-curl-certificates.patch40
-rw-r--r--gnu/packages/patches/coreutils-ls.patch117
-rw-r--r--gnu/packages/patches/curl-easy-lock.patch31
-rw-r--r--gnu/packages/patches/cyrus-sasl-CVE-2019-19906.patch25
-rw-r--r--gnu/packages/patches/freeimage-libtiff-compat.patch19
-rw-r--r--gnu/packages/patches/gash-utils-ls-test.patch25
-rw-r--r--gnu/packages/patches/gcc-10-tree-sra-union-handling.patch33
-rw-r--r--gnu/packages/patches/gettext-libunicode-update.patch99
-rw-r--r--gnu/packages/patches/ghc-9.2-grep-warnings.patch37
-rw-r--r--gnu/packages/patches/ghc-testsuite-grep-compat.patch39
-rw-r--r--gnu/packages/patches/ghostscript-no-header-creationdate.patch20
-rw-r--r--gnu/packages/patches/ghostscript-no-header-id.patch29
-rw-r--r--gnu/packages/patches/ghostscript-no-header-uuid.patch11
-rw-r--r--gnu/packages/patches/glib-networking-32-bit-time.patch61
-rw-r--r--gnu/packages/patches/glibc-dl-cache.patch5
-rw-r--r--gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch4
-rw-r--r--gnu/packages/patches/glibc-static-nss.patch1244
-rw-r--r--gnu/packages/patches/gnupg-CVE-2022-34903.patch54
-rw-r--r--gnu/packages/patches/gnutls-guile-eintr-eagain.patch56
-rw-r--r--gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch51
-rw-r--r--gnu/packages/patches/gobject-introspection-cc.patch11
-rw-r--r--gnu/packages/patches/icedtea-7-hotspot-pointer-comparison.patch36
-rw-r--r--gnu/packages/patches/inkscape-poppler-compat.patch45
-rw-r--r--gnu/packages/patches/jsoncpp-pkg-config-version.patch24
-rw-r--r--gnu/packages/patches/libaio-32bit-test.patch26
-rw-r--r--gnu/packages/patches/libffi-3.3-powerpc-fixes.patch138
-rw-r--r--gnu/packages/patches/libffi-float128-powerpc64le.patch58
-rw-r--r--gnu/packages/patches/libssh2-CVE-2019-17498.patch126
-rw-r--r--gnu/packages/patches/libtiff-CVE-2022-34526.patch22
-rw-r--r--gnu/packages/patches/libtool-grep-compat.patch51
-rw-r--r--gnu/packages/patches/libtool-skip-tests2.patch4
-rw-r--r--gnu/packages/patches/libwpd-gcc-compat.patch17
-rw-r--r--gnu/packages/patches/libxml2-parent-pointers.patch228
-rw-r--r--gnu/packages/patches/libxml2-terminating-newline.patch33
-rw-r--r--gnu/packages/patches/libxml2-xpath-recursion-limit.patch20
-rw-r--r--gnu/packages/patches/linux-pam-unix_chkpwd.patch9
-rw-r--r--gnu/packages/patches/llvm-8-missing-include.patch17
-rw-r--r--gnu/packages/patches/m4-gnulib-libio.patch128
-rw-r--r--gnu/packages/patches/mesa-fix-sporadic-test-failures.patch27
-rw-r--r--gnu/packages/patches/mesa-skip-tests.patch19
-rw-r--r--gnu/packages/patches/mm-common-reproducible-tarball.patch40
-rw-r--r--gnu/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch52
-rw-r--r--gnu/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch52
-rw-r--r--gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch49
-rw-r--r--gnu/packages/patches/pciutils-hurd-configure.patch35
-rw-r--r--gnu/packages/patches/pciutils-hurd-fix.patch23
-rw-r--r--gnu/packages/patches/procps-strtod-test.patch36
-rw-r--r--gnu/packages/patches/python-2.7-expat-compat.patch59
-rw-r--r--gnu/packages/patches/python-3-fix-tests.patch155
-rw-r--r--gnu/packages/patches/python-3-no-static-lib.patch75
-rw-r--r--gnu/packages/patches/python-feedparser-missing-import.patch34
-rw-r--r--gnu/packages/patches/python-parso-unit-tests-in-3.10.patch186
-rw-r--r--gnu/packages/patches/python-sgmllib3k-assertions.patch221
-rw-r--r--gnu/packages/patches/python-typeguard-python3.10.patch47
-rw-r--r--gnu/packages/patches/source-highlight-gcc-compat.patch74
-rw-r--r--gnu/packages/patches/swig-support-gcc-12.patch16
-rw-r--r--gnu/packages/patches/texinfo-headings-single.patch21
-rw-r--r--gnu/packages/patches/util-linux-CVE-2021-3995.patch146
-rw-r--r--gnu/packages/patches/util-linux-CVE-2021-3996.patch233
-rw-r--r--gnu/packages/pciutils.scm47
-rw-r--r--gnu/packages/pcre.scm159
-rw-r--r--gnu/packages/pdf.scm126
-rw-r--r--gnu/packages/perl.scm17
-rw-r--r--gnu/packages/plotutils.scm12
-rw-r--r--gnu/packages/polkit.scm202
-rw-r--r--gnu/packages/pretty-print.scm69
-rw-r--r--gnu/packages/pulseaudio.scm102
-rw-r--r--gnu/packages/python-check.scm12
-rw-r--r--gnu/packages/python-crypto.scm59
-rw-r--r--gnu/packages/python-web.scm16
-rw-r--r--gnu/packages/python-xyz.scm335
-rw-r--r--gnu/packages/python.scm60
-rw-r--r--gnu/packages/qt.scm144
-rw-r--r--gnu/packages/radio.scm4
-rw-r--r--gnu/packages/readline.scm47
-rw-r--r--gnu/packages/ruby.scm22
-rw-r--r--gnu/packages/rust.scm8
-rw-r--r--gnu/packages/samba.scm230
-rw-r--r--gnu/packages/security-token.scm10
-rw-r--r--gnu/packages/selinux.scm6
-rw-r--r--gnu/packages/serialization.scm26
-rw-r--r--gnu/packages/shells.scm67
-rw-r--r--gnu/packages/sphinx.scm14
-rw-r--r--gnu/packages/sqlite.scm7
-rw-r--r--gnu/packages/ssh.scm9
-rw-r--r--gnu/packages/statistics.scm6
-rw-r--r--gnu/packages/swig.scm4
-rw-r--r--gnu/packages/tcl.scm8
-rw-r--r--gnu/packages/tex.scm2213
-rw-r--r--gnu/packages/texinfo.scm5
-rw-r--r--gnu/packages/tls.scm505
-rw-r--r--gnu/packages/version-control.scm659
-rw-r--r--gnu/packages/video.scm20
-rw-r--r--gnu/packages/vulkan.scm8
-rw-r--r--gnu/packages/web-browsers.scm6
-rw-r--r--gnu/packages/web.scm141
-rw-r--r--gnu/packages/webkit.scm3
-rw-r--r--gnu/packages/wm.scm59
-rw-r--r--gnu/packages/wxwidgets.scm3
-rw-r--r--gnu/packages/xdisorg.scm52
-rw-r--r--gnu/packages/xiph.scm4
-rw-r--r--gnu/packages/xml.scm183
-rw-r--r--gnu/packages/xorg.scm123
216 files changed, 9520 insertions, 12111 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index f48362c203..dc980f5dfe 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -328,12 +328,9 @@ interface and is based on GNU Guile.")
     (license license:gpl3+)
     (home-page "https://www.gnu.org/software/shepherd/")))
 
-;; Update on the next rebuild cycle.
-(define-public shepherd shepherd-0.8)
-
 (define-public shepherd-0.9
   (package
-    (inherit shepherd)
+    (inherit shepherd-0.8)
     (version "0.9.3")
     (source (origin
               (method url-fetch)
@@ -368,6 +365,8 @@ interface and is based on GNU Guile.")
                          guile-fibers-1.1))       ;for cross-compilation
     (inputs (list guile-3.0-latest guile-fibers-1.1))))
 
+(define-public shepherd shepherd-0.9)
+
 (define-public guile2.2-shepherd
   (package
     (inherit shepherd-0.9)
@@ -897,14 +896,14 @@ re-executing them as necessary.")
 (define-public inetutils
   (package
     (name "inetutils")
-    (version "2.0")
+    (version "2.3")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnu/inetutils/inetutils-"
-                                 version ".tar.gz"))
-             (sha256
-              (base32
-               "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl"))))
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/inetutils/inetutils-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1dj4ilxy1wrfxhxc85iya3x28h1mhjpqc5nv862xcq3ww2gqkv8w"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--localstatedir=/var"
@@ -928,19 +927,21 @@ re-executing them as necessary.")
        ;; Make sure that canonical "coreutils" package is not referred.
        #:make-flags
        (list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\""
-                            (assoc-ref %build-inputs "coreutils*")
-                            "/bin/cp\\\""))
+                            (search-input-file %build-inputs "bin/cp")
+                            "\\\""))
        ;; On some systems, 'libls.sh' may fail with an error such as:
        ;; "Failed to tell switch -a apart from -A".
        #:parallel-tests? #f))
-    (inputs `(("coreutils*" ,coreutils)
-              ("shadow" ,shadow)    ;for login (used in telnetd and rlogind)
-              ("ncurses" ,ncurses)
-              ("readline" ,readline)))        ;for 'ftp'
-    (native-inputs (if (member (%current-system)
-                               (package-supported-systems net-tools))
-                       `(("netstat" ,net-tools))  ;for tests
-                       '()))
+    (inputs
+     (list coreutils
+           shadow                     ;for login (used in telnetd and rlogind)
+           ncurses
+           readline))                   ;for 'ftp'
+    (native-inputs
+     (if (member (%current-system)
+                 (package-supported-systems net-tools))
+         (list net-tools)               ;for tests
+         '()))
     (home-page "https://www.gnu.org/software/inetutils/")
     (synopsis "Basic networking utilities")
     (description
@@ -952,15 +953,15 @@ hostname.")
 (define-public shadow
   (package
     (name "shadow")
-    (version "4.9")
+    (version "4.13")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://github.com/shadow-maint/shadow/releases/"
-                    "download/v" version "/shadow-" version ".tar.xz"))
+                    "download/" version "/shadow-" version ".tar.xz"))
               (sha256
                (base32
-                "0i4iijbshnwnsrskxzrh18xgmzff0hdpsnnkmyc2gdn1x4n1zv7y"))))
+                "0b6xz415b4y3y5nk3pw9xibv05kln4cjbmhybyncmrx2g5fj9zls"))))
     (build-system gnu-build-system)
     (arguments
      `(;; Assume System V `setpgrp (void)', which is the default on GNU
@@ -1002,7 +1003,13 @@ hostname.")
                (substitute* "lib/nscd.c"
                  (("/usr/sbin/nscd")
                   (string-append libc "/sbin/nscd"))))))
-         (add-after 'install 'remove-groups
+         (add-after 'install 'install-man-pages
+           (lambda _
+             ;; The top-level Makefile.am wrongfully has "SUBDIRS += man"
+             ;; under "if ENABLE_REGENERATE_MAN", even though prebuilt man
+             ;; pages are available.  Thus, install them manually.
+             (invoke "make" "-C" "man" "install")))
+         (add-after 'install-man-pages 'remove-groups
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Remove `groups', which is already provided by Coreutils.
              (let* ((out (assoc-ref outputs "out"))
@@ -1023,27 +1030,10 @@ hostname.")
      "Shadow provides a number of authentication-related tools, including:
 login, passwd, su, groupadd, and useradd.")
 
-    (properties '((hidden? . #t)))                ;see below
-
     ;; The `vipw' program is GPLv2+.
     ;; libmisc/salt.c is public domain.
     (license license:bsd-3)))
 
-(define-public shadow-with-man-pages
-  ;; TODO: Merge with 'shadow' on the next core-updates cycle.
-  (package/inherit shadow
-    (properties '())                              ;not hidden
-    (arguments
-     (substitute-keyword-arguments (package-arguments shadow)
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-after 'install 'install-man-pages
-             (lambda _
-               ;; The top-level Makefile.am wrongfully has "SUBDIRS += man"
-               ;; under "if ENABLE_REGENERATE_MAN", even though prebuilt man
-               ;; pages are available.  Thus, install them manually.
-               (invoke "make" "-C" "man" "install")))))))))
-
 (define-public mingetty
   (package
     (name "mingetty")
@@ -1536,7 +1526,7 @@ connection alive.")
        (list config perl file))
 
       (inputs `(("inetutils" ,inetutils)
-                ("bash" ,(canonical-package bash-minimal)) ;for wrap-program
+                ("bash" ,bash-minimal)
                 ,@(if (hurd-target?) '()
                       `(("net-tools" ,net-tools)
                         ("iproute" ,iproute)))
@@ -2941,7 +2931,7 @@ provides the following commands:
      ;; variable in the tests/cpan.scm test.
      (list (search-path-specification
             (variable "GUIX_PYTHONPATH")
-            (files (list "lib/python3.9/site-packages")))))
+            (files (list "lib/python3.10/site-packages")))))
     (home-page "https://www.ansible.com/")
     (synopsis "Radically simple IT automation")
     (description "Ansible aims to be a radically simple IT automation system.
diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm
index 5703016549..913d885af4 100644
--- a/gnu/packages/adns.scm
+++ b/gnu/packages/adns.scm
@@ -65,7 +65,7 @@ scripts.")
 (define-public c-ares
   (package
     (name "c-ares")
-    (version "1.17.2")
+    (version "1.18.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -73,12 +73,10 @@ scripts.")
                     ".tar.gz"))
               (sha256
                (base32
-                "0gcincjvpll2qmlc906jx6mfq97s87mgi0zby0753ki0rr2ch0s8"))))
+                "1kxviskwsaa7dcgscvssxa8ps88pdq7kq4z93gxvz7sam2l54z8s"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; FIXME: Some tests require network access
-       #:tests? #f
-       #:phases
+     '(#:phases
        (modify-phases %standard-phases
          (add-before 'check 'filter-live-tests
            (lambda _
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 5842a166ad..5d4869ace2 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -685,7 +685,7 @@ binary.")
              (patches (search-patches "bc-fix-cross-compilation.patch"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list automake autoconf ed flex texinfo))
+     (list automake autoconf ed flex readline texinfo))
     (inputs
      (list readline))
     (arguments
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 881b75d763..962afc6759 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2017, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2019, 2020 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2019, 2020, 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
@@ -1059,36 +1059,17 @@ safest way, on a file image.")
 useful for reverse engineering, analysis of Android applications and more.")
     (license license:asl2.0)))
 
-(define-public python-android-backup
-  (package
-    (name "python-android-backup")
-    (version "0.2.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "android_backup" version))
-       (sha256
-        (base32
-         "15wb2lyjj2fpf7bhvmgpqn0mglsjj11zfvbjycx7mnidisgnljw6"))))
-    (build-system python-build-system)
-    (propagated-inputs (list python-pycrypto))
-    (home-page "https://github.com/bluec0re/android-backup-tools")
-    (synopsis "Unpack and repack android backups")
-    (description "This package allows you to unpack and repack Android
-backups.  It supports encrypted archives.")
-    (license license:asl2.0)))
-
 (define-public python-miio
   (package
     (name "python-miio")
-    (version "0.5.11")
+    (version "0.5.12")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "python-miio" version))
        (sha256
         (base32
-         "1dyzzywfa5h6q8clmzxsqmszlby8757ajmvkhdyvq6719z4bn46n"))))
+         "05kc0icap3a4iw4910zfqi61zphcf6x958v2b5x68fy51ld3b704"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1098,12 +1079,6 @@ backups.  It supports encrypted archives.")
              (substitute* "setup.py"
                (("cryptography>=35")
                 "cryptography"))))
-         (add-after 'unpack 'adjust-for-click-8
-           (lambda _
-             (substitute* '("miio/integrations/vacuum/roborock/vacuum.py"
-                            "miio/integrations/vacuum/roborock/vacuum_cli.py")
-               (("resultcallback")
-                "result_callback"))))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
@@ -1116,8 +1091,7 @@ backups.  It supports encrypted archives.")
            python-sphinx-rtd-theme
            python-sphinxcontrib-apidoc))
     (propagated-inputs
-     (list python-android-backup
-           python-appdirs
+     (list python-appdirs
            python-attrs
            python-click
            python-construct
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 3482a756e0..83b54a2986 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -49,7 +49,6 @@
   (package
     (name "aspell")
     (version "0.60.8")
-    (replacement aspell/replacement)
     (source
      (origin
       (method url-fetch)
@@ -58,7 +57,8 @@
       (sha256
        (base32
         "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr"))
-      (patches (search-patches "aspell-default-dict-dir.patch"))))
+      (patches (search-patches "aspell-default-dict-dir.patch"
+                               "aspell-CVE-2019-25051.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -95,16 +95,6 @@ documents written in the UTF-8 encoding and its ability to use multiple
 dictionaries, including personal ones.")
     (license lgpl2.1+)))
 
-;; Replacement package with security fixes.
-(define aspell/replacement
-  (package
-    (inherit aspell)
-    (source
-     (origin
-       (inherit (package-source aspell))
-       (patches (append (origin-patches (package-source aspell))
-                        (search-patches "aspell-CVE-2019-25051.patch")))))))
-
 ;;;
 ;;; Dictionaries.
 ;;;
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 006a9e202b..14fa42eefa 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -6,12 +6,13 @@
 ;;; Copyright © 2015, 2017, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
-;;; Copyright © 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (ice-9 match)
@@ -51,55 +53,55 @@
     (version "2.69")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/autoconf/autoconf-"
-                          version ".tar.xz"))
-      (sha256
-       (base32
-        "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"))))
+       (method url-fetch)
+       (uri (string-append "mirror://gnu/autoconf/autoconf-"
+                           version ".tar.xz"))
+       (sha256
+        (base32
+         "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"))))
     (build-system gnu-build-system)
     (inputs
-     `(("bash" ,bash-minimal)
-       ("perl" ,perl)
-       ("m4" ,m4)))
+     (list bash-minimal m4 perl))
     (native-inputs
      (list perl m4))
     (arguments
-     `(;; XXX: testsuite: 209 and 279 failed.  The latter is an impurity.  It
-       ;; should use our own "cpp" instead of "/lib/cpp".
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         ,@(if (%current-target-system)
-               '((add-after 'install 'patch-non-shebang-references
-                    (lambda* (#:key build inputs outputs #:allow-other-keys)
-                      ;; `patch-shebangs' patches shebangs only, and the Perl
-                      ;; scripts use a re-exec feature that references the
-                      ;; build hosts' perl.  Also, BASH and M4 store references
-                      ;; hide in the scripts.
-                      (let ((bash (assoc-ref inputs "bash"))
-                            (m4 (assoc-ref inputs "m4"))
-                            (perl (assoc-ref inputs "perl"))
-                            (out  (assoc-ref outputs "out"))
-                            (store-directory (%store-directory)))
-                        (substitute* (find-files (string-append out "/bin"))
-                          (((string-append store-directory "/[^/]*-bash-[^/]*"))
-                           bash)
-                          (((string-append store-directory "/[^/]*-m4-[^/]*"))
-                           m4)
-                          (((string-append store-directory "/[^/]*-perl-[^/]*"))
-                           perl))))))
-               '())
-         (add-after 'install 'unpatch-shebangs
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; Scripts that "autoconf -i" installs (config.guess,
-             ;; config.sub, and install-sh) must use a regular shebang
-             ;; rather than a reference to the store.  Restore it.
-             (let* ((out (assoc-ref outputs "out"))
-                    (build-aux (string-append
-                                out "/share/autoconf/build-aux")))
-               (substitute* (find-files build-aux)
-                 (("^#!.*/bin/sh") "#!/bin/sh"))))))))
+     (list
+      ;; XXX: testsuite: 209 and 279 failed.  The latter is an impurity.  It
+      ;; should use our own "cpp" instead of "/lib/cpp".
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(if (%current-target-system)
+                 '((add-after 'install 'patch-non-shebang-references
+                     (lambda* (#:key build inputs #:allow-other-keys)
+                       ;; `patch-shebangs' patches shebangs only, and the Perl
+                       ;; scripts use a re-exec feature that references the
+                       ;; build hosts' perl.  Also, BASH and M4 store references
+                       ;; hide in the scripts.
+                       (let ((bash (dirname (dirname
+                                             (search-input-file inputs "bin/bash"))))
+                             (m4 (dirname (dirname
+                                           (search-input-file inputs "bin/m4"))))
+                             (perl (dirname (dirname
+                                             (search-input-file inputs "bin/perl"))))
+                             (store-directory (%store-directory)))
+                         (substitute* (find-files (string-append #$output "/bin"))
+                           (((string-append store-directory "/[^/]*-bash-[^/]*"))
+                            bash)
+                           (((string-append store-directory "/[^/]*-m4-[^/]*"))
+                            m4)
+                           (((string-append store-directory "/[^/]*-perl-[^/]*"))
+                            perl))))))
+                 '())
+          (add-after 'install 'unpatch-shebangs
+            (lambda _
+              ;; Scripts that "autoconf -i" installs (config.guess,
+              ;; config.sub, and install-sh) must use a regular shebang
+              ;; rather than a reference to the store.  Restore it.
+              (let ((build-aux (string-append #$output
+                                              "/share/autoconf/build-aux")))
+                (substitute* (find-files build-aux)
+                  (("^#!.*/bin/sh") "#!/bin/sh"))))))))
     (home-page "https://www.gnu.org/software/autoconf/")
     (synopsis "Create source code configuration scripts")
     (description
@@ -129,17 +131,17 @@ know anything about Autoconf or M4.")
         ;; FIXME: To run the test suite, fix all the instances where scripts
         ;; generates "#! /bin/sh" shebangs.
         #f)
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-before 'check 'prepare-tests
-             (lambda _
-               (for-each patch-shebang
-                         (append (find-files "tests"
-                                             (lambda (file stat)
-                                               (executable-file? file)))
-                                 (find-files "bin"
-                                             (lambda (file stat)
-                                               (executable-file? file)))))))))))))
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-before 'check 'prepare-tests
+              (lambda _
+                (for-each patch-shebang
+                          (append (find-files "tests"
+                                              (lambda (file stat)
+                                                (executable-file? file)))
+                                  (find-files "bin"
+                                              (lambda (file stat)
+                                                (executable-file? file)))))))))))))
 
 (define-public autoconf autoconf-2.69)
 
@@ -203,70 +205,65 @@ know anything about Autoconf or M4.")
 use our own Bash instead of /bin/sh in shebangs.  For that reason, it should
 only be used internally---users should not end up distributing `configure'
 files with a system-specific shebang."
-  (package (inherit autoconf)
+  (package
+    (inherit autoconf)
     (name (string-append (package-name autoconf) "-wrapper"))
     (build-system trivial-build-system)
-    (inputs `(("guile"
-               ;; XXX: Kludge to hide the circular dependency.
-               ,(module-ref (resolve-interface '(gnu packages guile))
-                            'guile-3.0/pinned))
-              ("autoconf" ,autoconf)
-              ("bash" ,bash-minimal)))
+    (inputs
+     (list
+      ;; XXX: Kludge to hide the circular dependency.
+      (module-ref (resolve-interface '(gnu packages guile))
+                  'guile-3.0/pinned)
+      autoconf
+      bash-minimal))
     (arguments
-     '(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let* ((out      (assoc-ref %outputs "out"))
-                (bin      (string-append out "/bin"))
-                (autoconf (string-append
-                           (assoc-ref %build-inputs "autoconf")
-                           "/bin/autoconf"))
-                (guile    (string-append
-                           (assoc-ref %build-inputs "guile")
-                           "/bin/guile"))
-                (sh       (string-append
-                           (assoc-ref %build-inputs "bash")
-                           "/bin/sh"))
+     (list
+      #:modules '((guix build utils))
+      #:builder
+      #~(begin
+          (use-modules (guix build utils))
+          (let ((bin      (string-append #$output "/bin"))
+                (autoconf (search-input-file %build-inputs "/bin/autoconf"))
+                (guile    (search-input-file %build-inputs "/bin/guile"))
+                (sh       (search-input-file %build-inputs "/bin/sh"))
                 (modules  ((compose dirname dirname dirname)
                            (search-path %load-path
                                         "guix/build/utils.scm"))))
-           (mkdir-p bin)
-
-           ;; Symlink all the binaries but `autoconf'.
-           (with-directory-excursion bin
-             (for-each (lambda (file)
-                         (unless (string=? (basename file) "autoconf")
-                           (symlink file (basename file))))
-                       (find-files (dirname autoconf) ".*")))
-
-           ;; Add an `autoconf' binary that wraps the real one.
-           (call-with-output-file (string-append bin "/autoconf")
-             (lambda (port)
-               ;; Shamefully, Guile can be used in shebangs only if a
-               ;; single argument is passed (-ds); otherwise it gets
-               ;; them all as a single argument and fails to parse them.
-               (format port "#!~a
+            (mkdir-p bin)
+
+            ;; Symlink all the binaries but `autoconf'.
+            (with-directory-excursion bin
+              (for-each (lambda (file)
+                          (unless (string=? (basename file) "autoconf")
+                            (symlink file (basename file))))
+                        (find-files (dirname autoconf) ".*")))
+
+            ;; Add an `autoconf' binary that wraps the real one.
+            (call-with-output-file (string-append bin "/autoconf")
+              (lambda (port)
+                ;; Shamefully, Guile can be used in shebangs only if a
+                ;; single argument is passed (-ds); otherwise it gets
+                ;; them all as a single argument and fails to parse them.
+                (format port "#!~a
 export GUILE_LOAD_PATH=\"~a\"
 export GUILE_LOAD_COMPILED_PATH=\"~a\"
 exec ~a --no-auto-compile \"$0\" \"$@\"
 !#~%"
-                       sh modules modules guile)
-               (write
-                `(begin
-                   (use-modules (guix build utils))
-                   (let ((result (apply system* ,autoconf
-                                        (cdr (command-line)))))
-                     (when (and (file-exists? "configure")
-                                (not (file-exists? "/bin/sh")))
-                       ;; Patch regardless of RESULT, because `autoconf
-                       ;; -Werror' can both create a `configure' file and
-                       ;; return a non-zero exit code.
-                       (patch-shebang "configure"))
-                     (exit (status:exit-val result))))
-                port)))
-           (chmod (string-append bin "/autoconf") #o555)
-           #t))))
+                        sh modules modules guile)
+                (write
+                 `(begin
+                    (use-modules (guix build utils))
+                    (let ((result (apply system* ,autoconf
+                                         (cdr (command-line)))))
+                      (when (and (file-exists? "configure")
+                                 (not (file-exists? "/bin/sh")))
+                        ;; Patch regardless of RESULT, because `autoconf
+                        ;; -Werror' can both create a `configure' file and
+                        ;; return a non-zero exit code.
+                        (patch-shebang "configure"))
+                      (exit (status:exit-val result))))
+                 port)))
+            (chmod (string-append bin "/autoconf") #o555)))))
 
     ;; Do not show it in the UI since it's meant for internal use.
     (properties '((hidden? . #t)))))
@@ -279,7 +276,7 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
 (define-public autoconf-archive
   (package
     (name "autoconf-archive")
-    (version "2021.02.19")
+    (version "2022.09.03")
     (source
      (origin
       (method url-fetch)
@@ -287,7 +284,7 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
                           version ".tar.xz"))
       (sha256
        (base32
-        "1gcwqspcxiygnyk02smsk8ivzs9r69ji38izxzzsijyx52fyp9p8"))))
+        "08zl68xdd907fb1r8kb88ycq09w9g53hfbflpq3pkblc1pq58x70"))))
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/autoconf-archive/")
     (synopsis "Collection of freely reusable Autoconf macros")
@@ -324,107 +321,104 @@ output is indexed in many ways to simplify browsing.")
 (define-public automake
   (package
     (name "automake")
-    (version "1.16.3")
+    (version "1.16.5")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnu/automake/automake-"
-                                 version ".tar.xz"))
-             (sha256
-              (base32
-                "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"))
-             (patches
-              (search-patches "automake-skip-amhello-tests.patch"))))
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/automake/automake-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh"))
+              (patches
+               (search-patches "automake-skip-amhello-tests.patch"))))
     (build-system gnu-build-system)
     (inputs
-     `(("autoconf" ,autoconf-wrapper)
-       ("bash" ,bash-minimal)
-       ("perl" ,perl)))
+     (list autoconf-wrapper bash-minimal perl))
     (native-inputs
-     `(("autoconf" ,autoconf-wrapper)
-       ("perl" ,perl)))
+     (list autoconf-wrapper perl))
     (native-search-paths
      (list (search-path-specification
             (variable "ACLOCAL_PATH")
             (files '("share/aclocal")))))
     (arguments
-     `(#:modules ((guix build gnu-build-system)
+     (list
+      #:modules '((guix build gnu-build-system)
                   (guix build utils)
                   (srfi srfi-1)
                   (srfi srfi-26)
                   (rnrs io ports))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'patch-source-shebangs 'patch-tests-shebangs
-           (lambda _
-             (let ((sh (which "sh")))
-               (substitute* (find-files "t" "\\.(sh|tap)$")
-                 (("#![[:blank:]]?/bin/sh")
-                  (string-append "#!" sh)))
-
-               ;; Set these variables for all the `configure' runs
-               ;; that occur during the test suite.
-               (setenv "SHELL" sh)
-               (setenv "CONFIG_SHELL" sh)
-               #t)))
-
-           (add-before 'check 'skip-test
-             (lambda _
-               ;; This test requires 'etags' and fails if it's missing.
-               ;; Skip it.
-               (substitute* "t/tags-lisp-space.sh"
-                 (("^required.*" all)
-                  (string-append "exit 77\n" all "\n")))
-               #t))
-
-           ,@(if (%current-target-system)
-                 `((add-after 'install 'patch-non-shebang-references
-                     (lambda* (#:key build inputs outputs #:allow-other-keys)
-                     ;; `patch-shebangs' patches shebangs only, and the Perl
-                     ;; scripts use a re-exec feature that references the
-                     ;; build hosts' perl.  Also, AUTOCONF and BASH store
-                     ;; references hide in the scripts.
-                       (let ((autoconf (assoc-ref inputs "autoconf"))
-                             (bash (assoc-ref inputs "bash"))
-                             (perl (assoc-ref inputs "perl"))
-                             (out  (assoc-ref outputs "out"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'patch-source-shebangs 'patch-tests-shebangs
+            (lambda* (#:key native-inputs inputs #:allow-other-keys)
+              (let ((sh (search-input-file (or native-inputs inputs) "bin/sh")))
+                (substitute* (find-files "t" "\\.(sh|tap)$")
+                  (("#![[:blank:]]?/bin/sh")
+                   (string-append "#!" sh)))
+
+                ;; Set these variables for all the `configure' runs
+                ;; that occur during the test suite.
+                (setenv "SHELL" sh)
+                (setenv "CONFIG_SHELL" sh))))
+          (add-before 'check 'skip-test
+            (lambda _
+              ;; This test requires 'etags' and fails if it's missing.
+              ;; Skip it.
+              (substitute* "t/tags-lisp-space.sh"
+                (("^required.*" all)
+                 (string-append "exit 77\n" all "\n")))))
+
+          #$@(if (%current-target-system)
+                 '((add-after 'install 'patch-non-shebang-references
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; `patch-shebangs' patches shebangs only, and the Perl
+                       ;; scripts use a re-exec feature that references the
+                       ;; build hosts' perl.  Also, AUTOCONF and BASH store
+                       ;; references hide in the scripts.
+                       (let ((autoconf
+                              (dirname (dirname
+                                        (search-input-file inputs "bin/autoconf"))))
+                             (bash
+                              (dirname (dirname
+                                        (search-input-file inputs "bin/bash"))))
+                             (perl
+                              (dirname (dirname
+                                        (search-input-file inputs "bin/perl"))))
                              (store-directory (%store-directory)))
-                         (substitute* (find-files (string-append out "/bin"))
+                         (substitute* (find-files (string-append #$output "/bin"))
                            (((string-append store-directory "/[^/]*-autoconf-[^/]*"))
                             autoconf)
                            (((string-append store-directory "/[^/]*-bash-[^/]*"))
                             bash)
                            (((string-append store-directory "/[^/]*-perl-[^/]*"))
-                            perl))
-                         #t))))
+                            perl))))))
                  '())
 
-         ;; Files like `install-sh', `mdate.sh', etc. must use
-         ;; #!/bin/sh, otherwise users could leak erroneous shebangs
-         ;; in the wild.  See <http://bugs.gnu.org/14201> for an
-         ;; example.
-         (add-after 'install 'unpatch-shebangs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (dir (string-append out "/share")))
-               (define (starts-with-shebang? file)
-                 (equal? (call-with-input-file file
-                           (lambda (p)
-                             (list (get-u8 p) (get-u8 p))))
-                         (map char->integer '(#\# #\!))))
-
-               (for-each (lambda (file)
-                           (when (and (starts-with-shebang? file)
-                                      (executable-file? file))
-                             (format #t "restoring shebang on `~a'~%"
-                                     file)
-                             (substitute* file
-                               (("^#!.*/bin/sh")
-                                "#!/bin/sh")
-                               (("^#!.*/bin/env(.*)$" _ args)
-                                (string-append "#!/usr/bin/env"
-                                               args)))))
-                         (find-files dir ".*"))
-               #t))))))
+          ;; Files like `install-sh', `mdate.sh', etc. must use
+          ;; #!/bin/sh, otherwise users could leak erroneous shebangs
+          ;; in the wild.  See <http://bugs.gnu.org/14201> for an
+          ;; example.
+          (add-after 'install 'unpatch-shebangs
+            (lambda _
+              (let ((dir (string-append #$output "/share")))
+                (define (starts-with-shebang? file)
+                  (equal? (call-with-input-file file
+                            (lambda (p)
+                              (list (get-u8 p) (get-u8 p))))
+                          (map char->integer '(#\# #\!))))
+
+                (for-each (lambda (file)
+                            (when (and (starts-with-shebang? file)
+                                       (executable-file? file))
+                              (format #t "restoring shebang on `~a'~%"
+                                      file)
+                              (substitute* file
+                                (("^#!.*/bin/sh")
+                                 "#!/bin/sh")
+                                (("^#!.*/bin/env(.*)$" _ args)
+                                 (string-append "#!/usr/bin/env"
+                                                args)))))
+                          (find-files dir ".*"))))))))
     (home-page "https://www.gnu.org/software/automake/")
     (synopsis "Making GNU standards-compliant Makefiles")
     (description
@@ -434,42 +428,30 @@ intuitive format and then Automake works with Autoconf to produce a robust
 Makefile, simplifying the entire process for the developer.")
     (license gpl2+)))                      ; some files are under GPLv3+
 
-(define-public automake-1.16.5
-  (package
-    (inherit automake)
-    (version "1.16.5")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnu/automake/automake-"
-                                 version ".tar.xz"))
-             (sha256
-              (base32
-                "0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh"))
-             (patches
-              (search-patches "automake-skip-amhello-tests.patch"))))))
-
 (define-public libtool
   (package
     (name "libtool")
-    (version "2.4.6")
+    (version "2.4.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/libtool/libtool-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw"))
-              (patches (search-patches "libtool-skip-tests2.patch"))))
+                "0pb3l4x37k6fj1lwnpzws55gi3pxl0hx56jm4bzmbrkw0mzj2zsg"))
+              (patches (search-patches "libtool-skip-tests2.patch"
+                                       "libtool-grep-compat.patch"))))
     (build-system gnu-build-system)
     (propagated-inputs (list m4))
-    (native-inputs `(("m4" ,m4)
-                     ("perl" ,perl)
-                     ;; XXX: this shouldn't be necessary, but without it test
-                     ;; 102 fails because it cannot find ltdl/libltdl.la.
-                     ("libltdl" ,libltdl)
-                     ("help2man" ,help2man) ;because we modify ltmain.sh
-                     ("automake" ,automake)      ;some tests rely on 'aclocal'
-                     ("autoconf" ,autoconf-wrapper))) ;others on 'autom4te'
+    (native-inputs
+     (list m4
+           perl
+           ;; XXX: this shouldn't be necessary, but without it test
+           ;; 102 fails because it cannot find ltdl/libltdl.la.
+           libltdl
+           help2man             ; because we modify ltmain.sh
+           automake             ; some tests rely on 'aclocal'
+           autoconf-wrapper))   ; others on 'autom4te'
 
     (arguments
      `(;; Libltdl is provided as a separate package, so don't install it here.
@@ -485,18 +467,18 @@ Makefile, simplifying the entire process for the developer.")
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'pre-check
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
+           (lambda* (#:key inputs native-inputs parallel-tests? #:allow-other-keys)
              ;; Run the test suite in parallel, if possible.
              (setenv "TESTSUITEFLAGS"
                      (string-append
                       "-j"
-                      (number->string (parallel-job-count))))
+                      (if parallel-tests?
+                        (number->string (parallel-job-count))
+                        "1")))
            ;; Patch references to /bin/sh.
-           (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
+           (let ((/bin/sh (search-input-file (or native-inputs inputs) "bin/sh")))
              (substitute* "tests/testsuite"
-               (("/bin/sh")
-                (string-append bash "/bin/sh")))
-             #t)))
+               (("/bin/sh") /bin/sh)))))
          ;; These files may be copied into source trees by libtoolize,
          ;; therefore they must not point to store file names that would be
          ;; leaked with tarballs generated by make dist.
@@ -508,8 +490,7 @@ Makefile, simplifying the entire process for the developer.")
                            (format #t "restoring shebang on `~a'~%" file)
                            (substitute* file
                              (("^#!.*/bin/sh") "#!/bin/sh")))
-                         (find-files dir ".*"))
-               #t))))))
+                         (find-files dir))))))))
 
     (synopsis "Generic shared library support tools")
     (description
@@ -519,18 +500,6 @@ complexity of working with shared libraries across platforms.")
     (license gpl3+)
     (home-page "https://www.gnu.org/software/libtool/")))
 
-(define-public libtool-2.4.7
-  (package
-    (inherit libtool)
-    (version "2.4.7")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/libtool/libtool-"
-                                  version ".tar.xz"))
-              (sha256
-               (base32
-                "0pb3l4x37k6fj1lwnpzws55gi3pxl0hx56jm4bzmbrkw0mzj2zsg"))))))
-
 (define-public config
   (let ((revision "1")
         (commit "c8ddc8472f8efcadafc1ef53ca1d863415fddd5f"))
@@ -585,20 +554,20 @@ configuration in nearly all GNU packages (and many others).")
   ;; Libtool's extensive test suite isn't run.
   (package
     (name "libltdl")
-    (version "2.4.6")
+    (version "2.4.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/libtool/libtool-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw"))))
+                "0pb3l4x37k6fj1lwnpzws55gi3pxl0hx56jm4bzmbrkw0mzj2zsg"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--enable-ltdl-install") ;really install it
        #:phases (modify-phases %standard-phases
                   (add-before 'configure 'change-directory
-                    (lambda _ (chdir "libltdl") #t)))))
+                    (lambda _ (chdir "libltdl"))))))
 
     (synopsis "System-independent dlopen wrapper of GNU libtool")
     (description (package-description libtool))
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index cf47ac9c80..bb192c7d7d 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -13,7 +13,7 @@
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
@@ -238,7 +238,7 @@ backups (called chunks) to allow easy burning to CD/DVD.")
 (define-public libarchive
   (package
     (name "libarchive")
-    (version "3.5.1")
+    (version "3.6.1")
     (source
      (origin
        (method url-fetch)
@@ -249,7 +249,7 @@ backups (called chunks) to allow easy burning to CD/DVD.")
                                  version ".tar.xz")))
        (sha256
         (base32
-         "16r95rlmikll1k8vbhh06vq6x3srkc10hzxjjf3021mjs2ld65qf"))))
+         "1rj8q5v26lxxr8x4b4nqbrj7p06qvl91hb8cdxi3xx3qp771lhas"))))
     (build-system gnu-build-system)
     (inputs
      (list bzip2
@@ -260,69 +260,59 @@ backups (called chunks) to allow easy burning to CD/DVD.")
            zlib
            `(,zstd "lib")))
     (arguments
-     `(#:configure-flags '("--disable-static")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'patch-pwd
-           (lambda _
-             (substitute* "Makefile"
-               (("/bin/pwd") (which "pwd")))
-             #t))
-         (replace 'check
-           (lambda* (#:key (tests? #t) #:allow-other-keys)
-             (if tests?
-		 ;; XXX: The test_owner_parse, test_read_disk, and
-		 ;; test_write_disk_lookup tests expect user 'root' to
-		 ;; exist, but the chroot's /etc/passwd doesn't have
-		 ;; it.  Turn off those tests.
-		 ;;
-		 ;; XXX: Adjust test that fails with zstd 1.4.1
-		 ;; because the default options compresses two bytes
-		 ;; better than this test expects.
-		 ;; https://github.com/libarchive/libarchive/issues/1226
-                 (begin
-                   (substitute* "libarchive/test/test_write_filter_zstd.c"
-		     (("compression-level\", \"6\"")
-		      "compression-level\", \"7\""))
-
-		   ;; The tests allow one to disable tests matching a globbing pattern.
-		   (invoke "make"
-			   "libarchive_test"
-			   "bsdcpio_test"
-			   "bsdtar_test")
+     (list
+      #:configure-flags #~'("--disable-static")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'patch-pwd
+            (lambda _
+              (substitute* "Makefile"
+                (("/bin/pwd") (which "pwd")))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (if tests?
+		  ;; XXX: The test_owner_parse, test_read_disk, and
+		  ;; test_write_disk_lookup tests expect user 'root' to
+		  ;; exist, but the chroot's /etc/passwd doesn't have
+		  ;; it.  Turn off those tests.
+                  (begin
+		    ;; The tests allow one to disable tests matching a globbing pattern.
+		    (invoke "make"
+			    "libarchive_test"
+			    "bsdcpio_test"
+			    "bsdtar_test")
 
-		   ;; XXX: This glob disables too much.
-		   (invoke "./libarchive_test" "^test_*_disk*")
-		   (invoke "./bsdcpio_test" "^test_owner_parse")
-		   (invoke "./bsdtar_test"))
-                 ;; Tests may be disabled if cross-compiling.
-                 (format #t "Test suite not run.~%"))))
-         (add-after 'install 'add--L-in-libarchive-pc
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out     (assoc-ref outputs "out"))
-                    (lib     (string-append out "/lib"))
-                    (nettle  (assoc-ref inputs "nettle"))
-                    (libxml2 (assoc-ref inputs "libxml2"))
-                    (xz      (assoc-ref inputs "xz"))
-                    (zlib    (assoc-ref inputs "zlib"))
-                    (zstd    (assoc-ref inputs "zstd"))
-                    (bzip2   (assoc-ref inputs "bzip2")))
-               ;; Embed absolute references to these inputs to avoid propagation.
-               (substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
-                                  (string-append lib "/libarchive.la"))
-                 (("-lnettle")
-                  (string-append "-L" nettle "/lib -lnettle"))
-                 (("-lxml2")
-                  (string-append "-L" libxml2 "/lib -lxml2"))
-                 (("-llzma")
-                  (string-append "-L" xz "/lib -llzma"))
-                 (("-lz")
-                  (string-append "-L" zlib "/lib -lz"))
-                 (("-lzstd")
-                  (string-append "-L" zstd "/lib -lzstd"))
-                 (("-lbz2")
-                  (string-append "-L" bzip2 "/lib -lbz2")))
-               #t))))))
+		    ;; XXX: This glob disables too much.
+		    (invoke "./libarchive_test" "^test_*_disk*")
+		    (invoke "./bsdcpio_test" "^test_owner_parse")
+		    (invoke "./bsdtar_test"))
+                  ;; Tests may be disabled if cross-compiling.
+                  (format #t "Test suite not run.~%"))))
+          (add-after 'install 'add--L-in-libarchive-pc
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((out     #$output)
+                     (lib     (string-append out "/lib"))
+                     (nettle  (assoc-ref inputs "nettle"))
+                     (libxml2 (assoc-ref inputs "libxml2"))
+                     (xz      (assoc-ref inputs "xz"))
+                     (zlib    (assoc-ref inputs "zlib"))
+                     (zstd    (assoc-ref inputs "zstd"))
+                     (bzip2   (assoc-ref inputs "bzip2")))
+                ;; Embed absolute references to these inputs to avoid propagation.
+                (substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
+                                   (string-append lib "/libarchive.la"))
+                  (("-lnettle")
+                   (string-append "-L" nettle "/lib -lnettle"))
+                  (("-lxml2")
+                   (string-append "-L" libxml2 "/lib -lxml2"))
+                  (("-llzma")
+                   (string-append "-L" xz "/lib -llzma"))
+                  (("-lz")
+                   (string-append "-L" zlib "/lib -lz"))
+                  (("-lzstd")
+                   (string-append "-L" zstd "/lib -lzstd"))
+                  (("-lbz2")
+                   (string-append "-L" bzip2 "/lib -lbz2")))))))))
     (home-page "https://libarchive.org/")
     (synopsis "Multi-format archive and compression library")
     (description
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index fa5f1ef32b..041f16b4fc 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -5,12 +5,12 @@
 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019, 2022 Ricardo Wurmus <rekado@elephly.net>
@@ -20,6 +20,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -106,14 +107,14 @@ command-line arguments, multiple languages, and so on.")
 (define-public grep
   (package
    (name "grep")
-   (version "3.6")
+   (version "3.8")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/grep/grep-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0gipv6bzkm1aihj0ncqpyh164xrzgcxcv9r1kwzyk2g1mzl1azk6"))
+              "10n3mc9n1xmg85hpxyr4wiqzfp27ffxzwhvkv021j27vnk0pr3a9"))
             (patches (search-patches "grep-timing-sensitive-test.patch"))))
    (build-system gnu-build-system)
    (native-inputs (list perl))                   ;some of the tests require it
@@ -215,9 +216,10 @@ implementation offers several extensions over the standard utility.")
    (build-system gnu-build-system)
    ;; Note: test suite requires ~1GiB of disk space.
    (arguments
-    `(,@(if (hurd-target?)
-            '(#:make-flags
-              (list (string-append
+    `(,@(cond
+          ((hurd-target?)
+           '(#:make-flags
+             (list (string-append
                      "TESTSUITEFLAGS= -k '"
                      "!sparse"
                      ",!renamed dirs in incrementals"
@@ -230,8 +232,13 @@ implementation offers several extensions over the standard utility.")
                      ",!renamed subdirectories"
                      ",!chained renames"
                      ",!Directory"
-                     "'")))
-            '())
+                     "'"))))
+          ;; https://lists.gnu.org/archive/html/bug-tar/2021-10/msg00007.html
+          ;; tar-1.34 isn't aware of 64-bit time_t and upstream suggests
+          ;; skipping the test for this release on 32-bit systems.
+          ((not (target-64bit?))
+           '(#:make-flags (list "TESTSUITEFLAGS= -k '!tricky time stamps'")))
+          (else '()))
       #:phases (modify-phases %standard-phases
                  (add-before 'build 'set-shell-file-name
                    (lambda* (#:key inputs #:allow-other-keys)
@@ -319,14 +326,14 @@ interactive means to merge two files.")
 (define-public findutils
   (package
    (name "findutils")
-   (version "4.8.0")
+   (version "4.9.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/findutils/findutils-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0r3i72hnw0a30khlczi9k2c51aamaj6kfmp5mk3844nrjxz7n4jp"))
+              "1zk2sighc26bfdsm97bv7cd1cnvq7r4gll4zqpnp0rs3kp0bigx2"))
             (patches (search-patches "findutils-localstatedir.patch"))))
    (build-system gnu-build-system)
    (arguments
@@ -357,16 +364,14 @@ used to apply commands with arbitrarily long arguments.")
 (define-public coreutils
   (package
    (name "coreutils")
-   (version "8.32")
+   (version "9.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/coreutils/coreutils-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24"))
-            (patches (search-patches "coreutils-ls.patch"
-                                     "coreutils-gnulib-tests.patch"))))
+              "08q4b0w7mwfxbqjs712l6wrwl2ijs7k50kssgbryg9wbsw8g98b1"))))
    (build-system gnu-build-system)
    (inputs `(,acl                                 ;TODO: add SELinux
              ,attr                                ;for xattrs in ls, mv, etc
@@ -411,6 +416,10 @@ used to apply commands with arbitrarily long arguments.")
                                    " test-renameatu"
                                    " test-utimensat")))
             '())
+      ,@(if (not (target-64bit?))
+          ;; Not all software is ready for 64bit time_t.
+          '(#:configure-flags (list "--disable-year2038"))
+          '())
       #:phases (modify-phases %standard-phases
                  (add-before 'build 'patch-shell-references
                    (lambda _
@@ -554,17 +563,15 @@ change.  GNU make offers many powerful extensions over the standard utility.")
 (define-public binutils
   (package
    (name "binutils")
-   (version "2.37")
+   (version "2.38")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://gnu/binutils/binutils-"
                           version ".tar.bz2"))
       (sha256
-       (base32 "1m3b2rdfv1dmdpd0bzg1hy7i8a2qng53szc6livyi3nh6101mz37"))
-      (patches (search-patches "binutils-loongson-workaround.patch"
-                               "binutils-2.37-file-descriptor-leak.patch"
-                               "binutils-CVE-2021-45078.patch"))))
+       (base32 "1y0fb4qgxaxfyf81x9fqq9w5609mkah0b7wm1f7ab9kpy0fcf3h7"))
+      (patches (search-patches "binutils-loongson-workaround.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:out-of-source? #t   ;recommended in the README
@@ -593,7 +600,16 @@ change.  GNU make offers many powerful extensions over the standard utility.")
                           "--enable-compressed-debug-sections=all"
                           "--enable-lto"
                           "--enable-separate-code"
-                          "--enable-threads")))
+                          "--enable-threads")
+      ;; XXX: binutils 2.38 was released without generated manuals:
+      ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=28909>.  To avoid
+      ;; a circular dependency on texinfo, prevent the build system from
+      ;; creating the manuals by calling "true" instead of "makeinfo" ...
+      #:make-flags '("MAKEINFO=true")))
+
+   ;; ... and "hide" this package such that users who install binutils get
+   ;; the version with documentation defined below.
+   (properties '((hidden? . #t)))
 
    (synopsis "Binary utilities: bfd gas gprof ld")
    (description
@@ -606,6 +622,16 @@ included.")
    (license gpl3+)
    (home-page "https://www.gnu.org/software/binutils/")))
 
+(define-public binutils+documentation
+  (package/inherit binutils
+    (native-inputs
+     (list texinfo))
+    (arguments
+     (substitute-keyword-arguments (package-arguments binutils)
+       ((#:make-flags flags ''())
+        ''())))
+    (properties '())))
+
 ;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
 ;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
 ;; Keep this version around until the patch is updated.
@@ -627,7 +653,7 @@ included.")
    (properties '())))
 
 (define-public binutils-gold
-  (package/inherit binutils
+  (package/inherit binutils+documentation
     (name "binutils-gold")
     (arguments
      (substitute-keyword-arguments (package-arguments binutils)
@@ -734,13 +760,13 @@ the store.")
   ;; version 2.28, GNU/Hurd used a different glibc branch.
   (package
    (name "glibc")
-   (version "2.33")
+   (version "2.35")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
             (sha256
              (base32
-              "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f"))
+              "0bpm1kfi09dxl4c6aanc5c9951fmf6ckkzay60cx7k37dcpp68si"))
             (patches (search-patches "glibc-ldd-powerpc.patch"
                                      "glibc-ldd-x86_64.patch"
                                      "glibc-dl-cache.patch"
@@ -778,10 +804,15 @@ the store.")
       #:validate-runpath? #f
 
       #:modules ((ice-9 ftw)
+                 (srfi srfi-1)
                  (srfi srfi-26)
                  (guix build utils)
                  (guix build gnu-build-system))
 
+      ;; Strip binaries but preserve the symbol table needed by Valgrind:
+      ;; <https://lists.gnu.org/archive/html/help-guix/2022-03/msg00036.html>.
+      #:strip-flags '("--strip-debug")
+
       #:configure-flags
       (list "--sysconfdir=/etc"
 
@@ -888,13 +919,34 @@ the store.")
                  (add-after 'install 'move-static-libs
                    (lambda* (#:key outputs #:allow-other-keys)
                      ;; Move static libraries to the "static" output.
+                     ;; Note: As of GNU libc 2.34, the contents of some ".a"
+                     ;; files have been moved into "libc.so", and *both* empty
+                     ;; ".so" and ".a" files have been introduced to avoid
+                     ;; breaking existing executables and existing builds
+                     ;; respectively.  The intent of the seemingly redundant
+                     ;; empty ".a" files is to avoid newly-compiled executables
+                     ;; from having dependencies on the empty shared libraries,
+                     ;; and as such, it is useful to have these ".a" files in
+                     ;; OUT in addition to STATIC.
+
+                     ;; XXX: It might be better to determine whether a static
+                     ;; library is empty by some criterion (such as their file
+                     ;; size equaling eight bytes) rather than hardcoding them
+                     ;; by name.
+                     (define empty-static-libraries
+                       '("libpthread.a" "libdl.a" "libutil.a" "libanl.a"))
+                     (define (empty-static-library? file)
+                       (any (lambda (s)
+                              (string=? file s)) empty-static-libraries))
+
                      (define (static-library? file)
                        ;; Return true if FILE is a static library.  The
                        ;; "_nonshared.a" files are referred to by libc.so,
                        ;; libpthread.so, etc., which are in fact linker
                        ;; scripts.
                        (and (string-suffix? ".a" file)
-                            (not (string-contains file "_nonshared"))))
+                            (not (string-contains file "_nonshared"))
+                            (not (empty-static-library? file))))
 
                      (define (linker-script? file)
                        ;; Guess whether FILE, a ".a" file, is actually a
@@ -905,6 +957,7 @@ the store.")
                      (let* ((out    (assoc-ref outputs "out"))
                             (lib    (string-append out "/lib"))
                             (files  (scandir lib static-library?))
+                            (empty  (scandir lib empty-static-library?))
                             (static (assoc-ref outputs "static"))
                             (slib   (string-append static "/lib")))
                        (mkdir-p slib)
@@ -912,6 +965,10 @@ the store.")
                                    (rename-file (string-append lib "/" base)
                                                 (string-append slib "/" base)))
                                  files)
+                       (for-each (lambda (base)
+                                   (copy-file (string-append lib "/" base)
+                                              (string-append slib "/" base)))
+                                 empty)
 
                        ;; Usually libm.a is a linker script so we need to
                        ;; change the file names in there to refer to STATIC
@@ -1488,7 +1545,7 @@ package needs iconv ,@(libiconv-if-needed) should be added."
   ;; POSIX C libraries provide iconv.  Platforms with an incomplete libc
   ;; without iconv, such as MinGW, must return the then clause.
   (if (target-mingw? target)
-      `(("libiconv" ,libiconv))
+      (list libiconv)
       '()))
 
 (define-public (canonical-package package)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 7545f331e6..43f38303f7 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -1,8 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2017, 2019-2020, 2022, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
@@ -74,7 +74,7 @@
         ...))
 
 (define %patch-series-5.1
-  ;; This is the current patches series for 5.0, generated using
+  ;; This is the current patches series for 5.1, generated using
   ;; 'download-patches' below.
   (patch-series
    (1 "1ymm8ppss6gyh9ifznjwiabrb4k91npd09c10y7mk66xp8yppc7b")
@@ -84,7 +84,15 @@
    (5 "19bdyigdr81824nxvqr6a7k0cax60wq7376j6b91afbnwvlvbjyc")
    (6 "051x8wlwrqk0yr0zg378vh824iklfl5g9pkmcdf62qp8gn9pvqbm")
    (7 "0fir80pp1gmlpadmqcgkrv4y119pc7xllchjzg05fd7px73viz5c")
-   (8 "1lfjgshk8i9vch92p5wgc9r90j3phw79aa7gbai89w183b2z6b7j")))
+   (8 "1lfjgshk8i9vch92p5wgc9r90j3phw79aa7gbai89w183b2z6b7j")
+   (9 "1vn36dzd9g4y1h3jiss6418crla0rbcd0d6wwsyv9d5l7aaxlp74")
+   (10 "0amfmvbzsand7bdypylkjdpcp88fa3cplfshn7vyzv2ff2rdgj52")
+   (11 "0yq24abb4fzfxqnwl20b330sxl9lr9ds0nc4yi30f81l94b1y6aq")
+   (12 "165bff97ffih49vfs4mkr5w3z5gn1w6zfyrf773iajkw6v48kw8h")
+   (13 "1bfmgv3lagbk3aq9a831d29xv7jz4sjq7jhn9hq89limyinvdb67")
+   (14 "1l43dw4kpddn7l41i8wmj406z9abxky1wb3rk8krcys33g4f0kka")
+   (15 "1w40vzadzx019v0zhs4q6yqycrk04x1k8xs6qb73vk7ny4p6jdqv")
+   (16 "0krqqljz4bkp9wrdnwfx51bxkb8rkwf8ivc93as1znx5fr7i96c8")))
 
 (define (download-patches store count)
   "Download COUNT Bash patches into store.  Return a list of
@@ -111,7 +119,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
                                   "-DSSH_SOURCE_BASHRC")
                                 " "))
          (configure-flags
-          ``("--with-installed-readline"
+          ``("--without-bash-malloc"
+             "--with-installed-readline"
              ,,(string-append "CPPFLAGS=" cppflags)
              ,(string-append
                "LDFLAGS=-Wl,-rpath -Wl,"
@@ -261,15 +270,15 @@ without modification.")
        (substitute-keyword-arguments
            `(#:allowed-references ("out") ,@(package-arguments bash))
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'strip 'remove-everything-but-the-binary
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (bin (string-append out "/bin")))
-                   (remove-store-references (string-append bin "/bash"))
-                   (delete-file (string-append bin "/bashbug"))
-                   (delete-file-recursively (string-append out "/share"))
-                   #t))))))))))
+          #~(modify-phases #$phases
+              (add-after 'strip 'remove-everything-but-the-binary
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (let* ((out (assoc-ref outputs "out"))
+                         (bin (string-append out "/bin")))
+                    (remove-store-references (string-append bin "/bash"))
+                    (delete-file (string-append bin "/bashbug"))
+                    (delete-file-recursively (string-append out "/share"))
+                    #t))))))))))
 
 (define-public bash-with-syslog
   (package
@@ -291,7 +300,7 @@ variant logs the history to syslog.")))
 (define-public bash-completion
   (package
     (name "bash-completion")
-    (version "2.8")
+    (version "2.11")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -299,38 +308,12 @@ variant logs the history to syslog.")))
                     version "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0kgmflrr1ga9wfk770vmakna3nj46ylb5ky9ipd0v2k9ymq5a7y0"))
+                "1b0iz7da1sgifx1a5wdyx1kxbzys53v0kyk8nhxfipllmm5qka3k"))
               (patches
                (search-patches "bash-completion-directories.patch"))))
     (build-system gnu-build-system)
-    (native-inputs (list util-linux))
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-after
-                   'install 'remove-redundant-completions
-                   (lambda* (#:key
-                             inputs native-inputs
-                             outputs #:allow-other-keys)
-                     ;; Util-linux comes with a bunch of completion files for
-                     ;; its own commands which are more sophisticated and
-                     ;; up-to-date than those of bash-completion.  Remove those
-                     ;; from bash-completion.
-                     (let* ((out         (assoc-ref outputs "out"))
-                            (util-linux  (assoc-ref (or native-inputs inputs)
-                                                    "util-linux"))
-                            (completions (string-append out
-                                                        "/share/bash-completion"
-                                                        "/completions"))
-                            (already     (find-files
-                                          (string-append
-                                           util-linux
-                                           "/etc/bash_completion.d"))))
-                       (with-directory-excursion completions
-                         (for-each (lambda (file)
-                                     (when (file-exists? file)
-                                       (delete-file file)))
-                                   (map basename already)))
-                       #t))))))
+     `(#:tests? #f))    ; Unclear how to make tests pass.
     (synopsis "Bash completions for common commands")
     (description
      "This package provides extensions that allow Bash to provide adapted
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index ae0d761ac3..4b7099ffcd 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -25,6 +25,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages pkg-config)
@@ -33,7 +34,7 @@
 (define-public libgc
   (package
    (name "libgc")
-   (version "8.0.4")
+   (version "8.2.2")
    (source (origin
             (method url-fetch)
             (uri (list (string-append "https://github.com/ivmai/bdwgc/releases"
@@ -43,33 +44,31 @@
                                       "/gc-" version ".tar.gz")))
             (sha256
              (base32
-              "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3"))))
+              "181ni2rn9qjbl4ilqdjrd1a4h8siv5bgmzqgg4595q32n2y0f0gk"))))
    (build-system gnu-build-system)
    (arguments
-    `(#:configure-flags
-      (list
-       ;; Install gc_cpp.h et al.
-       "--enable-cplusplus"
+    (list
+     #:configure-flags
+     #~(list
+        ;; Install gc_cpp.h et al.
+        "--enable-cplusplus"
 
-       ;; Work around <https://github.com/ivmai/bdwgc/issues/353>.
-       "--disable-munmap"
-
-       ;; In GNU/Hurd systems during the 'check' phase,
-       ;; there is a deadlock caused by the 'gctest' test.
-       ;; To disable the error set "--disable-gcj-support"
-       ;; to configure script. See bug report and discussion:
-       ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
-       ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
-       ,@(if (target-hurd? (or (%current-system)
-                               (%current-target-system)))
-             '("--disable-gcj-support")
-             '()))))
+        ;; In GNU/Hurd systems during the 'check' phase,
+        ;; there is a deadlock caused by the 'gctest' test.
+        ;; To disable the error set "--disable-gcj-support"
+        ;; to configure script. See bug report and discussion:
+        ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
+        ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
+        #$@(if (target-hurd? (or (%current-system)
+                                 (%current-target-system)))
+               #~("--disable-gcj-support")
+               #~()))))
    (native-inputs (list pkg-config))
    (propagated-inputs
     (if (%current-target-system)
         ;; The build system refuses to check for compiler intrinsics when
         ;; cross-compiling, and demands using libatomic-ops instead.
-        `(("libatomic-ops" ,libatomic-ops))
+        (list libatomic-ops)
         '()))
    (outputs '("out" "debug"))
    (properties
@@ -100,9 +99,11 @@ C or C++ programs, though that is not its primary goal.")
 (define-public libgc/static-libs
   (package/inherit
    libgc
-   (arguments (substitute-keyword-arguments (package-arguments libgc)
-                ((#:configure-flags flags ''())
-                 `(cons "--enable-static" ,flags))))
+   (arguments
+    (substitute-keyword-arguments (package-arguments libgc)
+      ((#:configure-flags flags #~'())
+       #~(cons "--enable-static" #$flags))))
+
    (properties '((hidden? . #t)))))
 
 (define-public libgc-7
@@ -123,9 +124,9 @@ C or C++ programs, though that is not its primary goal.")
     libgc
     (name "libgc-back-pointers")
     (arguments
-     `(#:make-flags
-       (list "CPPFLAGS=-DKEEP_BACK_PTRS=1")
-       ,@(package-arguments libgc)))
+     (substitute-keyword-arguments (package-arguments libgc)
+       ((#:make-flags _ #~'())
+        #~(list "CPPFLAGS=-DKEEP_BACK_PTRS=1"))))
     (synopsis "The BDW garbage collector, with back-pointer tracking")))
 
 (define-public libatomic-ops
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index fda01e00ca..f157523a76 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -4216,10 +4216,10 @@ data and settings.")
                                              texlive-fonts-ec
                                              texlive-latex-examplep
                                              texlive-hyperref
-                                             texlive-latex-ms
+                                             texlive-ms
                                              texlive-latex-natbib
-                                             texlive-bibtex ; style files used by natbib
-                                             texlive-pgf    ; tikz
+                                             texlive-bibtex ;style files used by natbib
+                                             texlive-pgf    ;tikz
                                              texlive-latex-verbatimbox)))
        ("imagemagick" ,imagemagick)))
     (home-page "https://dorina.mdc-berlin.de/public/rajewsky/discrover/")
@@ -11089,11 +11089,11 @@ programs for inferring phylogenies (evolutionary trees).")
            (texlive-updmap.cfg (list texlive-amsfonts
                                      texlive-caption
                                      texlive-cite
+                                     texlive-fancyvrb
                                      texlive-fonts-ec
+                                     texlive-graphics
                                      texlive-grfext
                                      texlive-hyperref
-                                     texlive-latex-fancyvrb
-                                     texlive-latex-graphics
                                      texlive-latex-psfrag
                                      texlive-xcolor))))
     (home-page "https://github.com/stephaneguindon/phyml")
@@ -11201,7 +11201,7 @@ applications for tackling some common problems in a user-friendly way.")
              (lambda* (#:key outputs #:allow-other-keys)
                (substitute* "src/test/Makefile"
                  (("^CFLAGS=") "CFLAGS= -fcommon"))
-               
+
                ;; Don't attempt to install the bash completions to
                ;; the home directory.
                (rename-file "extras/.bash_completion"
@@ -15786,7 +15786,7 @@ to an artifact/contaminant file.")
     (inputs
      (list openmpi zlib))
     (native-inputs
-     `(("texlive" ,(texlive-updmap.cfg (list texlive-latex-graphics
+     `(("texlive" ,(texlive-updmap.cfg (list texlive-graphics
                                              texlive-fonts-ec
                                              texlive-hyperref)))))
     (home-page "https://www.ebi.ac.uk/~zerbino/velvet/")
@@ -18301,7 +18301,7 @@ aligner.")
                ;; /tmp/guix-build-*.
                (with-directory-excursion
                    (string-append (assoc-ref outputs "out")
-                                  "/lib/python3.9/site-packages/scvelo/core/tests/")
+                                  "/lib/python3.10/site-packages/scvelo/core/tests/")
                  (invoke "pytest" "-v"))))))))
     (propagated-inputs
      (list python-anndata
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 5fd25452ff..6cd7abe420 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -33,7 +33,7 @@
 (define-public bison
   (package
     (name "bison")
-    (version "3.7.6")
+    (version "3.8.2")
     (source
      (origin
       (method url-fetch)
@@ -41,7 +41,7 @@
                           version ".tar.xz"))
       (sha256
        (base32
-        "1kzkxrd3z4262k2sbxmyh9k5g5r2lakw0gv44l2hb4i1wbhqrmk7"))))
+        "1wjvbbzrr16k1jlby3l436an3kvv492h08arbnf0gwgprha05flv"))))
     (build-system gnu-build-system)
     (arguments
      '(;; Building in parallel on many-core systems may cause an error such as
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index bfe524366c..06d4b25a57 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -526,7 +526,7 @@ features.")
     (native-inputs
      (list intltool python-wheel
            (if (string-prefix? "x86_64-" (%current-system))
-               librsvg-bootstrap
+               librsvg
                librsvg-2.40)))
     ;; TODO: Enable tests.
     ;; After "pytest-twisted" is packaged, HOME is set, and an X server is
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 40e4ca399e..d2b676cc73 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -12,12 +12,11 @@
 ;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
-;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2021, 2022 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
-;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -38,6 +37,7 @@
 (define-module (gnu packages boost)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -68,122 +68,155 @@
 (define-public boost
   (package
     (name "boost")
-    (version "1.77.0")
+    (version "1.80.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://boostorg.jfrog.io/artifactory/main/release/"
                                   version "/source/boost_"
                                   (version-with-underscores version) ".tar.bz2"))
+              (patches
+               (list (boost-patch
+                      ;; Boost.Filesystem directory iterators may fail to
+                      ;; construct for a network share on Windows prior to 10:
+                      ;; https://github.com/boostorg/filesystem/pull/246,
+                      ;; https://github.com/boostorg/filesystem/issues/245
+                      "0001-filesystem-win-fix-dir-it-net-share.patch" version
+                      "067hhylqkzzdbqzc1hkbpaqmvz248lxqrdhb2yi6iq9qabsik3lk")
+                     (boost-patch
+                      ;; In Boost.Filesystem on Windows, weakly_canonical fails
+                      ;; to process paths that start with the "\\?\" prefix:
+                      ;; https://github.com/boostorg/filesystem/issues/247
+                      "0002-filesystem-fix-weakly-canonical-long-paths.patch" version
+                      "00w3albf8527glclx85p5b2ml3vr06xpwwmfyzg005v1cp8avcpi")
+                     (boost-patch
+                      ;; Boost.Unordered containers are not in a valid state
+                      ;; after moving:
+                      ;; https://github.com/boostorg/unordered/issues/139
+                      "0003-unordered-valid-after-move.patch" version
+                      "0dw839w22cawqawfpsx7j7v9y0x2vn66m732iidpxvdxbjn2kzva")
+                     (boost-patch
+                      ;; Fixed a missing include on POSIX systems that don't
+                      ;; support *at APIs:
+                      ;; https://github.com/boostorg/filesystem/issues/250
+                      "0004-filesystem-posix-fix-no-at-apis-missing-include.patch" version
+                      "09k8k3b1306jkjls12wfghj820n828j6aaxzmcr0wpnjhp8fzi1v")))
               (sha256
                (base32
-                "0m08hhk3l7zvzajyk39qlw566q3fhixayhc2j11328qf0gy8b7zw"))))
+                "1h00qp4z5k6lfz310xjwsmqs8fwxi6ngas51169cafz4h9fmc68y"))))
     (build-system gnu-build-system)
-    (inputs (list icu4c zlib))
+    (inputs
+     (append
+      (list icu4c zlib)
+      (if (%current-target-system)
+          '()
+          (list python-minimal-wrapper))))
     (native-inputs
-     `(("perl" ,perl)
-       ,@(if (%current-target-system)
-             '()
-             `(("python" ,python-minimal-wrapper)))
-       ("tcsh" ,tcsh)))
+     (list perl tcsh))
     (arguments
-     `(#:imported-modules ((guix build python-build-system)
+     (list
+      #:imported-modules `((guix build python-build-system)
                            ,@%gnu-build-system-modules)
-       #:modules (((guix build python-build-system) #:select (python-version))
+      #:modules `(((guix build python-build-system) #:select (python-version))
                   ,@%gnu-build-system-modules)
-       #:tests? #f
-       #:make-flags
-       (list "threading=multi" "link=shared"
+      #:tests? #f
+      #:configure-flags
+      #~(let ((icu (dirname (dirname (search-input-file
+                                      %build-inputs "bin/uconv")))))
+          (list
+           ;; Auto-detection looks for ICU only in traditional
+           ;; install locations.
+           (string-append "--with-icu=" icu)
+           ;; Ditto for Python.
+           #$@(if (%current-target-system)
+                  #~()
+                  #~((let ((python (dirname (dirname (search-input-file
+                                                      %build-inputs
+                                                      "bin/python")))))
+                       (string-append "--with-python-root=" python)
+                       (string-append "--with-python=" python
+                                      "/bin/python")
+                       (string-append "--with-python-version="
+                                      (python-version python)))))
+           "--with-toolset=gcc"))
+      #:make-flags
+      #~(list "threading=multi" "link=shared"
 
-             ;; Set the RUNPATH to $libdir so that the libs find each other.
-             (string-append "linkflags=-Wl,-rpath="
-                            (assoc-ref %outputs "out") "/lib")
-             ,@(if (%current-target-system)
-                   `("--user-config=user-config.jam"
-                     ;; Python is not supported when cross-compiling.
-                     "--without-python"
-                     "binary-format=elf"
-                     "target-os=linux"
-                     ,@(cond
-                        ((string-prefix? "arm" (%current-target-system))
-                         '("abi=aapcs"
-                           "address-model=32"
-                           "architecture=arm"))
-                        ((string-prefix? "aarch64" (%current-target-system))
-                         '("abi=aapcs"
-                           "address-model=64"
-                           "architecture=arm"))
-                        (else '())))
-                   '()))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'bootstrap)
-         (replace 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((icu (assoc-ref inputs "icu4c"))
-                   (python (assoc-ref inputs "python"))
-                   (out (assoc-ref outputs "out")))
-               (substitute* '("libs/config/configure"
-                              "libs/spirit/classic/phoenix/test/runtest.sh"
-                              "tools/build/src/engine/execunix.cpp")
-                 (("/bin/sh") (which "sh")))
-
-               (setenv "SHELL" (which "sh"))
-               (setenv "CONFIG_SHELL" (which "sh"))
+              ;; Set the RUNPATH to $libdir so that the libs find each other.
+              (string-append "linkflags=-Wl,-rpath="
+                             #$output "/lib")
+              #$@(if (%current-target-system)
+                     #~("--user-config=user-config.jam"
+                        ;; Python is not supported when cross-compiling.
+                        "--without-python"
+                        "binary-format=elf"
+                        "target-os=linux"
+                        #$@(cond
+                            ((string-prefix? "arm" (%current-target-system))
+                             #~("abi=aapcs"
+                                "address-model=32"
+                                "architecture=arm"))
+                            ((string-prefix? "aarch64" (%current-target-system))
+                             #~("abi=aapcs"
+                                "address-model=64"
+                                "architecture=arm"))
+                            (else #~())))
+                     #~()))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-shells
+            (lambda _
+              (substitute* '("libs/config/configure"
+                             "libs/spirit/classic/phoenix/test/runtest.sh"
+                             "tools/build/src/engine/execunix.cpp")
+                (("/bin/sh") (which "sh")))))
+          (delete 'bootstrap)
+          (replace 'configure
+            (lambda* (#:key (configure-flags ''()) #:allow-other-keys)
+              (setenv "SHELL" (which "sh"))
+              (setenv "CONFIG_SHELL" (which "sh"))
 
-               ,@(if (%current-target-system)
-                     `((call-with-output-file "user-config.jam"
+              #$@(if (%current-target-system)
+                     #~((call-with-output-file "user-config.jam"
                           (lambda (port)
                             (format port
                                     "using gcc : cross : ~a-c++ ;"
-                                    ,(%current-target-system)))))
-                     '())
+                                    #$(%current-target-system)))))
+                     #~())
 
-               ;; Change an #ifdef __MACH__ that really targets macOS.
-               (substitute* "boost/test/utils/timer.hpp"
-                 (("defined\\(__MACH__\\)")
-                  "(defined __MACH__ && !defined __GNU__)"))
-
-               (invoke "./bootstrap.sh"
-                       (string-append "--prefix=" out)
-                       ;; Auto-detection looks for ICU only in traditional
-                       ;; install locations.
-                       (string-append "--with-icu=" icu)
-                       ;; Ditto for Python.
-                       ,@(if (%current-target-system)
-                             '()
-                             `((string-append "--with-python-root=" python)
-                               (string-append "--with-python=" python "/bin/python")
-                               (string-append "--with-python-version="
-                                              (python-version python))))
-                       "--with-toolset=gcc"))))
-         (replace 'build
-           (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "./b2"
-                    (format #f "-j~a" (parallel-job-count))
-                    make-flags)))
-         (replace 'install
-           (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "./b2" "install" make-flags)))
-         ,@(if (%current-target-system)
-               '()
-               '((add-after 'install 'provide-libboost_python
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      (let* ((out (assoc-ref outputs "out"))
-                             (python-version (python-version
-                                              (assoc-ref inputs "python")))
-                             (libboost_pythonNN.so
-                              (string-append "libboost_python"
-                                             (string-join (string-split
-                                                           python-version #\.)
-                                                          "")
-                                             ".so")))
-                        (with-directory-excursion (string-append out "/lib")
-                          (symlink libboost_pythonNN.so "libboost_python.so")
-                          ;; Some packages only look for the major version.
-                          (symlink libboost_pythonNN.so
-                                   (string-append "libboost_python"
-                                                  (string-take python-version 1)
-                                                  ".so")))))))))))
+              (apply invoke "./bootstrap.sh"
+                     (string-append "--prefix=" #$output)
+                     configure-flags)))
+          (replace 'build
+            (lambda* (#:key make-flags #:allow-other-keys)
+              (apply invoke "./b2"
+                     (format #f "-j~a" (parallel-job-count))
+                     make-flags)))
+          (replace 'install
+            (lambda* (#:key make-flags #:allow-other-keys)
+              (apply invoke "./b2" "install" make-flags)))
+          #$@(if (%current-target-system)
+                 #~()
+                 #~((add-after 'install 'provide-libboost_python
+                      (lambda* (#:key make-flags inputs outputs #:allow-other-keys)
+                        (let* ((static? (member "link=static" make-flags))
+                               (libext (if static? ".a" ".so"))
+                               (python (dirname (dirname (search-input-file
+                                                          inputs "bin/python"))))
+                               (python-version (python-version python))
+                               (libboost_pythonNN
+                                (string-append "libboost_python"
+                                               (string-join (string-split
+                                                             python-version #\.)
+                                                            "")
+                                               libext)))
+                          (with-directory-excursion (string-append #$output "/lib")
+                            (symlink libboost_pythonNN
+                                     (string-append "libboost_python" libext))
+                            ;; Some packages only look for the major version.
+                            (symlink libboost_pythonNN
+                                     (string-append "libboost_python"
+                                                    (string-take python-version 1)
+                                                    libext)))))))))))
 
     (home-page "https://www.boost.org")
     (synopsis "Peer-reviewed portable C++ source libraries")
@@ -285,23 +318,7 @@ across a broad spectrum of applications.")
     (arguments
      (substitute-keyword-arguments (package-arguments boost)
        ((#:make-flags flags)
-        `(cons "link=static" (delete "link=shared" ,flags)))
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (replace 'provide-libboost_python
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let* ((out (assoc-ref outputs "out"))
-                      (python-version (python-version
-                                       (assoc-ref inputs "python")))
-                      (libboost_pythonNN.a
-                       (string-append "libboost_python"
-                                      (string-join (string-split
-                                                    python-version #\.)
-                                                   "")
-                                      ".a")))
-                 (with-directory-excursion (string-append out "/lib")
-                   (symlink libboost_pythonNN.a "libboost_python.a"))
-                 #t)))))))))
+        #~(cons "link=static" (delete "link=shared" #$flags)))))))
 
 (define-public boost-for-mysql
   ;; Older version for MySQL 5.7.23.
@@ -317,43 +334,33 @@ across a broad spectrum of applications.")
               (sha256
                (base32
                 "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj"))))
-    (arguments (substitute-keyword-arguments (package-arguments boost)
-      ((#:phases phases)
-       `(modify-phases ,phases
-          (replace 'configure
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let ((icu (assoc-ref inputs "icu4c"))
-                    (out (assoc-ref outputs "out")))
+    (arguments
+     (substitute-keyword-arguments (package-arguments boost)
+       ((#:configure-flags _ #~'())
+        #~(let ((icu (dirname (dirname (search-input-file
+                                        %build-inputs "bin/uconv")))))
+            (list
+             ;; Auto-detection looks for ICU only in traditional
+             ;; install locations.
+             (string-append "--with-icu=" icu)
+             "--with-toolset=gcc")))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'patch-shells
+              (lambda _
                 (substitute* (append
-                               (find-files "tools/build/src/engine/" "execunix\\.c.*")
-                               '("libs/config/configure"
-                                 "libs/spirit/classic/phoenix/test/runtest.sh"
-                                 "tools/build/doc/bjam.qbk"
-                                 "tools/build/src/engine/Jambase"))
-                  (("/bin/sh") (which "sh")))
-
-                (setenv "SHELL" (which "sh"))
-                (setenv "CONFIG_SHELL" (which "sh"))
-
-                ,@(if (%current-target-system)
-                    `((call-with-output-file "user-config.jam"
-                        (lambda (port)
-                          (format port
-                                  "using gcc : cross : ~a-c++ ;"
-                                  ,(%current-target-system)))))
-                    '())
-
-                (invoke "./bootstrap.sh"
-                        (string-append "--prefix=" out)
-                        ;; Auto-detection looks for ICU only in traditional
-                        ;; install locations.
-                        (string-append "--with-icu=" icu)
-                        "--with-toolset=gcc"))))
-          (delete 'provide-libboost_python)))
-      ((#:make-flags make-flags)
-       `(cons* "--without-python" ,make-flags))))
-    (native-inputs
-     (alist-delete "python" (package-native-inputs boost)))
+                              (find-files "tools/build/src/engine/" "execunix\\.c.*")
+                              '("libs/config/configure"
+                                "libs/spirit/classic/phoenix/test/runtest.sh"
+                                "tools/build/doc/bjam.qbk"
+                                "tools/build/src/engine/Jambase"))
+                  (("/bin/sh") (which "sh")))))
+            (delete 'provide-libboost_python)))
+       ((#:make-flags make-flags)
+        #~(cons* "--without-python" #$make-flags))))
+    (inputs
+     (modify-inputs (package-inputs boost)
+       (delete "python-minimal-wrapper")))
     (properties '((hidden? . #t)))))
 
 (define-public boost-sync
@@ -421,22 +428,19 @@ signals and slots system.")
   (package
     (inherit boost)
     (name "boost-mpi")
-    (native-inputs
-     `(("perl" ,perl)
-       ,@(if (%current-target-system)
-             '()
-             `(("python" ,python-wrapper)))
-       ("openmpi" , openmpi)))
+    (inputs
+     (modify-inputs (package-inputs boost)
+       (append openmpi)))
     (arguments
      (substitute-keyword-arguments (package-arguments boost)
-      ((#:phases phases)
-       `(modify-phases ,phases
-          (add-after 'configure 'update-jam
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let ((output-port (open-file "project-config.jam" "a")))
-                (display "using mpi ;" output-port)
-                (newline output-port)
-                (close output-port))))))))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'configure 'update-jam
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (let ((output-port (open-file "project-config.jam" "a")))
+                  (display "using mpi ;" output-port)
+                  (newline output-port)
+                  (close output-port))))))))
     (home-page "https://www.boost.org")
     (synopsis "Message Passing Interface (MPI) library for C++")))
 
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 75980f2148..9a46f97c81 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019 Carl Dong <contact@carldong.me>
 ;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
@@ -60,8 +60,6 @@
             %bootstrap-gcc
             %bootstrap-glibc
             %bootstrap-inputs
-            %bootstrap-mescc-tools
-            %bootstrap-mes
 
             %bootstrap-inputs-for-tests))
 
@@ -929,112 +927,12 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
     (home-page #f)
     (license gpl3+)))
 
-(define %bootstrap-mescc-tools
-  ;; The initial MesCC tools.  Uses binaries from a tarball typically built by
-  ;; %MESCC-TOOLS-BOOTSTRAP-TARBALL.
-  (package
-    (name "bootstrap-mescc-tools")
-    (version "0.5.2")
-    (source #f)
-    (build-system trivial-build-system)
-    (arguments
-     `(#:guile ,%bootstrap-guile
-       #:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 popen))
-         (let ((out     (assoc-ref %outputs "out"))
-               (tar     (assoc-ref %build-inputs "tar"))
-               (xz      (assoc-ref %build-inputs "xz"))
-               (tarball (assoc-ref %build-inputs "tarball")))
-
-           (mkdir out)
-           (copy-file tarball "binaries.tar.xz")
-           (invoke xz "-d" "binaries.tar.xz")
-           (let ((builddir (getcwd))
-                 (bindir   (string-append out "/bin")))
-             (with-directory-excursion out
-               (invoke tar "xvf"
-                       (string-append builddir "/binaries.tar"))))))))
-    (inputs
-     `(("tar" ,(bootstrap-executable "tar" (%current-system)))
-       ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-       ("tarball"
-        ,(bootstrap-origin
-          (origin
-            (method url-fetch)
-            (uri (map
-                  (cute string-append <>
-                        "/i686-linux/20190815/"
-                        "mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")
-                  %bootstrap-base-urls))
-            (sha256
-             (base32
-              "0c3kklgghzh4q2dbpl6asb74cimp7hp6jscdwqwmzxbapgcl6582")))))))
-    (synopsis "Bootstrap binaries of MesCC Tools")
-    (description synopsis)
-    (home-page #f)
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (license gpl3+)))
-
-(define %bootstrap-mes
-  ;; The initial Mes.  Uses binaries from a tarball typically built by
-  ;; %MES-BOOTSTRAP-TARBALL.
-  (package
-    (name "bootstrap-mes")
-    (version "0")
-    (source #f)
-    (build-system trivial-build-system)
-    (arguments
-     `(#:guile ,%bootstrap-guile
-       #:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 popen))
-         (let ((out     (assoc-ref %outputs "out"))
-               (tar     (assoc-ref %build-inputs "tar"))
-               (xz      (assoc-ref %build-inputs "xz"))
-               (tarball (assoc-ref %build-inputs "tarball")))
-
-           (mkdir out)
-           (copy-file tarball "binaries.tar.xz")
-           (invoke xz "-d" "binaries.tar.xz")
-           (let ((builddir (getcwd))
-                 (bindir   (string-append out "/bin")))
-             (with-directory-excursion out
-               (invoke tar "xvf"
-                       (string-append builddir "/binaries.tar"))))))))
-    (inputs
-     `(("tar" ,(bootstrap-executable "tar" (%current-system)))
-       ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-       ("tarball"
-        ,(bootstrap-origin
-          (origin
-            (method url-fetch)
-            (uri (map
-                  (cute string-append <>
-                        "/i686-linux/20190815/"
-                        "mes-minimal-stripped-0.19-i686-linux.tar.xz")
-                  %bootstrap-base-urls))
-            (sha256
-             (base32
-              "1q4xjpx6nbn44kxnilpgl12bhpmwy2bblzwszc2ci7xkf400jcpv")))))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (synopsis "Bootstrap binaries of Mes")
-    (description synopsis)
-    (home-page #f)
-    (license gpl3+)))
-
 (define (%bootstrap-inputs)
   ;; The initial, pre-built inputs.  From now on, we can start building our
   ;; own packages.
   (match (%current-system)
     ((or "i686-linux" "x86_64-linux")
-     `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
-       ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools)
-       ("mes" ,%bootstrap-mes)))
+     `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)))
     (_
      `(("libc" ,%bootstrap-glibc)
        ("gcc" ,%bootstrap-gcc)
@@ -1046,7 +944,7 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
 (define %bootstrap-inputs-for-tests
   ;; These are bootstrap inputs that are cheap to produce (no compilation
   ;; needed) and that are meant to be used for testing.  (These are those we
-  ;; used before the Mes-based reduced bootstrap.)
+  ;; used before the Mes-based full-source bootstrap.)
   `(("libc" ,%bootstrap-glibc)
     ("gcc" ,%bootstrap-gcc)
     ("binutils" ,%bootstrap-binutils)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 91805e1f84..42244b1ad4 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -359,8 +359,7 @@ resembles Python.")
               (patches (search-patches
                         "meson-allow-dirs-outside-of-prefix.patch"))))))
 
-;; TODO: Bump this in the next rebuild cycle.
-(define-public meson meson-0.60)
+(define-public meson meson-0.63)
 
 (define-public meson-python
   (package
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 32a8f23f19..c65db2b69e 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
 ;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@
 
 (define-module (gnu packages calendar)
   #:use-module (gnu packages)
+  #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -132,32 +134,32 @@ the <tz.h> library for handling time zones and leap seconds.")
                 "13ycghsi4iv8mnm0xv97bs0x6qvfhdxkw20n3yhcc7bg6n0bg122"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f ; test suite appears broken
-       #:parallel-build? #f             ;may cause GIR generation failure
-       #:configure-flags '("-DSHARED_ONLY=true"
-                           ;; required by evolution-data-server
-                           "-DGOBJECT_INTROSPECTION=true"
-                           "-DICAL_GLIB_VAPI=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-docbook-reference
-           (lambda* (#:key inputs #:allow-other-keys)
-             (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/")))))
-         (add-before 'configure 'patch-paths
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded
-             ;; zoneinfo database.  When that is released we can drop
-             ;; the tzdata dependency.
-             (let ((tzdata (assoc-ref inputs "tzdata")))
-               (substitute* "src/libical/icaltz-util.c"
-                 (("\\\"/usr/share/zoneinfo\\\",")
-                  (string-append "\"" tzdata "/share/zoneinfo\""))
-                 (("\\\"/usr/lib/zoneinfo\\\",") "")
-                 (("\\\"/etc/zoneinfo\\\",") "")
-                 (("\\\"/usr/share/lib/zoneinfo\\\"") ""))))))))
+     (list
+      #:configure-flags #~(list "-DSHARED_ONLY=true"
+                                ;; required by evolution-data-server
+                                "-DGOBJECT_INTROSPECTION=true"
+                                "-DICAL_GLIB_VAPI=true")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-docbook-reference
+            (lambda _
+              (substitute* "doc/reference/libical-glib/libical-glib-docs.sgml.in"
+                (("http://www.oasis-open.org/docbook/xml/4.3/")
+                 (string-append #$(this-package-native-input "docbook-xml")
+                                "/xml/dtd/docbook/")))))
+          (add-before 'configure 'patch-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (define zoneinfo (search-input-directory inputs "share/zoneinfo"))
+              ;; The timezones test fails if TZDIR is not set, for some
+              ;; reason.  If only TZDIR is set, tests checking the timezone
+              ;; fallback fail, so also patch the source.
+              (setenv "TZDIR" zoneinfo) ;for tests
+              (substitute* "src/libical/icaltz-util.c"
+                (("\\\"/usr/share/zoneinfo\\\",")
+                 (format #f "~s" zoneinfo))
+                (("\\\"/usr/lib/zoneinfo\\\",") "")
+                (("\\\"/etc/zoneinfo\\\",") "")
+                (("\\\"/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 b8dfe96e6d..6372e7ff08 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.81")
+    (version "3.82")
     (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
-                "19ncvhz45dhr0nmymwkxspq9l44gaafkspxiwxbqs1hpnqxmzgx8"))
+                "0wqmgibacxf5i3jlm8jl50qasv2spwx07ixlscz9byf2f8xnggrj"))
               ;; 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 0c8777a074..ffb81a7f03 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2018-2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2018-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
@@ -35,7 +35,7 @@
 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
@@ -100,6 +100,7 @@
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix deprecation)
   #:use-module (srfi srfi-1))
 
 (define-public pict
@@ -721,7 +722,7 @@ format.")
 (define-public cppcheck
   (package
     (name "cppcheck")
-    (version "2.3")
+    (version "2.10")
     (source (origin
       (method git-fetch)
       (uri (git-reference
@@ -729,7 +730,7 @@ format.")
              (commit version)))
       (file-name (git-file-name name version))
       (sha256
-       (base32 "03ic5mig3ryzkf85r95ryagf84s7y5nd6sqr915l3zj30apnifvz"))))
+       (base32 "0riq7jlv21v2p77r01i36ll3klbgnkpsfk1wx4q8p1v5h5zgkkaa"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DBUILD_TESTS=ON")))
@@ -943,7 +944,7 @@ test coverage and has a web user interface that will refresh automatically.")
 (define-public googletest
   (package
     (name "googletest")
-    (version "1.11.0")
+    (version "1.12.1")
     (source
      (origin
        (method git-fetch)
@@ -952,7 +953,7 @@ test coverage and has a web user interface that will refresh automatically.")
              (commit (string-append "release-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0pd4y1gpx1z8fiyarkvqlmk6hbv0lc8fr00ivnsvqzi1xg34jfaa"))))
+        (base32 "1cv55x3amwrvfan9pr8dfnicwr8r6ar3yf6cg9v6nykd6m2v3qsv"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
@@ -1084,13 +1085,13 @@ syntax validation, ...
 (define-public python-parameterized
   (package
     (name "python-parameterized")
-    (version "0.7.4")
+    (version "0.8.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "parameterized" version))
        (sha256
-        (base32 "1444fdz5bj0k10nmhxv0bv2gfrfisi7hfzqdndb0pvhf4g3qq3qr"))))
+        (base32 "0p1vhfw552rgd7gb2vy4l4l4k8mnbdz7f3chgzvk0r0qsqvzzfs1"))))
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -1245,57 +1246,54 @@ standard library.")
 (define-public python-pytest
   (package
     (name "python-pytest")
-    (version "6.2.5")
+    (version "7.1.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest" version))
        (sha256
         (base32
-         "12cyi0lnyaq8sdqfnqlppd76gkw6zcg10gyih5knx9v611l3c6qk"))))
+         "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'pretend-version
-           ;; The version string is usually derived via setuptools-scm, but
-           ;; without the git metadata available, the version string is set to
-           ;; '0.0.0'.
-           (lambda _
-             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
-         (replace 'check
-           (lambda* (#:key (tests? #t) #:allow-other-keys)
-             (setenv "TERM" "dumb")     ;attempt disabling markup tests
-             (if tests?
-                 (invoke "pytest" "-vv" "-k"
-                         (string-append
-                          ;; This test involves the /usr directory, and fails.
-                          " not test_argcomplete"
-                          ;; These test do not honor the isatty detection and
-                          ;; fail.
-                          " and not test_code_highlight"
-                          " and not test_color_yes"))
-                 (format #t "test suite not run~%")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'pretend-version
+            ;; The version string is usually derived via setuptools-scm, but
+            ;; without the git metadata available, the version string is set to
+            ;; '0.0.0'.
+            (lambda _
+              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
+                      #$(package-version this-package))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (setenv "TERM" "dumb")    ;attempt disabling markup tests
+              (if tests?
+                  (invoke "pytest" "-vv" "-k"
+                          (string-append
+                           ;; This test involves the /usr directory, and fails.
+                           " not test_argcomplete"
+                           ;; These test do not honor the isatty detection and
+                           ;; fail.
+                           " and not test_code_highlight"
+                           " and not test_color_yes"))
+                  (format #t "test suite not run~%")))))))
     (propagated-inputs
-     `(("python-attrs" ,python-attrs-bootstrap)
-       ("python-iniconfig" ,python-iniconfig)
-       ("python-more-itertools" ,python-more-itertools)
-       ("python-packaging" ,python-packaging-bootstrap)
-       ("python-pluggy" ,python-pluggy)
-       ("python-py" ,python-py)
-       ("python-six" ,python-six-bootstrap)
-       ("python-toml" ,python-toml)
-       ("python-wcwidth" ,python-wcwidth)))
+     (list python-attrs-bootstrap
+           python-iniconfig
+           python-packaging-bootstrap
+           python-pluggy
+           python-py
+           python-tomli))
     (native-inputs
-     `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
-       ("bash" ,bash)
-       ("python-hypothesis" ,python-hypothesis)
-       ("python-nose" ,python-nose)
-       ("python-mock" ,python-mock)
-       ("python-pytest" ,python-pytest-bootstrap)
-       ("python-setuptools-scm" ,python-setuptools-scm)
-       ("python-toml" ,python-toml)
-       ("python-xmlschema" ,python-xmlschema)))
+     ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
+     (list bash
+           python-hypothesis
+           python-nose
+           python-pytest-bootstrap
+           python-setuptools-scm
+           python-xmlschema))
     (home-page "https://docs.pytest.org/en/latest/")
     (synopsis "Python testing library")
     (description
@@ -1304,7 +1302,8 @@ and functions, detailed info on failing assert statements, modular fixtures,
 and many external plugins.")
     (license license:expat)))
 
-(define-public python-pytest-6 python-pytest)
+(define-deprecated python-pytest-6 python-pytest)
+(export python-pytest-6)
 
 ;; Astropy started using hard dependencies for Pytest 7+, which might
 ;; happen for some other projects. It could be set as default in staging.
@@ -1333,7 +1332,7 @@ and many external plugins.")
     (inherit python-pytest)
     (name "python-pytest-bootstrap")
     (native-inputs (list python-iniconfig python-setuptools-scm
-                         python-toml))
+                         python-tomli))
     (arguments `(#:tests? #f))))
 
 (define-public python-pytest-assume
@@ -1523,28 +1522,39 @@ Python's @code{random.seed}.")
 (define-public python-pytest-runner
   (package
     (name "python-pytest-runner")
-    (version "5.2")
+    (version "6.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-runner" version))
        (sha256
         (base32
-         "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn"))))
+         "11dnhxnjmh4nf1j8rnvx944ha3wg8ggrgrwdcx4c7d19xmi57n5l"))))
     (build-system python-build-system)
     (arguments
-     '(;; FIXME: The test suite requires 'python-flake8' and 'python-black',
-       ;; but that introduces a circular dependency.
-       #:tests? #f
-       #:phases (modify-phases %standard-phases
-                  (replace 'check
-                    (lambda* (#:key tests? #:allow-other-keys)
-                      (if tests?
-                          (invoke "pytest" "-vv")
-                          (format #t "test suite not run~%"))
-                      #t)))))
+     (list
+      ;; FIXME: The test suite requires 'python-flake8' and 'python-black',
+      ;; but that introduces a circular dependency.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda _
+              (let ((circa-1980 (* 10 366 24 60 60)))
+                (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980))
+                (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (if tests?
+                  (invoke "pytest" "-vv")
+                  (format #t "test suite not run~%")))))))
     (native-inputs
-     (list python-setuptools-scm))
+     (list python-pypa-build python-setuptools-scm python-wheel))
     (home-page "https://github.com/pytest-dev/pytest-runner")
     (synopsis "Invoke py.test as a distutils command")
     (description
@@ -1582,13 +1592,13 @@ Python's @code{random.seed}.")
 (define-public python-pytest-mock
   (package
     (name "python-pytest-mock")
-    (version "3.6.1")
+    (version "3.8.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-mock" version))
        (sha256
-        (base32 "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0"))
+        (base32 "18pwr0qhr2z5rpfz7930986s55hh1gnmmq4m09q5h99rai2kzw3p"))
        (modules '((guix build utils)))
        (snippet
         ;; Some tests do a string match on Pytest output, and fails when
@@ -1628,44 +1638,26 @@ same arguments.")
 (define-public python-pytest-xdist
   (package
     (name "python-pytest-xdist")
-    (version "2.1.0")
+    (version "2.5.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-xdist" version))
        (sha256
         (base32
-         "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           ;; Remove pre-compiled .pyc files from source.
-           (for-each delete-file-recursively
-                     (find-files "." "__pycache__" #:directories? #t))
-           (for-each delete-file (find-files "." "\\.pyc$"))
-           #t))))
+         "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025"))))
     (build-system python-build-system)
     (arguments
-     '(#:tests? #f ; Lots of tests fail.
-       #:phases
+     '(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-setup-py
-           (lambda _
-             ;; Relax pytest requirement.
-             (substitute* "setup.py"
-               (("pytest>=6\\.0\\.0") "pytest"))))
          (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+           (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (add-installed-pythonpath inputs outputs)
                (invoke "pytest" "-vv"
                        "-n" (number->string (parallel-job-count)))))))))
-    (native-inputs
-     (list python-setuptools-scm))
-    (propagated-inputs
-     (list python-execnet python-pytest python-py python-pytest-forked))
-    (home-page
-     "https://github.com/pytest-dev/pytest-xdist")
+    (native-inputs (list python-setuptools-scm python-filelock python-pytest))
+    (propagated-inputs (list python-execnet python-pytest-forked))
+    (home-page "https://github.com/pytest-dev/pytest-xdist")
     (synopsis
      "Plugin for py.test with distributed testing and loop-on-failing modes")
     (description
@@ -1677,31 +1669,17 @@ program code to a remote location, executes there, and then syncs the
 result back.")
     (license license:expat)))
 
-(define-public python-pytest-xdist-next
-  (package/inherit python-pytest-xdist
-    (name "python-pytest-xdist")
-    (version "2.5.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pytest-xdist" version))
-       (sha256
-        (base32
-         "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025"))))
-    (propagated-inputs (list python-execnet python-pytest
-                             python-pytest-forked-next))))
-
 (define-public python-pytest-timeout
   (package
     (name "python-pytest-timeout")
-    (version "2.0.2")
+    (version "2.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-timeout" version))
        (sha256
         (base32
-         "04l1cd2qyp3fbccw95a8nqg682r647v7yil8807dgs7xv9a8pyg6"))))
+         "1nf339zg6qam3681f72j9c8fbqk8qcilna92psmzh4n60isa0z60"))))
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -1724,7 +1702,7 @@ timeout has been exceeded.")
 (define-public python-pytest-forked
   (package
     (name "python-pytest-forked")
-    (version "1.3.0")
+    (version "1.4.0")
     (source
      (origin
        (method git-fetch)               ;for tests
@@ -1734,29 +1712,24 @@ timeout has been exceeded.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1aip4kx50ynvykl7kq2mlbsi82vx701dvb8mm64lhp69bbv105rc"))))
+         "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'disable-setuptools-scm
+         (add-before 'build 'pretend-version
            (lambda _
-             (substitute* "setup.py"
-               (("use_scm_version=True")
-                (format #f "version=~s" ,version))
-               (("setup_requires=\\['setuptools_scm'\\],.*")
-                ""))))
+             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
          (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+           (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (add-installed-pythonpath inputs outputs)
                (invoke "pytest" "-vv")))))))
     (native-inputs
      ;; XXX: The bootstrap variant of Pytest is used to ensure the
      ;; 'hypothesis' plugin is not in the environment (due to
      ;; <http://issues.guix.gnu.org/25235>), which would cause the test suite
      ;; to fail (see: https://github.com/pytest-dev/pytest-forked/issues/54).
-     `(("python-pytest" ,python-pytest-bootstrap)))
+     (list python-pytest-bootstrap python-setuptools-scm))
     (home-page "https://github.com/pytest-dev/pytest-forked")
     (synopsis "Pytest plugin to run tests in isolated forked subprocesses")
     (description "This package provides a Pytest plugin which enables running
@@ -1765,23 +1738,6 @@ can be useful to isolate tests against undesirable global environment
 side-effects (such as setting environment variables).")
     (license license:expat)))
 
-(define-public python-pytest-forked-next
-  (package
-    (inherit python-pytest-forked)
-    (name "python-pytest-forked")
-    (version "1.4.0")
-    (source
-     (origin
-       (method git-fetch)               ;for tests
-       (uri (git-reference
-             (url "https://github.com/pytest-dev/pytest-forked")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs"))))
-    (native-inputs (list python-pytest-bootstrap python-setuptools-scm))))
-
 (define-public python-scripttest
   (package
     (name "python-scripttest")
@@ -2054,18 +2010,20 @@ have failed since the last commit or what tests are currently failing.")))
 (define-public python-coverage
   (package
     (name "python-coverage")
-    (version "5.2.1")
+    (version "6.4.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "coverage" version))
        (sha256
         (base32
-         "16z8i18msgs8k74n73dj9x49wzkl0vk4vq8k5pl1bsj70y7b4k53"))))
+         "157vndwrzyv9ypn2w3b6g8gv7vw07v994hq8nxasdb75k3ry2apc"))))
     (build-system python-build-system)
     (arguments
      ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
      '(#:tests? #f))
+    (propagated-inputs
+     (list python-tomli))
     (home-page "https://coverage.readthedocs.io")
     (synopsis "Code coverage measurement for Python")
     (description
@@ -2337,20 +2295,24 @@ instantly.")
 (define-public python-hypothesis
   (package
     (name "python-hypothesis")
-    (version "6.0.2")
+    (version "6.54.5")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "hypothesis" version))
               (sha256
                (base32
-                "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf"))))
+                "1ivyrjpnahvj359pfndnk8x3h0gw37kqm02fmnzibx4mas15d44a"))))
     (build-system python-build-system)
     (arguments
      ;; XXX: Tests are not distributed with the PyPI archive.
-     '(#:tests? #f))
+     (list #:tests? #f
+           #:phases
+           #~(modify-phases %standard-phases
+               ;; XXX: hypothesis requires pytest at runtime, but we can
+               ;; not propagate it due to a circular dependency.
+               (delete 'sanity-check))))
     (propagated-inputs
-     `(("python-attrs" ,python-attrs-bootstrap)
-       ("python-sortedcontainers" ,python-sortedcontainers)))
+     (list python-attrs-bootstrap python-exceptiongroup python-sortedcontainers))
     (synopsis "Library for property based testing")
     (description "Hypothesis is a library for testing your Python code against a
 much larger range of examples than you would ever want to write by hand.  It’s
@@ -2359,20 +2321,8 @@ seamlessly into your existing Python unit testing work flow.")
     (home-page "https://hypothesis.works/")
     (license license:mpl2.0)))
 
-;;; TODO: Make the default python-hypothesis in the next rebuild cycle.
-(define-public python-hypothesis-next
-  (package
-    (inherit python-hypothesis)
-    (version "6.43.3")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "hypothesis" version))
-              (sha256
-               (base32
-                "0d67dlc5a47i48fxzmji2mnybzby0h1wdscmj54555fghcyp1045"))))
-    (propagated-inputs
-     (modify-inputs (package-propagated-inputs python-hypothesis)
-       (append python-pytest)))))       ;to satisfy the sanity-check phase
+(define-deprecated python-hypothesis-next python-hypothesis)
+(export python-hypothesis-next)
 
 (define-public python-hypothesmith
   (package
@@ -2685,7 +2635,7 @@ statements in the module it tests.")
 (define-public python-pylint
   (package
     (name "python-pylint")
-    (version "2.12.2")
+    (version "2.14.5")
     (source
      (origin
        (method git-fetch)
@@ -2694,7 +2644,7 @@ statements in the module it tests.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0spmy7j1vvh55shzgma80q61y0d1cj45dcgslb4g5w3y602miq5i"))))
+        (base32 "0ljfvyzr2i07pi7m19kbshlc3cfnwr53mjhcpydaa0w8bak4cc95"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -2713,10 +2663,11 @@ statements in the module it tests.")
      (list python-pytest python-pytest-xdist))
     (propagated-inputs
      (list python-astroid
+           python-dill
            python-isort
            python-mccabe
            python-platformdirs
-           python-toml
+           python-tomlkit
            python-typing-extensions))
     (home-page "https://github.com/PyCQA/pylint")
     (synopsis "Advanced Python code static checker")
@@ -3188,7 +3139,7 @@ portable to just about any platform.")
 (define-public libfaketime
   (package
     (name "libfaketime")
-    (version "0.9.9")
+    (version "0.9.10")
     (home-page "https://github.com/wolfcw/libfaketime")
     (source (origin
               (method git-fetch)
@@ -3197,42 +3148,40 @@ portable to just about any platform.")
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z"))
+                "112l7x2gv4f47hpffpb8djfwvgrs8w5h9s266h1fshi1c916x10d"))
               (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'embed-date-reference
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((coreutils (assoc-ref inputs "coreutils")))
-                        (substitute* "src/faketime.c"
-                          (("\"date\"")
-                           (string-append "\"" coreutils "/bin/date\""))))))
-                  (replace 'configure
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((out (assoc-ref outputs "out")))
-                        (setenv "CC" ,(cc-for-target))
-                        (setenv "PREFIX" out)
-
-                        ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
-                        ;; indefinitely.  See README.packagers for more information.
-                        ;; There are specific instructions to not enable more flags
-                        ;; than absolutely needed.
-                        ,(if (or (target-ppc64le?)
-                                 (target-riscv64?))
-                           `(setenv "FAKETIME_COMPILE_CFLAGS"
-                                    "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER")
-                           `(setenv "FAKETIME_COMPILE_CFLAGS"
-                                    "-DFORCE_MONOTONIC_FIX")))))
-                  (add-before 'check 'pre-check
-                    (lambda _
-                      (substitute* "test/functests/test_exclude_mono.sh"
-                        (("/bin/bash") (which "bash"))))))
-       #:test-target "test"))
-    (native-inputs
-     (list perl))                           ;for tests
-    (inputs
-     (list coreutils))
+     (list
+      #:test-target "test"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'embed-date-reference
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "src/faketime.c"
+                (("\"date\"")
+                 (format #f "~s" (search-input-file inputs "bin/date"))))))
+          (replace 'configure
+            (lambda* (#:key outputs #:allow-other-keys)
+              (setenv "CC" #$(cc-for-target))
+              (setenv "PREFIX" #$output)
+
+              ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
+              ;; indefinitely.  See README.packagers for more information.
+              ;; There are specific instructions to not enable more flags
+              ;; than absolutely needed.
+              #$@(if (or (target-ppc64le?)
+                         (target-riscv64?))
+                     #~((setenv "FAKETIME_COMPILE_CFLAGS"
+                                "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER"))
+                     #~((setenv "FAKETIME_COMPILE_CFLAGS"
+                                "-DFORCE_MONOTONIC_FIX")))))
+          (add-before 'check 'pre-check
+            (lambda _
+              (substitute* "test/functests/test_exclude_mono.sh"
+                (("/bin/bash") (which "bash"))))))))
+    (native-inputs (list perl))         ;for tests
+    (inputs (list coreutils-minimal))
     (synopsis "Fake the system time for single applications")
     (description
      "The libfaketime library allows users to modify the system time that an
@@ -3336,7 +3285,7 @@ grew out of the @dfn{Vc} project.")
 (define-public python-pyfakefs
   (package
     (name "python-pyfakefs")
-    (version "3.7.1")
+    (version "4.6.3")
     (source (origin
               (method url-fetch)
               ;; We use the PyPI URL because there is no proper release
@@ -3345,22 +3294,13 @@ grew out of the @dfn{Vc} project.")
               (uri (pypi-uri "pyfakefs" version))
               (sha256
                (base32
-                "1cp2yw96fa2qkgi39xa3nlr3inf8wb5rgh9kdq53256ca2r8pdhy"))
+                "18bcv8yalg80zgigx40fk692yr3wf9ch1hkb0cdplqspyry2mwbd"))
               (patches (search-patches
                         "python-pyfakefs-remove-bad-test.patch"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-testsuite
-           (lambda _
-             ;; Time difference is larger than expected.
-             (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py"
-               (("(\\s+)def test_copy_real_file" all indent)
-                (string-append
-                  indent
-                  "@unittest.skip('disabled by guix')\n"
-                  all)))))
          ;; The default test suite does not run these extra tests.
          (add-after 'check 'check-pytest-plugin
            (lambda _
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 3c6d47464a..cddccf8aea 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -900,7 +900,7 @@ emphasis on quality rather than speed.")
     (native-inputs
      (list gfortran
            (texlive-updmap.cfg (list texlive-fonts-ec
-                                     texlive-latex-graphics
+                                     texlive-graphics
                                      texlive-latex-geometry))))
     (home-page "https://github.com/greglandrum/yaehmop")
     (synopsis "Perform extended Hückel calculations")
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 94e22d8c21..47153e3531 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019-2023 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -318,7 +319,9 @@
 
 (define %chromium-version "109.0.5414.119")
 (define %ungoogled-revision (string-append %chromium-version "-1"))
-(define %debian-revision "debian/102.0.5005.61-1")
+(define %debian-revision "debian/103.0.5060.53-1")
+  ;; This is the first release supporting openjpeg@2.5 in openjpeg.patch;
+  ;; it still includes jsoncpp.patch, which also appears to be needed.
 (define %arch-revision "a0b214b3bdfbc7ee3d9004a70494a2b9e3da2c80")
 
 (define %ungoogled-origin
@@ -342,7 +345,7 @@
                                 ((_ version) version))))
     (sha256
      (base32
-      "1ln6r1qzlr7dsgvcbssvvc34my4mpkwv9hmvlb2dhjncs7isp65j"))))
+      "0bmbp1y0cykcbjhvsk330d11f7qnwmapcwxv76vdbl8cjfb6h60w"))))
 
 (define (origin-file origin file)
   (computed-file
@@ -355,7 +358,8 @@
 
 (define %debian-patches
   (map debian-patch
-       '("system/jsoncpp.patch"
+       '("fixes/clang-and-gcc11.patch"
+         "system/jsoncpp.patch"
          "system/zlib.patch"
          "system/openjpeg.patch")))
 
@@ -895,7 +899,7 @@
     (inputs
      (list alsa-lib
            atk
-           at-spi2-atk
+           at-spi2-core
            cups
            curl
            dbus
@@ -909,8 +913,8 @@
            gdk-pixbuf
            glib
            gtk+
-           harfbuzz-5
-           icu4c-71
+           harfbuzz
+           icu4c
            jsoncpp
            lcms
            libevent
diff --git a/gnu/packages/cluster.scm b/gnu/packages/cluster.scm
index 4db64d5d19..6e4055736a 100644
--- a/gnu/packages/cluster.scm
+++ b/gnu/packages/cluster.scm
@@ -132,7 +132,7 @@
            ;; For the documentation.
            docbook-xml
            docbook-xml-4.4              ;used by documentation/ra2refentry.xsl
-           docbook-xsl-next
+           docbook-xsl
            libxml2                      ;for XML_CATALOG_FILES
            libxslt                      ;for xsltproc
            ruby-asciidoctor))
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index d9b996986b..bccb035854 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -31,6 +31,7 @@
 (define-module (gnu packages cmake)
   #: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 utils)
@@ -99,8 +100,7 @@ using the CMake build system.")
       (lambda _
         (delete-file "Auxiliary/cmake-mode.el")
         (substitute* "Auxiliary/CMakeLists.txt"
-          ((".*cmake-mode.el.*") ""))
-        #t))
+          ((".*cmake-mode.el.*") ""))))
     ,@(if (target-x86-32?)
           '((add-after 'unpack 'skip-cpack-txz-test
               (lambda _
@@ -124,8 +124,7 @@ using the CMake build system.")
               "Source/cmExecProgramCommand.cxx"
               "Tests/CMakeLists.txt"
               "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
-          (("/bin/sh") (which "sh")))
-        #t))))
+          (("/bin/sh") (which "sh")))))))
 
 (define %common-disabled-tests
   '(;; This test copies libgcc_s.so.1 from GCC and tries to modify its RPATH,
@@ -143,6 +142,8 @@ using the CMake build system.")
     ;; be available along with the required headers.
     "Utilities/cmlibarchive/libarchive/archive_getdate.c"
     "Utilities/cmlibarchive/libarchive/archive_getdate.h"
+    ;; ELF headers.
+    "Utilities/cmelf"
     ;; CMake header wrappers.
     "Utilities/cm3p"))
 
@@ -151,7 +152,7 @@ using the CMake build system.")
 (define-public cmake-bootstrap
   (package
     (name "cmake-bootstrap")
-    (version "3.21.4")
+    (version "3.24.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://cmake.org/files/v"
@@ -159,71 +160,71 @@ using the CMake build system.")
                                   "/cmake-" version ".tar.gz"))
               (sha256
                (base32
-                "0y2rk316j9m1iqimgwah0z1ii3ggli65dw6hdn4ckx0mqaahlmyr"))
-              (patches (search-patches "cmake-curl-certificates.patch"))))
+                "1ny8y2dzc6fww9gzb1ml0vjpx4kclphjihkxagxigprxdzq2140d"))
+              (patches (search-patches "cmake-curl-certificates-3.24.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:test-target "test"
-       #:configure-flags
-       (let ((out (assoc-ref %outputs "out"))
-             (parallel-job-count (number->string (parallel-job-count))))
-         (list "--verbose"
-               (string-append "--parallel=" parallel-job-count)
-               (string-append "--prefix=" out)
-               "--system-libs"
-               "--no-system-jsoncpp"
-               ;; By default, the man pages and other docs land
-               ;; in PREFIX/man and PREFIX/doc, but we want them
-               ;; in share/{man,doc}.  Note that unlike
-               ;; autoconf-generated configure scripts, cmake's
-               ;; configure prepends "PREFIX/" to what we pass
-               ;; to --mandir and --docdir.
-               "--mandir=share/man"
-               ,(string-append "--docdir=share/doc/cmake-"
-                               (version-major+minor version))
+     (list
+      #:test-target "test"
+      #:configure-flags
+      #~(let ((parallel-job-count (number->string (parallel-job-count))))
+          (list "--verbose"
+                (string-append "--parallel=" parallel-job-count)
+                (string-append "--prefix=" #$output)
+                "--system-libs"
+                ;; By default, the man pages and other docs land
+                ;; in PREFIX/man and PREFIX/doc, but we want them
+                ;; in share/{man,doc}.  Note that unlike
+                ;; autoconf-generated configure scripts, cmake's
+                ;; configure prepends "PREFIX/" to what we pass
+                ;; to --mandir and --docdir.
+                "--mandir=share/man"
+                (string-append "--docdir=share/doc/cmake-"
+                               #$(version-major+minor version))
 
-               ;; By default CMake is built without any optimizations.  Use
-               ;; the recommended Release target for a ~2.5x speedup.
-               "--" "-DCMAKE_BUILD_TYPE=Release"))
-       #:make-flags
-       (let ((skipped-tests
-              (list ,@%common-disabled-tests
-                    "CTestTestSubdir" ; This test fails to build 2 of the 3 tests.
-                    ;; This test fails when ARGS (below) is in use, see
-                    ;; <https://gitlab.kitware.com/cmake/cmake/issues/17165>.
-                    "CTestCoverageCollectGCOV")))
-         (list
-          (string-append
-           ;; These arguments apply for the tests only.
-           "ARGS=-j " (number->string (parallel-job-count))
-           " --output-on-failure"
-           " --exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$")))
-       #:phases
-       (modify-phases %standard-phases
-         ,@(%common-build-phases)
-         (add-before 'configure 'set-paths
-           (lambda _
-             ;; Help cmake's bootstrap process to find system libraries
-             (begin
-               (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
-               (setenv "CMAKE_INCLUDE_PATH" (or (getenv "CPATH")
-                                                (getenv "C_INCLUDE_PATH")))
-               #t)))
-         ;; CMake uses its own configure script.
-         (replace 'configure
-           (lambda* (#:key (configure-flags '()) #:allow-other-keys)
-             (apply invoke "./configure" configure-flags))))))
+                ;; By default CMake is built without any optimizations.  Use
+                ;; the recommended Release target for a ~2.5x speedup.
+                "--" "-DCMAKE_BUILD_TYPE=Release"))
+      #:make-flags
+      #~(let ((skipped-tests
+               (list #$@%common-disabled-tests
+                     "CTestTestSubdir" ; This test fails to build 2 of the 3 tests.
+                     ;; This test fails when ARGS (below) is in use, see
+                     ;; <https://gitlab.kitware.com/cmake/cmake/issues/17165>.
+                     "CTestCoverageCollectGCOV")))
+          (list
+           (string-append
+            ;; These arguments apply for the tests only.
+            "ARGS=-j " (number->string (parallel-job-count))
+            " --output-on-failure"
+            " --exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$")))
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(%common-build-phases)
+          (add-before 'configure 'set-paths
+            (lambda _
+              ;; Help cmake's bootstrap process to find system libraries
+              (begin
+                (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+                (setenv "CMAKE_INCLUDE_PATH" (or (getenv "CPATH")
+                                                 (getenv "C_INCLUDE_PATH"))))))
+          ;; CMake uses its own configure script.
+          (replace 'configure
+            (lambda* (#:key (configure-flags '()) #:allow-other-keys)
+              (apply invoke "./configure" configure-flags))))))
     (inputs
-     `(("bzip2" ,bzip2)
-       ("curl" ,curl)
-       ("expat" ,expat)
-       ("file" ,file)
-       ("libarchive" ,libarchive)
-       ,@(if (hurd-target?)
-             '()
-             `(("libuv" ,libuv)))       ;not supported on the Hurd
-       ("rhash" ,rhash)
-       ("zlib" ,zlib)))
+     (append
+      (if (hurd-target?)
+          '()
+          (list libuv))                 ;not supported on the Hurd
+      (list bzip2
+            curl
+            expat
+            file
+            jsoncpp
+            libarchive
+            rhash
+            zlib)))
     (native-search-paths
      (list (search-path-specification
             (variable "CMAKE_PREFIX_PATH")
@@ -284,49 +285,45 @@ and workspaces that can be used in the compiler environment of your choice.")
                                     "Utilities"
                                     lstat)
                   #t))))
-    (inputs
-     (modify-inputs (package-inputs cmake-bootstrap)
-       (prepend jsoncpp)))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags
-       (list "-DCMAKE_USE_SYSTEM_LIBRARIES=ON"
-             (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
-                            ,(version-major+minor (package-version
-                                                   cmake-bootstrap))))
+     (list
+      #:configure-flags
+      #~(list "-DCMAKE_USE_SYSTEM_LIBRARIES=ON"
+              (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
+                             #$(version-major+minor (package-version
+                                                     cmake-bootstrap))))
 
-       ;; This is the CMake used in cmake-build-system.  Ensure compiler
-       ;; optimizations are enabled to save size and CPU cycles.
-       #:build-type "Release"
-       #:phases
-       (modify-phases %standard-phases
-         ,@(%common-build-phases)
-         (add-after 'install 'delete-help-documentation
-           (lambda* (#:key outputs #:allow-other-keys)
-             (delete-file-recursively
-               (string-append (assoc-ref outputs "out")
+      ;; This is the CMake used in cmake-build-system.  Ensure compiler
+      ;; optimizations are enabled to save size and CPU cycles.
+      #:build-type "Release"
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(%common-build-phases)
+          (add-after 'install 'delete-help-documentation
+            (lambda _
+              (delete-file-recursively
+               (string-append #$output
                               "/share/cmake-"
-                              ,(version-major+minor
+                              #$(version-major+minor
                                  (package-version cmake-bootstrap))
-                              "/Help"))
-             #t))
-         (replace 'check
-           (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
-             (let ((skipped-tests (list ,@%common-disabled-tests
-                                        ;; This test requires the bundled libuv.
-                                        "BootstrapTest")))
-               (if tests?
-                   (begin
-                     (invoke "ctest" "-j" (if parallel-tests?
-                                              (number->string (parallel-job-count))
-                                              "1")
-                             "--exclude-regex"
-                             (string-append "^(" (string-join skipped-tests "|") ")$")))
-                   (format #t "test suite not run~%"))
-               #t))))
-        ,@(if (%current-target-system)
-              '()
-              `(#:cmake ,cmake-bootstrap))))))
+                              "/Help"))))
+          (replace 'check
+            (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+              (let ((skipped-tests (list #$@%common-disabled-tests
+                                         ;; This test requires the bundled libuv.
+                                         "BootstrapTest")))
+                (if tests?
+                    (begin
+                      (invoke "ctest" "-j" (if parallel-tests?
+                                               (number->string (parallel-job-count))
+                                               "1")
+                              "--exclude-regex"
+                              (string-append "^(" (string-join skipped-tests "|") ")$")))
+                    (format #t "test suite not run~%"))))))
+      #:cmake (if (%current-target-system)
+                  cmake-minimal-cross
+                  cmake-bootstrap)))))
 
 ;;; The "user-facing" CMake, now with manuals and HTML documentation.
 (define-public cmake
@@ -363,27 +360,25 @@ and workspaces that can be used in the compiler environment of your choice.")
        ((#:build-type _ #f) "RelWithDebInfo")
 
        ((#:configure-flags flags ''())
-        `(append (list "-DSPHINX_INFO=ON" "-DSPHINX_MAN=ON" "-DSPHINX_HTML=ON"
-                       (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
-                                      ,(version-major+minor (package-version
-                                                             cmake-minimal)))
-                       "-DCMAKE_INFO_DIR=share/info"
-                       "-DCMAKE_MAN_DIR=share/man")
-                 ,flags))
+        #~(append (list "-DSPHINX_INFO=ON" "-DSPHINX_MAN=ON" "-DSPHINX_HTML=ON"
+                        (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-"
+                                       #$(version-major+minor (package-version
+                                                               cmake-minimal)))
+                        "-DCMAKE_INFO_DIR=share/info"
+                        "-DCMAKE_MAN_DIR=share/man")
+                  #$flags))
        ((#:phases phases)
-        `(modify-phases ,phases
-           (delete 'delete-help-documentation)
-           (add-after 'install 'move-html-doc
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out"))
-                     (doc (assoc-ref outputs "doc"))
-                     (html (string-append "/share/doc/cmake-"
-                                          ,(version-major+minor
-                                            (package-version cmake-minimal))
-                                          "/html")))
-                 (copy-recursively (string-append out html)
-                                   (string-append doc html))
-                 (delete-file-recursively (string-append out html)))))))))
+        #~(modify-phases #$phases
+            (delete 'delete-help-documentation)
+            (add-after 'install 'move-html-doc
+              (lambda _
+                (let ((html (string-append "/share/doc/cmake-"
+                                           #$(version-major+minor
+                                              (package-version cmake-minimal))
+                                           "/html")))
+                  (copy-recursively (string-append #$output html)
+                                    (string-append #$output:doc html))
+                  (delete-file-recursively (string-append #$output html)))))))))
     (inputs
      (modify-inputs (package-inputs cmake-minimal)
        (prepend ncurses)))              ;required for ccmake
@@ -411,13 +406,12 @@ and workspaces that can be used in the compiler environment of your choice.")
     (outputs '("out"))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir-elisp
-           ;; Elisp directory is not in root of the source.
-           (lambda _
-             (chdir "Auxiliary")
-             #t)))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'chdir-elisp
+                 ;; Elisp directory is not in root of the source.
+                 (lambda _
+                   (chdir "Auxiliary"))))))
     (synopsis "Emacs major mode for editing Cmake expressions")
     (description "@code{cmakeos-mode} provides an Emacs major mode for editing
 Cmake files.  It supports syntax highlighting, indenting and refilling of
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ea3a0afc23..24cffc4252 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,13 +1,13 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2019-2022 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
@@ -92,7 +92,7 @@
 (define bootar
   (package
     (name "bootar")
-    (version "1a")
+    (version "1b")
     (source (origin
               (method url-fetch)
               (uri (list (string-append
@@ -102,7 +102,7 @@
                           version ".ses")))
               (sha256
                (base32
-                "0mvp6vgx0q316fvy3z2lddlc5xgq5np3bm1fypgvj6dnayibg9np"))))
+                "0cf5vj5yxfvkgzvjvh2l7b2nz5ji5l534n9g4mfp8f5jsjqdrqjc"))))
     (build-system gnu-build-system)
     (arguments
      `(#:implicit-inputs? #f
@@ -121,9 +121,10 @@
                       (guile (string-append guile-dir "/bin/guile")))
                  (invoke guile "--no-auto-compile" source)
                  (chdir "bootar"))))
-           (replace 'configure (bootstrap-configure ,version "." "scripts"))
-           (replace 'build (bootstrap-build "."))
-           (replace 'install (bootstrap-install "." "scripts"))))))
+           (replace 'configure (bootstrap-configure "Bootar" ,version
+                                                    '(".") "scripts"))
+           (replace 'build (bootstrap-build '(".")))
+           (replace 'install (bootstrap-install '(".") "scripts"))))))
     (inputs `(("guile" ,%bootstrap-guile)))
     (home-page "https://git.ngyro.com/bootar")
     (synopsis "Tar decompression and extraction in Guile Scheme")
@@ -143,9 +144,6 @@ pure Scheme to Tar and decompression in one easy step.")
   (package
     (inherit gash)
     (name "gash-boot")
-    (source (origin
-              (inherit (package-source gash))
-              (snippet #f)))            ;discard snippet for Guile 3.0 support
     (arguments
      `(#:implicit-inputs? #f
        #:tests? #f
@@ -157,9 +155,10 @@ pure Scheme to Tar and decompression in one easy step.")
          (use-modules (guix build gnu-bootstrap))
          (modify-phases %standard-phases
            (replace 'configure
-             (bootstrap-configure ,(package-version gash) "gash" "scripts"))
-           (replace 'build (bootstrap-build "gash"))
-           (replace 'install (bootstrap-install "gash" "scripts"))
+             (bootstrap-configure "Gash" ,(package-version gash)
+                                  '("gash") "scripts"))
+           (replace 'build (bootstrap-build '("gash")))
+           (replace 'install (bootstrap-install '("gash") "scripts"))
            (add-after 'install 'install-symlinks
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((out (assoc-ref outputs "out")))
@@ -174,10 +173,6 @@ pure Scheme to Tar and decompression in one easy step.")
   (package
     (inherit gash-utils)
     (name "gash-utils-boot")
-    (source (origin
-              (inherit (package-source gash-utils))
-              (patches '())
-              (snippet #f)))            ;discard snippet for Guile 3.0 support
     (arguments
      `(#:implicit-inputs? #f
        #:tests? #f
@@ -209,9 +204,9 @@ pure Scheme to Tar and decompression in one easy step.")
                              (substitute* target
                                (("@UTILITY@") script))))
                          '("awk" "basename" "cat" "chmod" "cmp" "command"
-                           "compress" "cp" "cut" "diff" "dirname" "expr"
-                           "false" "find" "grep" "head" "ln" "ls" "mkdir"
-                           "mv" "printf" "pwd" "reboot" "rm" "rmdir"
+                           "compress" "cp" "cut" "diff" "dirname" "env"
+                           "expr" "false" "find" "grep" "head" "ln" "ls"
+                           "mkdir" "mv" "printf" "pwd" "reboot" "rm" "rmdir"
                            "sed" "sleep" "sort" "tar" "test" "touch" "tr"
                            "true" "uname" "uniq" "wc" "which"))
                (format #t "Creating scripts/[.in~%")
@@ -220,10 +215,11 @@ pure Scheme to Tar and decompression in one easy step.")
                  (("@UTILITY@") "testb"))
                (delete-file "scripts/template.in")))
            (replace 'configure
-             (bootstrap-configure ,(package-version gash-utils)
-                                  "gash" "scripts"))
-           (replace 'build (bootstrap-build "gash"))
-           (replace 'install (bootstrap-install "gash" "scripts"))
+             (bootstrap-configure "Gash-Utils" ,(package-version gash-utils)
+                                  '("gash" "gash-utils") "scripts"))
+           (replace 'build (bootstrap-build '("gash" "gash-utils")))
+           (replace 'install
+             (bootstrap-install '("gash" "gash-utils") "scripts"))
            ;; XXX: The scripts should add Gash to their load paths and
            ;; this phase should not exist.
            (add-after 'install 'copy-gash
@@ -247,7 +243,19 @@ pure Scheme to Tar and decompression in one easy step.")
                  (copy-file (string-append gash-godir "/gash/compat.go")
                             (string-append godir "/gash/compat.go"))
                  (copy-recursively (string-append gash-godir "/gash/compat")
-                                   (string-append godir "/gash/compat")))))))))
+                                   (string-append godir "/gash/compat")))))
+           ;; We need an external echo.
+           (add-after 'install 'make-echo
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (gash (assoc-ref inputs "gash")))
+                 (with-output-to-file (string-append out "/bin/echo")
+                   (lambda ()
+                     (display (string-append "#!" gash "/bin/gash\n"))
+                     (newline)
+                     (display "echo \"$@\"")
+                     (newline)))
+                 (chmod (string-append out "/bin/echo") #o755))))))))
     (inputs `(("gash" ,gash-boot)
               ("guile" ,%bootstrap-guile)))
     (native-inputs `(("bootar" ,bootar)))))
@@ -258,186 +266,239 @@ pure Scheme to Tar and decompression in one easy step.")
     ("bootar" ,bootar)
     ("guile" ,%bootstrap-guile)))
 
-(define %bootstrap-mes-rewired
+(define bootstrap-seeds
   (package
-    (inherit mes)
-    (name "bootstrap-mes-rewired")
-    (version "0.19")
-    (source #f)
-    (native-inputs `(("mes" ,%bootstrap-mes)
-                     ("gash" ,gash-boot)))
-    (inputs '())
-    (propagated-inputs '())
-    (outputs '("out"))
+    (name "bootstrap-seeds")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (list
+                    (string-append "mirror://gnu/guix/mirror/"
+                                   "bootstrap-seeds-" version ".tar.gz")
+                    (string-append
+                     "https://lilypond.org/janneke/guix/20220501/"
+                     "bootstrap-seeds-" version ".tar.gz")))
+       (sha256
+        (base32
+         "0scz2bx8fd8c821h6y1j3x6ywgxxns7iinyn9z32dnkiacfdcpfn"))))
+    (native-inputs (list bootar))
     (build-system trivial-build-system)
     (arguments
-     `(#:guile ,%bootstrap-guile
-       #:modules ((guix build utils))
-
-       #:builder (begin
-                   (use-modules (guix build utils)
-                                (srfi srfi-26))
-
-                   (let* ((mes (assoc-ref %build-inputs "mes"))
-                          (gash (assoc-ref %build-inputs "gash"))
-                          (mes-bin (string-append mes "/bin"))
-                          (guile (string-append mes-bin "/mes"))
-                          (mes-module (string-append mes "/share/mes/module"))
-                          (out (assoc-ref %outputs "out"))
-                          (bin (string-append out "/bin"))
-                          (mescc (string-append bin "/mescc"))
-                          (module (string-append out "/share/mes/module")))
-                     (define (rewire file)
-                       (substitute* file
-                         ((mes) out)
-                         (("/gnu/store[^ ]+mes-minimal-[^/)}\"]*") out)
-                         (("/gnu/store[^ ]+guile-[^/]*/bin/guile") guile)
-                         (("/gnu/store[^ ]+bash-[^/)}\"]*") gash)))
-
-                     (mkdir-p bin)
-                     (for-each (lambda (file) (install-file file bin))
-                               (find-files mes-bin))
-                     (mkdir-p module)
-                     (copy-recursively (string-append mes-module "/mes")
-                                       (string-append module "/mes"))
-                     (copy-recursively (string-append mes-module "/srfi")
-                                       (string-append module "/srfi"))
-                     (for-each rewire
-                               ;; Cannot easily rewire "mes" because it
-                               ;; contains NUL characters; would require
-                               ;; remove-store-references alike trick
-                               (filter (negate (cut string-suffix? "/mes" <>))
-                                       (find-files bin)))
-                     (rewire (string-append module "/mes/boot-0.scm"))
-
-                     (delete-file mescc)
-                     (with-output-to-file mescc
-                       (lambda _
-                         (display (string-append
-                                   "\
-#! " gash "/bin/sh
-LANG=C
-LC_ALL=C
-export LANG LC_ALL
-
-MES_PREFIX=${MES_REWIRED_PREFIX-" out "/share/mes}
-MES=" bin "/mes
-export MES MES_PREFIX
-
-MES_ARENA=${MES_REWIRED_ARENA-10000000}
-MES_MAX_ARENA=${MES_REWIRED_ARENA-10000000}
-MES_STACK=${MES_REWIRED_STACK-1000000}
-export MES_ARENA MES_MAX_ARENA MES_STACK
-
-$MES -e '(mescc)' module/mescc.scm -- \"$@\"
-"))))
-                     (chmod mescc #o555)
-
-                     (with-directory-excursion module
-                       (chmod "mes/base.mes" #o644)
-                       (copy-file "mes/base.mes" "mes/base.mes.orig")
-                       (let ((base.mes (open-file "mes/base.mes" "a")))
-                         (display "
-;; A fixed map, from Mes 0.21, required to bootstrap Mes 0.21
-(define (map f h . t)
-  (if (or (null? h)
-          (and (pair? t) (null? (car t)))
-          (and (pair? t) (pair? (cdr t)) (null? (cadr t)))) '()
-      (if (null? t) (cons (f (car h)) (map f (cdr h)))
-          (if (null? (cdr t))
-              (cons (f (car h) (caar t)) (map f (cdr h) (cdar t)))
-              (if (null? (cddr t))
-                  (cons (f (car h) (caar t) (caadr t)) (map f (cdr h) (cdar t) (cdadr t)))
-                  (error 'unsupported (cons* 'map-4: f h t))b )))))
-" base.mes)
-                         (close base.mes))
-
-                       (chmod "mes/guile.mes" #o644)
-                       (copy-file "mes/guile.mes" "mes/guile.mes.orig")
-                       (let ((guile.mes (open-file "mes/guile.mes" "a")))
-                         (display "
-;; After booting guile.scm; use Mes 0.21; especially: MesCC 0.21
-(let* ((self (car (command-line)))
-       (prefix (dirname (dirname self))))
-  (set! %moduledir (string-append prefix \"/mes/module/\"))
-  (setenv \"%numbered_arch\" \"true\"))
+     (list #:guile %bootstrap-guile
+           #:modules '((guix build utils))
+           #:builder
+           #~(begin
+               (use-modules (guix build utils))
+               (let ((source #$(package-source this-package))
+                     (tar #$(this-package-native-input "bootar"))
+                     (out #$output))
+                 (setenv "PATH" (string-append tar "/bin:"))
+                 (invoke "tar" "xvf" source)
+                 (mkdir-p out)
+                 (copy-recursively "bootstrap-seeds" out)))))
+    (home-page "https://github.com/oriansj/bootstrap-seeds")
+    (synopsis "The initial bootstrap seeds: 357-byte hex0 and kaem shell")
+    (description
+     "This package provides pre-built binaries of the bootstrap seeds.  It
+contains a hex0-seed and an optional kaem-minimal shell.  The size of the hex0
+seeds are for knight: 250 bytes, x86-linux: 357 bytes, x86_64-linux: 431
+bytes, and aarch64-linux 526 bytes.  These can be used to build stage0: hex0,
+hex1, hex2, M1, and M2-Planet.")
+    (license license:gpl3+)))
 
-" guile.mes)
-                         (close guile.mes)))
-                     #t))))))
+(define stage0-posix
+  ;; The initial bootstrap package: no binary inputs except those from
+  ;; `bootstrap-seeds, for x86 a 357 byte binary seed: `x86/hex0-seed'.
+  (let* ((mescc-tools-version "1.4.0")
+         (m2-planet-version "1.9.0")
+         (mescc-tools
+          (origin
+            (method url-fetch)
+            (uri (list
+                  (string-append
+                   "mirror://gnu/guix/mirror/"
+                   "mescc-tools-" mescc-tools-version ".tar.gz")
+                  (string-append
+                   "https://lilypond.org/janneke/guix/20220502/"
+                   "mescc-tools-" mescc-tools-version ".tar.gz")))
+            (sha256
+             (base32
+              "1xi6f48pf5bhajhfis189gpizxij7nbp1vzvsb1aafhz4skkiqvg"))))
+         (m2-planet
+          (origin
+            (method url-fetch)
+            (uri (list
+                  (string-append
+                   "mirror://gnu/guix/mirror/"
+                   "M2-Planet-" m2-planet-version ".tar.gz")
+                  (string-append
+                   "https://lilypond.org/janneke/guix/20220502/"
+                   "M2-Planet-" m2-planet-version ".tar.gz")))
+            (sha256
+             (base32
+              "1xrn69sc5nz4hwaishqyrcidp1ncxwib9zswl45x378ddz3mmk7g")))))
+    (package
+      (name "stage0-posix")
+      (version "1.4")
+      (source (origin
+                (method url-fetch)
+                (uri (list
+                      (string-append "mirror://gnu/guix/mirror/"
+                                     "stage0-posix-" version ".tar.gz")
+                      (string-append
+                       "https://lilypond.org/janneke/guix/20220502/"
+                       "stage0-posix-" version ".tar.gz")))
+                (sha256
+                 (base32
+                  "1ammifkj33205qrpfm84yb1c99lwgbn4jsl1hd08aab8c9ffz6p4"))))
+      (supported-systems '("i686-linux" "x86_64-linux"
+                           "aarch64-linux"
+                           "riscv64-linux"))
+      (native-inputs
+       `(("bootstrap-seeds" ,bootstrap-seeds)
+         ,@(%boot-gash-inputs)))
+      (build-system trivial-build-system)
+      (arguments
+       (list
+        #:guile %bootstrap-guile
+        #:modules '((guix build utils))
+        #:builder
+        #~(begin
+            (use-modules (guix build utils))
+            (let* ((bootstrap-seeds #$(this-package-native-input
+                                       "bootstrap-seeds"))
+                   (source #$(package-source this-package))
+                   (tar #$(this-package-native-input "bootar"))
+                   (bash #$(this-package-native-input "bash"))
+                   (coreutils #$(this-package-native-input "coreutils"))
+                   (guile #$(this-package-input "guile"))
+                   (out #$output)
+                   (bindir (string-append out "/bin"))
+                   (target (or #$(%current-target-system)
+                               #$(%current-system)))
+                   (stage0-cpu
+                    (cond
+                     ((or #$(target-x86-64?) #$(target-x86-32?))
+                      "x86")
+                     (#$(target-aarch64?)
+                      "AArch64")
+                     (#$(target-riscv64?)
+                      "riscv64")
+                     (else
+                      (error "stage0-posix: system not supported" target))))
+                   (kaem (string-append "../bootstrap-seeds/POSIX/"
+                                        stage0-cpu "/kaem-optional-seed")))
+              (setenv "PATH" (string-append tar "/bin:"
+                                            coreutils "/bin:"
+                                            bash "/bin"))
+              (invoke "tar" "xvf" source)
+              (chdir (string-append "stage0-posix-" #$version))
+              (copy-recursively bootstrap-seeds "bootstrap-seeds")
+              (invoke "tar" "xvf" #$mescc-tools)
+              (rmdir "mescc-tools")
+              (symlink (string-append "mescc-tools-" #$mescc-tools-version)
+                       "mescc-tools")
+              (invoke "tar" "xvf" #$m2-planet)
+              (rmdir "M2-Planet")
+              (symlink (string-append "M2-Planet-" #$m2-planet-version)
+                       "M2-Planet")
+              (rmdir "M2libc")
+              (symlink "M2-Planet/M2libc" "M2libc")
+              (mkdir-p bindir)
+              (with-directory-excursion stage0-cpu
+                (with-output-to-file "mes-m2.kaem"
+                  (lambda _ (display "")))
+                (with-output-to-file "mescc-tools-extra.kaem"
+                  (lambda _ (display "")))
+                (invoke kaem "kaem.run"))
+              (with-directory-excursion "bin"
+                (install-file "hex2" bindir)
+                (install-file "M1" bindir)
+                (install-file "blood-elf" bindir)
+                (install-file "kaem" bindir)
+                (install-file "get_machine" bindir)
+                (install-file "M2-Planet" bindir))))))
+      (home-page "https://github.com/oriansj/stage0-posix/")
+      (synopsis "The initial bootstrap package, builds stage0 up to M2-Planet")
+      (description "Starting from the 357-byte hex0-seed binary provided by
+the bootstrap-seeds, the stage0-posix package first builds hex0 and then all
+the way up: hex1, catm, hex2, M0, cc_x86, M1, M2, get_machine (that's all of
+MesCC-Tools), and finally M2-Planet.")
+      (license license:gpl3+))))
 
 (define mes-boot
   (package
     (inherit mes)
     (name "mes-boot")
-    (version "0.22")
+    (version "0.24.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://gnu/mes/"
-                                  "mes-" version ".tar.gz"))
+              (uri (list (string-append "mirror://gnu/mes/"
+                                   "mes-" version ".tar.gz")
+                         (string-append "https://lilypond.org/janneke/mes/"
+                                        "mes-" version ".tar.gz")))
               (sha256
                (base32
-                "0p1jsrrmcbc0zrvbvnjbb6iyxr0in71km293q8qj6gnar6bw09av"))))
+                "0vp8v88zszh1imm3dvdfi3m8cywshdj7xcrsq4cgmss69s2y1nkx"))))
     (inputs '())
     (propagated-inputs '())
+    (supported-systems '("i686-linux" "x86_64-linux"))
     (native-inputs
-     `(("nyacc-source" ,(origin (inherit (package-source nyacc-0.99))
-                                (snippet #f)))
-       ("mes" ,%bootstrap-mes-rewired)
-       ("mescc-tools" ,%bootstrap-mescc-tools)
+     `(("m2-planet" ,stage0-posix)
+       ("nyacc-source" ,(bootstrap-origin
+                         (origin (inherit (package-source nyacc-1.00.2))
+                                 (snippet #f))))
        ,@(%boot-gash-inputs)))
     (arguments
-     `(#:implicit-inputs? #f
-       #:tests? #f
-       #:guile ,%bootstrap-guile
-       #:strip-binaries? #f    ; binutil's strip b0rkes MesCC/M1/hex2 binaries
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-seeds
-           (lambda _
-             (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
-               (with-directory-excursion ".."
-                 (invoke "tar" "-xvf" nyacc-source)))))
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref %outputs "out"))
-                   (gash (assoc-ref %build-inputs "bash"))
-                   (mes (assoc-ref %build-inputs "mes"))
-                   (dir (with-directory-excursion ".." (getcwd))))
-               (setenv "AR" (string-append "gash " (getcwd) "/scripts/mesar"))
-               (setenv "BASH" (string-append gash "/bin/bash"))
-               (setenv "CC" (string-append mes "/bin/mescc"))
-               (setenv "GUILE_LOAD_PATH"
-                       (string-append
-                        mes "/share/mes/module"
-                        ":" dir "/nyacc-0.99.0/module"))
-               (invoke "gash" "configure.sh"
-                       (string-append "--prefix=" out)
-                       (string-append "--host=i686-linux-gnu")))))
-         (replace 'build
-           (lambda _
-             (invoke "sh" "bootstrap.sh")))
-         (delete 'check)
-         (replace 'install
-           (lambda _
-             (substitute* "install.sh"  ; show some progress
-               ((" -xf") " -xvf")
-               (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
-                (string-append space "echo '" cmd "'\n"
-                               space cmd "\n")))
-             (invoke "sh" "install.sh")
-             ;; Keep ASCII output, for friendlier comparison and bisection
-             (let* ((out (assoc-ref %outputs "out"))
-                    (cache (string-append out "/lib/cache")))
-               (define (objects-in-dir dir)
-                 (find-files dir
-                             (lambda (name stat)
-                               (and (equal? (dirname name) dir)
-                                    (or (string-suffix? ".o" name)
-                                        (string-suffix? ".s" name))))))
-               (for-each (lambda (x) (install-file x cache))
-                         (append (objects-in-dir ".")
-                                 (objects-in-dir "mescc-lib")))))))))
+     (list
+      #:implicit-inputs? #f
+      #:tests? #f
+      #:guile %bootstrap-guile
+      #:strip-binaries? #f              ;no strip yet
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'unpack-seeds
+            (lambda _
+              (let ((nyacc-source #$(this-package-native-input "nyacc-source")))
+                (with-directory-excursion ".."
+                  (invoke "tar" "-xvf" nyacc-source)))))
+          (replace 'configure
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((out #$output)
+                    (gash #$(this-package-native-input "bash"))
+                    (dir (with-directory-excursion ".." (getcwd))))
+                (setenv "GUILE_LOAD_PATH" (string-append
+                                           dir "/nyacc-1.00.2/module"))
+                (invoke "gash" "configure.sh"
+                        (string-append "--prefix=" out)
+                        "--host=i686-linux-gnu"))))
+          (replace 'build
+            (lambda _
+              (invoke "gash" "bootstrap.sh")))
+          (delete 'check)
+          (replace 'install
+            (lambda* (#:key outputs #:allow-other-keys)
+              (substitute* "install.sh" ; show some progress
+                ((" -xf") " -xvf")
+                (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
+                 (string-append space "echo '" cmd "'\n"
+                                space cmd "\n")))
+              (invoke "gash" "install.sh")
+              ;; Keep ASCII output, for friendlier comparison and bisection
+              (let* ((out #$output)
+                     (cache (string-append out "/lib/cache")))
+                (define (objects-in-dir dir)
+                  (find-files dir
+                              (lambda (name stat)
+                                (and (equal? (dirname name) dir)
+                                     (or (string-suffix? ".M1" name)
+                                         (string-suffix? ".hex2" name)
+                                         (string-suffix? ".o" name)
+                                         (string-suffix? ".s" name))))))
+                (for-each (lambda (x) (install-file x cache))
+                          (append (objects-in-dir "m2")
+                                  (objects-in-dir ".")
+                                  (objects-in-dir "mescc-lib")))))))))
     (native-search-paths
      (list (search-path-specification
             (variable "C_INCLUDE_PATH")
@@ -452,7 +513,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
 
 
 (define tcc-boot0
-  ;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
+  ;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 30
   ;; patches.  In a very early and rough form they were presented to the
   ;; TinyCC developers, who at the time showed no interest in supporting the
   ;; bootstrappable effort; we will try again later.  These patches have been
@@ -461,82 +522,83 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
   (package
     (inherit tcc)
     (name "tcc-boot0")
-    (version "0.9.26-1103-g6e62e0e")
+    (version "0.9.26-1136-g5bba73cc")
     (source (origin
               (method url-fetch)
-              (uri (list (string-append "mirror://gnu/guix/mirror/tcc-"
-                                        version ".tar.gz")
-                         (string-append
-                          "http://lilypond.org/janneke/mes/20191117/"
-                          "/tcc-" version ".tar.gz")))
+              (uri (list
+                    (string-append "mirror://gnu/guix/mirror/"
+                                   "tcc-" version ".tar.gz")
+                    (string-append "https://lilypond.org/janneke/tcc/"
+                                   "tcc-" version ".tar.gz")))
               (sha256
                (base32
-                "1qbybw7mxbgkv3sazvz1v7c8byq998vk8f1h25ik8w3d2l63lxng"))))
+                "1y2f04qwdqg7dgxiscbf0ibybx2gclniwbbcsxpayazzii2cvji3"))))
     (build-system gnu-build-system)
     (supported-systems '("i686-linux" "x86_64-linux"))
     (inputs '())
     (propagated-inputs '())
     (native-inputs
      `(("mes" ,mes-boot)
-       ("nyacc-source" ,(origin (inherit (package-source nyacc-0.99))
-                                (snippet #f)))
-       ("mescc-tools" ,%bootstrap-mescc-tools)
+       ("mescc-tools" ,stage0-posix)
+       ("nyacc-source" ,(bootstrap-origin
+                         (origin (inherit (package-source nyacc-1.00.2))
+                                 (snippet #f))))
        ,@(%boot-gash-inputs)))
     (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:validate-runpath? #f           ; no dynamic executables
-       #:strip-binaries? #f             ; no strip yet
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-seeds
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
-               (with-directory-excursion ".."
-                 (invoke "tar" "-xvf" nyacc-source)))))
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref %outputs "out"))
-                    (dir (with-directory-excursion ".." (getcwd)))
-                    (interpreter "/lib/mes-loader"))
-
-               (setenv "prefix" out)
-               (setenv "GUILE_LOAD_PATH"
-                       (string-append dir "/nyacc-0.99.0/module"))
-
-               (substitute* "conftest.c"
-                 (("volatile") ""))
-
-               (invoke "sh" "configure"
-                       "--cc=mescc"
-                       (string-append "--prefix=" out)
-                       (string-append "--elfinterp=" interpreter)
-                       "--crtprefix=."
-                       "--tccdir=."))))
-         (replace 'build
-           (lambda _
-             (substitute* "bootstrap.sh" ; Show some progress
-               (("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd)
-                (string-append space "echo \"" cmd "\"\n"
-                               space cmd "\n")))
-             (invoke "sh" "bootstrap.sh")))
-         (replace 'check
-           (lambda _
-             ;; fail fast tests
-             (system* "./tcc" "--help") ; --help exits 1
-             ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
-             ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment")
-             ;; TODO: add sensible check target (without depending on make)
-             ;; (invoke "sh" "check.sh")
-             #t))
-         (replace 'install
-           (lambda _
-             (substitute* "install.sh"  ; Show some progress
-               (("^( *)((cp|ls|mkdir|rm|tar|./[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd)
-                (string-append space "echo \"" cmd "\"\n"
-                               space cmd "\n")))
-
-             (invoke "sh" "install.sh"))))))
+     (list
+      #:implicit-inputs? #f
+      #:guile %bootstrap-guile
+      #:validate-runpath? #f            ; no dynamic executables
+      #:strip-binaries? #f              ; no strip yet
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'unpack-extra-sources
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((nyacc-source #$(this-package-native-input "nyacc-source")))
+                (with-directory-excursion ".."
+                  (invoke "tar" "-xvf" nyacc-source)))))
+          (replace 'configure
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((out #$output)
+                     (dir (with-directory-excursion ".." (getcwd)))
+                     (interpreter "/lib/mes-loader")
+                     (mes #$(this-package-native-input "mes"))
+                     (mescc (string-append mes "/bin/mescc")))
+                (substitute* "conftest.c"
+                  (("volatile") ""))
+                (setenv "prefix" out)
+                (setenv "GUILE_LOAD_PATH"
+                        (string-append dir "/nyacc-1.00.2/module"))
+                (invoke "sh" "configure"
+                        "--cc=mescc"
+                        (string-append "--prefix=" out)
+                        (string-append "--elfinterp=" interpreter)
+                        "--crtprefix=."
+                        "--tccdir=."))))
+          (replace 'build
+            (lambda _
+              (substitute* "bootstrap.sh" ; Show some progress
+                (("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{program_prefix[}]tcc) [^\"]*[^\\])\n" all space cmd)
+                 (string-append space "echo \"" cmd "\"\n"
+                                space cmd "\n")))
+              (invoke "sh" "bootstrap.sh")))
+          (replace 'check
+            (lambda _
+              ;; fail fast tests
+              (system* "./tcc" "--help") ; --help exits 1
+              ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
+              ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment")
+              ;; TODO: add sensible check target (without depending on make)
+              ;; (invoke "sh" "check.sh")
+              ))
+          (replace 'install
+            (lambda _
+              (substitute* "install.sh" ; Show some progress
+                (("^( *)((cp|ls|mkdir|rm|tar|./[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd)
+                 (string-append space "echo \"" cmd "\"\n"
+                                space cmd "\n")))
+
+              (invoke "sh" "install.sh"))))))
     (native-search-paths
      (list (search-path-specification
             (variable "C_INCLUDE_PATH")
@@ -657,152 +719,6 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
     ("tcc" ,tcc-boot0)
     ,@(%boot-gash-inputs)))
 
-(define bzip2-mesboot
-  ;; The initial bzip2
-  (package
-    (inherit bzip2)
-    (name "bzip2-mesboot")
-    (version (package-version bzip2))
-    (source (bootstrap-origin (package-source bzip2)))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-tcc0-inputs))
-    (outputs '("out"))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:tests? #f            ; check is naive, also checks non-built PROGRAMS
-       #:strip-binaries? #f   ; no strip yet
-       #:make-flags (list "CC=tcc -I ." "AR=tcc -ar" "bzip2"
-                          (string-append "PREFIX="
-                                         (assoc-ref %outputs "out")))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'scripted-patch
-           (lambda _
-             (substitute* "Makefile"
-               (("\tln " all)
-                (string-append "\t#" all)))
-             (substitute* "bzip2.c"
-               (("struct utimbuf uTimBuf;" all)
-                (string-append "// " all))
-               (("uTimBuf[.]" all)
-                (string-append "// " all))
-               (("retVal = utime [(] dstName, &uTimBuf [)];" all)
-                (string-append "retVal = 0; // " all)))))
-         (replace 'configure
-           (lambda _
-             (with-output-to-file "utime.h"
-               (lambda _ (display "
-#define fchown(filedes, owner, group) 0
-#define fchmod(filedes, mode) 0
-")))))
-         (replace 'check
-           (lambda _
-             (invoke "./bzip2" "--help")))
-         ;; FIXME: no compressing gzip yet
-         (delete 'compress-documentation))))))
-
-(define bash-mesboot0
-  ;; The initial Bash
-  (package
-    (inherit static-bash)
-    (name "bash-mesboot0")
-    (version "2.05b")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/bash/bash-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1r1z2qdw3rz668nxrzwa14vk2zcn00hw7mpjn384picck49d80xs"))))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-tcc0-inputs))
-    (outputs '("out"))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:strip-binaries? #f             ; no strip yet
-       #:configure-flags
-       (list "--build=i686-unknown-linux-gnu"
-             "--host=i686-unknown-linux-gnu"
-
-             "--without-bash-malloc"
-             "--disable-readline"
-             "--disable-history"
-             "--disable-help-builtin"
-             "--disable-progcomp"
-             "--disable-net-redirections"
-             "--disable-nls"
-
-             ;; Pretend 'dlopen' is missing so we don't build loadable
-             ;; modules and related code.
-             "ac_cv_func_dlopen=no")
-       #:make-flags '("bash")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'setenv
-           (lambda _
-             (let* ((gash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append gash "/bin/gash")))
-               (setenv "CONFIG_SHELL" shell)
-               (setenv "SHELL" shell)
-               (setenv "CC" "tcc")
-               (setenv "LD" "tcc")
-               (setenv "AR" "tcc -ar")
-               (setenv "CFLAGS" "-D _POSIX_VERSION=1"))))
-         (add-after 'unpack 'scripted-patch
-           (lambda _
-             (substitute* "Makefile.in"
-               (("mksyntax\\.c\n") "mksyntax.c -lgetopt\n")
-               (("buildversion[.]o\n") "buildversion.o -lgetopt\n")
-               ;; No size in Gash
-               (("\tsize ") "#\tsize"))
-             (substitute* "lib/sh/oslib.c"
-               (("int name, namelen;") "char *name; int namelen;"))
-             (substitute* "lib/sh/snprintf.c"
-               (("^#if (defined [(]HAVE_LOCALE_H[)])" all define) (string-append "#if 0 //" define)))
-             (substitute* "configure"
-               ((" egrep") " grep"))))
-         (replace 'configure
-           (lambda* (#:key configure-flags #:allow-other-keys)
-             (let ((configure-flags (filter (lambda (x)
-                                              (and (not (string-prefix? "CONFIG_SHELL=" x))
-                                                   (not (string-prefix? "SHELL=" x))))
-                                            configure-flags)))
-               (format (current-error-port)
-                       "running ./configure ~a\n" (string-join configure-flags)))
-             (apply invoke (cons "./configure" configure-flags))))
-         (add-after 'configure 'configure-fixups
-           (lambda _
-             (substitute* "config.h"
-               (("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
-             (let ((config.h (open-file "config.h" "a")))
-               (display "
-// tcc: error: undefined symbol 'enable_hostname_completion'
-#define enable_hostname_completion(on_or_off) 0
-
-// /gnu/store/…-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
-#define HAVE_POSIX_SIGNALS 1
-#define endpwent(x) 0
-"
-                        config.h)
-               (close config.h))))
-         (replace 'check
-           (lambda _
-             (invoke "./bash" "--version")))
-         (replace 'install
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bin (string-append out "/bin")))
-               (mkdir-p bin)
-               (copy-file "bash" (string-append bin "/bash"))
-               (copy-file "bash" (string-append bin "/sh"))))))))))
-
 (define tcc-boot
   ;; The final tcc.
   (package
@@ -819,7 +735,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
     (build-system gnu-build-system)
     (inputs '())
     (propagated-inputs '())
-    (native-inputs `(("bzip2" ,bzip2-mesboot)
+    (native-inputs `(("mes" ,mes-boot)
                      ,@(%boot-tcc0-inputs)))
     (arguments
      `(#:implicit-inputs? #f
@@ -828,14 +744,6 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
        #:strip-binaries? #f             ; no strip yet
        #:phases
        (modify-phases %standard-phases
-         ;; tar xvf ..bz2 gives
-         ;; bzip2: PANIC -- internal consistency error
-         (replace 'unpack
-           (lambda* (#:key source #:allow-other-keys)
-             (copy-file source "tarball.tar.bz2")
-             (invoke "bzip2" "-d" "tarball.tar.bz2")
-             (invoke "tar" "xvf" "tarball.tar")
-             (chdir (string-append "tcc-" ,version))))
          (add-after 'unpack 'scripted-patch
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "libtcc.c"
@@ -887,8 +795,26 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
              (= 1 (status:exit-val (system* "./tcc" "--help")))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref %outputs "out"))
-                   (tcc (assoc-ref %build-inputs "tcc")))
+             (let* ((out (assoc-ref %outputs "out"))
+                    (mes (assoc-ref %build-inputs "mes"))
+                    (tcc (assoc-ref %build-inputs "tcc"))
+                    (interpreter "/mes/loader")
+                    (cppflags
+                     (list
+                      "-D" "BOOTSTRAP=1"
+                      "-D" "ONE_SOURCE=1"
+                      "-D" "TCC_TARGET_I386=1"
+                      "-D" "CONFIG_TCCBOOT=1"
+                      "-D" "CONFIG_TCC_STATIC=1"
+                      "-D" "CONFIG_USE_LIBGCC=1"
+                      "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
+                      "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
+                      "-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
+                      "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:{B}/lib/tcc:.\"")
+                      "-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\""
+                                          tcc "/include" ":/include:{B}/include\"")
+                      "-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
+                      "-D" (string-append "TCC_LIBTCC1_MES=\"libtcc1-mes.a\""))))
                (and
                 (mkdir-p (string-append out "/bin"))
                 (copy-file "tcc" (string-append out "/bin/tcc"))
@@ -897,12 +823,21 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
                                   (string-append out "/include"))
                 (copy-recursively (string-append tcc "/lib")
                                   (string-append out "/lib"))
-                (invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
-                (invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
+                (invoke "./tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
+                (invoke "./tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
                 (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
                 (delete-file (string-append out "/lib/tcc/libtcc1.a"))
                 (copy-file "libtcc1.a"
-                           (string-append out "/lib/tcc/libtcc1.a")))))))))))
+                           (string-append out "/lib/tcc/libtcc1.a"))
+
+                (delete-file (string-append out "/lib/libc.a"))
+                (apply invoke "./tcc" "-c" "-o" "libc.o"
+                       "-I" (string-append tcc "/include")
+                       "-I" (string-append tcc "/include/linux/x86")
+                       (string-append mes "/lib/libc+gnu.c")
+                       cppflags)
+                (invoke "./tcc" "-ar" "rc" "libc.a" "libc.o")
+                (copy-file "libc.a" (string-append out "/lib/libc.a")))))))))))
 
 (define patch-mesboot
   ;; The initial patch.
@@ -939,56 +874,9 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
          ;; FIXME: no compressing gzip yet
          (delete 'compress-documentation))))))
 
-(define sed-mesboot0
-  ;; The initial sed.
-  (package
-    (inherit sed)
-    (name "sed-mesboot0")
-    (version "1.18")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/sed/sed-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1hyv7i82jd0q18xcql51ylc8jwadp3gb3irgcqlis3v61p35jsv2"))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-tcc0-inputs))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:configure-flags '("CC=tcc")
-       #:make-flags '("CC=tcc" "extra_objs=" "DEFS=-D HAVE_BCOPY")
-       #:strip-binaries? #f             ; no strip yet
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'scripted-patch
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (substitute* "configure"
-                 (("/bin/sh") shell)))))
-         (replace 'check
-           (lambda _
-             (invoke "./sed" "--version")))
-         (replace 'install
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bin (string-append out "/bin")))
-               (install-file "sed" bin)))))))))
-
 (define (%boot-tcc-inputs)
-  `(("bash" ,bash-mesboot0)
-    ("bzip2" ,bzip2-mesboot)
-    ("gzip" ,gzip-mesboot)
+  `(("gzip" ,gzip-mesboot)
     ("patch" ,patch-mesboot)
-    ("sed" ,sed-mesboot0)
-    ;; Place lower than sed so we don't override it.
-    ("gash-utils" ,gash-utils-boot)
     ("tcc" ,tcc-boot)
     ,@(alist-delete "tcc" (%boot-tcc0-inputs))))
 
@@ -997,14 +885,17 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
   (package
     (inherit binutils)
     (name "binutils-mesboot0")
-    (version "2.14")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/binutils/binutils-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds"))))
+    (version "2.20.1a")
+    (source (bootstrap-origin
+             (origin
+               (method url-fetch)
+               (uri (string-append "mirror://gnu/binutils/binutils-"
+                                   version ".tar.bz2"))
+               (patches (search-patches "binutils-boot-2.20.1a.patch"))
+               (patch-guile %bootstrap-guile)
+               (sha256
+                (base32
+                 "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
     (inputs '())
     (propagated-inputs '())
     (native-inputs (%boot-tcc-inputs))
@@ -1016,40 +907,21 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
        #:parallel-build? #f
        #:strip-binaries? #f             ; no strip yet
        #:configure-flags
-       (let ((out (assoc-ref %outputs "out")))
-         `("--disable-nls"
+       (let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
+                                      " -D MES_BOOTSTRAP=1"))
+             (bash (assoc-ref %build-inputs "bash")))
+         `(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
+           ,(string-append "CPPFLAGS=" cppflags)
+           "AR=tcc -ar"
+           "CXX=false"
+           "RANLIB=true"
+           ,(string-append "CC=tcc" cppflags)
+           "--disable-nls"
            "--disable-shared"
            "--disable-werror"
-           "--build=i386-unknown-linux"
-           "--host=i386-unknown-linux"
-           "--target=i386-unknown-linux"
-           "--with-sysroot=/"
-           ,(string-append "--prefix=" out)))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'setenv
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (setenv "CONFIG_SHELL" shell)
-               (setenv "SHELL" shell)
-               (setenv "AR" "tcc -ar")
-               (setenv "RANLIB" "true")
-               (setenv "CC" "tcc -D __GLIBC_MINOR__=6"))))
-         (add-after 'unpack 'scripted-patch
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "bfd/configure"
-               (("^sed -e '/SRC-POTFILES.*" all)
-                "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))))
-         (replace 'configure           ; needs classic invocation of configure
-           (lambda* (#:key configure-flags #:allow-other-keys)
-             (format (current-error-port)
-                     "running ./configure ~a\n" (string-join configure-flags))
-             (apply system* "./configure" configure-flags)
-             (substitute* "config.status"
-               (("[.]//dev/null") "/dev/null"))
-             (invoke "sh" "./config.status"))))))))
+           "--build=i686-unknown-linux-gnu"
+           "--host=i686-unknown-linux-gnu"
+           "--with-sysroot=/"))))))
 
 (define gcc-core-mesboot0
   ;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
@@ -1176,7 +1048,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
 
 (define (%boot-mesboot-core-inputs)
   `(("binutils" ,binutils-mesboot0)
-    ("gawk" ,gawk-mesboot0)
     ("gcc" ,gcc-core-mesboot0)
     ,@(alist-delete "tcc" (%boot-tcc-inputs))))
 
@@ -1207,72 +1078,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
                (copy-recursively "include" out)
                (copy-recursively headers out)))))))))
 
-(define gawk-mesboot0
-  ;; The initial Gawk.
-  (package
-    (inherit gawk)
-    (name "gawk-mesboot0")
-    (version "3.0.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/gawk/gawk-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "087s7vpc8zawn3l7bwv9f44bf59rc398hvaiid63klw6fkbvabr3"))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-tcc-inputs))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:configure-flags '("--build=i686-unknown-linux-gnu"
-                           "--host=i686-unknown-linux-gnu"
-                           "--disable-nls")
-       #:make-flags '("gawk")
-       #:parallel-build? #f
-       #:parallel-tests? #f
-       #:strip-binaries? #f             ; no strip yet
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'scripted-patch
-           (lambda _
-             (substitute* "Makefile.in"
-               (("date ") "echo today ")
-               ((" autoheader") "true")
-               ((" -lm ") " "))
-             (substitute* "test/Makefile.in"
-               (("^bigtest:.*") "bigtest: basic\n")
-               (("( |\t)(childin|convfmt|fflush|longwrds|math|negexp)" all sep) sep))))
-         (add-before 'configure 'setenv
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (setenv "CONFIG_SHELL" shell)
-               (setenv "SHELL" shell)
-               (setenv "CC" "tcc")
-               (setenv "CPP" "tcc -E")
-               (setenv "LD" "tcc")
-               (setenv "ac_cv_func_getpgrp_void" "yes")
-               (setenv "ac_cv_func_tzset" "yes"))))
-         (replace 'configure           ; needs classic invocation of configure
-           (lambda* (#:key configure-flags #:allow-other-keys)
-             (let* ((out (assoc-ref %outputs "out"))
-                    (configure-flags
-                     `(,@configure-flags
-                       ,(string-append "--prefix=" out))))
-               (format (current-error-port) "running ./configure ~a\n" (string-join configure-flags))
-               (system* "touch" "configure") ; aclocal.m4 is newer than configure
-               (apply invoke (cons "./configure" configure-flags)))))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin")))
-               (install-file "gawk" bin)
-               (symlink "gawk" (string-append bin "/awk"))))))))))
-
 (define glibc-mesboot0
   ;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
   ;; using gcc-2.95.3.  Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
@@ -1417,97 +1222,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
     ("libc" ,glibc-mesboot0)
     ,@(alist-delete "gcc" (%boot-mesboot-core-inputs))))
 
-(define tar-mesboot
-  ;; Initial tar with support for xz compression.
-  (package
-    (inherit tar)
-    (name "tar-mesboot")
-    (version  "1.22")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/tar/tar-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "19nvix64y95n5v6rr5g9g3fn08zz85cb5anzd7csfv4a4sz9lw4y"))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-mesboot0-inputs))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:tests? #f            ; check is naive, also checks non-built PROGRAMS
-       #:strip-binaries? #f   ; no strip yet
-       #:configure-flags '("--build=i686-unknown-linux-gnu"
-                           "--host=i686-unknown-linux-gnu"
-                           "--disable-nls")
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key configure-flags #:allow-other-keys)
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (setenv "CONFIG_SHELL" shell)
-               (setenv "SHELL" shell)
-               (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
-               (setenv "gl_cv_func_rename_dest_works" "yes")
-               (format (current-error-port)
-                       "running ./configure ~a\n" (string-join configure-flags))
-               (apply invoke (cons "./configure" configure-flags)))))
-         (add-after 'unpack 'scripted-patch
-           (lambda _
-             (let* ((bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (substitute* "configure"
-                 ((" /bin/sh") shell)))
-             (substitute* "Makefile.in"
-               (("^SUBDIRS = doc") "SUBDIRS ="))))
-         (replace 'install
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bin (string-append out "/bin")))
-               (install-file "src/tar" bin)))))))))
-
-(define grep-mesboot
-  ;; The initial grep.
-  (package
-    (inherit grep)
-    (name "grep-mesboot")
-    (version "2.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/grep/grep-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1w862l80lgc5mxvpiy4cfwk761d6xxavn0m3xd2l7xs2kmzvp6lq"))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-mesboot0-inputs))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'patch-configure
-           (lambda _
-             (let* ((bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (substitute* "configure"
-                 ((" [|][|] ./config.status") " || sh ./config.status")))))
-         (replace 'install
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bin (string-append out "/bin")))
-               (install-file "grep" bin)
-               (symlink "grep" (string-append bin "/egrep"))
-               (symlink "grep" (string-append bin "/fgrep"))))))))))
-
 (define binutils-mesboot1
   (package
     (inherit binutils-mesboot0)
@@ -1523,46 +1237,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
              "--build=i686-unknown-linux-gnu"
              "--host=i686-unknown-linux-gnu"
              "--with-sysroot=/"
-             ,(string-append "--prefix=" out))))
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (replace 'setenv
-             (lambda _
-               (let* ((out (assoc-ref %outputs "out"))
-                      (bash (assoc-ref %build-inputs "bash"))
-                      (shell (string-append bash "/bin/bash")))
-                 (setenv "CONFIG_SHELL" shell))))))))))
-
-(define coreutils-mesboot0
-  (package
-    (inherit coreutils)
-    (name "coreutils-mesboot0")
-    ;; The latest .gz release of Coreutils is 8.13; which does not build with gcc-2.95.3:
-    ;; randperm.c: In function `sparse_swap':
-    ;; randperm.c:117: invalid lvalue in unary `&'
-    (version "5.0")                     ; 2003-04
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/coreutils/coreutils-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "10wq6k66i8adr4k08p0xmg87ff4ypiazvwzlmi7myib27xgffz62"))))
-    (native-inputs (%boot-mesboot0-inputs))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (arguments
-     `(#:implicit-inputs? #f
-       #:tests? #f                      ; WARNING: `perl' is needed, ...
-       #:parallel-build? #f
-       #:strip-binaries? #f   ; strip: unrecognized option `--only-keep-debug'
-       #:guile ,%bootstrap-guile
-       #:configure-flags
-       '("--disable-doc"
-         "LIBS=-lc -lnss_files -lnss_dns -lresolv"
-         "ac_cv_func_gethostbyname=no"
-         "gl_cv_func_rename_dest_works=yes")))))
+             ,(string-append "--prefix=" out))))))))
 
 (define gnu-make-mesboot
   (package
@@ -1596,150 +1271,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
                     (bin (string-append out "/bin")))
                (install-file "make" bin)))))))))
 
-(define gawk-mesboot
-  (package
-    (inherit gawk)
-    (name "gawk-mesboot")
-    (version "3.1.8")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/gawk/gawk-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "03d5y7jabq7p2s7ys9alay9446mm7i5g2wvy8nlicardgb6b6ii1"))))
-    (native-inputs `(,@(%boot-mesboot0-inputs)
-                     ("mesboot-headers" ,mesboot-headers)))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (arguments
-     `(#:implicit-inputs? #f
-       #:parallel-build? #f
-       #:guile ,%bootstrap-guile
-       #:configure-flags '("ac_cv_func_connect=no")
-       #:make-flags '("gawk")
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (invoke "./gawk" "--version")))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin")))
-               (install-file "gawk" bin)
-               (symlink "gawk" (string-append bin "/awk"))))))))))
-
-(define sed-mesboot
-  (package
-    (inherit sed)
-    (name "sed-mesboot")
-    (version "4.0.6")                   ; 2003-04
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/sed/sed-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "0861ij94cqc4vaaki6r2wlapwcmhpx4ggp4r70f46mb21a8fkvf1"))))
-    (native-inputs (%boot-mesboot0-inputs))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (propagated-inputs '())
-    (arguments
-     `(#:implicit-inputs? #f
-       #:parallel-build? #f
-       #:guile ,%bootstrap-guile
-       #:tests? #f                      ; 8to7 fails
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack '/bin/sh
-           (lambda _
-             (let* ((bash (assoc-ref %build-inputs "bash"))
-                    (shell (string-append bash "/bin/bash")))
-               (substitute* "testsuite/Makefile.tests"
-                 (("^SHELL = /bin/sh")
-                  (string-append "SHELL = " shell)))))))))))
-
-(define bash-mesboot
-  (package
-    (inherit bash-mesboot0)
-    (version "4.4")
-    (name "bash-mesboot")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/bash/bash-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq"))))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs (%boot-mesboot0-inputs))
-    (outputs '("out"))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:configure-flags
-       '("--build=i686-unknown-linux-gnu"
-         "--host=i686-unknown-linux-gnu"
-
-         "--without-bash-malloc"
-         "--disable-readline"
-         "--disable-history"
-         "--disable-help-builtin"
-         "--disable-progcomp"
-         "--disable-net-redirections"
-         "--disable-nls"
-
-         ;; Pretend 'dlopen' is missing so we don't build loadable
-         ;; modules and related code.
-         "ac_cv_func_dlopen=no")
-       #:make-flags '("bash")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'scripted-patch
-           (lambda _
-             (substitute* "shell.c"
-               ((";;") ";"))))
-         (add-before 'configure 'setenv
-           (lambda _
-             (setenv "AWK" "gawk")
-             (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
-             (setenv "gl_cv_func_rename_dest_works" "yes")))
-         (add-after 'configure 'configure-fixups
-           (lambda _
-             (let ((config.h (open-file "config.h" "a")))
-               (display (string-append "
-#define enable_hostname_completion(on_or_off) 0
-")
-                        config.h)
-               (close config.h))))
-         (replace 'check
-           (lambda _
-             (invoke "./bash" "--version")))
-         (replace 'install
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (bin (string-append out "/bin")))
-               (mkdir-p bin)
-               (copy-file "bash" (string-append bin "/bash"))
-               (copy-file "bash" (string-append bin "/sh"))))))))))
-
 (define (%boot-mesboot1-inputs)
-  `(("bash" ,bash-mesboot)
-    ("binutils" ,binutils-mesboot1)
-    ("coreutils" ,coreutils-mesboot0)
-    ("gawk" ,gawk-mesboot)
-    ("grep" ,grep-mesboot)
+  `(("binutils" ,binutils-mesboot1)
     ("make" ,gnu-make-mesboot)
-    ("sed" ,sed-mesboot)
-    ("tar" ,tar-mesboot)
     ,@(fold alist-delete (%boot-mesboot0-inputs)
-            '("bash" "binutils" "bootar" "coreutils" "gash"
-              "gawk" "grep" "guile" "make" "sed" "tar"))))
+            '("binutils" "make"))))
 
 (define gmp-boot
   (let ((version "4.3.2"))
@@ -1933,57 +1469,22 @@ ac_cv_c_float_format='IEEE (little-endian)'
   `(("gcc" ,gcc-mesboot1)
     ,@(alist-delete "gcc" (%boot-mesboot1-inputs))))
 
-(define xz-mesboot
-  ;; Finally, we can build xz.
-  (package
-    (inherit xz)
-    (name "xz-mesboot")
-    (version "5.0.0")
-    (source (bootstrap-origin
-             (origin
-               (method url-fetch)
-               (uri (list (string-append "http://tukaani.org/xz/xz-" version
-                                         ".tar.gz")
-                          (string-append "http://multiprecision.org/guix/xz-"
-                                         version ".tar.gz")))
-               (sha256
-                (base32
-                 "0kf40ggbs1vaaj5s9k4csycahzqcf65n20pa6lngqhm6j0cj3agb")))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (inputs '())
-    (outputs '("out"))
-    (propagated-inputs '())
-    (native-inputs (%boot-mesboot2-inputs))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:parallel-build? #f
-       #:configure-flags
-       `("--disable-assembler"
-         "--disable-shared"
-         "--enable-small"
-         "--disable-threads"
-         "--disable-xzdec"
-         "--disable-lzmadec"
-         "--disable-lzmainfo"
-         "--disable-lzma-links"
-         "--disable-scripts"
-         "--disable-doc"
-         "--disable-nls"
-         "--disable-symbol-versions"
-         ;; configure disqualifies BASH, CPP, GCC and GREP
-         ;; all of which seem fine for the build
-         "ac_cv_prog_cc_c99=-std=gnu9x"
-         "ac_cv_path_GREP=grep"
-         "gl_cv_posix_shell=bash"
-         "ac_cv_have_decl_optreset=no"
-         "CPPFLAGS=-D__GNUC__=1")))))
-
 (define hello-mesboot
-  ;; Check for Scheme-only bootstrap.
+  ;; Check for Scheme-only bootstrap.  Note that newer versions of Hello
+  ;; break due to the way that newer versions of Gnulib handle
+  ;; "limits.h".  Hence, we stick to 2.10.
   (package
     (inherit hello)
     (name "hello-mesboot")
+    (version "2.10")
+    (source
+     (origin
+       (inherit (package-source hello))
+       (uri (string-append "mirror://gnu/hello/hello-" version
+                           ".tar.gz"))
+       (sha256
+        (base32
+         "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
     (supported-systems '("i686-linux" "x86_64-linux"))
     (inputs '())
     (propagated-inputs '())
@@ -2003,76 +1504,51 @@ ac_cv_c_float_format='IEEE (little-endian)'
 
 (define binutils-mesboot
   (package
-    (inherit binutils)
+    (inherit binutils-mesboot1)
     (name "binutils-mesboot")
-    (version "2.20.1a")
-    (source (bootstrap-origin
-             (origin
-               (method url-fetch)
-               (uri (string-append "mirror://gnu/binutils/binutils-"
-                                   version ".tar.bz2"))
-               (patches (search-patches "binutils-boot-2.20.1a.patch"))
-               (sha256
-                (base32
-                 "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
+    (native-inputs (%boot-mesboot2-inputs))))
+
+;; Sadly we have to introduce Gawk here.  The "versions.awk" script of
+;; glibc 2.16.0 is too complicated for Gash-Utils.  This is the version
+;; of Gawk used previously during bootstrap.  It's possible that a newer
+;; version would work, too, but this one was already ready to go.
+(define gawk-mesboot
+  (package
+    (inherit gawk)
+    (name "gawk-mesboot")
+    (version "3.1.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gawk/gawk-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "03d5y7jabq7p2s7ys9alay9446mm7i5g2wvy8nlicardgb6b6ii1"))))
+    (native-inputs (%boot-mesboot2-inputs))
+    (supported-systems '("i686-linux" "x86_64-linux"))
     (inputs '())
     (propagated-inputs '())
-    (native-inputs `(("xz" ,xz-mesboot)
-                     ,@(%boot-mesboot2-inputs)))
-    (supported-systems '("i686-linux" "x86_64-linux"))
     (arguments
      `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:tests? #f                     ; runtest: command not found
        #:parallel-build? #f
-       #:strip-binaries? #f            ; no strip yet
-       #:configure-flags
-       `("CC=gcc"
-         "CXX=false"
-         "RANLIB=true"
-         "--disable-doc"
-         "--disable-nls"
-         "--disable-shared"
-         "--disable-werror"
-         "--build=i686-unknown-linux-gnu"
-         "--host=i686-unknown-linux-gnu"
-         "--with-sysroot=/"
-         ;; checking for grep that handles long lines and -e
-         "ac_cv_path_GREP=grep")
-       ;; FIXME: ac_cv_path_GREP=grep doesn't seem to be forwarded to
-       ;; cascading configure's?
-       #:make-flags '("ac_cv_path_GREP=grep")
+       #:guile ,%bootstrap-guile
+       #:configure-flags '("ac_cv_func_connect=no")
+       #:make-flags '("gawk")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'scripted-patch
+         (replace 'check
            (lambda _
-             ;; sed-mesboot0 cannot build these
-             (copy-file "binutils/Makefile.in" "binutils/Makefile.in.orig")
-             (substitute* "binutils/Makefile.in"
-               ;; binutils/binutils uses an amazingly complex install
-               ;; command, using FOR, SED, READ, IF, ECHO, SED, SED, AWK,
-               ;; READ, and then LIBTOOL (to do something like
-               ;; `mkdir $DESTDIR$bindir; cp readline $DESTDIR$bindir ...')
-
-               ;; Some tool [debugme!] cannot handle two escaped newlines
-               ;; (bash?), and the install stops after $(am__EXEEXT_11)
-               ;; ("objcopy"), so $(am__EXEEXT_13) ("readelf") and others do
-               ;; not get installed.  Remove the stray newline:
-               (("^\t@BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ .*") ""))
-             (substitute* "opcodes/Makefile.in"
-               (("^SUBDIRS = [.] po") "SUBDIRS = ."))
-             (substitute* "binutils/Makefile.in"
-               (("^SUBDIRS = doc po") "SUBDIRS ="))
-             (substitute* "gas/Makefile.in"
-               (("^SUBDIRS = doc po") "SUBDIRS ="))
-             (substitute* "gprof/Makefile.in"
-               (("^SUBDIRS = po") "SUBDIRS ="))
-             (substitute* "ld/Makefile.in"
-               (("^SUBDIRS = po") "SUBDIRS =")))))))))
+             (invoke "./gawk" "--version")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "gawk" bin)
+               (symlink "gawk" (string-append bin "/awk"))))))))))
 
 (define (%boot-mesboot3-inputs)
   `(("binutils" ,binutils-mesboot)
-    ("xz" ,xz-mesboot)
+    ("gawk" ,gawk-mesboot)
     ,@(alist-delete "binutils" (%boot-mesboot2-inputs))))
 
 (define glibc-headers-mesboot
@@ -2149,6 +1625,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
                       (out (assoc-ref outputs "out")))
                   (apply invoke "make" make-flags)
                   (copy-recursively kernel-headers out))))
+            (add-before 'configure 'remove-bashism
+              (lambda _
+                (substitute* "sysdeps/unix/make-syscalls.sh"
+                  (("\\$[{]vdso_symver//\\./_[}]")
+                   "$(echo $vdso_symver | sed -e 's/\\./_/g')"))))
             (replace 'configure
               (lambda* (#:key configure-flags #:allow-other-keys)
                 (format (current-error-port) "running ../configure ~a\n"
@@ -2194,6 +1675,17 @@ SHELL := " shell "
                 (list (string-append "SHELL=" bash "/bin/sh"))))
            ((#:phases phases)
             #~(modify-phases #$phases
+                (add-after 'unpack 'simplify-intl-tests
+                  (lambda _
+                    ;; The bootstrap Guile (2.0.9) crashes trying to
+                    ;; perform a regex on non-ASCII text.  This gets
+                    ;; triggered by 'intl/po2test.sed' running over
+                    ;; 'po/de.po'.  If we ever remove the bootstrap
+                    ;; Guile or add pure-Scheme regex to Gash, this can
+                    ;; be removed.
+                    (substitute* '("catgets/Makefile"
+                                   "intl/Makefile")
+                      (("de\\.po") "en_GB.po"))))
                 (replace 'install
                   (lambda* (#:key outputs make-flags #:allow-other-keys)
                     (let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
@@ -2215,8 +1707,8 @@ SHELL := " shell "
     (name "gcc-mesboot1-wrapper")
     (source #f)
     (inputs '())
-    (native-inputs `(("bash" ,bash-mesboot)
-                     ("coreutils" ,coreutils-mesboot0)
+    (native-inputs `(("bash" ,gash-boot)
+                     ("coreutils" ,gash-utils-boot)
                      ("libc" ,glibc-mesboot)
                      ("gcc" ,gcc-mesboot1)))
     (arguments
@@ -2354,8 +1846,8 @@ exec " gcc "/bin/" program
     (version (package-version gcc-mesboot))
     (source #f)
     (inputs '())
-    (native-inputs `(("bash" ,bash-mesboot)
-                     ("coreutils" ,coreutils-mesboot0)
+    (native-inputs `(("bash" ,gash-boot)
+                     ("coreutils" ,gash-utils-boot)
                      ("libc" ,glibc-mesboot)
                      ("gcc" ,gcc-mesboot)))))
 
@@ -2364,24 +1856,74 @@ exec " gcc "/bin/" program
     ("gcc" ,gcc-mesboot)
     ,@(fold alist-delete (%boot-mesboot4-inputs) '("gcc" "gcc-wrapper"))))
 
-(define coreutils-mesboot
+(define (mesboot-package name pkg)
   (package
-    (inherit coreutils)
-    (name "coreutils-mesboot")
-    (source (bootstrap-origin (package-source coreutils)))
+    (inherit pkg)
+    (name name)
+    (source (bootstrap-origin (package-source pkg)))
     (native-inputs (%boot-mesboot5-inputs))
     (supported-systems '("i686-linux" "x86_64-linux"))
     (inputs '())
     (propagated-inputs '())
     (arguments
-     `(#:implicit-inputs? #f
-       #:guile ,%bootstrap-guile
-       #:tests? #f))))
+     (ensure-keyword-arguments (package-arguments pkg)
+                               `(#:implicit-inputs? #f
+                                 #:guile ,%bootstrap-guile
+                                 #:tests? #f)))))
+
+;; These packages are needed to complete the rest of the bootstrap.
+;; In the future, Gash et al. could handle it directly, but it's not
+;; ready yet.
+(define bash-mesboot (mesboot-package "bash-mesboot" static-bash))
+(define sed-mesboot (mesboot-package "sed-mesboot" sed))
+
+;; "sed" from Gash-Utils lacks the 'w' command as of 0.2.0.
+(define coreutils-mesboot
+  (let ((pkg (mesboot-package "coreutils-mesboot" coreutils)))
+    (package
+      (inherit pkg)
+      (native-inputs
+       `(("sed" ,sed-mesboot)
+         ,@(package-native-inputs pkg))))))
+
+(define grep-mesboot
+  (let ((pkg (mesboot-package "grep-mesboot" grep)))
+    (package
+      (inherit pkg)
+      (native-inputs
+       `(("sed" ,sed-mesboot)
+         ,@(package-native-inputs pkg))))))
+
+;; The XZ implementation in Bootar cannot decompress 'tar'.
+(define xz-mesboot
+  (let ((pkg (mesboot-package "xz-mesboot" xz)))
+    (package
+      (inherit pkg)
+      (arguments
+       (ensure-keyword-arguments (package-arguments pkg)
+                                 ;; XXX: This fails even though the
+                                 ;; actual runpaths seem fine.
+                                 `(#:validate-runpath? #f))))))
+
+;; We don't strictly need Tar here, but it allows us to get rid of
+;; Bootar and Gash-Utils and continue with the standard GNU tools.
+(define tar-mesboot
+  (let ((pkg (mesboot-package "tar-mesboot" tar)))
+    (package
+      (inherit pkg)
+      (native-inputs
+       `(("xz" ,xz-mesboot)
+         ,@(package-native-inputs pkg))))))
 
 (define (%boot-mesboot6-inputs)
-  `(("coreutils" ,coreutils-mesboot)
+  `(("bash" ,bash-mesboot)
+    ("coreutils" ,coreutils-mesboot)
+    ("grep" ,grep-mesboot)
+    ("sed" ,sed-mesboot)
+    ("tar" ,tar-mesboot)
+    ("xz" ,xz-mesboot)
     ,@(fold alist-delete (%boot-mesboot5-inputs)
-            '("coreutils" "kernel-headers"))))
+            '("bash" "coreutils" "bootar" "kernel-headers"))))
 
 (define (%bootstrap-inputs+toolchain)
   ;; The traditional bootstrap-inputs.  For the i686-linux, x86_64-linux
@@ -2458,7 +2000,21 @@ exec " gcc "/bin/" program
      `(#:tests? #f
        #:implicit-inputs? #f
        #:guile ,%bootstrap-guile
-       ,@(package-arguments coreutils)))))
+       ,@(package-arguments coreutils)
+       ;; The %bootstrap-glibc for aarch64 and armhf doesn't have
+       ;; $output/include/linux/prctl.h which causes some binaries
+       ;; to fail to build with coreutils-9.0+.
+       ,@(if (target-arm?)
+           `(#:configure-flags '(,(string-append
+                                    "--enable-no-install-program="
+                                    ;; the defaults to not install.
+                                    "arch,coreutils,hostname"
+                                    ;; fails due to missing headers.
+                                    ",timeout,sort")
+                                  ,@(if (target-arm32?)
+                                      `("--disable-year2038")
+                                      `())))
+           '())))))
 
 (define diffutils-boot0
   (package
@@ -2554,6 +2110,7 @@ exec " gcc "/bin/" program
        #:implicit-inputs? #f
        #:guile ,%bootstrap-guile
        #:configure-flags '("--disable-bzlib")
+       #:make-flags '("CFLAGS+=-std=c11")
        #:strip-binaries? #f
        #:validate-runpath? #f
        ,@(package-arguments file)))))
@@ -2709,7 +2266,13 @@ exec " gcc "/bin/" program
                       (lambda _
                         (substitute* "libstdc++-v3/configure"
                           (("g\\+\\+ -v") "true"))))))))
-             (_ (package-arguments lib)))))
+             (_ (package-arguments lib)))
+
+         ;; Explicitly add #:modules so MAKE-LIBSTDC++ can be changed
+         ;; without a full bootstrap.
+         #:modules ((guix build gnu-build-system)
+                    (guix build utils))))
+
       (inputs (%boot0-inputs))
       (native-inputs '()))))
 
@@ -2762,7 +2325,18 @@ exec " gcc "/bin/" program
     (inherit gcc)
     (name "gcc-cross-boot0")
     (outputs (delete "debug" (package-outputs gcc)))
-    (source (bootstrap-origin (package-source gcc)))
+    (source
+     (bootstrap-origin
+      (origin
+        (inherit (package-source gcc))
+        (snippet
+         #~(begin
+             ;; XXX: The GCC test suite contains files with non-ASCII file
+             ;; names, which cannot be repacked by BOOTSTRAP-ORIGIN.  Nor
+             ;; can it be deleted from Guile, so resort to this evil hack.
+             #$(origin-snippet (package-source gcc))
+             (system* #$(file-append coreutils-boot0 "/bin/rm") "-rf"
+                      "gcc/testsuite/go.test/test/fixedbugs/issue27836.dir"))))))
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
@@ -2918,7 +2492,9 @@ exec " gcc "/bin/" program
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
-       ,@(package-arguments m4)))))
+       ,@(package-arguments m4)
+       ;; Ignore test failure in gnulib for armhf/aarch64.
+       #:tests? ,(not (target-arm?))))))
 
 (define bison-boot0
   ;; This Bison is needed to build MiG so we need it early in the process.
@@ -2997,7 +2573,18 @@ memoized as a function of '%current-system'."
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
-       ,@(package-arguments linux-libre-headers)))
+       ,@(substitute-keyword-arguments (package-arguments linux-libre-headers)
+           ((#:phases phases)
+            `(modify-phases ,phases
+               (add-after 'unpack 'lower-version-requirements
+                 (lambda _
+                   ;; Pacify version checks so it works with the bootstrap
+                   ;; toolchain, since we are not building the full kernel.
+                   (substitute* "scripts/min-tool-version.sh"
+                     (("echo 5\\.1\\.0")  ;GCC
+                      "echo 4.8.4")
+                     (("echo 2\\.23\\.0") ;binutils
+                      "echo 2.20.1")))))))))
     (native-inputs
      `(("perl" ,perl-boot0)
 
@@ -3093,6 +2680,7 @@ memoized as a function of '%current-system'."
   ;; Also, use (%BOOT0-INPUTS) to avoid building Perl once more.
   (package
     (inherit texinfo)
+    (source (bootstrap-origin (package-source texinfo)))
     (native-inputs '())
     (inputs `(,@(%boot0-inputs)
               ("perl" ,perl-boot0)))
@@ -3160,8 +2748,7 @@ memoized as a function of '%current-system'."
      `(,@(%boot0-inputs)
        ("expat" ,expat-sans-tests)))              ;remove OpenSSL, zlib, etc.
     (native-inputs                                ;and pkg-config
-     `(("sitecustomize.py" ,(local-file (search-auxiliary-file
-                                         "python/sitecustomize.py")))))
+     `())
     (arguments
      `(#:implicit-inputs? #f
        #:guile ,%bootstrap-guile
@@ -3187,6 +2774,13 @@ memoized as a function of '%current-system'."
                ;; Prevent the 'ossaudiodev' extension from being
                ;; built, since it requires Linux headers.
                (("'linux', ") ""))))
+         (add-after 'install 'remove-tests
+           (lambda* (#:key outputs #:allow-other-keys)
+             (delete-file-recursively
+               (string-append (assoc-ref outputs "out")
+                              "/lib/python"
+                              ,(version-major+minor version)
+                              "/test"))))
          ,@(if (hurd-system?)
                `((add-before 'build 'fix-regen
                    (lambda* (#:key inputs #:allow-other-keys)
@@ -3194,11 +2788,14 @@ memoized as a function of '%current-system'."
                        (substitute* "Lib/plat-generic/regen"
                          (("/usr/include/")
                           (string-append libc "/include/")))))))
-               '())
-         (add-after 'install 'install-sitecustomize.py
-           ,(customize-site version)))))
+               '()))))
     (native-search-paths
-     (list (guix-pythonpath-search-path version)))))
+     (list (search-path-specification
+            (variable "PYTHONPATH")
+            (files (list (string-append
+                           "lib/python"
+                           (version-major+minor version)
+                           "/site-packages"))))))))
 
 (define/system-dependent ld-wrapper-boot0
   ;; The first 'ld' wrapper, defined with 'define/system-dependent' because
@@ -3352,14 +2949,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
        #:guile ,%bootstrap-guile
 
        ,@(substitute-keyword-arguments (package-arguments static-bash)
-           ((#:configure-flags flags '())
+           ((#:configure-flags flags #~'())
             ;; Add a '-L' flag so that the pseudo-cross-ld of
             ;; BINUTILS-BOOT0 can find libc.a.
-            `(append ,flags
-                     (list (string-append "LDFLAGS=-static -L"
-                                          (assoc-ref %build-inputs
-                                                     "libc:static")
-                                          "/lib")))))))))
+            #~(append #$flags
+                      (list (string-append "LDFLAGS=-static -L"
+                                           (assoc-ref %build-inputs
+                                                      "libc:static")
+                                           "/lib")))))))))
 
 (define gettext-boot0
   ;; A minimal gettext used during bootstrap.
@@ -3465,7 +3062,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
 (define libstdc++
   ;; Intermediate libstdc++ that will allow us to build the final GCC
   ;; (remember that GCC-BOOT0 cannot build libstdc++.)
-  (let ((lib (make-libstdc++ gcc)))
+  (let ((lib (make-libstdc++ gcc-boot0)))
     (package
       (inherit lib)
       (source (bootstrap-origin (package-source lib)))
@@ -3495,6 +3092,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
   ;; Zlib used by GCC-FINAL.
   (package
     (inherit zlib)
+    (source (bootstrap-origin (package-source zlib)))
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
@@ -3532,6 +3130,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
        ;; positive, so turn it off.
        #:validate-runpath? #f
 
+       ;; Additional modules for the libstdc++ phase below.
+       #:modules ((srfi srfi-1)
+                  (srfi srfi-26)
+                  ,@%gnu-build-system-modules)
+
        ,@(substitute-keyword-arguments (package-arguments gcc)
            ((#:make-flags flags)
             ;; Since $LIBRARY_PATH is not honored, add the relevant flags.
@@ -3569,7 +3172,26 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
                                            (package-full-name lib "-")
                                            char-set:letter)
                                          ,(package-name lib)))
-                             (list gmp-6.0 mpfr mpc))))))))))
+                             (list gmp-6.0 mpfr mpc)))))
+                (add-after 'unpack 'fix-build-with-external-libstdc++
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (let ((libstdc++ (assoc-ref inputs "libstdc++")))
+                      ;; Fix a regression in GCC 11 where the libstc++ input
+                      ;; shadows glibc headers when building libstdc++.  An
+                      ;; upstream fix was added in GCC 11.3.0, but it only
+                      ;; hides system include directories, not those on
+                      ;; CPLUS_INCLUDE_PATH.  See discussion at
+                      ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017>.
+                      (substitute* "libstdc++-v3/src/c++17/Makefile.in"
+                        (("AM_CXXFLAGS = ")
+                         (string-append "CPLUS_INCLUDE_PATH = "
+                                        (string-join
+                                         (remove (cut string-prefix? libstdc++ <>)
+                                                 (string-split
+                                                  (getenv "CPLUS_INCLUDE_PATH")
+                                                  #\:))
+                                         ":")
+                                        "\nAM_CXXFLAGS = ")))))))))))
 
     ;; This time we want Texinfo, so we get the manual.  Add
     ;; STATIC-BASH-FOR-GLIBC so that it's used in the final shebangs of
@@ -3704,11 +3326,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
                      (inputs (alist-delete "pcre" (package-inputs grep)))
                      (native-inputs `(("perl" ,perl-boot0))))))
 
+(define xz-final
+  ;; The final xz.  We need to replace the bootstrap xz with a newer one
+  ;; before we get to the %final-inputs so file doesn't try to link to it.
+  (let ((xz (with-boot5 (package-with-bootstrap-guile xz))))
+    (package/inherit xz)))
+
 (define (%boot6-inputs)
   ;; Now use the final Coreutils.
   `(("coreutils" ,coreutils-final)
     ("grep" ,grep-final)
-    ,@(%boot5-inputs)))
+    ("xz" ,xz-final)
+    ,@(fold alist-delete (%boot5-inputs)
+            '("coreutils" "xz"))))
 
 (define with-boot6
   (package-with-explicit-inputs %boot6-inputs))
@@ -3731,7 +3361,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
              `(("tar" ,tar)
                ("gzip" ,gzip)
                ("bzip2" ,bzip2)
-               ("xz" ,xz)
                ("file" ,file)
                ("diffutils" ,diffutils)
                ("patch" ,patch)
@@ -3739,6 +3368,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
                ("gawk" ,gawk)))
       ("sed" ,sed-final)
       ("grep" ,grep-final)
+      ("xz" ,xz-final)
       ("coreutils" ,coreutils-final)
       ("make" ,gnu-make-final)
       ("bash" ,bash-final)
@@ -3880,10 +3510,10 @@ is the GNU Compiler Collection.")
   (make-gcc-toolchain gcc-9))
 
 (define-public gcc-toolchain-10
-  gcc-toolchain)
+  (make-gcc-toolchain gcc-10))
 
 (define-public gcc-toolchain-11
-  (make-gcc-toolchain gcc-11))
+  gcc-toolchain)
 
 (define-public gcc-toolchain-12
   (make-gcc-toolchain gcc-12))
@@ -3891,7 +3521,7 @@ is the GNU Compiler Collection.")
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package
   ;; automatically "redirects" them to 'gcc-toolchain'.
-  (deprecated-package "gcc" gcc-toolchain-10))
+  (deprecated-package "gcc" gcc-toolchain-11))
 
 
 (define-public gdc-toolchain-10
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e58fd65e49..0365b37fa4 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
@@ -13,7 +13,7 @@
 ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016, 2019, 2020 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2016, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2016, 2018-2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
@@ -35,6 +35,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
+;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;;
@@ -104,54 +105,53 @@
 (define-public zlib
   (package
     (name "zlib")
-    (replacement zlib-1.2.12)
-    (version "1.2.11")
+    (version "1.2.13")
     (source
      (origin
-      (method url-fetch)
-      (uri (list (string-append "http://zlib.net/zlib-"
+       (method url-fetch)
+       (uri (list (string-append "http://zlib.net/zlib-"
                                  version ".tar.gz")
-                 (string-append "mirror://sourceforge/libpng/zlib/"
-                                version "/zlib-" version ".tar.gz")))
-      (sha256
-       (base32
-        "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
+                  (string-append "mirror://sourceforge/libpng/zlib/"
+                                 version "/zlib-" version ".tar.gz")))
+       (sha256
+        (base32
+         "0c5b8vw40dy178xlpddw65q9gf1h2186jcc3p4swinwggbllv8mk"))))
     (build-system gnu-build-system)
     (outputs '("out" "static"))
     (arguments
-     `(#:make-flags
-       ,(if (target-mingw?)
-            `(list ,(string-append "PREFIX=" (%current-target-system) "-")
-                   "BINARY_PATH = $(prefix)/bin"
-                   "INCLUDE_PATH = $(prefix)/include"
-                   "LIBRARY_PATH = $(prefix)/lib"
-                   "SHARED_MODE = 1"
-                   (string-append "prefix = " (assoc-ref %outputs "out")))
-            ''())
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; Zlib's home-made `configure' fails when passed
-             ;; extra flags like `--enable-fast-install', so we need to
-             ;; invoke it with just what it understand.
-             (let ((out (assoc-ref outputs "out")))
-               ;; 'configure' doesn't understand '--host'.
-               ,@(if (%current-target-system)
-                     `((setenv "CHOST" ,(%current-target-system)))
-                     '())
-               ,@(if (target-mingw?)
-                     `((rename-file "win32/Makefile.gcc" "Makefile"))
-                     `((invoke "./configure"
-                               (string-append "--prefix=" out)))))))
-         (add-after 'install 'move-static-library
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (static (assoc-ref outputs "static")))
-               (with-directory-excursion (string-append out "/lib")
-                 (install-file "libz.a" (string-append static "/lib"))
-                 (delete-file "libz.a")
-                 #t)))))))
+     (list
+      #:make-flags
+      (if (target-mingw?)
+          #~(list #$(string-append "PREFIX=" (%current-target-system) "-")
+                  "BINARY_PATH = $(prefix)/bin"
+                  "INCLUDE_PATH = $(prefix)/include"
+                  "LIBRARY_PATH = $(prefix)/lib"
+                  "SHARED_MODE = 1"
+                  (string-append "prefix = " #$output))
+          #~'())
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda _
+              ;; Zlib's home-made `configure' fails when passed
+              ;; extra flags like `--enable-fast-install', so we need to
+              ;; invoke it with just what it understand.
+              (setenv "CC" #$(cc-for-target))
+              ;; 'configure' doesn't understand '--host'.
+              #$@(if (%current-target-system)
+                     #~((setenv "CHOST" #$(%current-target-system)))
+                     #~())
+
+              #$@(if (target-mingw?)
+                     #~((rename-file "win32/Makefile.gcc" "Makefile"))
+                     #~((invoke "./configure"
+                                (string-append "--prefix=" #$output))))))
+          (add-after 'install 'move-static-library
+            (lambda _
+              (with-directory-excursion (string-append #$output "/lib")
+                (install-file "libz.a" (string-append #$output:static
+                                                      "/lib"))
+                (delete-file "libz.a")))))))
     (home-page "https://zlib.net/")
     (synopsis "Compression library")
     (description
@@ -166,21 +166,6 @@ independent of the input data and can be reduced, if necessary, at some cost
 in compression.")
     (license license:zlib)))
 
-(define-public zlib-1.2.12
-  (package
-    (inherit zlib)
-    (version "1.2.12")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (list (string-append "http://zlib.net/zlib-"
-                                 version ".tar.gz")
-                 (string-append "mirror://sourceforge/libpng/zlib/"
-                                version "/zlib-" version ".tar.gz")))
-      (sha256
-       (base32
-        "1n9na4fq4wagw1nzsfjr6wyly960jfa94460ncbf6p1fac44i14i"))))))
-
 (define-public minizip
   (package
     (name "minizip")
@@ -265,43 +250,28 @@ adding and extracting files to/from a tar archive.")
 (define-public gzip
   (package
    (name "gzip")
-   (version "1.10")
+   (version "1.12")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gzip/gzip-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
+              "0mhrx5wk9gazmxdw7vmbpg036yzqqhsww6h12kwf2dzn37jh6pnf"))))
    (build-system gnu-build-system)
    (synopsis "General file (de)compression (using lzw)")
    (arguments
     ;; FIXME: The test suite wants `less', and optionally Perl.
     '(#:tests? #f
+      #:configure-flags '("ac_cv_prog_LESS=\"less\"")
       #:phases
       (modify-phases %standard-phases
-        (add-after 'unpack 'patch-for-glibc-2.28
-          (lambda _
-            ;; Adjust the bundled gnulib to work with glibc 2.28.  See e.g.
-            ;; "m4-gnulib-libio.patch".  This is a phase rather than patch
-            ;; or snippet to work around <https://bugs.gnu.org/32347>.
-            (substitute* (find-files "lib" "\\.c$")
-              (("#if defined _IO_ftrylockfile")
-               "#if defined _IO_EOF_SEEN"))
-            (substitute* "lib/stdio-impl.h"
-              (("^/\\* BSD stdio derived implementations")
-               (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
-                              "# define _IO_IN_BACKUP 0x100\n"
-                              "#endif\n\n"
-                              "/* BSD stdio derived implementations")))
-            #t))
         (add-after 'unpack 'use-absolute-name-of-gzip
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "gunzip.in"
-              (("exec gzip")
+              (("exec 'gzip'")
                (string-append "exec " (assoc-ref outputs "out")
-                              "/bin/gzip")))
-            #t)))))
+                              "/bin/gzip"))))))))
    (inputs
     `(,@(if (%current-target-system)
             `(("bash" ,bash-minimal))
@@ -327,93 +297,91 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
                 "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (ice-9 ftw)
-                  (srfi srfi-1))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'set-paths 'hide-input-bzip2
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((bzip2 (assoc-ref inputs "bzip2")))
-               (if bzip2
-                   ;; Prevent the build system from retaining a reference to
-                   ;; BZIP2 from INPUTS.
-                   (begin
-                     (setenv "LIBRARY_PATH"
-                             (string-join (delete (string-append bzip2 "/lib")
-                                                  (string-split (getenv "LIBRARY_PATH")
-                                                                #\:))
-                                          ":"))
-                     (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
-                             (getenv "LIBRARY_PATH")))
-                   (format #t "no bzip2 found, nothing done~%"))
-               #t)))
-         (replace 'configure
-           (lambda* (#:key target #:allow-other-keys)
-             (when ,(%current-target-system)
-               ;; Cross-compilation: use the cross tools.
-               (substitute* (find-files "." "Makefile")
-                 (("CC=.*$")
-                  (string-append "CC = " target "-gcc\n"))
-                 (("AR=.*$")
-                  (string-append "AR = " target "-ar\n"))
-                 (("RANLIB=.*$")
-                  (string-append "RANLIB = " target "-ranlib\n"))
-                 (("^all:(.*)test" _ prerequisites)
-                  ;; Remove 'all' -> 'test' dependency.
-                  (string-append "all:" prerequisites "\n"))))
-             #t))
-         (add-before 'build 'build-shared-lib
-           (lambda* (#:key inputs #:allow-other-keys)
-             (patch-makefile-SHELL "Makefile-libbz2_so")
-             (invoke "make" "-f" "Makefile-libbz2_so")))
-         (add-after 'install 'install-shared-lib
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; The Makefile above does not have an 'install' target, nor does
-             ;; it create all the (un)versioned symlinks, so we handle it here.
-             (let* ((out    (assoc-ref outputs "out"))
-                    (libdir (string-append out "/lib"))
-                    (soname "libbz2.so")
-                    ;; Locate the built library (e.g. "libbz2.so.1.0.6").
-                    (lib (car (scandir "."
-                                       (lambda (file)
-                                         (and (string-prefix? soname file)
-                                              (eq? 'regular
-                                                   (stat:type (lstat file))))))))
-                    (soversion (string-drop lib (+ 1 (string-length soname)))))
-               (install-file lib libdir)
-               (with-directory-excursion libdir
-                 ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
-                 (let loop ((base soname)
-                            (numbers (string-split soversion #\.)))
-                   (unless (null? numbers)
-                     (let ((so-file (string-append base "." (car numbers))))
-                       (symlink so-file base)
-                       (loop so-file (cdr numbers))))))
-               #t)))
-         (add-after 'install-shared-lib 'move-static-lib
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (static (assoc-ref outputs "static")))
-               (with-directory-excursion (string-append out "/lib")
-                 (install-file "libbz2.a" (string-append static "/lib"))
-                 (delete-file "libbz2.a")
-                 #t))))
-         (add-after 'install-shared-lib 'patch-scripts
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out")))
-               (substitute* (string-append out "/bin/bzdiff")
-                 (("/bin/rm") "rm")))
-             #t)))
-
-       #:make-flags (list (string-append "PREFIX="
-                                         (assoc-ref %outputs "out")))
-
-       ;; Don't attempt to run the tests when cross-compiling.
-       ,@(if (%current-target-system)
-             '(#:tests? #f)
-             '())))
+     (list #:modules '((guix build gnu-build-system)
+                       (guix build utils)
+                       (ice-9 ftw)
+                       (srfi srfi-1))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'set-paths 'hide-input-bzip2
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let ((bzip2 (assoc-ref inputs "bzip2")))
+                     (if bzip2
+                         ;; Prevent the build system from retaining a reference to
+                         ;; BZIP2 from INPUTS.
+                         (begin
+                           (setenv "LIBRARY_PATH"
+                                   (string-join (delete (string-append bzip2 "/lib")
+                                                        (string-split (getenv "LIBRARY_PATH")
+                                                                      #\:))
+                                                ":"))
+                           (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
+                                   (getenv "LIBRARY_PATH")))
+                         (format #t "no bzip2 found, nothing done~%"))
+                     #t)))
+               (replace 'configure
+                 (lambda* (#:key target #:allow-other-keys)
+                   (when #$(%current-target-system)
+                     ;; Cross-compilation: use the cross tools.
+                     (substitute* (find-files "." "Makefile")
+                       (("CC=.*$")
+                        (string-append "CC = " target "-gcc\n"))
+                       (("AR=.*$")
+                        (string-append "AR = " target "-ar\n"))
+                       (("RANLIB=.*$")
+                        (string-append "RANLIB = " target "-ranlib\n"))
+                       (("^all:(.*)test" _ prerequisites)
+                        ;; Remove 'all' -> 'test' dependency.
+                        (string-append "all:" prerequisites "\n"))))
+                   #t))
+               (add-before 'build 'build-shared-lib
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (patch-makefile-SHELL "Makefile-libbz2_so")
+                   (invoke "make" "-f" "Makefile-libbz2_so")))
+               (add-after 'install 'install-shared-lib
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; The Makefile above does not have an 'install' target, nor does
+                   ;; it create all the (un)versioned symlinks, so we handle it here.
+                   (let* ((out    (assoc-ref outputs "out"))
+                          (libdir (string-append out "/lib"))
+                          (soname "libbz2.so")
+                          ;; Locate the built library (e.g. "libbz2.so.1.0.6").
+                          (lib (car (scandir "."
+                                             (lambda (file)
+                                               (and (string-prefix? soname file)
+                                                    (eq? 'regular
+                                                         (stat:type (lstat file))))))))
+                          (soversion (string-drop lib (+ 1 (string-length soname)))))
+                     (install-file lib libdir)
+                     (with-directory-excursion libdir
+                       ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
+                       (let loop ((base soname)
+                                  (numbers (string-split soversion #\.)))
+                         (unless (null? numbers)
+                           (let ((so-file (string-append base "." (car numbers))))
+                             (symlink so-file base)
+                             (loop so-file (cdr numbers))))))
+                     #t)))
+               (add-after 'install-shared-lib 'move-static-lib
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let ((out (assoc-ref outputs "out"))
+                         (static (assoc-ref outputs "static")))
+                     (with-directory-excursion (string-append out "/lib")
+                       (install-file "libbz2.a" (string-append static "/lib"))
+                       (delete-file "libbz2.a")
+                       #t))))
+               (add-after 'install-shared-lib 'patch-scripts
+                 (lambda* (#:key outputs inputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out")))
+                     (substitute* (string-append out "/bin/bzdiff")
+                       (("/bin/rm") "rm")))
+                   #t)))
+
+           #:make-flags #~(list (string-append "PREFIX="
+                                               (assoc-ref %outputs "out")))
+
+           ;; Don't attempt to run the tests when cross-compiling.
+           #:tests? (not (%current-target-system))))
     (inputs
      `(,@(if (%current-target-system)
              `(("bash" ,bash-minimal))
@@ -525,7 +493,7 @@ compressed with pbzip2 can be decompressed with bzip2).")
 (define-public xz
   (package
    (name "xz")
-   (version "5.2.5")
+   (version "5.2.8")
    (source (origin
             (method url-fetch)
             (uri (list (string-append "http://tukaani.org/xz/xz-" version
@@ -534,7 +502,7 @@ compressed with pbzip2 can be decompressed with bzip2).")
                                       version ".tar.gz")))
             (sha256
              (base32
-              "045s9agl3bpv3swlwydhgsqh7791957vmgw2plw8f1rks07r3x7n"))))
+              "0z9056ydsy76ib5cl1z60jkcqgr0x12d3lw1p2qnlcwi1fgxlp7c"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
@@ -656,14 +624,14 @@ some compression ratio).")
 (define-public lzip
   (package
     (name "lzip")
-    (version "1.22")
+    (version "1.23")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://savannah/lzip/lzip-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "0j59hx72258334rmkwn57ahr6s69nlrx0a5ip1jw2fbiwr12sd63"))))
+               "03985xc696210irdzv475mlvf30ylahni3msanfz4ppivm3w14j7"))))
     (build-system gnu-build-system)
     (arguments
      ;; The configure script doesn't recognise the --build or --host
@@ -1371,6 +1339,7 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
                      "switch(static_cast<HRESULT>(errorCode)) {"))))
               (patches (search-patches "p7zip-CVE-2016-9296.patch"
                                        "p7zip-CVE-2017-17969.patch"
+                                       "p7zip-fix-build-with-gcc-11.patch"
                                        "p7zip-remove-unused-code.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -1635,28 +1604,21 @@ or junctions, and always follows hard links.")
 (define-public zstd
   (package
     (name "zstd")
-    (version "1.5.0")
+    (version "1.5.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/facebook/zstd/releases/download/"
                            "v" version "/zstd-" version ".tar.gz"))
        (sha256
-        (base32 "150y541303vnvfhd8wkbih00lfvvm98rd12yijwlbkqzg3xgp52i"))))
+        (base32 "1l1zm1imcc2ixayykyh4y421shdj3pzp7g2xm2k2js8jmipxahkw"))))
     (build-system gnu-build-system)
-    (outputs '("out"                    ;1.2MiB executables and documentation
+    (outputs '("out"                    ;1.5MiB executables and documentation
                "lib"                    ;1.2MiB shared library and headers
                "static"))               ;1.2MiB static library
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'remove-bogus-check
-           (lambda _
-             ;; lib/Makefile falsely claims that no .pc file can be created.
-             (substitute* "lib/Makefile"
-               (("error configured .*dir ")
-                "true "))
-             #t))
          (add-after 'unpack 'patch-command-file-names
            ;; Don't require hard requirements to be in $PATH.
            (lambda* (#:key outputs #:allow-other-keys)
@@ -1813,7 +1775,6 @@ Compression ratios of 2:1 to 3:1 are common for text files.")
   (package (inherit zip)
     (name "unzip")
     (version "6.0")
-    (replacement unzip/fixed)
     (source
      (origin
        (method url-fetch)
@@ -1859,7 +1820,9 @@ Compression ratios of 2:1 to 3:1 are common for text files.")
                                 "unzip-zipbomb-part3.patch"
 
                                 ;; https://github.com/madler/unzip/issues/2
-                                "unzip-32bit-zipbomb-fix.patch"))))
+                                "unzip-32bit-zipbomb-fix.patch"
+
+                                "unzip-CVE-2022-0529+CVE-2022-0530.patch"))))
     (build-system gnu-build-system)
     ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
     (arguments
@@ -1904,15 +1867,6 @@ recreates the stored directory structure by default.")
     (license (license:non-copyleft "file://LICENSE"
                                    "See LICENSE in the distribution."))))
 
-(define unzip/fixed
-  (package (inherit unzip)
-    (source
-     (origin
-       (inherit (package-source unzip))
-       (patches (append
-                  (origin-patches (package-source unzip))
-                  (search-patches "unzip-CVE-2022-0529+CVE-2022-0530.patch")))))))
-
 (define-public ziptime
   (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc")
         (revision "0"))
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index ed6ae69198..1f65b4cdb2 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1083,7 +1083,7 @@ Google's C++ code base.")
       (arguments
        (substitute-keyword-arguments (package-arguments base)
          ((#:configure-flags flags)
-          `(cons* "-DBUILD_TESTING=ON"
+          `(cons* "-DABSL_BUILD_TESTING=ON"
                   (delete "-DABSL_RUN_TESTS=ON" ,flags))))))))
 
 (define-public abseil-cpp-cxxstd17
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 39e692fc6c..ad6f92ba7b 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -34704,13 +34704,13 @@ package online.")
             texlive-amsmath
             texlive-booktabs
             texlive-etoolbox
-            texlive-generic-iftex
-            texlive-latex-fancyhdr
-            texlive-latex-fancyvrb
+            texlive-iftex
+            texlive-fancyhdr
+            texlive-fancyvrb
             texlive-latex-geometry
-            texlive-latex-graphics
+            texlive-graphics
             texlive-latex-threeparttable
-            texlive-latex-titlesec
+            texlive-titlesec
             texlive-latex-upquote
             texlive-listings
             texlive-polyglossia
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6b1f53764f..bf5164abd0 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -59281,6 +59281,33 @@ into mod, giving clear and readable test results.")
 for TLS).")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-test-generator-0.3
+  (package
+    (name "rust-test-generator")
+    (version "0.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "test-generator" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1h03y4503jhhrks4m7xqfjya9lsx3ip5dlbldr7mgcws6j8bx5za"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-glob" ,rust-glob-0.3)
+        ("rust-proc-macro2" ,rust-proc-macro2-0.4)
+        ("rust-quote" ,rust-quote-0.6)
+        ("rust-syn" ,rust-syn-0.15))))
+    (home-page "https://github.com/frehberg/test-generator")
+    (synopsis "Generate parameterized tests from different input parameters")
+    (description
+     "This crate provides @code{#[test_resources]} and @code{#[bench_resources]}
+procedural macro attributes that generates multiple parameterized tests using
+one body with different resource input parameters.  A test is generated for
+each resource matching the specific resource location pattern.")
+    (license license:asl2.0)))
+
 (define-public rust-tester-0.9
   (package
     (name "rust-tester")
@@ -68433,6 +68460,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/crypto.scm b/gnu/packages/crypto.scm
index b4bef33b06..60f8a28dd1 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -899,7 +899,7 @@ SHA-1, SHA-2, and SHA-3, yet is at least as secure as SHA-3.")
 (define-public rhash
   (package
     (name "rhash")
-    (version "1.4.2")
+    (version "1.4.3")
     (source
      (origin
        (method url-fetch)
@@ -908,7 +908,7 @@ SHA-1, SHA-2, and SHA-3, yet is at least as secure as SHA-3.")
        (file-name (string-append "rhash-" version ".tar.gz"))
        (sha256
         (base32
-         "0qpc1fq7gdxxl11zya1gqhl9628jjk3x60q9sna43w0yz7sh03b0"))))
+         "0glaghjvwh9ziiqf599v0fdr6jrgc7lcnriq0h7r41k3jrkglh0y"))))
     (build-system gnu-build-system)
     (arguments
      (list #:configure-flags
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index ba500d433e..5791d4994a 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages groff)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libusb)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -129,109 +130,102 @@ driver is known to work with these printers:
 (define-public cups-filters
   (package
     (name "cups-filters")
-    (version "1.28.9")
-    (source(origin
-              (method url-fetch)
-              (uri
-               (string-append "https://openprinting.org/download/cups-filters/"
-                              "cups-filters-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1bk0x1rrb8wqbhh5c979ppgy6s2kqss8mjdlahgcjvd79wm3fs9g"))
-              (modules '((guix build utils)))
-              (snippet
-               ;; install backends, banners and filters to cups-filters output
-               ;; directory, not the cups server directory
-               '(begin
-                  (substitute* "Makefile.in"
-                    (("CUPS_DATADIR = @CUPS_DATADIR@")
-                     "CUPS_DATADIR = $(PREFIX)/share/cups")
-                    (("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)")
-                     "pkgcupsserverrootdir = $(PREFIX)")
-                    ;; Choose standard directories notably so that binaries are
-                    ;; stripped.
-                    (("pkgbackenddir = \\$\\(CUPS_SERVERBIN\\)/backend")
-                     "pkgbackenddir = $(PREFIX)/lib/cups/backend")
-                    (("pkgfilterdir = \\$\\(CUPS_SERVERBIN\\)/filter")
-                     "pkgfilterdir = $(PREFIX)/lib/cups/filter"))
-                  ;; Find bannertopdf data such as the print test page in our
-                  ;; output directory, not CUPS's prefix.
-                  (substitute* "configure"
-                    (("\\{CUPS_DATADIR\\}/data")
-                     "{prefix}/share/cups/data"))
-                  #t))))
+    (version "1.28.15")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://openprinting.org/download/cups-filters/"
+                       "cups-filters-" version ".tar.xz"))
+       (sha256
+        (base32 "12s7s2jgnh4q7ws7r2is6xp3pqq818jhnm4vpyzyywmvkxvfq1x9"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Install backends, banners and filters to cups-filters output
+        ;; directory, not the cups server directory.
+        #~(begin
+            (substitute* "Makefile.in"
+              (("CUPS_DATADIR = @CUPS_DATADIR@")
+               "CUPS_DATADIR = $(PREFIX)/share/cups")
+              (("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)")
+               "pkgcupsserverrootdir = $(PREFIX)")
+              ;; Choose standard directories notably so that binaries are
+              ;; stripped.
+              (("^pkg(.*)dir = \\$\\(CUPS_SERVERBIN\\)/(.*)" _ type suffix)
+               (format #f "pkg~adir = $(PREFIX)/lib/cups/~a" type suffix)))
+            ;; Find bannertopdf data such as the print test page in our
+            ;; output directory, not CUPS's prefix.
+            (substitute* "configure"
+              (("\\{CUPS_DATADIR\\}/data")
+               "{prefix}/share/cups/data"))))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list (string-append "PREFIX=" %output))
-       #:configure-flags
-       `("--disable-driverless" ; TODO: enable this
-         "--disable-mutool"     ; depends on yet another PDF library (mupdf)
-
-         ;; Look for the "domain socket of CUPS" in /var/run/cups.
-         "--localstatedir=/var"
+     (list #:make-flags
+           #~(list (string-append "PREFIX=" #$output))
+           #:configure-flags
+           #~(list "--disable-mutool"  ; needs yet another PDF library (mupdf)
 
-         ;; Free software for the win.
-         "--with-acroread-path=evince"
+                   ;; Look for the "domain socket of CUPS" in /var/run/cups.
+                   "--localstatedir=/var"
 
-         ,(string-append "--with-test-font-path="
-                         (assoc-ref %build-inputs "font-dejavu")
-                         "/share/fonts/truetype/DejaVuSans.ttf")
-         ,(string-append "--with-gs-path="
-                         (assoc-ref %build-inputs "ghostscript")
-                         "/bin/gsc")
-         ,(string-append "--with-shell="
-                         (assoc-ref %build-inputs "bash")
-                         "/bin/bash")
-         ,(string-append "--with-rcdir="
-                         (assoc-ref %outputs "out") "/etc/rc.d"))
+                   ;; Free software for the win.
+                   "--with-acroread-path=evince"
 
-       #:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'patch-foomatic-hardcoded-file-names
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      ;; Foomatic has hardcoded file names we need to fix.
-                      (let ((out (assoc-ref outputs "out"))
-                            (gs  (assoc-ref inputs "ghostscript")))
-                        (substitute* "filter/foomatic-rip/foomaticrip.c"
-                          (("/usr/local/lib/cups/filter")
-                           (string-append out "/lib/cups/filter")))
-                        #t)))
-                  (add-after 'install 'wrap-filters
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      ;; Some filters expect to find things in $PATH.  We cannot
-                      ;; just hard-code all absolute file names in the source
-                      ;; because foomatic-rip, for example, has tests like
-                      ;; 'startswith(cmd, "gs")'.
-                      (let ((out         (assoc-ref outputs "out"))
-                            (ghostscript (assoc-ref inputs "ghostscript"))
-                            (grep        (assoc-ref inputs "grep")))
-                        (for-each (lambda (file)
-                                    (wrap-program file
-                                      `("PATH" ":" prefix
-                                        (,(string-append ghostscript "/bin:"
-                                                         grep "/bin")))))
-                                  (find-files (string-append
-                                               out "/lib/cups/filter")))
-                        #t))))))
+                   (string-append "--with-test-font-path="
+                                  #$(this-package-input "font-dejavu")
+                                  "/share/fonts/truetype/DejaVuSans.ttf")
+                   (string-append "--with-gs-path="
+                                  #$(this-package-input "ghostscript-with-cups")
+                                  "/bin/gsc")
+                   (string-append "--with-shell="
+                                  (assoc-ref %build-inputs "bash")
+                                  "/bin/bash")
+                   (string-append "--with-rcdir="
+                                  #$output "/etc/rc.d"))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-foomatic-hardcoded-file-names
+                 (lambda _
+                   ;; Foomatic has hard-coded file names we need to fix.
+                   (substitute* "filter/foomatic-rip/foomaticrip.c"
+                     (("/usr/local(/lib/cups/filter)" _ file)
+                      (string-append #$output file)))))
+               (add-after 'install 'wrap-filters
+                 (lambda _
+                   ;; Some filters expect to find things in $PATH.  We cannot
+                   ;; just hard-code all absolute file names in the source
+                   ;; because foomatic-rip, for example, has tests like
+                   ;; 'startswith(cmd, "gs")'.
+                   (for-each
+                    (lambda (file)
+                      (wrap-program file
+                        `("PATH" ":" prefix
+                          (,(string-append
+                             #$(this-package-input "ghostscript-with-cups")
+                             "/bin:"
+                             #$(this-package-input "grep") "/bin")))))
+                    (find-files (string-append #$output
+                                               "/lib/cups/filter"))))))))
     (native-inputs
-     (list `(,glib "bin") ; for gdbus-codegen
+     (list `(,glib "bin")               ; for gdbus-codegen
            pkg-config))
     (inputs
-     `(("avahi"        ,avahi)
-       ("fontconfig"   ,fontconfig)
-       ("freetype"     ,freetype)
-       ("font-dejavu"  ,font-dejavu)    ; also needed by test suite
-       ("ghostscript"  ,ghostscript/cups)
-       ("grep"         ,grep)
-       ("ijs"          ,ijs)
-       ("dbus"         ,dbus)
-       ("lcms"         ,lcms)
-       ("libjpeg"      ,libjpeg-turbo)
-       ("libpng"       ,libpng)
-       ("libtiff"      ,libtiff)
-       ("glib"         ,glib)
-       ("qpdf"         ,qpdf)
-       ("poppler"      ,poppler)
-       ("cups-minimal" ,cups-minimal)))
+     (list avahi
+           fontconfig
+           freetype
+           font-dejavu                  ; also needed by test suite
+           ghostscript/cups
+           grep
+           ijs
+           dbus
+           lcms
+           libjpeg-turbo
+           libpng
+           libtiff
+           glib
+           qpdf
+           poppler
+           cups-minimal))
     (home-page "https://wiki.linuxfoundation.org/openprinting/cups-filters")
     (synopsis "OpenPrinting CUPS filters and backends")
     (description
@@ -254,84 +248,84 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
 (define-public cups-minimal
   (package
     (name "cups-minimal")
-    (version "2.3.3op2")
+    (version "2.4.2")
     (source
      (origin
        (method git-fetch)
-       ;; Version maintained by the OpenPrinting organization, NOT a fork.  The
-       ;; CUPS author tracks the current Apple CUPS sources and includes common
-       ;; changes and bug fixes for GNU/Linux.  See its README and for example
-       ;; <https://github.com/apple/cups/issues/5917#issuecomment-819465891>.
        (uri (git-reference
              (url "https://github.com/OpenPrinting/cups")
              (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
+       ;; Avoid NAME confusion: these are the complete CUPS sources.
+       (file-name (git-file-name "cups" version))
        (sha256
-        (base32 "126d6kd3pkhmsvbcflkcpk3y30iqlkdqyvrk9aqq88vbxzjd5ia6"))))
+        (base32 "01nn6ij7kpf2vzikinn7mk4crjx4ab8m4pplvsccc8gg30a2q9y9"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
-       '("--disable-launchd"
-         "--disable-systemd"
-         "--disable-avahi"
-         "--disable-dnssd")
-       ;; Seven tests fail, mostly because of files that are provided by the
-       ;; cups-filters package.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'never-cupsAdminGetServerSettings
-           ;; Instead of querying the daemon directly, this part of CUPS assumes
-           ;; that (1) it has access to a cupsd.conf under CUPS_SERVERROOT, and
-           ;; (2) the file's contents apply to the running daemon.  (1) is false
-           ;; at least on Guix Systems resulting in extremely long delays when
-           ;; loading the Web interface's /admin page.  (2) isn't valid anywhere
-           ;; because it ignores, e.g., -c FILE.
-           ;; Upstream considers this code on ‘life support’ so just neuter it.
-	   (lambda _
-	     (substitute* "cgi-bin/admin.c"
-	       (("!cupsAdminGetServerSettings" match)
-		(string-append "0 && " match)))))
-         (add-after 'unpack 'remove-Web-UI-server-settings
-           ;; The /admin page's server configuration form is questionable for
-           ;; the same reason as cupsAdminGetServerSettings, and won't work at
-           ;; all on Guix Systems.  Remove it entirely.
-           (lambda _
-             ;; SUBSTITUTE* and a patch both have (dis)advantages.  This is
-             ;; shorter & should ensure that no translation is forgotten.
-             (substitute* (find-files "templates" "^admin\\.tmpl$")
-               ((" class=\"halves\"") "")
-               (("<FORM.* ACTION=\"/jobs.*</FORM>" match)
-                (string-append match "</P>{BROKEN? "))
-               (("</FORM>}" match)
-                (string-append match "}")))))
-         (add-before 'configure 'patch-makedefs
-           (lambda _
-             (substitute* "Makedefs.in"
-               (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
-               (("/bin/sh") (which "sh")))
-             #t))
-         (add-before 'build 'patch-tests
-           (lambda _
-             (substitute* "tools/ippeveprinter.c"
-               (("#  else /\\* HAVE_AVAHI \\*/")
-                "#elif defined(HAVE_AVAHI)"))
-             #t)))))
+     (list #:configure-flags
+           ;; This package isn't maximally minimal: "--with-components=libcups"
+           ;; breaks cups-filters.  Disable some other unnecessary features.
+           #~(list "--without-icondir"
+                   "--without-languages"
+                   "--without-menudir")
+           ;; Seven tests fail, mostly because of files that are provided by the
+           ;; cups-filters package.
+           #:tests? #f
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'never-cupsAdminGetServerSettings
+                 ;; Rather than just ask the daemon, this part of CUPS assumes
+                 ;; that (1) it has access to a cupsd.conf under CUPS_SERVERROOT
+                 ;; and (2) the file's contents apply to the running daemon.
+                 ;; (1) is false at least on Guix Systems resulting in extremely
+                 ;; long delays when loading the Web interface's /admin page.
+                 ;; (2) is never valid: it ignores, e.g., -c FILE.  Upstream
+                 ;; considers this code on ‘life support’ so just neuter it.
+	         (lambda _
+	           (substitute* "cgi-bin/admin.c"
+	             (("!cupsAdminGetServerSettings" match)
+		      (string-append "0 && " match)))))
+               (add-after 'unpack 'remove-Web-UI-server-settings
+                 ;; The /admin page's server configuration form is questionable
+                 ;; for the same reason as cupsAdminGetServerSettings, and won't
+                 ;; work at all on Guix Systems.  Remove it entirely.
+                 (lambda _
+                   ;; SUBSTITUTE* & patches both have (dis)advantages.  This is
+                   ;; shorter & should ensure that no translation is forgotten.
+                   (substitute* (find-files "templates" "^admin\\.tmpl$")
+                     ((" class=\"halves\"") "")
+                     (("<FORM.* ACTION=\"/jobs.*</FORM>" match)
+                      (string-append match "</P>{BROKEN? "))
+                     (("</FORM>}" match)
+                      (string-append match "}")))))
+               (add-before 'configure 'patch-makedefs
+                 (lambda _
+                   (substitute* "Makedefs.in"
+                     (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
+                     (("/bin/sh") (which "sh")))))
+               (add-before 'check 'skip-failing-tests
+                 (lambda _
+                   (substitute* "test/run-stp-tests.sh"
+                     ;; The number of error/warning lines differs, probably due
+                     ;; to a missing font.  Substitute the last observed count.
+                     (("(\\$count != )33" _ prefix)
+                      (string-append prefix "39"))))))))
     (native-inputs
      (list pkg-config))
     (inputs
      (list zlib gnutls))
-    (home-page "https://openprinting.github.io/")
+    (home-page "https://openprinting.github.io/cups")
     (synopsis "The Common Unix Printing System")
     (description
-     "CUPS is a printing system that uses the Internet Printing Protocol
-(@dfn{IPP}).  It provides System V and BSD command-line interfaces, as well
-as a Web interface and a C programming interface to manage printers and print
-jobs.  It supports printing to both local (parallel, serial, USB) and
-networked printers, and printers can be shared from one computer to another.
-Internally, CUPS uses PostScript Printer Description (@dfn{PPD}) files to
-describe printer capabilities and features, and a wide variety of generic and
-device-specific programs to convert and print many types of files.")
+     "CUPS is a printing system that uses @acronym{IPP, the Internet Printing
+Protocol} to talk to printers and network clients.  It also provides the old
+@command{lp} and @command{lpr} commands, a Web interface, and a C programming
+interface to manage printers and print jobs.
+
+CUPS can print to both local (USB, serial, even parallel) and networked
+printers.  Almost any modern printer supports IPP@tie{}Everywhere, sometimes
+sold as AirPrint, and is supported out of the box.  Older printers can be
+supported through legacy PPD-based printer drivers called ``printer
+applications''.  These must be installed separately.")
     ;; CUPS is Apache 2.0 with exceptions, see the NOTICE file.
     (license license:asl2.0)))
 
@@ -341,127 +335,124 @@ device-specific programs to convert and print many types of files.")
     (arguments
      (substitute-keyword-arguments (package-arguments cups-minimal)
        ((#:tests? _ #t)
-        ;; Three tests fail:
-        ;; * two tests in ipp-1.1.test related to "RFC 2911 section 3.2.6:
-        ;;   Get-Jobs Operation"
-        ;; * test of number of error/warning messages, probably related to a
-        ;;   missing font.
-        #f)
-       ((#:configure-flags _ '())
-        `(list "--disable-launchd"
-               "--disable-systemd"))
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-before 'check 'patch-tests
-             (lambda _
-               (let ((filters (assoc-ref %build-inputs "cups-filters"))
-                     (catpath (string-append
-                               (assoc-ref %build-inputs "coreutils") "/bin/"))
-                     (testdir (string-append (getcwd) "/tmp/")))
-                 (mkdir testdir)
-                 (substitute* "test/run-stp-tests.sh"
-                   ((" *BASE=/tmp/") (string-append "BASE=" testdir))
+        #t)
+       ((#:configure-flags flags #~'())
+        #~(append #$flags
+                  (list "--with-languages=all"))) ; no ‘=all’ means none(!)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-before 'check 'patch-tests
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((filters #$(this-package-input "cups-filters"))
+                      (catpath (string-append
+                                #$(this-package-input "coreutils") "/bin/"))
+                      (testdir (string-append (getcwd) "/tmp/")))
+                  (mkdir testdir)
+                  (substitute* "test/run-stp-tests.sh"
+                    ((" *BASE=/tmp/") (string-append "BASE=" testdir))
 
-                   ;; Allow installation of filters from the output directory
-                   ;; and from cups-filters.
-                   (("for dir in /usr/libexec/cups/filter /usr/lib/cups/filter")
-                    (string-append
-                     "for dir in "
-                     (assoc-ref %outputs "out") "/lib/cups/filter "
-                     filters "/lib/cups/filter"))
+                    ;; Allow installation of filters from the output directory
+                    ;; and from cups-filters.
+                    (("for dir in /usr/libexec/cups/filter /usr/lib/cups/filter")
+                     (string-append
+                      "for dir in "
+                      (assoc-ref outputs "out") "/lib/cups/filter "
+                      filters "/lib/cups/filter"))
 
-                   ;; Check for charsets in the default cups-filters output.
-                   (("/usr/share/cups/charsets")
-                    (string-append filters "/share/cups/charsets"))
+                    ;; Check for charsets in the default cups-filters output.
+                    (("/usr/share/cups/charsets")
+                     (string-append filters "/share/cups/charsets"))
 
-                   ;; Install additional required filters.
-                   (("instfilter texttopdf texttopdf pdf")
-                    (string-append
-                     "instfilter texttopdf texttopdf pdf;"
-                     "instfilter imagetoraster imagetoraster raster;"
-                     "instfilter gstoraster gstoraster raster;"
-                     "instfilter urftopdf urftopdf pdf;"
-                     "instfilter rastertopdf rastertopdf pdf;"
-                     "instfilter pstopdf pstopdf pdf"))
+                    ;; Install additional required filters.
+                    (("instfilter texttopdf texttopdf pdf")
+                     (string-append
+                      "instfilter texttopdf texttopdf pdf;"
+                      "instfilter imagetoraster imagetoraster raster;"
+                      "instfilter gstoraster gstoraster raster;"
+                      "instfilter urftopdf urftopdf pdf;"
+                      "instfilter rastertopdf rastertopdf pdf;"
+                      "instfilter pstopdf pstopdf pdf"))
 
-                   ;; Specify the location of the lpstat binary.
-                   (("description=\"`lpstat -l")
-                    "description=\"`../systemv/lpstat -l")
+                    ;; Specify the location of the lpstat binary.
+                    (("description=\"`lpstat -l")
+                     "description=\"`../systemv/lpstat -l")
 
-                   ;; Patch the shebangs of embedded scripts.
-                   (("#!/bin/sh") (string-append "#!" (which "sh")))
+                    ;; Patch the shebangs of embedded scripts.
+                    (("#!/bin/sh") (string-append "#!" (which "sh")))
 
-                   ;; Also link MIME definitions from cups-filters
-                   ;; to enable the additional filters for the test suite.
-                   (("ln -s \\$root/conf/mime\\.types")
-                    (string-append
-                     "ln -s " filters
-                     "/share/cups/mime/cupsfilters.types $BASE/share/mime; "
-                     "ln -s $root/conf/mime.types"))
-                   (("ln -s \\$root/conf/mime\\.convs")
-                    (string-append
-                     "ln -s " filters
-                     "/share/cups/mime/cupsfilters.convs $BASE/share/mime; "
-                     "ln -s $root/conf/mime.convs")))
+                    ;; Also link MIME definitions from cups-filters
+                    ;; to enable the additional filters for the test suite.
+                    (("ln -s \\$root/conf/mime\\.types")
+                     (string-append
+                      "ln -s " filters
+                      "/share/cups/mime/cupsfilters.types $BASE/share/mime; "
+                      "ln -s $root/conf/mime.types"))
+                    (("ln -s \\$root/conf/mime\\.convs")
+                     (string-append
+                      "ln -s " filters
+                      "/share/cups/mime/cupsfilters.convs $BASE/share/mime; "
+                      "ln -s $root/conf/mime.convs")))
 
-                 ;; Fix the search path for the "cat" command.
-                 (substitute* "cups/testfile.c"
-                   (("cupsFileFind\\(\"cat\", \"/bin\"")
-                    (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
-                   (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
-                    (string-append "cupsFileFind(\"cat\", \"" catpath "\""))))))
-           (add-after 'install 'install-cups-filters-symlinks
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out"))
-                     (cups-filters (assoc-ref inputs "cups-filters")))
-                 ;; Charsets.
-                 (symlink
-                  (string-append cups-filters "/share/cups/charsets")
-                  (string-append out "/share/charsets"))
+                  ;; Fix the search path for the "cat" command.
+                  (substitute* "cups/testfile.c"
+                    (("cupsFileFind\\(\"cat\", \"/bin\"")
+                     (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
+                    (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
+                     (string-append "cupsFileFind(\"cat\", \"" catpath "\""))))))
+            (add-after 'install 'install-cups-filters-symlinks
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (let ((out (assoc-ref outputs "out"))
+                      (cups-filters #$(this-package-input "cups-filters")))
+                  ;; Charsets.
+                  (symlink
+                   (string-append cups-filters "/share/cups/charsets")
+                   (string-append out "/share/charsets"))
 
-                 ;; MIME types, driver files, and PPDs.
-                 (for-each
-                  (lambda (f)
-                    (symlink (string-append cups-filters f)
-                             (string-append out f)))
-                  '("/share/cups/mime/cupsfilters.types"
-                    "/share/cups/mime/cupsfilters.convs"
-                    "/share/cups/drv/cupsfilters.drv"
-                    "/share/ppd"))
+                  ;; MIME types, driver files, and PPDs.
+                  (for-each
+                   (lambda (f)
+                     (symlink (string-append cups-filters f)
+                              (string-append out f)))
+                   '("/share/cups/mime/cupsfilters.types"
+                     "/share/cups/mime/cupsfilters.convs"
+                     "/share/cups/drv/cupsfilters.drv"
+                     "/share/ppd"))
 
-                 ;; Filters.
-                 (for-each
-                  (lambda (f)
-                    (symlink f
-                             (string-append out "/lib/cups/filter"
-                                            (basename f))))
-                  (find-files (string-append cups-filters "/lib/cups/filter")))
+                  ;; Filters.
+                  (for-each
+                   (lambda (f)
+                     (symlink f
+                              (string-append out "/lib/cups/filter"
+                                             (basename f))))
+                   (find-files (string-append cups-filters "/lib/cups/filter")))
 
-                 ;; Backends.
-                 (for-each
-                  (lambda (f)
-                    (symlink (string-append cups-filters f)
-                             (string-append out "/lib/cups/backend/"
-                                            (basename f))))
-                  '("/lib/cups/backend/parallel"
-                    "/lib/cups/backend/serial"))
+                  ;; Backends.
+                  (for-each
+                   (lambda (f)
+                     (symlink (string-append cups-filters f)
+                              (string-append out "/lib/cups/backend/"
+                                             (basename f))))
+                   '("/lib/cups/backend/parallel"
+                     "/lib/cups/backend/serial"))
 
-                 ;; Banners.
-                 (let ((banners "/share/cups/banners"))
-                   (delete-file-recursively (string-append out banners))
-                   (symlink (string-append cups-filters banners)
-                            (string-append out banners)))
+                  ;; Banners.
+                  (let ((banners "/share/cups/banners"))
+                    (delete-file-recursively (string-append out banners))
+                    (symlink (string-append cups-filters banners)
+                             (string-append out banners)))
 
-                 ;; Assorted data.
-                 (let ((data "/share/cups/data"))
-                   (delete-file-recursively (string-append out data))
-                   (symlink (string-append cups-filters data)
-                            (string-append out data))))))))))
+                  ;; Assorted data.
+                  (let ((data "/share/cups/data"))
+                    (delete-file-recursively (string-append out data))
+                    (symlink (string-append cups-filters data)
+                             (string-append out data))))))))))
     (inputs
-     `(("avahi" ,avahi)
-       ("gnutls" ,gnutls)
-       ("cups-filters" ,cups-filters)
-       ("zlib"  ,zlib)))))
+     (list avahi
+           coreutils
+           cups-filters
+           gnutls
+           linux-pam
+           zlib))))
 
 (define-public cups-pk-helper
   (package
@@ -492,7 +483,7 @@ device-specific programs to convert and print many types of files.")
     (native-inputs
      (list intltool pkg-config `(,glib "bin")))
     (inputs
-     (list glib polkit-duktape cups-minimal))
+     (list glib polkit cups-minimal))
     (home-page "https://www.freedesktop.org/wiki/Software/cups-pk-helper/")
     (synopsis "PolicyKit helper to configure CUPS with fine-grained privileges")
     (description
@@ -504,14 +495,14 @@ should only be used as part of the Guix cups-pk-helper service.")
 (define-public hplip
   (package
     (name "hplip")
-    (version "3.21.10")
+    (version "3.22.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/hplip/hplip/" version
                                   "/hplip-" version ".tar.gz"))
               (sha256
                (base32
-                "0q3adcp8iygravp4bq4gw14jk20c5rhnawj1333qyw8yvlghw8yy"))
+                "0461pv3hgbmjxrz7y1kplnp1sp97hagzad7gc1qr2h5cqm3ybsbv"))
               (modules '((guix build utils)))
               (snippet
                '(begin
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 45bd2e6d36..f8dc3ce692 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -62,113 +62,81 @@
 
 (define-public curl
   (package
-   (name "curl")
-   (version "7.79.1")
-   (replacement curl-7.84.0)
-   (source (origin
-             (method url-fetch)
-             (uri (string-append "https://curl.se/download/curl-"
-                                 version ".tar.xz"))
-             (sha256
-              (base32
-               "129n9hi7rbg3s112chyadhp4y27ppb5i65n12wm77aw2255zf1h6"))
-             (patches (search-patches "curl-use-ssl-cert-env.patch"))))
-   (build-system gnu-build-system)
-   (outputs '("out"
-              "doc"))                             ;1.2 MiB of man3 pages
-   (inputs (list gnutls libidn mit-krb5
-                 `(,nghttp2 "lib") zlib))
-   (native-inputs
-     `(("nghttp2" ,nghttp2)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python-minimal-wrapper)))
-   (native-search-paths
-    ;; These variables are introduced by curl-use-ssl-cert-env.patch.
-    (list $SSL_CERT_DIR
-          $SSL_CERT_FILE
-          ;; Note: This search path is respected by the `curl` command-line
-          ;; tool only.  Patching libcurl to read it too would bring no
-          ;; advantages and require maintaining a more complex patch.
-          (search-path-specification
-           (variable "CURL_CA_BUNDLE")
-           (file-type 'regular)
-           (separator #f)                         ;single entry
-           (files '("etc/ssl/certs/ca-certificates.crt")))))
-   (arguments
-    `(#:disallowed-references ("doc")
-      #:configure-flags (list "--with-gnutls"
-                              (string-append "--with-gssapi="
-                                             (assoc-ref %build-inputs "mit-krb5"))
-                              "--disable-static")
+    (name "curl")
+    (version "7.85.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://curl.se/download/curl-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1rjbn0h5rddclhvxb8p5gddxszcrpbf5cw1whx6wnj4s9dnlmdc8"))
+              (patches (search-patches "curl-use-ssl-cert-env.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out"
+               "doc"))                  ;1.2 MiB of man3 pages
+    (inputs
+     (list gnutls libidn mit-krb5 `(,nghttp2 "lib") zlib))
+    (native-inputs
+     (list nghttp2 perl pkg-config python-minimal-wrapper))
+    (native-search-paths
+     ;; These variables are introduced by curl-use-ssl-cert-env.patch.
+     (list $SSL_CERT_DIR
+           $SSL_CERT_FILE
+           ;; Note: This search path is respected by the `curl` command-line
+           ;; tool only.  Patching libcurl to read it too would bring no
+           ;; advantages and require maintaining a more complex patch.
+           (search-path-specification
+            (variable "CURL_CA_BUNDLE")
+            (file-type 'regular)
+            (separator #f)              ;single entry
+            (files '("etc/ssl/certs/ca-certificates.crt")))))
+    (arguments
+     (list
+      #:disallowed-references '("doc")
+      #:configure-flags
+      #~(list "--with-gnutls"
+              (string-append "--with-gssapi="
+                             (dirname (dirname
+                                       (search-input-file
+                                        %build-inputs "lib/libgssrpc.so"))))
+              "--disable-static")
       #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'do-not-record-configure-flags
-          (lambda _
-            ;; Do not save the configure options to avoid unnecessary references.
-            (substitute* "curl-config.in"
-              (("@CONFIGURE_OPTIONS@")
-               "\"not available\""))))
-        (add-after
-         'install 'move-man3-pages
-         (lambda* (#:key outputs #:allow-other-keys)
-           ;; Move section 3 man pages to "doc".
-           (let ((out (assoc-ref outputs "out"))
-                 (doc (assoc-ref outputs "doc")))
-             (mkdir-p (string-append doc "/share/man"))
-             (rename-file (string-append out "/share/man/man3")
-                          (string-append doc "/share/man/man3")))))
-        (replace 'check
-          (lambda* (#:key tests? #:allow-other-keys)
-            (substitute* "tests/runtests.pl"
-              (("/bin/sh") (which "sh")))
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'do-not-record-configure-flags
+            (lambda _
+              ;; Do not save the configure options to avoid unnecessary references.
+              (substitute* "curl-config.in"
+                (("@CONFIGURE_OPTIONS@")
+                 "\"not available\""))))
+          (add-after 'install 'move-man3-pages
+            (lambda _
+              ;; Move section 3 man pages to "doc".
+              (mkdir-p (string-append #$output:doc "/share/man"))
+              (rename-file (string-append #$output "/share/man/man3")
+                           (string-append #$output:doc "/share/man/man3"))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (substitute* "tests/runtests.pl"
+                (("/bin/sh") (which "sh")))
 
-            (when tests?
-              ;; The top-level "make check" does "make -C tests quiet-test", which
-              ;; is too quiet.  Use the "test" target instead, which is more
-              ;; verbose.
-              (invoke "make" "-C" "tests" "test")))))))
-   (synopsis "Command line tool for transferring data with URL syntax")
-   (description
-    "curl is a command line tool for transferring data with URL syntax,
+              (when tests?
+                ;; The top-level "make check" does "make -C tests quiet-test", which
+                ;; is too quiet.  Use the "test" target instead, which is more
+                ;; verbose.
+                (invoke "make" "-C" "tests" "test")))))))
+    (synopsis "Command line tool for transferring data with URL syntax")
+    (description
+     "curl is a command line tool for transferring data with URL syntax,
 supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP,
 LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.
 curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP
 form based upload, proxies, cookies, file transfer resume, user+password
 authentication (Basic, Digest, NTLM, Negotiate, kerberos...), proxy
 tunneling, and so on.")
-   (license (license:non-copyleft "file://COPYING"
-                                  "See COPYING in the distribution."))
-   (home-page "https://curl.haxx.se/")))
-
-;; Replacement package with fixes for multiple vulnerabilities.
-;; See <https://curl.se/docs/security.html>.
-(define curl-7.84.0
-  (package
-    (inherit curl)
-    (version "7.84.0")
-    (source (origin
-              (inherit (package-source curl))
-              (uri (string-append "https://curl.se/download/curl-"
-                                  version ".tar.xz"))
-              (sha256
-               (base32
-                "1f2xgj0wvys9xw50h7vcbaraavjr9rxx9n06x2xfbgs7ym1qn49d"))
-              (patches (append (origin-patches (package-source curl))
-                               (search-patches "curl-easy-lock.patch")))))
-    (arguments (substitute-keyword-arguments (package-arguments curl)
-                 ((#:phases phases)
-                  (cond
-                   ((not (target-64bit?))
-                    #~(modify-phases #$phases
-                        (add-after 'unpack 'tweak-lib3026-test
-                          (lambda _
-                            ;; Have that test create a hundred threads, not a
-                            ;; thousand.
-                            (substitute* "tests/libtest/lib3026.c"
-                              (("NUM_THREADS .*$")
-                               "NUM_THREADS 100\n"))))))
-                   (else phases)))))))
+    (license (license:non-copyleft "file://COPYING"
+                                   "See COPYING in the distribution."))
+    (home-page "https://curl.haxx.se/")))
 
 (define-public curl-minimal
   (deprecated-package "curl-minimal" curl))
@@ -178,10 +146,10 @@ tunneling, and so on.")
     (arguments
      (substitute-keyword-arguments (package-arguments curl)
        ((#:configure-flags flags)
-        `(cons "--with-libssh2" ,flags))))
+        #~(cons "--with-libssh2" #$flags))))
     (inputs
-     `(("libssh2" ,libssh2)
-       ,@(package-inputs curl)))
+     (modify-inputs (package-inputs curl)
+       (prepend libssh2)))
     (properties `((hidden? . #t)))))
 
 (define-public kurly
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index 2cd18f3e5e..70d579c127 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,55 +27,48 @@
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages tls)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu))
 
 (define-public cyrus-sasl
   (package
-   (name "cyrus-sasl")
-   (version "2.1.27")
-   (source (origin
-            (method url-fetch)
-            (uri (list (string-append
-                        "https://cyrusimap.org/releases/cyrus-sasl-"
-                        version ".tar.gz")
-                       (string-append
-                        "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-"
-                        version ".tar.gz")))
-            (sha256 (base32
-                     "1m85zcpgfdhm43cavpdkhb1s2zq1b31472hq1w1gs3xh94anp1i6"))
-            (patches (search-patches "cyrus-sasl-ac-try-run-fix.patch"
-                                     "cyrus-sasl-CVE-2019-19906.patch"))))
-   (build-system gnu-build-system)
-   (native-inputs
-     (list autoconf automake libtool))
-   (inputs (list gdbm openssl))
-   (propagated-inputs
-    (list ;; cyrus-sasl.pc refers to -lkrb5, so propagate it.
-          mit-krb5))
-   (arguments
-    '(#:configure-flags (list (string-append "--with-plugindir="
-                                             (assoc-ref %outputs "out")
-                                             "/lib/sasl2"))
+    (name "cyrus-sasl")
+    (version "2.1.28")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/cyrusimap/cyrus-sasl"
+                                  "/releases/download/cyrus-sasl-" version
+                                  "/cyrus-sasl-" version ".tar.gz"))
+              (sha256
+               (base32
+                "135kbgyfpa1mwqp5dm223yr6ddzi4vjm7cr414d7rmhys2mwdkvw"))))
+    (build-system gnu-build-system)
+    (inputs (list gdbm mit-krb5 openssl))
+    (arguments
+     (list
+      #:configure-flags #~(list (string-append "--with-plugindir="
+                                               (assoc-ref %outputs "out")
+                                               "/lib/sasl2")
+                                ;; When cross-compiling the build system is
+                                ;; unable to determine whether SPNEGO is
+                                ;; supported; Kerberos does, so enable it.
+                                #$@(if (%current-target-system)
+                                       '("ac_cv_gssapi_supports_spnego=yes")
+                                       '()))
 
       ;; The 'plugins' directory has shared source files, such as
       ;; 'plugin_common.c'.  When building the shared libraries there, libtool
       ;; ends up doing "ln -s plugin_common.lo plugin_common.o", which can
       ;; fail with EEXIST when building things in parallel.
-      #:parallel-build? #f
-
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'autogen
-          (lambda _
-            (invoke "autoreconf" "-vif"))))))
-   (synopsis "Simple Authentication Security Layer implementation")
-   (description
-    "SASL (Simple Authentication Security Layer) is an Internet
+      #:parallel-build? #f))
+    (synopsis "Simple Authentication Security Layer implementation")
+    (description
+     "SASL (Simple Authentication Security Layer) is an Internet
 standards-track method for remote computers to authenticate.  The Cyrus SASL
 library makes supporting various SASL mechanisms easy for both client and
 server writers.")
-   (license (license:non-copyleft "file://COPYING"
-                                  "See COPYING in the distribution."))
-   (home-page "https://cyrusimap.org/sasl/")))
+    (license (license:non-copyleft "file://COPYING"
+                                   "See COPYING in the distribution."))
+    (home-page "https://cyrusimap.org/sasl/")))
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index e51ddd5bf2..8f439e2df6 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1902,14 +1902,14 @@ changes.")
 (define-public tdb
   (package
     (name "tdb")
-    (version "1.4.5")
+    (version "1.4.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0h8fkblws3d4vf37yhbrbw2nfxg5vk2v3i5mk04hhcbh9y4fvz5w"))))
+                "03n2hz4sv003gpkyp57hk5kiw4xk9f2dkxq75kzk2gskxy6idyx4"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index 2d3cce9e15..19a1b503cf 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -167,14 +167,14 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
 (define-public gdbm
   (package
     (name "gdbm")
-    (version "1.20")
+    (version "1.23")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gdbm/gdbm-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "14m22j0zndd42yc0ps0bcnnjj2iq7agnp66sl882lj5k91bc1sis"))))
+                "1kfapds42j1sjq6wl7fygipw5904wpbfa5kwppj3mwgz44fhicbl"))))
     (arguments `(#:configure-flags '("--enable-libgdbm-compat"
                                      "--disable-static")))
     (build-system gnu-build-system)
diff --git a/gnu/packages/dejagnu.scm b/gnu/packages/dejagnu.scm
index 08be5a8afd..579a1a7a40 100644
--- a/gnu/packages/dejagnu.scm
+++ b/gnu/packages/dejagnu.scm
@@ -1,7 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flasher.co.il>
+;;; Copyright © 2016, 2017, 2022 Efraim Flashner <efraim@flasher.co.il>
 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,60 +23,72 @@
 (define-module (gnu packages dejagnu)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (guix licenses)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages tcl))
 
 (define-public dejagnu
   (package
     (name "dejagnu")
-    (version "1.6.2")
+    (version "1.6.3")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "0qfj2wd4qk1yn9yzam6g8nmyxfazcc0knjyyibycb2ainkhp21hd"))))
+       (method url-fetch)
+       (uri (string-append "mirror://gnu/dejagnu/dejagnu-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "1qx2cv6qkxbiqg87jh217jb62hk3s7dmcs4cz1llm2wmsynfznl7"))))
     (build-system gnu-build-system)
-    (inputs (list expect))
+    (inputs (list bash-minimal expect))
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             ;; Note: The test-suite *requires* /dev/pts among the
-             ;; `build-chroot-dirs' of the build daemon when
-             ;; building in a chroot.  See
-             ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
-             ;; for details.
-             (if (and (directory-exists? "/dev/pts")
-                      (directory-exists? "/proc"))
-                 (begin
-                  ;; Provide `runtest' with a log name, otherwise it
-                  ;; tries to run `whoami', which fails when in a chroot.
-                  (setenv "LOGNAME" "guix-builder")
+     (list
+      ;; Do an out-of-source build to work-around a non-deterministic bug in Expect:
+      ;; <https://lists.gnu.org/archive/html/bug-dejagnu/2021-06/msg00013.html>.
+      #:out-of-source? #true
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-/bin/sh
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; Patch embedded /bin/sh references.
+              (let ((/bin/sh (search-input-file inputs "/bin/sh")))
+                (substitute* "dejagnu"
+                  (("exec /bin/sh")
+                   (string-append "exec " /bin/sh)))
+                (substitute* (find-files "testsuite/report-card.all")
+                  (("/bin/sh") /bin/sh)))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              ;; Note: The test-suite *requires* /dev/pts among the
+              ;; `build-chroot-dirs' of the build daemon when
+              ;; building in a chroot.  See
+              ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036>
+              ;; for details.
+              (when tests?
+                (if (and (directory-exists? "/dev/pts")
+                         (directory-exists? "/proc"))
+                    (begin
+                      ;; Provide `runtest' with a log name, otherwise it
+                      ;; tries to run `whoami', which fails when in a chroot.
+                      (setenv "LOGNAME" "guix-builder")
 
-                  ;; The test-suite needs to have a non-empty stdin:
-                  ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
-                  (unless (zero? (system "make check < /dev/zero"))
-                    (error "make check failed")))
-                 (display "test suite cannot be run, skipping\n"))
-             #t))
-         (add-after 'install 'post-install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Use the right `expect' binary.
-             (let ((out    (assoc-ref outputs "out"))
-                   (expect (assoc-ref inputs "expect")))
-               (substitute* (string-append out "/bin/runtest")
-                 (("^mypath.*$" all)
-                  (string-append all
-                                 "export PATH="
-                                 expect "/bin:$PATH\n")))
-               #t))))))
-    (home-page
-     "https://www.gnu.org/software/dejagnu/")
+                      ;; The test-suite needs to have a non-empty stdin:
+                      ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>.
+                      (unless (zero? (system "make check < /dev/zero"))
+                        (error "make check failed")))
+                    (display "test suite cannot be run, skipping\n")))))
+          (add-after 'install 'post-install
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              ;; Use the right `expect' binary.
+              (let ((expect (search-input-file inputs "/bin/expect")))
+                (substitute* (string-append #$output "/bin/runtest")
+                  (("^mypath.*$" all)
+                   (string-append all
+                                  "export PATH="
+                                  (dirname expect) ":$PATH\n")))))))))
+    (home-page "https://www.gnu.org/software/dejagnu/")
     (synopsis "GNU software testing framework")
     (description
      "DejaGnu is a framework for testing software.  In effect, it serves as
diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index 61df8418e6..0e2ab49ae8 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -35,7 +35,6 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages dbm)
-  #:use-module (gnu packages file)      ;for 'file-next'
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gnome)
@@ -171,11 +170,7 @@
             docx2txt
             dtc
             e2fsprogs
-            ffmpeg
-
-            ;; XXX: Must be the same version as python-magic uses;
-            ;; remove when 'file' is updated.
-            file-next)
+            ffmpeg)
 
       (match (%current-system)
         ;; fpc is only available on x86 currently.
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index dc14cd775a..7ba2ca2a87 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -409,9 +409,7 @@ size and quality.")
                                         " and not test_urls_cache_is_cleared")))
                (format #t "test suite not run~%")))))))
     (native-inputs
-     (list python-django python-setuptools-scm
-           ;; For tests.
-           python-pytest-xdist-next))
+     (list python-django python-setuptools-scm python-pytest-xdist))
     (propagated-inputs
      (list python-pytest))
     (home-page "https://pytest-django.readthedocs.org/")
@@ -1233,7 +1231,7 @@ FileFields during tests.")
                      (invoke "pip" "--no-cache-dir" "--no-input"
                              "install" "--no-deps" "--prefix" #$output whl)))))))
     (native-inputs
-     (list openldap-2.6 python-wheel python-setuptools-scm python-toml
+     (list openldap python-wheel python-setuptools-scm python-toml
 
            ;; These can be removed after <https://bugs.gnu.org/46848>.
            python-pypa-build python-pip))
diff --git a/gnu/packages/djvu.scm b/gnu/packages/djvu.scm
index 10974c93cb..00066f82ea 100644
--- a/gnu/packages/djvu.scm
+++ b/gnu/packages/djvu.scm
@@ -151,7 +151,6 @@ a continuous layout.")
        (sha256
         (base32 "0c595yziz81c9izf9s5sskd00qmgz2n1hp2vdcgg0dx81g3xfidb"))))
     (build-system gnu-build-system)
-    (arguments (list #:tests? #f))      ;requires Python 2
     (native-inputs (list gettext-minimal pkg-config))
     (inputs
      (list djvulibre
@@ -160,6 +159,20 @@ a continuous layout.")
            poppler
            poppler-data
            `(,util-linux "lib")))       ;for libuuid
+    (arguments
+     `(#:test-target "test"
+       #:tests? #f                                ;requires Python 2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests
+           (lambda _
+             (substitute* "tests/test-xmp-broken.py"
+               ;; Error message changed in recent versions of XML parser
+               (("XML parsing failure")
+                "Error in XMLValidator"))))
+         (add-before 'check 'set-home-for-tests
+           (lambda _
+             (setenv "HOME" "/tmp"))))))
     (synopsis "PDF to DjVu converter")
     (description
      "@code{pdf2djvu} creates DjVu files from PDF files.
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 8d4892b93b..c989c8e75e 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -155,7 +155,8 @@ by no means limited to these applications.)  This package provides XML DTDs.")
                 "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
 
 (define-public docbook-xml-4.1.2
-  (package (inherit docbook-xml)
+  (package
+    (inherit docbook-xml)
     (version "4.1.2")
     (source (origin
               (method url-fetch)
@@ -169,79 +170,33 @@ by no means limited to these applications.)  This package provides XML DTDs.")
        #:builder
        (begin
          (use-modules (guix build utils))
-         (let ((source (assoc-ref %build-inputs "source"))
-               (unzip  (string-append (assoc-ref %build-inputs "unzip")
-                                      "/bin/unzip"))
-               (dtd    (string-append (assoc-ref %outputs "out")
-                                      "/xml/dtd/docbook")))
+         (let* ((source (assoc-ref %build-inputs "source"))
+                (unzip  (string-append (assoc-ref %build-inputs "unzip")
+                                       "/bin/unzip"))
+                (xmlcatalog  (string-append (assoc-ref %build-inputs "libxml2")
+                                            "/bin/xmlcatalog"))
+                (dtd    (string-append (assoc-ref %outputs "out")
+                                       "/xml/dtd/docbook"))
+                (catalog.xml (string-append dtd "/catalog.xml")))
            (mkdir-p dtd)
-           (invoke unzip source "-d" dtd)))))))
+           (invoke unzip source "-d" dtd)
+           ;; Create a minimal XML catalog, to use with libxml2 tools.
+           (invoke xmlcatalog "--noout" "--create" catalog.xml)
+           (invoke xmlcatalog "--noout" "--add" "public"
+                   "-//OASIS//DTD DocBook XML V4.1.2//EN"
+                   (string-append dtd "/docbookx.dtd") catalog.xml)))))
+    (native-inputs (list libxml2 unzip))))
 
+;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be
+;;; generated incorrectly and embed raw nroff syntax such as '.PP' when there
+;;; is a namespace/non-namespace mismatch between the sources and the
+;;; stylesheets used (see:
+;;; https://github.com/docbook/xslt10-stylesheets/issues/109).
 (define-public docbook-xsl
-  (package
-    (name "docbook-xsl")
-    (version "1.79.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/docbook/xslt10-stylesheets"
-                                  "/releases/download/release%2F" version
-                                  "/docbook-xsl-" version ".tar.bz2"))
-              (patches (search-patches "docbook-xsl-support-old-url.patch"
-                                       "docbook-xsl-nonrecursive-string-subst.patch"))
-              (sha256
-               (base32
-                "0wd33z41kdsybyx3ay21w6bdlmgpd9kyn3mr5y520lsf8km28r9i"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  (for-each delete-file (find-files "." "\\.jar$"))
-                  #t))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:builder (begin
-                   (use-modules (guix build utils))
-
-                   (define name-version
-                     (string-append ,name "-" ,version))
-
-                   (let* ((bzip2  (assoc-ref %build-inputs "bzip2"))
-                          (xz     (assoc-ref %build-inputs "xz"))
-                          (tar    (assoc-ref %build-inputs "tar"))
-                          (source (assoc-ref %build-inputs "source"))
-                          (out    (assoc-ref %outputs "out"))
-                          (xsl    (string-append out "/xml/xsl")))
-                     (setenv "PATH" (string-append bzip2 "/bin" ":" xz "/bin"))
-                     (invoke (string-append tar "/bin/tar") "xvf" source)
-
-                     (mkdir-p xsl)
-                     (copy-recursively name-version
-                                       (string-append xsl "/" name-version))
-
-                     (substitute* (string-append xsl "/" name-version "/catalog.xml")
-                       (("rewritePrefix=\"./")
-                        (string-append "rewritePrefix=\"file://" xsl "/"
-                                       name-version "/")))
-                     #t))
-       #:modules ((guix build utils))))
-    (native-inputs (list bzip2 xz ;needed for repacked tarballs
-                         tar))
-    (home-page "https://docbook.org")
-    (synopsis "DocBook XSL style sheets for document authoring")
-    (description
-     "This package provides XSL style sheets for DocBook.")
-    (license (license:x11-style "" "See 'COPYING' file."))))
-
-;;; TODO: Make this the default docbook-xsl on core-updates.  There's an issue
-;;; in docbook-xsl 1.79.2 that causes manpages to be generated incorrectly and
-;;; embed raw nroff syntax such as '.PP' when there is a
-;;; namespace/non-namespace mismatch between the sources and the stylesheets
-;;; used (see: https://github.com/docbook/xslt10-stylesheets/issues/109).
-(define-public docbook-xsl-next
   (let ((commit "fe16c90013b64e316c3e21ef92d1e8813c10f88c")
         (revision "0")
-        (base-version (package-version docbook-xsl)))
+        (base-version "1.79.2"))
     (package
-      (inherit docbook-xsl)
       (name "docbook-xsl")
       (version (git-version base-version revision commit))
       (source (origin
@@ -323,7 +278,12 @@ by no means limited to these applications.)  This package provides XML DTDs.")
       (native-inputs (list libxml2
                            libxslt
                            perl
-                           perl-xml-xpath)))))
+                           perl-xml-xpath))
+      (home-page "https://docbook.org")
+      (synopsis "DocBook XSL style sheets for document authoring")
+      (description
+       "This package provides XSL style sheets for DocBook.")
+      (license (license:x11-style "" "See 'COPYING' file.")))))
 
 (define-public docbook-xsl-1.79.1
   (package
@@ -581,29 +541,25 @@ the in DocBook SGML DTDs.")
                                              texlive-latex-changebar
                                              texlive-latex-colortbl
                                              texlive-latex-fancybox
-                                             texlive-latex-fancyhdr
-                                             texlive-latex-fancyvrb
+                                             texlive-fancyhdr
+                                             texlive-fancyvrb
                                              texlive-latex-float
                                              texlive-latex-footmisc
                                              texlive-hyperref
                                              texlive-latex-jknapltx
-
-                                             ;; TODO: Use non-deprecated name on
-                                             ;; next rebuild cycle.
-                                             texlive-latex-listings
-
+                                             texlive-listings
                                              texlive-latex-multirow
                                              texlive-latex-overpic
-                                             texlive-latex-pdfpages
-                                             texlive-latex-refcount
-                                             texlive-latex-subfigure
-                                             texlive-latex-titlesec
+                                             texlive-pdfpages
+                                             texlive-refcount
+                                             texlive-subfigure
+                                             texlive-titlesec
                                              texlive-wasysym
 
                                              texlive-fonts-rsfs
                                              texlive-stmaryrd
 
-                                             texlive-generic-iftex)))
+                                             texlive-iftex)))
        ("imagemagick" ,imagemagick)     ;for convert
        ("inkscape" ,inkscape/stable)    ;for svg conversion
        ("docbook" ,docbook-xml)
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index a372e1a6ca..4cf3a2ca4c 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.counoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -185,48 +185,51 @@ markup) can be customized and extended by the user.")
 (define-public doxygen
   (package
     (name "doxygen")
-    (version "1.9.1")
+    (version "1.9.5")
     (home-page "https://www.doxygen.nl/")
     (source (origin
-             (method url-fetch)
-             (uri (list (string-append home-page "files/doxygen-"
-                                       version ".src.tar.gz")
-                        (string-append "mirror://sourceforge/doxygen/rel-"
-                                       version "/doxygen-" version
-                                       ".src.tar.gz")))
-             (sha256
-              (base32
-               "1lcif1qi20gf04qyjrx7x367669g17vz2ilgi4cmamp1whdsxbk7"))))
+              (method url-fetch)
+              (uri (list (string-append home-page "files/doxygen-"
+                                        version ".src.tar.gz")
+                         (string-append "mirror://sourceforge/doxygen/rel-"
+                                        version "/doxygen-" version
+                                        ".src.tar.gz")))
+              (sha256
+               (base32
+                "1v1f9cp5lyymg7xmw0ldnzi7ql8agbaqam1xdyljk0lrbnrm9d2m"))))
     (build-system cmake-build-system)
     (native-inputs
-     (list bison flex libxml2 ;provides xmllint for the tests
-           python))             ;for creating the documentation
+     (list bison
+           flex
+           libxml2                      ;provides xmllint for the tests
+           python))                     ;for creating the documentation
     (inputs
-     `(("bash" ,bash-minimal)))
+     (list bash-minimal))
     (arguments
      ;; Force cmake to use iconv header from cross-libc instead of the one
      ;; from native libc.
-     `(,@(if (%current-target-system)
-             '(#:configure-flags
-               (list (string-append "-DICONV_INCLUDE_DIR="
-                                    (assoc-ref %build-inputs "cross-libc")
-                                    "/include")))
-             '())
-       #:test-target "tests"
-       #:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'disable-bibtex-test
-                    (lambda _
-                      ;; Disable test that requires bibtex to avoid a
-                      ;; circular dependency.
-                      (for-each delete-file-recursively
-                                '("testing/012" "testing/012_cite.dox"))))
-                  (add-before 'configure 'patch-sh
-                              (lambda* (#:key inputs #:allow-other-keys)
-                                (substitute* "src/portable.cpp"
-                                  (("/bin/sh")
-                                   (string-append
-                                    (assoc-ref inputs "bash") "/bin/sh")))
-                                #t)))))
+     (list
+      #:configure-flags
+      (if (%current-target-system)
+          #~(list (string-append "-DICONV_INCLUDE_DIR="
+                                 (assoc-ref %build-inputs "cross-libc")
+                                 "/include"))
+          #~'())
+      #:test-target "tests"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-bibtex-test
+            (lambda _
+              ;; Disable test that requires bibtex to avoid a
+              ;; circular dependency.
+              (for-each delete-file-recursively
+                        '("testing/012" "testing/012_cite.dox"))))
+          (add-before 'configure 'patch-sh
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((/bin/sh (search-input-file inputs "/bin/sh")))
+                (substitute* "src/portable.cpp"
+                  (("/bin/sh")
+                   /bin/sh))))))))
     (synopsis "Generate documentation from annotated sources")
     (description "Doxygen is the de facto standard tool for generating
 documentation from annotated C++ sources, but it also supports other popular
diff --git a/gnu/packages/ed.scm b/gnu/packages/ed.scm
index a42ba40102..31c41fa5ef 100644
--- a/gnu/packages/ed.scm
+++ b/gnu/packages/ed.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2019, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,31 +22,31 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages compression))
 
 (define-public ed
   (package
     (name "ed")
-    (version "1.17")
+    (version "1.18")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/ed/ed-"
                                  version ".tar.lz"))
              (sha256
               (base32
-               "0m2yrkfjjraakxr98nsiakqrn351h99n706x9asgmdi57j43kpki"))))
+               "0krb8rsb0cd8mgz0c5pqgnjbbrj7zjl7mf9099r8gi80k2nyza5c"))))
     (build-system gnu-build-system)
     (native-inputs (list lzip))
     (arguments
-     '(#:configure-flags '("CC=gcc")
+     `(#:configure-flags (list ,(string-append "CC=" (cc-for-target)))
        #:phases
        (modify-phases %standard-phases
          (add-before 'patch-source-shebangs 'patch-test-suite
                      (lambda _
                        (substitute* "testsuite/check.sh"
-                         (("/bin/sh") (which "sh")))
-                       #t)))))
+                         (("/bin/sh") (which "sh"))))))))
     (home-page "https://www.gnu.org/software/ed/")
     (synopsis "Line-oriented text editor")
     (description
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index cb9393eab0..6ef09399d4 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -50,14 +50,14 @@
 (define-public elfutils
   (package
     (name "elfutils")
-    (version "0.183")
+    (version "0.187")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://sourceware.org/elfutils/ftp/"
                                   version "/elfutils-" version ".tar.bz2"))
               (sha256
                (base32
-                "1igjfia9x8h6fmh9nbl8mpz0i24my5iixrji99qmi79hilh7qqy3"))
+                "1j2lsicm3dkj5n6spszr9qy5rqm48bqimmz03x6hry8hwvxhs2z7"))
               (patches (search-patches "elfutils-tests-ptrace.patch"))))
     (build-system gnu-build-system)
 
@@ -109,7 +109,7 @@
              '()))))
 
     (native-inputs (list m4))
-    (inputs (list zlib))
+    (inputs (list xz zlib))
     (home-page "https://sourceware.org/elfutils/")
     (synopsis "Collection of utilities and libraries to handle ELF files and
 DWARF data")
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a27b364a05..f30e6c7bee 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -346,7 +346,7 @@
            libpng
            zlib
            (if (target-x86-64?)
-               librsvg-bootstrap
+               librsvg
                librsvg-2.40)
            libxpm
            libxml2
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index bc5bb41fb3..fcb650bf40 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
 ;;; Copyright © 2017, 2018, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2019-2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
@@ -1585,13 +1585,18 @@ compatible directories.")
 (define-public python-dropbox
   (package
     (name "python-dropbox")
-    (version "11.33.0")
+    (version "11.36.0")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "dropbox" version))
         (sha256
-         (base32 "1hd9gprvcr6h0p8fxhynf97qf6799whfpsmr73g619392598nqvw"))))
+         (base32 "0iwbi1qdw9qr7isa37yys582am59k80dqrwvm6s0afdwv0ifa343"))
+        (snippet
+         '(begin
+            (use-modules (guix build utils))
+            (substitute* "setup.py"
+              (("pytest-runner == 5\\.2\\.0") "pytest-runner"))))))
     (build-system python-build-system)
     (arguments '(#:tests? #f))  ; Tests require a network connection.
     (native-inputs
diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm
index 5e379d888b..3f870d84a1 100644
--- a/gnu/packages/file.scm
+++ b/gnu/packages/file.scm
@@ -1,9 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016-2018, 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
 ;;;
@@ -32,14 +31,14 @@
 (define-public file
   (package
     (name "file")
-    (version "5.39")
+    (version "5.44")
     (source (origin
               (method url-fetch)
-              (uri (string-append "ftp://ftp.astron.com/pub/file/file-"
+              (uri (string-append "http://ftp.astron.com/pub/file/file-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1lgs2w2sgamzf27kz5h7pajz7v62554q21fbs11n4mfrfrm2hpgh"))))
+                "0fsz8wld09qai2qghphmwn69ni9m23razj3wip5k3j6vm3xwfl9p"))))
    (build-system gnu-build-system)
 
    ;; When cross-compiling, this package depends upon a native install of
@@ -47,9 +46,6 @@
    (native-inputs (if (%current-target-system)
                       `(("self" ,this-package))
                       '()))
-
-   (properties
-    `((release-monitoring-url . "http://ftp.astron.com/pub/file/")))
    (synopsis "File type guesser")
    (description
     "The file command is a file type guesser, a command-line tool that tells
@@ -58,15 +54,3 @@ extensions to tell you the type of a file, but looks at the actual contents
 of the file.  This package provides the libmagic library.")
    (license bsd-2)
    (home-page "https://www.darwinsys.com/file/")))
-
-(define-public file-next
-  (package
-    (inherit file)
-    (version "5.41")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://ftp.astron.com/pub/file/file-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "0gv027jgdr0hdkw7m9ck0nwhq583f4aa7vnz4dzdbxv4ng3k5r8k"))))))
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 3f3fc078f0..c2989a4fb1 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2015, 2016, 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2016, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@ -120,6 +120,7 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
@@ -1038,17 +1039,38 @@ settings.")
 of Bitcoin BIP-0039.")
     (license license:expat)))
 
+(define-public python-u2flib-host
+  ;; The package is obsolete and superseded by python-fido2, but
+  ;; needed for python-ledgerblue@0.1.44.
+  (package
+    (name "python-u2flib-host")
+    (version "3.0.3")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "python-u2flib-host" version))
+              (sha256
+               (base32
+                "02pwafd5kyjpc310ys0pgnd0adff1laz18naxxwsfrllqafqnrxb"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-hidapi python-requests))
+    (native-inputs (list python-cryptography))
+    (home-page "https://github.com/Yubico/python-u2flib-host")
+    (synopsis "Python based U2F host library")
+    (description
+     "The package provides library functionality for communicating with a U2F device over USB.")
+    (license license:bsd-2)))
+
 (define-public python-ledgerblue
   (package
     (name "python-ledgerblue")
-    (version "0.1.16")
+    (version "0.1.44")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "ledgerblue" version))
         (sha256
           (base32
-            "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
+            "0nbfa5i9ww7jsfc8cgy0r229pq2a1vj4xvn8mz0nxl7mx1wykqm4"))))
     (build-system python-build-system)
     (propagated-inputs
      (list python-ecpy
@@ -1056,7 +1078,10 @@ of Bitcoin BIP-0039.")
            python-hidapi
            python-pillow
            python-protobuf
-           python-pycrypto))
+           python-pycryptodomex
+           python-pyscard
+           python-u2flib-host
+           python-websocket-client))
     (home-page "https://github.com/LedgerHQ/blue-loader-python")
     (synopsis "Python library to communicate with Ledger Blue/Nano S")
     (description "@code{ledgerblue} is a Python library to communicate with
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 5d159208dd..89f2dc4ad3 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -807,7 +807,7 @@ OpenType variant of these fonts.")
                    (replace 'install
                      (assoc-ref font:%standard-phases 'install)))))
     (native-inputs
-     (list python-fonttools-next
+     (list python-fonttools
            python-glyphsets
            python-pcpp
            python-opentype-sanitizer
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 5638560b9e..9d0d23f9c8 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -2,13 +2,13 @@
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017, 2020, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2020, 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017, 2018, 2020–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -85,19 +85,38 @@
 (define-public freetype
   (package
    (name "freetype")
-   (version "2.10.4")
+   (version "2.13.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://savannah/freetype/freetype-"
                           version ".tar.xz"))
       (sha256
-       (base32 "112pyy215chg7f7fmp2l9374chhhpihbh8wgpj5nj6avj3c59a46"))))
+       (base32 "0k32jaaz4pfhw34xwr6a38fncrpwr9fn5ij35m5w4dkn0jykmqjy"))))
    (build-system gnu-build-system)
    (arguments
     ;; The use of "freetype-config" is deprecated, but other packages still
     ;; depend on it.
-    `(#:configure-flags (list "--enable-freetype-config")))
+    `(#:configure-flags (list "--enable-freetype-config")
+      #:disallowed-references (,pkg-config)
+      #:phases
+      ;; TODO: Keep only the first variant on the next core rebuild cycle.
+      ,(if (%current-target-system)
+           '(modify-phases %standard-phases
+              (add-after 'install 'remove-reference-to-pkg-config
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((out (assoc-ref outputs "out")))
+                    (substitute* (string-append out "/bin/freetype-config")
+                      (("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)pkg-config"
+                        _ store target)
+                       "pkg-config"))))))
+           '(modify-phases %standard-phases
+              (add-after 'install 'remove-reference-to-pkg-config
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((out (assoc-ref outputs "out")))
+                    (substitute* (string-append out "/bin/freetype-config")
+                      (((search-input-file inputs "/bin/pkg-config"))
+                       "pkg-config")))))))))
    (native-inputs
     (list pkg-config))
    (propagated-inputs
@@ -112,7 +131,7 @@ It supports both bitmap and scalable formats, including TrueType, OpenType,
 Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others.  It supports high-speed
 anti-aliased glyph bitmap generation with 256 gray levels.")
    (license license:freetype)           ; some files have other licenses
-   (home-page "https://www.freetype.org/")))
+   (home-page "https://freetype.org/")))
 
 (define-public opentype-sanitizer
   (package
@@ -265,7 +284,7 @@ them as it goes.")
            python-booleanoperations
            python-defcon
            python-fontmath
-           python-fonttools-next
+           python-fonttools
            python-lxml
            python-tqdm
            python-ufonormalizer
@@ -467,7 +486,7 @@ converts any cubic curves to quadratic.  The most useful function is probably
            python-compreffor
            python-cu2qu
            python-defcon
-           python-fonttools-next
+           python-fonttools
            python-skia-pathops
            python-ufolib2))
     (home-page "https://github.com/googlefonts/ufo2ft")
@@ -613,7 +632,7 @@ process.  FontParts is the successor of RoboFab.")
            python-xmldiff))
     (propagated-inputs
      (list python-defcon
-           python-fonttools-next
+           python-fonttools
            python-openstep-plist
            python-ufolib2
            python-ufo2ft
@@ -771,7 +790,7 @@ suite of the @code{psautohint} package.")
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
                 (invoke "pytest" "-vv")))))))
-    (propagated-inputs (list python-fonttools-next))
+    (propagated-inputs (list python-fonttools))
     (native-inputs
      (list psautohint-font-data
            python-fs
@@ -1134,14 +1153,14 @@ Font Format (WOFF).")
   (hidden-package
    (package
      (name "fontconfig-minimal")
-     (version "2.13.94")
+     (version "2.14.0")
      (source (origin
                (method url-fetch)
                (uri (string-append
                      "https://www.freedesktop.org/software/"
                      "fontconfig/release/fontconfig-" version ".tar.xz"))
                (sha256 (base32
-                        "0g004r0bkkqz00mpm3svnnxn7d83158q0yb9ggxryizxfg5m5w55"))
+                        "1b4v1r94ri44p4a3kbwd38ig5jgdgcfgwdfm6fqzvfvlki6bignw"))
                (patches (search-patches "fontconfig-cache-ignore-mtime.patch"))))
      (build-system gnu-build-system)
      ;; In Requires or Requires.private of fontconfig.pc.
@@ -1454,14 +1473,14 @@ definitions.")
 (define-public fontforge
   (package
    (name "fontforge")
-   (version "20201107")
+   (version "20220308")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://github.com/fontforge/fontforge/releases/download/"
                   version "/fontforge-" version ".tar.xz"))
             (sha256
-             (base32 "0y3c8x1i6yf6ak9m5dhr1nldgfmg7zhnwdfd57ffs698c27vmg38"))))
+             (base32 "0ncfc4ajwy4ng6b6h79w52jh9z3lngvf3f3ldi1wzkhcg9zh3r01"))))
    (build-system cmake-build-system)
    (native-inputs
     (list pkg-config))
@@ -1479,7 +1498,6 @@ definitions.")
              ("libspiro"        ,libspiro)
              ("libtiff"         ,libtiff)
              ("libungif"        ,libungif)
-             ("libuninameslist" ,libuninameslist)
              ("libxft"          ,libxft)
              ("libxml2"         ,libxml2)
              ("pango"           ,pango)
@@ -1548,8 +1566,9 @@ generate bitmaps.")
         `(modify-phases ,phases
            (delete 'do-not-override-RPATH)))))
     (inputs
-     `(("python" ,python-2)
-       ,@(alist-delete "python" (package-inputs fontforge))))))
+     (modify-inputs (package-inputs fontforge)
+       (prepend libuninameslist)
+       (replace "python" python-2)))))
 
 (define-public python-statmake
   (package
@@ -1593,7 +1612,7 @@ generate bitmaps.")
     (propagated-inputs
      (list python-attrs
            python-cattrs
-           python-fonttools-next))
+           python-fonttools))
     (home-page "https://github.com/daltonmaag/statmake")
     (synopsis "Apply OpenType STAT information to a variable font")
     (description
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 40edcfdab4..fe5e243729 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -29,8 +29,9 @@
 ;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2021, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
-;;; Copyright © 2022 muradm <mail@muradm.net>
+;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2022 muradm <mail@muradm.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -732,6 +733,13 @@ the freedesktop.org XDG Base Directory specification.")
              (substitute* "meson.build"
                (("join_paths\\(bindir, 'pkttyagent'\\)")
                 "'\"/run/current-system/profile/bin/pkttyagent\"'"))))
+         (add-after 'unpack 'use-global-hook-directory
+           ;; XXX There is no run-time setting to set this per-process, only a
+           ;; build-time, hard-coded list of global directories.
+           (lambda _
+             (substitute* (list "src/login/elogind-dbus.c"
+                                "src/sleep/sleep.c")
+               (("PKGSYSCONFDIR") "\"/etc/elogind\""))))
          (add-after 'unpack 'adjust-tests
            (lambda _
              ;; Skip the following test, which depends on users such as 'root'
@@ -996,7 +1004,14 @@ with localed.  This package is extracted from the broader systemd package.")
                                   ".tar.xz"))
               (sha256
                (base32
-                "09md23m4fw87x264mls1f5isrswk6iw7y9g4hr1nib008wbbk370"))))
+                "09md23m4fw87x264mls1f5isrswk6iw7y9g4hr1nib008wbbk370"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (substitute* "contrib/meson.build"
+                    (("bash_.*_dep\\.get_.*\\('completionsdir', .*\\)")
+                     "join_paths(get_option('prefix'), 'share',
+                                 'bash-completion', 'completions')"))))))
     (build-system meson-build-system)
     (arguments
      (list #:tests? #f
@@ -1177,14 +1192,15 @@ Python.")
 (define-public wayland
   (package
     (name "wayland")
-    (version "1.20.0")
+    (version "1.21.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://wayland.freedesktop.org/releases/"
+              (uri (string-append "https://gitlab.freedesktop.org/" name
+                                  "/" name  "/-/releases/" version "/downloads/"
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "09c7rpbwavjg4y16mrfa57gk5ix6rnzpvlnv1wp7fnbh9hak985q"))))
+                "1b0ixya9bfw5c9jx8mzlr7yqnlyvd3jv5z8wln9scdv8q5zlvikd"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
@@ -1242,15 +1258,15 @@ fullscreen) or other display servers.")
 (define-public wayland-protocols
   (package
     (name "wayland-protocols")
-    (version "1.23")
+    (version "1.29")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://wayland.freedesktop.org/releases/"
-                    "wayland-protocols-" version ".tar.xz"))
+              (uri (string-append "https://gitlab.freedesktop.org/wayland/"
+                                  name "/-/releases/" version "/downloads/"
+                                  name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0xizccackgwszjhlq7jjiv2z2gwppljx0w32ga91bxlnby8z22kc"))))
+                "1n4yzyjbp5fng8pvckandymvwc47mkwyi4pyvr6p0dn7bavrlpp2"))))
     (build-system meson-build-system)
     (inputs
      (list wayland))
@@ -1270,20 +1286,6 @@ protocol either in Wayland core, or some other protocol in wayland-protocols.")
         . "https://wayland.freedesktop.org/releases.html")))
     (license license:expat)))
 
-(define-public wayland-protocols-next
-  (package
-    (inherit wayland-protocols)
-    (name "wayland-protocols")
-    (version "1.26")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://wayland.freedesktop.org/releases/"
-                    "wayland-protocols-" version ".tar.xz"))
-              (sha256
-               (base32
-                "04vgllmpmrv14x3x64ns01vgwx4hriljayjkz9idgbv83i63hly5"))))))
-
 (define-public wayland-utils
   (package
     (name "wayland-utils")
@@ -1299,7 +1301,7 @@ protocol either in Wayland core, or some other protocol in wayland-protocols.")
                 "04k1yhyh7h4xawbhpz9pf6cpfmmp1l862fdgsvvnyp4hg9n3j9aj"))))
     (build-system meson-build-system)
     (native-inputs (list pkg-config))
-    (inputs (list libdrm wayland wayland-protocols-next))
+    (inputs (list libdrm wayland wayland-protocols))
     (home-page "https://wayland.freedesktop.org/")
     (synopsis "Display information about the Wayland protocols")
     (description "This package provides @code{wayland-info} tool that can be
@@ -1376,7 +1378,7 @@ compositor.")
            linux-pam
            pango
            pipewire
-           wayland-protocols-next
+           wayland-protocols
            xorg-server-xwayland))
     (propagated-inputs
      (list libxkbcommon pixman wayland))
@@ -2113,9 +2115,7 @@ iChat interoperability, and multi-user chats and Tubes using the
            pkg-config
            vala))
     (inputs
-     ;; TODO: remove pango-next after it's the default.
-     (list gtk+
-           pango-next))
+     (list gtk+))
     (propagated-inputs
      ;; colord-gtk.pc refers to all these.
      (list colord gtk))
diff --git a/gnu/packages/fribidi.scm b/gnu/packages/fribidi.scm
index d3a6169b0b..6b10787b87 100644
--- a/gnu/packages/fribidi.scm
+++ b/gnu/packages/fribidi.scm
@@ -28,7 +28,7 @@
 (define-public fribidi
   (package
     (name "fribidi")
-    (version "1.0.9")
+    (version "1.0.12")
     (source
       (origin
         (method url-fetch)
@@ -37,7 +37,7 @@
                         "/download/v" version "/fribidi-" version
                          ".tar.xz"))
         (sha256
-         (base32 "1iz06r6ha2nrgbzbn4141r58a60a9s5qiaadjjhhvdkg0alpxr65"))))
+         (base32 "159l56c48rfcqa8mnxhnynngzlzmvr089ki7mjrppin8gzwk7lhc"))))
     (build-system gnu-build-system)
     (synopsis "Implementation of the Unicode bidirectional algorithm")
     (description
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 9feaf059fb..16a4ca5b0a 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -1,8 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2018, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -29,6 +29,7 @@
   #:use-module (gnu packages libsigsegv)
   #:use-module (gnu packages multiprecision)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
@@ -38,55 +39,45 @@
 (define-public gawk
   (package
    (name "gawk")
-   (version "5.1.0")
+   (version "5.2.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gawk/gawk-" version
                                 ".tar.xz"))
             (sha256
-             (base32 "1gc2cccqy1x1bf6rhwlmd8q7dz7gnam6nwgl38bxapv6qm5flpyg"))))
+             (base32 "0kvy78jdv6lww1s6y2jm1w2cj46mz1fhflgdj9bwq64y3ywm6db7"))))
    (build-system gnu-build-system)
    (arguments
-    `(#:phases (modify-phases %standard-phases
-                 (add-before 'configure 'set-shell-file-name
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     ;; Refer to the right shell.
-                     (let ((bash (assoc-ref inputs "bash")))
-                       (substitute* "io.c"
-                         (("/bin/sh")
-                          (string-append bash "/bin/sh")))
+    (list #:phases
+          #~(modify-phases %standard-phases
+              (add-before 'configure 'set-shell-file-name
+                (lambda* (#:key inputs #:allow-other-keys)
+                  ;; Refer to the right shell.
+                  (let ((/bin/sh (search-input-file inputs "bin/sh")))
+                    (substitute* "io.c"
+                      (("/bin/sh") /bin/sh))
 
-                       ;; When cross-compiling, remove dependencies on the
-                       ;; `check-for-shared-lib-support' target, which tries
-                       ;; to run the cross-built `gawk'.
-                       ,@(if (%current-target-system)
-                             '((substitute* "extension/Makefile.in"
+                    ;; When cross-compiling, remove dependencies on the
+                    ;; `check-for-shared-lib-support' target, which tries
+                    ;; to run the cross-built `gawk'.
+                    #$@(if (%current-target-system)
+                           '((substitute* "extension/Makefile.in"
                                  (("^.*: check-for-shared-lib-support" match)
                                   (string-append "### " match))))
-                             '()))))
+                           '()))))
 
-                 (add-before 'check 'adjust-test-infrastructure
-                   (lambda _
-                     ;; Remove dependency on 'more' (from util-linux), which
-                     ;; would needlessly complicate bootstrapping.
-                     (substitute* "test/Makefile"
-                       (("\\| more") ""))
+              (add-before 'check 'adjust-test-infrastructure
+                (lambda _
+                  ;; Remove dependency on 'more' (from util-linux), which
+                  ;; would needlessly complicate bootstrapping.
+                  (substitute* "test/Makefile"
+                    (("\\| more") ""))
 
-                     ;; Silence a warning from bash about not being able
-                     ;; to change to an ISO-8859-1 locale.  The test itself
-                     ;; works fine, but newer versions of bash give a
-                     ;; locale warning which mangles the test output.
-                     (substitute* "test/localenl.sh"
-                       (("for LC_ALL in")
-                        "for LC in")
-                       (("export LC_ALL\n")
-                        "export LC_ALL=$LC 2>/dev/null\n"))
-
-                     ;; Adjust the shebang in that file since it is then diff'd
-                     ;; against the actual test output.
-                     (substitute* "test/watchpoint1.ok"
-                       (("#! /usr/bin/gawk")
-                        (string-append "#!" (which "gawk")))))))))
+                  ;; Adjust the shebang in that file since it is then diff'd
+                  ;; against the actual test output.
+                  (substitute* "test/watchpoint1.ok"
+                    (("#! /usr/bin/gawk")
+                     (string-append "#!" (which "gawk")))))))))
 
    (inputs (list libsigsegv
                  ;; Use the full-fledged Bash package, otherwise the test suite
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index bf3c753b2d..ce6e3e7a83 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,12 +1,12 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015-2018, 2020-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
@@ -173,7 +173,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
                   "lib"                    ;libgcc_s, libgomp, etc. (15+ MiB)
                   "debug"))                ;debug symbols of run-time libraries
 
-       (inputs (list gmp mpfr mpc libelf zlib))
+       (inputs (list gmp mpfr mpc elfutils zlib))
 
        ;; GCC < 5 is one of the few packages that doesn't ship .info files.
        ;; Newer texinfos fail to build the manual, so we use an older one.
@@ -182,7 +182,16 @@ where the OS part is overloaded to denote a specific ABI---into GCC
 
        (arguments
         `(#:out-of-source? #t
-          #:configure-flags ,(configure-flags)
+          #:configure-flags ,(let ((flags (configure-flags))
+                                   (version (package-version this-package)))
+                               ;; GCC 4.9 and 5.0 requires C++11 but GCC
+                               ;; 11.3.0 defaults to C++17, which is partly
+                               ;; incompatible.  Force C++11.
+                               (if (or (version-prefix? "4.9" version)
+                                       (version-prefix? "5" version))
+                                   `(cons "CXX=g++ -std=c++11" ,flags)
+                                   flags))
+
           #:make-flags
           ;; None of the flags below are needed when doing a Canadian cross.
           ;; TODO: Simplify this.
@@ -295,15 +304,13 @@ where the OS part is overloaded to denote a specific ABI---into GCC
                     (substitute* "gcc/config/aarch64/t-aarch64-linux"
                       (("lib64") "lib")))
 
-                  ;; TODO: Make this unconditional in core-updates.
                   ;; The STARTFILE_PREFIX_SPEC prevents gcc from finding the
                   ;; gcc:lib output, which causes ld to not find -lgcc_s.
-                  ,@(if (target-riscv64?)
-                     `((when (file-exists? "gcc/config/riscv")
-                         (substitute* "gcc/config/riscv/linux.h"
-                           (("define STARTFILE_PREFIX_SPEC")
-                           "define __STARTFILE_PREFIX_SPEC"))))
-                     '())
+                  (when (file-exists? "gcc/config/riscv")
+                    (substitute* '("gcc/config/riscv/linux.h"
+                                   "gcc/config/riscv/riscv.h")  ; GCC < 10
+                      (("define STARTFILE_PREFIX_SPEC")
+                      "define __STARTFILE_PREFIX_SPEC")))
 
                   (when (file-exists? "libbacktrace")
                     ;; GCC 4.8+ comes with libbacktrace.  By default it builds
@@ -441,30 +448,36 @@ Go.  It also includes runtime support libraries for these languages.")
     (native-inputs (list perl ;for manpages
                          texinfo))
     (arguments
-     (if (%current-target-system)
-         (package-arguments gcc-4.8)
-         ;; For native builds of GCC 4.9 and GCC 5, the C++ include path needs
-         ;; to be adjusted so it does not interfere with GCC's own build processes.
-         (substitute-keyword-arguments (package-arguments gcc-4.8)
-           ((#:modules modules %gnu-build-system-modules)
-            `((srfi srfi-1)
-              ,@modules))
-           ((#:phases phases)
-            `(modify-phases ,phases
-               (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (let ((libc (assoc-ref inputs "libc"))
-                         (gcc (assoc-ref inputs  "gcc")))
-                     (setenv "CPLUS_INCLUDE_PATH"
-                             (string-join (fold delete
-                                                (string-split (getenv "CPLUS_INCLUDE_PATH")
-                                                              #\:)
-                                                (list (string-append libc "/include")
-                                                      (string-append gcc "/include/c++")))
-                                          ":"))
-                     (format #t
-                             "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
-                             (getenv "CPLUS_INCLUDE_PATH"))))))))))))
+     ;; Since 'arguments' is a function of the package's version, define
+     ;; 'parent' such that the 'arguments' thunk gets to see the right
+     ;; version.
+     (let ((parent (package
+                     (inherit gcc-4.8)
+                     (version (package-version this-package)))))
+       (if (%current-target-system)
+           (package-arguments parent)
+           ;; For native builds of GCC 4.9 and GCC 5, the C++ include path needs
+           ;; to be adjusted so it does not interfere with GCC's own build processes.
+           (substitute-keyword-arguments (package-arguments parent)
+             ((#:modules modules %gnu-build-system-modules)
+              `((srfi srfi-1)
+                ,@modules))
+             ((#:phases phases)
+              `(modify-phases ,phases
+                 (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (let ((libc (assoc-ref inputs "libc"))
+                           (gcc (assoc-ref inputs  "gcc")))
+                       (setenv "CPLUS_INCLUDE_PATH"
+                               (string-join (fold delete
+                                                  (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                                #\:)
+                                                  (list (string-append libc "/include")
+                                                        (string-append gcc "/include/c++")))
+                                            ":"))
+                       (format #t
+                               "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                               (getenv "CPLUS_INCLUDE_PATH")))))))))))))
 
 (define gcc-canadian-cross-objdump-snippet
   ;; Fix 'libcc1/configure' error when cross-compiling GCC.  Without that,
@@ -658,16 +671,17 @@ It also includes runtime support libraries for these languages.")
 (define-public gcc-10
   (package
    (inherit gcc-8)
-   (version "10.3.0")
+   (version "10.4.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gcc/gcc-"
                                 version "/gcc-" version ".tar.xz"))
             (sha256
              (base32
-              "0i6378ig6h397zkhd7m4ccwjx5alvzrf2hm27p1pzwjhlv0h9x34"))
+              "1wg4xdizkksmwi66mvv2v4pk3ja8x64m7v9gzhykzd3wrmdpsaf9"))
             (patches (search-patches "gcc-9-strmov-store-file-names.patch"
-                                     "gcc-5.0-libvtv-runpath.patch"))
+                                     "gcc-5.0-libvtv-runpath.patch"
+                                     "gcc-10-tree-sra-union-handling.patch"))
             (modules '((guix build utils)))
             (snippet gcc-canadian-cross-objdump-snippet)))
    (properties
@@ -688,7 +702,8 @@ It also includes runtime support libraries for these languages.")
              (base32
               "0fdclcwf728wbq52vphfcjywzhpsjp3kifzj3pib3xcihs0z4z5l"))
             (patches (search-patches "gcc-9-strmov-store-file-names.patch"
-                                     "gcc-5.0-libvtv-runpath.patch"))
+                                     "gcc-5.0-libvtv-runpath.patch"
+                                     "gcc-10-tree-sra-union-handling.patch"))
             (modules '((guix build utils)))
             (snippet gcc-canadian-cross-objdump-snippet)))
 
@@ -718,7 +733,7 @@ It also includes runtime support libraries for these languages.")
 
 ;; Note: When changing the default gcc version, update
 ;;       the gcc-toolchain-* definitions.
-(define-public gcc gcc-10)
+(define-public gcc gcc-11)
 
 
 ;;;
@@ -828,8 +843,41 @@ using compilers other than GCC."
     (name "libstdc++")
     (arguments
      `(#:out-of-source? #t
+       #:modules ((srfi srfi-1)
+                  (srfi srfi-26)
+                  ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
+         ,@(if (version>=? (package-version gcc) "11")
+               `((add-after 'unpack 'hide-gcc-headers
+                   (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                     (let ((gcc (assoc-ref (or native-inputs inputs)
+                                           ,(if (%current-target-system)
+                                                "cross-gcc"
+                                                "gcc"))))
+                       ;; Fix a regression in GCC 11 where the GCC headers
+                       ;; shadows glibc headers when building libstdc++.  An
+                       ;; upstream fix was added in GCC 11.3.0, but it only
+                       ;; hides system include directories, not those on
+                       ;; CPLUS_INCLUDE_PATH.  See discussion at
+                       ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017>
+                       ;; and the similar adjustment in GCC-FINAL.
+                       (substitute* "libstdc++-v3/src/c++17/Makefile.in"
+                         (("AM_CXXFLAGS = ")
+                          (string-append ,(if (%current-target-system)
+                                              "CROSS_CPLUS_INCLUDE_PATH = "
+                                              "CPLUS_INCLUDE_PATH = ")
+                                         (string-join
+                                          (remove (cut string-prefix? gcc <>)
+                                                  (string-split
+                                                   (getenv
+                                                    ,(if (%current-target-system)
+                                                         "CROSS_CPLUS_INCLUDE_PATH"
+                                                         "CPLUS_INCLUDE_PATH"))
+                                                   #\:))
+                                          ":")
+                                         "\nAM_CXXFLAGS = ")))))))
+               '())
          ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
          (add-before 'chdir 'fix-rs6000-libdir
            (lambda _
@@ -1141,7 +1189,7 @@ provides the GNU compiler for the Go programming language."))
   (custom-gcc gcc-12 "gcc-objc" '("objc")
               %objc-search-paths))
 
-(define-public gcc-objc gcc-objc-10)
+(define-public gcc-objc gcc-objc-11)
 
 (define %objc++-search-paths
   (list (search-path-specification
@@ -1191,7 +1239,7 @@ provides the GNU compiler for the Go programming language."))
   (custom-gcc gcc-12 "gcc-objc++" '("obj-c++")
               %objc++-search-paths))
 
-(define-public gcc-objc++ gcc-objc++-10)
+(define-public gcc-objc++ gcc-objc++-11)
 
 (define (make-libstdc++-doc gcc)
   "Return a package with the libstdc++ documentation for GCC."
@@ -1252,16 +1300,16 @@ provides the GNU compiler for the Go programming language."))
 (define-public isl
   (package
     (name "isl")
-    (version "0.23")
+    (version "0.24")
     (source (origin
              (method url-fetch)
              (uri (list (string-append "mirror://sourceforge/libisl/isl-"
-                                       version ".tar.bz2")
+                                       version ".tar.xz")
                         (string-append %gcc-infrastructure
-                                       "isl-" version ".tar.bz2")))
+                                       "isl-" version ".tar.xz")))
              (sha256
               (base32
-               "0k91zck10zxs9sk3yrbb92y1j3w981w3fbwkfwd7kl779b0j52f5"))))
+               "1bgbk6n93qqn7w8v21kxf4x6dc3z0ypqrzvgfd46nhagak60ac84"))))
     (build-system gnu-build-system)
     (outputs '("out" "static"))
     (arguments
diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
index 90023ddc84..149b82468c 100644
--- a/gnu/packages/gd.scm
+++ b/gnu/packages/gd.scm
@@ -78,11 +78,11 @@
     (native-inputs
      (list pkg-config))
     (inputs
-     `(("fontconfig" ,fontconfig)
-       ("freetype" ,freetype)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)
-       ("zlib" ,zlib)))
+     (list fontconfig
+           freetype
+           libjpeg-turbo
+           libpng
+           zlib))
     (home-page "https://www.libgd.org/")
     (synopsis "Library for the dynamic creation of images by programmers")
     (description
@@ -94,7 +94,10 @@ most anything else, on the fly.  While not restricted to use on the web, the
 most common applications of GD involve website development.")
     (license (non-copyleft "file://COPYING"
                            "See COPYING file in the distribution."))
-    (properties '((cpe-name . "libgd")))))
+    (properties '((cpe-name . "libgd")
+                  (upstream-name . "libgd")
+                  (release-monitoring-url
+                   . "https://github.com/libgd/libgd/releases")))))
 
 (define-public perl-gd
   (package
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 753ab558ad..9465c0eda7 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -388,7 +388,6 @@ topology functions.")
            libshumate
            libsoup
            libxml2
-           pango-next                   ;TODO: remove when it's the default
            rest-next
            webkitgtk))
     (synopsis "Graphical map viewer and wayfinding program")
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index d1e51ab530..3aae332311 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2019, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -62,7 +62,8 @@
                                   version ".tar.gz"))
               (sha256
                (base32
-                "04kbg1sx0ncfrsbr85ggjslqkzzb243fcw9nyh3rrv1a22ihszf7"))))
+                "04kbg1sx0ncfrsbr85ggjslqkzzb243fcw9nyh3rrv1a22ihszf7"))
+              (patches (search-patches "gettext-libunicode-update.patch"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "doc"))                            ;9 MiB of HTML
@@ -168,9 +169,8 @@ translated messages from the catalogs.  Nearly all GNU packages use Gettext.")
                 (with-directory-excursion
                     (string-append (assoc-ref outputs "out")
                                    "/share/emacs/site-lisp")
-                  (symlink "start-po.el" "gettext-autoloads.el")
-                  #t)))))))
-    (native-inputs `(("emacs" ,emacs-minimal)))   ; for Emacs tools
+                  (symlink "start-po.el" "gettext-autoloads.el"))))))))
+    (native-inputs (list emacs-minimal))          ;for Emacs tools
     (synopsis "Tools and documentation for translation")))
 
 (define-public libtextstyle
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 55f3ab9364..3c85f61d88 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2020, 2022 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
@@ -33,6 +33,7 @@
   #:use-module (gnu packages cups)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -41,249 +42,221 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (srfi srfi-1))
 
 (define-public lcms
   (package
-   (name "lcms")
-   (version "2.12")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://sourceforge/lcms/lcms/" version
-                                "/lcms2-" version ".tar.gz"))
-
-            (sha256 (base32
-                     "1x8hzq8kw16lgjxmqpnqah1p3hrqqhjpcl1ymiah8434x22kjrhq"))))
-   (build-system gnu-build-system)
-   (arguments
-    `(#:configure-flags '("--disable-static")))
-   (inputs `(("libjpeg" ,libjpeg-turbo)
-             ("libtiff" ,libtiff)
-             ("zlib" ,zlib)))
-   (synopsis "Little CMS, a small-footprint colour management engine")
-   (description
-    "Little CMS is a small-footprint colour management engine, with special
+    (name "lcms")
+    (version "2.13.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/lcms/lcms/"
+                                  (version-major+minor version)
+                                  "/lcms2-" version ".tar.gz"))
+              (sha256
+               (base32
+                "121v414bg2zk0fcwx0kigr2l6nxl88nmblfn3gq5lz5jwybffwyl"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("--disable-static")))
+    (inputs
+     (list libjpeg-turbo libtiff zlib))
+    (synopsis "Little CMS, a small-footprint colour management engine")
+    (description
+     "Little CMS is a small-footprint colour management engine, with special
 focus on accuracy and performance.  It uses the International Color
 Consortium standard (ICC), approved as ISO 15076-1.")
-   (license license:x11)
-   (home-page "https://www.littlecms.com/")
-   (properties '((cpe-name . "little_cms_color_engine")))))
+    (license license:x11)
+    (home-page "https://www.littlecms.com/")
+    (properties '((cpe-name . "little_cms_color_engine")))))
 
 (define-public libpaper
   (package
-   (name "libpaper")
-   (version "1.1.24")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append
-                   ;; Debian moved their libpaper-1.1.24 to archive.debian.net
-                   ;; but in the move the hash of their tarball changed.
-                   "http://pkgs.fedoraproject.org/repo/pkgs/libpaper/libpaper_"
-                   version ".tar.gz/5bc87d494ba470aba54f6d2d51471834/libpaper_"
-                   version ".tar.gz"))
-            (sha256 (base32
-                     "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
-   (build-system gnu-build-system)
-   (native-inputs
-    (list automake)) ; For up to date 'config.guess' and 'config.sub'.
-   (arguments
-    `(#:configure-flags '("--disable-static")
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'fix-configure
-          (lambda* (#:key inputs native-inputs #:allow-other-keys)
-            ;; Replace outdated config.sub and config.guess:
-            (for-each (lambda (file)
-                        (install-file
-                         (string-append (assoc-ref
-                                         (or native-inputs inputs) "automake")
-                                        "/share/automake-"
-                                        ,(version-major+minor
-                                          (package-version automake))
-                                        "/" file) "."))
-                      '("config.sub" "config.guess"))
-            #t)))))
-   (synopsis "Library for handling paper sizes")
-   (description
-    "The paper library and accompanying files are intended to provide a simple
+    (name "libpaper")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rrthomas/libpaper/releases"
+                                  "/download/v" version "/libpaper-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0aipyaqp30cn919j7w5wvlgkw0v4aqsax82i2zw4wmgck8g6ax77"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list help2man))
+    (arguments
+     '(#:configure-flags '("--disable-static"
+                           ;; Tests require a relocatable build.
+                           "--enable-relocatable")))
+    (outputs '("out" "debug"))
+    (home-page "https://github.com/rrthomas/libpaper")
+    (synopsis "Library for handling paper sizes")
+    (description
+     "The paper library and accompanying files are intended to provide a simple
 way for applications to take actions based on a system- or user-specified
 paper size.")
-   (license license:gpl2)
-   (home-page "https://packages.qa.debian.org/libp/libpaper.html")))
+    ;; The library is LGPL3+, everything else GPL3+.
+    (license (list license:lgpl3+ license:gpl3+))))
 
 (define-public psutils
   (package
-   (name "psutils")
-   (version "17")
-   (source (origin
-            (method url-fetch)
-            (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz")
-            (sha256 (base32
-                     "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq"))))
-   (build-system gnu-build-system)
-   (inputs (list perl))
-   (arguments
-    `(#:tests? #f ; none provided
-      #:phases
-      (modify-phases %standard-phases
-        (replace 'configure
-          (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-           (let ((perl (assoc-ref inputs "perl"))
-                 (out (assoc-ref outputs "out")))
-            (copy-file "Makefile.unix" "Makefile")
-            (substitute* "Makefile"
-              (("/usr/local/bin/perl") (string-append perl "/bin/perl")))
-            (substitute* "Makefile"
-              (("/usr/local") out))
-            ;; for the install phase
-            (substitute* "Makefile"
-              (("-mkdir") "mkdir -p"))
-            ;; drop installation of non-free files
-            (substitute* "Makefile"
-              ((" install.include") "")))
-           #t)))))
-   (synopsis "Collection of utilities for manipulating PostScript documents")
-   (description
-    "PSUtils is a collection of utilities for manipulating PostScript
+    (name "psutils")
+    (version "2.09")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rrthomas/psutils/releases"
+                                  "/download/v" version "/psutils-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1nmp0hb7c4a315vv1mqw2cbckvca8bzh1cv3gdvwwy24w9qba6p3"))))
+    (build-system gnu-build-system)
+    (inputs (list perl))
+    (native-inputs
+     (list libpaper))
+    (arguments
+     (list #:tests? #f           ;FIXME: requires files not present in tarball
+           #:configure-flags
+           ;; Help the build system locate Perl when cross-compiling.
+           (if (%current-target-system)
+               #~(list (string-append "ac_cv_path_PERL="
+                                      (search-input-file %build-inputs "bin/perl")))
+               #~'())))
+    (synopsis "Collection of utilities for manipulating PostScript documents")
+    (description
+     "PSUtils is a collection of utilities for manipulating PostScript
 documents.  Programs included are psnup, for placing out several logical pages
 on a single sheet of paper, psselect, for selecting pages from a document,
 pstops, for general imposition, psbook, for signature generation for booklet
 printing, and psresize, for adjusting page sizes.")
-   (license (license:non-copyleft "file://LICENSE"
-                                "See LICENSE in the distribution."))
-   (home-page "http://knackered.org/angus/psutils/")))
+    (home-page "https://github.com/rrthomas/psutils")
+    (license (list license:gpl3+
+                   ;; This file carries the "historical" psutils license (v1),
+                   ;; which is "effectively BSD 3-clause" (a quote from the file).
+                   (license:non-copyleft
+                    "file://extractres.in.in"
+                    "See extractres.in.in in the distribution.")))))
 
 (define-public ghostscript
   (package
     (name "ghostscript")
-    (version "9.54.0")
+    (version "9.56.1")
     (source
-      (origin
-        (method url-fetch)
-        (uri (string-append "https://github.com/ArtifexSoftware/"
-                            "ghostpdl-downloads/releases/download/gs"
-                            (string-delete #\. version)
-                            "/ghostscript-" version ".tar.xz"))
-        (sha256
-         (base32
-          "0fvfvv6di5s6j4sy4gaw65klm23dby39bkdjxxq4w3v0vqyb9dy2"))
-        (patches (search-patches "ghostscript-no-header-creationdate.patch"
-                                 "ghostscript-no-header-id.patch"
-                                 "ghostscript-no-header-uuid.patch"))
-        (modules '((guix build utils)))
-        (snippet
-          ;; Remove bundled libraries. The bundled OpenJPEG is a patched fork so
-          ;; we leave it, at least for now.
-          ;; TODO Try unbundling ijs, which is developed alongside Ghostscript.
-          ;; Likewise for the thread-safe lcms2 fork called "lcms2art".
-         '(begin
-            (for-each delete-file-recursively '("freetype" "jbig2dec" "jpeg"
-                                                "libpng" "tiff" "zlib"))
-            #t))))
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/ArtifexSoftware/"
+                           "ghostpdl-downloads/releases/download/gs"
+                           (string-delete #\. version)
+                           "/ghostscript-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1r5qash65m6ignki6z72q4rlai9ka99xrxnmqd19n02has00cd6l"))
+       (patches (search-patches "ghostscript-no-header-creationdate.patch"
+                                "ghostscript-no-header-id.patch"
+                                "ghostscript-no-header-uuid.patch"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Remove bundled libraries. The bundled OpenJPEG is a patched fork so
+        ;; we leave it, at least for now.
+        ;; TODO Try unbundling ijs, which is developed alongside Ghostscript.
+        ;; Likewise for the thread-safe lcms2 fork called "lcms2art".
+        '(begin
+           (for-each delete-file-recursively '("freetype" "jbig2dec" "jpeg"
+                                               "libpng" "tiff" "zlib"))))))
     (build-system gnu-build-system)
-    (outputs '("out" "doc"))                  ;19 MiB of HTML/PS doc + examples
+    (outputs '("out" "doc"))            ;19 MiB of HTML/PS doc + examples
     (arguments
-     `(#:disallowed-references ("doc")
-       ;; XXX: Starting with version 9.27, building the tests in parallel
-       ;; occasionally fails like this:
-       ;;  In file included from ./base/memory_.h:23:0,
-       ;;                   from ./obj/gsmd5.h:1,
-       ;;                   from ./obj/gsmd5.c:56:
-       ;;  ./base/std.h:25:10: fatal error: arch.h: No such file or directory
-       #:parallel-tests? #f
-       #:configure-flags
-       (list (string-append "LDFLAGS=-Wl,-rpath="
-                            (assoc-ref %outputs "out") "/lib")
-             "--with-system-libtiff"
-             "LIBS=-lz"
-             (string-append "ZLIBDIR="
-                            (assoc-ref %build-inputs "zlib") "/include")
-             "--enable-dynamic"
-             "--disable-compile-inits"
-             (string-append "--with-fontpath="
-                            (assoc-ref %build-inputs "font-ghostscript")
-                            "/share/fonts/type1/ghostscript")
+     (list
+      #:disallowed-references '("doc")
+      #:configure-flags
+      #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
+              "--with-system-libtiff"
+              "LIBS=-lz"
+              (string-append "ZLIBDIR="
+                             (dirname (search-input-file %build-inputs
+                                                         "include/zlib.h")))
+              "--enable-dynamic"
+              "--disable-compile-inits"
+              (string-append "--with-fontpath="
+                             (search-input-directory
+                              %build-inputs
+                              "share/fonts/type1/ghostscript"))
 
-             ,@(if (%current-target-system)
-                   '(;; Specify the native compiler, which is used to build 'echogs'
-                     ;; and other intermediary tools when cross-compiling; see
-                     ;; <https://ghostscript.com/FAQ.html>.
-                     "CCAUX=gcc"
+              #$@(if (%current-target-system)
+                     '(;; Specify the native compiler, which is used to build 'echogs'
+                       ;; and other intermediary tools when cross-compiling; see
+                       ;; <https://ghostscript.com/FAQ.html>.
+                       "CCAUX=gcc"
 
-                     ;; Save 'config.log' etc. of the native build under
-                     ;; auxtmp/, useful for debugging.
-                     "--enable-save_confaux")
-                   '()))
-       #:phases
-       (modify-phases %standard-phases
-        (add-before 'configure 'create-output-directory
-          (lambda* (#:key outputs #:allow-other-keys)
-            ;; The configure script refuses to function if the directory
-            ;; specified as -rpath does not already exist.
-            (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))
-            #t))
-        (add-after 'configure 'remove-doc-reference
-          (lambda _
-            ;; Don't retain a reference to the 'doc' output in 'gs'.
-            ;; The only use of this definition is in the output of
-            ;; 'gs --help', so this change is fine.
-            (substitute* "base/gscdef.c"
-              (("GS_DOCDIR")
-               "\"~/.guix-profile/share/doc/ghostscript\""))
-            #t))
-         (add-after 'configure 'patch-config-files
-           (lambda _
-             (substitute* "base/unixhead.mak"
-               (("/bin/sh") (which "sh")))
-             #t))
-         ,@(if (%current-target-system)
-               `((add-after 'configure 'add-native-lz
-                   (lambda _
-                     ;; Add missing '-lz' for native tools such as 'mkromfs'.
-                     (substitute* "Makefile"
-                       (("^AUXEXTRALIBS=(.*)$" _ value)
-                        (string-append "AUXEXTRALIBS = -lz " value "\n")))
-                     #t)))
-               '())
-         (replace 'build
-           (lambda _
-             ;; Build 'libgs.so', but don't build the statically-linked 'gs'
-             ;; binary (saves 22 MiB).
-             (invoke "make" "so" "-j"
-                     (number->string (parallel-job-count)))))
-         (replace 'install
-           (lambda _
-             (invoke "make" "soinstall")))
-         (add-after 'install 'create-gs-symlink
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               ;; Some programs depend on having a 'gs' binary available.
-               (symlink "gsc" (string-append out "/bin/gs"))
-               #t))))))
+                       ;; Save 'config.log' etc. of the native build under
+                       ;; auxtmp/, useful for debugging.
+                       "--enable-save_confaux")
+                     '()))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'create-output-directory
+            (lambda _
+              ;; The configure script refuses to function if the directory
+              ;; specified as -rpath does not already exist.
+              (mkdir-p (string-append #$output "/lib"))))
+          (add-after 'configure 'remove-doc-reference
+            (lambda _
+              ;; Don't retain a reference to the 'doc' output in 'gs'.
+              ;; The only use of this definition is in the output of
+              ;; 'gs --help', so this change is fine.
+              (substitute* "base/gscdef.c"
+                (("GS_DOCDIR")
+                 "\"~/.guix-profile/share/doc/ghostscript\""))))
+          (add-after 'configure 'patch-config-files
+            (lambda _
+              (substitute* "base/unixhead.mak"
+                (("/bin/sh") (which "sh")))))
+          #$@(if (%current-target-system)
+                 '((add-after 'configure 'add-native-lz
+                     (lambda _
+                       ;; Add missing '-lz' for native tools such as 'mkromfs'.
+                       (substitute* "Makefile"
+                         (("^AUXEXTRALIBS=(.*)$" _ value)
+                          (string-append "AUXEXTRALIBS = -lz " value "\n"))))))
+                 '())
+          (replace 'build
+            (lambda _
+              ;; Build 'libgs.so', but don't build the statically-linked 'gs'
+              ;; binary (saves 22 MiB).
+              (invoke "make" "so" "-j"
+                      (number->string (parallel-job-count)))))
+          (replace 'install
+            (lambda _
+              (invoke "make" "soinstall")))
+          (add-after 'install 'create-gs-symlink
+            (lambda _
+              ;; Some programs depend on having a 'gs' binary available.
+              (symlink "gsc" (string-append #$output "/bin/gs")))))))
     (native-inputs
-     `(("perl" ,perl)
-       ("pkg-config" ,pkg-config)       ;needed for freetype
-       ("python" ,python-minimal-wrapper)
-       ("tcl" ,tcl)
-
-       ;; When cross-compiling, some of the natively-built tools require all
-       ;; these libraries.
-       ,@(if (%current-target-system)
-             `(("zlib/native" ,zlib)
-               ("libjpeg/native" ,libjpeg-turbo))
-             '())))
+     (append
+      (list perl
+            pkg-config                  ;needed for freetype
+            python-minimal-wrapper
+            tcl)
+      ;; When cross-compiling, some of the natively-built tools require all
+      ;; these libraries.
+      (if (%current-target-system)
+          (list zlib libjpeg-turbo)
+          '())))
     (inputs
-     `(("fontconfig" ,fontconfig)
-       ("freetype" ,freetype)
-       ("font-ghostscript" ,font-ghostscript)
-       ("jbig2dec" ,jbig2dec)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpaper" ,libpaper)
-       ("libpng" ,libpng)
-       ("libtiff" ,libtiff)
-       ("zlib" ,zlib)))
+     (list fontconfig
+           freetype
+           font-ghostscript
+           jbig2dec
+           libjpeg-turbo
+           libpaper
+           libpng
+           libtiff
+           zlib))
     (synopsis "PostScript and PDF interpreter")
     (description
      "Ghostscript is an interpreter for the PostScript language and the PDF
@@ -296,15 +269,14 @@ output file formats and printers.")
 (define-public ghostscript/x
   (package/inherit ghostscript
     (name (string-append (package-name ghostscript) "-with-x"))
-    (inputs `(("libxext" ,libxext)
-              ("libxt" ,libxt)
-              ,@(package-inputs ghostscript)))))
+    (inputs (modify-inputs (package-inputs ghostscript)
+              (prepend libxext libxt)))))
 
 (define-public ghostscript/cups
   (package/inherit ghostscript
     (name "ghostscript-with-cups")
-    (inputs `(("cups" ,cups-minimal)
-              ,@(package-inputs ghostscript)))))
+    (inputs (modify-inputs (package-inputs ghostscript)
+              (prepend cups-minimal)))))
 
 (define-public ijs
   (package
@@ -387,14 +359,14 @@ Ghostscript.  It currently includes the 35 standard PostScript fonts.")
 (define-public libspectre
   (package
    (name "libspectre")
-   (version "0.2.9")
+   (version "0.2.10")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://libspectre.freedesktop.org/releases"
                                 "/libspectre-" version ".tar.gz"))
             (sha256
              (base32
-              "1vgvxp77d5d9chhx4i9cv9hifw4x10jgw6aw8l2v90dgnm99rbj9"))))
+              "01sdaakrv5js8r6gj2r1ankyl304161z060f25mrmz3b1ylb4q6g"))))
    (build-system gnu-build-system)
    (inputs (list ghostscript))
    (native-inputs (list pkg-config))
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 4ae96032cd..b03ee7b4bd 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017-2019, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -15,7 +15,7 @@
 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
-;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2021, 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -266,7 +266,7 @@ also known as DXTn or DXTC) for Mesa.")
 (define-public mesa
   (package
     (name "mesa")
-    (version "21.3.8")
+    (version "22.2.4")
     (source
       (origin
         (method url-fetch)
@@ -278,61 +278,61 @@ also known as DXTn or DXTC) for Mesa.")
                                   version "/mesa-" version ".tar.xz")))
         (sha256
          (base32
-          "19wx5plk6z0hhi0zdzxjx8ynl3lhlc5mbd8vhwqyk92kvhxjf3g7"))
+          "1azpr68pdg63yq3igmzwsgn2ypg49m0mp3hfkq0lcyswr99npmv5"))
         (patches
-         (search-patches "mesa-skip-tests.patch"))))
+         (list (search-patch "mesa-fix-sporadic-test-failures.patch")))))
     (build-system meson-build-system)
     (propagated-inputs
-      (list ;; The following are in the Requires.private field of gl.pc.
-            libdrm
-            libvdpau
-            libx11
-            libxdamage
-            libxfixes
-            libxshmfence
-            libxxf86vm
-            xorgproto))
+     ;; The following are in the Requires.private field of gl.pc.
+     (list libdrm
+           libvdpau
+           libx11
+           libxdamage
+           libxfixes
+           libxshmfence
+           libxxf86vm
+           xorgproto))
     (inputs
-     (append (list expat
-                   elfutils                 ;libelf required for r600 when using llvm
-                   (force libva-without-mesa)
-                   libxml2
-                   libxrandr
-                   libxvmc
-                   wayland
-                   wayland-protocols)
-             ;; TODO: Resort alphabetically.
-             ;; Note: update the 'clang' input of mesa-opencl when bumping this.
-             (list llvm-11)))
+     (list elfutils                  ;libelf required for r600 when using llvm
+           expat
+           (force libva-without-mesa)
+           libxml2
+           libxrandr
+           libxvmc
+           llvm-for-mesa
+           wayland
+           wayland-protocols))
     (native-inputs
-     (append (list bison
-                   flex
-                   gettext-minimal
-                   pkg-config
-                   python-wrapper
-                   python-libxml2                  ;for OpenGL ES 1.1 and 2.0 support
-                   python-mako
-                   (@ (gnu packages base) which))
-             ;; TODO: Resort alphabetically.
-             (list glslang)))
+     (list bison
+           flex
+           gettext-minimal
+           glslang
+           pkg-config
+           python-libxml2               ;for OpenGL ES 1.1 and 2.0 support
+           python-mako
+           python-wrapper
+           (@ (gnu packages base) which)))
     (outputs '("out" "bin"))
     (arguments
      `(#:configure-flags
        '(,@(match (%current-system)
              ("aarch64-linux"
               ;; TODO: Fix svga driver for non-Intel architectures.
-              '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
+              '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\
+panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
              ("armhf-linux"
               ;; Freedreno FTBFS when built on a 64-bit machine.
-              '("-Dgallium-drivers=etnaviv,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
+              '("-Dgallium-drivers=etnaviv,kmsro,lima,nouveau,panfrost,\
+r300,r600,swrast,tegra,v3d,vc4,virgl"))
              ((or "powerpc64le-linux" "powerpc-linux" "riscv64-linux")
               '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
              (_
-              '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
+              '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,\
+svga,swrast,virgl")))
          ;; Enable various optional features.  TODO: opencl requires libclc,
          ;; omx requires libomxil-bellagio
          "-Dplatforms=x11,wayland"
-         "-Dglx=dri"        ;Thread Local Storage, improves performance
+         "-Dglx=dri"               ;Thread Local Storage, improves performance
          ;; "-Dopencl=true"
          ;; "-Domx=true"
          "-Dosmesa=true"
@@ -362,15 +362,7 @@ also known as DXTn or DXTC) for Mesa.")
          ;; Also enable the tests.
          "-Dbuild-tests=true"
 
-         ;; on non-intel systems, drop i915 and i965
-         ;; from the default dri drivers
-         ,@(match (%current-system)
-             ((or "x86_64-linux" "i686-linux")
-              '("-Ddri-drivers=i915,i965,nouveau,r200,r100"))
-             (_
-              '("-Ddri-drivers=nouveau,r200,r100")))
-
-                "-Dllvm=enabled")       ; default is x86/x86_64 only
+         "-Dllvm=enabled")              ; default is x86/x86_64 only
 
        ;; XXX: 'debugoptimized' causes LTO link failures on some drivers.  The
        ;; documentation recommends using 'release' for performance anyway.
@@ -419,10 +411,10 @@ also known as DXTn or DXTC) for Mesa.")
                     (substitute* "src/amd/common/meson.build"
                       (("and not with_platform_windows") "and with_platform_windows"))))
                  ("i686-linux"
-                  ;; Disable new test from Mesa 19 that fails on i686.  Upstream
-                  ;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
-                  `((substitute* "src/util/tests/format/meson.build"
-                      (("'u_format_test',") ""))))
+                  ;; This test is known to fail on i686 (see:
+                  ;; https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091).
+                  `((substitute* "src/util/meson.build"
+                      ((".*'tests/u_debug_stack_test.cpp',.*") ""))))
                  ("aarch64-linux"
                   ;; The ir3_disasm test segfaults.
                   ;; The simplest way to skip it is to run a different test instead.
@@ -521,7 +513,7 @@ from software emulation to complete hardware acceleration for modern GPUs.")
        (prepend libclc)))
     (native-inputs
      (modify-inputs (package-native-inputs mesa)
-       (prepend clang-11)))))
+       (prepend clang-15)))))
 
 (define-public mesa-opencl-icd
   (package/inherit mesa-opencl
@@ -565,8 +557,7 @@ from software emulation to complete hardware acceleration for modern GPUs.")
            (lambda* (#:key outputs #:allow-other-keys)
              (copy-recursively "include" (string-append
                                           (assoc-ref outputs "out")
-                                          "/include"))
-             #t)))))))
+                                          "/include")))))))))
 
 ;;; The mesa-demos distribution contains non-free files, many files with no
 ;;; clear license information, and many demos that aren't useful for most
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index f85d5e3225..3d8a25be9e 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -103,15 +103,15 @@
 (define dbus
   (package
     (name "dbus")
-    (version "1.12.20")
+    (version "1.14.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://dbus.freedesktop.org/releases/dbus/dbus-"
-                    version ".tar.gz"))
+                    version ".tar.xz"))
               (sha256
                (base32
-                "1zp5gpx61v1cpqf2zwb1cidhp9xylvw49d3zydkxqk6b1qa20xpp"))
+                "1m7bibavml4gx9d67j403l0kzd1a4z8lhrpxb2as3q4nfpiwrmyc"))
               (patches (search-patches "dbus-helper-search-path.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -215,7 +215,7 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
 (define glib
   (package
     (name "glib")
-    (version "2.70.2")
+    (version "2.72.3")
     (source
      (origin
        (method url-fetch)
@@ -224,7 +224,7 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
                        name "/" (string-take version 4) "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0vw08p4jllavp9qmlqg1yl1zanmy53yid46wipas6gfdhnf4al85"))
+        (base32 "1w25sf2wxkkah2p2w189q58mza3zv8z1fh2q1m82sldq4kva4faa"))
        (patches
         (search-patches "glib-appinfo-watch.patch"
                         "glib-skip-failing-test.patch"))
@@ -239,127 +239,122 @@ information, refer to the @samp{dbus-daemon(1)} man page.")))
                "bin"                    ;executables; depends on Python
                "debug"))
     (arguments
-     `(#:disallowed-references
-       (,tzdata-for-tests
-        ;; Verify glib-mkenums, gtester, ... use the cross-compiled
-        ;; python.
-        ,@(if (%current-target-system)
-              (map (cut gexp-input <> #:native? #t)
-                   `(,(this-package-native-input "python")
-                     ,(this-package-native-input "python-wrapper")))
-              '()))
-       #:configure-flags ,#~(list "--default-library=both"
-                                  "-Dman=false"
-                                  "-Dselinux=disabled"
-                                  (string-append "--bindir="
-                                                 #$output:bin "/bin"))
-       #:phases
-       (modify-phases %standard-phases
-         ;; Needed to pass the test phase on slower ARM and i686 machines.
-         (add-after 'unpack 'increase-test-timeout
-           (lambda _
-             (substitute* "meson.build"
-               (("(test_timeout.*) = ([[:digit:]]+)" all first second)
-                (string-append first " = " second "0")))))
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "gio/tests/meson.build"
-               ((".*'testfilemonitor'.*") ;marked as flaky
-                ""))
-             (with-directory-excursion "glib/tests"
-               (substitute* '("unix.c" "utils.c")
-                 (("[ \t]*g_test_add_func.*;") "")))
-             (with-directory-excursion "gio/tests"
-               (substitute* '("contenttype.c" "gdbus-address-get-session.c"
-                              "gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
-                 (("[ \t]*g_test_add_func.*;") "")))
+     (list
+      #:disallowed-references
+      (cons tzdata-for-tests
+            ;; Verify glib-mkenums, gtester, ... use the cross-compiled
+            ;; python.
+            (if (%current-target-system)
+                (map (cut gexp-input <> #:native? #t)
+                     `(,(this-package-native-input "python")
+                       ,(this-package-native-input "python-wrapper")))
+                '()))
+      #:configure-flags #~(list "--default-library=both"
+                                "-Dman=false"
+                                "-Dselinux=disabled"
+                                (string-append "--bindir="
+                                               #$output:bin "/bin"))
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Needed to pass the test phase on slower ARM and i686 machines.
+          (add-after 'unpack 'increase-test-timeout
+            (lambda _
+              (substitute* "meson.build"
+                (("(test_timeout.*) = ([[:digit:]]+)" all first second)
+                 (string-append first " = " second "0")))))
+          (add-after 'unpack 'disable-failing-tests
+            (lambda _
+              (substitute* "gio/tests/meson.build"
+                ((".*'testfilemonitor'.*") ;marked as flaky
+                 ""))
+              (with-directory-excursion "glib/tests"
+                (substitute* '("unix.c" "utils.c")
+                  (("[ \t]*g_test_add_func.*;") "")))
+              (with-directory-excursion "gio/tests"
+                (substitute* '("contenttype.c" "gdbus-address-get-session.c"
+                               "gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
+                  (("[ \t]*g_test_add_func.*;") "")))
 
-             ,@(if (target-x86-32?)
-                   ;; Comment out parts of timer.c that fail on i686 due to
-                   ;; excess precision when building with GCC 10:
-                   ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
-                   '((substitute* "glib/tests/timer.c"
-                       (("^  g_assert_cmpuint \\(micros.*" all)
-                        (string-append "//" all "\n"))
-                       (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
-                        (string-append "//" all "\n"))))
-                   '())))
-         ;; Python references are not being patched in patch-phase of build,
-         ;; despite using python-wrapper as input. So we patch them manually.
-         ;;
-         ;; These python scripts are both used during build and installed,
-         ;; so at first, use a python from 'native-inputs', not 'inputs'. When
-         ;; cross-compiling, the 'patch-shebangs' phase will replace
-         ;; the native python with a python from 'inputs'.
-         (add-after 'unpack 'patch-python-references
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in"
-                            "glib/gtester-report.in"
-                            "gobject/glib-genmarshal.in"
-                            "gobject/glib-mkenums.in")
-               (("@PYTHON@")
-                (search-input-file (or native-inputs inputs)
-                                   (string-append
-                                    "/bin/python"
-                                    ,(version-major+minor
-                                      (package-version python))))))))
-         (add-before 'check 'pre-check
-           (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
-             ;; For tests/gdatetime.c.
-             (setenv "TZDIR"
-                     (search-input-directory (or native-inputs inputs)
-                                             "share/zoneinfo"))
-             ;; Some tests want write access there.
-             (setenv "HOME" (getcwd))
-             (setenv "XDG_CACHE_HOME" (getcwd))))
-         (add-after 'install 'move-static-libraries
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (static (assoc-ref outputs "static")))
-               (mkdir-p (string-append static "/lib"))
-               (for-each (lambda (a)
-                           (rename-file a (string-append static "/lib/"
-                                                         (basename a))))
-                         (find-files out "\\.a$")))))
-         (add-after 'install 'patch-pkg-config-files
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               ;; Do not refer to "bindir", which points to "${prefix}/bin".
-               ;; We don't patch "bindir" to point to "$bin/bin", because that
-               ;; would create a reference cycle between the "out" and "bin"
-               ;; outputs.
-               (substitute*
-                   (list
-                    (string-append out "/lib/pkgconfig/gio-2.0.pc")
-                    (string-append out "/lib/pkgconfig/glib-2.0.pc"))
-                 (("^bindir=.*")
-                  "")
-                 (("=\\$\\{bindir\\}/")
-                  "="))))))))
+              #$@(if (target-x86-32?)
+                     ;; Comment out parts of timer.c that fail on i686 due to
+                     ;; excess precision when building with GCC 10:
+                     ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
+                     '((substitute* "glib/tests/timer.c"
+                         (("^  g_assert_cmpuint \\(micros.*" all)
+                          (string-append "//" all "\n"))
+                         (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
+                          (string-append "//" all "\n"))))
+                     '())))
+          ;; Python references are not being patched in patch-phase of build,
+          ;; despite using python-wrapper as input. So we patch them manually.
+          ;;
+          ;; These python scripts are both used during build and installed,
+          ;; so at first, use a python from 'native-inputs', not 'inputs'. When
+          ;; cross-compiling, the 'patch-shebangs' phase will replace
+          ;; the native python with a python from 'inputs'.
+          (add-after 'unpack 'patch-python-references
+            (lambda* (#:key native-inputs inputs #:allow-other-keys)
+              (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in"
+                             "glib/gtester-report.in"
+                             "gobject/glib-genmarshal.in"
+                             "gobject/glib-mkenums.in")
+                (("@PYTHON@")
+                 (search-input-file (or native-inputs inputs)
+                                    (string-append
+                                     "/bin/python"
+                                     #$(version-major+minor
+                                        (package-version python))))))))
+          (add-before 'check 'pre-check
+            (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
+              ;; For tests/gdatetime.c.
+              (setenv "TZDIR"
+                      (search-input-directory (or native-inputs inputs)
+                                              "share/zoneinfo"))
+              ;; Some tests want write access there.
+              (setenv "HOME" (getcwd))
+              (setenv "XDG_CACHE_HOME" (getcwd))))
+          (add-after 'install 'move-static-libraries
+            (lambda _
+              (mkdir-p (string-append #$output:static "/lib"))
+              (for-each (lambda (a)
+                          (rename-file a (string-append #$output:static "/lib/"
+                                                        (basename a))))
+                        (find-files #$output "\\.a$"))))
+          (add-after 'install 'patch-pkg-config-files
+            (lambda* (#:key outputs #:allow-other-keys)
+              ;; Do not refer to "bindir", which points to "${prefix}/bin".
+              ;; We don't patch "bindir" to point to "$bin/bin", because that
+              ;; would create a reference cycle between the "out" and "bin"
+              ;; outputs.
+              (substitute*
+                  (list (search-input-file outputs "lib/pkgconfig/gio-2.0.pc")
+                        (search-input-file outputs "lib/pkgconfig/glib-2.0.pc"))
+                (("^bindir=.*")
+                 "")
+                (("=\\$\\{bindir\\}/")
+                 "=")))))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("m4" ,m4)                       ; for installing m4 macros
-       ("perl" ,perl)                   ; needed by GIO tests
-       ("pkg-config" ,pkg-config)
-       ("python" ,python)               ; For 'patch-python-references
-       ("python-wrapper" ,python-wrapper)
-       ("tzdata" ,tzdata-for-tests)))   ; for tests/gdatetime.c
-    (inputs
-     (list bash-completion
-           ;; "python", "python-wrapper" and "bash-minimal"
-           ;; are for the 'patch-shebangs' phase, to make
-           ;; sure the installed scripts end up with a correct shebang
-           ;; when cross-compiling.
-           python
+     (list dbus
+           gettext-minimal
+           m4                           ;for installing m4 macros
+           perl                         ;needed by GIO tests
+           pkg-config
+           python                       ;for 'patch-python-references
            python-wrapper
-           bash-minimal
-           dbus
-           libelf))
+           tzdata-for-tests))           ;for tests/gdatetime.c
+    (inputs
+     (list ;; "python", "python-wrapper" and "bash-minimal"
+      ;; are for the 'patch-shebangs' phase, to make
+      ;; sure the installed scripts end up with a correct shebang
+      ;; when cross-compiling.
+      bash-minimal
+      python
+      python-wrapper))
     (propagated-inputs
-     (list libffi ; in the Requires.private field of gobject-2.0.pc
-           pcre ; in the Requires.private field of glib-2.0.pc
-           `(,util-linux "lib") ;for libmount
-           zlib))         ; in the Requires.private field of glib-2.0.pc
+     (list libffi             ;in the Requires.private field of gobject-2.0.pc
+           pcre               ;in the Requires.private field of glib-2.0.pc
+           `(,util-linux "lib")  ;for libmount
+           zlib))                ;in the Requires.private field of glib-2.0.pc
     (native-search-paths
      ;; This variable is not really "owned" by GLib, but several related
      ;; packages refer to it: gobject-introspection's tools use it as a search
@@ -405,35 +400,35 @@ functions for strings and common data structures.")
        ((#:test-options test-options ''())
         ;; Skip flaky or slow tests.
         `(cons* "--no-suite=slow" "--no-suite=flaky" ,test-options))
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (replace 'disable-failing-tests
-             (lambda _
-               (with-directory-excursion "glib/tests"
-                 (substitute* '("unix.c" "utils.c")
-                   (("[ \t]*g_test_add_func.*;") "")))
-               ;; The "glib:gio / file" test fails with the error "No
-               ;; application is registered as handling this file" (see:
-               ;; https://gitlab.gnome.org/GNOME/glib/-/issues/2742).
-               (with-directory-excursion "gio/tests"
-                 (substitute* '("appinfo.c"
-                                "contenttype.c"
-                                "desktop-app-info.c"
-                                "file.c"
-                                "gdbus-address-get-session.c"
-                                "gdbus-peer.c")
-                   (("[ \t]*g_test_add_func.*;") "")))
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (replace 'disable-failing-tests
+              (lambda _
+                (with-directory-excursion "glib/tests"
+                  (substitute* '("unix.c" "utils.c")
+                    (("[ \t]*g_test_add_func.*;") "")))
+                ;; The "glib:gio / file" test fails with the error "No
+                ;; application is registered as handling this file" (see:
+                ;; https://gitlab.gnome.org/GNOME/glib/-/issues/2742).
+                (with-directory-excursion "gio/tests"
+                  (substitute* '("appinfo.c"
+                                 "contenttype.c"
+                                 "desktop-app-info.c"
+                                 "file.c"
+                                 "gdbus-address-get-session.c"
+                                 "gdbus-peer.c")
+                    (("[ \t]*g_test_add_func.*;") "")))
 
-               ,@(if (target-x86-32?)
-                     ;; Comment out parts of timer.c that fail on i686 due to
-                     ;; excess precision when building with GCC 10:
-                     ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
-                     '((substitute* "glib/tests/timer.c"
-                         (("^  g_assert_cmpuint \\(micros.*" all)
-                          (string-append "//" all "\n"))
-                         (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
-                          (string-append "//" all "\n"))))
-                     '())))))))
+                #$@(if (target-x86-32?)
+                       ;; Comment out parts of timer.c that fail on i686 due to
+                       ;; excess precision when building with GCC 10:
+                       ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
+                       '((substitute* "glib/tests/timer.c"
+                           (("^  g_assert_cmpuint \\(micros.*" all)
+                            (string-append "//" all "\n"))
+                           (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
+                            (string-append "//" all "\n"))))
+                       '())))))))
     (native-inputs
      (modify-inputs (package-native-inputs glib)
        (append desktop-file-utils)))
@@ -444,44 +439,41 @@ functions for strings and common data structures.")
 (define-public glib-with-documentation
   ;; glib's doc must be built in a separate package since it requires gtk-doc,
   ;; which in turn depends on glib.
-  (let ((base glib-next))
-    (package/inherit base
-      (properties (alist-delete 'hidden? (package-properties base)))
-      (outputs (cons "doc" (package-outputs base))) ; 20 MiB of GTK-Doc reference
-      (native-inputs
-       `(("docbook-xml-4.2" ,docbook-xml-4.2)
-         ("docbook-xml-4.5" ,docbook-xml)
-         ("docbook-xsl" ,docbook-xsl)
-         ("gtk-doc" ,gtk-doc)
-         ("libxml2" ,libxml2)
-         ("xsltproc" ,libxslt)
-         ,@(package-native-inputs base)))
-      (arguments
-       (substitute-keyword-arguments (package-arguments base)
-         ((#:configure-flags flags ''())
-          #~(cons "-Dgtk_doc=true"
-                  (delete "-Dman=false" #$flags)))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'patch-docbook-xml
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (with-directory-excursion "docs"
-                   (substitute* (find-files "." "\\.xml$")
-                     (("http://www.oasis-open.org/docbook/xml/4\\.5/")
-                      (string-append (assoc-ref inputs "docbook-xml-4.5")
-                                     "/xml/dtd/docbook/"))
-                     (("http://www.oasis-open.org/docbook/xml/4\\.2/")
-                      (string-append (assoc-ref inputs "docbook-xml-4.2")
-                                     "/xml/dtd/docbook/"))))))
-             (add-after 'install 'move-doc
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (doc (assoc-ref outputs "doc"))
-                        (html (string-append "/share/gtk-doc")))
-                   (mkdir-p (string-append doc "/share"))
-                   (rename-file
-                    (string-append out html)
-                    (string-append doc html))))))))))))
+  (package/inherit glib
+    (properties (alist-delete 'hidden? (package-properties glib)))
+    (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
+    (native-inputs
+     `(("docbook-xml-4.2" ,docbook-xml-4.2)
+       ("docbook-xml-4.5" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gtk-doc" ,gtk-doc)
+       ("libxml2" ,libxml2)
+       ("xsltproc" ,libxslt)
+       ,@(package-native-inputs glib)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments glib)
+       ((#:configure-flags flags ''())
+        #~(cons "-Dgtk_doc=true"
+                (delete "-Dman=false" #$flags)))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'patch-docbook-xml
+              (lambda* (#:key inputs #:allow-other-keys)
+                (with-directory-excursion "docs"
+                  (substitute* (find-files "." "\\.xml$")
+                    (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+                     (string-append (assoc-ref inputs "docbook-xml-4.5")
+                                    "/xml/dtd/docbook/"))
+                    (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+                     (string-append (assoc-ref inputs "docbook-xml-4.2")
+                                    "/xml/dtd/docbook/"))))))
+            (add-after 'install 'move-doc
+              (lambda _
+                (let ((html "/share/gtk-doc"))
+                  (mkdir-p (string-append #$output:doc "/share"))
+                  (rename-file
+                   (string-append #$output html)
+                   (string-append #$output:doc html)))))))))))
 
 (define (python-extension-suffix python triplet)
   "Determine the suffix for C extensions for PYTHON when compiled
@@ -522,14 +514,14 @@ be used when cross-compiling."
 (define gobject-introspection
   (package
     (name "gobject-introspection")
-    (version "1.66.1")
+    (version "1.72.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/"
                    "gobject-introspection/" (version-major+minor version)
                    "/gobject-introspection-" version ".tar.xz"))
              (sha256
-              (base32 "078n0q7b6z682mf4irclrksm73cyixq295mqnqifl9plwmgaai6x"))
+              (base32 "1g5aps3b20ck96ahy7fjl4nhp9nabkd9rlqd0s1qzn3111cqxzh2"))
              (patches (search-patches
                        "gobject-introspection-cc.patch"
                        "gobject-introspection-girepository.patch"
@@ -578,11 +570,7 @@ be used when cross-compiling."
        ("bison" ,bison)
        ("flex" ,flex)))
     (inputs
-     `(,@(if (%current-target-system)
-             `(("python" ,python))
-             `(("bison" ,bison)
-               ("flex" ,flex)
-               ("python" ,python-wrapper)))
+     `(("python" ,python)
        ("zlib" ,zlib)))
     (propagated-inputs
      (list glib
@@ -682,27 +670,25 @@ The intltool collection can be used to do these things:
 (define itstool
   (package
     (name "itstool")
-    (version "2.0.6")
+    (version "2.0.7")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://files.itstool.org/itstool/itstool-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2"))))
+               "1jl7gsr7aclb9nvqazr039m86y7f7ivfhl2pixcrbfqjkb97r6kb"))))
     (build-system gnu-build-system)
     (inputs
      (list libxml2 python-libxml2 python))
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'wrap-program
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((prog (string-append (assoc-ref outputs "out")
-                                        "/bin/itstool")))
-               (wrap-program prog
-                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
-               #t))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'wrap-program
+            (lambda _
+              (wrap-program (string-append #$output "/bin/itstool")
+                `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))))))))
     (home-page "https://itstool.org")
     (synopsis "Tool to translate XML documents with PO files")
     (description
@@ -915,7 +901,7 @@ credentials and service-specific settings.")
 (define glibmm
   (package
     (name "glibmm")
-    (version "2.70.0")
+    (version "2.72.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/glibmm/"
@@ -923,31 +909,29 @@ credentials and service-specific settings.")
                                   "/glibmm-" version ".tar.xz"))
               (sha256
                (base32
-                "085mzpphz71sh5wh71ppikwnxsgn4pk3s4bzz6ingj6wxn5gs240"))))
+                "1n2w2pcpbxjbsxynmar3i5ibr7src6gnrdxb9nn57p5miai4jxia"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:configure-flags
-       (list "-Dbuild-documentation=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "tests/meson.build"
-               ;; This test uses /etc/fstab as an example file to read
-               ;; from; disable it.
-               (("[ \t]*.*giomm_simple.*$") "")
-               ;; This test does a DNS lookup, and then expects to be able
-               ;; to open a TLS session; just skip it.
-               (("[ \t]*.*giomm_tls_client.*$") ""))))
-         (add-after 'install 'move-doc
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (assoc-ref outputs "doc")))
-               (mkdir-p (string-append doc "/share"))
-               (rename-file
-                (string-append out "/share/doc")
-                (string-append doc "/share/doc"))))))))
+     (list
+      #:configure-flags #~(list "-Dbuild-documentation=true")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-failing-tests
+            (lambda _
+              (substitute* "tests/meson.build"
+                ;; This test uses /etc/fstab as an example file to read from;
+                ;; disable it.
+                (("[ \t]*.*giomm_simple.*$") "")
+                ;; This test does a DNS lookup, and then expects to be able to
+                ;; open a TLS session; just skip it.
+                (("[ \t]*.*giomm_tls_client.*$") ""))))
+          (add-after 'install 'move-doc
+            (lambda _
+              (mkdir-p (string-append #$output:doc "/share"))
+              (rename-file
+               (string-append #$output "/share/doc")
+               (string-append #$output:doc "/share/doc")))))))
     (native-inputs
      (list graphviz
            doxygen
@@ -987,7 +971,7 @@ useful for C++.")
 (define-public python-pygobject
   (package
     (name "python-pygobject")
-    (version "3.40.1")
+    (version "3.42.2")
     (source
      (origin
        (method url-fetch)
@@ -996,7 +980,7 @@ useful for C++.")
                            "/pygobject-" version ".tar.xz"))
        (sha256
         (base32
-         "0d80g5kgf2i9cginyhalvb7ibfk9g30yilqzmcsw6h6byj8xbih0"))
+         "0my95gjnps093inzznbipkhf25cffbc32v9is2fq8wvh59g6ks5d"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -1032,6 +1016,8 @@ useful for C++.")
     (synopsis "Python bindings for GObject")
     (description
      "Python bindings for GLib, GObject, and GIO.")
+    (properties
+     '((upstream-name . "pygobject")))
     (license license:lgpl2.1+)))
 
 (define-public perl-glib
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ac2516ee39..e2ee396819 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -373,9 +373,7 @@ features to enable users to create their discs easily and quickly.")
                                "-Denable-gtk-doc=false"
                                "-Dvapigen=false")))
     (native-inputs
-     `(("glib:bin" ,glib "bin")
-       ("pkg-config" ,pkg-config)
-       ("vala" ,vala)))
+     (list `(,glib "bin") pkg-config vala))
     (inputs
      (list glib glib-networking))
     (synopsis "Cloudproviders Integration API")
@@ -1205,7 +1203,10 @@ as a \"boring window manager for the adult in you.\"")
                                   "mm-common-" version ".tar.xz"))
               (sha256
                (base32
-                "1x8yvjy0yg17qyhmqws8xh2k8dvzrhpwqz7j1cfwzalrb1i9c5g8"))))
+                "1x8yvjy0yg17qyhmqws8xh2k8dvzrhpwqz7j1cfwzalrb1i9c5g8"))
+              (patches
+               (search-patches
+                "mm-common-reproducible-tarball.patch"))))
     (build-system meson-build-system)
     (arguments
      `(#:phases
@@ -2508,7 +2509,7 @@ GNOME Desktop.")
 (define-public gdl
   (package
     (name "gdl")
-    (version "3.34.0")
+    (version "3.40.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2520,7 +2521,7 @@ GNOME Desktop.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "154qcr0x6f68f4q526y87imv0rscmp34n47nk1pp82rsq52h2zna"))))
+                "11hp93gqk7m64h84q5hndzlwj4w6hl0cbmzrk2pkdn04ikm2zj4v"))))
     (build-system gnu-build-system)
     (native-inputs
      (list autoconf
@@ -2735,7 +2736,7 @@ on the GNOME Desktop with a single simple application.")
 (define-public gsettings-desktop-schemas
   (package
     (name "gsettings-desktop-schemas")
-    (version "41.0")
+    (version "42.0")
     (source
      (origin
        (method url-fetch)
@@ -2744,7 +2745,7 @@ on the GNOME Desktop with a single simple application.")
                            name "-" version ".tar.xz"))
        (sha256
         (base32
-         "1v9jagk679m01nji0acirynxinziv036618c7xc49l4nwmr9ja3p"))))
+         "1li3fcqwnw20f4j0i21i88fygm0hli8gmzkn4apgf8ynkrd371k6"))))
     (build-system meson-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -3298,7 +3299,8 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
           '())
       (list gtk+ libxml2)))
     (native-inputs
-     (list docbook-xml-4.2
+     (list atk                          ;for tests
+           docbook-xml-4.2
            docbook-xsl
            gettext-minimal
            `(,glib "bin")
@@ -3557,7 +3559,7 @@ for dealing with different structured file formats.")
 (define-public librsvg
   (package
     (name "librsvg")
-    (version "2.50.7")
+    (version "2.54.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/librsvg/"
@@ -3565,7 +3567,7 @@ for dealing with different structured file formats.")
                                   "librsvg-" version ".tar.xz"))
               (sha256
                (base32
-                "1g3f8byg5w08fx1bka12mmpl59v6a4q2p827w6m2la6mijq63yzz"))
+                "0cs8qbn2khibb5w1r0f6cibfmkfb7zg713526vhc0hva7wj2l5ga"))
               (modules '((guix build utils)))
               (snippet
                '(begin (delete-file-recursively "vendor")))))
@@ -3578,61 +3580,57 @@ for dealing with different structured file formats.")
         (guix build utils)
         ((guix build gnu-build-system) #:prefix gnu:))
        #:cargo-inputs
-       (("rust-bitflags" ,rust-bitflags-1)
-        ("rust-cairo-rs" ,rust-cairo-rs-0.8)
-        ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.9)
-        ("rust-cast" ,rust-cast-0.2)
-        ("rust-cssparser" ,rust-cssparser-0.27)
+       (("rust-byteorder" ,rust-byteorder-1)
+        ("rust-cairo-rs" ,rust-cairo-rs-0.15)
+        ("rust-cast" ,rust-cast-0.3)
+        ("rust-chrono" ,rust-chrono-0.4)
+        ("rust-clap" ,rust-clap-2)
+        ("rust-cssparser" ,rust-cssparser-0.28)
         ("rust-data-url" ,rust-data-url-0.1)
         ("rust-encoding" ,rust-encoding-0.2)
-        ("rust-float-cmp" ,rust-float-cmp-0.8)
-        ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.8)
-        ("rust-gdk-pixbuf-sys" ,rust-gdk-pixbuf-sys-0.9)
-        ("rust-gio" ,rust-gio-0.8)
-        ("rust-gio-sys" ,rust-gio-sys-0.9)
-        ("rust-glib" ,rust-glib-0.9)
-        ("rust-glib-sys" ,rust-glib-sys-0.9)
-        ("rust-gobject-sys" ,rust-gobject-sys-0.9)
-        ("rust-itertools" ,rust-itertools-0.9)
-        ("rust-language-tags" ,rust-language-tags-0.2)
+        ("rust-float-cmp" ,rust-float-cmp-0.9)
+        ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.15)
+        ("rust-gio" ,rust-gio-0.15)
+        ("rust-glib" ,rust-glib-0.15)
+        ("rust-itertools" ,rust-itertools-0.10)
+        ("rust-language-tags" ,rust-language-tags-0.3)
         ("rust-libc" ,rust-libc-0.2)
         ("rust-locale-config" ,rust-locale-config-0.3)
         ("rust-markup5ever" ,rust-markup5ever-0.10)
-        ("rust-nalgebra" ,rust-nalgebra-0.21)
+        ("rust-nalgebra" ,rust-nalgebra-0.29)
         ("rust-num-traits" ,rust-num-traits-0.2)
         ("rust-once-cell" ,rust-once-cell-1)
-        ("rust-pkg-config" ,rust-pkg-config-0.3)
-        ("rust-pango" ,rust-pango-0.8)
-        ("rust-pango-sys" ,rust-pango-sys-0.9)
-        ("rust-pangocairo" ,rust-pangocairo-0.9)
+        ("rust-pango" ,rust-pango-0.15)
+        ("rust-pangocairo" ,rust-pangocairo-0.15)
         ("rust-rayon" ,rust-rayon-1)
-        ("rust-rctree" ,rust-rctree-0.3)
+        ("rust-rctree" ,rust-rctree-0.4)
         ("rust-rgb" ,rust-rgb-0.8)
         ("rust-regex" ,rust-regex-1)
-        ("rust-selectors" ,rust-selectors-0.22)
+        ("rust-selectors" ,rust-selectors-0.23)
         ("rust-string-cache" ,rust-string-cache-0.8)
-        ("rust-tinyvec" ,rust-tinyvec-0.3)
+        ("rust-tinyvec" ,rust-tinyvec-1)
         ("rust-url" ,rust-url-2)
         ("rust-xml5ever" ,rust-xml5ever-0.16))
        #:cargo-development-inputs
-       (("rust-assert-cmd" ,rust-assert-cmd-1)
-        ("rust-cairo-rs" ,rust-cairo-rs-0.8)
+       (("rust-anyhow" ,rust-anyhow-1)
+        ("rust-assert-cmd" ,rust-assert-cmd-2)
+        ("rust-cairo-rs" ,rust-cairo-rs-0.15)
         ("rust-chrono" ,rust-chrono-0.4)
         ("rust-criterion" ,rust-criterion-0.3)
-        ("rust-float-cmp" ,rust-float-cmp-0.8)
+        ("rust-glib" ,rust-glib-0.15)
+        ("rust-libc" ,rust-libc-0.2)
         ("rust-lopdf" ,rust-lopdf-0.26)
-        ("rust-png" ,rust-png-0.16)
-        ("rust-predicates" ,rust-predicates-1)
-        ("rust-tempfile" ,rust-tempfile-3))
+        ("rust-matches" ,rust-matches-0.1)
+        ("rust-png" ,rust-png-0.17)
+        ("rust-predicates" ,rust-predicates-2)
+        ("rust-proptest" ,rust-proptest-1)
+        ("rust-serde" ,rust-serde-1)
+        ("rust-serde-json" ,rust-serde-json-1)
+        ("rust-tempfile" ,rust-tempfile-3)
+        ("rust-test-generator" ,rust-test-generator-0.3)
+        ("rust-yeslogic-fontconfig-sys" ,rust-yeslogic-fontconfig-sys-2))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-docbook-xml
-           (lambda* (#:key inputs #:allow-other-keys)
-             (with-directory-excursion "doc"
-               (substitute* "rsvg-docs.xml"
-                 (("http://www.oasis-open.org/docbook/xml/4.3/")
-                  (string-append (assoc-ref inputs "docbook-xml")
-                                 "/xml/dtd/docbook/"))))))
          (add-after 'unpack 'prepare-for-build
            (lambda _
              ;; In lieu of #:make-flags
@@ -3673,30 +3671,6 @@ for dealing with different structured file formats.")
               (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))))
          (replace 'build
            (assoc-ref gnu:%standard-phases 'build))
-         (add-before 'check 'ignore-failing-tests
-           ;; stderr=```/tmp/guix-build-.../librsvg-2.50.1/rsvg-convert: line 150: ls: command not found
-           (lambda _
-             (substitute* "tests/src/cmdline/rsvg_convert.rs"
-               (("fn background_color_option_invalid_color_yields_error" all)
-                (string-append "#[ignore] " all))
-               (("fn empty_input_yields_error" all)
-                (string-append "#[ignore] " all))
-               (("fn empty_svg_yields_error" all)
-                (string-append "#[ignore] " all))
-               (("fn env_source_data_epoch_empty" all)
-                (string-append "#[ignore] " all))
-               (("fn env_source_data_epoch_no_digits" all)
-                (string-append "#[ignore] " all))
-               (("fn env_source_data_epoch_trailing_garbage" all)
-                (string-append "#[ignore] " all))
-               (("fn export_id_option_error" all)
-                (string-append "#[ignore] " all))
-               (("fn huge_zoom_factor_yields_error" all)
-                (string-append "#[ignore] " all))
-               (("fn multiple_input_files_not_allowed_for_png_output" all)
-                (string-append "#[ignore] " all))
-               (("fn stylesheet_option_error" all)
-                (string-append "#[ignore] " all)))))
          (replace 'check
            (lambda* args
              ((assoc-ref gnu:%standard-phases 'check)
@@ -3704,8 +3678,7 @@ for dealing with different structured file formats.")
          (replace 'install
            (assoc-ref gnu:%standard-phases 'install)))))
     (native-inputs
-     (list docbook-xml-4.3
-           `(,glib "bin")
+     (list `(,glib "bin")
            gobject-introspection
            pkg-config
            vala))
@@ -3721,34 +3694,6 @@ diagrams.")
     (home-page "https://wiki.gnome.org/LibRsvg")
     (license license:lgpl2.1+)))
 
-;; This copy of librsvg uses the bundled rust libraries. It is useful for
-;; packages which have too many dependencies to be rebuilt as frequently
-;; as the rust inputs are updated.
-;; TODO: Remove this package and use packaged rust libraries!
-(define-public librsvg-bootstrap
-  (package
-    (inherit librsvg)
-    (name "librsvg")
-    (version "2.50.7")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/librsvg/"
-                                  (version-major+minor version)  "/"
-                                  "librsvg-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1g3f8byg5w08fx1bka12mmpl59v6a4q2p827w6m2la6mijq63yzz"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  (for-each delete-file (find-files "vendor" "\\.a$"))))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments librsvg)
-       ((#:vendor-dir _ "vendor") "vendor")
-       ((#:cargo-inputs _) '())
-       ((#:cargo-development-inputs _) '())))
-    (properties '((hidden? . #t)))))
-
 (define-public librsvg-2.40
   ;; This is the last version implemented in C.
   (package
@@ -4547,60 +4492,6 @@ passwords in the GNOME keyring.")
 (define-public vala
   (package
     (name "vala")
-    (version "0.54.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/vala/"
-                                  (version-major+minor version) "/"
-                                  "vala-" version ".tar.xz"))
-              (sha256
-               (base32
-                "048k5c6c6y7jyb961krnrb7m0kghr0yrkpnfx3j5ckbx652yfkc8"))))
-    (build-system glib-or-gtk-build-system)
-    (arguments
-     '(#:configure-flags '("--enable-coverage")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-docbook-xml
-           (lambda* (#:key inputs #:allow-other-keys)
-             (with-directory-excursion "doc/manual"
-               (substitute* '("manual.xml" "version.xml.in")
-                 (("http://www.oasis-open.org/docbook/xml/4.4/")
-                  (string-append (assoc-ref inputs "docbook-xml")
-                                 "/xml/dtd/docbook/"))))))
-         (add-before 'check 'pre-check
-           (lambda _
-             (setenv "CC" "gcc")
-             (substitute* "valadoc/tests/libvaladoc\
-/tests-extra-environment.sh"
-               (("export PKG_CONFIG_PATH=" m)
-                (string-append m "$PKG_CONFIG_PATH:"))))))))
-    (native-inputs
-     `(("bison" ,bison)
-       ("dbus" ,dbus)                   ; for dbus tests
-       ("docbook-xml" ,docbook-xml-4.4)
-       ("docbook-xsl" ,docbook-xsl)
-       ("flex" ,flex)
-       ("gobject-introspection" ,gobject-introspection) ; for gir tests
-       ("help2man" ,help2man)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("xsltproc" ,libxslt)))
-    (propagated-inputs
-     `(("glib" ,glib)                   ; required by libvala-0.40.pc
-       ("libgvc" ,graphviz)))
-    (home-page "https://wiki.gnome.org/Projects/Vala/")
-    (synopsis "Compiler using the GObject type system")
-    (description "Vala is a programming language using modern high level
-abstractions without imposing additional runtime requirements and without using
-a different ABI compared to applications and libraries written in C.  Vala uses
-the GObject type system and has additional code generation routines that make
-targeting the GNOME stack simple.")
-    (license license:lgpl2.1+)))
-
-(define-public vala-next
-  (package
-    (inherit vala)
     (version "0.56.3")
     (source (origin
               (method url-fetch)
@@ -4610,6 +4501,7 @@ targeting the GNOME stack simple.")
               (sha256
                (base32
                 "1gwrnr0d0bqkh6m4bgz39mh3pcswcj43hyijlwgwp2bvpwhn41p1"))))
+    (build-system glib-or-gtk-build-system)
     (arguments
      (list
       #:configure-flags #~(list "CC=gcc" "--enable-coverage")
@@ -4634,7 +4526,29 @@ targeting the GNOME stack simple.")
           ;; Wrapping the binaries breaks vala's behavior adaptations based on
           ;; the file name of the program executed (vala: compile and execute,
           ;; valac: compile into a binary).
-          (delete 'glib-or-gtk-wrap))))))
+          (delete 'glib-or-gtk-wrap))))
+    (native-inputs
+     (list bison
+           dbus                         ; for dbus tests
+           docbook-xml-4.4
+           docbook-xsl
+           flex
+           gobject-introspection        ; for gir tests
+           help2man
+           perl
+           pkg-config
+           libxslt))
+    (propagated-inputs
+     (list glib                         ; required by libvala-0.40.pc
+           graphviz))
+    (home-page "https://wiki.gnome.org/Projects/Vala/")
+    (synopsis "Compiler using the GObject type system")
+    (description "Vala is a programming language using modern high level
+abstractions without imposing additional runtime requirements and without using
+a different ABI compared to applications and libraries written in C.  Vala uses
+the GObject type system and has additional code generation routines that make
+targeting the GNOME stack simple.")
+    (license license:lgpl2.1+)))
 
 ;;; An older variant kept to build libsoup-minimal-2.
 (define-public vala-0.52
@@ -4985,7 +4899,7 @@ indicators etc).")
 (define-public glib-networking
   (package
     (name "glib-networking")
-    (version "2.70.0")
+    (version "2.72.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/glib-networking/"
@@ -4993,24 +4907,12 @@ indicators etc).")
                                   "glib-networking-" version ".tar.xz"))
               (sha256
                (base32
-                "0dbg1na239mbavn4hknkax5sns9q2dbdnqw9wcpmhv58mzkhid36"))
+                "0s42l6dkajciqc99zp6dc9l8yv9g8w7d8mgv97l7h7drgd60hand"))
               (patches
                (search-patches "glib-networking-gnutls-binding.patch"))))
     (build-system meson-build-system)
-    (arguments
-     (if (target-64bit?)
-         '()
-         (list #:phases
-               #~(modify-phases %standard-phases
-                   (add-after 'unpack 'work-around-32-bit-time-t
-                     (lambda _
-                       (invoke "patch" "--force" "-p1" "-i"
-                               #$(local-file
-                                  (search-patch
-                                   "glib-networking-32-bit-time.patch")))))))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("gettext" ,gettext-minimal)))
+     (list pkg-config gettext-minimal))
     (inputs
      (list glib gnutls gsettings-desktop-schemas libproxy))
     (home-page "https://wiki.gnome.org/Projects/GLib")
@@ -5093,14 +4995,10 @@ files.")
        #:configure-flags
        '("--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt")))
     (native-inputs
-     `(("glib-mkenums" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("pkg-config" ,pkg-config)))
+     (list `(,glib "bin") gobject-introspection pkg-config))
     (propagated-inputs
      ;; rest-0.7.pc refers to all these.
-     `(("glib"    ,glib)
-       ("libsoup" ,libsoup-minimal-2)
-       ("libxml2" ,libxml2)))
+     (list glib libsoup-minimal-2 libxml2))
     (home-page "https://www.gtk.org/")
     (synopsis "RESTful web api query library")
     (description
@@ -5149,7 +5047,7 @@ libxml to ease remote use of the RESTful API.")
     (inputs (list json-glib))
     (propagated-inputs
      (modify-inputs (package-propagated-inputs rest)
-       (replace "libsoup" libsoup)
+       (replace "libsoup-minimal" libsoup)
        (append json-glib)))))
 
 (define-public libshumate
@@ -5200,7 +5098,7 @@ as OpenStreetMap, OpenCycleMap, OpenAerialMap and Maps.")
 (define-public libsoup-minimal
   (package
     (name "libsoup-minimal")
-    (version "3.0.4")
+    (version "3.0.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/libsoup/"
@@ -5208,7 +5106,7 @@ as OpenStreetMap, OpenCycleMap, OpenAerialMap and Maps.")
                                   "libsoup-" version ".tar.xz"))
               (sha256
                (base32
-                "0ysnvvfd2f6w2z6g31spqqb8wgyamixc7mryzbbpyw0z15g8plsv"))))
+                "1j7p3cz6hwi9js9rp0pbas7cdln97yg9v2l1nv5imhcr6p7r1pzb"))))
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags '("-Dgtk_doc=false")
@@ -5233,7 +5131,6 @@ as OpenStreetMap, OpenCycleMap, OpenAerialMap and Maps.")
     (native-inputs
      (list `(,glib "bin") ;for glib-mkenums
            gobject-introspection
-           intltool
            pkg-config
            python-wrapper
            vala
@@ -5262,8 +5159,9 @@ and the GLib main loop, to integrate well with GNOME applications.")
 
 ;;; An older variant kept to build the 'rest' package.
 (define-public libsoup-minimal-2
-  (package/inherit libsoup-minimal
-    (version "2.72.0")
+  (package
+    (inherit libsoup-minimal)
+    (version "2.74.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/libsoup/"
@@ -5271,7 +5169,7 @@ and the GLib main loop, to integrate well with GNOME applications.")
                                   "libsoup-" version ".tar.xz"))
               (sha256
                (base32
-                "11skbyw2pw32178q3h8pi7xqa41b2x4k6q4k9f75zxmh8s23y30p"))))
+                "0n8is108n0dn4dw7nm2wq9rydcm1vy47w40wywfrxqazdrjjg97h"))))
     (arguments
      (substitute-keyword-arguments (package-arguments libsoup-minimal)
        ((#:phases phases)
@@ -5723,65 +5621,66 @@ file.")
 (define-public colord-minimal
   (package
     (name "colord-minimal")
-    (version "1.4.5")
+    (version "1.4.6")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.freedesktop.org/software/colord/releases/"
                            "colord-" version ".tar.xz"))
        (sha256
-        (base32 "05sydi6qqqx1rrqwnga1vbg9srkf89wdcfw5w4p4m7r37m2flx5p"))))
+        (base32 "0vwfx06k1in8hci3kdxpc3c0bh81f1vl5bp7favd3rdz4wd661vl"))))
     (build-system meson-build-system)
     (arguments
-     '( ;; FIXME: One test fails:
-       ;; /colord/icc-store (in lib/colord/colord-self-test-private):
-       ;; Incorrect content type for /tmp/colord-vkve/already-exists.icc, got
-       ;; application/x-zerosize
-       #:tests? #f
-       #:glib-or-gtk? #t
-       #:configure-flags (list "-Dargyllcms_sensor=false" ;requires spotread
-                               "-Dbash_completion=false"
-                               "-Ddaemon_user=colord"
-                               "-Ddocs=false"
-                               "-Dlocalstatedir=/var"
-                               "-Dman=false"
-                               "-Dsane=true"
-                               "-Dsystemd=false") ;no systemd
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'patch-build-system
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "rules/meson.build"
-               (("udev.get_pkgconfig_variable\\('udevdir'\\)")
-                (string-append "'" (assoc-ref outputs "out") "/lib/udev'")))))
-         (add-before 'configure 'set-sqlite3-file-name
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; "colormgr dump" works by invoking the "sqlite3" command.
-             ;; Record its absolute file name.
-             (let ((sqlite (assoc-ref inputs "sqlite")))
-               (substitute* "client/cd-util.c"
-                 (("\"sqlite3\"")
-                  (string-append "\"" sqlite "/bin/sqlite3\"")))))))))
-    (native-inputs
-     `(("glib:bin" ,glib "bin")         ; for glib-compile-resources, etc.
-       ("gettext" ,gettext-minimal)
-       ("pkg-config" ,pkg-config)
-       ("vala" ,vala)))
+     (list
+      #:glib-or-gtk? #t
+      #:configure-flags #~(list "-Dargyllcms_sensor=false" ;requires spotread
+                                "-Dbash_completion=false"
+                                "-Ddaemon_user=colord"
+                                "-Ddocs=false"
+                                "-Dlocalstatedir=/var"
+                                "-Dman=false"
+                                "-Dsystemd=false") ;no systemd
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-problematic-tests
+            (lambda _
+              ;; Skip the colord-test-private, which requires a *system* D-Bus
+              ;; session, which wants to run as root, among other requirements
+              ;; (see: https://github.com/hughsie/colord/issues/97).
+              (substitute* "lib/colord/meson.build"
+                ((".*test\\('colord-test-private'.*") ""))))
+          (add-before 'configure 'patch-build-system
+            (lambda _
+              (substitute* "rules/meson.build"
+                (("udev.get_pkgconfig_variable\\('udevdir'\\)")
+                 (string-append "'" #$output "/lib/udev'")))))
+          (add-before 'configure 'set-sqlite3-file-name
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; "colormgr dump" works by invoking the "sqlite3" command.
+              ;; Record its absolute file name.
+              (substitute* "client/cd-util.c"
+                (("\"sqlite3\"")
+                 (format #f "~s" (search-input-file inputs
+                                                    "bin/sqlite3")))))))))
+    (native-inputs
+     (list `(,glib "bin")               ; for glib-compile-resources, etc.
+           gettext-minimal
+           pkg-config
+           vala))
     (propagated-inputs
      ;; colord.pc refers to all these.
-     `(("glib" ,glib)
-       ("lcms" ,lcms)
-       ("udev" ,eudev)))
+     (list glib
+           lcms
+           eudev))
     (inputs
-     `(("dbus-glib" ,dbus-glib)
-       ("gobject-introspection" ,gobject-introspection)
-       ("gusb" ,gusb-minimal)
-       ("libgudev" ,libgudev)
-       ("libusb" ,libusb)
-       ("polkit" ,polkit)
-       ("python" ,python-wrapper)
-       ("sqlite" ,sqlite)
-       ("sane-backends" ,sane-backends)))
+     (list dbus-glib
+           gobject-introspection
+           gusb-minimal
+           libgudev
+           libusb
+           polkit
+           python-wrapper
+           sqlite))
     (home-page "https://www.freedesktop.org/software/colord/")
     (synopsis "Color management service")
     (description "Colord is a system service that makes it easy to manage,
@@ -5808,6 +5707,7 @@ output devices.")
             (append '("-Dbash_completion=true"
                       "-Ddocs=true"
                       "-Dman=true"
+                      "-Dsane=true"
                       "-Dvapi=true")
                     (fold delete #$flags '("-Dbash_completion=false"
                                            "-Ddocs=false"
@@ -5828,6 +5728,7 @@ output devices.")
                gtk-doc/stable
                libxml2                  ;for XML_CATALOG_FILES
                libxslt
+               sane-backends
                vala)))))                ;for VAPI, needed by simple-scan
 
 (define-public geoclue
@@ -7294,76 +7195,6 @@ supports any scanner for which a suitable SANE driver is available, which is
 almost all of them.")
     (license license:gpl3+)))
 
-(define-public eolie
-  (package
-    (name "eolie")
-    (version "0.9.101")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://adishatz.org/eolie/eolie-"
-                                  version ".tar.xz"))
-              (sha256
-               (base32
-                "1v8n21y75abdzsnx5idyd0q6yfb6cd0sqbknlbkwh5fdgvjzyvwn"))))
-    (build-system meson-build-system)
-    (arguments
-     `(#:glib-or-gtk? #t
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'skip-gtk-update-icon-cache
-           ;; Don't create 'icon-theme.cache'.
-           (lambda _
-             (substitute* "meson_post_install.py"
-               (("gtk-update-icon-cache") "true"))
-             #t))
-         (add-after 'wrap 'wrap-more
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    ;; These libraries must be on LD_LIBRARY_PATH.
-                    (libs '("gtkspell3" "webkitgtk" "libsoup" "libsecret"
-                            "atk" "gtk+" "gsettings-desktop-schemas"
-                            "gobject-introspection"))
-                    (path (string-join
-                           (map (lambda (lib)
-                                  (string-append (assoc-ref inputs lib) "/lib"))
-                                libs)
-                           ":")))
-               (wrap-program (string-append out "/bin/eolie")
-                 `("LD_LIBRARY_PATH" ":" prefix (,path))
-                 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
-                 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
-             #t)))))
-    (native-inputs
-     `(("intltool" ,intltool)
-       ("itstool" ,itstool)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python)
-       ("glib:bin" ,glib "bin")))
-    (inputs
-     `(("gobject-introspection" ,gobject-introspection)
-       ("glib-networking" ,glib-networking)
-       ("cairo" ,cairo)
-       ("gtk+" ,gtk+)
-       ("atk" ,atk)    ; propagated by gtk+, but we need it in LD_LIBRARY_PATH
-       ("python" ,python-wrapper)
-       ("python-dateutil" ,python-dateutil)
-       ("python-pyfxa" ,python-pyfxa)
-       ("python-pygobject" ,python-pygobject)
-       ("python-pycairo" ,python-pycairo)
-       ("python-pycrypto" ,python-pycrypto)
-       ("libhandy" ,libhandy)
-       ("libsecret" ,libsecret)
-       ("gtkspell3" ,gtkspell3)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("gnome-settings-daemon" ,gnome-settings-daemon) ; desktop-schemas are not enough
-       ("webkitgtk" ,webkitgtk-with-libsoup2)))
-    (home-page "https://wiki.gnome.org/Apps/Eolie")
-    (synopsis "Web browser for GNOME")
-    (description
-     "Eolie is a new web browser for GNOME.  It features Firefox sync support,
-a secret password store, an adblocker, and a modern UI.")
-    (license license:gpl3+)))
-
 (define-public epiphany
   (package
     (name "epiphany")
@@ -7548,16 +7379,13 @@ environments.")
         (base32 "19d46rkajvr0f04560vlrzwvac88x5j8ilvzwkawbn5vjg069kf8"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
-       (list
-        "--enable-doc")))
+     '(#:configure-flags '("--enable-doc")))
     (native-inputs
-     `(("ducktype" ,mallard-ducktype)
-       ("gettext" ,gettext-minimal)
-       ("intltool" ,intltool)
-       ("itstool" ,itstool)
-       ("xmllint" ,libxml2)
-       ("xsltproc" ,libxslt)))
+     (list mallard-ducktype
+           gettext-minimal
+           itstool
+           libxml2
+           libxslt))
     (synopsis "XSL stylesheets for Yelp")
     (description "Yelp-XSL is a collection of programs and data files to help
 you build, maintain, and distribute documentation.  It provides XSLT stylesheets
@@ -7751,8 +7579,7 @@ metadata in photo and video files of various formats.")
            `(,glib "bin")
            itstool
            pkg-config
-           python
-           vala-next))
+           python))
     (inputs
      (list gcr
            gexiv2
@@ -7883,7 +7710,8 @@ configuration program to choose applications starting on login.")
 (define-public gjs
   (package
     (name "gjs")
-    (version "1.72.2")
+    ;; Note: We use a pre-release for compatibility with recent LibFFI.
+    (version "1.73.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -7891,7 +7719,7 @@ configuration program to choose applications starting on login.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0xrrv9lsi087yb9yf146a1aarf5yh6rf4jw9blx30zasvjdkgvnx"))
+                "0xfspsc1q4xm7p500lmy17b9csyaqps1kilylq8wjjd0fjqq8ayg"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -7922,7 +7750,7 @@ configuration program to choose applications starting on login.")
            xorg-server-for-tests))
     (propagated-inputs
      ;; These are all in the Requires.private field of gjs-1.0.pc.
-     (list cairo gobject-introspection mozjs-91))
+     (list cairo gobject-introspection mozjs))
     (inputs
      (list gtk+ readline))
     (synopsis "Javascript bindings for GNOME")
@@ -8065,10 +7893,12 @@ to display dialog boxes from the commandline and shell scripts.")
       #~(list
          ;; Otherwise, the RUNPATH will lack the final path component.
          (string-append "-Dc_link_args=-Wl,-rpath="
-                        #$output "/lib:"
-                        #$output "/lib/mutter-9")
+                        #$output "/lib,-rpath="
+                        #$output "/lib/mutter-10")
          ;; Disable systemd support.
          "-Dsystemd=false"
+         ;; Don't install tests.
+         "-Dinstalled_tests=false"
          ;; The following flags are needed for the bundled clutter
          (string-append "-Dxwayland_path="
                         (search-input-file %build-inputs "bin/Xwayland"))
@@ -8082,15 +7912,13 @@ to display dialog boxes from the commandline and shell scripts.")
       #:test-options '(list "--verbose")
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'adjust-runpath-linker-directives
+          (add-after 'unpack 'use-RUNPATH-instead-of-RPATH
             (lambda _
-              ;; By default Mutter uses RPATH instead of RUNPATH, which our
-              ;; customized linker script makes use of.  Some libraries are
-              ;; also installed under lib/mutter-10 and need to be added to
-              ;; the RUNPATH.
+              ;; The build system disables RUNPATH in favor of RPATH to work
+              ;; around a peculiarity of their CI system.  Ignore that.
               (substitute* "meson.build"
-                (("'-Wl,--disable-new-dtags'")
-                 (string-append "'-Wl,-rpath=" #$output "/lib/mutter-10'")))))
+                (("disable-new-dtags")
+                 "enable-new-dtags"))))
           (add-after 'unpack 'patch-dlopen-calls
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "src/wayland/meta-wayland-egl-stream.c"
@@ -8178,7 +8006,7 @@ to display dialog boxes from the commandline and shell scripts.")
            autoconf
            automake
            libtool
-           wayland-protocols-next
+           wayland-protocols
            ;; For tests.
            ;; Warnings are configured to be fatal during the tests; add an icon
            ;; theme to please libxcursor.
@@ -8399,7 +8227,6 @@ Microsoft Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
            libphonenumber
            mit-krb5
            openldap
-           pango-next                   ;remove after it's the default
            webkitgtk))
     (synopsis "Store address books and calendars")
     (home-page "https://wiki.gnome.org/Apps/Evolution")
@@ -8698,8 +8525,7 @@ services.")
            libnma
            libsecret
            network-manager
-           openvpn
-           pango-next))                 ;remove after it's the default
+           openvpn))
     (home-page "https://wiki.gnome.org/Projects/NetworkManager/VPN")
     (synopsis "OpenVPN plug-in for NetworkManager")
     (description
@@ -8749,8 +8575,7 @@ to virtual private networks (VPNs) via OpenVPN.")
            vpnc
            network-manager
            libnma
-           libsecret
-           pango-next))                 ;TODO: remove after it's the default
+           libsecret))                 ;TODO: remove after it's the default
     (home-page "https://wiki.gnome.org/Projects/NetworkManager/VPN")
     (synopsis "VPNC plug-in for NetworkManager")
     (description
@@ -8802,8 +8627,7 @@ Compatible with Cisco VPN concentrators configured to use IPsec.")
            libxml2
            lz4
            network-manager
-           openconnect
-           pango-next))                 ;TODO: remove after it's the default
+           openconnect))
     (home-page "https://wiki.gnome.org/Projects/NetworkManager/VPN")
     (synopsis "OpenConnect plug-in for NetworkManager")
     (description
@@ -8866,7 +8690,6 @@ Cisco's AnyConnect SSL VPN.")
                   libsecret
                   network-manager
                   openfortivpn
-                  pango-next ;TODO: remove after it's the default
                   ppp))
     (home-page "https://wiki.gnome.org/Projects/NetworkManager/VPN")
     (synopsis "Fortinet SSLVPN plug-in for NetworkManager")
@@ -9293,8 +9116,6 @@ usage and information about running processes.")
      (list eudev
            gsound
            libnotify
-           ;; TODO: Delete pango-next after it's the default.
-           pango-next
            python-dbus
            upower))
     (synopsis "GNOME Bluetooth subsystem")
@@ -10007,10 +9828,9 @@ files.")
            python
            vala))
     (inputs
-     (list gtk libadwaita libhandy
-           ;; XXX: Ensure pango-next is used instead of the equally propagated
-           ;; 'pango'.
-           pango-next))
+     (list gtk
+           libadwaita
+           libhandy))
     (synopsis "Disk usage analyzer for GNOME")
     (description
      "Baobab (Disk Usage Analyzer) is a graphical application to analyse disk
@@ -10023,7 +9843,7 @@ is complete it provides a graphical representation of each selected folder.")
 (define-public gnome-backgrounds
   (package
     (name "gnome-backgrounds")
-    (version "41.0")
+    (version "42.0")
     (source
      (origin
        (method url-fetch)
@@ -10032,7 +9852,7 @@ is complete it provides a graphical representation of each selected folder.")
                            name "-" version ".tar.xz"))
        (sha256
         (base32
-         "0i9id5z72dqddh94648zylyf41amqq5lhny8sbyg1v8v4q6sr88x"))))
+         "0p99q434c8qgj5wxcma9jj4dh1ff9x984ncs31vmz725kyhf2zsc"))))
     (build-system meson-build-system)
     (native-inputs (list gettext-minimal))
     (home-page "https://gitlab.gnome.org/GNOME/gnome-backgrounds")
@@ -10333,7 +10153,7 @@ world.")
           ;; Packages not part of GNOME proper but that are needed for a good
           ;; experience.  See <https://bugs.gnu.org/39646>.
           ;; XXX: Find out exactly which ones are needed and why.
-          at-spi2-core-minimal
+          at-spi2-core
           dbus
           dconf
           desktop-file-utils
@@ -10554,7 +10374,7 @@ Microsoft SkyDrive and Hotmail, using their REST protocols.")
            `(,glib "bin")               ; for glib-compile-resources
            itstool
            pkg-config
-           vala-next))
+           vala))
     (inputs
      (list geoclue
            geocode-glib-with-libsoup2
@@ -10608,9 +10428,7 @@ desktop.  It supports world clock, stop watch, alarms, and count down timer.")
            gsettings-desktop-schemas
            libadwaita
            libdazzle
-           libgweather4-with-libsoup2
-           ;; Remove pango-next when it's the default.
-           pango-next))
+           libgweather4-with-libsoup2))
     (home-page "https://wiki.gnome.org/Apps/Calendar")
     (synopsis "GNOME's calendar application")
     (description
@@ -12538,13 +12356,13 @@ integrate seamlessly with the GNOME desktop.")
            itstool
            pkg-config
            python
-           vala-next))
+           vala))
     (inputs
      (list glib-networking              ;for TLS support
            gsettings-desktop-schemas
            gtk
            gtk-vnc
-           gtksourceview
+           gtksourceview-4
            json-glib
            libarchive
            libgudev
@@ -13449,7 +13267,7 @@ your data.")
            libgda
            libhandy
            libsoup
-           pango-next))
+           pango))
     (propagated-inputs
      (list gtksourceview-4))              ; required for source view
     (home-page "https://wiki.gnome.org/Apps/Gtranslator")
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index ffd5d62a71..9b00338178 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2017, 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Fredrik Salomonsson <plattfot@posteo.net>
@@ -91,7 +91,7 @@
 (define-public libgpg-error
   (package
     (name "libgpg-error")
-    (version "1.42")
+    (version "1.45")
     (source
      (origin
       (method url-fetch)
@@ -99,7 +99,7 @@
                           version ".tar.bz2"))
       (sha256
        (base32
-        "08syj8mlarww8mh8x3s0x6hjqbnxp2lkg3hab57qqpv1dh7yf1zw"))))
+        "09haz1kk48b8q0hd58g98whylah0fp121yfgjms7pzsbzgj8w3sp"))))
     (build-system gnu-build-system)
     (arguments
      (if (%current-target-system)
@@ -142,7 +142,7 @@
                              (_ #t)))
                           (#t #t)))))))
          '()))
-    (native-inputs `(("gettext" ,gettext-minimal)))
+    (native-inputs (list gettext-minimal))
     (home-page "https://gnupg.org")
     (synopsis "Library of error values for GnuPG components")
     (description
@@ -157,14 +157,14 @@ Daemon and possibly more in the future.")
 (define-public libgcrypt
   (package
     (name "libgcrypt")
-    (version "1.8.8")
+    (version "1.10.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1xasrh9zxhgj2n5n8dvpzbwn1mzpmlzy270xhbq2gl8xk2xy4pc9"))))
+               "1pp9zyx02bzgzjzldxf0mx9kp3530xgaaqcz4n2cv100ddaaw57g"))))
     (build-system gnu-build-system)
     (propagated-inputs
      `(("libgpg-error-host" ,libgpg-error)))
@@ -176,10 +176,20 @@ Daemon and possibly more in the future.")
      ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
      ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
      `(#:configure-flags
-       (list (string-append "--with-gpg-error-prefix="
+       (list (string-append "--with-libgpg-error-prefix="
                             (assoc-ref %build-inputs "libgpg-error-host"))
-             ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
-             ,@(if (%current-target-system) '("--disable-asm")
+             ;; libgcrypt is transitioning from gpg-error-config to
+             ;; gpgrt-config, and in the process the
+             ;; --with-libgpg-error-config prefix defined above is
+             ;; not respected.  See <https://dev.gnupg.org/T5365>.
+             ;; TODO: transition to pkg-config instead of these scripts.
+             (string-append "ac_cv_path_GPGRT_CONFIG="
+                            (assoc-ref %build-inputs
+                                       "libgpg-error-host")
+                            "/bin/gpgrt-config")
+             ,@(if (%current-target-system)
+                   ;; When cross-compiling, _gcry_mpih_lshift etc are undefined.
+                   `("--disable-asm")
                    '()))))
     (outputs '("out" "debug"))
     (home-page "https://gnupg.org/")
@@ -223,8 +233,7 @@ provided.")
 (define-public libksba
   (package
     (name "libksba")
-    (version "1.6.0")
-    (replacement libksba/fixed)
+    (version "1.6.3")
     (source
      (origin
       (method url-fetch)
@@ -233,7 +242,7 @@ provided.")
             version ".tar.bz2"))
       (sha256
        (base32
-        "12x40y9ihs8nw2xs2y2vjfw90mhikbm5rvabma0dh5frybk87mns"))))
+        "0p6y82j9y6n0l7scjgqhz3as9w13jiqjfx9n2jzynw89nf6wcwiz"))))
     (build-system gnu-build-system)
     (propagated-inputs
      (list libgpg-error))
@@ -254,18 +263,6 @@ specifications are building blocks of S/MIME and TLS.")
     (properties '((ftp-server . "ftp.gnupg.org")
                   (ftp-directory . "/gcrypt/libksba")))))
 
-(define libksba/fixed
-  (package
-    (inherit libksba)
-    (version "1.6.3")
-        (source
-     (origin
-      (method url-fetch)
-      (uri (string-append
-            "mirror://gnupg/libksba/libksba-" version ".tar.bz2"))
-      (sha256
-       (base32 "0p6y82j9y6n0l7scjgqhz3as9w13jiqjfx9n2jzynw89nf6wcwiz"))))))
-
 (define-public npth
   (package
     (name "npth")
@@ -295,10 +292,7 @@ compatible to GNU Pth.")
     (name "gnupg")
     ;; Note: The 2.2.X releases are Long Term Support (LTS), so stick to it
     ;; for our stable 'gnupg'.
-    ;; Note2: 2.2.33 currently suffers from regressions, so do not update to it
-    ;; (see: https://dev.gnupg.org/T5742).
-    (version "2.2.32")
-    (replacement gnupg/fixed)
+    (version "2.2.39")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
@@ -306,7 +300,7 @@ compatible to GNU Pth.")
               (patches (search-patches "gnupg-default-pinentry.patch"))
               (sha256
                (base32
-                "0506gv54z10c96z5821z9p0ksibk1pfilsmag39ffqrcz0sinmxj"))))
+                "0bscgv9gg9yhlpyia7b9l438cq6dvv6pwlhbl70df9phhmkdnx5b"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config))
@@ -322,37 +316,39 @@ compatible to GNU Pth.")
            readline
            sqlite
            zlib))
-   (arguments
-    `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
-                          ;; executable in its installation directory in
-                          ;; /gnu/store before it has been installed.
-                          "--enable-gnupg-builddir-envvar"
-                          "--enable-all-tests")
+    (arguments
+     (list
+      #:configure-flags #~'(;; Otherwise, the test suite looks for the `gpg`
+                            ;; executable in its installation directory in
+                            ;; /gnu/store before it has been installed.
+                            "--enable-gnupg-builddir-envvar"
+                            "--enable-all-tests")
       #:phases
-      (modify-phases %standard-phases
-        (add-before 'configure 'patch-paths
-          (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "scd/scdaemon.c"
-              (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
-               (string-append "\"" (assoc-ref inputs "pcsc-lite")
-                              "/lib/" name "\"")))))
-        (add-after 'build 'patch-scheme-tests
-          (lambda _
-            (substitute* (find-files "tests" ".\\.scm$")
-              (("/usr/bin/env gpgscm")
-               (string-append (getcwd) "/tests/gpgscm/gpgscm")))))
-        (add-before 'build 'patch-test-paths
-          (lambda _
-            (substitute* '("tests/inittests"
-                           "tests/pkits/inittests"
-                           "tests/Makefile"
-                           "tests/pkits/common.sh"
-                           "tests/pkits/Makefile")
-             (("/bin/pwd") (which "pwd")))
-            (substitute* "common/t-exectool.c"
-              (("/bin/cat") (which "cat"))
-              (("/bin/true") (which "true"))
-              (("/bin/false") (which "false"))))))))
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'patch-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((libpcsclite.so (search-input-file inputs
+                                                       "lib/libpcsclite.so")))
+                (substitute* "scd/scdaemon.c"
+                  (("libpcsclite\\.so")
+                   libpcsclite.so)))))
+          (add-after 'build 'patch-scheme-tests
+            (lambda _
+              (substitute* (find-files "tests" ".\\.scm$")
+                (("/usr/bin/env gpgscm")
+                 (string-append (getcwd) "/tests/gpgscm/gpgscm")))))
+          (add-before 'build 'patch-test-paths
+            (lambda _
+              (substitute* '("tests/inittests"
+                             "tests/pkits/inittests"
+                             "tests/Makefile"
+                             "tests/pkits/common.sh"
+                             "tests/pkits/Makefile")
+                (("/bin/pwd") (which "pwd")))
+              (substitute* "common/t-exectool.c"
+                (("/bin/cat") (which "cat"))
+                (("/bin/true") (which "true"))
+                (("/bin/false") (which "false"))))))))
     (home-page "https://gnupg.org/")
     (synopsis "GNU Privacy Guard")
     (description
@@ -366,15 +362,6 @@ libskba (working with X.509 certificates and CMS data).")
     (properties '((ftp-server . "ftp.gnupg.org")
                   (ftp-directory . "/gcrypt/gnupg")))))
 
-(define gnupg/fixed
-  (package
-    (inherit gnupg)
-    (source (origin
-              (inherit (package-source gnupg))
-              (patches
-                (append (origin-patches (package-source gnupg))
-                        (search-patches "gnupg-CVE-2022-34903.patch")))))))
-
 (define-public gnupg-1
   (package (inherit gnupg)
     (version "1.4.23")
@@ -400,13 +387,13 @@ libskba (working with X.509 certificates and CMS data).")
 (define-public gpgme
   (package
     (name "gpgme")
-    (version "1.15.1")
+    (version "1.18.0")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
       (sha256
-       (base32 "1bg13l5s8x9p1v0jyv29n84bay27pflindpzjsc9gj7i4wdkrg7f"))))
+       (base32 "17hfigfnq6xz45b5xrp299f68b5mwx0aysd51sx5v4nf8yp4w79n"))))
     (build-system gnu-build-system)
     (native-inputs
      (list gnupg))
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 253b8c285c..45f474bee6 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -54,6 +54,7 @@
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system mozilla)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
@@ -209,7 +210,7 @@ fractional-second-digits-append-item.js")
            rust
            `(,rust "cargo")))
     (inputs
-     (list icu4c-71 readline zlib))
+     (list icu4c readline zlib))
     (propagated-inputs
      (list nspr))                ; in the Requires.private field of mozjs-*.pc
     (home-page
@@ -248,7 +249,7 @@ in C/C++.")
                   (delete-file
                    "non262/Intl/DateTimeFormat/tz-environment-variable.js"))))))))
     (inputs (modify-inputs (package-inputs mozjs)
-              (replace "icu4c" icu4c)))))
+              (replace "icu4c" icu4c-69)))))
 
 (define-public mozjs-78
   (package
@@ -268,6 +269,25 @@ in C/C++.")
      (substitute-keyword-arguments (package-arguments mozjs)
        ((#:phases phases)
         #~(modify-phases #$phases
+            (add-after 'unpack 'patch-for-python-3.10
+              (lambda _
+                ;; Some classes were moved from collections to collections.abc
+                ;; in Python 3.10.
+                (substitute* "python/mozbuild/mozbuild/util.py"
+                  (("collections\\.Sequence")
+                   "collections.abc.Sequence"))
+                (substitute* "python/mozbuild/mozbuild/makeutil.py"
+                  (("from collections import Iterable")
+                   "from collections.abc import Iterable"))
+                (substitute* "python/mozbuild/mozbuild/backend/configenvironment.py"
+                  (("from collections import Iterable, OrderedDict")
+                   "from collections import OrderedDict\n\
+from collections.abc import Iterable"))
+                (substitute*
+                    "testing/mozbase/manifestparser/manifestparser/filters.py"
+                  (("from collections import defaultdict, MutableSequence")
+                   "from collections import defaultdict\n\
+from collections.abc import MutableSequence"))))
             (replace 'configure
               (lambda* (#:key configure-flags #:allow-other-keys)
                 ;; The configure script does not accept environment variables as
@@ -350,7 +370,7 @@ in C/C++.")
            rust
            `(,rust "cargo")))
     (inputs
-     (list icu4c readline zlib))))
+     (list icu4c-69 readline zlib))))
 
 
 ;;;
@@ -677,7 +697,7 @@ variable defined below.  It requires guile-json to be installed."
     (name "icecat-minimal")
     (version %icecat-version)
     (source icecat-source)
-    (build-system gnu-build-system)
+    (build-system mozilla-build-system)
     (inputs
      (list alsa-lib
            bzip2
@@ -708,7 +728,7 @@ variable defined below.  It requires guile-json to be installed."
            libffi
            ffmpeg
            libvpx
-           icu4c-71  ; TODO: Change to 'icu4c' when its version is >= 71.
+           icu4c
            pixman
            pulseaudio
            mesa
@@ -717,7 +737,7 @@ variable defined below.  It requires guile-json to be installed."
            hunspell
            libnotify
            nspr-next
-           nss-next
+           nss
            shared-mime-info
            sqlite
            eudev
@@ -1499,7 +1519,7 @@ ca495991b7852b855"))
            gtk+
            gtk+-2
            hunspell
-           icu4c-71
+           icu4c
            libcanberra
            libevent
            libffi
@@ -1514,7 +1534,7 @@ ca495991b7852b855"))
            libxt
            mesa
            mit-krb5
-           nss-next
+           nss
            pango
            pixman
            pulseaudio
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index bcc27cc3bf..e2ae894801 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -361,60 +361,54 @@ objects!")
     (license license:lgpl2.1+)))
 
 (define-public autotrace
-  (let ((commit "travis-20190624.59")
-        (version-base "0.40.0"))
-    (package
-      (name "autotrace")
-      (version (string-append version-base "-"
-                              (if (string-prefix? "travis-" commit)
-                                  (string-drop commit 7)
-                                  commit)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/autotrace/autotrace")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (patches (search-patches "autotrace-glib-compat.patch"))
-                (sha256
-                 (base32
-                  "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))
-      (build-system gnu-build-system)
-      (arguments
-       `(#:phases (modify-phases %standard-phases
-                    ;; See: https://github.com/autotrace/autotrace/issues/27.
-                    (add-after 'unpack 'include-spline.h-header
-                      (lambda _
-                        (substitute* "Makefile.am"
-                          ((".*src/types.h.*" all)
-                           (string-append all "\t\tsrc/spline.h \\\n")))
-                        #t))
-                    ;; See: https://github.com/autotrace/autotrace/issues/26.
-                    (replace 'check
-                      (lambda _
-                        (invoke "sh" "tests/runtests.sh"))))))
-      (native-inputs
-       `(("which" ,which)
-         ("pkg-config" ,pkg-config)
-         ("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("intltool" ,intltool)
-         ("libtool" ,libtool)
-         ("gettext" ,gettext-minimal)))
-      (inputs
-       `(("glib" ,glib)
-         ("libjpeg" ,libjpeg-turbo)
-         ("libpng" ,libpng)
-         ("imagemagick" ,imagemagick)
-         ("pstoedit" ,pstoedit)))
-      (home-page "https://github.com/autotrace/autotrace")
-      (synopsis "Bitmap to vector graphics converter")
-      (description "AutoTrace is a utility for converting bitmap into vector
+  (package
+    (name "autotrace")
+    (version "0.31.9")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/autotrace/autotrace")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0fsg13pg72ac51l3fkzvyf7h9mzbvfxp9vfjfiwkyvx6hbm83apj"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags #~'("--disable-static")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-pkg-config-file
+                 (lambda _
+                   ;; autotrace can be built against either GraphicsMagick or
+                   ;; ImageMagick.  However the pkg-config file refers to
+                   ;; non-existent MAGICK_ variables instead of GRAPHICSMAGICK_
+                   ;; or IMAGEMAGICK_; fix that.
+                   (substitute* "autotrace.pc.in"
+                     (("@MAGICK_(LIBS|CFLAGS)@" _ var)
+                      (string-append "@IMAGEMAGICK_" var "@"))))))))
+    (native-inputs
+     (list which
+           autoconf
+           automake
+           libtool
+           intltool
+           pkg-config
+           procps))                     ;for tests
+    (inputs
+     (list glib
+           imagemagick
+           libjpeg-turbo
+           libpng
+           pstoedit))
+    (home-page "https://github.com/autotrace/autotrace")
+    (synopsis "Bitmap to vector graphics converter")
+    (description "AutoTrace is a utility for converting bitmap into vector
 graphics.  It can trace outlines and midlines, effect color reduction or
 despeckling and has support for many input and output formats.  It can be used
 with the @command{autotrace} utility or as a C library, @code{libautotrace}.")
-      (license (list license:gpl2+         ;for the utility itself
-                     license:lgpl2.1+))))) ;for use as a library
+    (license (list license:gpl2+        ;for the utility itself
+                   license:lgpl2.1+)))) ;for use as a library
 
 (define-public embree
   (package
@@ -872,7 +866,7 @@ exception-handling library.")
 (define-public lib2geom
   (package
     (name "lib2geom")
-    (version "1.1")
+    (version "1.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -881,7 +875,7 @@ exception-handling library.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "03bx9k1m4bfhmx0ldsg0bks6i8h7fmvl5vbg6gmpq0bk0nkmpnmv"))))
+                "0dq981g894hmvhd6rmfl1w32mksg9hpvpjs1qvfxrnz87rhkknj8"))))
     (build-system cmake-build-system)
     (arguments
      `(#:imported-modules ((guix build python-build-system)
@@ -938,20 +932,6 @@ basic geometries.")
     ;; https://gitlab.com/inkscape/inkscape/issues/784).
     (license license:gpl3+)))
 
-(define-public lib2geom-1.2
-  (package
-    (inherit lib2geom)
-    (version "1.2")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://gitlab.com/inkscape/lib2geom")
-                    (commit version)))
-              (file-name (git-file-name "lib2geom" version))
-              (sha256
-               (base32
-                "0dq981g894hmvhd6rmfl1w32mksg9hpvpjs1qvfxrnz87rhkknj8"))))))
-
 (define-public python-booleanoperations
   (package
     (name "python-booleanoperations")
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index f1038a83eb..aa3cee6e5b 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -68,7 +68,7 @@
 (define-public graphviz
   (package
     (name "graphviz")
-    (version "2.49.0")
+    (version "7.0.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://gitlab.com/api/v4/projects/4207231"
@@ -76,24 +76,16 @@
                                   version "/graphviz-" version ".tar.xz"))
               (sha256
                (base32
-                "042s6mbi681pwgffqww2ap780230nrsrfpfiz9a41dcjb5a0m524"))))
+                "1b6x3g03j7q77lzyvdp34hkzld5sg1l1ippc6sh1qxnmm59xs3ly"))))
     (build-system gnu-build-system)
     (arguments
      ;; FIXME: rtest/rtest.sh is a ksh script (!).  Add ksh as an input.
      (list #:tests? #f
            #:phases
            #~(modify-phases %standard-phases
-               (add-after 'install 'move-docs
+               (add-after 'install 'move-guile-bindings
                  (lambda* (#:key outputs #:allow-other-keys)
-                   (let ((out (assoc-ref outputs "out"))
-                         (doc (assoc-ref outputs "doc")))
-                     (mkdir-p (string-append doc "/share/graphviz"))
-                     (rename-file (string-append out "/share/graphviz/doc")
-                                  (string-append doc "/share/graphviz/doc")))))
-               (add-after 'move-docs 'move-guile-bindings
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (let* ((out (assoc-ref outputs "out"))
-                          (lib (string-append out "/lib"))
+                   (let* ((lib (string-append #$output "/lib"))
                           (extdir (string-append lib "/guile/"
                                                  #$(version-major+minor
                                                     (package-version
@@ -105,22 +97,24 @@
                                   (string-append extdir
                                                  "/libgv_guile.so"))))))))
     (inputs
-     `(("libXrender" ,libxrender)
-       ("libX11" ,libx11)
-       ("gts" ,gts)
-       ("gd" ,gd)
-       ("guile" ,guile-3.0)                       ;Guile bindings
-       ("pango" ,pango)
-       ("fontconfig" ,fontconfig)
-       ("freetype" ,freetype)
-       ("libltdl" ,libltdl)
-       ("libXaw" ,libxaw)
-       ("expat" ,expat)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)))
+     (list libxrender
+           libx11
+           gts
+           gd
+           guile-3.0                    ;Guile bindings
+           pango
+           fontconfig
+           freetype
+           libltdl
+           libxaw
+           expat
+           libjpeg-turbo
+           libpng))
     (native-inputs
-     (list bison swig pkg-config))
-    (outputs '("out" "doc"))                      ; 5 MiB of html + pdfs
+     (list bison
+           pkg-config
+           swig))
+    (outputs '("out" "doc"))            ;5 MiB of html + pdfs
     (home-page "https://www.graphviz.org/")
     (synopsis "Graph visualization software")
     (description
@@ -200,6 +194,7 @@ interfaces for other technical domains.")
      (list unzip
            ;; For tests.
            graphviz
+           python-mock
            python-pytest
            python-pytest-cov
            python-pytest-mock))
@@ -433,8 +428,8 @@ graphs in Graphviz's DOT language, written in pure Python.")
            ;; the resulting generated TeX files, which \usepackage them.
            texlive-bin
            texlive-amsmath
+           texlive-graphics
            texlive-latex-geometry
-           texlive-latex-graphics
            texlive-latex-base
            texlive-latex-preview
            texlive-latex-xkeyval
diff --git a/gnu/packages/gsasl.scm b/gnu/packages/gsasl.scm
index 70624f9c59..2923bd6465 100644
--- a/gnu/packages/gsasl.scm
+++ b/gnu/packages/gsasl.scm
@@ -77,14 +77,14 @@ the underlying security implementation.")
 (define-public gsasl
   (package
    (name "gsasl")
-   (version "2.0.1")
+   (version "2.2.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gsasl/gsasl-" version
                                 ".tar.gz"))
             (sha256
              (base32
-              "0yhvq3n6smgnc7fp0smmly8d248248xr7q2apbcbqhc80117ab1j"))))
+              "0nbp62isfdfrsnp34vfkwinfjyw9x05clacvsn2c8vcpp7inif3r"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '("--with-gssapi-impl=mit"
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index f33a30a02b..90335c6bb2 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -244,10 +244,7 @@ and very fast.")
              (chdir "libvisual")
              #t)))))
     (native-inputs
-     `(("gettext" ,gettext-minimal)
-       ("libintl" ,intltool)
-       ("libtool" ,libtool)
-       ("pkg-config" ,pkg-config)))
+     (list gettext-minimal intltool libtool pkg-config))
     (inputs
      (list sdl))
     (native-search-paths
@@ -299,20 +296,20 @@ applications that want audio visualisation and audio visualisation plugins.")
              (chdir "libvisual-plugins")
              #t)))))
     (native-inputs
-     `(("bison" ,bison)
-       ("flex" ,flex)
-       ("gettext" ,gettext-minimal)
-       ("libintl" ,intltool)
-       ("libtool" ,libtool)
-       ("pkg-config" ,pkg-config)))
+     (list bison
+           flex
+           gettext-minimal
+           intltool
+           libtool
+           pkg-config))
     (inputs
-     `(("alsa-lib" ,alsa-lib)
-       ("esound" ,esound)
-       ("librsvg" ,librsvg)
-       ("gtk+" ,gtk+-2)
-       ("jack" ,jack-2)
-       ("libx11" ,libx11)
-       ("libxext" ,libxext)))
+     (list alsa-lib
+           esound
+           librsvg
+           gtk+-2
+           jack-2
+           libx11
+           libxext))
     (propagated-inputs
      (list libvisual))
     (synopsis "Audio visualisation library")
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index b9ef660a80..65854e0ba0 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -233,7 +233,7 @@ tools have full access to view and control running applications.")
        ("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)))
     (inputs
-     `(("bash-minimal" ,bash-minimal)
+     `(("bash-minimal" ,bash-minimal)   ;for glib-or-gtk-wrap
        ("drm" ,libdrm)
        ("ghostscript" ,ghostscript)
        ("libspectre" ,libspectre)
@@ -285,67 +285,41 @@ output.  Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.")
 
 (define-public harfbuzz
   (package
-   (name "harfbuzz")
-   (version "2.8.2")
-   (source (origin
-             (method url-fetch)
-             (uri (string-append "https://github.com/harfbuzz/harfbuzz"
-                                 "/releases/download/" version "/harfbuzz-"
-                                 version ".tar.xz"))
-             (sha256
-              (base32
-               "1rvv86wpm3y04fqns1655268rhvhvms469837709v2z2bhwn316m"))))
-   (build-system gnu-build-system)
-   (outputs '("out"
-              "bin")) ; 160K, only hb-view depend on cairo
-   (inputs
-    (list cairo))
-   (propagated-inputs
-    ;; There are all in the Requires or Requires.private field of '.pc'.
-    (list glib graphite2 icu4c))
-   (native-inputs
-    `(("glib:bin" ,glib "bin")          ;for glib-mkenums
-      ("gobject-introspection" ,gobject-introspection)
-      ("pkg-config" ,pkg-config)
-      ("python" ,python-wrapper)
-      ("which" ,which)))
-   (arguments
-    `(#:configure-flags `("--with-graphite2"
-                          "--with-gobject"
-                          ,(string-append
-                            "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
-   (synopsis "OpenType text shaping engine")
-   (description
-    "HarfBuzz is an OpenType text shaping engine.")
-   (license (license:x11-style "file://COPYING"
-                       "See 'COPYING' in the distribution."))
-   (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
-
-(define-public harfbuzz-3
-  (package
-    (inherit harfbuzz)
-    (version "3.4.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/harfbuzz/harfbuzz"
-                                  "/releases/download/" version
-                                  "/harfbuzz-" version ".tar.xz"))
-              (sha256
-               (base32
-                "0lprrl8iih8ji1n17xwm5llz05a1hv4g04b7a3y229dq9myahn3i"))))))
-
-(define-public harfbuzz-4
-  (package
-    (inherit harfbuzz)
-    (version "4.3.0")
+    (name "harfbuzz")
+    (version "5.3.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/harfbuzz/harfbuzz"
-                                  "/releases/download/" version
-                                  "/harfbuzz-" version ".tar.xz"))
+                                  "/releases/download/" version "/harfbuzz-"
+                                  version ".tar.xz"))
               (sha256
                (base32
-                "0c5mzwgz43d37h75p4b6cgjg4v24jdd96i7gjpgxirn8qks2i5m4"))))))
+                "0ka3nkk2lks2lgakq02vyibwdziv11dkpa2brkx230asnyby0v2a"))))
+    (build-system gnu-build-system)
+    (outputs '("out"
+               "bin"))                  ;160K, only hb-view depend on cairo
+    (inputs
+     (list cairo))
+    (propagated-inputs
+     ;; There are all in the Requires or Requires.private field of '.pc'.
+     (list glib graphite2 icu4c))
+    (native-inputs
+     (list `(,glib "bin")               ;for glib-mkenums
+           gobject-introspection
+           pkg-config
+           python-wrapper
+           which))
+    (arguments
+     (list #:configure-flags
+           #~(list "--with-graphite2"
+                   "--with-gobject"
+                   (string-append "--bindir=" #$output:bin "/bin"))))
+    (synopsis "OpenType text shaping engine")
+    (description
+     "HarfBuzz is an OpenType text shaping engine.")
+    (license (license:x11-style "file://COPYING"
+                                "See 'COPYING' in the distribution."))
+    (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
 
 
 (define-public harfbuzz-5
@@ -394,7 +368,7 @@ representing trie.  Trie is a kind of digital search tree.")
 (define-public libthai
   (package
     (name "libthai")
-    (version "0.1.28")
+    (version "0.1.29")
     (source
      (origin
        (method url-fetch)
@@ -402,7 +376,7 @@ representing trie.  Trie is a kind of digital search tree.")
         (string-append "https://linux.thai.net/pub/thailinux/software/"
                        "libthai/libthai-" version ".tar.xz"))
        (sha256
-        (base32 "04g93bgxrcnay9fglpq2lj9nr7x1xh06i60m7haip8as9dxs3q7z"))))
+        (base32 "1kab1w6i1fb76807xrwjfac8n2nky8jbvkhpnh117qahrdywr07w"))))
     (build-system gnu-build-system)
     (outputs '("out" "doc"))
     (arguments
@@ -427,7 +401,7 @@ applications.")
 (define-public pango
   (package
     (name "pango")
-    (version "1.48.10")
+    (version "1.50.10")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/pango/"
@@ -436,7 +410,7 @@ applications.")
               (patches (search-patches "pango-skip-libthai-test.patch"))
               (sha256
                (base32
-                "166wxhsjb6hb0dk7wkkdcmpvasl9n0a0aa64mdgagzfdidwzbq91"))))
+                "0rj9sszflckk8gj47ppirpndpp3mzsx97l64lalj8kc580g2ypby"))))
     (build-system meson-build-system)
     (arguments
      '(#:glib-or-gtk? #t             ; To wrap binaries and/or compile schemas
@@ -452,26 +426,27 @@ applications.")
                         (("\\[ 'test-harfbuzz'.*") "")))))))
     (propagated-inputs
      ;; These are all in Requires or Requires.private of the '.pc' files.
-     `(("cairo" ,cairo)
-       ("fontconfig" ,fontconfig)
-       ("freetype" ,freetype)
-       ("fribidi" ,fribidi)
-       ("glib" ,glib)
-       ("harfbuzz" ,harfbuzz)
-       ("libthai" ,libthai)
-       ;; Some packages, such as Openbox, expect Pango to be built with the
-       ;; optional libxft support.
-       ("libxft" ,libxft)
-       ("libxrender" ,libxrender)))
+     (list cairo
+           fontconfig
+           freetype
+           fribidi
+           glib
+           harfbuzz
+           libthai
+           ;; Some packages, such as Openbox, expect Pango to be built with the
+           ;; optional libxft support.
+           libxft
+           libxrender))
     (inputs
-     (list bash-minimal zlib))
+     (list bash-minimal
+           zlib))
     (native-inputs
-     `(("glib" ,glib "bin")                             ; glib-mkenums, etc.
-       ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
-       ("help2man" ,help2man)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)))
+     (list `(,glib "bin")               ;glib-mkenums, etc.
+           gobject-introspection        ;g-ir-compiler, etc.
+           help2man
+           perl
+           pkg-config
+           python-wrapper))
     (synopsis "Text and font handling library")
     (description "Pango is a library for laying out and rendering of text, with
 an emphasis on internationalization.  Pango can be used anywhere that text
@@ -481,22 +456,6 @@ handling for GTK+-2.x.")
     (home-page "https://pango.gnome.org/")
     (license license:lgpl2.0+)))
 
-;; TODO: Make this the default package in next release cycle.
-(define-public pango-next
-  (package
-    (inherit pango)
-    (name "pango-next")                 ;to avoid profile conflicts
-    (version "1.50.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/pango/"
-                                  (version-major+minor version)
-                                  "/pango-" version ".tar.xz"))
-              (patches (search-patches "pango-skip-libthai-test.patch"))
-              (sha256
-               (base32
-                "0qn1a7ccs3p5vc6swbqm6hdzka879l0gp9220lq4bcf2gpl67bgl"))))))
-
 (define-public pango-1.42
   (package
    (inherit pango)
@@ -543,9 +502,7 @@ handling for GTK+-2.x.")
                #~(begin
                    (substitute* "pango/pangocairo-font.c"
                      (("cairo_user_font_face_set_render_color_glyph_func")
-                      "cairo_user_font_face_set_render_glyph_func"))))))
-    (inputs (modify-inputs (package-inputs pango)
-               (prepend harfbuzz-4)))))
+                      "cairo_user_font_face_set_render_glyph_func"))))))))
 
 (define-public pangox-compat
   (package
@@ -713,8 +670,8 @@ printing and other features typical of a source code editor.")
            glib-next
            gtk
            libxml2
-           pcre2
-           pango-next))
+           pango
+           pcre2))
     (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
     (synopsis "GNOME source code widget")
     (description "GtkSourceView is a text widget that extends the standard
@@ -741,7 +698,6 @@ highlighting and other features typical of a source code editor.")
     (propagated-inputs
      (modify-inputs (package-propagated-inputs gtksourceview)
        (replace "gtk" gtk+)
-       (replace "pango-next" pango)
        (replace "glib" glib)))))
 
 (define-public gtksourceview-3
@@ -766,7 +722,7 @@ highlighting and other features typical of a source code editor.")
 (define-public gdk-pixbuf
   (package
     (name "gdk-pixbuf")
-    (version "2.42.4")
+    (version "2.42.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -774,7 +730,7 @@ highlighting and other features typical of a source code editor.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0k9f9177qxaryaxprwrhqnv5p2gdq4a8i6y05gm98qa8izc5v77y"))))
+                "1iplb43nn74pp3w1wjwwn522i9man6jia85k6j8v4494rcxfmb44"))))
     (build-system meson-build-system)
     (outputs '("out" "debug"))
     (arguments
@@ -782,57 +738,42 @@ highlighting and other features typical of a source code editor.")
        #:configure-flags '("-Dinstalled_tests=false")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-docbook
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             (with-directory-excursion "docs"
-               (substitute* "meson.build"
-                 (("http://docbook.sourceforge.net/release/xsl/current/")
-                  (string-append (assoc-ref ,(if (%current-target-system)
-                                                 '(or native-inputs inputs)
-                                                 'inputs) "docbook-xsl")
-                                 "/xml/xsl/docbook-xsl-1.79.2/")))
-               (substitute* (find-files "." "\\.xml$")
-                 (("http://www.oasis-open.org/docbook/xml/4\\.3/")
-                  (string-append (assoc-ref ,(if (%current-target-system)
-                                                 '(or native-inputs inputs)
-                                                 'inputs) "docbook-xml")
-                                 "/xml/dtd/docbook/"))))))
          (add-before 'configure 'disable-failing-tests
            (lambda _
              (substitute* "tests/meson.build"
                (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],")
                 ""))))
          ;; The slow tests take longer than the specified timeout.
-         ,@(if (any (cute string=? <> (%current-system))
-                    '("armhf-linux" "aarch64-linux"))
+         ,@(if (target-arm? (%current-system))
                '((replace 'check
-                   (lambda _
-                     (invoke "meson" "test" "--timeout-multiplier" "5"))))
+                   (lambda* (#:key tests? #:allow-other-keys)
+                     (when tests?
+                       (invoke "meson" "test" "--timeout-multiplier" "5")))))
                '()))))
     (propagated-inputs
-     (list ;; Required by gdk-pixbuf-2.0.pc
-           glib
-           ;; Required by gdk-pixbuf-xlib-2.0.pc
-           ;; TODO: Remove on core-updates.
-           libx11
-           ;; Used for testing and required at runtime.
-           shared-mime-info))
+     (list glib                         ;in Requires of gdk-pixbuf-2.0.pc
+
+           ;; These are in Requires.private of gdk-pixbuf-2.0.pc
+           libjpeg-turbo
+           libpng
+           libtiff
+           shared-mime-info))           ;required at runtime, too
     (inputs
-     `(,@(if (%current-target-system)
-             `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
-             '())
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng"  ,libpng)
-       ("libtiff" ,libtiff)))
+     (if (%current-target-system)
+         (list bash-minimal)            ;for glib-or-gtk-wrap
+         '()))
     (native-inputs
-     `(("docbook-xml" ,docbook-xml-4.3)
-       ("docbook-xsl" ,docbook-xsl)
-       ("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")                             ; glib-mkenums, etc.
-       ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("xsltproc" ,libxslt)))
+     (list gettext-minimal
+           `(,glib "bin")               ;glib-mkenums, etc.
+           gobject-introspection        ;g-ir-compiler, etc.
+           perl
+           pkg-config
+
+           ;; For the documentation.
+           docbook-xml-4.3
+           docbook-xsl
+           libxml2                      ;for XML_CATALOG_FILES
+           libxslt))                    ;for xsltproc
     (native-search-paths
      ;; This file is produced by the gdk-pixbuf-loaders-cache-file
      ;; profile hook.
@@ -877,11 +818,11 @@ ever use this library.")
     (license license:lgpl2.1+)))
 
 ;;; A minimal variant used to prevent a cycle with Inkscape.
-(define-public at-spi2-core-minimal
+(define-public at-spi2-core
   (hidden-package
    (package
      (name "at-spi2-core")
-     (version "2.40.0")
+     (version "2.45.90")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/" name "/"
@@ -889,33 +830,44 @@ ever use this library.")
                                    name "-" version ".tar.xz"))
                (sha256
                 (base32
-                 "0a9l6cfxynjn6jcp29d72i75xbkrzs1l5kmqcwmfal801b9sg5j1"))))
+                 "03dba3c6m3sfapkkbbgzvbi1qcmrrlppydxjjs1m8ds9qb9hl1g9"))))
      (build-system meson-build-system)
      (arguments
-      '(#:glib-or-gtk? #t    ; To wrap binaries and/or compile schemas
-        #:phases
-        (modify-phases %standard-phases
-          (add-after 'install 'check
-            (lambda _
-              (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
-              ;; Run test-suite under a dbus session.
-              (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
-                      (string-append %output "/share"))
-              ;; Don't fail on missing  '/etc/machine-id'.
-              (setenv "DBUS_FATAL_WARNINGS" "0") ;
-              (invoke "dbus-launch" "ninja" "test")))
-          (delete 'check))))
+      (list
+       #:glib-or-gtk? #t              ;to wrap binaries and/or compile schemas
+       #:phases
+       #~(modify-phases %standard-phases
+           (delete 'check)
+           (add-after 'install 'check
+             (lambda _
+               (setenv "HOME" (getenv "TMPDIR")) ;xfconfd requires a writable HOME
+               ;; Run test-suite under a dbus session.
+               (setenv "XDG_DATA_DIRS"  ;for finding org.xfce.Xfconf.service
+                       (string-append #$output "/share:" (getenv "XDG_DATA_DIRS")))
+               ;; Don't fail on missing  '/etc/machine-id'.
+               (setenv "DBUS_FATAL_WARNINGS" "0")
+               (with-directory-excursion (string-append "../at-spi2-core-"
+                                                        #$version "")
+                 (invoke "dbus-run-session" "--" "ci/run-registryd-tests.sh")
+                 (substitute* "ci/run-tests.sh"
+                   (("ps auxwww") "")   ;avoid a dependency on procps
+                   (("meson test -C _build")
+                    "meson test -C ../build")) ;adjust build directory
+                 (invoke "dbus-run-session" "--" "ci/run-tests.sh")))))))
      (inputs
-      (list bash-minimal))
+      (list bash-minimal libxml2))
      (propagated-inputs
       ;; atspi-2.pc refers to all these.
       (list dbus glib libx11 libxi libxtst))
      (native-inputs
-      `(("gettext" ,gettext-minimal)
-        ("glib" ,glib "bin")
-        ("gobject-introspection" ,gobject-introspection)
-        ("pkg-config" ,pkg-config)
-        ("python" ,python-wrapper)))
+      (list gettext-minimal
+            `(,glib "bin")
+            gobject-introspection
+            gsettings-desktop-schemas
+            pkg-config
+            python-dbusmock
+            python-pytest
+            python-wrapper))
      (synopsis "Assistive Technology Service Provider Interface, core components")
      (description
       "The Assistive Technology Service Provider Interface, core components,
@@ -923,86 +875,45 @@ is part of the GNOME accessibility project.")
      (license license:lgpl2.1+)
      (home-page "https://wiki.gnome.org/Accessibility/"))))
 
-(define-public at-spi2-core
-  (package/inherit at-spi2-core-minimal
-    (outputs (cons "doc" (package-outputs at-spi2-core-minimal)))
+(define-public at-spi2-core-with-documentation
+  (package/inherit at-spi2-core
+    (outputs (cons "doc" (package-outputs at-spi2-core)))
     (arguments
-     (substitute-keyword-arguments (package-arguments at-spi2-core-minimal)
+     (substitute-keyword-arguments (package-arguments at-spi2-core)
        ((#:configure-flags flags ''())
-        `(cons ,(if (%current-target-system)
-                    "-Ddocs=false"
-                    "-Ddocs=true")
-               ,flags))
+        #~(cons #$(if (%current-target-system)
+                      "-Ddocs=false"
+                      "-Ddocs=true")
+                #$flags))
        ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'set-documentation-path
-             (lambda* (#:key outputs #:allow-other-keys)
-               ;; Ensure that the cross-references point to the "doc" output.
-               (substitute* "doc/libatspi/meson.build"
-                 (("docpath =.*")
-                  (string-append "docpath = '" (assoc-ref outputs "doc")
-                                 "/share/gtk-doc/html'\n")))))
-           (add-before 'install 'prepare-doc-directory
-             (lambda* (#:key outputs #:allow-other-keys)
-               (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))))
-           ,@(if (%current-target-system)
-                 '()
-                 '((add-after 'install 'move-documentation
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let ((out (assoc-ref outputs "out"))
-                             (doc (assoc-ref outputs "doc")))
-                         (copy-recursively
-                          (string-append out "/share/gtk-doc")
-                          (string-append doc "/share/gtk-doc"))
-                         (delete-file-recursively
-                          (string-append out "/share/gtk-doc")))))))))))
+        #~(modify-phases #$phases
+            (add-after 'unpack 'set-documentation-path
+              (lambda _
+                ;; Ensure that the cross-references point to the "doc" output.
+                (substitute* "doc/libatspi/meson.build"
+                  (("docpath =.*")
+                   (string-append "docpath = '" #$output:doc
+                                  "/share/gtk-doc/html'\n")))))
+            (add-before 'install 'prepare-doc-directory
+              (lambda _
+                (mkdir-p (string-append #$output:doc "/share"))))
+            #$@(if (%current-target-system)
+                   #~()
+                   #~((add-after 'install 'move-documentation
+                        (lambda _
+                          (copy-recursively
+                           (string-append #$output "/share/gtk-doc")
+                           (string-append #$output:doc "/share/gtk-doc"))
+                          (delete-file-recursively
+                           (string-append #$output "/share/gtk-doc"))))))))))
     (native-inputs
-     (append `(("docbook-xml" ,docbook-xml-4.3)
-               ("gtk-doc" ,gtk-doc/stable)
-               ("libxml2" ,libxml2))    ;for XML_CATALOG_FILES
-         (package-native-inputs at-spi2-core-minimal)))
+     (modify-inputs (package-native-inputs at-spi2-core)
+       (append docbook-xml-4.3 gtk-doc/stable)))
     (properties (alist-delete 'hidden?
-                              (package-properties at-spi2-core-minimal)))))
+                              (package-properties at-spi2-core)))))
 
 (define-public at-spi2-atk
-  (package
-    (name "at-spi2-atk")
-    (version "2.38.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version)  "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "0ks6r9sx27l80n3a7yjmkilxv48cqj183wc7cap3caw2myjhi86g"))))
-    (build-system meson-build-system)
-    (arguments
-     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
-       ;; Compiling tests requires "libxml2" to be in 'inputs'.
-       ,@(if (%current-target-system)
-             `(#:configure-flags '("-Dtests=false"))
-             '())
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           ;; Run test-suite under a dbus session.
-           (lambda _
-             (setenv "DBUS_FATAL_WARNINGS" "0")
-             (invoke "dbus-launch" "meson" "test"))))))
-    (propagated-inputs
-     (list at-spi2-core-minimal)) ; required by atk-bridge-2.0.pc
-    (inputs
-     (list atk glib))
-    (native-inputs
-     (list dbus ; For tests
-           gobject-introspection libxml2 pkg-config))
-    (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
-    (description
-     "The Assistive Technology Service Provider Interface
-is part of the GNOME accessibility project.")
-    (license license:lgpl2.1+)
-    (home-page "https://wiki.gnome.org/Accessibility/")))
+  (deprecated-package "at-spi2-atk" at-spi2-core))
 
 (define-public gtk+-2
   (package
@@ -1023,11 +934,11 @@ is part of the GNOME accessibility project.")
     (build-system gnu-build-system)
     (outputs '("out" "bin" "doc" "debug"))
     (propagated-inputs
-     (list atk cairo
-           (if (target-x86-64?)
-             librsvg-bootstrap
-             librsvg-2.40)
-           glib pango))
+     (list atk
+           cairo
+           glib
+           (librsvg-for-system)
+           pango))
     (inputs
      (list cups
            libx11
@@ -1051,41 +962,43 @@ is part of the GNOME accessibility project.")
            python-wrapper
            xorg-server-for-tests))
     (arguments
-     `(#:parallel-tests? #f
-       #:configure-flags
-       (list "--with-xinput=yes"
-             (string-append "--with-html-dir="
-                            (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "gtk/Makefile.in"
-               (("aliasfilescheck\\.sh") ""))
-             (substitute* "gtk/tests/recentmanager.c"
-               (("g_test_add_func \\(\"/recent-manager.*;") ""))
-             (substitute* "gtk/tests/defaultvalue.c"
-               (("return g_test_run\\(\\);") ""))
-             #t))
-         (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))
-         (add-after 'install 'remove-cache
-           (lambda* (#:key outputs #:allow-other-keys)
-	     (for-each
-	      delete-file
-	      (find-files (assoc-ref outputs "out") "immodules.cache"))
-             #t)))))
+     (list
+      #:parallel-tests? #f
+      #:configure-flags
+      #~(list "--with-xinput=yes"
+              (string-append "--with-html-dir=" #$output
+                             "/share/gtk-doc/html"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-failing-tests
+            (lambda _
+              (substitute* "gtk/Makefile.in"
+                (("aliasfilescheck\\.sh") ""))
+              (substitute* "gtk/tests/recentmanager.c"
+                (("g_test_add_func \\(\"/recent-manager.*;") ""))
+              (substitute* "gtk/tests/defaultvalue.c"
+                (("return g_test_run\\(\\);") ""))
+              ;; These require XPM support in Gdk-Pixbuf which is obsolete.
+              (substitute* "gtk/tests/textbuffer.c"
+                (("g_test_add_func.*test_fill_empty\\);")
+                 "")
+                (("g_test_add_func.*test_tag\\);")
+                 ""))))
+          (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")))
+          (add-after 'install 'remove-cache
+            (lambda _
+	      (for-each delete-file
+	                (find-files #$output "immodules.cache")))))))
     (native-search-paths
      (list (search-path-specification
             (variable "GUIX_GTK2_PATH")
@@ -1118,14 +1031,12 @@ application suites.")
                                 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
     (propagated-inputs
      (list atk
-           at-spi2-atk
+           at-spi2-core
            cairo
            fribidi
            fontconfig
            freetype
-           (if (target-x86-64?)
-             librsvg-bootstrap
-             librsvg-2.40)
+           (librsvg-for-system)
            glib
            libcloudproviders-minimal
            libepoxy
@@ -1145,11 +1056,11 @@ application suites.")
            wayland
            wayland-protocols))
     (inputs
-     (list colord-minimal ;to prevent a cycle with inkscape
+     (list colord-minimal               ;to prevent a cycle with inkscape
            cups
            graphene
            harfbuzz
-           iso-codes/official ;XXX TODO core-updates: use iso-codes
+           iso-codes
            json-glib-minimal
            libxml2
            rest))
@@ -1168,67 +1079,63 @@ application suites.")
            xorg-server-for-tests
            libxslt))
     (arguments
-     `(#:imported-modules ((guix build glib-or-gtk-build-system)
+     (list
+      #:imported-modules `((guix build glib-or-gtk-build-system)
                            ,@%gnu-build-system-modules)
-       #:modules ((guix build utils)
+      #:modules '((guix build utils)
                   (guix build gnu-build-system)
                   ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
-       #:disallowed-references (,xorg-server-for-tests)
-       ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
-       ;; to "doc".
-       #:configure-flags (list (string-append "--with-html-dir="
-                                              (assoc-ref %outputs "doc")
-                                              "/share/gtk-doc/html")
-                               "--enable-cloudproviders"
-                               ;; The header file <gdk/gdkwayland.h> is required
-                               ;; by gnome-control-center
-                               "--enable-wayland-backend"
-                               ;; This is necessary to build both backends.
-                               "--enable-x11-backend"
-                               ;; This enables the HTML5 websocket backend.
-                               "--enable-broadway-backend")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
-           (assoc-ref glib-or-gtk:%standard-phases
-                      'generate-gdk-pixbuf-loaders-cache-file))
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (substitute* "testsuite/gtk/Makefile.in"
-               (("builderparser cellarea check-icon-names check-cursor-names")
-                "builderparser cellarea check-cursor-names")
-               (("notify no-gtk-init object objects-finalize papersize rbtree")
-                "no-gtk-init papersize rbtree")
-               (("stylecontext templates textbuffer textiter treemodel treepath")
-                "stylecontext textbuffer textiter treemodel treepath"))
-             (substitute* "testsuite/a11y/Makefile.in"
-               (("accessibility-dump tree-performance text children derive")
-                "tree-performance text children derive"))
-             (substitute* "testsuite/reftests/Makefile.in"
-               (("TEST_PROGS = gtk-reftest")
-                "TEST_PROGS = "))
-             #t))
-         (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))
-         (add-after 'install 'move-desktop-files
-           ;; Move desktop files into 'bin' to avoid cycle references.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (bin (assoc-ref outputs "bin")))
-               (mkdir-p (string-append bin "/share"))
-               (rename-file (string-append out "/share/applications")
-                            (string-append bin "/share/applications"))
-               #t))))))
+      #:disallowed-references (list xorg-server-for-tests)
+      ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
+      ;; to "doc".
+      #:configure-flags #~(list (string-append "--with-html-dir="
+                                               #$output "/share/gtk-doc/html")
+                                "--enable-cloudproviders"
+                                ;; The header file <gdk/gdkwayland.h> is required
+                                ;; by gnome-control-center
+                                "--enable-wayland-backend"
+                                ;; This is necessary to build both backends.
+                                "--enable-x11-backend"
+                                ;; This enables the HTML5 websocket backend.
+                                "--enable-broadway-backend")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+            (assoc-ref glib-or-gtk:%standard-phases
+                       'generate-gdk-pixbuf-loaders-cache-file))
+          (add-after 'unpack 'disable-failing-tests
+            (lambda _
+              (substitute* "testsuite/gtk/Makefile.in"
+                (("builderparser cellarea check-icon-names check-cursor-names")
+                 "builderparser cellarea check-cursor-names")
+                (("notify no-gtk-init object objects-finalize papersize rbtree")
+                 "no-gtk-init papersize rbtree")
+                (("stylecontext templates textbuffer textiter treemodel treepath")
+                 "stylecontext textbuffer textiter treemodel treepath"))
+              (substitute* "testsuite/a11y/Makefile.in"
+                (("accessibility-dump tree-performance text children derive")
+                 "tree-performance text children derive"))
+              (substitute* "testsuite/reftests/Makefile.in"
+                (("TEST_PROGS = gtk-reftest")
+                 "TEST_PROGS = "))))
+          (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")))
+          (add-after 'install 'move-desktop-files
+            ;; Move desktop files into 'bin' to avoid cycle references.
+            (lambda* (#:key outputs #:allow-other-keys)
+              (mkdir-p (string-append #$output:bin "/share"))
+              (rename-file (string-append #$output "/share/applications")
+                           (string-append #$output:bin
+                                          "/share/applications")))))))
     (native-search-paths
      (list (search-path-specification
             (variable "GUIX_GTK3_PATH")
@@ -1386,6 +1293,7 @@ application suites.")
            iso-codes
            json-glib
            libcloudproviders            ;for cloud-providers support
+           libgudev                     ;for gstreamer-gl
            libjpeg-turbo
            libpng
            libtiff
@@ -1396,9 +1304,7 @@ application suites.")
      ;; Following dependencies are referenced in .pc files.
      (list cairo
            fontconfig
-           (if (target-x86-64?)
-             librsvg-bootstrap
-             librsvg-2.40)
+           (librsvg-for-system)
            glib
            graphene
            libepoxy
@@ -1413,7 +1319,7 @@ application suites.")
            libxkbcommon
            libxrandr
            libxrender
-           pango-next
+           pango
            vulkan-headers
            vulkan-loader                ;for vulkan graphics API support
            wayland                      ;for wayland display-backend
@@ -1793,7 +1699,7 @@ library.")
 (define-public pangomm
   (package
     (name "pangomm")
-    (version "2.50.0")
+    (version "2.50.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -1801,48 +1707,45 @@ library.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0nrvvf1fyzlimh7rvxcblnrvn2l9rz8mpn2iwzlzr6kv05zafym2"))))
+                "054jglmnbig14fs99qqi5y174z9j90r6dprpyszw42742cs95jfc"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
-       #:configure-flags
-       (list
-        "-Dbuild-documentation=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'move-doc
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (assoc-ref outputs "doc")))
-               (mkdir-p (string-append doc "/share"))
-               (rename-file
-                (string-append out "/share/doc")
-                (string-append doc "/share/doc"))
-               #t))))))
+     (list
+      #:glib-or-gtk? #t              ; To wrap binaries and/or compile schemas
+      #:configure-flags #~(list "-Dbuild-documentation=true")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'move-doc
+            (lambda _
+              (mkdir-p (string-append #$output:doc "/share"))
+              (rename-file (string-append #$output "/share/doc")
+                           (string-append #$output:doc "/share/doc")))))))
     (native-inputs
-     `(("dot" ,graphviz)
-       ("doxygen" ,doxygen)
-       ("m4" ,m4)
-       ("mm-common" ,mm-common)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
-       ("python" ,python)
-       ("xsltproc" ,libxslt)))
+     (list graphviz
+           doxygen
+           m4
+           mm-common
+           perl
+           pkg-config
+           python
+           libxslt))
     (propagated-inputs
-     (list cairo cairomm glibmm pango-next))
+     (list cairo
+           cairomm
+           glibmm
+           pango))
     (home-page "https://pango.gnome.org//")
     (synopsis "C++ interface to the Pango text rendering library")
-    (description
-     "Pangomm provides a C++ programming interface to the Pango text rendering
-library.")
+    (description "Pangomm provides a C++ programming interface to the Pango
+text rendering library.")
     (license license:lgpl2.1+)))
 
 (define-public pangomm-2.46
   (package
     (inherit pangomm)
     (name "pangomm")
-    (version "2.46.0")
+    (version "2.46.2")
     (source
      (origin
        (method url-fetch)
@@ -1851,7 +1754,7 @@ library.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "06zczkaxf5p5kjgnzrfylzi40w9a8lxpndgs7rpn12qrsq27sy6k"))))
+        (base32 "1x56xb4k1d9g88a1d9rlcvy97mmj39rib6c3wfzpff04vjs2li2p"))))
     (propagated-inputs
      (list cairomm-1.14 glibmm-2.64 pango))))
 
@@ -1995,7 +1898,7 @@ tutorial.")
   (package
     (inherit gtkmm)
     (name "gtkmm")
-    (version "3.24.5")
+    (version "3.24.6")
     (source
      (origin
        (method url-fetch)
@@ -2004,7 +1907,7 @@ tutorial.")
                        (version-major+minor version)  "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "1ri2msp3cmzi6r65ghwb8gfavfaxv0axpwi3q60nm7v8hvg36qw5"))))
+        (base32 "1mhi3ws43l051fha4zssfpykraa1qc2hd408l2xk65jfjhp18gjb"))))
     (propagated-inputs
      `(("atkmm-2.28" ,atkmm-2.28)
        ("cairomm-1.14" ,cairomm-1.14)
@@ -2066,7 +1969,7 @@ printing and other features typical of a source code editor.")
 (define-public python-pycairo
   (package
     (name "python-pycairo")
-    (version "1.20.0")
+    (version "1.21.0")
     (source
      (origin
       (method url-fetch)
@@ -2074,7 +1977,7 @@ printing and other features typical of a source code editor.")
                           version "/pycairo-" version ".tar.gz"))
       (sha256
        (base32
-        "1326aa2ybhhhrvz3n4p22z5sic25m016ddb5yq0hvbprnw6a35an"))))
+        "0jxpyibpjadw8ah1mqbhvryr795myiznb1ikm8wgjbamibqhf695"))))
     (build-system python-build-system)
     (native-inputs
      (list pkg-config python-pytest))
@@ -2084,6 +1987,8 @@ printing and other features typical of a source code editor.")
     (synopsis "Python bindings for cairo")
     (description
      "Pycairo is a set of Python bindings for the Cairo graphics library.")
+    (properties
+     '((upstream-name . "pycairo")))
     (license license:lgpl3+)))
 
 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 2fd9b711ce..2adf271d07 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -8,14 +8,14 @@
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
-;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017, 2018 Amirouche <amirouche@hypermove.net>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
-;;; Copyright © 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 Timothy Sample <samplet@ngyro.com>
 ;;;
@@ -157,32 +157,35 @@ without requiring the source code to be rewritten.")
    (build-system gnu-build-system)
 
    ;; When cross-compiling, a native version of Guile itself is needed.
-   (native-inputs `(,@(if (%current-target-system)
-                          `(("self" ,this-package))
-                          '())
-                    ("pkgconfig" ,pkg-config)))
-   (inputs `(("libffi" ,libffi)
-             ,@(libiconv-if-needed)
-
-             ;; We need Bash when cross-compiling because some of the scripts
-             ;; in bin/ refer to it.  Use 'bash-minimal' because we don't need
-             ;; an interactive Bash with Readline and all.
-             ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
+   (native-inputs
+    (append (list pkg-config)
+            (if (%current-target-system)
+                (list this-package)
+                '())))
+   (inputs
+    (append (list libffi)
+            (libiconv-if-needed)
+
+            ;; We need Bash when cross-compiling because some of the scripts
+            ;; in bin/ refer to it.  Use 'bash-minimal' because we don't need
+            ;; an interactive Bash with Readline and all.
+            (if (target-mingw?) '() (list bash-minimal))))
    (propagated-inputs
-    `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
-       ;; reads `-lltdl -lunistring', adding them here will add the needed
-       ;; `-L' flags.  As for why the `.la' file lacks the `-L' flags, see
-       ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
-      ("libunistring" ,libunistring)
-
-      ;; Depend on LIBLTDL, not LIBTOOL.  That way, we avoid some the extra
-      ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
-      ("libltdl" ,libltdl)
-
-      ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
-      ;; must be propagated.
-      ("bdw-gc" ,libgc)
-      ("gmp" ,gmp)))
+    (list
+     ;; These ones aren't normally needed here, but since `libguile-2.0.la'
+     ;; reads `-lltdl -lunistring', adding them here will add the needed
+     ;; `-L' flags.  As for why the `.la' file lacks the `-L' flags, see
+     ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
+     libunistring
+
+     ;; Depend on LIBLTDL, not LIBTOOL.  That way, we avoid some the extra
+     ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
+     libltdl
+
+     ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
+     ;; must be propagated.
+     libgc
+     gmp))
 
    (outputs '("out" "debug"))
 
@@ -215,17 +218,21 @@ without requiring the source code to be rewritten.")
         (add-before 'configure 'pre-configure
           (lambda* (#:key inputs #:allow-other-keys)
             ;; Tell (ice-9 popen) the file name of Bash.
+
+            ;; TODO: On the next rebuild cycle, unconditionally use
+            ;; 'search-input-file' instead of 'assoc-ref'.
             (let ((bash (assoc-ref inputs "bash")))
               (substitute* "module/ice-9/popen.scm"
                 ;; If bash is #f allow fallback for user to provide
                 ;; "bash" in PATH.  This happens when cross-building to
                 ;; MinGW for which we do not have Bash yet.
                 (("/bin/sh")
-                 ,@(if (target-mingw?)
-                       '((if bash
-                             (string-append bash "/bin/bash")
-                             "bash"))
-                       '((string-append bash "/bin/bash")))))
+                 ,(cond ((target-mingw?)
+                         "bash")
+                        ((%current-target-system)
+                         '(search-input-file inputs "/bin/bash"))
+                        (else
+                         '(string-append bash "/bin/bash")))))
               #t))))))
 
    (native-search-paths
@@ -247,7 +254,8 @@ without requiring the source code to be rewritten.")
    (license license:lgpl3+)))
 
 (define-public guile-2.2
-  (package (inherit guile-2.0)
+  (package
+    (inherit guile-2.0)
     (name "guile")
     (version "2.2.7")
     (source (origin
@@ -310,22 +318,19 @@ without requiring the source code to be rewritten.")
   (package
     (inherit guile-2.2)
     (name "guile")
-    (version "3.0.7")
+    (version "3.0.9")
     (source (origin
               (inherit (package-source guile-2.2))
-              (patches '())     ; We no longer need the patches.
               (uri (string-append "mirror://gnu/guile/guile-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm"))
+                "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))
+              (patches '())
               ;; Replace the snippet because the oom-test still
               ;; fails on some 32-bit architectures.
-              (snippet '(begin
-                          (substitute* "test-suite/standalone/Makefile.in"
-                            (("test-out-of-memory") ""))
-                          (for-each delete-file
-                                    (find-files "prebuilt" "\\.go$"))))))
+              (snippet '(for-each delete-file
+                                  (find-files "prebuilt" "\\.go$")))))
 
     ;; Build with the bundled mini-GMP to avoid interference with GnuTLS' own
     ;; use of GMP via Nettle: <https://issues.guix.gnu.org/46330>.
@@ -334,6 +339,11 @@ without requiring the source code to be rewritten.")
        (delete "gmp" "libltdl")))
     (arguments
      (substitute-keyword-arguments (package-arguments guile-2.0)
+       ;; Guile 3.0.9 is bit-reproducible when built in parallel, thanks to
+       ;; its multi-stage build process for cross-module inlining, except when
+       ;; cross-compiling.
+       ((#:parallel-build? _ #f)
+        (not (%current-target-system)))
        ((#:configure-flags flags ''())
         ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
         `(cons* ,@(if (hurd-target?)
@@ -360,15 +370,16 @@ without requiring the source code to be rewritten.")
                  (("!#")
                   "!#\n(exit 77)\n"))))
 
-           ,@(if (string-prefix? "powerpc-" (%current-system))
-                 `((add-after 'unpack 'adjust-bootstrap-flags
-                     (lambda _
-                       ;; Upstream knows about suggested solution.
-                       ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
-                       (substitute* "bootstrap/Makefile.in"
-                         (("^GUILE_OPTIMIZATIONS.*")
-                          "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
-                 '())
+           ,@(if (target-ppc32?)
+               `((add-after 'unpack 'adjust-bootstrap-flags
+                   (lambda _
+                     ;; Upstream knows about suggested solution.
+                     ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
+                     ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46
+                     (substitute* "stage0/Makefile.in"
+                       (("^GUILE_OPTIMIZATIONS.*")
+                        "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
+               '())
            ,@(if (or (target-ppc32?)
                      (target-riscv64?))
                `((add-after 'unpack 'skip-failing-fdes-test
@@ -388,36 +399,7 @@ without requiring the source code to be rewritten.")
             (files '("lib/guile/3.0/site-ccache"
                      "share/guile/site/3.0")))))))
 
-(define-public guile-3.0-latest
-  (package
-    (inherit guile-3.0)
-    (version "3.0.9")
-    (source (origin
-              (inherit (package-source guile-3.0))
-              (uri (string-append "mirror://gnu/guile/guile-"
-                                  version ".tar.xz"))
-              (sha256
-               (base32
-                "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments guile-3.0)
-       ;; Guile 3.0.9 is bit-reproducible when built in parallel, thanks to
-       ;; its multi-stage build process for cross-module inlining, except when
-       ;; cross-compiling.
-       ((#:parallel-build? _ #f)
-        (not (%current-target-system)))
-       ((#:phases phases)
-        `(modify-phases ,phases
-           ,@(if (target-ppc32?)
-               `((replace 'adjust-bootstrap-flags
-                   (lambda _
-                     ;; Upstream knows about suggested solution.
-                     ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
-                     ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46
-                     (substitute* "stage0/Makefile.in"
-                       (("^GUILE_OPTIMIZATIONS.*")
-                        "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
-               '())))))))
+(define-public guile-3.0-latest guile-3.0)
 
 ;;; The symbol guile-3.0/fixed should be used when guile-3.0 needs fixes
 ;;; (security or else) and this deprecation could be removed.
@@ -467,10 +449,7 @@ without requiring the source code to be rewritten.")
                      (display ,version port)))))
              (add-before 'check 'skip-failing-tests
                (lambda _
-                 (substitute* "test-suite/standalone/test-out-of-memory"
-                   (("!#") "!#\n\n(exit 77)\n"))
-                 (delete-file "test-suite/tests/version.test")
-                 #t))))))
+                 (delete-file "test-suite/tests/version.test")))))))
       (native-inputs
        (modify-inputs (package-native-inputs guile-3.0)
          (prepend autoconf
@@ -480,7 +459,7 @@ without requiring the source code to be rewritten.")
                   gnu-gettext
                   texinfo
                   gperf)
-         (replace "self" this-package)))
+         (replace "guile" this-package)))
       (synopsis "Development version of GNU Guile"))))
 
 (define* (make-guile-readline guile #:optional (name "guile-readline"))
@@ -528,11 +507,9 @@ without requiring the source code to be rewritten.")
                       #t)))))
     (home-page (package-home-page guile))
     (native-inputs (package-native-inputs guile))
-    (inputs
-     `(,@(package-inputs guile)                   ;to placate 'configure'
-       ,@(package-propagated-inputs guile)
-       ("guile" ,guile)
-       ("readline" ,readline)))
+    (propagated-inputs (package-propagated-inputs guile))
+    (inputs (modify-inputs (package-inputs guile)
+              (prepend guile readline)))
     (synopsis "Line editing support for GNU Guile")
     (description
      "This module provides line editing support via the Readline library for
@@ -596,10 +573,6 @@ GNU@tie{}Guile.  Use the @code{(ice-9 readline)} module and call its
                  (substitute* "test-suite/tests/version.test"
                    (("\\(pass-if \"version reporting works\"" m)
                     (string-append "#;" m)))
-                 ;; Warning: Unwind-only `out-of-memory' exception; skipping pre-unwind handler.
-                 ;; FAIL: test-out-of-memory
-                 (substitute* "test-suite/standalone/Makefile.am"
-                   (("(check_SCRIPTS|TESTS) \\+= test-out-of-memory") ""))
 
                  (patch-shebang "build-aux/git-version-gen")
                  (invoke "sh" "autogen.sh")
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index dddc85459a..c6d301c76c 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -730,7 +730,11 @@ interactive environment for the functional language Haskell.")
     (inputs
      `(("gmp" ,gmp)
        ("ncurses" ,ncurses)
-       ("libffi" ,libffi)
+
+       ;; Use a LibFFI variant without static trampolines to work around
+       ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
+       ("libffi" ,libffi-sans-static-trampolines)
+
        ("ghc-testsuite"
         ,(origin
            (method url-fetch)
@@ -894,7 +898,9 @@ interactive environment for the functional language Haskell.")
     (supported-systems '("i686-linux" "x86_64-linux"))
     (outputs '("out" "doc"))
     (inputs
-     (list gmp ncurses libffi))
+     ;; Use a LibFFI variant without static trampolines to work around
+     ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
+     (list gmp ncurses libffi-sans-static-trampolines))
     (native-inputs
      `(("perl" ,perl)
        ("python" ,python-2)                ; for tests
@@ -1002,7 +1008,13 @@ interactive environment for the functional language Haskell.")
                  version "/" name "-" version "-testsuite.tar.xz"))
            (sha256
             (base32
-             "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))))))
+             "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))))
     (arguments
      (substitute-keyword-arguments (package-arguments ghc-8.0)
        ((#:phases phases)
@@ -1064,10 +1076,17 @@ interactive environment for the functional language Haskell.")
            (uri (string-append
                  "https://www.haskell.org/ghc/dist/"
                  version "/" name "-" version "-testsuite.tar.xz"))
-           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
+                                    "ghc-testsuite-grep-compat.patch"))
            (sha256
             (base32
-             "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))))
+             "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))
        ,@(filter (match-lambda
                    (("ghc-bootstrap" . _) #f)
                    (("ghc-testsuite" . _) #f)
@@ -1139,10 +1158,17 @@ interactive environment for the functional language Haskell.")
            (uri (string-append
                  "https://www.haskell.org/ghc/dist/"
                  version "/ghc-" version "-testsuite.tar.xz"))
-           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
+                                    "ghc-testsuite-grep-compat.patch"))
            (sha256
             (base32
-             "0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))))
+             "0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))
        ("git" ,git-minimal/pinned)                 ; invoked during tests
        ,@(filter (match-lambda
                    (("ghc-bootstrap" . _) #f)
@@ -1191,10 +1217,17 @@ interactive environment for the functional language Haskell.")
            (uri (string-append
                  "https://www.haskell.org/ghc/dist/"
                  version "/ghc-" version "-testsuite.tar.xz"))
-           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
+                                    "ghc-testsuite-grep-compat.patch"))
            (sha256
             (base32
-             "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))))
+             "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))
        ("git" ,git-minimal/pinned)                 ; invoked during tests
        ,@(filter (match-lambda
                    (("ghc-bootstrap" . _) #f)
@@ -1321,7 +1354,8 @@ interactive environment for the functional language Haskell.")
                     version "/ghc-" version "-testsuite.tar.xz"))
              (sha256
               (base32
-               "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l"))))
+               "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l"))
+             (patches (search-patches "ghc-9.2-grep-warnings.patch"))))
          ,@(filter (match-lambda
                      (("ghc-bootstrap" . _) #f)
                      (("ghc-testsuite" . _) #f)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 7d52c5889e..de15587cb0 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -248,7 +248,7 @@ may also simplify input method development.")
                  ((#:configure-flags flags)
                   #~(cons* "--enable-gtk4" #$flags))))
     (inputs (modify-inputs (package-inputs ibus-minimal)
-              (prepend gtk pango-next)))
+              (prepend gtk pango)))
     (properties (alist-delete 'hidden? (package-properties ibus-minimal)))))
 
 (define-public ibus-libpinyin
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 1e4f66d956..87986952f0 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016, 2017, 2020, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
@@ -40,75 +40,7 @@
 
 (define-public icu4c
   (package
-   (name "icu4c")
-   (version "69.1")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append
-                  "https://github.com/unicode-org/icu/releases/download/release-"
-                  (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                  "/icu4c-"
-                  (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                  "-src.tgz"))
-            (sha256
-             (base32 "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))
-   (build-system gnu-build-system)
-   ;; When cross-compiling, this package needs a source directory of a
-   ;; native-build of itself.
-   (native-inputs
-    `(("python" ,python-minimal)
-      ,@(if (%current-target-system)
-            `(("icu4c-build-root" ,icu4c-build-root))
-            '())))
-   (inputs
-    (list perl))
-   (arguments
-    `(#:configure-flags
-      (list
-       "--enable-rpath"
-        ,@(if (%current-target-system)
-              '((string-append "--with-cross-build="
-                                (assoc-ref %build-inputs "icu4c-build-root")))
-              '()))
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'chdir-to-source
-          (lambda _ (chdir "source") #t))
-        (add-after 'chdir-to-source 'update-LDFLAGS
-          (lambda _
-            ;; Do not create a "data-only" libicudata.so because it causes
-            ;; problems on some architectures (notably armhf and MIPS).
-            (substitute* "config/mh-linux"
-              (("LDFLAGSICUDT=-nodefaultlibs -nostdlib")
-               "LDFLAGSICUDT="))
-            #t))
-        ,@(if (target-riscv64?)
-            `((add-after 'unpack 'disable-failing-test
-                ;; It is unknown why this test is failing.
-                (lambda _
-                  (substitute* "source/test/intltest/numbertest_api.cpp"
-                    (("(TESTCASE_AUTO\\(unitUsage\\));" all)
-                     (string-append "//" all))))))
-            '())
-        (add-after 'install 'avoid-coreutils-reference
-          ;; Don't keep a reference to the build tools.
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              (substitute* (find-files (string-append out "/lib/icu")
-                                       "\\.inc$")
-                (("INSTALL_CMD=.*/bin/install") "INSTALL_CMD=install"))
-              #t))))))
-   (synopsis "International Components for Unicode")
-   (description
-    "ICU is a set of C/C++ and Java libraries providing Unicode and
-globalisation support for software applications.  This package contains the
-C/C++ part.")
-   (license x11)
-   (home-page "http://site.icu-project.org/")))
-
-(define-public icu4c-71
-  (package
-    (inherit icu4c)
+    (name "icu4c")
     (version "71.1")
     (source (origin
               (method url-fetch)
@@ -119,8 +51,59 @@ C/C++ part.")
                     (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
                     "-src.tgz"))
               (sha256
-               (base32
-                "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7"))))))
+               (base32 "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (append (list python-minimal)
+             (if (%current-target-system)
+                 ;; When cross-compiling, this package needs a source directory
+                 ;; of a native-build of itself.
+                 (list icu4c-build-root)
+                 '())))
+    (inputs
+     (list perl))
+    (arguments
+     (list
+      #:configure-flags
+      #~(list
+         "--enable-rpath"
+         #$@(if (%current-target-system)
+                #~((string-append "--with-cross-build="
+                                  #+(this-package-native-input
+                                     "icu4c-build-root")))
+                #~()))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'chdir-to-source
+            (lambda _ (chdir "source")))
+          (add-after 'chdir-to-source 'update-LDFLAGS
+            (lambda _
+              ;; Do not create a "data-only" libicudata.so because it causes
+              ;; problems on some architectures (notably armhf and MIPS).
+              (substitute* "config/mh-linux"
+                (("LDFLAGSICUDT=-nodefaultlibs -nostdlib")
+                 "LDFLAGSICUDT="))))
+          #$@(if (target-riscv64?)
+                 #~((add-after 'unpack 'disable-failing-test
+                      ;; It is unknown why this test is failing.
+                      (lambda _
+                        (substitute* "source/test/intltest/numbertest_api.cpp"
+                          (("(TESTCASE_AUTO\\(unitUsage\\));" all)
+                           (string-append "//" all))))))
+                 #~())
+          (add-after 'install 'avoid-coreutils-reference
+            ;; Don't keep a reference to the build tools.
+            (lambda _
+              (substitute* (find-files (string-append #$output "/lib/icu")
+                                       "\\.inc$")
+                (("INSTALL_CMD=.*/bin/install") "INSTALL_CMD=install")))))))
+    (synopsis "International Components for Unicode")
+    (description
+     "ICU is a set of C/C++ and Java libraries providing Unicode and
+globalisation support for software applications.  This package contains the
+C/C++ part.")
+    (license x11)
+    (home-page "http://site.icu-project.org/")))
 
 (define-public icu4c-70
   (package
@@ -152,6 +135,22 @@ C/C++ part.")
                     (string-append "//" all))))))))
        (package-arguments icu4c)))))
 
+(define-public icu4c-69
+  (package
+    (inherit icu4c)
+    (version "69.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/unicode-org/icu/releases/download/release-"
+                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
+                    "/icu4c-"
+                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
+                    "-src.tgz"))
+              (sha256
+               (base32
+                "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))))
+
 (define-public icu4c-68
   (package
     (inherit icu4c)
@@ -174,17 +173,15 @@ C/C++ part.")
     (name "icu4c-build-root")
     (arguments
      (substitute-keyword-arguments (package-arguments icu4c)
-       ((#:tests? _ '())
-        #f)
-       ((#:out-of-source? _ '())
-        #t)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (replace 'install
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (copy-recursively "../build" out)
-                 #t)))))))
+       ((#:tests? _ #f)
+         #f)
+        ((#:out-of-source? _ #t)
+         #t)
+        ((#:phases phases)
+         #~(modify-phases #$phases
+             (replace 'install
+               (lambda _
+                 (copy-recursively "../build" #$output)))))))
     (native-inputs '())))
 
 (define-public java-icu4j
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 0709c793b1..949dbfe902 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -566,28 +566,27 @@ extracting icontainer icon files.")
 (define-public libtiff
   (package
    (name "libtiff")
-   (version "4.3.0")
+   (version "4.4.0")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://download.osgeo.org/libtiff/tiff-"
-                           version ".tar.gz"))
+                           version ".tar.xz"))
+       (patches (search-patches "libtiff-CVE-2022-34526.patch"))
        (sha256
         (base32
-         "1j3snghqjbhwmnm5vz3dr1zm68dj15mgbx1wqld7vkl7n2nfaihf"))))
+         "1h8xrcpbyf9id2hw2ms0cmpgx0li8gladjzj82ycgk28018pnc29"))))
    (build-system gnu-build-system)
    (outputs '("out"
               "doc"))                           ;1.8 MiB of HTML documentation
    (arguments
-    ;; Instead of using --docdir, this package has its own --with-docdir.
-    `(#:configure-flags
-      (list (string-append "--with-docdir="
-                           (assoc-ref %outputs "doc")
-                           "/share/doc/"
-                           ,name "-" ,(package-version this-package))
-            "--disable-static")))
-   (inputs `(("zlib" ,zlib)
-             ("libjpeg" ,libjpeg-turbo)))
+    (list #:configure-flags
+          ;; Instead of using --docdir, this package has its own --with-docdir.
+          #~(list (string-append "--with-docdir=" #$output:doc "/share/doc/"
+                                 #$name "-" #$(package-version this-package))
+                "--disable-static")))
+   (inputs
+    (list libjpeg-turbo xz zlib))
    (synopsis "Library for handling TIFF files")
    (description
     "Libtiff provides support for the Tag Image File Format (TIFF), a format
@@ -596,6 +595,8 @@ Included are a library, libtiff, for reading and writing TIFF and a small
 collection of tools for doing simple manipulations of TIFF images.")
    (license (license:non-copyleft "file://COPYRIGHT"
                                   "See COPYRIGHT in the distribution."))
+   (properties
+    '((upstream-name . "tiff")))
    (home-page "http://www.simplesystems.org/libtiff/")))
 
 (define-public leptonica
@@ -701,26 +702,12 @@ arithmetic ops.")
                (base32
                 "0dwa24kjqyg9hmm40fh048sdxfpnasz43l2rm8wlkw1qbdlpd517"))))
     (build-system gnu-build-system)
-    (arguments '(#:configure-flags '("--disable-static")
-                 #:phases (modify-phases %standard-phases
-                            (add-before 'bootstrap 'force-bootstrap
-                              (lambda _
-                                ;; XXX: jbig2dec 0.18 was released with
-                                ;; a broken configure script, so we
-                                ;; recreate the build system here.
-                                ;; Remove the autoconf inputs below
-                                ;; when deleting this code.
-                                (delete-file "configure")
-                                (delete-file "autogen.sh")
-                                #t)))))
+    (arguments '(#:configure-flags '("--disable-static")))
     (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
-       ("python" ,python-minimal-wrapper)))     ;for tests
+     (list python-minimal-wrapper))     ;for tests
     (synopsis "Decoder of the JBIG2 image compression format")
     (description
-      "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
+     "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
 monochrome) images at moderately high resolution, and in particular scanned
 paper documents.  In this domain it is very efficient, offering compression
 ratios on the order of 100:1.
@@ -810,17 +797,17 @@ images of initially unknown height.")
 (define-public openjpeg-data
   (package
     (name "openjpeg-data")
-    (version "2020.11.30")
+    (version "2021.09.26")
     (source
      (origin
        (method git-fetch)
        (uri
         (git-reference
          (url "https://github.com/uclouvain/openjpeg-data")
-         (commit "cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60")))
+         (commit "1f3d093030f9a0b43353ec6b48500f65786ff57a")))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1q2swh4g9r9haqs075fyk42aclqcs9q51lqqzfb57lisszminpwm"))))
+        (base32 "13jpdaqk7mngk0xw6xbh9zgipip6n25spvqd97hwpfna1zyh8lzh"))))
     (build-system copy-build-system)
     (synopsis "Test files for OpenJPEG")
     (description "OpenJPEG-Data contains all files required to run the openjpeg
@@ -832,7 +819,7 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
 (define-public openjpeg
   (package
     (name "openjpeg")
-    (version "2.4.0")
+    (version "2.5.0")
     (source
      (origin
        (method git-fetch)
@@ -841,7 +828,7 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "143dvy5g6v6129lzvl0r8mrgva2fppkn0zl099qmi9yi9l9h7yyf"))))
+        (base32 "0xvcxlzqlylnjsyl1j64d7rgzv68ihm4qy6fpdrix3xzbqb3fjpz"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
@@ -1007,7 +994,7 @@ Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.")
 (define-public imlib2
   (package
     (name "imlib2")
-    (version "1.9.1")
+    (version "1.10.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1015,7 +1002,7 @@ Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.")
                     "/imlib2-" version ".tar.xz"))
               (sha256
                (base32
-                "0hsdfs7wa5f7fwb5nfgqzvf29bp59rgy0i0c4m6mvgpzpww408ja"))))
+                "1fnbh6vj0d9l1c2bzw9psxh3wnlbr1nlfzi16w60hp48gj9ilz3j"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags (list "--disable-static")))
@@ -1124,7 +1111,8 @@ supplies a generic doubly-linked list and some string functions.")
                      "LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
               (patches
                (append
-                (search-patches "freeimage-unbundle.patch")
+                (search-patches "freeimage-unbundle.patch"
+                                "freeimage-libtiff-compat.patch")
                 ;; Take one patch from Arch Linux that adds LibRaw 0.20 compatibility.
                 (list (origin
                         (method url-fetch)
@@ -1684,49 +1672,44 @@ is hereby granted."))))
 (define-public libjpeg-turbo
   (package
     (name "libjpeg-turbo")
-    (version "2.0.5")
+    (version "2.1.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
                                   version "/libjpeg-turbo-" version ".tar.gz"))
               (sha256
                (base32
-                "0pbv6pc97kbj7ib31qcwi7lnmm9xg5y3b11aasmkhfjvf7rgdy0n"))))
+                "0arl61ici38ann5xjidwdzkhmjdp1r95x4x4zinnh4qs2fhjdvfk"))))
     (build-system cmake-build-system)
     (native-inputs
      (list nasm))
     (arguments
-     `(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
-                           "-DENABLE_STATIC=0"
-                           ;; djpeg-shared-3x2-float-prog-cmp fails on 32-bit PPC.
-                           ,@(if (string=? "powerpc-linux" (%current-system))
-                               `("-DFLOATTEST=NO")
-                               '())
-                           ;; The build system probes for the current CPU, but
-                           ;; that fails when cross-compiling.
-                           ,@(let ((target (%current-target-system)))
-                               (if target
-                                   (cond
-                                    ((string-prefix? "arm" target)
-                                     `("-DCMAKE_SYSTEM_PROCESSOR=arm"))
-                                    ((string-prefix? "aarch64" target)
-                                     `("-DCMAKE_SYSTEM_PROCESSOR=aarch64"))
-                                    ((string-prefix? "i686" target)
-                                     `("-DCMAKE_SYSTEM_PROCESSOR=x86"))
-                                    ((string-prefix? "x86_64" target)
-                                     `("-DCMAKE_SYSTEM_PROCESSOR=x86_64"))
-                                    ;; 32-bit and 64-bit
-                                    ((string-prefix? "powerpc" target)
-                                     `("-DCMAKE_SYSTEM_PROCESSOR=powerpc"))
-                                    ((string-prefix? "riscv64" target)
-                                     `("-DCMAKE_SYSTEM_PROCESSOR=riscv64"))
-                                    (else '()))
-                                   '())))
-       ,@(if (%current-target-system)
-             '()
-             ;; Use a special "bootstrap" CMake for the native build to work
-             ;; around a circular dependency between CMake and this package.
-             `(#:cmake ,cmake-bootstrap))))
+     (list #:configure-flags
+           #~'("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
+               "-DENABLE_STATIC=0"
+               ;; djpeg-shared-3x2-float-prog-cmp fails on 32-bit PPC.
+               #$@(if (string=? "powerpc-linux" (%current-system))
+                      '("-DFLOATTEST=NO")
+                      '())
+               ;; The build system probes for the current CPU, but
+               ;; that fails when cross-compiling.
+               #$@(let ((target (%current-target-system)))
+                    (if target
+                        (cond ((string-prefix? "arm" target)
+                               '("-DCMAKE_SYSTEM_PROCESSOR=arm"))
+                              ((string-prefix? "aarch64" target)
+                               '("-DCMAKE_SYSTEM_PROCESSOR=aarch64"))
+                              ((string-prefix? "i686" target)
+                               '("-DCMAKE_SYSTEM_PROCESSOR=x86"))
+                              ((string-prefix? "x86_64" target)
+                               '("-DCMAKE_SYSTEM_PROCESSOR=x86_64"))
+                              ;; 32-bit and 64-bit
+                              ((string-prefix? "powerpc" target)
+                               '("-DCMAKE_SYSTEM_PROCESSOR=powerpc"))
+                              ((string-prefix? "riscv64" target)
+                               '("-DCMAKE_SYSTEM_PROCESSOR=riscv64"))
+                              (else '()))
+                        '())))))
     (home-page "https://libjpeg-turbo.org/")
     (synopsis "SIMD-accelerated JPEG image handling library")
     (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index d1ac5e7312..ffabc4cf33 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages graphics)
@@ -61,15 +62,16 @@
   (hidden-package
    (package
      (name "inkscape")
-     (version "1.1.1")
+     (version "1.2.1")
      (source
       (origin
         (method url-fetch)
         (uri (string-append "https://media.inkscape.org/dl/"
                             "resources/file/"
                             "inkscape-" version ".tar.xz"))
+        (patches (search-patches "inkscape-poppler-compat.patch"))
         (sha256
-         (base32 "1bvqg5xfs3m6r7qfdhmgzwhd1hx8wvg3nhvhmalwzcdm6ffhpjmf"))
+         (base32 "06scilds4p4bw337ss22nfdxy2kynv5yjw6vq6nlpjm7xfh7vkj6"))
         (modules '((guix build utils)
                    (ice-9 format)))
         (snippet
@@ -176,6 +178,20 @@ endif()~%~%"
               (substitute* "testfiles/cli_tests/CMakeLists.txt"
                 (("add_cli_test\\(export-latex")
                  "message(TEST_DISABLED: export-latex"))))
+          (add-after 'unpack 'disable-vertical-glyph-tests
+            (lambda _
+              ;; FIXME: These tests fail with newer Pango and Harfbuzz:
+              ;;   https://gitlab.com/inkscape/inkscape/-/issues/2917
+              ;;   https://gitlab.com/inkscape/inkscape/-/issues/3554
+              ;; Simply providing older versions don't work, as we need
+              ;; the full GTK stack; we could use package-input-rewriting
+              ;; but then have to also downgrade pangomm and disable tests
+              ;; in librsvg and GTK+.  Just ignore for now.
+              (substitute* "testfiles/rendering_tests/CMakeLists.txt"
+                (("test-glyph-y-pos") "")
+                (("text-glyphs-combining") "")
+                (("text-glyphs-vertical") "")
+                (("test-rtl-vertical") ""))))
           (add-after 'unpack 'set-home
             ;; Mute Inkscape warnings during tests.
             (lambda _
@@ -191,45 +207,51 @@ endif()~%~%"
           (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
           (add-after 'install 'wrap-program
-            ;; Ensure Python is available at runtime.
-            (lambda* (#:key outputs #:allow-other-keys)
-              (let ((out (assoc-ref outputs "out")))
-                (wrap-program (string-append out "/bin/inkscape")
-                  `("GUIX_PYTHONPATH" ":" prefix
-                    (,(getenv "GUIX_PYTHONPATH"))))))))))
+             ;; Ensure Python is available at runtime.
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/inkscape")
+                   `("GUIX_PYTHONPATH" prefix
+                     (,(getenv "GUIX_PYTHONPATH")))
+                   ;; Wrapping GDK_PIXBUF_MODULE_FILE allows Inkscape to load
+                   ;; its own icons in pure environments.
+                   `("GDK_PIXBUF_MODULE_FILE" =
+                     (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))))
      (inputs
-      `(("aspell" ,aspell)
-        ("autotrace" ,autotrace)
-        ("gdl" ,gdl-minimal)
-        ("gtkmm" ,gtkmm-3)
-        ("gtk" ,gtk+)
-        ("gtkspell3" ,gtkspell3)
-        ("gsl" ,gsl)
-        ("poppler" ,poppler)
-        ("lib2geom" ,lib2geom)
-        ("libjpeg" ,libjpeg-turbo)
-        ("libpng" ,libpng)
-        ("libxml2" ,libxml2)
-        ("libxslt" ,libxslt)
-        ("libgc" ,libgc)
-        ("libsoup" ,libsoup-minimal-2)
-        ("libcdr" ,libcdr)
-        ("libvisio" ,libvisio)
-        ("libwpd" ,libwpd)
-        ("libwpg" ,libwpg)
-        ("freetype" ,freetype)
-        ("popt" ,popt)
-        ("potrace" ,potrace)
-        ("lcms" ,lcms)
-        ("boost" ,boost)
-        ("python" ,python-wrapper)
-        ("python-scour" ,python-scour)
-        ("python-pyserial" ,python-pyserial)
-        ("python-numpy" ,python-numpy)
-        ("python-lxml" ,python-lxml)))
+      (list aspell
+            autotrace
+            bash-minimal
+            gdl-minimal
+            gtkmm-3
+            gtk+
+            gtkspell3
+            gsl
+            poppler
+            lib2geom
+            libjpeg-turbo
+            libpng
+            libxml2
+            libxslt
+            libgc
+            librsvg                     ;for the pixbuf loader
+            libsoup-minimal-2
+            libcdr
+            libvisio
+            libwpd
+            libwpg
+            freetype
+            popt
+            potrace
+            lcms
+            boost
+            python-wrapper
+            python-scour
+            python-pyserial
+            python-numpy
+            python-lxml))
      (native-inputs
-      (list imagemagick                  ;for tests
-            intltool
+      (list gettext-minimal
+            imagemagick                  ;for tests
             `(,glib "bin")
             googletest
             perl
@@ -272,7 +294,6 @@ as the native format.")
                    `("GDK_PIXBUF_MODULE_FILE" =
                      (,(getenv "GDK_PIXBUF_MODULE_FILE")))))))))))
     (inputs (modify-inputs (package-inputs inkscape/stable)
-              (replace "lib2geom" lib2geom-1.2)
               (append bash-minimal
                       librsvg           ;for the pixbuf loader
                       python-cssselect)))        ;to render qrcode
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 7cf4a4fb4b..c914ccc18e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -233,15 +233,23 @@
                      "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
                  (("#include <sys/sysctl.h>")
                   "#include <linux/sysctl.h>"))
+
+               ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
+               ;;   openjdk.build-boot/lib/amd64/libnio.so (!).
+               ;; It is only used as a verification step, so ignore it;
+               ;; try removing this substitution for newer versions of glibc.
+               (substitute* "openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
+                 (("\\$\\(LDD\\) \\$1 &&")
+                  ""))
+
                ;; It looks like the "h = 31 * h + c" line of the jsum()
                ;; function gets miscompiled. After a few iterations of the loop
                ;; the result of "31 * h" is always 0x8000000000000000.
-               ;; Bad optimization maybe...
-               ;; Transform "31 * h + c" into a convoluted "32 * h + c - h"
-               ;; as a workaround.
-               (substitute* "openjdk.src/hotspot/src/share/vm/memory/dump.cpp"
-                 (("h = 31 \\* h \\+ c;")
-                  "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;"))))
+               ;; Disable optimizations of dump.cpp as a workaround.
+               (substitute* "openjdk.src/hotspot/make/linux/makefiles/gcc.make"
+                 (("OPT_CFLAGS/NOOPT.*" all)
+                  (string-append all "\n"
+                                 "OPT_CFLAGS/dump.o += -O0")))))
            (add-after 'unpack 'fix-x11-extension-include-path
              (lambda* (#:key inputs #:allow-other-keys)
                (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
@@ -617,7 +625,8 @@
               (base32
                "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
              (patches (search-patches
-                       "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
+                       "icedtea-7-hotspot-aarch64-use-c++98.patch"
+                       "icedtea-7-hotspot-pointer-comparison.patch"))))
          ("ant" ,ant-bootstrap)
          ("attr" ,attr)
          ("classpath" ,classpath-devel)
@@ -1433,7 +1442,10 @@ blacklisted.certs.pem"
 
 (define-public openjdk13
   (make-openjdk openjdk12 "13.0.13"
-                "0pxf4dlig61k0pg7amg4mi919hzam7nzwckry01avgq1wj8ambji"))
+                "0pxf4dlig61k0pg7amg4mi919hzam7nzwckry01avgq1wj8ambji"
+  (source (origin
+            (inherit (package-source base))
+            (patches '())))))
 
 (define-public openjdk14
   (make-openjdk
@@ -1470,12 +1482,17 @@ blacklisted.certs.pem"
 
 (define-public openjdk16
   (make-openjdk openjdk15 "16.0.2"
-                "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"))
+                "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
+   (source (origin
+             (inherit (package-source base))))))
 
 (define-public openjdk17
   (make-openjdk
    openjdk16 "17.0.5"
    "1asnysg6kxdkrmb88y6qihdr12ljsyxv0mg6hlcs7cwxgsdlqkfs"
+   (source (origin
+             (inherit (package-source base))
+             (patches '())))
    (arguments
     (substitute-keyword-arguments (package-arguments openjdk16)
       ((#:phases phases)
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index 1abf8a69a6..5e7facfd5e 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2021 Ryan Sundberg <ryan@arctype.co>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,16 +26,17 @@
   #:use-module (ice-9 match)
   #:use-module ((guix licenses) #:select (bsd-2))
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages perl)
   #:use-module (guix build-system gnu))
 
-(define-public jemalloc-4.5.0
+(define-public jemalloc
   (package
     (name "jemalloc")
-    (version "4.5.0")
+    (version "5.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -42,26 +44,29 @@
                     version "/jemalloc-" version ".tar.bz2"))
               (sha256
                (base32
-                "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl"))))
+                "1apyxjd1ixy4g8xkr61p0ny8jiz8vyv1j0k4nxqkxpqrf4g2vf1d"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'delete-thp-test
-           ;; This test does not check if transparent huge pages are supported
-           ;; on the system before running the test.
-           (lambda _
-             (substitute* "Makefile.in"
-               (("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\"))
-             #t)))
-       #:configure-flags
-       '(,@(match (%current-system)
-             ((or "i686-linux" "x86_64-linux")
-              '())
-             ("powerpc-linux"
-              (list "--disable-thp" "CPPFLAGS=-maltivec"))
-             (_
-              (list "--disable-thp"))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'delete-thp-test
+            ;; This test does not check if transparent huge pages are supported
+            ;; on the system before running the test.
+            (lambda _
+              (substitute* "Makefile.in"
+                (("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\")))))
+      #:configure-flags
+      ;; Disable the thread local storage model in jemalloc 5 to prevent
+      ;; shared libraries linked to libjemalloc from crashing on dlopen()
+      ;; https://github.com/jemalloc/jemalloc/issues/937
+      #~'("--disable-initial-exec-tls"
+          #$@(match (%current-system)
+               ("powerpc-linux"
+                (list "CPPFLAGS=-maltivec"))
+               (_
+                '())))))
+    (inputs (list perl))
     ;; Install the scripts to a separate output to avoid referencing Perl and
     ;; Bash in the default output, saving ~75 MiB on the closure.
     (outputs '("out" "bin"))
@@ -71,24 +76,3 @@
      "This library providing a malloc(3) implementation that emphasizes
 fragmentation avoidance and scalable concurrency support.")
     (license bsd-2)))
-
-(define-public jemalloc
-  (package
-    (inherit jemalloc-4.5.0)
-    (version "5.2.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/jemalloc/jemalloc/releases/download/"
-                    version "/jemalloc-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))))
-    (arguments
-      (substitute-keyword-arguments (package-arguments jemalloc-4.5.0)
-        ;; Disable the thread local storage model in jemalloc 5 to prevent
-        ;; shared libraries linked to libjemalloc from crashing on dlopen()
-        ;; https://github.com/jemalloc/jemalloc/issues/937
-        ((#:configure-flags base-configure-flags '())
-         `(cons "--disable-initial-exec-tls" ,base-configure-flags))))
-    (inputs (list perl))))
diff --git a/gnu/packages/jrnl.scm b/gnu/packages/jrnl.scm
deleted file mode 100644
index 45f9dab148..0000000000
--- a/gnu/packages/jrnl.scm
+++ /dev/null
@@ -1,64 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Eric Bavier <address@hidden>
-;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
-;;;
-;;; This file is part of GNU Guix.
-;;;
-;;; GNU Guix is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Guix 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 General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
-
-(define-module (gnu packages jrnl)
-  #:use-module (guix packages)
-  #:use-module (guix licenses)
-  #:use-module (guix git-download)
-  #:use-module (guix build-system python)
-  #:use-module (gnu packages check)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-xyz)
-  #:use-module (gnu packages time))
-
-(define-public jrnl
-  (package
-    (name "jrnl")
-    (version "1.9.7")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/maebert/jrnl")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "1bjjyfc3fnsy0h299s3jj42wnigj43xdyp5ppi1cvkqbwl369935"))))
-    (build-system python-build-system)
-    (native-inputs
-     (list behave))
-    (inputs
-     (list python
-           python-keyring
-           python-pycrypto
-           python-pytz
-           python-tzlocal
-           python-six
-           python-dateutil
-           python-parsedatetime))
-    (home-page "https://maebert.github.io/jrnl/")
-    (synopsis "Personal journal application")
-    (description
-     "Jrnl is a command line journal application that stores your journal in a
-plain text file.  Optionally, your journal can be encrypted using 256-bit AES
-encryption.")
-    (license x11)))
diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
index 9000ae80d2..3a2865a50d 100644
--- a/gnu/packages/kde-plasma.scm
+++ b/gnu/packages/kde-plasma.scm
@@ -1053,7 +1053,7 @@ you login.")
            qtwayland-5
            kwayland
            wayland
-           wayland-protocols-next))
+           wayland-protocols))
     (arguments
      '(#:phases
        (modify-phases %standard-phases
@@ -1201,7 +1201,7 @@ KDE Frameworks components.")
                          mesa-utils
                          pkg-config
                          qttools-5
-                         wayland-protocols-next
+                         wayland-protocols
                          xorg-server-for-tests))
     (inputs (list breeze
                   eudev
@@ -2330,7 +2330,7 @@ sensors, process information and other system resources.")
                   qtgraphicaleffects
                   qtx11extras
                   wayland
-                  wayland-protocols-next
+                  wayland-protocols
                   xcb-util
                   xcb-util-image
                   xcb-util-keysyms
diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 9454a5983e..9f258009c6 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,7 +58,7 @@
 (define-public mit-krb5
   (package
     (name "mit-krb5")
-    (version "1.19.2")
+    (version "1.20")
     (source (origin
               (method url-fetch)
               (uri (list
@@ -70,7 +71,7 @@
               (patches (search-patches "mit-krb5-hurd.patch"))
               (sha256
                (base32
-                "0snz1jm2w4dkk65zcz953jmmv9mqa30fanch2bk8r3rs9vp3yi8h"))))
+                "0bz16sh0vgzlpy2kx5acmpyy181hl83a1alz7wbk06457kfjn0ky"))))
     (build-system gnu-build-system)
     (native-inputs
      (list bison perl tcl))                   ;required for some tests
@@ -102,11 +103,13 @@
              (chdir "src")))
          (add-before 'check 'pre-check
            (lambda* (#:key inputs native-inputs #:allow-other-keys)
-             (let ((perl (assoc-ref (or native-inputs inputs) "perl")))
+             (let ((perl (search-input-file (or native-inputs inputs)
+                                            "bin/perl")))
                (substitute* "plugins/kdb/db2/libdb2/test/run.test"
-                 (("/bin/cat") (string-append perl "/bin/perl"))
+                 (("/bin/cat") perl)
                  (("D/bin/sh") (string-append "D" (which "sh")))
-                 (("bindir=/bin/.") (string-append "bindir=" perl "/bin")))))))))
+                 (("bindir=/bin/.") (string-append "bindir="
+                                                   (dirname perl))))))))))
     (synopsis "MIT Kerberos 5")
     (description
      "Massachusetts Institute of Technology implementation of Kerberos.
diff --git a/gnu/packages/libbsd.scm b/gnu/packages/libbsd.scm
index 16a7e8fd89..79f1389081 100644
--- a/gnu/packages/libbsd.scm
+++ b/gnu/packages/libbsd.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,22 +21,52 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix licenses)
-  #:use-module (guix packages))
+  #:use-module (guix packages)
+  #:use-module (guix gexp)
+  #:use-module (gnu packages crypto))
 
 (define-public libbsd
   (package
     (name "libbsd")
-    (version "0.10.0")
+    (version "0.11.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://libbsd.freedesktop.org/releases/"
                                   "libbsd-" version ".tar.xz"))
               (sha256
                (base32
-                "11x8q45jvjvf2dvgclds64mscyg10lva33qinf2hwgc84v3svf1l"))))
+                "1pxmk42brddk43bj8lp4a64f9iwhc5ii91y6w7k97xpaf8qqzcqr"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     (list #:configure-flags #~'("--disable-static")
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'install 'embed-absolute-libmd-references
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (let ((libmd (search-input-file inputs
+                                                            "lib/libmd.so")))
+                              ;; Add absolute references to libmd so it
+                              ;; does not need to be propagated.
+                              (with-directory-excursion #$output
+                                (substitute* "lib/libbsd.so"
+                                  (("^GROUP")
+                                   (string-append "SEARCH_DIR("
+                                                  (dirname libmd)
+                                                  ")\nGROUP")))
+                                (substitute* (find-files "lib/pkgconfig"
+                                                         "\\.pc$")
+                                  (("-lmd")
+                                   (string-append "-L" (dirname libmd)
+                                                  " -lmd")))))))
+                        (add-before 'check 'disable-pwcache-test
+                          (lambda _
+                            ;; This test expects the presence of a root
+                            ;; user and group, which do not exist in the
+                            ;; build container.
+                            (substitute* "test/Makefile"
+                              (("pwcache\\$\\(EXEEXT\\) ")
+                               "")))))))
+    (inputs
+     (list libmd))
     (synopsis "Utility functions from BSD systems")
     (description "This library provides useful functions commonly found on BSD
 systems, and lacking on others like GNU systems, thus making it easier to port
diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm
index 02b2795194..20f967757d 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -60,7 +60,7 @@
      '(#:configure-flags '("--disable-libevent-regress"
                            "--disable-openssl")))
     (inputs
-     `(("python" ,python-wrapper)))     ;for 'event_rpcgen.py'
+     (list python-wrapper))             ;for 'event_rpcgen.py'
     (native-inputs
      (list which))
     (home-page "https://libevent.org/")
@@ -114,14 +114,14 @@ limited support for fork events.")
 (define-public libuv
   (package
     (name "libuv")
-    (version "1.41.1")
+    (version "1.44.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://dist.libuv.org/dist/v" version
                                   "/libuv-v" version ".tar.gz"))
               (sha256
                (base32
-                "0zb818sjwnxn5yv3qvkxaprjf037yqmjipk5i3a8rg1q4izhrnv5"))))
+                "1d1wy1061cf2mfygr2j6jbm0da2mhsf0l9yq4rjkqrsmijbdrz6c"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--disable-static")
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 60e8bb23ea..ba3fc6bc79 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -28,8 +28,10 @@
   #:use-module (gnu packages)
   #:use-module (guix licenses)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages check)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -43,17 +45,16 @@
 (define-public libffi
   (package
     (name "libffi")
-    (version "3.3")
+    (version "3.4.4")
     (source (origin
               (method url-fetch)
               (uri
-               (string-append "ftp://sourceware.org/pub/libffi/"
+               (string-append "https://github.com/libffi/libffi/releases"
+                              "/download/v" version "/"
                               name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))
-              (patches (search-patches "libffi-3.3-powerpc-fixes.patch"
-                                       "libffi-float128-powerpc64le.patch"))))
+                "0xpn5mqlbdmqgxgp910ba1qj79axpwr8nh7wklmcz0ls4nnmcv6n"))))
     (build-system gnu-build-system)
     (arguments
      `(;; Prevent the build system from passing -march and -mtune to the
@@ -79,6 +80,17 @@ conversions for values passed between the two languages.")
     ;; See <https://github.com/atgreen/libffi/blob/master/LICENSE>.
     (license expat)))
 
+;; Provide a variant without static trampolines as some packages
+;; (particularly GHC < 9) cannot handle them.  See
+;; <https://github.com/libffi/libffi/pull/647> for a discussion.
+(define-public libffi-sans-static-trampolines
+  (hidden-package
+   (package/inherit libffi
+     (arguments
+      (substitute-keyword-arguments (package-arguments libffi)
+        ((#:configure-flags flags #~'())
+         #~(append #$flags '("--disable-exec-static-tramp"))))))))
+
 (define-public python-cffi
   (package
     (name "python-cffi")
@@ -111,7 +123,12 @@ conversions for values passed between the two languages.")
                                "linker_so='gcc -shared')")))
              (substitute* "testing/cffi0/test_ownlib.py"
                (("\"cc testownlib") "\"gcc testownlib"))
-             (invoke "py.test" "-v" "c/" "testing/")))
+             (invoke "pytest" "-v" "c/" "testing/"
+                     ;; Disable tests that fail (harmlessly) with glibc
+                     ;; 2.34 and later:
+                     ;; https://foss.heptapod.net/pypy/cffi/-/issues/528
+                     "-k" (string-append "not TestFFI.test_dlopen_handle "
+                                         "and not test_dlopen_handle"))))
          (add-before 'check 'patch-paths-of-dynamically-loaded-libraries
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Shared libraries should be referred by their absolute path as
diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm
index 7c8b77f6fb..80350db495 100644
--- a/gnu/packages/libidn.scm
+++ b/gnu/packages/libidn.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
@@ -34,14 +34,14 @@
 (define-public libidn
   (package
    (name "libidn")
-   (version "1.37")
+   (version "1.41")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/libidn/libidn-" version
                                 ".tar.gz"))
             (sha256
              (base32
-              "1hljls9rkilh04dwiwg388wk8djkac8idijrdysqq2nqbh6rg3iw"))))
+              "0ic9zlqqppwaqr3i0r8lb8f47rrazzc8d5pfgg8vs6mqciip0kc8"))))
    (build-system gnu-build-system)
    ;; FIXME: No Java and C# libraries are currently built.
    (arguments
@@ -60,14 +60,14 @@ Java libraries.")
 (define-public libidn2
   (package
     (name "libidn2")
-    (version "2.3.1")
+    (version "2.3.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/libidn/" name "-" version
                                   ".tar.gz"))
               (sha256
                (base32
-                "0b8gsksj2g9f4iywwdma3v4jcg7i9rqvdxfmclwvbf1n72a89xla"))))
+                "0pxlvf37j9ivg2wp56q1xvx7g6y9cfmpd87mskwd2lg0nirbmjlk"))))
     (inputs
      (list libunistring))
     (build-system gnu-build-system)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 3d3e6d18dc..667e93db26 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -242,6 +242,7 @@ spreadsheets and presentations.")
       (method url-fetch)
       (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
                           "libwpd-" version "/libwpd-" version ".tar.xz"))
+      (patches (search-patches "libwpd-gcc-compat.patch"))
       (sha256 (base32
                "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
     (build-system gnu-build-system)
diff --git a/gnu/packages/libsigsegv.scm b/gnu/packages/libsigsegv.scm
index 627447e876..ebbdd2ad90 100644
--- a/gnu/packages/libsigsegv.scm
+++ b/gnu/packages/libsigsegv.scm
@@ -26,14 +26,14 @@
 (define-public libsigsegv
   (package
    (name "libsigsegv")
-   (version "2.13")
+   (version "2.14")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://gnu/libsigsegv/libsigsegv-"
                   version ".tar.gz"))
             (sha256
-             (base32 "06c1qjiv69hjvbq06mcxdi5hzfadhy28sa83zxspqpxhfr0ywy5y"))))
+             (base32 "15d2r831xz94s7540nvb1gbfl062g7mrnj88m60wyr1kh10kkb6d"))))
    (build-system gnu-build-system)
    (home-page "https://www.gnu.org/software/libsigsegv/")
    (synopsis "Library for handling page faults")
diff --git a/gnu/packages/libunistring.scm b/gnu/packages/libunistring.scm
index fda839be54..eccd053a35 100644
--- a/gnu/packages/libunistring.scm
+++ b/gnu/packages/libunistring.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
@@ -27,6 +27,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages base))
@@ -34,7 +35,7 @@
 (define-public libunistring
   (package
    (name "libunistring")
-   (version "0.9.10")
+   (version "1.0")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -42,7 +43,7 @@
                   version ".tar.xz"))
             (sha256
              (base32
-              "1mq57h06622m6qc5cv347fc3qk5mj840axw3c0vd7qmnwk1v53zb"))))
+              "0h97qx3c4970wvh25g51sjgz54xn37lrfy95dg97xmvmkys5basv"))))
    (propagated-inputs (libiconv-if-needed))
    (outputs '("out" "static"))
    (build-system gnu-build-system)
@@ -50,21 +51,20 @@
     ;; Work around parallel build issue whereby C files may be compiled before
     ;; config.h is built: see <http://hydra.gnu.org/build/59381/nixlog/2/raw> and
     ;; <http://lists.openembedded.org/pipermail/openembedded-core/2012-April/059850.html>.
-    '(#:parallel-build? #f
-      #:phases (modify-phases %standard-phases
-                 (add-after 'install 'move-static-library
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let ((out (assoc-ref outputs "out"))
-                           (static (assoc-ref outputs "static")))
-                       (with-directory-excursion (string-append out "/lib")
-                         (install-file "libunistring.a"
-                                       (string-append static "/lib"))
-                         (delete-file "libunistring.a")
-                         #t)))))))
+    (list
+      #:parallel-build? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'move-static-library
+            (lambda* (#:key outputs #:allow-other-keys)
+              (with-directory-excursion (string-append #$output "/lib")
+                (install-file "libunistring.a"
+                              (string-append #$output:static "/lib"))
+                (delete-file "libunistring.a")))))))
    (synopsis "C library for manipulating Unicode strings")
    (description
     "GNU libunistring is a library providing functions to manipulate
 Unicode strings and for manipulating C strings according to the Unicode
 standard.")
    (home-page "https://www.gnu.org/software/libunistring/")
-   (license (list lgpl3+ gpl2))))
+   (license (list lgpl3+ gpl2+))))
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index c009c78e88..612af8b30e 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -62,7 +62,7 @@
 (define-public libusb
   (package
     (name "libusb")
-    (version "1.0.24")
+    (version "1.0.25")
     (source
      (origin
       (method url-fetch)
@@ -70,7 +70,7 @@
                           "releases/download/v" version
                           "/libusb-" version ".tar.bz2"))
       (sha256
-       (base32 "0amilbi5qncdnrds3ji21vbiz1wvdm1fwp5qrxnk49xkyy2jdzby"))))
+       (base32 "0j88ym7afy4wj3x789zzxsr04asyjy0mw29gf31blzkrg8cyya4a"))))
     (build-system gnu-build-system)
 
     ;; XXX: Enabling udev is now recommended, but eudev indirectly depends on
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ef05e77ec8..b39b0637c5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -771,11 +771,11 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
 
 ;; The following package is used in the early bootstrap, and thus must be kept
 ;; stable and with minimal build requirements.
-(define-public linux-libre-headers-5.10.35
-  (make-linux-libre-headers "5.10.35" "gnu"
-                            "0q2rnchad55d49f3rajrkazz0fcjv1irwrdb1hwjnl01fzm2gjk3"))
+(define-public linux-libre-headers-5.15.49
+  (make-linux-libre-headers "5.15.49" "gnu"
+                            "13zqdcm4664vh7g57sxbfrlpsxm7zrma72mxdfdz7d9yndy2gfv8"))
 
-(define-public linux-libre-headers linux-libre-headers-5.10.35)
+(define-public linux-libre-headers linux-libre-headers-5.15.49)
 
 
 ;;;
@@ -1783,7 +1783,7 @@ which need to be installed separately.")
 (define-public linux-pam
   (package
     (name "linux-pam")
-    (version "1.5.1")
+    (version "1.5.2")
     (source
      (origin
        (method url-fetch)
@@ -1792,8 +1792,9 @@ which need to be installed separately.")
              version "/Linux-PAM-" version ".tar.xz"))
        (sha256
         (base32
-         "1z4jayf69qyyxln1gl6ch4qxfd66ib1g42garnrv2d8i1drl0790"))
-       (patches (search-patches "linux-pam-no-setfsuid.patch"))))
+         "0kgrsj2scv5mx6w925h9hxf11jnqqs9z8s22aw94b90xm4qp3v74"))
+       (patches (search-patches "linux-pam-unix_chkpwd.patch"
+                                "linux-pam-no-setfsuid.patch"))))
 
     (build-system gnu-build-system)
     (native-inputs
@@ -1808,6 +1809,12 @@ which need to be installed separately.")
        #:configure-flags (list (string-append "--includedir="
                                               (assoc-ref %outputs "out")
                                               "/include/security")
+                               ;; explicit libdir for pkgconfig files
+                               ;; drop with 1.5.3, which fixes
+                               ;; https://github.com/linux-pam/linux-pam/issues/466
+                               (string-append "--libdir="
+                                              (assoc-ref %outputs "out")
+                                              "/lib")
 
                                ;; XXX: <rpc/rpc.h> is missing from glibc when
                                ;; cross-compiling, so we have to disable NIS
@@ -2047,8 +2054,7 @@ providing the system administrator with some help in common tasks.")
 (define-public util-linux
   (package
     (name "util-linux")
-    (replacement util-linux/fixed)
-    (version "2.37.2")
+    (version "2.37.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/utils/"
@@ -2056,7 +2062,7 @@ providing the system administrator with some help in common tasks.")
                                   "util-linux-" version ".tar.xz"))
               (sha256
                (base32
-                "1ng9517c37mdp858425a4zyybma7dh7jrpd6z1z61yz7mb0n81va"))
+                "10svcnsqmrsd660bzcm7k6dm8sa7hkknhr3bag1nccwimlb6jkk3"))
               (patches (search-patches "util-linux-tests.patch"))
               (modules '((guix build utils)))
               (snippet
@@ -2073,102 +2079,101 @@ providing the system administrator with some help in common tasks.")
                "lib"            ;8.8 MiB shared libraries, headers and locales
                "static"))       ;2.9 MiB static .a libraries
     (arguments
-     `(#:configure-flags (list "--disable-use-tty-group"
-                               (string-append
-                                "--enable-fs-paths-default="
-                                "/run/setuid-programs"
-                                ":/run/current-system/profile/sbin")
-                               ;; Don't try to chown root:root mount and umount
-                               "--disable-makeinstall-chown"
-                               "--localstatedir=/var"
-                               (string-append "--localedir="
-                                              (assoc-ref %outputs "lib")
-                                              "/share/locale")
-                               ;; Install completions where our
-                               ;; bash-completion package expects them.
-                               (string-append "--with-bashcompletiondir="
-                                              (assoc-ref %outputs "out")
-                                              "/etc/bash_completion.d"))
-
-       ;; FIXME: For now we cannot reliably run tests on GNU/Hurd:
-       ;; <https://bugs.gnu.org/47791>.
-       #:tests? ,(and (not (%current-target-system))
-                      (not (string-suffix? "-gnu" (%current-system))))
+     (list #:configure-flags
+           #~(list "--disable-use-tty-group"
+                   (string-append
+                    "--enable-fs-paths-default="
+                    "/run/setuid-programs"
+                    ":/run/current-system/profile/sbin")
+                   ;; Don't try to chown root:root mount and umount
+                   "--disable-makeinstall-chown"
+                   "--localstatedir=/var"
+                   (string-append "--localedir=" #$output:lib
+                                  "/share/locale")
+                   ;; Install completions where our bash-completion package
+                   ;; expects them.
+                   (string-append "--with-bashcompletiondir=" #$output
+                                  "/etc/bash_completion.d"))
+
+           ;; FIXME: For now we cannot reliably run tests on GNU/Hurd:
+           ;; <https://bugs.gnu.org/47791>.
+           #:tests? (and (not (%current-target-system))
+                         (not (string-suffix? "-gnu" (%current-system))))
 
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'patch-build-scripts
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (substitute* "configure"
-                        ;; The build system assumes that we want to install
-                        ;; libraries below $exec_prefix when $libdir does not
-                        ;; match any of the "usual" locations.  Fix that.
-                        (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
-                         "usrlib_execdir=$libdir"))))
-                  (add-before 'build 'set-umount-file-name
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; Tell 'eject' the right file name of 'umount'.
-                      (let ((out (assoc-ref outputs "out")))
-                        (substitute* "sys-utils/eject.c"
-                          (("\"/bin/umount\"")
-                           (string-append "\"" out "/bin/umount\""))))))
-                  (add-before 'check 'pre-check
-                    (lambda* (#:key native-inputs inputs #:allow-other-keys)
-                      (let ((services (search-input-file (or native-inputs inputs)
-                                                         "etc/services")))
-                        ;; Change the test to refer to the right file.
-                        (substitute* "tests/ts/misc/mcookie"
-                          (("/etc/services")
-                           services))
-
-                        ;; The C.UTF-8 locale does not exist in our libc.
-                        (substitute* "tests/ts/column/invalid-multibyte"
-                          (("C\\.UTF-8") "en_US.utf8")))))
-                  (add-before 'check 'disable-setarch-test
-                    (lambda _
-                      ;; The setarch tests are unreliable in QEMU's user-mode
-                      ;; emulation, which is our primary method of building
-                      ;; ARMv7 packages.  See
-                      ;; <https://github.com/karelzak/util-linux/issues/601>.
-                      (substitute* "tests/ts/misc/setarch"
-                        (("ts_init_subtest.*" all)
-                         (string-append
-                          all "\n"
-                          "ts_skip \"setarch tests are unreliable under QEMU\"")))))
-                  (add-before 'check 'disable-lsns-test
-                    (lambda _
-                      ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
-                      ;; returning ENOTTY, indicating this kernel does not
-                      ;; support user namespaces.  Curiously, this test can fail
-                      ;; on i686 even if the same test passes on x86_64 on the
-                      ;; same machine.  See <https://issues.guix.gnu.org/49933>.
-                      (delete-file "tests/ts/lsns/ioctl_ns")))
-                  (add-after 'install 'move-static-libraries
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((lib    (assoc-ref outputs "lib"))
-                            (static (assoc-ref outputs "static")))
-
-                        ;; Move static libraries to the "static" output.
-                        (mkdir-p (string-append static "/lib"))
-                        (with-directory-excursion lib
-                          (for-each (lambda (file)
-                                      (rename-file file
-                                                   (string-append static "/"
-                                                                  file)))
-                                    (find-files "lib" "\\.a$"))
-
-                          ;; Remove references to the static library from the '.la'
-                          ;; files so that Libtool does the right thing when both
-                          ;; the shared and static library is available.
-                          (substitute* (find-files "lib" "\\.la$")
-                            (("old_library=.*") "old_library=''\n"))))))
-                  (add-after 'install 'adjust-pkg-config-files
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((lib (assoc-ref outputs "lib")))
-                        ;; Drop the unused "prefix=" and "exec_prefix=" variables from
-                        ;; the pkg-config files to avoid a cyclic reference on "out".
-                        (substitute* (find-files (string-append lib "/lib/pkgconfig")
-                                                 "\\.pc$")
-                          (("^(exec_)?prefix=.*") ""))))))))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'patch-build-scripts
+                 (lambda _
+                   (substitute* "configure"
+                     ;; The build system assumes that we want to install
+                     ;; libraries below $exec_prefix when $libdir does not
+                     ;; match any of the "usual" locations.  Fix that.
+                     (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
+                      "usrlib_execdir=$libdir"))))
+               (add-before 'build 'set-umount-file-name
+                 (lambda _
+                   ;; Tell 'eject' the right file name of 'umount'.
+                   (substitute* "sys-utils/eject.c"
+                     (("\"/bin/umount\"")
+                      (string-append "\"" #$output "/bin/umount\"")))))
+               (add-before 'check 'pre-check
+                 (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                   (let ((services (search-input-file (or native-inputs inputs)
+                                                      "etc/services")))
+                     ;; Change the test to refer to the right file.
+                     (substitute* "tests/ts/misc/mcookie"
+                       (("/etc/services")
+                        services))
+
+                     ;; The C.UTF-8 locale does not exist in our libc.
+                     (substitute* "tests/ts/column/invalid-multibyte"
+                       (("C\\.UTF-8") "en_US.utf8")))))
+               (add-before 'check 'disable-setarch-test
+                 (lambda _
+                   ;; The setarch tests are unreliable in QEMU's user-mode
+                   ;; emulation, which is our primary method of building
+                   ;; ARMv7 packages.  See
+                   ;; <https://github.com/karelzak/util-linux/issues/601>.
+                   (substitute* "tests/ts/misc/setarch"
+                     (("ts_init_subtest.*" all)
+                      (string-append
+                       all "\n"
+                       "ts_skip \"setarch tests are unreliable under QEMU\"")))))
+               (add-before 'check 'disable-lsns-test
+                 (lambda _
+                   ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
+                   ;; returning ENOTTY, indicating this kernel does not
+                   ;; support user namespaces.  Curiously, this test can fail
+                   ;; on i686 even if the same test passes on x86_64 on the
+                   ;; same machine.  See <https://issues.guix.gnu.org/49933>.
+                   (delete-file "tests/ts/lsns/ioctl_ns")))
+               (add-after 'install 'move-static-libraries
+                 (lambda _
+                   (let ((lib    #$output:lib)
+                         (static #$output:static))
+
+                     ;; Move static libraries to the "static" output.
+                     (mkdir-p (string-append static "/lib"))
+                     (with-directory-excursion lib
+                       (for-each (lambda (file)
+                                   (rename-file file
+                                                (string-append static "/"
+                                                               file)))
+                                 (find-files "lib" "\\.a$"))
+
+                       ;; Remove references to the static library from the '.la'
+                       ;; files so that Libtool does the right thing when both
+                       ;; the shared and static library is available.
+                       (substitute* (find-files "lib" "\\.la$")
+                         (("old_library=.*") "old_library=''\n"))))))
+               (add-after 'install 'adjust-pkg-config-files
+                 (lambda _
+                   ;; Drop the unused "prefix=" and "exec_prefix=" variables from
+                   ;; the pkg-config files to avoid a cyclic reference on "out".
+                   (substitute* (find-files (string-append #$output:lib
+                                                           "/lib/pkgconfig")
+                                            "\\.pc$")
+                     (("^(exec_)?prefix=.*") "")))))))
     (inputs
      (list file                         ;for libmagic
            ncurses
@@ -2200,21 +2205,6 @@ block devices, UUIDs, TTYs, and many other tools.")
     (modify-inputs (package-inputs util-linux)
       (prepend eudev)))))
 
-;; This is mostly equivalent to the upstream release version v2.37.3, except
-;; that the upstream tarball was generated improperly, which breaks the build.
-;; There will not be a v2.37.3-fixed release or anything like that to fix it:
-;; https://github.com/util-linux/util-linux/issues/1577
-(define-public util-linux/fixed
-  (hidden-package
-    (package
-      (inherit util-linux)
-      (source (origin
-                (inherit (package-source util-linux))
-                (patches (append (search-patches "util-linux-CVE-2021-3995.patch"
-                                                 "util-linux-CVE-2021-3996.patch")
-                                 (origin-patches (package-source util-linux)))))))))
-
-
 (define-public ddate
   (package
     (name "ddate")
@@ -2319,39 +2309,38 @@ parameters.")
 (define-public procps
   (package
     (name "procps")
-    (version "3.3.16")
+    (version "4.0.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/procps-ng/Production/"
                                   "procps-ng-" version ".tar.xz"))
               (sha256
                (base32
-                "1br0g93ysqhlv13i1k4lfbimsgxnpy5rgs4lxfc9rkzdbpbaqplj"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:modules ((guix build utils)
-                  (guix build gnu-build-system)
-                  (srfi srfi-1)
-                  (srfi srfi-26))
-       ,@(if (%current-target-system)
-             '(#:configure-flags
-               (list
-                "ac_cv_func_malloc_0_nonnull=yes"
-                "ac_cv_func_realloc_0_nonnull=yes"))
-             '())
-       #:phases
-       (modify-phases %standard-phases
-         (add-after
-          'install 'post-install
-          ;; Remove commands and man pages redudant with
-          ;; Coreutils.
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (dup (append-map (cut find-files out <>)
-                                    '("^kill" "^uptime"))))
-              (for-each delete-file dup)
-              #t))))))
+                "14ms9mkqr1mgl3h5yl6w8m57cf39k382nv7qms78vqbaz728wg1h"))
+              (patches (search-patches "procps-strtod-test.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:modules '((guix build utils)
+                       (guix build gnu-build-system)
+                       (srfi srfi-1)
+                       (srfi srfi-26))
+           #:configure-flags
+           (if (%current-target-system)
+               #~'("ac_cv_func_malloc_0_nonnull=yes"
+                   "ac_cv_func_realloc_0_nonnull=yes")
+               #~'())
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'post-install
+                 ;; Remove commands and man pages redudant with
+                 ;; Coreutils.
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out #$output)
+                          (dup (append-map (cut find-files out <>)
+                                           '("^kill" "^uptime"))))
+                     (for-each delete-file dup)))))))
     (inputs (list ncurses))
+    (native-inputs (list pkg-config))
     (home-page "https://gitlab.com/procps-ng/procps/")
     (synopsis "Utilities that give information about processes")
     (description
@@ -2902,16 +2891,14 @@ external rate conversion.")
 (define-public iptables
   (package
     (name "iptables")
-    (version "1.8.7")
+    (version "1.8.8")
     (source
      (origin
        (method url-fetch)
        (uri (list (string-append "mirror://netfilter.org/iptables/iptables-"
-                                 version ".tar.bz2")
-                  (string-append "https://www.netfilter.org/projects/iptables/"
-                                 "files/iptables-" version ".tar.bz2")))
+                                 version ".tar.bz2")))
        (sha256
-        (base32 "1w6qx3sxzkv80shk21f63rq41c84irpx68k62m2cv629n1mwj2f1"))))
+        (base32 "17w5a4znq8rdj5djcldmy6mbnxq1v88ibssk2mipc1kivj4miivi"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config flex bison))
@@ -2936,6 +2923,8 @@ This package also includes @command{ip6tables}, which is used to configure the
 IPv6 packet filter.
 
 Both commands are targeted at system administrators.")
+    (properties
+     '((release-monitoring-url . "https://www.netfilter.org/pub/iptables/")))
     (license license:gpl2+)))
 
 (define-public bolt
@@ -3084,7 +3073,7 @@ that the Ethernet protocol is much simpler than the IP protocol.")
 (define-public iproute
   (package
     (name "iproute2")
-    (version "5.15.0")
+    (version "6.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3092,44 +3081,40 @@ that the Ethernet protocol is much simpler than the IP protocol.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "1zwin8sjnnwf2a9rjwzb3q8lkhcpy06s29sh05f5gxd7z6jy9qrq"))))
+                "02jq36p7py8zs8s8jj49ap82sgf5wi5yfbgsfiirkv1awzlkjcaj"))))
     (build-system gnu-build-system)
     (arguments
-     `( ;; There is a test suite, but it wants network namespaces and sudo.
-       #:tests? #f
-       #:make-flags (let ((out (assoc-ref %outputs "out")))
-                      (list "DESTDIR="
-                            (string-append "CC=" ,(cc-for-target))
-                            "HOSTCC=gcc"
-                            (string-append "BASH_COMPDIR=" out
-                                           "/etc/bash_completion.d")
-                            (string-append "LIBDIR=" out "/lib")
-                            (string-append "HDRDIR=" out "/include")
-                            (string-append "SBINDIR=" out "/sbin")
-                            (string-append "CONFDIR=" out "/etc")
-                            (string-append "DOCDIR=" out "/share/doc/"
-                                           ,name "-" ,version)
-                            (string-append "MANDIR=" out "/share/man")))
-       #:phases (modify-phases %standard-phases
-                  (add-before 'install 'pre-install
-                    (lambda _
-                      ;; Don't attempt to create /var/lib/arpd.
-                      (substitute* "Makefile"
-                        (("^.*ARPDDIR.*$") ""))
-                      #t))
-                  (add-after 'unpack 'patch-configure
-                    (lambda _
-                      (let ((target ,(%current-target-system)))
-                        (substitute* "configure"
-                          (("pkg-config")
-                            (if target
-                              (string-append target "-pkg-config")
-                              "pkg-config")))
-                        #t))))))
+     (list
+      ;; There is a test suite, but it wants network namespaces and sudo.
+      #:tests? #f
+      #:make-flags
+      #~(let ((out #$output))
+          (list (string-append "CC=" #$(cc-for-target))
+                "HOSTCC=gcc"
+                (string-append "BASH_COMPDIR=" out
+                               "/etc/bash_completion.d")
+                (string-append "LIBDIR=" out "/lib")
+                (string-append "HDRDIR=" out "/include")
+                (string-append "SBINDIR=" out "/sbin")
+                (string-append "CONFDIR=" out "/etc")
+                (string-append "MANDIR=" out "/share/man")))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda* (#:key (configure-flags #~'()) #:allow-other-keys)
+              ;; The configure script does not understand some of the
+              ;; default options of gnu-build-system.
+              (setenv "PKG_CONFIG" #$(pkg-config-for-target))
+              (apply invoke "./configure"
+                     "--prefix" #$output
+                     configure-flags)))
+          (add-before 'install 'pre-install
+            (lambda _
+              ;; Don't attempt to create /var/lib/arpd.
+              (substitute* "Makefile"
+                (("^.*ARPDDIR.*$") "")))))))
     (inputs
-     `(("db4" ,bdb)
-       ("iptables" ,iptables)
-       ("libmnl" ,libmnl)))
+     (list bdb iptables libmnl))
     (native-inputs
      (list bison flex pkg-config))
     ;; For tests.
@@ -3230,7 +3215,7 @@ configuration (iptunnel, ipmaddr).")
 (define-public libcap
   (package
     (name "libcap")
-    (version "2.62")
+    (version "2.64")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3238,7 +3223,7 @@ configuration (iptunnel, ipmaddr).")
                     "libcap2/libcap-" version ".tar.xz"))
               (sha256
                (base32
-                "18l3pngsbaahdjzz01rmzrjgcqny4zld685fkq96mq5yr6m5n30r"))))
+                "04qy0z6yhlljb29xxcb2srbdnymcrhsi28wrc705z3861cgmwin8"))))
     (build-system gnu-build-system)
     (arguments
      (list #:phases
@@ -5612,7 +5597,7 @@ Linux Device Mapper multipathing driver:
 (define-public libaio
   (package
     (name "libaio")
-    (version "0.3.112")
+    (version "0.3.113")
     (source (origin
               (method url-fetch)
               (uri (list
@@ -5620,37 +5605,17 @@ Linux Device Mapper multipathing driver:
                                    name "-" version ".tar.gz")))
               (sha256
                (base32
-                "14mlqdapjqq1dhpkdgy5z83mvsaz36fcxca7a4z6hinmr7r6415b"))))
+                "02r0g2vfv6kfljplm3ga93w4xw13q2wixbn9hwi7ahqdzp2x2i1c"))
+              (patches (search-patches "libaio-32bit-test.patch"))))
     (build-system gnu-build-system)
     (arguments
      (list #:make-flags
-           #~(let ((target #$(%current-target-system)))
-               ;; XXX TODO: Replace with simply #$OUTPUT on core-updates.
-               (list (string-append "prefix=" #$(if (%current-target-system)
-                                                    #~#$output
-                                                    #~%output))
-                     (string-append
-                      "CC=" (if target
-                                (string-append (assoc-ref %build-inputs
-                                                          "cross-gcc")
-                                               "/bin/" target "-gcc")
-                                "gcc"))))
+           #~(list (string-append "prefix=" #$output)
+                   (string-append "CC=" #$(cc-for-target)))
            #:test-target "partcheck"    ; need root for a full 'check'
            #:phases
            #~(modify-phases %standard-phases
-               (delete 'configure)    ; no configure script
-               ;; TODO: Make this phase unconditional on core-updates.
-               #$@(if (target-riscv64?)
-                    '((add-before 'check 'patch-for-riscv-support
-                        (lambda _
-                          ;; Taken from the upstream repo:
-                          ;; https://pagure.io/libaio/c/f322f467c3cd2ac4d8d08a19bd281eabb65433b1?branch=master
-                          (substitute* "harness/cases/16.t"
-                            (("(elif defined\\(__aarch64__\\))" all)
-                             (string-append all " || defined(__riscv)"))
-                            (("(endif /* __aarch64__)" all)
-                             (string-append all " || __riscv "))))))
-                    '()))))
+               (delete 'configure))))   ; no configure script
     (home-page "https://pagure.io/libaio")
     (synopsis "Linux-native asynchronous I/O access library")
     (description
@@ -5729,7 +5694,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
 (define-public bluez
   (package
     (name "bluez")
-    (version "5.64")
+    (version "5.65")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -5737,7 +5702,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "0d6yl7l5zrlx5w3y503k72m9xsydx6gi1c65icchq1xknrjpwhxf"))))
+                "1m4n7nczjlbhb20bp2hwb2b85036xma5pqljmpk7ddalhgaa8r95"))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -5762,24 +5727,26 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                 (("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"))
+              (let* ((servicedir (string-append #$output
+                                                "/share/dbus-1/services"))
                      (service    "obexd/src/org.bluez.obex.service")
                      (rule       (string-append
-                                  out "/lib/udev/rules.d/97-hid2hci.rules")))
+                                  #$output "/lib/udev/rules.d/97-hid2hci.rules")))
                 ;; Install the obex dbus service file.
                 (substitute* service
                   (("/bin/false")
-                   (string-append out "/libexec/bluetooth/obexd")))
+                   (string-append #$output "/libexec/bluetooth/obexd")))
                 (install-file service servicedir)
                 ;; Fix paths in the udev rule.
                 (substitute* rule
                   (("hid2hci --method")
-                   (string-append out "/lib/udev/hid2hci --method"))
+                   (string-append #$output "/lib/udev/hid2hci --method"))
                   (("/sbin/udevadm")
                    (search-input-file inputs "/bin/udevadm")))))))))
     (native-inputs
-     (list pkg-config python-docutils gettext-minimal))
+     (list gettext-minimal
+           pkg-config
+           python-docutils))
     (inputs
      (list glib dbus eudev libical readline))
     (home-page "http://www.bluez.org/")
@@ -7720,7 +7687,7 @@ machines (PowerMac G4 is known to work).")
 (define-public libmnl
   (package
     (name "libmnl")
-    (version "1.0.4")
+    (version "1.0.5")
     (source
       (origin
         (method url-fetch)
@@ -7728,7 +7695,7 @@ machines (PowerMac G4 is known to work).")
                             "libmnl-" version ".tar.bz2"))
         (sha256
          (base32
-          "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
+          "09851ns07399rbz0y8slrlmnw3fn1nakr8d37pxjn5gkks8rnjr7"))))
     (build-system gnu-build-system)
     (home-page "https://www.netfilter.org/projects/libmnl/")
     (synopsis "Netlink utility library")
@@ -7737,6 +7704,8 @@ Netlink developers.  There are a lot of common tasks in parsing, validating,
 constructing of both the Netlink header and TLVs that are repetitive and easy to
 get wrong.  This library aims to provide simple helpers that allows you to
 re-use code and to avoid re-inventing the wheel.")
+    (properties
+     '((release-monitoring-url . "https://www.netfilter.org/pub/libmnl/")))
     (license license:lgpl2.1+)))
 
 (define-public libnftnl
@@ -7771,14 +7740,14 @@ used by nftables.")
 ;; variant to avoid accidental rebuilds of rust.
 (define-public libnftnl/pinned
   (package (inherit libnftnl)
-    (version "1.2.0")
+    (version "1.2.3")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://netfilter.org/libnftnl/"
                            "libnftnl-" version ".tar.bz2"))
        (sha256
-        (base32 "1xblq1cbcxhr6qmjpy98i1qdza148idgz99vbhjc7s4vzvfizc4h"))))
+        (base32 "0m82bmh8i24hwxmz7rxwxjll4904ghd2b1x1p5h8algrg6dyl5p9"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config))
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 09c546734e..4c19f1e3ed 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -666,7 +666,7 @@ of programming tools as well as libraries with equivalent functionality.")
          "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
          "-DBUILD_SHARED_LIBS:BOOL=TRUE"
          "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-         "-DLLVM_REQUIRES_RTTI=1"       ;for some third-party utilities
+         "-DLLVM_ENABLE_RTTI:BOOL=TRUE" ;for some third-party utilities
          "-DLLVM_INSTALL_UTILS=ON")     ;needed for rustc
       ;; Don't use '-g' during the build, to save space.
       #:build-type "Release"
@@ -722,11 +722,7 @@ of programming tools as well as libraries with equivalent functionality.")
           #~(modify-phases #$phases
               (add-after 'unpack 'change-directory
                 (lambda _
-                  (chdir "compiler-rt")))))))
-      (native-inputs
-       `(;; FIXME: libfuzzer fails to build with GCC 10.
-         ("gcc" ,gcc-11)
-         ,@(package-native-inputs template))))))
+                  (chdir "compiler-rt"))))))))))
 
 (define-public clang-15
   (clang-from-llvm
@@ -918,7 +914,7 @@ Library.")
             "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
             "-DBUILD_SHARED_LIBS:BOOL=TRUE"
             "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-            "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
+            "-DLLVM_ENABLE_RTTI:BOOL=TRUE" ; For some third-party utilities
             "-DLLVM_INSTALL_UTILS=ON")) ; Needed for rustc.
        ;; Don't use '-g' during the build, to save space.
        #:build-type "Release"
@@ -998,23 +994,24 @@ Library.")
 (define-public llvm-11
   (package
     (inherit llvm-12)
-    (version "11.0.0")
+    (version "11.1.0")
     (source
      (origin
       (method url-fetch)
       (uri (llvm-uri "llvm" version))
+      (patches (search-patches "llvm-8-missing-include.patch"))
       (sha256
        (base32
-        "0s94lwil98w7zb7cjrbnxli0z7gklb312pkw74xs1d6zk346hgwi"))))))
+        "199yq3a214avcbi4kk2q0ajriifkvsr0l2dkx3a666m033ihi1ff"))))))
 
 (define-public clang-runtime-11
   (clang-runtime-from-llvm
    llvm-11
-   "0d5j5l8phwqjjscmk8rmqn0i2i0abl537gdbkagl8fjpzy1gyjip"))
+   "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy"))
 
 (define-public clang-11
   (clang-from-llvm llvm-11 clang-runtime-11
-                   "02ajkij85966vd150iy246mv16dsaph1kfi0y8wnncp8w6nar5hg"
+                   "12sm91qx2m79cvj75a9aazf2x8xybjbd593dv6v7rxficpq8i0ha"
                    #:legacy-build-shared-libs? #t
                    #:patches '("clang-11.0-libc-search-path.patch")
                    #:tools-extra
@@ -1024,7 +1021,7 @@ Library.")
                                     (package-version llvm-11)))
                      (sha256
                       (base32
-                       "02bcwwn54661madhq4nxc069s7p7pj5gpqi8ww50w3anbpviilzy")))))
+                       "18n1w1hkv931xzq02b34wglbv6zd6sd0r5kb8piwvag7klj7qw3n")))))
 
 (define-public libomp-11
   (package
@@ -1035,7 +1032,7 @@ Library.")
               (uri (llvm-uri "openmp" version))
               (sha256
                (base32
-                "0k389d0g9zlfyzh1kpb3i5jdawzpn0hrdxzbjinpvdv7rbw4sw1d"))
+                "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi"))
               (file-name (string-append "libomp-" version ".tar.xz"))))
     (native-inputs
      (modify-inputs (package-native-inputs libomp-12)
@@ -1053,6 +1050,7 @@ Library.")
      (origin
       (method url-fetch)
       (uri (llvm-uri "llvm" version))
+      (patches (search-patches "llvm-8-missing-include.patch"))
       (sha256
        (base32
         "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))
@@ -1114,6 +1112,7 @@ Library.")
         (base32
          "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880"))
        (patches (search-patches
+                 "llvm-8-missing-include.patch"
                  "llvm-9-fix-bitcast-miscompilation.patch"
                  "llvm-9-fix-scev-miscompilation.patch"
                  "llvm-9-fix-lpad-miscompilation.patch"))))
@@ -1174,7 +1173,8 @@ Library.")
               (sha256
                (base32
                 "1rvm5gqp5v8hfn17kqws3zhk94w4kxndal12bqa0y57p09nply24"))
-              (patches (search-patches "llvm-8-fix-build-with-gcc-10.patch"))))
+              (patches (search-patches "llvm-8-fix-build-with-gcc-10.patch"
+                                       "llvm-8-missing-include.patch"))))
     (license license:ncsa)))
 
 (define-public clang-runtime-8
@@ -2069,6 +2069,52 @@ using @code{clang-rename}.")))
 ;;; LLVM variants.
 ;;;
 
+(define-public llvm-for-mesa
+  ;; Note: update the 'clang' input of mesa-opencl when bumping this.
+  (let ((base-llvm llvm-15))
+    (package
+      (inherit base-llvm)
+      (name "llvm-for-mesa")
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-llvm)
+         ((#:modules modules '((guix build cmake-build-system)
+                               (guix build utils)))
+          `((ice-9 regex)
+            (srfi srfi-1)
+            (srfi srfi-26)
+            ,@modules))
+         ((#:configure-flags cf ''())
+          #~(cons*
+              ;; AMDGPU is needed by the vulkan drivers.
+              #$(string-append "-DLLVM_TARGETS_TO_BUILD="
+                               (system->llvm-target) ";AMDGPU")
+              ;; Skipping tools and utils decreases the output by ~100 MiB.
+              "-DLLVM_BUILD_TOOLS=NO"
+              (remove (cut string-match
+                           "-DLLVM_(TARGETS_TO_BUILD|INSTALL_UTILS).*" <>)
+                      #$cf)))
+         ((#:phases phases '%standard-phases)
+          #~(modify-phases #$phases
+              (add-after 'install 'delete-static-libraries
+                ;; If these are just relocated then llvm-config can't find them.
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (for-each delete-file
+                            (find-files (string-append
+                                          (assoc-ref outputs "out") "/lib")
+                                        "\\.a$"))))
+              ;; llvm-config is how mesa and others find the various
+              ;; libraries and headers they use.
+              (add-after 'install 'build-and-install-llvm-config
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (let ((out (assoc-ref outputs "out")))
+                    (substitute*
+                      "tools/llvm-config/CMakeFiles/llvm-config.dir/link.txt"
+                      (((string-append (getcwd) "/build/lib"))
+                       (string-append out "/lib")))
+                    (invoke "make" "llvm-config")
+                    (install-file "bin/llvm-config"
+                                  (string-append out "/bin"))))))))))))
+
 (define make-ocaml-llvm
   ;; Make it a memoizing procedure so its callers below don't end up defining
   ;; two equal-but-not-eq "ocaml-llvm" packages for the default LLVM.
diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm
index 0657db6eb8..0291f50302 100644
--- a/gnu/packages/lxde.scm
+++ b/gnu/packages/lxde.scm
@@ -562,7 +562,7 @@ in LXDE.")
              (delete-file "configure"))))))
     (inputs
      (list gtk+
-           polkit-duktape))
+           polkit))
     (native-inputs
      (list pkg-config
            intltool
diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm
index 090f5578e3..fbc075a2cb 100644
--- a/gnu/packages/m4.scm
+++ b/gnu/packages/m4.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,34 +28,40 @@
 (define-public m4
   (package
    (name "m4")
-   (version "1.4.18")
+   (version "1.4.19")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/m4/m4-"
                                 version ".tar.xz"))
-            (patches (search-patches "m4-gnulib-libio.patch"))
             (sha256
              (base32
-              "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj"))))
+              "15mghcksh11saylpm86h1zkz4in0rbi0pk8i6nqxkdikdmfdxbk3"))))
    (build-system gnu-build-system)
    (arguments
     `(;; Explicitly disable tests when cross-compiling, otherwise 'make check'
       ;; proceeds and fails, unsurprisingly.
       #:tests? ,(not (%current-target-system))
-
       #:phases
       (modify-phases %standard-phases
-        (add-before 'check 'pre-check
-          (lambda* (#:key inputs #:allow-other-keys)
-            ;; Fix references to /bin/sh.
-            (let ((bash (assoc-ref inputs "bash")))
-              (for-each patch-shebang
-                        (find-files "tests" "\\.sh$"))
-              (substitute* (find-files "tests"
-                                       "posix_spawn")
-                (("/bin/sh")
-                 (format #f "~a/bin/sh" bash)))
-              #t))))))
+        (add-after 'unpack 'disable-test
+          (lambda _
+            ;; Test 5 raises SIGINT from a child and immediately returns
+            ;; code 71, and tests whether the child was killed by a signal.
+            ;; Since there is no signal handler for SIGINT in the build
+            ;; container, the parent sees the return code, and fails.
+            ;; XXX: For some reason adding signal handlers in Guile before
+            ;; running tests has no effect.
+            (substitute* "tests/test-execute.sh"
+              (("4 5 6")
+               "4 6"))))
+        (add-after 'unpack 'configure-shell
+          (lambda* (#:key native-inputs inputs #:allow-other-keys)
+            (let ((/bin/sh (search-input-file (or native-inputs inputs)
+                                              "/bin/sh")))
+              ;; Adjust hard-coded /bin/sh for tests.
+              (substitute* "lib/config.hin"
+                (("\"/bin/sh\"")
+                 (format #f "\"~a\"" /bin/sh)))))))))
    (synopsis "Macro processor")
    (description
     "GNU M4 is an implementation of the M4 macro language, which features
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 51b2cb3267..2eed01ece8 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -3,8 +3,8 @@
 ;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2018, 2019, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019, 2021, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
@@ -53,8 +53,6 @@
             %glibc-bootstrap-tarball
             %gcc-bootstrap-tarball
             %guile-bootstrap-tarball
-            %mescc-tools-bootstrap-tarball
-            %mes-bootstrap-tarball
             %bootstrap-tarballs
 
             %guile-static-stripped))
@@ -75,8 +73,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
       (inherit base)
       (source (origin (inherit (package-source base))
                       (patches (append (search-patches
-                                        "glibc-bootstrap-system.patch"
-                                        "glibc-static-nss.patch")
+                                        "glibc-bootstrap-system.patch")
                                    (origin-patches (package-source base))))))
       (arguments
        (substitute-keyword-arguments (package-arguments base)
@@ -162,57 +159,55 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
 
 (define %static-inputs
   ;; Packages that are to be used as %BOOTSTRAP-INPUTS.
-  (let ((coreutils (package (inherit coreutils)
-                      (arguments
-                       `(#:configure-flags
-                         '("--disable-nls"
-                           "--disable-silent-rules"
-                           "--enable-no-install-program=stdbuf,libstdbuf.so"
-                           "CFLAGS=-Os -g0"        ; smaller, please
-                           "LDFLAGS=-static -pthread"
-
-                           ;; Work around a cross-compilation bug whereby libcoreutils.a
-                           ;; would provide '__mktime_internal', which conflicts with the
-                           ;; one in libc.a.
-                           ,@(if (%current-target-system)
-                                 `("gl_cv_func_working_mktime=yes")
-                                 '()))
-
-                         #:tests? #f   ; signal-related Gnulib tests fail
-                         ,@(package-arguments coreutils)))
-
-                      ;; Remove optional dependencies such as GMP.  Keep Perl
-                      ;; except if it's missing (which is the case when
-                      ;; cross-compiling).
-                      (inputs (match (assoc "perl" (package-inputs coreutils))
-                                (#f '())
-                                (x  (list x))))
+  (let ((coreutils (package
+                     (inherit coreutils)
+                     (arguments
+                      (substitute-keyword-arguments
+                          (package-arguments coreutils)
+                        ((#:configure-flags _ #~'())
+                         #~'("--disable-nls"
+                             "--disable-silent-rules"
+                             "--enable-no-install-program=stdbuf,libstdbuf.so"
+                             "CFLAGS=-Os -g0"   ; smaller, please
+                             "LDFLAGS=-static -pthread"
+
+                             ;; Work around a cross-compilation bug whereby libcoreutils.a
+                             ;; would provide '__mktime_internal', which conflicts with the
+                             ;; one in libc.a.
+                             #$@(if (%current-target-system)
+                                    #~("gl_cv_func_working_mktime=yes")
+                                    #~())))
+                        ((#:tests? _ #t)
+                         #f)))               ;signal-related Gnulib tests fail
+
+                      ;; Remove optional dependencies such as GMP.
+                      (inputs '())
 
                       ;; Remove the 'debug' output (see above for the reason.)
                       (outputs '("out"))))
-        (bzip2 (package (inherit bzip2)
+        (bzip2 (package
+                 (inherit bzip2)
                  (arguments
                   (substitute-keyword-arguments (package-arguments bzip2)
                     ((#:phases phases)
-                     `(modify-phases ,phases
-                        (add-before 'build 'dash-static
-                          (lambda _
-                            (substitute* "Makefile"
-                              (("^LDFLAGS[[:blank:]]*=.*$")
-                               "LDFLAGS = -static"))
-                            #t))))))))
-        (xz (package (inherit xz)
+                     #~(modify-phases #$phases
+                         (add-before 'build 'dash-static
+                           (lambda _
+                             (substitute* "Makefile"
+                               (("^LDFLAGS[[:blank:]]*=.*$")
+                                "LDFLAGS = -static"))))))))))
+        (xz (package
+              (inherit xz)
               (outputs '("out"))
               (arguments
-               `(#:strip-flags '("--strip-all")
-                 #:phases (modify-phases %standard-phases
-                            (add-before 'configure 'static-executable
-                              (lambda _
-                                ;; Ask Libtool for a static executable.
-                                (substitute* "src/xz/Makefile.in"
-                                  (("^xz_LDADD =")
-                                   "xz_LDADD = -all-static"))
-                                #t)))))))
+               (list #:strip-flags #~'("--strip-all")
+                     #:phases #~(modify-phases %standard-phases
+                                  (add-before 'configure 'static-executable
+                                    (lambda _
+                                      ;; Ask Libtool for a static executable.
+                                      (substitute* "src/xz/Makefile.in"
+                                        (("^xz_LDADD =")
+                                         "xz_LDADD = -all-static")))))))))
         (gawk (package
                 (inherit gawk)
                 (source (origin
@@ -228,45 +223,44 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                                          (origin-patches
                                           (package-source gawk))))))
                 (arguments
-                 `(;; Starting from gawk 4.1.0, some of the tests for the
-                   ;; plug-in mechanism just fail on static builds:
-                   ;;
-                   ;; ./fts.awk:1: error: can't open shared library `filefuncs' for reading (No such file or directory)
-                   ;;
-                   ;; Therefore disable extensions support.
-                   #:configure-flags (list "--disable-extensions")
-
-                   ,@(substitute-keyword-arguments (package-arguments gawk)
-                       ((#:phases phases)
-                        `(modify-phases ,phases
-                           (add-before 'configure 'no-export-dynamic
-                             (lambda _
-                               ;; Since we use `-static', remove
-                               ;; `-export-dynamic'.
-                               (substitute* "configure"
-                                 (("-Wl,-export-dynamic") ""))
-                               #t)))))))
+                 (substitute-keyword-arguments (package-arguments gawk)
+                   ((#:configure-flags _ #~'())
+                    ;; Starting from gawk 4.1.0, some of the tests for the
+                    ;; plug-in mechanism just fail on static builds:
+                    ;;
+                    ;; ./fts.awk:1: error: can't open shared library `filefuncs' for reading (No such file or directory)
+                    ;;
+                    ;; Therefore disable extensions support.
+                    #~(list "--disable-extensions"))
+                   ((#:phases phases)
+                    #~(modify-phases #$phases
+                        (add-before 'configure 'no-export-dynamic
+                          (lambda _
+                            ;; Since we use `-static', remove
+                            ;; `-export-dynamic'.
+                            (substitute* "configure"
+                              (("-Wl,-export-dynamic") ""))))))))
                 (inputs (if (%current-target-system)
-                            `(("bash" ,static-bash))
+                            (list static-bash)
                             '()))))
-	(tar (package (inherit tar)
+	(tar (package
+               (inherit tar)
 	       (arguments
-                `(;; Work around a cross-compilation bug whereby libgnu.a would provide
-                  ;; '__mktime_internal', which conflicts with the one in libc.a.
-                  ,@(if (%current-target-system)
-                        `(#:configure-flags '("gl_cv_func_working_mktime=yes"))
-                        '())
-                  ,@(substitute-keyword-arguments (package-arguments tar)
-                      ((#:phases phases)
-                       `(modify-phases ,phases
-                          (replace 'set-shell-file-name
-                            (lambda _
-                              ;; Do not use "/bin/sh" to run programs; see
-                              ;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
-                              (substitute* "src/system.c"
-                                (("/bin/sh") "sh")
-                                (("execv ") "execvp "))
-                              #t)))))))))
+                (substitute-keyword-arguments (package-arguments tar)
+                  ((#:configure-flags flags #~'())
+                   ;; Work around a cross-compilation bug whereby libgnu.a
+                   ;; would provide '__mktime_internal', which conflicts
+                   ;; with the one in libc.a.
+                   #~'("gl_cv_func_working_mktime=yes"))
+                  ((#:phases phases)
+                   #~(modify-phases #$phases
+                       (replace 'set-shell-file-name
+                         (lambda _
+                           ;; Do not use "/bin/sh" to run programs; see
+                           ;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
+                           (substitute* "src/system.c"
+                             (("/bin/sh") "sh")
+                             (("execv ") "execvp "))))))))))
         ;; We don't want to retain a reference to /gnu/store in the bootstrap
         ;; versions of egrep/fgrep, so we remove the custom phase added since
         ;; grep@2.25. The effect is 'egrep' and 'fgrep' look for 'grep' in
@@ -388,6 +382,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                                              (package-arguments binutils))
                                   ((#:configure-flags flags _ ...)
                                    flags)))
+       #:make-flags ,(match (memq #:make-flags (package-arguments binutils))
+                       ((#:make-flags flags _ ...)
+                        flags)
+                       (_ ''()))
        #:strip-flags '("--strip-all")
        #:phases (modify-phases %standard-phases
                   (add-before 'configure 'all-static
@@ -591,92 +589,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                                               "--version"))
                                     '("gcc" "g++" "cpp"))))))))))
 
-;; Two packages: first build static, bare minimum content.
-(define %mescc-tools-static
-  ;; A statically linked MesCC Tools.
-  (package
-    (inherit mescc-tools)
-    (name "mescc-tools-static")
-    (arguments
-     `(#:system "i686-linux"
-       ,@(substitute-keyword-arguments (package-arguments mescc-tools)
-           ((#:make-flags flags)
-            `(cons "CC=gcc -static" ,flags)))))))
-
-;; ... next remove store references.
-(define %mescc-tools-static-stripped
-  ;; A statically linked Mescc Tools with store references removed, for
-  ;; bootstrap.
-  (package
-    (inherit %mescc-tools-static)
-    (name (string-append (package-name %mescc-tools-static) "-stripped"))
-    (build-system trivial-build-system)
-    (arguments
-     (list #:modules '((guix build utils))
-           #:builder
-           #~(begin
-               (use-modules (guix build utils))
-               (let* ((in  #$%mescc-tools-static)
-                      (out #$output)
-                      (bin (string-append out "/bin")))
-                 (mkdir-p bin)
-                 (for-each (lambda (file)
-                             (let ((target (string-append bin "/" file)))
-                               (format #t "copying `~a'...~%" file)
-                               (copy-file (string-append in "/bin/" file)
-                                          target)
-                               (remove-store-references target)))
-                           '( "M1" "blood-elf" "hex2"))))))))
-
-;; Two packages: first build static, bare minimum content.
-(define-public %mes-minimal
-  ;; A minimal Mes without documentation.
-  (package
-    (inherit mes)
-    (name "mes-minimal")
-    (native-inputs (list guile-3.0))
-    (arguments
-     `(#:system "i686-linux"
-       #:strip-binaries? #f
-       #:configure-flags '("--mes")
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'patch-shebangs)
-         (add-after 'install 'strip-install
-           (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (share (string-append out "/share")))
-               (delete-file-recursively (string-append out "/lib/guile"))
-               (delete-file-recursively (string-append share "/guile"))
-
-               (for-each delete-file
-                         (find-files
-                          (string-append share "/mes/lib")
-                          "\\.(h|c)"))))))))))
-
-;; next remove store references.
-(define %mes-minimal-stripped
-  ;; A minimal Mes with store references removed, for bootstrap.
-  (package
-    (inherit %mes-minimal)
-    (name (string-append (package-name %mes-minimal) "-stripped"))
-    (build-system trivial-build-system)
-    (arguments
-     (list #:modules '((guix build utils))
-           #:allowed-references '()
-           #:builder
-           #~(begin
-               (use-modules (guix build utils))
-               (let ((in  #$%mes-minimal)
-                     (out #$output))
-
-                 (copy-recursively in out)
-                 (for-each (lambda (dir)
-                             (for-each remove-store-references
-                                       (find-files (string-append out "/" dir)
-                                                   ".*")))
-                           '("bin" "share/mes"))))))))
-
 (define* (make-guile-static guile patches)
   (package-with-relocatable-glibc
    (static-package
@@ -698,7 +610,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
 
       (propagated-inputs
        (modify-inputs (package-propagated-inputs guile)
-         (replace "bdw-gc" libgc/static-libs)))
+         (replace "libgc" libgc/static-libs)))
       (arguments
        (substitute-keyword-arguments (package-arguments guile)
          ((#:configure-flags flags '())
@@ -868,14 +780,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
   ;; A tarball with the statically-linked, relocatable Guile.
   (tarball-package %guile-static-stripped))
 
-(define %mescc-tools-bootstrap-tarball
-  ;; A tarball with statically-linked MesCC binary seed.
-  (tarball-package %mescc-tools-static-stripped))
-
-(define %mes-bootstrap-tarball
-  ;; A tarball with Mes binary seed.
-  (tarball-package %mes-minimal-stripped))
-
 (define %bootstrap-tarballs
   ;; A single derivation containing all the bootstrap tarballs, for
   ;; convenience.
@@ -909,9 +813,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
      (append (list %guile-bootstrap-tarball)
          (match (or (%current-target-system) (%current-system))
            ((or "i686-linux" "x86_64-linux")
-            (list %mescc-tools-bootstrap-tarball
-                  %mes-bootstrap-tarball
-                  %linux-libre-headers-bootstrap-tarball))
+            (list %linux-libre-headers-bootstrap-tarball))
            (_
             (list %gcc-bootstrap-tarball
                   %binutils-bootstrap-tarball
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index febcb5a4a8..7f0af61554 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2015, 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -127,14 +127,14 @@ a flexible and convenient way.")
 (define-public man-db
   (package
     (name "man-db")
-    (version "2.10.2")
+    (version "2.11.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://savannah/man-db/man-db-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0kaiymd5lh4dnp6z15fnvfg0ir81kdxp5l690ccp64ra956rb5zf"))))
+                "1k5nhy2c33k0p2f1sbb4hxpwrjw6v4scchwykkg4g61la59amarf"))))
     (build-system gnu-build-system)
     (arguments
      (list #:phases
@@ -352,36 +352,36 @@ on any distribution, and the nroff source is included."))))
   ;; input "locales" contain the original (English) text.
   (package
     (name "help2man")
-    (version "1.48.5")
+    (version "1.49.2")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/help2man/help2man-"
-                          version ".tar.xz"))
-      (sha256
-       (base32
-        "1gl24n9am3ivhql1gs9lffb415irg758fhxyk4ryssiflk5f8fb7"))))
+       (method url-fetch)
+       (uri (string-append "mirror://gnu/help2man/help2man-"
+                           version ".tar.xz"))
+       (sha256
+        (base32
+         "0dnxx96lbcb8ab8yrdkqll14cl5n0bch8qpd9qj3c2ky78hhwbly"))))
     (build-system gnu-build-system)
-    (arguments `(;; There's no `check' target.
-                 #:tests? #f
-                 #:phases
-                 (modify-phases %standard-phases
-                   (add-after 'unpack 'patch-help2man-with-perl-gettext
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((lib (assoc-ref inputs "perl-gettext"))
-                             (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
-                         (substitute* "help2man.PL"
-                           (("^use Locale::gettext.*$" load)
-                            (format #f fmt lib load))))
-                       #t)))))
+    (arguments
+     (list
+      #:tests? #f                       ;no `check' target
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-help2man-with-perl-gettext
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((lib #$(this-package-input "perl-gettext"))
+                    (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
+                (substitute* "help2man.PL"
+                  (("^use Locale::gettext.*$" load)
+                   (format #f fmt lib load)))))))))
     (inputs
-     `(("perl" ,perl)
-       ,@(if (%current-target-system)
-             '()
-             `(("perl-gettext" ,perl-gettext)))))
+     (append
+      (list perl)
+      (if (%current-target-system)
+          '()
+          (list perl-gettext))))
     (native-inputs
-     `(("perl" ,perl)
-       ("gettext" ,gettext-minimal)))
+     (list perl gettext-minimal))
     (home-page "https://www.gnu.org/software/help2man/")
     (synopsis "Automatically generate man pages from program --help")
     (description
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 238352f278..551727909f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -26,7 +26,7 @@
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
-;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2018, 2020-2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
 ;;; Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
@@ -537,14 +537,14 @@ precision floating point numbers.")
 (define-public gsl
   (package
     (name "gsl")
-    (version "2.7")
+    (version "2.7.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gsl/gsl-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0av04cpblphvvs3kl5rwphniarml503501vrpqw31rd0bmwg7fzg"))))
+                "0jxkxrnpys2j3rh8bzx0bmnh4w6xm28jd57rgxsjp0s863agpc6w"))))
     (build-system gnu-build-system)
     (arguments
      (let ((system (%current-system)))
@@ -756,7 +756,7 @@ integer programming problems and computes Markov bases for statistics.")
                          libtool
                          texlive-amsfonts
                          texlive-dvips-l3backend
-                         texlive-latex-graphics
+                         texlive-graphics
                          texlive-latex-l3backend
                          texlive-tiny))
     (arguments
@@ -4731,66 +4731,67 @@ parts of it.")
          "0r4sz3rn68fyc2paq0a04pgfi7iszpm95f6ggbzxpvjzx9qxbcql"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:test-target "test"
-       ;; DYNAMIC_ARCH is only supported on x86.  When it is disabled and no
-       ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
-       ;; we need to disable substitutions.
-       #:substitutable?
-        ,(let ((system (or (%current-target-system) (%current-system))))
-           (or (string-prefix? "x86_64" system)
-               (string-prefix? "i686" system)
-               (string-prefix? "mips" system)
-               (string-prefix? "aarch64" system)))
-       #:make-flags
-       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
-             "SHELL=bash"
-             "MAKE_NB_JOBS=0"           ;use jobserver for submakes
-             "NO_STATIC=1"              ;avoid a 67 MiB static archive
-
-             ;; This is the maximum number of threads OpenBLAS will ever use (that
-             ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
-             ;; is used.)  If we don't set it, the makefile sets it to the number
-             ;; of cores of the build machine, which is obviously wrong.
-             "NUM_THREADS=128"
-
-             ;; Build the library for all supported CPUs.  This allows
-             ;; switching CPU targets at runtime with the environment variable
-             ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
-             ;; Unfortunately, this is not supported on all architectures,
-             ;; where it leads to failed builds.
-             ,@(let ((system (or (%current-target-system) (%current-system))))
-                 (cond
-                  ((or (string-prefix? "x86_64" system)
-                       (string-prefix? "i686" system)
-                       (string-prefix? "powerpc64le" system)
-                       (string-prefix? "aarch64" system))
-                   ;; Dynamic older enables a few extra CPU architectures that
-                   ;; were released before 2010.
-                   '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC"))
-                  ;; On some of these architectures the CPU can't be detected.
-                  ;; On MIPS we force the "SICORTEX" TARGET, as for the other
-                  ;; two available MIPS targets special extended instructions
-                  ;; for Loongson cores are used.
-                  ((string-prefix? "mips" system)
-                   '("TARGET=SICORTEX"))
-                  ;; Failed to detect CPU.
-                  ((string-prefix? "armhf" system)
-                   '("TARGET=ARMV7"))
-                  ((string-prefix? "riscv64" system)
-                   '("TARGET=RISCV64_GENERIC"))
-                  (else '()))))
-       ;; no configure script
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (add-before 'build 'set-extralib
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; Get libgfortran found when building in utest.
-             (setenv "FEXTRALIB"
-                     (string-append
-                      "-L"
-                      (dirname
-                       (search-input-file inputs "/lib/libgfortran.so")))))))))
+     (list
+      #:test-target "test"
+      ;; DYNAMIC_ARCH is only supported on x86.  When it is disabled and no
+      ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
+      ;; we need to disable substitutions.
+      #:substitutable?
+      (let ((system (or (%current-target-system) (%current-system))))
+        (or (string-prefix? "x86_64" system)
+            (string-prefix? "i686" system)
+            (string-prefix? "mips" system)
+            (string-prefix? "aarch64" system)))
+      #:make-flags
+      #~(list (string-append "PREFIX=" #$output)
+              "SHELL=bash"
+              "MAKE_NB_JOBS=0"          ;use jobserver for submakes
+              "NO_STATIC=1"             ;avoid a 67 MiB static archive
+
+              ;; This is the maximum number of threads OpenBLAS will ever use (that
+              ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
+              ;; is used.)  If we don't set it, the makefile sets it to the number
+              ;; of cores of the build machine, which is obviously wrong.
+              "NUM_THREADS=128"
+
+              ;; Build the library for all supported CPUs.  This allows
+              ;; switching CPU targets at runtime with the environment variable
+              ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
+              ;; Unfortunately, this is not supported on all architectures,
+              ;; where it leads to failed builds.
+              #$@(let ((system (or (%current-target-system) (%current-system))))
+                   (cond
+                    ((or (string-prefix? "x86_64" system)
+                         (string-prefix? "i686" system)
+                         (string-prefix? "powerpc64le" system)
+                         (string-prefix? "aarch64" system))
+                     ;; Dynamic older enables a few extra CPU architectures that
+                     ;; were released before 2010.
+                     '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC"))
+                    ;; On some of these architectures the CPU can't be detected.
+                    ;; On MIPS we force the "SICORTEX" TARGET, as for the other
+                    ;; two available MIPS targets special extended instructions
+                    ;; for Loongson cores are used.
+                    ((string-prefix? "mips" system)
+                     '("TARGET=SICORTEX"))
+                    ;; Failed to detect CPU.
+                    ((string-prefix? "armhf" system)
+                     '("TARGET=ARMV7"))
+                    ((string-prefix? "riscv64" system)
+                     '("TARGET=RISCV64_GENERIC"))
+                    (else '()))))
+      ;; no configure script
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-before 'build 'set-extralib
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; Get libgfortran found when building in utest.
+              (setenv "FEXTRALIB"
+                      (string-append
+                       "-L"
+                       (dirname
+                        (search-input-file inputs "/lib/libgfortran.so")))))))))
     (inputs
      (list `(,gfortran "lib")))
     (native-inputs
@@ -4807,9 +4808,9 @@ parts of it.")
     (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
     (arguments
      (substitute-keyword-arguments (package-arguments openblas)
-       ((#:make-flags flags '())
-        `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
-                 ,flags))))
+       ((#:make-flags flags #~'())
+        #~(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
+                 #$flags))))
     (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
     (license license:bsd-3)))
 
@@ -5274,6 +5275,13 @@ with C89.")
     (build-system cmake-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'set-environment
+                    (lambda _
+                      ;; Pass "-fno-ipa-modref" flag to the compiler to work
+                      ;; around a test failure with GCC 11.  This is a
+                      ;; header-only library so these flags only affect tests.
+                      ;; See <https://github.com/g-truc/glm/pull/1087>.
+                      (setenv "CXXFLAGS" "-O2 -g -fno-ipa-modref")))
                   (replace 'install
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; Since version 0.9.9.6, 'make install' is not supported
@@ -5828,6 +5836,8 @@ set.")
                                      texlive-cm
                                      texlive-courier
                                      texlive-etoolbox
+                                     texlive-fancyhdr
+                                     texlive-fancyvrb
                                      texlive-helvetic
                                      texlive-jknappen
                                      texlive-sectsty
@@ -5839,8 +5849,6 @@ set.")
                                      texlive-latex-cmap
                                      texlive-latex-colortbl
                                      texlive-latex-etoc
-                                     texlive-latex-fancyhdr
-                                     texlive-latex-fancyvrb
                                      texlive-latex-float
                                      texlive-latex-fncychap
                                      texlive-latex-framed
@@ -5854,10 +5862,10 @@ set.")
                                      texlive-latex-parskip
                                      texlive-latex-stackengine
                                      texlive-latex-tabulary
-                                     texlive-latex-titlesec
                                      texlive-latex-tocloft
                                      texlive-latex-upquote
                                      texlive-latex-varwidth
+                                     texlive-titlesec
                                      texlive-ulem
                                      texlive-wasysym
                                      texlive-wrapfig))))
diff --git a/gnu/packages/matrix.scm b/gnu/packages/matrix.scm
index 2ed7a9a782..7086482ef8 100644
--- a/gnu/packages/matrix.scm
+++ b/gnu/packages/matrix.scm
@@ -186,9 +186,9 @@ homeserver and generally help bootstrap the ecosystem.")
                         "not test_upload_binary_file_object "
                         "and not test_connect_wrapper"))))))))
     (native-inputs
-     `(("python-pytest" ,python-pytest-6)
+     `(("python-pytest" ,python-pytest)
        ("python-hyperframe" ,python-hyperframe)
-       ("python-hypothesis" ,python-hypothesis-next)
+       ("python-hypothesis" ,python-hypothesis)
        ("python-hpack" ,python-hpack)
        ("python-faker" ,python-faker)
        ("python-pytest-aiohttp" ,python-pytest-aiohttp)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 5ba7d166c0..bbd1743cac 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -416,7 +416,7 @@ TCP sessions from existing clients.")
 (define-public poezio
   (package
     (name "poezio")
-    (version "0.13.2")
+    (version "0.14")
     (source
      (origin
        (method git-fetch)
@@ -428,10 +428,11 @@ TCP sessions from existing clients.")
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "0p92k8ssjsgavyfv1fd5cgzyw87dmdd84vaz7zvfsf5crvpr1mkf"))))
+        (base32 "15vlmymqlcf94h1g6dvgzjvj15c47dqsm78qs40wl2dlwspvqkxj"))))
     (build-system python-build-system)
     (arguments
-      (list #:phases
+      (list #:tests? #f ; tests fails without the OTR plugin
+            #:phases
             #~(modify-phases %standard-phases
                 (add-after 'unpack 'patch
                   (lambda _
@@ -442,7 +443,6 @@ TCP sessions from existing clients.")
      (list pkg-config python-setuptools python-sphinx))
     (inputs
      (list python-mpd2
-           python-potr
            python-pyasn1
            python-pyasn1-modules
            python-pygments
@@ -460,7 +460,7 @@ made in a configuration file or directly from the client.
 You'll find the light, fast, geeky and anonymous spirit of IRC while using a
 powerful, standard and open protocol.")
     (home-page "https://poez.io/en/")
-    (license license:zlib)))
+    (license license:gpl3+)))
 
 (define-public libotr
   (package
@@ -1395,7 +1395,7 @@ Encryption to Gajim.")
            libsignal-protocol-c
            libsoup
            libsrtp                      ;for calls support
-           pango-next                   ;gtk4 wants pango 1.50+
+           pango                        ;gtk4 wants pango 1.50+
            qrencode
            sqlite
            webrtc-audio-processing))    ;for A/V support
diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm
index 4b0b617bde..d219c78d4f 100644
--- a/gnu/packages/moreutils.scm
+++ b/gnu/packages/moreutils.scm
@@ -71,7 +71,7 @@
     ;; For building the manual pages.
     (native-inputs
      (list docbook-xml-4.4
-           docbook-xsl-next     ;without -next, man pages are corrupted
+           docbook-xsl     ;without -next, man pages are corrupted
            libxml2
            libxslt))
     (home-page "https://joeyh.name/code/moreutils/")
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 080a8100df..6ba08be3a3 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -119,13 +119,13 @@ It is aimed at use in, for example, cryptography and computational algebra.")
 (define-public mpfr
   (package
    (name "mpfr")
-   (version "4.1.0")
+   (version "4.2.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/mpfr/mpfr-" version
                                 ".tar.xz"))
             (sha256 (base32
-                     "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c"))))
+                     "14yr4sf4mys64nzbgnd997l6l4n8l9vsjnnvnb0lh4jh2ggpi8q6"))))
    (build-system gnu-build-system)
    (outputs '("out" "debug"))
    (propagated-inputs (list gmp))            ; <mpfr.h> refers to <gmp.h>
@@ -140,14 +140,14 @@ correct rounding.")
 (define-public mpc
   (package
    (name "mpc")
-   (version "1.2.1")
+   (version "1.3.1")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://gnu/mpc/mpc-" version ".tar.gz"))
             (sha256
               (base32
-                "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p"))))
+                "1f2rqz0hdrrhx4y1i5f8pv6yv08a876k1dqcm9s2p26gyn928r5b"))))
    (build-system gnu-build-system)
    (outputs '("out" "debug"))
    (propagated-inputs (list gmp ; <mpc.h> refers to both
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index acedfd4a26..2b246be758 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3921,7 +3921,7 @@ websites such as Libre.fm.")
            python-flask
            python-mock
            python-py7zr
-           python-pytest-6
+           python-pytest
            python-responses))
     (inputs
      (list bash-minimal
@@ -6382,7 +6382,7 @@ and as an LV2 plugin.")
       ("glibc" ,glibc)
       ("graphviz" ,graphviz)
       ("gtk+" ,gtk+)
-      ("gtksourceview" ,gtksourceview)
+      ("gtksourceview" ,gtksourceview-4)
       ("guile" ,guile-2.2)
       ("libaudec" ,libaudec)
       ("libcyaml" ,libcyaml)
@@ -6999,7 +6999,7 @@ streaming audio server.")
            gst-plugins-ugly
            gstreamer
            gtk+
-           gtksourceview ; undo, redo, multiline text fields
+           gtksourceview-4 ; undo, redo, multiline text fields
            hicolor-icon-theme
            keybinder-3.0 ; keybindings outside of GNOME
            librsvg
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index c33b0a2511..c5f63e0b67 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
@@ -27,6 +27,7 @@
 (define-module (gnu packages ncurses)
   #:use-module (gnu packages)
   #:use-module (guix licenses)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -37,8 +38,22 @@
   #:use-module (gnu packages swig)
   #:use-module (gnu packages linux)
   #:use-module (guix utils)
+  #:use-module ((guix memoization) #:select (mlambda))
   #:use-module (ice-9 match))
 
+(define ncurses-rollup-patch
+  (mlambda (version)
+    (origin
+      (method url-fetch)
+      (uri (match (string-split (version-major+minor+point version) #\.)
+             ((major minor point)
+              (string-append "https://invisible-mirror.net/archives"
+                             "/ncurses/" major "." minor "/ncurses-"
+                             major "." minor "-" point "-patch.sh.bz2"))))
+      (sha256
+       (base32
+        "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6")))))
+
 (define-public ncurses
   (package
     (name "ncurses")
@@ -56,170 +71,152 @@
                "doc"))                ;1 MiB of man pages
     (arguments
      (let ((patch-makefile-phase
-            '(lambda _
-               (for-each patch-makefile-SHELL
-                         (find-files "." "Makefile.in"))))
+            #~(lambda _
+                (for-each patch-makefile-SHELL
+                          (find-files "." "Makefile.in"))))
            (configure-phase
             ;; The 'configure' script does not understand '--docdir', so we must
             ;; override that and use '--mandir' instead.
-            '(lambda* (#:key build target outputs configure-flags
-                       #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out"))
-                     (doc (assoc-ref outputs "doc")))
-                 (apply invoke "./configure"
-                        (string-append "SHELL=" (which "sh"))
-                        (string-append "--build=" build)
-                        (string-append "--prefix=" out)
-                        (string-append "--mandir=" doc "/share/man")
-                        (if target
-                            (cons (string-append "--host=" target)
-                                  configure-flags)
-                            configure-flags)))))
+            #~(lambda* (#:key build target outputs configure-flags
+                        #:allow-other-keys)
+                (let ((out (assoc-ref outputs "out"))
+                      (doc (assoc-ref outputs "doc")))
+                  (apply invoke "./configure"
+                         (string-append "SHELL=" (which "sh"))
+                         (string-append "--build=" build)
+                         (string-append "--prefix=" out)
+                         (string-append "--mandir=" doc "/share/man")
+                         (if target
+                             (cons (string-append "--host=" target)
+                                   configure-flags)
+                             configure-flags)))))
            (apply-rollup-patch-phase
             ;; Ncurses distributes "stable" patchsets to be applied on top
             ;; of the release tarball.  These are only available as shell
             ;; scripts(!) so we decompress and apply them in a phase.
             ;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
-            '(lambda* (#:key inputs native-inputs #:allow-other-keys)
-               (let ((rollup-patch (assoc-ref (or native-inputs inputs)
-                                              "rollup-patch")))
-                 (when rollup-patch
-                   (copy-file rollup-patch
-                              (string-append (getcwd) "/rollup-patch.sh.bz2"))
-                   (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
-                   (invoke "sh" "rollup-patch.sh")))))
+            #~(lambda* (#:key inputs native-inputs #:allow-other-keys)
+                (let ((rollup-patch #$(ncurses-rollup-patch
+                                       (package-version this-package))))
+                  (copy-file rollup-patch
+                             (string-append (getcwd) "/rollup-patch.sh.bz2"))
+                  (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
+                  (invoke "sh" "rollup-patch.sh"))))
            (remove-shebang-phase
-            '(lambda _
-               ;; To avoid retaining a reference to the bootstrap Bash via the
-               ;; shebang of the 'ncursesw6-config' script, simply remove that
-               ;; shebang: it'll work just as well without it.  Likewise, do not
-               ;; retain a reference to the "doc" output.
-               (substitute* "misc/ncurses-config.in"
-                 (("#!@SHELL@")
-                  "# No shebang here, use /bin/sh!\n")
-                 (("@SHELL@ \\$0")
-                  "$0")
-                 (("mandir=.*$")
-                  "mandir=share/man"))))
+            #~(lambda _
+                ;; To avoid retaining a reference to the bootstrap Bash via the
+                ;; shebang of the 'ncursesw6-config' script, simply remove that
+                ;; shebang: it'll work just as well without it.  Likewise, do not
+                ;; retain a reference to the "doc" output.
+                (substitute* "misc/ncurses-config.in"
+                  (("#!@SHELL@")
+                   "# No shebang here, use /bin/sh!\n")
+                  (("@SHELL@ \\$0")
+                   "$0")
+                  (("mandir=.*$")
+                   "mandir=share/man"))))
            (post-install-phase
-            `(lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 ;; When building a wide-character (Unicode) build, create backward
-                 ;; compatibility links from the the "normal" libraries to the
-                 ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
-                 ,@(if (target-mingw?)
-                       '( ;; TODO: create .la files to link to the .dll?
-                         (with-directory-excursion (string-append out "/bin")
-                           (for-each
-                            (lambda (lib)
-                              (define lib.dll
-                                (string-append "lib" lib ".dll"))
-                              (define libw6.dll
-                                (string-append "lib" lib "w6.dll"))
+            #~(lambda* (#:key outputs #:allow-other-keys)
+                (let ((out (assoc-ref outputs "out")))
+                  ;; When building a wide-character (Unicode) build, create backward
+                  ;; compatibility links from the the "normal" libraries to the
+                  ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
+                  #$@(if (target-mingw?)
+                         '( ;; TODO: create .la files to link to the .dll?
+                           (with-directory-excursion (string-append out "/bin")
+                             (for-each
+                              (lambda (lib)
+                                (define lib.dll
+                                  (string-append "lib" lib ".dll"))
+                                (define libw6.dll
+                                  (string-append "lib" lib "w6.dll"))
 
-                              (when (file-exists? libw6.dll)
-                                (format #t "creating symlinks for `lib~a'~%" lib)
-                                (symlink libw6.dll lib.dll)))
-                            '("curses" "ncurses" "form" "panel" "menu"))))
-                       '())
-                 (with-directory-excursion (string-append out "/lib")
-                   (for-each (lambda (lib)
-                               (define libw.a
-                                 (string-append "lib" lib "w.a"))
-                               (define lib.a
-                                 (string-append "lib" lib ".a"))
+                                (when (file-exists? libw6.dll)
+                                  (format #t "creating symlinks for `lib~a'~%" lib)
+                                  (symlink libw6.dll lib.dll)))
+                              '("curses" "ncurses" "form" "panel" "menu"))))
+                         #~())
+                  (with-directory-excursion (string-append out "/lib")
+                    (for-each (lambda (lib)
+                                (define libw.a
+                                  (string-append "lib" lib "w.a"))
+                                (define lib.a
+                                  (string-append "lib" lib ".a"))
 
-                               ,@(if (not (target-mingw?))
-                                     '((define libw.so.x
-                                         (string-append "lib" lib "w.so.6"))
-                                       (define lib.so.x
-                                         (string-append "lib" lib ".so.6"))
-                                       (define lib.so
-                                         (string-append "lib" lib ".so"))
-                                       (define packagew.pc
-                                         (string-append lib "w.pc"))
-                                       (define package.pc
-                                         (string-append lib ".pc")))
-                                     '())
+                                #$@(if (not (target-mingw?))
+                                       #~((define libw.so.x
+                                            (string-append "lib" lib "w.so.6"))
+                                          (define lib.so.x
+                                            (string-append "lib" lib ".so.6"))
+                                          (define lib.so
+                                            (string-append "lib" lib ".so"))
+                                          (define packagew.pc
+                                            (string-append lib "w.pc"))
+                                          (define package.pc
+                                            (string-append lib ".pc")))
+                                       #~())
 
-                               (when (file-exists? libw.a)
-                                 (format #t "creating symlinks for `lib~a'~%" lib)
-                                 (symlink libw.a lib.a)
-                                 ,@(if (not (target-mingw?))
-                                       '((symlink libw.so.x lib.so.x)
-                                         (false-if-exception (delete-file lib.so))
-                                         (call-with-output-file lib.so
-                                           (lambda (p)
-                                             (format p "INPUT (-l~aw)~%" lib)))
-                                         (with-directory-excursion "pkgconfig"
-                                           (format #t "creating symlink for `~a'~%"
-                                                   package.pc)
-                                           (when (file-exists? packagew.pc)
-                                             (symlink packagew.pc package.pc))))
-                                       '())))
-                             '("curses" "ncurses" "form" "panel" "menu")))))))
-       `(#:configure-flags
-         ,(cons*
-           'quasiquote
-           `(("--with-shared" "--without-debug" "--enable-widec"
+                                (when (file-exists? libw.a)
+                                  (format #t "creating symlinks for `lib~a'~%" lib)
+                                  (symlink libw.a lib.a)
+                                  #$@(if (not (target-mingw?))
+                                         '((symlink libw.so.x lib.so.x)
+                                           (false-if-exception (delete-file lib.so))
+                                           (call-with-output-file lib.so
+                                             (lambda (p)
+                                               (format p "INPUT (-l~aw)~%" lib)))
+                                           (with-directory-excursion "pkgconfig"
+                                             (format #t "creating symlink for `~a'~%"
+                                                     package.pc)
+                                             (when (file-exists? packagew.pc)
+                                               (symlink packagew.pc package.pc))))
+                                         #~())))
+                              '("curses" "ncurses" "form" "panel" "menu")))))))
+       (list #:configure-flags
+             #~`("--with-shared" "--without-debug" "--enable-widec"
 
-              "--enable-pc-files"
-              ,(list 'unquote '(string-append "--with-pkg-config-libdir="
-                                              (assoc-ref %outputs "out")
-                                              "/lib/pkgconfig"))
+                 "--enable-pc-files"
+                 ,(string-append "--with-pkg-config-libdir="
+                                 #$output "/lib/pkgconfig")
 
-              ;; By default headers land in an `ncursesw' subdir, which is not
-              ;; what users expect.
-              ,(list 'unquote '(string-append "--includedir=" (assoc-ref %outputs "out")
-                                              "/include"))
-              "--enable-overwrite"      ;really honor --includedir
+                 ;; By default headers land in an `ncursesw' subdir, which is not
+                 ;; what users expect.
+                 ,(string-append "--includedir=" #$output "/include")
+                 "--enable-overwrite"                ;really honor --includedir
 
-              ;; Make sure programs like 'tic', 'reset', and 'clear' have a
-              ;; correct RUNPATH.
-              ,(list 'unquote '(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
-                                              "/lib"))
+                 ;; Make sure programs like 'tic', 'reset', and 'clear' have a
+                 ;; correct RUNPATH.
+                 ,(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
 
-              ;; Starting from ncurses 6.1, "make install" runs "install -s"
-              ;; by default, which doesn't work for cross-compiled binaries
-              ;; because it invokes 'strip' instead of 'TRIPLET-strip'.  Work
-              ;; around this.
-              ,@(if (%current-target-system) '("--disable-stripping") '())
+                 ;; Starting from ncurses 6.1, "make install" runs "install -s"
+                 ;; by default, which doesn't work for cross-compiled binaries
+                 ;; because it invokes 'strip' instead of 'TRIPLET-strip'.  Work
+                 ;; around this.
+                 #$@(if (%current-target-system) #~("--disable-stripping") #~())
 
-              ;; Do not assume a default search path in ld, even if it is only to
-              ;; filter it out in ncurses-config.  Mainly because otherwise it ends
-              ;; up using the libdir from binutils, which makes little sense and
-              ;; causes an unnecessary runtime dependency.
-              "cf_cv_ld_searchpath=/no-ld-searchpath"
+                 ;; Do not assume a default search path in ld, even if it is only to
+                 ;; filter it out in ncurses-config.  Mainly because otherwise it ends
+                 ;; up using the libdir from binutils, which makes little sense and
+                 ;; causes an unnecessary runtime dependency.
+                 "cf_cv_ld_searchpath=/no-ld-searchpath"
 
-              ;; MinGW: Use term-driver created for the MinGW port.
-              ,@(if (target-mingw?) '("--enable-term-driver") '()))))
-         #:tests? #f                  ; no "check" target
-         #:phases (modify-phases %standard-phases
-                    (add-after 'unpack 'apply-rollup-patch
-                      ,apply-rollup-patch-phase)
-                    (replace 'configure ,configure-phase)
-                    (add-after 'install 'post-install
-                      ,post-install-phase)
-                    (add-before 'configure 'patch-makefile-SHELL
-                      ,patch-makefile-phase)
-                    (add-before 'patch-source-shebangs 'remove-unneeded-shebang
-                      ,remove-shebang-phase)))))
+                 ;; MinGW: Use term-driver created for the MinGW port.
+                 #$@(if (target-mingw?) #~("--enable-term-driver") #~()))
+             #:tests? #f                          ; no "check" target
+             #:phases #~(modify-phases %standard-phases
+                          (add-after 'unpack 'apply-rollup-patch
+                            #$apply-rollup-patch-phase)
+                          (replace 'configure #$configure-phase)
+                          (add-after 'install 'post-install
+                            #$post-install-phase)
+                          (add-before 'configure 'patch-makefile-SHELL
+                            #$patch-makefile-phase)
+                          (add-before 'patch-source-shebangs 'remove-unneeded-shebang
+                            #$remove-shebang-phase)))))
     (native-inputs
-     `(,@(if (%current-target-system)
-             `(("self" ,this-package))            ;for `tic'
-             '())
-       ("rollup-patch"
-        ,(origin
-           (method url-fetch)
-           (uri (match (string-split (version-major+minor+point version) #\.)
-                  ((major minor point)
-                   (string-append "https://invisible-mirror.net/archives"
-                                  "/ncurses/" major "." minor "/ncurses-"
-                                  major "." minor "-" point "-patch.sh.bz2"))))
-           (sha256
-            (base32
-             "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6"))))
-       ("pkg-config" ,pkg-config)))
+     (if (%current-target-system)
+         (list pkg-config this-package)           ;for 'tic'
+         (list pkg-config)))
     (native-search-paths
      (list (search-path-specification
             (variable "TERMINFO_DIRS")
@@ -240,12 +237,11 @@ ncursesw library provides wide character support.")
     (arguments
      (substitute-keyword-arguments (package-arguments ncurses)
        ((#:configure-flags cf)
-        `(cons (string-append "--with-gpm="
-                              (assoc-ref %build-inputs "gpm")
-                              "/lib/libgpm.so.2")
-               ,cf))))
-    (inputs
-     `(("gpm" ,gpm)))))
+        #~(cons (string-append "--with-gpm="
+                               #$(this-package-input "gpm")
+                               "/lib/libgpm.so.2")
+                #$cf))))
+    (inputs (list gpm))))
 
 ;; Needed by u-boot 2022.04+
 ;; Consider merging into ncurses for next core-updates cycle.
@@ -255,8 +251,7 @@ ncursesw library provides wide character support.")
     (arguments
      (substitute-keyword-arguments (package-arguments ncurses)
        ((#:configure-flags cf)
-        `(cons "--with-termlib=tinfo"
-               ,cf))))))
+        #~(cons "--with-termlib=tinfo" #$cf))))))
 
 (define-public dialog
   (package
diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm
index ea26ba3b2d..96ffb8821a 100644
--- a/gnu/packages/nettle.scm
+++ b/gnu/packages/nettle.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016, 2021 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2020-2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -83,14 +83,14 @@ themselves.")
   ;; This version is not API-compatible with version 2.  In particular, lsh
   ;; cannot use it yet.  So keep it separate.
   (package (inherit nettle-2)
-    (version "3.7.3")
+    (version "3.8.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/nettle/nettle-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1w5wwc3q0r97d2ifhx77cw7y8s20bm8x52is9j93p2h47yq5w7v6"))))
+                "1znb87fi4gd2jkwbca74fl64pr9lr0cm5i6p7zlcszfdfwmkwkrn"))))
     (arguments
      (substitute-keyword-arguments (package-arguments nettle-2)
        ((#:configure-flags flags)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 3fac05c411..eb2cccc57c 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1198,7 +1198,7 @@ and SSH, and it can use both TCP and UDP as transport mechanisms.")
 (define-public socat
   (package
     (name "socat")
-    (version "1.7.4.1")
+    (version "1.7.4.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1206,7 +1206,7 @@ and SSH, and it can use both TCP and UDP as transport mechanisms.")
                     version ".tar.bz2"))
               (sha256
                (base32
-                "1sbmqqvni3ss9wyay6ik5v81kxffkra80mh4ypgj74g82iba5b1z"))))
+                "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))))
     (build-system gnu-build-system)
     (arguments '(#:tests? #f))          ; no test suite
     (inputs (list openssl))
@@ -2545,7 +2545,7 @@ sockets in Perl.")
     (inputs
      (list dbus zlib))
     (arguments
-     `(#:phases
+     '(#:phases
        (modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
diff --git a/gnu/packages/ninja.scm b/gnu/packages/ninja.scm
index 4c4a2f37a7..42c9309b82 100644
--- a/gnu/packages/ninja.scm
+++ b/gnu/packages/ninja.scm
@@ -31,7 +31,7 @@
 (define-public ninja
   (package
     (name "ninja")
-    (version "1.10.2")
+    (version "1.11.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -40,9 +40,9 @@
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0mspq4mvx41qri2v2zlg2y3znx5gfw6d8s3czbcfpr2218qbpz55"))))
+                "14kshkxdn833nkz2qkzb3w531dcqj6haad90gxj70ic05lb7zx9f"))))
     (build-system gnu-build-system)
-    (inputs `(("python" ,python-wrapper)))
+    (inputs (list python-wrapper))
     (arguments
      '(#:phases
        (modify-phases %standard-phases
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index be39f3b25a..43a37e85ec 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -290,8 +290,8 @@
      (list c-ares
            http-parser
            icu4c
-           libuv
-           `(,nghttp2 "lib")
+           libuv-for-node
+           `(,nghttp2-for-node "lib")
            openssl-1.1
            zlib
            ;; Regular build-time dependencies.
@@ -310,8 +310,8 @@
            c-ares
            http-parser
            icu4c
-           libuv
-           `(,nghttp2 "lib")
+           libuv-for-node
+           `(,nghttp2-for-node "lib")
            openssl
            python-wrapper               ;for node-gyp (supports python3)
            zlib))
@@ -866,9 +866,9 @@ source files.")
      (list ;; Runtime dependencies for binaries used as a bootstrap.
            c-ares-for-node
            brotli
-           icu4c-71
+           icu4c
            libuv-for-node
-           `(,nghttp2 "lib")
+           `(,nghttp2-for-node "lib")
            openssl-1.1
            zlib
            ;; Regular build-time dependencies.
@@ -881,11 +881,11 @@ source files.")
      (list bash-minimal
            coreutils
            c-ares-for-node
-           icu4c-71
+           icu4c
            libuv-for-node
            llhttp-bootstrap
            brotli
-           `(,nghttp2 "lib")
+           `(,nghttp2-for-node "lib")
            openssl-1.1
            python-wrapper ;; for node-gyp (supports python3)
            zlib))))
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 60247f34a2..7108c3909b 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2019, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2021 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016-2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -29,6 +29,7 @@
   #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system mozilla)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages bash)
@@ -49,7 +50,7 @@
               (sha256
                (base32
                 "177rxcf3lglabs7sgwcvf72ww4v56qa71lc495wl13sxs4f03vxy"))))
-    (build-system gnu-build-system)
+    (build-system mozilla-build-system)
     (inputs
      (list perl                         ;for 'compile-et.pl'
            bash-minimal))               ;for 'nspr-config'
@@ -69,16 +70,7 @@
       #~(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)))
-                     #~()))
+                             (assoc-ref %outputs "out") "/lib"))
       ;; Use fixed timestamps for reproducibility.
       #:make-flags #~'("SH_DATE='1970-01-01 00:00:01'"
                        ;; This is epoch 1 in microseconds.
@@ -123,10 +115,9 @@ in the Mozilla clients.")
 (define-public nss
   (package
     (name "nss")
-    (replacement nss/fixed)
     ;; Also update and test the nss-certs package, which duplicates version and
     ;; source to avoid a top-level variable reference & module cycle.
-    (version "3.81")
+    (version "3.88.1")
     (source (origin
               (method url-fetch)
               (uri (let ((version-with-underscores
@@ -137,7 +128,7 @@ in the Mozilla clients.")
                       "nss-" version ".tar.gz")))
               (sha256
                (base32
-                "19ncvhz45dhr0nmymwkxspq9l44gaafkspxiwxbqs1hpnqxmzgx8"))
+                "15il9fsmixa1r4446zq1wl627sg0hz9h67w6kjxz273xz3nl7li7"))
               ;; Create nss.pc and nss-config.
               (patches (search-patches "nss-3.56-pkgconfig.patch"
                                        "nss-getcwd-nonnull.patch"
@@ -200,7 +191,7 @@ in the Mozilla clients.")
                     ;; 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"))
+                    (invoke "faketime" "2022-09-01" "./nss/tests/all.sh"))
                   (format #t "test suite not run~%"))))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
@@ -226,7 +217,7 @@ in the Mozilla clients.")
     (inputs
      (list sqlite zlib))
     (propagated-inputs
-     (list nspr))                       ;required by nss.pc.
+     (list nspr-next))                            ;required by nss.pc.
     (native-inputs
      (list perl libfaketime))           ;for tests
 
@@ -244,24 +235,3 @@ PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other
 security standards.")
     (license license:mpl2.0)))
 
-(define-public nss-next
-  (package
-    (inherit nss)
-    (version "3.88.1")
-    (source (origin
-              (inherit (package-source nss))
-              (uri (let ((version-with-underscores
-                          (string-join (string-split version #\.) "_")))
-                     (string-append
-                      "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
-                      "releases/NSS_" version-with-underscores "_RTM/src/"
-                      "nss-" version ".tar.gz")))
-              (sha256
-               (base32
-                "15il9fsmixa1r4446zq1wl627sg0hz9h67w6kjxz273xz3nl7li7"))))
-    (propagated-inputs (list nspr-next)))) ;required by nss.pc
-
-(define nss/fixed
-  (package
-    (inherit nss-next)
-    (version "3.88")))                  ; slight inaccuracy to allow grafting
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f494d1112b..c6dca2874f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -134,6 +134,8 @@
                 (sha256
                  (base32
                   "1f5gl3hzvixbgk0v3kmxiyn432znyy3jh5fa65cfzcaxzgfv1i1c"))
+                (patches (search-patches
+                           "camlboot-dynamically-allocate-stack-signal.patch"))
                 (modules '((guix build utils)))
                 (snippet
                  `(begin
@@ -317,7 +319,9 @@ functional, imperative and object-oriented styles of programming.")
                     "http://caml.inria.fr/pub/distrib/ocaml-"
                     (version-major+minor version)
                     "/ocaml-" version ".tar.xz"))
-              (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
+              (patches (search-patches
+                         "ocaml-4.09-multiple-definitions.patch"
+                         "ocaml-4.09-dynamically-allocate-signal-stack.patch"))
               (sha256
                (base32
                 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
@@ -366,7 +370,9 @@ patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
               (sha256
                (base32
                 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
-              (patches (search-patches "ocaml-multiple-definitions.patch"))
+              (patches (search-patches
+                         "ocaml-multiple-definitions.patch"
+                         "ocaml-4.07-dynamically-allocate-signal-stack.patch"))
               (modules '((guix build utils)))
               (snippet
                `(begin
diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index 3928e80476..afeb26331c 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -41,12 +41,12 @@
   (package
     (name "libtirpc")
     (version "1.3.1")
-    (replacement libtirpc/fixed)
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/libtirpc/libtirpc/"
                                   version "/libtirpc-"
                                   version ".tar.bz2"))
+              (patches (search-patches "libtirpc-CVE-2021-46828.patch"))
               (sha256
                (base32
                 "05zf16ilwwkzv4cccaac32nssrj3rg444n9pskiwbgk6y359an14"))))
@@ -89,13 +89,6 @@ IPv4 and IPv6.  ONC RPC is notably used by the network file system (NFS).")
                                #$(this-package-input "mit-krb5")
                                "/bin/krb5-config")))))))
 
-(define libtirpc/fixed
-  (package
-    (inherit libtirpc)
-    (source (origin
-              (inherit (package-source libtirpc))
-              (patches (search-patches "libtirpc-CVE-2021-46828.patch"))))))
-
 (define-public rpcbind
   (package
     (name "rpcbind")
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index 3f3015bd80..b382043962 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -134,7 +134,7 @@
               ;; See <http://www.openldap.org/software/download/> for a list of
               ;; mirrors.
               (uri (list (string-append
-                          "http://mirror.eu.oneandone.net/software/openldap"
+                          "http://repository.linagora.org/OpenLDAP"
                           "/openldap-release/openldap-" version ".tgz")
                          (string-append
                           "https://www.openldap.org/software/download/OpenLDAP/"
@@ -146,25 +146,36 @@
                (base32
                 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj"))))
     (arguments
-     (substitute-keyword-arguments (package-arguments openldap)
-       ((#:phases phases)
-        #~(modify-phases #$phases
-            (replace 'patch-sasl-path
-              ;; Give -L arguments for cyrus-sasl to avoid propagation.
-              (lambda* (#:key inputs #:allow-other-keys)
-                (let ((krb5 (search-input-file inputs "/lib/libkrb5.so")))
-                  (substitute* (string-append #$output "/lib/libldap.la")
-                    (("-lkrb5" lib)
-                     (string-append "-L" (dirname krb5) "/lib " lib))))))
-            (add-after 'install 'provide-ldap_r
-              (lambda _
-                ;; The re-entrant libldap_r no longer exists since 2.6
-                ;; as it has become the default: provide a linker alias
-                ;; for now.
-                (call-with-output-file (string-append #$output
-                                                      "/lib/libldap_r.so")
-                  (lambda (port)
-                    (format port "INPUT ( libldap.so )~%")))))))))))
+     (list
+      #:tests? #f
+      #:configure-flags
+      #~'("--disable-static"
+          #$@(if (%current-target-system)
+                 '("--with-yielding_select=yes"
+                   "ac_cv_func_memcmp_working=yes")
+                  '()))
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(if (%current-target-system)
+                 '((add-before 'configure 'fix-cross-gcc
+                     (lambda* (#:key target #:allow-other-keys)
+                       (setenv "CC" (string-append target "-gcc"))
+                       (setenv "STRIP" (string-append target "-strip")))))
+                 '())
+          (add-after 'install 'provide-libldap_r
+            (lambda _
+              ;; The re-entrant libldap_r no longer exists since 2.6
+              ;; as it has become the default: provide a linker alias
+              ;; for now.
+              (call-with-output-file (string-append #$output
+                                                    "/lib/libldap_r.so")
+                (lambda (port)
+                  (format port "INPUT ( libldap.so )~%"))))))))
+    (synopsis "Implementation of the Lightweight Directory Access Protocol")
+    (description
+     "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
+    (license openldap2.8)
+    (home-page "https://www.openldap.org/")))
 
 (define-public nss-pam-ldapd
   (package
@@ -233,7 +244,7 @@ an LDAP server.")
                (setenv "SLAPD" slapd)
                (setenv "SCHEMA" schema)))))))
     (inputs
-     (list openldap-2.6 cyrus-sasl mit-krb5))
+     (list openldap cyrus-sasl mit-krb5))
     (propagated-inputs
      (list python-pyasn1 python-pyasn1-modules))
     (home-page "https://www.python-ldap.org/")
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index d27c8a91ef..b764cde62d 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1992,7 +1992,7 @@ cp -r /tmp/locale/*/en_US.*")))
            libsoup-minimal-2
            libxau
            libxml2
-           p11-kit-next
+           p11-kit
            util-linux
            xdg-dbus-proxy))
     (propagated-inputs (list glib-networking gnupg gsettings-desktop-schemas))
diff --git a/gnu/packages/patches/autotrace-glib-compat.patch b/gnu/packages/patches/autotrace-glib-compat.patch
deleted file mode 100644
index e63dcedf83..0000000000
--- a/gnu/packages/patches/autotrace-glib-compat.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Fix build with GLib 2.68 and later.
-
-Taken from upstream pull request:
-https://github.com/autotrace/autotrace/pull/41
-
-diff --git a/src/autotrace.h b/src/autotrace.h
---- a/src/autotrace.h
-+++ b/src/autotrace.h
-@@ -23,6 +23,9 @@
- 
- #include <stdio.h>
- 
-+#include "types.h"
-+#include "color.h"
-+
- #ifdef __cplusplus
- extern "C" {
- #endif                          /* __cplusplus */
-@@ -35,9 +38,6 @@ extern "C" {
-  * Typedefs
-  * ===================================================================== */
- 
--#include "types.h"
--#include "color.h"
--
- /* Third degree is the highest we deal with.  */
-   enum _at_polynomial_degree {
-     AT_LINEARTYPE = 1,
-diff --git a/src/color.h b/src/color.h
---- a/src/color.h
-+++ b/src/color.h
-@@ -24,6 +24,10 @@
- #include <glib.h>
- #include <glib-object.h>
- 
-+#ifdef __cplusplus
-+extern "C" {
-+#endif                          /* __cplusplus */
-+
- typedef struct _at_color at_color;
- struct _at_color {
-   guint8 r;
-@@ -43,4 +47,7 @@ void at_color_free(at_color * color);
- GType at_color_get_type(void);
- #define AT_TYPE_COLOR (at_color_get_type ())
- 
-+#ifdef __cplusplus
-+}
-+#endif                          /* __cplusplus */
- #endif /* not AT_COLOR_H */
diff --git a/gnu/packages/patches/bash-completion-directories.patch b/gnu/packages/patches/bash-completion-directories.patch
index 021e34653b..a9b88203bd 100644
--- a/gnu/packages/patches/bash-completion-directories.patch
+++ b/gnu/packages/patches/bash-completion-directories.patch
@@ -4,24 +4,28 @@ up by the dynamic completion loader from there---whether they are
 part of bash-completion or installed by another package.
 
 On Guix systems, we want not only to search within bash-completion's own
-directory, but also in the user's profile and in the system profile.
+directory, but also in the user's profile and guix home profile, as well
+as in the system profile.
 This is what this patch does.
 
 
 --- a/bash_completion
 +++ b/bash_completion
-@@ -2016,7 +2016,13 @@ complete -F _minimal ''
+@@ -2173,7 +2173,15 @@ complete -F _minimal ''
  
  __load_completion()
  {
--    local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
+-    local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions)
 +    local -a dirs=(
 +        ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions
-+        "$HOME/.guix-profile/share/bash-completion/completions/$base"
-+        "$HOME/.guix-profile/etc/bash_completion.d/$base"
-+        "/run/current-system/profile/share/bash-completion/completions/$base"
-+        "/run/current-system/profile/etc/bash_completion.d/$base" )
++        "$HOME/.guix-profile/share/bash-completion/completions"
++        "$HOME/.guix-profile/etc/bash_completion.d"
++        "$HOME/.guix-home/profile/share/bash-completion/completions"
++        "$HOME/.guix-home/profile/etc/bash_completion.d"
++        "/run/current-system/profile/share/bash-completion/completions"
++        "/run/current-system/profile/etc/bash_completion.d" )
 +
-     local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile
+     local ifs=$IFS IFS=: dir cmd="${1##*/}" compfile
+     [[ -n $cmd ]] || return 1
      for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
          dirs+=( $dir/bash-completion/completions )
diff --git a/gnu/packages/patches/bc-fix-cross-compilation.patch b/gnu/packages/patches/bc-fix-cross-compilation.patch
index 14dfecdbde..04f2c92abf 100644
--- a/gnu/packages/patches/bc-fix-cross-compilation.patch
+++ b/gnu/packages/patches/bc-fix-cross-compilation.patch
@@ -1,15 +1,19 @@
-Patch taken from nix.
-
-commit fdda59736ddc048cf38a2c7103f4f5d9eeaf995e
-Author: Ben Gamari <ben@smart-cactus.org>
-Date:   Tue Oct 17 10:51:34 2017 -0400
-
-    Try implementing cross-compilation
+Patch adapted from Nix.
+Upstream-status: Submitted to bug-bc@gnu.org.
 
 diff --git a/bc/Makefile.am b/bc/Makefile.am
-index d9d412e..fdef633 100644
+index d9d412e..13f2b1e 100644
 --- a/bc/Makefile.am
 +++ b/bc/Makefile.am
+@@ -8,7 +8,7 @@ EXTRA_DIST = bc.h bcdefs.h const.h fix-libmath_h global.h libmath.b proto.h \
+              sbc.y
+ noinst_HEADERS = libmath.h
+ 
+-DISTCLEANFILES = sbc sbc.c sbc.h libmath.h
++DISTCLEANFILES = fbc sbc sbc.c sbc.h libmath.h
+ 
+ MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \
+ 	bc.y bcdefs.h const.h execute.c fix-libmath_h \
 @@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \
  
  AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../h
@@ -18,31 +22,36 @@ index d9d412e..fdef633 100644
  LIBL = @LEXLIB@
  LDADD = $(LIBBC) $(LIBL) @READLINELIB@
  
-@@ -29,12 +30,20 @@ $(PROGRAMS): libmath.h $(LIBBC)
+@@ -29,15 +30,22 @@ $(PROGRAMS): libmath.h $(LIBBC)
  scan.o: bc.h
  global.o: libmath.h
-+
-+main_host.c : main.c
-+	cp $< $@
  
 -fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o
-+fbcOBJ = $(addsuffix _host,main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o)
-+
-+%.o_host : CC:=$(CC_FOR_BUILD)
-+
-+%.o_host : %.c
-+	$(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $<
++%.o_host: CC := $(CC_FOR_BUILD)
++%.o_host: %.c
++	$(COMPILE) -c -o $@ $<
  
 -libmath.h: libmath.b $(fbcOBJ) $(LIBBC)
-+libmath.h: libmath.b $(fbcOBJ) $(LIBBC_HOST)
- 	echo '{0}' > libmath.h
+-	echo '{0}' > libmath.h
 -	$(MAKE) global.o
 -	$(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
-+	$(MAKE) global.o_host
-+	$(CC_FOR_BUILD) -o fbc $(fbcOBJ) global.o_host $(LIBBC_HOST) $(LIBL) ${READLINELIB} $(LIBS)
- 	./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
+-	./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
++fbcOBJ = $(addsuffix _host,\
++	   main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o)
++
++global_host.c: global.c
++	sed 's/#include "libmath.h"/{0}/' $< > $@
++
++fbc: $(fbcOBJ) global_host.o_host $(LIBBC_HOST) $(LIBS)
++	$(CC_FOR_BUILD) $(LIBL) $(READLINELIB) -o $@ $^
++
++libmath.h: libmath.b fbc $(LIBBC_HOST)
++	./fbc -c $(srcdir)/libmath.b < /dev/null > libmath.h
  	$(srcdir)/fix-libmath_h
- 	rm -f ./fbc ./global.o
+-	rm -f ./fbc ./global.o
+ 
+ sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \
+          warranty.o
 diff --git a/configure.ac b/configure.ac
 index fc74573..5cabb73 100644
 --- a/configure.ac
@@ -64,7 +73,7 @@ index fc74573..5cabb73 100644
  
  AM_PROG_LEX
 diff --git a/lib/Makefile.am b/lib/Makefile.am
-index ec4bf59..c670f5b 100644
+index ec4bf59..24c9f42 100644
 --- a/lib/Makefile.am
 +++ b/lib/Makefile.am
 @@ -1,5 +1,5 @@
@@ -74,14 +83,23 @@ index ec4bf59..c670f5b 100644
  
  AM_CPPFLAGS = -I. -I.. -I$(srcdir)/../h
  
-@@ -24,3 +24,11 @@ testmul: testmul.o number.o
+@@ -7,8 +7,6 @@ libbc_a_SOURCES = getopt.c getopt1.c vfprintf.c number.c
+ 
+ DEFS = @DEFS@ $(DEFSADD)
+ 
+-AM_CFLAGS = @CFLAGS@
+-
+ MAINTAINERCLEANFILES = Makefile.in number.c
+ CLEANFILES = testmul specialnumber muldigits.h
+ 
+@@ -24,3 +22,11 @@ testmul: testmul.o number.o
  
  specialnumber: newnumber.o
  	cp newnumber.o number.o
 +
-+%.o_host : CC:=$(CC_FOR_BUILD)
++%.o_host: CC := $(CC_FOR_BUILD)
 +%.o_host : %.c
-+	$(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $<
++	$(COMPILE) -c -o $@ $<
 +
 +libbc_host.a : $(addsuffix _host,$(libbc_a_OBJECTS))
 +	ar cru $@ $+
diff --git a/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch b/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch
deleted file mode 100644
index 1fd3d3d9b7..0000000000
--- a/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-From 1c611b40e6bfc8029bff7696814330b5bc0ee5c0 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 26 Jul 2021 05:59:55 -0700
-Subject: [PATCH] bfd: Close the file descriptor if there is no archive fd
-
-Close the file descriptor if there is no archive plugin file descriptor
-to avoid running out of file descriptors on thin archives with many
-archive members.
-
-bfd/
-
-	PR ld/28138
-	* plugin.c (bfd_plugin_close_file_descriptor): Close the file
-	descriptor there is no archive plugin file descriptor.
-
-ld/
-
-	PR ld/28138
-	* testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for
-	native build.
-
-	PR ld/28138
-	* testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
-	* testsuite/ld-plugin/pr28138.c: New file.
-	* testsuite/ld-plugin/pr28138-1.c: Likewise.
-	* testsuite/ld-plugin/pr28138-2.c: Likewise.
-	* testsuite/ld-plugin/pr28138-3.c: Likewise.
-	* testsuite/ld-plugin/pr28138-4.c: Likewise.
-	* testsuite/ld-plugin/pr28138-5.c: Likewise.
-	* testsuite/ld-plugin/pr28138-6.c: Likewise.
-	* testsuite/ld-plugin/pr28138-7.c: Likewise.
-
-(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
-(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)
----
- bfd/plugin.c                       |  8 +++++++
- ld/testsuite/ld-plugin/lto.exp     | 34 ++++++++++++++++++++++++++++++
- ld/testsuite/ld-plugin/pr28138-1.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138-2.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138-3.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138-4.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138-5.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138-6.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138-7.c |  6 ++++++
- ld/testsuite/ld-plugin/pr28138.c   | 20 ++++++++++++++++++
- 10 files changed, 104 insertions(+)
- create mode 100644 ld/testsuite/ld-plugin/pr28138-1.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138-2.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138-3.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138-4.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138-5.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138-6.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138-7.c
- create mode 100644 ld/testsuite/ld-plugin/pr28138.c
-
-diff --git a/bfd/plugin.c b/bfd/plugin.c
-index 6cfa2b66470..3bab8febe88 100644
---- a/bfd/plugin.c
-+++ b/bfd/plugin.c
-@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *abfd, int fd)
- 	     && !bfd_is_thin_archive (abfd->my_archive))
- 	abfd = abfd->my_archive;
- 
-+      /* Close the file descriptor if there is no archive plugin file
-+	 descriptor.  */
-+      if (abfd->archive_plugin_fd == -1)
-+	{
-+	  close (fd);
-+	  return;
-+	}
-+
-       abfd->archive_plugin_fd_open_count--;
-       /* Dup the archive plugin file descriptor for later use, which
- 	 will be closed by _bfd_archive_close_and_cleanup.  */
-diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
-index def69e43ab3..999d911ce6a 100644
---- a/ld/testsuite/ld-plugin/lto.exp
-+++ b/ld/testsuite/ld-plugin/lto.exp
-@@ -687,6 +687,40 @@ if { [is_elf_format] && [check_lto_shared_available] } {
-     }
- }
- 
-+run_cc_link_tests [list \
-+    [list \
-+	"Build pr28138.a" \
-+	"-T" "" \
-+	{pr28138-1.c pr28138-2.c pr28138-3.c pr28138-4.c pr28138-5.c \
-+	 pr28138-6.c pr28138-7.c} {} "pr28138.a" \
-+    ] \
-+    [list \
-+	"Build pr28138.o" \
-+	"" "" \
-+	{pr28138.c} {} \
-+    ] \
-+]
-+
-+set exec_output [run_host_cmd "sh" \
-+			      "-c \"ulimit -n 20; \
-+			      $CC -Btmpdir/ld -o tmpdir/pr28138 \
-+			      tmpdir/pr28138.o tmpdir/pr28138.a\""]
-+set exec_output [prune_warnings $exec_output]
-+if [string match "" $exec_output] then {
-+    if { [isnative] } {
-+	set exec_output [run_host_cmd "tmpdir/pr28138" ""]
-+	if [string match "PASS" $exec_output] then {
-+	    pass "PR ld/28138"
-+	} else {
-+	    fail "PR ld/28138"
-+	}
-+    } else {
-+	pass "PR ld/28138"
-+    }
-+} else {
-+    fail "PR ld/28138"
-+}
-+
- set testname "Build liblto-11.a"
- remote_file host delete "tmpdir/liblto-11.a"
- set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
-diff --git a/ld/testsuite/ld-plugin/pr28138-1.c b/ld/testsuite/ld-plugin/pr28138-1.c
-new file mode 100644
-index 00000000000..51d119e1642
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-1.c
-@@ -0,0 +1,6 @@
-+extern int a0(void);
-+int
-+a1(void)
-+{
-+  return 1 + a0();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138-2.c b/ld/testsuite/ld-plugin/pr28138-2.c
-new file mode 100644
-index 00000000000..1120cd797e9
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-2.c
-@@ -0,0 +1,6 @@
-+extern int a1(void);
-+int
-+a2(void)
-+{
-+  return 1 + a1();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138-3.c b/ld/testsuite/ld-plugin/pr28138-3.c
-new file mode 100644
-index 00000000000..ec464947ee6
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-3.c
-@@ -0,0 +1,6 @@
-+extern int a2(void);
-+int
-+a3(void)
-+{
-+  return 1 + a2();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138-4.c b/ld/testsuite/ld-plugin/pr28138-4.c
-new file mode 100644
-index 00000000000..475701b2c5c
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-4.c
-@@ -0,0 +1,6 @@
-+extern int a3(void);
-+int
-+a4(void)
-+{
-+  return 1 + a3();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138-5.c b/ld/testsuite/ld-plugin/pr28138-5.c
-new file mode 100644
-index 00000000000..e24f86c363e
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-5.c
-@@ -0,0 +1,6 @@
-+extern int a4(void);
-+int
-+a5(void)
-+{
-+  return 1 + a4();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138-6.c b/ld/testsuite/ld-plugin/pr28138-6.c
-new file mode 100644
-index 00000000000..b5b938bdb21
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-6.c
-@@ -0,0 +1,6 @@
-+extern int a5(void);
-+int
-+a6(void)
-+{
-+  return 1 + a5();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138-7.c b/ld/testsuite/ld-plugin/pr28138-7.c
-new file mode 100644
-index 00000000000..4ef75bf0f0c
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138-7.c
-@@ -0,0 +1,6 @@
-+extern int a6(void);
-+int
-+a7(void)
-+{
-+  return 1 + a6();
-+}
-diff --git a/ld/testsuite/ld-plugin/pr28138.c b/ld/testsuite/ld-plugin/pr28138.c
-new file mode 100644
-index 00000000000..68252c9f382
---- /dev/null
-+++ b/ld/testsuite/ld-plugin/pr28138.c
-@@ -0,0 +1,20 @@
-+#include <stdio.h>
-+
-+extern int a7(void);
-+
-+int
-+a0(void)
-+{
-+  return 0;
-+}
-+
-+int
-+main()
-+{
-+  if (a7() == 7)
-+    {
-+      printf ("PASS\n");
-+      return 0;
-+    }
-+  return 1;
-+}
--- 
-2.27.0
diff --git a/gnu/packages/patches/binutils-CVE-2021-45078.patch b/gnu/packages/patches/binutils-CVE-2021-45078.patch
deleted file mode 100644
index fca692bdb5..0000000000
--- a/gnu/packages/patches/binutils-CVE-2021-45078.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-Fix CVE-2021-45078 (incomplete fix for CVE-2018-12699):
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45078
-https://sourceware.org/bugzilla/show_bug.cgi?id=28694
-
-Patch copied from upstream source repository:
-
-https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=161e87d12167b1e36193385485c1f6ce92f74f02
-
-From 161e87d12167b1e36193385485c1f6ce92f74f02 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Wed, 15 Dec 2021 11:48:42 +1030
-Subject: [PATCH] PR28694, Out-of-bounds write in stab_xcoff_builtin_type
-
-	PR 28694
-	* stabs.c (stab_xcoff_builtin_type): Make typenum unsigned.
-	Negate typenum earlier, simplifying bounds checking.  Correct
-	off-by-one indexing.  Adjust switch cases.
----
- binutils/stabs.c | 87 ++++++++++++++++++++++++------------------------
- 1 file changed, 43 insertions(+), 44 deletions(-)
-
-diff --git a/binutils/stabs.c b/binutils/stabs.c
-index 274bfb0e7fa..83ee3ea5fa4 100644
---- a/binutils/stabs.c
-+++ b/binutils/stabs.c
-@@ -202,7 +202,7 @@ static debug_type stab_find_type (void *, struct stab_handle *, const int *);
- static bool stab_record_type
-   (void *, struct stab_handle *, const int *, debug_type);
- static debug_type stab_xcoff_builtin_type
--  (void *, struct stab_handle *, int);
-+  (void *, struct stab_handle *, unsigned int);
- static debug_type stab_find_tagged_type
-   (void *, struct stab_handle *, const char *, int, enum debug_type_kind);
- static debug_type *stab_demangle_argtypes
-@@ -3496,166 +3496,167 @@ stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info,
- 
- static debug_type
- stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
--			 int typenum)
-+			 unsigned int typenum)
- {
-   debug_type rettype;
-   const char *name;
- 
--  if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT)
-+  typenum = -typenum - 1;
-+  if (typenum >= XCOFF_TYPE_COUNT)
-     {
--      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum);
-+      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), -typenum - 1);
-       return DEBUG_TYPE_NULL;
-     }
--  if (info->xcoff_types[-typenum] != NULL)
--    return info->xcoff_types[-typenum];
-+  if (info->xcoff_types[typenum] != NULL)
-+    return info->xcoff_types[typenum];
- 
--  switch (-typenum)
-+  switch (typenum)
-     {
--    case 1:
-+    case 0:
-       /* The size of this and all the other types are fixed, defined
- 	 by the debugging format.  */
-       name = "int";
-       rettype = debug_make_int_type (dhandle, 4, false);
-       break;
--    case 2:
-+    case 1:
-       name = "char";
-       rettype = debug_make_int_type (dhandle, 1, false);
-       break;
--    case 3:
-+    case 2:
-       name = "short";
-       rettype = debug_make_int_type (dhandle, 2, false);
-       break;
--    case 4:
-+    case 3:
-       name = "long";
-       rettype = debug_make_int_type (dhandle, 4, false);
-       break;
--    case 5:
-+    case 4:
-       name = "unsigned char";
-       rettype = debug_make_int_type (dhandle, 1, true);
-       break;
--    case 6:
-+    case 5:
-       name = "signed char";
-       rettype = debug_make_int_type (dhandle, 1, false);
-       break;
--    case 7:
-+    case 6:
-       name = "unsigned short";
-       rettype = debug_make_int_type (dhandle, 2, true);
-       break;
--    case 8:
-+    case 7:
-       name = "unsigned int";
-       rettype = debug_make_int_type (dhandle, 4, true);
-       break;
--    case 9:
-+    case 8:
-       name = "unsigned";
-       rettype = debug_make_int_type (dhandle, 4, true);
-       break;
--    case 10:
-+    case 9:
-       name = "unsigned long";
-       rettype = debug_make_int_type (dhandle, 4, true);
-       break;
--    case 11:
-+    case 10:
-       name = "void";
-       rettype = debug_make_void_type (dhandle);
-       break;
--    case 12:
-+    case 11:
-       /* IEEE single precision (32 bit).  */
-       name = "float";
-       rettype = debug_make_float_type (dhandle, 4);
-       break;
--    case 13:
-+    case 12:
-       /* IEEE double precision (64 bit).  */
-       name = "double";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 14:
-+    case 13:
-       /* This is an IEEE double on the RS/6000, and different machines
- 	 with different sizes for "long double" should use different
- 	 negative type numbers.  See stabs.texinfo.  */
-       name = "long double";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 15:
-+    case 14:
-       name = "integer";
-       rettype = debug_make_int_type (dhandle, 4, false);
-       break;
--    case 16:
-+    case 15:
-       name = "boolean";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 17:
-+    case 16:
-       name = "short real";
-       rettype = debug_make_float_type (dhandle, 4);
-       break;
--    case 18:
-+    case 17:
-       name = "real";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 19:
-+    case 18:
-       /* FIXME */
-       name = "stringptr";
-       rettype = NULL;
-       break;
--    case 20:
-+    case 19:
-       /* FIXME */
-       name = "character";
-       rettype = debug_make_int_type (dhandle, 1, true);
-       break;
--    case 21:
-+    case 20:
-       name = "logical*1";
-       rettype = debug_make_bool_type (dhandle, 1);
-       break;
--    case 22:
-+    case 21:
-       name = "logical*2";
-       rettype = debug_make_bool_type (dhandle, 2);
-       break;
--    case 23:
-+    case 22:
-       name = "logical*4";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 24:
-+    case 23:
-       name = "logical";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 25:
-+    case 24:
-       /* Complex type consisting of two IEEE single precision values.  */
-       name = "complex";
-       rettype = debug_make_complex_type (dhandle, 8);
-       break;
--    case 26:
-+    case 25:
-       /* Complex type consisting of two IEEE double precision values.  */
-       name = "double complex";
-       rettype = debug_make_complex_type (dhandle, 16);
-       break;
--    case 27:
-+    case 26:
-       name = "integer*1";
-       rettype = debug_make_int_type (dhandle, 1, false);
-       break;
--    case 28:
-+    case 27:
-       name = "integer*2";
-       rettype = debug_make_int_type (dhandle, 2, false);
-       break;
--    case 29:
-+    case 28:
-       name = "integer*4";
-       rettype = debug_make_int_type (dhandle, 4, false);
-       break;
--    case 30:
-+    case 29:
-       /* FIXME */
-       name = "wchar";
-       rettype = debug_make_int_type (dhandle, 2, false);
-       break;
--    case 31:
-+    case 30:
-       name = "long long";
-       rettype = debug_make_int_type (dhandle, 8, false);
-       break;
--    case 32:
-+    case 31:
-       name = "unsigned long long";
-       rettype = debug_make_int_type (dhandle, 8, true);
-       break;
--    case 33:
-+    case 32:
-       name = "logical*8";
-       rettype = debug_make_bool_type (dhandle, 8);
-       break;
--    case 34:
-+    case 33:
-       name = "integer*8";
-       rettype = debug_make_int_type (dhandle, 8, false);
-       break;
-@@ -3664,9 +3665,7 @@ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
-     }
- 
-   rettype = debug_name_type (dhandle, name, rettype);
--
--  info->xcoff_types[-typenum] = rettype;
--
-+  info->xcoff_types[typenum] = rettype;
-   return rettype;
- }
- 
--- 
-2.27.0
-
diff --git a/gnu/packages/patches/camlboot-dynamically-allocate-stack-signal.patch b/gnu/packages/patches/camlboot-dynamically-allocate-stack-signal.patch
new file mode 100644
index 0000000000..d27232214b
--- /dev/null
+++ b/gnu/packages/patches/camlboot-dynamically-allocate-stack-signal.patch
@@ -0,0 +1,52 @@
+From 883d68803d17d6f64cdabf2c8ef846345e2d0094 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sun, 19 Feb 2023 10:20:19 +0100
+Subject: [PATCH] Dynamically allocate the alternate signal stack.
+
+This patch is a backport of https://github.com/ocaml/ocaml/pull/10266.
+---
+ ocaml-src/asmrun/signals_asm.c | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/ocaml-src/asmrun/signals_asm.c b/ocaml-src/asmrun/signals_asm.c
+index 3895d75..d37b481 100644
+--- a/ocaml-src/asmrun/signals_asm.c
++++ b/ocaml-src/asmrun/signals_asm.c
+@@ -182,7 +182,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler)
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
+ 
+ static char * system_stack_top;
+-static char sig_alt_stack[SIGSTKSZ];
+ 
+ #if defined(SYS_linux)
+ /* PR#4746: recent Linux kernels with support for stack randomization
+@@ -274,15 +273,19 @@ void caml_init_signals(void)
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
+   {
+     stack_t stk;
+-    struct sigaction act;
+-    stk.ss_sp = sig_alt_stack;
++    stk.ss_sp = malloc(SIGSTKSZ);
+     stk.ss_size = SIGSTKSZ;
+     stk.ss_flags = 0;
+-    SET_SIGACT(act, segv_handler);
+-    act.sa_flags |= SA_ONSTACK | SA_NODEFER;
+-    sigemptyset(&act.sa_mask);
+-    system_stack_top = (char *) &act;
+-    if (sigaltstack(&stk, NULL) == 0) { sigaction(SIGSEGV, &act, NULL); }
++    if (stk.ss_sp != NULL) {
++      if (sigaltstack(&stk, NULL) != -1) {
++        struct sigaction act;
++        SET_SIGACT(act, segv_handler);
++        act.sa_flags |= SA_ONSTACK | SA_NODEFER;
++        sigemptyset(&act.sa_mask);
++        system_stack_top = (char *) &act;
++        sigaction(SIGSEGV, &act, NULL);
++      }
++    }
+   }
+ #endif
+ }
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/cmake-curl-certificates.patch b/gnu/packages/patches/cmake-curl-certificates.patch
deleted file mode 100644
index 7fe2615271..0000000000
--- a/gnu/packages/patches/cmake-curl-certificates.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-By default commands such as "ctest" would not look for certificates
-at all: <https://issues.guix.gnu.org/issue/37371>.
-
-This changes CMake such that commands honor SSL_CERT_FILE and SSL_CERT_DIR
-as well as /etc/ssl/certs.
-
---- cmake-3.13.1/Source/cmCurl.cxx	2019-09-10 17:27:36.926907260 +0200
-+++ cmake-3.13.1/Source/cmCurl.cxx	2019-09-10 17:52:35.475903919 +0200
-@@ -2,11 +2,8 @@
-    file Copyright.txt or https://cmake.org/licensing for details.  */
- #include "cmCurl.h"
- 
--#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) &&                    \
--  !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
- #  define CMAKE_FIND_CAFILE
- #  include "cmSystemTools.h"
--#endif
- #include "cmStringAlgorithms.h"
- 
- // curl versions before 7.21.5 did not provide this error code
-@@ -30,6 +27,19 @@
-     ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile);
-     check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
-   }
-+
-+  /* Honor the usual environment variables.  */
-+  else if (cmSystemTools::GetEnv("SSL_CERT_FILE", e)) {
-+    ::CURLcode res =
-+      ::curl_easy_setopt(curl, CURLOPT_CAINFO, e.c_str());
-+    check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
-+  }
-+  else if (cmSystemTools::GetEnv("SSL_CERT_DIR", e)) {
-+    ::CURLcode res =
-+      ::curl_easy_setopt(curl, CURLOPT_CAPATH, e.c_str());
-+    check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
-+  }
-+
- #ifdef CMAKE_FIND_CAFILE
- #  define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
-   else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) {
diff --git a/gnu/packages/patches/coreutils-ls.patch b/gnu/packages/patches/coreutils-ls.patch
deleted file mode 100644
index 59cbbf00b5..0000000000
--- a/gnu/packages/patches/coreutils-ls.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Patch taken from upstream to fix cross-compilation for aarch64.  This can be
-removed on the next coreutils release.
-
-From 10fcb97bd728f09d4a027eddf8ad2900f0819b0a Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Thu, 5 Mar 2020 17:25:29 -0800
-Subject: [PATCH] ls: restore 8.31 behavior on removed directories
-
-* NEWS: Mention this.
-* src/ls.c: Do not include <sys/sycall.h>
-(print_dir): Don't worry about whether the directory is removed.
-* tests/ls/removed-directory.sh: Adjust to match new (i.e., old)
-behavior.
----
- NEWS                          |  6 ++++++
- src/ls.c                      | 22 ----------------------
- tests/ls/removed-directory.sh | 10 ++--------
- 3 files changed, 8 insertions(+), 30 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index fdc8bf5db..653e7178b 100644
---- a/NEWS
-+++ b/NEWS
-@@ -2,6 +2,12 @@ GNU coreutils NEWS                                    -*- outline -*-
- 
- * Noteworthy changes in release ?.? (????-??-??) [?]
- 
-+** Changes in behavior
-+
-+  On GNU/Linux systems, ls no longer issues an error message on
-+  directory merely because it was removed.  This reverts a change
-+  that was made in release 8.32.
-+
- 
- * Noteworthy changes in release 8.32 (2020-03-05) [stable]
- 
-diff --git a/src/ls.c b/src/ls.c
-index 24b983287..4acf5f44d 100644
---- a/src/ls.c
-+++ b/src/ls.c
-@@ -49,10 +49,6 @@
- # include <sys/ptem.h>
- #endif
- 
--#ifdef __linux__
--# include <sys/syscall.h>
--#endif
--
- #include <stdio.h>
- #include <assert.h>
- #include <setjmp.h>
-@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
-   struct dirent *next;
-   uintmax_t total_blocks = 0;
-   static bool first = true;
--  bool found_any_entries = false;
- 
-   errno = 0;
-   dirp = opendir (name);
-@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
-       next = readdir (dirp);
-       if (next)
-         {
--          found_any_entries = true;
-           if (! file_ignored (next->d_name))
-             {
-               enum filetype type = unknown;
-@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
-           if (errno != EOVERFLOW)
-             break;
-         }
--#ifdef __linux__
--      else if (! found_any_entries)
--        {
--          /* If readdir finds no directory entries at all, not even "." or
--             "..", then double check that the directory exists.  */
--          if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
--              && errno != EINVAL)
--            {
--              /* We exclude EINVAL as that pertains to buffer handling,
--                 and we've passed NULL as the buffer for simplicity.
--                 ENOENT is returned if appropriate before buffer handling.  */
--              file_failure (command_line_arg, _("reading directory %s"), name);
--            }
--          break;
--        }
--#endif
-       else
-         break;
- 
-diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
-index e8c835dab..fe8f929a1 100755
---- a/tests/ls/removed-directory.sh
-+++ b/tests/ls/removed-directory.sh
-@@ -26,20 +26,14 @@ case $host_triplet in
-   *) skip_ 'non linux kernel' ;;
- esac
- 
--LS_FAILURE=2
--
--cat <<\EOF >exp-err || framework_failure_
--ls: reading directory '.': No such file or directory
--EOF
--
- cwd=$(pwd)
- mkdir d || framework_failure_
- cd d || framework_failure_
- rmdir ../d || framework_failure_
- 
--returns_ $LS_FAILURE ls >../out 2>../err || fail=1
-+ls >../out 2>../err || fail=1
- cd "$cwd" || framework_failure_
- compare /dev/null out || fail=1
--compare exp-err err || fail=1
-+compare /dev/null err || fail=1
- 
- Exit $fail
diff --git a/gnu/packages/patches/curl-easy-lock.patch b/gnu/packages/patches/curl-easy-lock.patch
deleted file mode 100644
index 137106f57c..0000000000
--- a/gnu/packages/patches/curl-easy-lock.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-This patch is taken from upstream master, and should probably be dropped
-with the next release.
-
-ihttps://github.com/curl/curl/commit/e2e7f54b7bea521fa8373095d0f43261a720cda0.patch
-
-From e2e7f54b7bea521fa8373095d0f43261a720cda0 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Mon, 27 Jun 2022 08:46:21 +0200
-Subject: [PATCH] easy_lock.h: include sched.h if available to fix build
-
-Patched-by: Harry Sintonen
-
-Closes #9054
----
- lib/easy_lock.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/lib/easy_lock.h b/lib/easy_lock.h
-index 819f50ce815b8..1f54289ceb2d3 100644
---- a/lib/easy_lock.h
-+++ b/lib/easy_lock.h
-@@ -36,6 +36,9 @@
- 
- #elif defined (HAVE_ATOMIC)
- #include <stdatomic.h>
-+#if defined(HAVE_SCHED_YIELD)
-+#include <sched.h>
-+#endif
- 
- #define curl_simple_lock atomic_bool
- #define CURL_SIMPLE_LOCK_INIT false
diff --git a/gnu/packages/patches/cyrus-sasl-CVE-2019-19906.patch b/gnu/packages/patches/cyrus-sasl-CVE-2019-19906.patch
deleted file mode 100644
index acdf682430..0000000000
--- a/gnu/packages/patches/cyrus-sasl-CVE-2019-19906.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From dcc9f51cbd4ed622cfb0f9b1c141eb2ffe3b12f1 Mon Sep 17 00:00:00 2001
-From: Quanah Gibson-Mount <quanah@symas.com>
-Date: Tue, 18 Feb 2020 19:05:12 +0000
-Subject: [PATCH] Fix #587
-
-Off by one error in common.c, CVE-2019-19906.
-
-Thanks to Stephan Zeisberg for reporting
----
- lib/common.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/common.c b/lib/common.c
-index bc3bf1df..9969d6aa 100644
---- a/lib/common.c
-+++ b/lib/common.c
-@@ -190,7 +190,7 @@ int _sasl_add_string(char **out, size_t *alloclen,
- 
-   if (add==NULL) add = "(null)";
- 
--  addlen=strlen(add); /* only compute once */
-+  addlen=strlen(add)+1; /* only compute once */
-   if (_buf_alloc(out, alloclen, (*outlen)+addlen)!=SASL_OK)
-     return SASL_NOMEM;
- 
diff --git a/gnu/packages/patches/freeimage-libtiff-compat.patch b/gnu/packages/patches/freeimage-libtiff-compat.patch
new file mode 100644
index 0000000000..00c5bf659a
--- /dev/null
+++ b/gnu/packages/patches/freeimage-libtiff-compat.patch
@@ -0,0 +1,19 @@
+Use the new TIFFFieldSetGetSize API from libtiff 4.4 instead of the
+private and removed _TIFFDataSize declared in the unbundling patch.
+
+Patch taken from Fedora:
+
+  https://src.fedoraproject.org/rpms/freeimage/blob/rawhide/f/freeimage-libtiff44.patch
+
+diff -rupN --no-dereference freeimage-svn-r1889-FreeImage-trunk/Source/Metadata/XTIFF.cpp freeimage-svn-r1889-FreeImage-trunk-new/Source/Metadata/XTIFF.cpp
+--- freeimage-svn-r1889-FreeImage-trunk/Source/Metadata/XTIFF.cpp	2022-06-23 11:56:32.561043826 +0200
++++ freeimage-svn-r1889-FreeImage-trunk-new/Source/Metadata/XTIFF.cpp	2022-06-23 11:56:32.764043827 +0200
+@@ -747,7 +747,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::
+ 				continue;
+ 			}
+ 			// type of storage may differ (e.g. rationnal array vs float array type)
+-			if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {
++			if((unsigned)TIFFFieldSetGetSize(fld) != FreeImage_TagDataWidth(tag_type)) {
+ 				// skip tag or _TIFFmemcpy will fail
+ 				continue;
+ 			}
diff --git a/gnu/packages/patches/gash-utils-ls-test.patch b/gnu/packages/patches/gash-utils-ls-test.patch
deleted file mode 100644
index e1dfb9c23b..0000000000
--- a/gnu/packages/patches/gash-utils-ls-test.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-'ls.scm' monkey-patches (ice-9 getopt-long) to allow it to recognize '-1'
-as a valid option.  Unfortunately, monkey patching no longer works with
-Guile 3.0 due to inlining, so change the test to make do without '-1'.
-
-diff --git a/tests/core-utils.org b/tests/core-utils.org
-index d35ede8..22718e3 100644
---- a/tests/core-utils.org
-+++ b/tests/core-utils.org
-@@ -93,14 +93,11 @@
- * ls
- :script:
- #+begin_src sh
--  ls -1 tests/data/star
-+  ls tests/data/star
- #+end_src
- :stdout:
- #+begin_example
--  0
--  1
--  2
--  3
-+  0  1  2  3                                                                    
- #+end_example
- 
- * test-file
diff --git a/gnu/packages/patches/gcc-10-tree-sra-union-handling.patch b/gnu/packages/patches/gcc-10-tree-sra-union-handling.patch
new file mode 100644
index 0000000000..aae5fc9f72
--- /dev/null
+++ b/gnu/packages/patches/gcc-10-tree-sra-union-handling.patch
@@ -0,0 +1,33 @@
+Fix a regression in GCC 10/11/12 where some union structures
+could get miscompiled when optimizations are enabled:
+
+  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105860
+
+Taken from upstream:
+
+  https://gcc.gnu.org/g:16afe2e2862f3dd93c711d7f8d436dee23c6c34d
+
+diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
+index 09d951a261b..420329f63f6 100644
+--- a/gcc/tree-sra.c
++++ b/gcc/tree-sra.c
+@@ -1647,7 +1647,18 @@ build_ref_for_offset (location_t loc, tree base, poly_int64 offset,
+ static tree
+ build_reconstructed_reference (location_t, tree base, struct access *model)
+ {
+-  tree expr = model->expr, prev_expr = NULL;
++  tree expr = model->expr;
++  /* We have to make sure to start just below the outermost union.  */
++  tree start_expr = expr;
++  while (handled_component_p (expr))
++    {
++      if (TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == UNION_TYPE)
++	start_expr = expr;
++      expr = TREE_OPERAND (expr, 0);
++    }
++
++  expr = start_expr;
++  tree prev_expr = NULL_TREE;
+   while (!types_compatible_p (TREE_TYPE (expr), TREE_TYPE (base)))
+     {
+       if (!handled_component_p (expr))
diff --git a/gnu/packages/patches/gettext-libunicode-update.patch b/gnu/packages/patches/gettext-libunicode-update.patch
new file mode 100644
index 0000000000..2a67f4803a
--- /dev/null
+++ b/gnu/packages/patches/gettext-libunicode-update.patch
@@ -0,0 +1,99 @@
+https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=56dc658db752c2894861ee574866d507f12a17f8
+Due to the encoding it needs to be retrieved from a git clone.
+
+commit 56dc658db752c2894861ee574866d507f12a17f8
+Author: Bruno Haible <bruno@clisp.org>
+Date:   Sun Jan 2 15:43:41 2022 +0100
+
+    Update after gnulib changed.
+    
+    * gettext-tools/tests/msgcat-17: Update test for changed libunistring line
+    breaking behaviour.
+    * gettext-tools/tests/msgfilter-sr-latin-1: Likewise.
+    * gettext-tools/tests/msgmerge-11: Likewise.
+    * gettext-tools/tests/xgettext-python-1: Likewise.
+
+diff --git a/gettext-tools/tests/msgcat-17 b/gettext-tools/tests/msgcat-17
+index 8fecc4039..c4aa220b9 100755
+--- a/gettext-tools/tests/msgcat-17
++++ b/gettext-tools/tests/msgcat-17
+@@ -39,9 +39,9 @@ msgstr ""
+ #, c-format
+ msgid "write error of a big result on a too small disk% s% s"
+ msgstr ""
+-"Fehler beim Schreiben eines großen Ergebnisses auf eine zu kleine Platte% s"
+-"% smit der jederzeitigen Möglichkeit eines Fehlers in jedem Moment und an "
+-"jeder Stelle"
++"Fehler beim Schreiben eines großen Ergebnisses auf eine zu kleine "
++"Platte% s% smit der jederzeitigen Möglichkeit eines Fehlers in jedem Moment "
++"und an jeder Stelle"
+ EOF
+ 
+ : ${DIFF=diff}
+diff --git a/gettext-tools/tests/msgfilter-sr-latin-1 b/gettext-tools/tests/msgfilter-sr-latin-1
+index c1cc97875..29e68c04f 100755
+--- a/gettext-tools/tests/msgfilter-sr-latin-1
++++ b/gettext-tools/tests/msgfilter-sr-latin-1
+@@ -20,8 +20,8 @@ msgstr ""
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=CP1251\n"
+ "Content-Transfer-Encoding: 8bit\n"
+-"Plural-Forms: nplurals=3;    plural=n%10==1 && n%100!=11 ? 0 :  (n%10>=2 && n"
+-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
++"Plural-Forms: nplurals=3;    plural=n%10==1 && n%100!=11 ? 0 :  (n%10>=2 && "
++"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+ 
+ #: ../gettext-tools/lib/closeout.c:64
+ msgid "write error"
+@@ -332,8 +332,8 @@ msgstr ""
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+-"Plural-Forms: nplurals=3;    plural=n%10==1 && n%100!=11 ? 0 :  (n%10>=2 && n"
+-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
++"Plural-Forms: nplurals=3;    plural=n%10==1 && n%100!=11 ? 0 :  (n%10>=2 && "
++"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+ 
+ #: ../gettext-tools/lib/closeout.c:64
+ msgid "write error"
+diff --git a/gettext-tools/tests/msgmerge-11 b/gettext-tools/tests/msgmerge-11
+index ed49db95a..888855940 100755
+--- a/gettext-tools/tests/msgmerge-11
++++ b/gettext-tools/tests/msgmerge-11
+@@ -19,8 +19,8 @@ msgstr ""
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=ISO-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+-"%100==4 ? 2 : 3);\n"
++"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
++"n%100==4 ? 2 : 3);\n"
+ 
+ #:foobar.c:29
+ #, c-format
+@@ -72,8 +72,8 @@ msgstr ""
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=ISO-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+-"%100==4 ? 2 : 3);\n"
++"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
++"n%100==4 ? 2 : 3);\n"
+ 
+ #: foobar.c:32
+ #, fuzzy, c-format
+diff --git a/gettext-tools/tests/xgettext-python-1 b/gettext-tools/tests/xgettext-python-1
+index 4901c71e3..9695abda4 100755
+--- a/gettext-tools/tests/xgettext-python-1
++++ b/gettext-tools/tests/xgettext-python-1
+@@ -61,8 +61,8 @@ msgstr ""
+ #. interpret_ansic = false, interpret_unicode = false
+ msgid ""
+ "abc\\\n"
+-"\\\\def\\'ghi\\\"jkl\\a\\b\\f\\n\\r\\t\\v x\\040x\\x7ey"
+-"\\u0142\\U00010123\\N{LATIN SMALL LETTER Z}"
++"\\\\def\\'ghi\\\"jkl\\a\\b\\f\\n\\r\\t\\v "
++"x\\040x\\x7ey\\u0142\\U00010123\\N{LATIN SMALL LETTER Z}"
+ msgstr ""
+ 
+ #. interpret_ansic = true, interpret_unicode = true
diff --git a/gnu/packages/patches/ghc-9.2-grep-warnings.patch b/gnu/packages/patches/ghc-9.2-grep-warnings.patch
new file mode 100644
index 0000000000..7a3d9c599e
--- /dev/null
+++ b/gnu/packages/patches/ghc-9.2-grep-warnings.patch
@@ -0,0 +1,37 @@
+--- ghc-9.2.5/testsuite/tests/numeric/should_run/T7014.primops.orig	2023-03-12 14:42:11.338540492 +0100
++++ ghc-9.2.5/testsuite/tests/numeric/should_run/T7014.primops	2023-03-12 14:42:13.735608896 +0100
+@@ -1,9 +1,9 @@
+ and#
+ or#
+ uncheckedShift.*#
+++#
++-#
++*#
+-\+#
+-\-#
+-\*#
+ quotInt#
+ remInt#
+ plusFloat#
+--- ghc-9.2.5/testsuite/tests/hsc2hs/Makefile.orig	2023-03-12 14:40:03.825939306 +0100
++++ ghc-9.2.5/testsuite/tests/hsc2hs/Makefile	2023-03-12 14:40:07.961054835 +0100
+@@ -54,7 +54,7 @@
+ ifeq "$(WINDOWS)" "YES"
+ 	grep '{-# LINE 1 \"T12504\\\\path\\\\to\\\\$@\.hsc\" #-}' T12504/path/to/$@.hs
+ else
++	grep '{-# LINE 1 "T12504/path/to/$@\.hsc" #-}' T12504/path/to/$@.hs
+-	grep '{-# LINE 1 \"T12504/path/to/$@\.hsc\" #-}' T12504/path/to/$@.hs
+ endif
+ 
+ .PHONY: T15758
+--- ghc-9.2.5/testsuite/tests/simplCore/should_compile/Makefile.orig	2023-03-12 14:41:16.204974035 +0100
++++ ghc-9.2.5/testsuite/tests/simplCore/should_compile/Makefile	2023-03-12 14:41:17.832020067 +0100
+@@ -253,7 +253,7 @@
+ # g should have been collapsed into one defininition by CSE.
+ .PHONY: T13340
+ T13340:
++	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '+#'
+-	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '\+#'
+ 
+ 
+ # We expect to see all dictionaries specialized away.
diff --git a/gnu/packages/patches/ghc-testsuite-grep-compat.patch b/gnu/packages/patches/ghc-testsuite-grep-compat.patch
new file mode 100644
index 0000000000..a2bd5fcec4
--- /dev/null
+++ b/gnu/packages/patches/ghc-testsuite-grep-compat.patch
@@ -0,0 +1,39 @@
+Remove stray escapes to avoid warnings from grep 3.8 which breaks
+expected test output.
+
+diff --git a/testsuite/tests/hsc2hs/Makefile b/testsuite/tests/hsc2hs/Makefile
+--- a/testsuite/tests/hsc2hs/Makefile
++++ b/testsuite/tests/hsc2hs/Makefile
+@@ -47,5 +47,5 @@ T12504:
+ ifeq "$(WINDOWS)" "YES"
+ 	grep '{-# LINE 1 \"T12504\\\\path\\\\to\\\\$@\.hsc\" #-}' T12504/path/to/$@.hs
+ else
+-	grep '{-# LINE 1 \"T12504/path/to/$@\.hsc\" #-}' T12504/path/to/$@.hs
++	grep '{-# LINE 1 "T12504/path/to/$@\.hsc" #-}' T12504/path/to/$@.hs
+ endif
+diff --git a/testsuite/tests/numeric/should_run/T7014.primops b/testsuite/tests/numeric/should_run/T7014.primops
+--- a/testsuite/tests/numeric/should_run/T7014.primops
++++ b/testsuite/tests/numeric/should_run/T7014.primops
+@@ -1,8 +1,8 @@
+ and#
+ or#
+ uncheckedShift.*#
+-\+#
+-\-#
+++#
++-#
+ \*#
+ quotInt#
+ remInt#
+diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
+--- a/testsuite/tests/simplCore/should_compile/Makefile
++++ b/testsuite/tests/simplCore/should_compile/Makefile
+@@ -226,7 +226,7 @@ str-rules:
+ # g should have been collapsed into one defininition by CSE.
+ .PHONY: T13340
+ T13340:
+-	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '\+#'
++	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '+#'
+ 
+ 
+ # We expect to see all dictionaries specialized away.
diff --git a/gnu/packages/patches/ghostscript-no-header-creationdate.patch b/gnu/packages/patches/ghostscript-no-header-creationdate.patch
index b19f3ab5d9..493693b78d 100644
--- a/gnu/packages/patches/ghostscript-no-header-creationdate.patch
+++ b/gnu/packages/patches/ghostscript-no-header-creationdate.patch
@@ -6,11 +6,11 @@ not write out the "/ID" field (if that's permissible).
 Upstream does not want to do this.
 
 See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
-diff --git a/orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c b/bb/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
-index 0fb067e..b342e2c 100644
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
-@@ -305,6 +305,9 @@ pdf_initialize_ids(gx_device_pdf * pdev)
+diff --git a/devices/vector/gdevpdf.c b/devices/vector/gdevpdf.c
+index cb268f62e..c5abefde2 100644
+--- a/devices/vector/gdevpdf.c
++++ b/devices/vector/gdevpdf.c
+@@ -425,6 +425,9 @@ pdf_initialize_ids(gx_device_pdf * pdev)
       * date and time, rather than (for example) %%CreationDate from the
       * PostScript file.  We think this is wrong, but we do the same.
       */
@@ -20,9 +20,11 @@ index 0fb067e..b342e2c 100644
      {
          struct tm tms;
          time_t t;
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
-@@ -692,6 +692,9 @@
+diff --git a/devices/vector/gdevpdfe.c b/devices/vector/gdevpdfe.c
+index ec011d8ba..f083f1e93 100644
+--- a/devices/vector/gdevpdfe.c
++++ b/devices/vector/gdevpdfe.c
+@@ -696,6 +696,9 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
              pdf_xml_attribute_name(s, "xmlns:xmp");
              pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
              pdf_xml_tag_end(s);
@@ -32,7 +34,7 @@ index 0fb067e..b342e2c 100644
              {
                  pdf_xml_tag_open_beg(s, "xmp:ModifyDate");
                  pdf_xml_tag_end(s);
-@@ -700,6 +701,9 @@
+@@ -704,6 +707,9 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
                  pdf_xml_tag_close(s, "xmp:ModifyDate");
                  pdf_xml_newline(s);
              }
diff --git a/gnu/packages/patches/ghostscript-no-header-id.patch b/gnu/packages/patches/ghostscript-no-header-id.patch
index 45fc95fd6e..ef518b0fb2 100644
--- a/gnu/packages/patches/ghostscript-no-header-id.patch
+++ b/gnu/packages/patches/ghostscript-no-header-id.patch
@@ -6,38 +6,39 @@ not write out the "/ID" field (if that's permissible).
 Upstream does not want to do this.
 
 See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
-diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c	2017-07-09 23:30:28.960479189 +0200
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c	2017-07-09 23:34:34.306524488 +0200
-@@ -1810,8 +1810,11 @@
+diff --git a/devices/vector/gdevpdf.c b/devices/vector/gdevpdf.c
+index c5abefde2..3859fc088 100644
+--- a/devices/vector/gdevpdf.c
++++ b/devices/vector/gdevpdf.c
+@@ -1909,8 +1909,11 @@ static int pdf_linearise(gx_device_pdf *pdev, pdf_linearisation_t *linear_params
       * +1 for the linearisation dict and +1 for the primary hint stream.
       */
      linear_params->FirsttrailerOffset = gp_ftell(linear_params->Lin_File.file);
--    gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n        \n",
+-    gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n        \n",
 -        linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, 0);
-+    gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
++    gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
 +        linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber);
 +    if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 && strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */
-+        gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID);
-+    gs_sprintf(LDict, "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n        \n", 0);
++        gs_snprintf(LDict, sizeof(LDict), "/ID[%s%s]", fileID, fileID);
++    gs_snprintf(LDict, sizeof(LDict), "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n        \n", 0);
      gp_fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file);
  
      /* Write document catalog (Part 4) */
-@@ -2346,8 +2349,11 @@
+@@ -2445,8 +2448,11 @@ static int pdf_linearise(gx_device_pdf *pdev, pdf_linearisation_t *linear_params
      if (code != 0)
          return_error(gs_error_ioerror);
  
--    gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n",
+-    gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n",
 -        linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, mainxref);
-+    gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
++    gs_snprintf(LDict, sizeof(LDict), "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R",
 +        linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber);
 +    if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 || strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */
-+        gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID);
-+    gs_sprintf(LDict, "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref);
++        gs_snprintf(LDict, sizeof(LDict), "/ID[%s%s]", fileID, fileID);
++    gs_snprintf(LDict, sizeof(LDict), "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref);
      gp_fwrite(LDict, strlen(LDict), 1, linear_params->sfile);
  
      code = gp_fseek(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET);
-@@ -3012,10 +3018,12 @@
+@@ -3139,10 +3145,12 @@ pdf_close(gx_device * dev)
              stream_puts(s, "trailer\n");
              pprintld3(s, "<< /Size %ld /Root %ld 0 R /Info %ld 0 R\n",
                    pdev->next_id, Catalog_id, Info_id);
diff --git a/gnu/packages/patches/ghostscript-no-header-uuid.patch b/gnu/packages/patches/ghostscript-no-header-uuid.patch
index f4b55764c8..b277a4bc2e 100644
--- a/gnu/packages/patches/ghostscript-no-header-uuid.patch
+++ b/gnu/packages/patches/ghostscript-no-header-uuid.patch
@@ -8,10 +8,11 @@ field value as "".
 Upstream does not want to do this.
 
 See: https://bugs.ghostscript.com/show_bug.cgi?id=698208
-diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
---- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c	2017-07-09 23:30:28.960479189 +0200
-+++ gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c	2017-07-10 01:04:12.252478276 +0200
-@@ -620,7 +620,7 @@
+diff --git a/devices/vector/gdevpdfe.c b/devices/vector/gdevpdfe.c
+index f083f1e93..a19c64ac0 100644
+--- a/devices/vector/gdevpdfe.c
++++ b/devices/vector/gdevpdfe.c
+@@ -624,7 +624,7 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
          return code;
  
      /* PDF/A XMP reference recommends setting UUID to empty. If not empty must be a URI */
@@ -20,7 +21,7 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscrip
          instance_uuid[0] = 0x00;
  
      cre_date_time_len = pdf_get_docinfo_item(pdev, "/CreationDate", cre_date_time, sizeof(cre_date_time));
-@@ -720,14 +720,17 @@
+@@ -730,14 +730,17 @@ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
              pdf_xml_tag_close(s, "rdf:Description");
              pdf_xml_newline(s);
  
diff --git a/gnu/packages/patches/glib-networking-32-bit-time.patch b/gnu/packages/patches/glib-networking-32-bit-time.patch
deleted file mode 100644
index a437310270..0000000000
--- a/gnu/packages/patches/glib-networking-32-bit-time.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Work around a year-2038 issue when building with a 32-bit 'time_t'
-on 32-bit platforms:
-
-  https://gitlab.gnome.org/GNOME/glib-networking/-/issues/172
-
-From 4f8ca86a0e460794188c3355f0c7cc11fdbe4229 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <simon.mcvittie@collabora.co.uk>
-Date: Tue, 21 Sep 2021 17:07:44 +0000
-Subject: [PATCH] tests: Accept GNUTLS' workaround for limited size of time_t
-
----
- tls/tests/certificate.c | 15 +++++++++++++++
- tls/tests/meson.build   |  1 +
- 2 files changed, 16 insertions(+)
-
-diff --git a/tls/tests/certificate.c b/tls/tests/certificate.c
-index c0100d30..d216c710 100644
---- a/tls/tests/certificate.c
-+++ b/tls/tests/certificate.c
-@@ -672,6 +672,12 @@ test_certificate_not_valid_before (void)
-   g_object_unref (cert);
- }
- 
-+/* On 32-bit, GNUTLS caps expiry times at 2037-12-31 23:23:23 to avoid
-+ * overflowing time_t. Hopefully by 2037, either 32-bit will finally have
-+ * died out, or GNUTLS will rethink its approach to
-+ * https://gitlab.com/gnutls/gnutls/-/issues/370 */
-+#define GNUTLS_32_BIT_NOT_VALID_AFTER_MAX 2145914603
-+
- static void
- test_certificate_not_valid_after (void)
- {
-@@ -686,7 +692,16 @@ test_certificate_not_valid_after (void)
-   actual = g_tls_certificate_get_not_valid_after (cert);
-   g_assert_nonnull (actual);
-   actual_str = g_date_time_format_iso8601 (actual);
-+
-+#if SIZEOF_TIME_T <= 4
-+  if (g_date_time_to_unix (actual) == GNUTLS_32_BIT_NOT_VALID_AFTER_MAX)
-+    g_test_incomplete ("not-valid-after date not representable on 32-bit");
-+  else
-+    g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
-+#else
-   g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
-+#endif
-+
-   g_free (actual_str);
-   g_date_time_unref (actual);
-   g_object_unref (cert);
-diff --git a/tls/tests/meson.build b/tls/tests/meson.build
-index e9c7d8c6..7415f913 100644
---- a/tls/tests/meson.build
-+++ b/tls/tests/meson.build
-@@ -69,6 +69,7 @@ foreach backend: backends
-     test_cflags = cflags + [
-       '-DBACKEND="@0@"'.format(backend),
-       '-DBACKEND_IS_' + backend.to_upper(),
-+      '-DSIZEOF_TIME_T=@0@'.format(cc.sizeof('time_t', prefix: '#include <time.h>')),
-     ]
- 
-     if backend == 'openssl'
diff --git a/gnu/packages/patches/glibc-dl-cache.patch b/gnu/packages/patches/glibc-dl-cache.patch
index 68c3a94846..647837b983 100644
--- a/gnu/packages/patches/glibc-dl-cache.patch
+++ b/gnu/packages/patches/glibc-dl-cache.patch
@@ -6,7 +6,7 @@ diff --git a/elf/dl-cache.c b/elf/dl-cache.c
 index 93d185e788..e0760a1f40 100644
 --- a/elf/dl-cache.c
 +++ b/elf/dl-cache.c
-@@ -171,6 +171,51 @@ _dl_cache_libcmp (const char *p1, const char *p2)
+@@ -171,6 +171,52 @@ _dl_cache_libcmp (const char *p1, const char *p2)
    return *p1 - *p2;
  }
  
@@ -27,7 +27,8 @@ index 93d185e788..e0760a1f40 100644
 +      const char *origin = _dl_get_origin ();
 +
 +      /* Check whether ORIGIN is something like "/gnu/store/…-foo/bin".  */
-+      if (strncmp (store, origin, strlen (store)) == 0
++      if (origin != (char *) -1   /* _dl_get_origin reported failure */
++	  && strncmp (store, origin, strlen (store)) == 0
 +	  && origin[sizeof store - 1] == '/')
 +	{
 +	  char *store_item_end = strchr (origin + sizeof store, '/');
diff --git a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
index e31f99a1ce..b02215550d 100644
--- a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
+++ b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
@@ -67,8 +67,8 @@ index fcd79fd554..1dd02aa449 100644
  
 diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c
 index 9d8a9ea8ae..3430582c09 100644
---- a/sysdeps/pthread/timer_create.c
-+++ b/sysdeps/pthread/timer_create.c
+--- a/rt/timer_create.c
++++ b/rt/timer_create.c
 @@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
        return -1;
      }
diff --git a/gnu/packages/patches/glibc-static-nss.patch b/gnu/packages/patches/glibc-static-nss.patch
deleted file mode 100644
index 1a9db616cc..0000000000
--- a/gnu/packages/patches/glibc-static-nss.patch
+++ /dev/null
@@ -1,1244 +0,0 @@
-This patch reinstates support for static NSS, which glibc 2.33 broke:
-
-  https://sourceware.org/bugzilla/show_bug.cgi?id=27959
-
-Patch obtained by running:
-
-  git diff f0c28504a9877be5da3ed1215f2da2d5914bbb0b..f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf
-  git diff 5e1ce61e3e71fb7ffe53f58fe96e67cb15f94854{^,}
-  git diff 135425a1dd50cbe2b9db0628d6c2b36c7889f30b{^,}
-
-It corresponds to these changes:
-
-  f9c8b11ed7 * nss: Access nss_files through direct references
-  6212bb67f4 * nss_files: Move into libc
-  36861a968a * nss_files: Add generic code for set*ent, end*ent and file open
-  f0c28504a9 * nss_files: Allocate nscd file registration data on the heap
-  5e1ce61e3e * nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent
-  135425a1dd * nss: Fix build error with --disable-nscd
-
-... plus a manual fix in 'files-network.c' to address this compilation error:
-
-  nss_files/files-network.c: In function ‘_nss_files_parse_netent’:
-  nss_files/files-network.c:72:20: error: implicit declaration of function ‘__inet_network’; did you mean ‘inet_network’? [-Werror=implicit-function-declaration]
-     72 |    result->n_net = __inet_network (addr);
-	|                    ^~~~~~~~~~~~~~
-  nss_files/files-parse.c:106:3: note: in definition of macro ‘LINE_PARSER’
-    106 |   BODY;               \
-	|   ^~~~
-
-diff --git a/include/libc-symbols.h b/include/libc-symbols.h
-index 127ea656c2..d41ecf4384 100644
---- a/include/libc-symbols.h
-+++ b/include/libc-symbols.h
-@@ -798,29 +798,6 @@ for linking")
- # define libdl_hidden_data_ver(local, name)
- #endif
- 
--#if IS_IN (libnss_files)
--# define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
--# define libnss_files_hidden_tls_proto(name, attrs...) \
--  hidden_tls_proto (name, ##attrs)
--# define libnss_files_hidden_def(name) hidden_def (name)
--# define libnss_files_hidden_weak(name) hidden_weak (name)
--# define libnss_files_hidden_ver(local, name) hidden_ver (local, name)
--# define libnss_files_hidden_data_def(name) hidden_data_def (name)
--# define libnss_files_hidden_tls_def(name) hidden_tls_def (name)
--# define libnss_files_hidden_data_weak(name) hidden_data_weak (name)
--# define libnss_files_hidden_data_ver(local, name) hidden_data_ver(local, name)
--#else
--# define libnss_files_hidden_proto(name, attrs...)
--# define libnss_files_hidden_tls_proto(name, attrs...)
--# define libnss_files_hidden_def(name)
--# define libnss_files_hidden_weak(name)
--# define libnss_files_hidden_ver(local, name)
--# define libnss_files_hidden_data_def(name)
--# define libnss_files_hidden_tls_def(name)
--# define libnss_files_hidden_data_weak(name)
--# define libnss_files_hidden_data_ver(local, name)
--#endif
--
- #if IS_IN (libnsl)
- # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
- # define libnsl_hidden_tls_proto(name, attrs...) \
-diff --git a/include/netdb.h b/include/netdb.h
-index 82e102ff76..4dcdbb8cd4 100644
---- a/include/netdb.h
-+++ b/include/netdb.h
-@@ -217,7 +217,7 @@ extern enum nss_status _nss_netgroup_parseline (char **cursor,
- 						struct __netgrent *result,
- 						char *buffer, size_t buflen,
- 						int *errnop);
--libnss_files_hidden_proto (_nss_netgroup_parseline)
-+libc_hidden_proto (_nss_netgroup_parseline)
- 
- #define DECLARE_NSS_PROTOTYPES(service)					      \
- extern enum nss_status _nss_ ## service ## _setprotoent (int);		      \
-diff --git a/include/nss_files.h b/include/nss_files.h
-index 6a0dcdb85b..6190cac6be 100644
---- a/include/nss_files.h
-+++ b/include/nss_files.h
-@@ -19,7 +19,11 @@
- #ifndef _NSS_FILES_H
- #define _NSS_FILES_H
- 
-+#include <nss.h>
- #include <stdio.h>
-+#if IS_IN (libc)
-+#include <libc-lock.h>
-+#endif
- 
- /* Open PATH for reading, as a data source for nss_files.  */
- FILE *__nss_files_fopen (const char *path);
-@@ -47,6 +51,63 @@ int __nss_readline_seek (FILE *fp, off64_t offset) attribute_hidden;
- int __nss_parse_line_result (FILE *fp, off64_t offset, int parse_line_result);
- libc_hidden_proto (__nss_parse_line_result)
- 
-+/* Per-file data.  Used by the *ent functions that need to preserve
-+   state across calls.  */
-+struct nss_files_per_file_data
-+{
-+  FILE *stream;
-+#if IS_IN (libc)
-+  /* The size of locks changes between libc and nss_files, so this
-+     member must be last and is only available in libc.  */
-+  __libc_lock_define (, lock);
-+#endif
-+};
-+
-+/* File index for __nss_files_data_get.  */
-+enum nss_files_file
-+  {
-+    nss_file_aliasent,
-+    nss_file_etherent,
-+    nss_file_grent,
-+    nss_file_hostent,
-+    nss_file_netent,
-+    nss_file_protoent,
-+    nss_file_pwent,
-+    nss_file_rpcent,
-+    nss_file_servent,
-+    nss_file_sgent,
-+    nss_file_spent,
-+
-+    nss_file_count
-+  };
-+
-+/* Obtains a pointer to the per-file data for FILE, which is written
-+   to *PDATA, and tries to open the file at PATH for it.  On success,
-+   returns NSS_STATUS_SUCCESS, and the caller must later call
-+   __nss_files_data_put.  On failure, NSS_STATUS_TRYAGAIN is returned,
-+   and *ERRNOP and *HERRNOP are updated if these pointers are not
-+   null.  */
-+enum nss_status __nss_files_data_open (struct nss_files_per_file_data **pdata,
-+                                       enum nss_files_file file,
-+                                       const char *path,
-+                                       int *errnop, int *herrnop);
-+libc_hidden_proto (__nss_files_data_open)
-+
-+/* Unlock the per-file data, previously obtained by
-+   __nss_files_data_open.  */
-+void __nss_files_data_put (struct nss_files_per_file_data *data);
-+libc_hidden_proto (__nss_files_data_put)
-+
-+/* Performs the set*ent operation for FILE.  PATH is the file to
-+   open.  */
-+enum nss_status __nss_files_data_setent (enum nss_files_file file,
-+                                           const char *path);
-+libc_hidden_proto (__nss_files_data_setent)
-+
-+/* Performs the end*ent operation for FILE.  */
-+enum nss_status __nss_files_data_endent (enum nss_files_file file);
-+libc_hidden_proto (__nss_files_data_endent)
-+
- struct parser_data;
- 
- /* Instances of the parse_line function from
-@@ -64,16 +125,25 @@ extern nss_files_parse_line _nss_files_parse_servent;
- extern nss_files_parse_line _nss_files_parse_sgent;
- extern nss_files_parse_line _nss_files_parse_spent;
- 
--libnss_files_hidden_proto (_nss_files_parse_etherent)
-+libc_hidden_proto (_nss_files_parse_etherent)
- libc_hidden_proto (_nss_files_parse_grent)
--libnss_files_hidden_proto (_nss_files_parse_netent)
--libnss_files_hidden_proto (_nss_files_parse_protoent)
-+libc_hidden_proto (_nss_files_parse_netent)
-+libc_hidden_proto (_nss_files_parse_protoent)
- libc_hidden_proto (_nss_files_parse_pwent)
--libnss_files_hidden_proto (_nss_files_parse_rpcent)
--libnss_files_hidden_proto (_nss_files_parse_servent)
-+libc_hidden_proto (_nss_files_parse_rpcent)
-+libc_hidden_proto (_nss_files_parse_servent)
- libc_hidden_proto (_nss_files_parse_sgent)
- libc_hidden_proto (_nss_files_parse_spent)
- 
-+NSS_DECLARE_MODULE_FUNCTIONS (files)
-+#undef DEFINE_NSS_FUNCTION
-+#define DEFINE_NSS_FUNCTION(x) libc_hidden_proto (_nss_files_##x)
-+#include <nss/function.def>
-+#undef DEFINE_NSS_FUNCTION
-+
-+void _nss_files_init (void (*cb) (size_t, struct traced_file *));
-+libc_hidden_proto (_nss_files_init)
-+
- /* Generic implementation of fget*ent_r.  Reads lines from FP until
-    EOF or a successful parse into *RESULT using PARSER.  Returns 0 on
-    success, ENOENT on EOF, ERANGE on too-small buffer.  */
-diff --git a/nss/Makefile b/nss/Makefile
-index 9682a31e20..63a386af18 100644
---- a/nss/Makefile
-+++ b/nss/Makefile
-@@ -31,7 +31,8 @@ routines		= nsswitch getnssent getnssent_r digits_dots \
- 			  compat-lookup nss_hash nss_files_fopen \
- 			  nss_readline nss_parse_line_result \
- 			  nss_fgetent_r nss_module nss_action \
--			  nss_action_parse nss_database
-+			  nss_action_parse nss_database nss_files_data \
-+			  nss_files_functions
- 
- # These are the databases that go through nss dispatch.
- # Caution: if you add a database here, you must add its real name
-@@ -98,9 +99,11 @@ subdir-dirs = $(services:%=nss_%)
- vpath %.c $(subdir-dirs) ../locale/programs ../intl
- 
- 
--libnss_files-routines	:= $(addprefix files-, \
--			     $(filter-out key, $(databases))) \
--			   files-initgroups files-init
-+routines += \
-+  $(addprefix files-, $(filter-out key, $(databases))) \
-+  files-init \
-+  files-initgroups \
-+  # routines
- 
- libnss_db-dbs		:= $(addprefix db-,\
- 				       $(filter-out hosts network key alias,\
-@@ -116,12 +119,9 @@ libnss_compat-routines	:= $(addprefix compat-,grp pwd spwd initgroups) \
- install-others		+= $(inst_vardbdir)/Makefile
- 
- # Build static module into libc if requested
--libnss_files-inhibit-o	= $(filter-out .os,$(object-suffixes))
- libnss_db-inhibit-o	= $(filter-out .os,$(object-suffixes))
- libnss_compat-inhibit-o	= $(filter-out .os,$(object-suffixes))
- ifeq ($(build-static-nss),yes)
--routines                += $(libnss_files-routines)
--static-only-routines    += $(libnss_files-routines)
- tests-static		+= tst-nss-static
- endif
- extra-test-objs		+= nss_test1.os nss_test2.os
-@@ -138,8 +138,6 @@ libnss-libc = $(common-objpfx)linkobj/libc.so
- # for new links:
- $(services:%=$(objpfx)libnss_%.so): libc-for-link = $(libnss-libc)
- 
--$(objpfx)libnss_db.so: $(objpfx)libnss_files.so
--
- $(libnss_db-dbs:%=$(objpfx)%.c): $(objpfx)db-%.c: nss_files/files-%.c
- 	@rm -f $@.new
- 	(echo '#define EXTERN_PARSER';\
-diff --git a/nss/Versions b/nss/Versions
-index fdddea104c..e551524aa9 100644
---- a/nss/Versions
-+++ b/nss/Versions
-@@ -19,11 +19,12 @@ libc {
-     __nss_services_lookup2; __nss_next2; __nss_lookup;
-     __nss_hash; __nss_database_get;
-     __nss_files_fopen; __nss_readline; __nss_parse_line_result;
--  }
--}
-+    __nss_files_data_endent;
-+    __nss_files_data_open;
-+    __nss_files_data_put;
-+    __nss_files_data_setent;
- 
--libnss_files {
--  GLIBC_PRIVATE {
-+    # Routines formerly in libnss_files.so.2.
-     _nss_files_setaliasent;
-     _nss_files_endaliasent;
-     _nss_files_getaliasbyname_r;
-@@ -109,6 +110,14 @@ libnss_files {
-   }
- }
- 
-+libnss_files {
-+  GLIBC_PRIVATE {
-+    # Keep a version node (with a synthesized local: * directive) so that
-+    # __bss_* symbols are hidden on targets that need it.
-+    __libnss_files_version_placeholder;
-+  }
-+}
-+
- libnss_db {
-   GLIBC_PRIVATE {
-     _nss_db_setetherent;
-diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
-index b4b989d9bb..c158a891bd 100644
---- a/nss/nss_files/files-XXX.c
-+++ b/nss/nss_files/files-XXX.c
-@@ -45,10 +45,12 @@
- # include <netdb.h>
- # define H_ERRNO_PROTO	, int *herrnop
- # define H_ERRNO_ARG	, herrnop
-+# define H_ERRNO_ARG_OR_NULL herrnop
- # define H_ERRNO_SET(val) (*herrnop = (val))
- #else
- # define H_ERRNO_PROTO
- # define H_ERRNO_ARG
-+# define H_ERRNO_ARG_OR_NULL NULL
- # define H_ERRNO_SET(val) ((void) 0)
- #endif
- 
-@@ -58,15 +60,11 @@
- # define EXTRA_ARGS_VALUE
- #endif
- 
--/* Locks the static variables in this file.  */
--__libc_lock_define_initialized (static, lock)
- 
- /* Maintenance of the stream open on the database file.  For getXXent
-    operations the stream needs to be held open across calls, the other
-    getXXbyYY operations all use their own stream.  */
- 
--static FILE *stream;
--
- /* Open database file if not already opened.  */
- static enum nss_status
- internal_setent (FILE **stream)
-@@ -91,42 +89,16 @@ internal_setent (FILE **stream)
- enum nss_status
- CONCAT(_nss_files_set,ENTNAME) (int stayopen)
- {
--  enum nss_status status;
--
--  __libc_lock_lock (lock);
--
--  status = internal_setent (&stream);
--
--  __libc_lock_unlock (lock);
--
--  return status;
-+  return __nss_files_data_setent (CONCAT (nss_file_, ENTNAME), DATAFILE);
- }
-+libc_hidden_def (CONCAT (_nss_files_set,ENTNAME))
- 
--
--/* Close the database file.  */
--static void
--internal_endent (FILE **stream)
--{
--  if (*stream != NULL)
--    {
--      fclose (*stream);
--      *stream = NULL;
--    }
--}
--
--
--/* Thread-safe, exported version of that.  */
- enum nss_status
- CONCAT(_nss_files_end,ENTNAME) (void)
- {
--  __libc_lock_lock (lock);
--
--  internal_endent (&stream);
--
--  __libc_lock_unlock (lock);
--
--  return NSS_STATUS_SUCCESS;
-+  return __nss_files_data_endent (CONCAT (nss_file_, ENTNAME));
- }
-+libc_hidden_def (CONCAT (_nss_files_end,ENTNAME))
- 
- 
- /* Parsing the database file into `struct STRUCTURE' data structures.  */
-@@ -194,28 +166,22 @@ CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer,
- 				  size_t buflen, int *errnop H_ERRNO_PROTO)
- {
-   /* Return next entry in host file.  */
--  enum nss_status status = NSS_STATUS_SUCCESS;
--
--  __libc_lock_lock (lock);
- 
--  /* Be prepared that the set*ent function was not called before.  */
--  if (stream == NULL)
--    {
--      int save_errno = errno;
--
--      status = internal_setent (&stream);
--
--      __set_errno (save_errno);
--    }
--
--  if (status == NSS_STATUS_SUCCESS)
--    status = internal_getent (stream, result, buffer, buflen, errnop
--			      H_ERRNO_ARG EXTRA_ARGS_VALUE);
-+  struct nss_files_per_file_data *data;
-+  enum nss_status status = __nss_files_data_open (&data,
-+						  CONCAT (nss_file_, ENTNAME),
-+						  DATAFILE,
-+						  errnop, H_ERRNO_ARG_OR_NULL);
-+  if (status != NSS_STATUS_SUCCESS)
-+    return status;
- 
--  __libc_lock_unlock (lock);
-+  status = internal_getent (data->stream, result, buffer, buflen, errnop
-+			    H_ERRNO_ARG EXTRA_ARGS_VALUE);
- 
-+  __nss_files_data_put (data);
-   return status;
- }
-+libc_hidden_def (CONCAT (_nss_files_get,ENTNAME_r))
- 
- /* Macro for defining lookup functions for this file-based database.
- 
-@@ -248,8 +214,9 @@ _nss_files_get##name##_r (proto,					      \
- 	     == NSS_STATUS_SUCCESS)					      \
- 	{ break_if_match }						      \
- 									      \
--      internal_endent (&stream);					      \
-+      fclose (stream);							      \
-     }									      \
- 									      \
-   return status;							      \
--}
-+}									      \
-+libc_hidden_def (_nss_files_get##name##_r)
-diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
-index 30971bfe56..8c6e176ff6 100644
---- a/nss/nss_files/files-alias.c
-+++ b/nss/nss_files/files-alias.c
-@@ -31,18 +31,11 @@
- #include "nsswitch.h"
- #include <nss_files.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
--/* Locks the static variables in this file.  */
--__libc_lock_define_initialized (static, lock)
- 
- /* Maintenance of the stream open on the database file.  For getXXent
-    operations the stream needs to be held open across calls, the other
-    getXXbyYY operations all use their own stream.  */
- 
--static FILE *stream;
--
--
- static enum nss_status
- internal_setent (FILE **stream)
- {
-@@ -66,42 +59,16 @@ internal_setent (FILE **stream)
- enum nss_status
- _nss_files_setaliasent (void)
- {
--  enum nss_status status;
--
--  __libc_lock_lock (lock);
--
--  status = internal_setent (&stream);
--
--  __libc_lock_unlock (lock);
--
--  return status;
-+  return __nss_files_data_setent (nss_file_aliasent, "/etc/aliases");
- }
-+libc_hidden_def (_nss_files_setaliasent)
- 
--
--/* Close the database file.  */
--static void
--internal_endent (FILE **stream)
--{
--  if (*stream != NULL)
--    {
--      fclose (*stream);
--      *stream = NULL;
--    }
--}
--
--
--/* Thread-safe, exported version of that.  */
- enum nss_status
- _nss_files_endaliasent (void)
- {
--  __libc_lock_lock (lock);
--
--  internal_endent (&stream);
--
--  __libc_lock_unlock (lock);
--
--  return NSS_STATUS_SUCCESS;
-+  return __nss_files_data_endent (nss_file_aliasent);
- }
-+libc_hidden_def (_nss_files_endaliasent)
- 
- /* Parsing the database file into `struct aliasent' data structures.  */
- static enum nss_status
-@@ -131,7 +98,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
-       /* Read the first line.  It must contain the alias name and
- 	 possibly some alias names.  */
-       first_unused[room_left - 1] = '\xff';
--      line = fgets_unlocked (first_unused, room_left, stream);
-+      line = __fgets_unlocked (first_unused, room_left, stream);
-       if (line == NULL)
- 	/* Nothing to read.  */
- 	break;
-@@ -220,7 +187,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
- 		      /* If the file does not exist we simply ignore
- 			 the statement.  */
- 		      if (listfile != NULL
--			  && (old_line = strdup (line)) != NULL)
-+			  && (old_line = __strdup (line)) != NULL)
- 			{
- 			  while (! feof_unlocked (listfile))
- 			    {
-@@ -232,8 +199,8 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
- 				}
- 
- 			      first_unused[room_left - 1] = '\xff';
--			      line = fgets_unlocked (first_unused, room_left,
--						     listfile);
-+			      line = __fgets_unlocked (first_unused, room_left,
-+						       listfile);
- 			      if (line == NULL)
- 				break;
- 			      if (first_unused[room_left - 1] != '\xff')
-@@ -335,7 +302,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
- 		  /* The just read character is a white space and so
- 		     can be ignored.  */
- 		  first_unused[room_left - 1] = '\xff';
--		  line = fgets_unlocked (first_unused, room_left, stream);
-+		  line = __fgets_unlocked (first_unused, room_left, stream);
- 		  if (line == NULL)
- 		    {
- 		      /* Continuation line without any data and
-@@ -369,29 +336,25 @@ _nss_files_getaliasent_r (struct aliasent *result, char *buffer, size_t buflen,
- 			  int *errnop)
- {
-   /* Return next entry in host file.  */
--  enum nss_status status = NSS_STATUS_SUCCESS;
- 
--  __libc_lock_lock (lock);
--
--  /* Be prepared that the set*ent function was not called before.  */
--  if (stream == NULL)
--    status = internal_setent (&stream);
--
--  if (status == NSS_STATUS_SUCCESS)
--    {
--      result->alias_local = 1;
-+  struct nss_files_per_file_data *data;
-+  enum nss_status status = __nss_files_data_open (&data, nss_file_aliasent,
-+						  "/etc/aliases", errnop, NULL);
-+  if (status != NSS_STATUS_SUCCESS)
-+    return status;
- 
--      /* Read lines until we get a definite result.  */
--      do
--	status = get_next_alias (stream, NULL, result, buffer, buflen, errnop);
--      while (status == NSS_STATUS_RETURN);
--    }
-+  result->alias_local = 1;
- 
--  __libc_lock_unlock (lock);
-+  /* Read lines until we get a definite result.  */
-+  do
-+    status = get_next_alias (data->stream, NULL, result, buffer, buflen,
-+			     errnop);
-+  while (status == NSS_STATUS_RETURN);
- 
-+  __nss_files_data_put (data);
-   return status;
- }
--
-+libc_hidden_def (_nss_files_getaliasent_r)
- 
- enum nss_status
- _nss_files_getaliasbyname_r (const char *name, struct aliasent *result,
-@@ -418,9 +381,10 @@ _nss_files_getaliasbyname_r (const char *name, struct aliasent *result,
-       do
- 	status = get_next_alias (stream, name, result, buffer, buflen, errnop);
-       while (status == NSS_STATUS_RETURN);
--    }
- 
--  internal_endent (&stream);
-+      fclose (stream);
-+    }
- 
-   return status;
- }
-+libc_hidden_def (_nss_files_getaliasbyname_r)
-diff --git a/nss/nss_files/files-ethers.c b/nss/nss_files/files-ethers.c
-index 2fe7f81e4b..7c2c2b9833 100644
---- a/nss/nss_files/files-ethers.c
-+++ b/nss/nss_files/files-ethers.c
-@@ -20,8 +20,6 @@
- #include <netinet/if_ether.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- struct etherent_data {};
- 
- #define ENTNAME		etherent
-diff --git a/nss/nss_files/files-grp.c b/nss/nss_files/files-grp.c
-index 49be38e8b1..a716d948e2 100644
---- a/nss/nss_files/files-grp.c
-+++ b/nss/nss_files/files-grp.c
-@@ -19,8 +19,6 @@
- #include <grp.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define STRUCTURE	group
- #define ENTNAME		grent
- #define DATABASE	"group"
-diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
-index 2b47ec3e53..d54d91d038 100644
---- a/nss/nss_files/files-hosts.c
-+++ b/nss/nss_files/files-hosts.c
-@@ -26,8 +26,6 @@
- #include <alloc_buffer.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- /* Get implementation for some internal functions.  */
- #include "../resolv/res_hconf.h"
- 
-@@ -57,12 +55,13 @@ LINE_PARSER
-    STRING_FIELD (addr, isspace, 1);
- 
-    /* Parse address.  */
--   if (inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
-+   if (__inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
-        > 0)
-      af = af == AF_UNSPEC ? AF_INET : af;
-    else
-      {
--       if (af == AF_INET && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
-+       if (af == AF_INET
-+	   && __inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
- 	 {
- 	   if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr))
- 	     memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ);
-@@ -76,7 +75,7 @@ LINE_PARSER
- 	     return 0;
- 	 }
-        else if (af == AF_UNSPEC
--		&& inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
-+		&& __inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
- 	 af = AF_INET6;
-        else
- 	 /* Illegal address: ignore line.  */
-@@ -349,7 +348,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result,
- 	status = gethostbyname3_multi
- 	  (stream, name, af, result, buffer, buflen, errnop, herrnop);
- 
--      internal_endent (&stream);
-+      fclose (stream);
-     }
- 
-   if (canonp && status == NSS_STATUS_SUCCESS)
-@@ -357,6 +356,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result,
- 
-   return status;
- }
-+libc_hidden_def (_nss_files_gethostbyname3_r)
- 
- enum nss_status
- _nss_files_gethostbyname_r (const char *name, struct hostent *result,
-@@ -366,6 +366,7 @@ _nss_files_gethostbyname_r (const char *name, struct hostent *result,
-   return _nss_files_gethostbyname3_r (name, AF_INET, result, buffer, buflen,
- 				      errnop, herrnop, NULL, NULL);
- }
-+libc_hidden_def (_nss_files_gethostbyname_r)
- 
- enum nss_status
- _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
-@@ -375,6 +376,7 @@ _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
-   return _nss_files_gethostbyname3_r (name, af, result, buffer, buflen,
- 				      errnop, herrnop, NULL, NULL);
- }
-+libc_hidden_def (_nss_files_gethostbyname2_r)
- 
- enum nss_status
- _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
-@@ -475,7 +477,7 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
- 	  status = NSS_STATUS_SUCCESS;
- 	}
- 
--      internal_endent (&stream);
-+      fclose (stream);
-     }
-   else if (status == NSS_STATUS_TRYAGAIN)
-     {
-@@ -490,3 +492,4 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
- 
-   return status;
- }
-+libc_hidden_def (_nss_files_gethostbyname4_r)
-diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c
-index 717c9fd334..18ed288d04 100644
---- a/nss/nss_files/files-init.c
-+++ b/nss/nss_files/files-init.c
-@@ -21,8 +21,7 @@
- #include <string.h>
- #include <nscd/nscd.h>
- #include <nss.h>
--
--NSS_DECLARE_MODULE_FUNCTIONS (files)
-+#include <nss_files.h>
- 
- static void
- register_file (void (*cb) (size_t, struct traced_file *),
-@@ -49,5 +48,6 @@ _nss_files_init (void (*cb) (size_t, struct traced_file *))
-   register_file (cb, servdb, "/etc/services", 0);
-   register_file (cb, netgrdb, "/etc/netgroup", 0);
- }
-+libc_hidden_def (_nss_files_init)
- 
- #endif
-diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
-index 6fcea40b55..b44211e50b 100644
---- a/nss/nss_files/files-initgroups.c
-+++ b/nss/nss_files/files-initgroups.c
-@@ -28,8 +28,6 @@
- #include <nss.h>
- #include <nss_files.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- enum nss_status
- _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
- 			   long int *size, gid_t **groupsp, long int limit,
-@@ -129,3 +127,4 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
- 
-   return status == NSS_STATUS_SUCCESS && !any ? NSS_STATUS_NOTFOUND : status;
- }
-+libc_hidden_def (_nss_files_initgroups_dyn)
-diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
-index f8c821c2f0..75bfbd9e44 100644
---- a/nss/nss_files/files-netgrp.c
-+++ b/nss/nss_files/files-netgrp.c
-@@ -28,11 +28,9 @@
- #include "netgroup.h"
- #include <nss_files.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define DATAFILE	"/etc/netgroup"
- 
--libnss_files_hidden_proto (_nss_files_endnetgrent)
-+libc_hidden_proto (_nss_files_endnetgrent)
- 
- #define EXPAND(needed)							      \
-   do									      \
-@@ -152,7 +150,7 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result)
- 
-   return status;
- }
--
-+libc_hidden_def (_nss_files_setnetgrent)
- 
- enum nss_status
- _nss_files_endnetgrent (struct __netgrent *result)
-@@ -164,7 +162,7 @@ _nss_files_endnetgrent (struct __netgrent *result)
-   result->cursor = NULL;
-   return NSS_STATUS_SUCCESS;
- }
--libnss_files_hidden_def (_nss_files_endnetgrent)
-+libc_hidden_def (_nss_files_endnetgrent)
- 
- static char *
- strip_whitespace (char *str)
-@@ -279,7 +277,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result,
- 
-   return status;
- }
--libnss_files_hidden_def (_nss_netgroup_parseline)
-+libc_hidden_def (_nss_netgroup_parseline)
- 
- 
- enum nss_status
-@@ -293,3 +291,4 @@ _nss_files_getnetgrent_r (struct __netgrent *result, char *buffer,
- 
-   return status;
- }
-+libc_hidden_def (_nss_files_getnetgrent_r)
-diff --git a/nss/nss_files/files-network.c b/nss/nss_files/files-network.c
-index 9cd7d7dc79..217ed78609 100644
---- a/nss/nss_files/files-network.c
-+++ b/nss/nss_files/files-network.c
-@@ -22,8 +22,6 @@
- #include <stdint.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define ENTNAME		netent
- #define DATABASE	"networks"
- #define NEED_H_ERRNO
-@@ -71,7 +69,7 @@ LINE_PARSER
-        *cp = '\0';
-        addr = newp;
-      }
--   result->n_net = inet_network (addr);
-+   result->n_net = inet_network (addr);
-    result->n_addrtype = AF_INET;
- 
-  })
-diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
-index 68c51c7cbf..997eac573a 100644
---- a/nss/nss_files/files-parse.c
-+++ b/nss/nss_files/files-parse.c
-@@ -74,13 +74,7 @@ struct parser_data
- /* Export the line parser function so it can be used in nss_db.  */
- # define parser_stclass /* Global */
- # define parse_line CONCAT(_nss_files_parse_,ENTNAME)
--# if IS_IN (libc)
--/* We are defining one of the functions that actually lives in libc
--   because it is used to implement fget*ent and suchlike.  */
--#  define nss_files_parse_hidden_def(name) libc_hidden_def (name)
--# else
--#  define nss_files_parse_hidden_def(name) libnss_files_hidden_def (name)
--# endif
-+# define nss_files_parse_hidden_def(name) libc_hidden_def (name)
- #endif
- 
- 
-diff --git a/nss/nss_files/files-proto.c b/nss/nss_files/files-proto.c
-index 98d082c642..13072692c1 100644
---- a/nss/nss_files/files-proto.c
-+++ b/nss/nss_files/files-proto.c
-@@ -19,8 +19,6 @@
- #include <netdb.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define ENTNAME		protoent
- #define DATABASE	"protocols"
- 
-diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c
-index b04165ddde..5c74c6da9b 100644
---- a/nss/nss_files/files-pwd.c
-+++ b/nss/nss_files/files-pwd.c
-@@ -19,8 +19,6 @@
- #include <pwd.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define STRUCTURE	passwd
- #define ENTNAME		pwent
- #define DATABASE	"passwd"
-diff --git a/nss/nss_files/files-rpc.c b/nss/nss_files/files-rpc.c
-index eeb2725d2c..3dea8f18f2 100644
---- a/nss/nss_files/files-rpc.c
-+++ b/nss/nss_files/files-rpc.c
-@@ -19,8 +19,6 @@
- #include <rpc/netdb.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define ENTNAME		rpcent
- #define DATABASE	"rpc"
- 
-diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
-index f4f0985377..a8d83e094e 100644
---- a/nss/nss_files/files-service.c
-+++ b/nss/nss_files/files-service.c
-@@ -20,8 +20,6 @@
- #include <netdb.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define ENTNAME		servent
- #define DATABASE	"services"
- 
-diff --git a/nss/nss_files/files-sgrp.c b/nss/nss_files/files-sgrp.c
-index 6b1c9eac02..213a408e7b 100644
---- a/nss/nss_files/files-sgrp.c
-+++ b/nss/nss_files/files-sgrp.c
-@@ -19,8 +19,6 @@
- #include <gshadow.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define STRUCTURE	sgrp
- #define ENTNAME		sgent
- #define DATABASE	"gshadow"
-diff --git a/nss/nss_files/files-spwd.c b/nss/nss_files/files-spwd.c
-index 976deaf918..d031257a20 100644
---- a/nss/nss_files/files-spwd.c
-+++ b/nss/nss_files/files-spwd.c
-@@ -19,8 +19,6 @@
- #include <shadow.h>
- #include <nss.h>
- 
--NSS_DECLARE_MODULE_FUNCTIONS (files)
--
- #define STRUCTURE	spwd
- #define ENTNAME		spent
- #define DATABASE	"shadow"
-diff --git a/nss/nss_files_data.c b/nss/nss_files_data.c
-new file mode 100644
-index 0000000000..80fbfe5fff
---- /dev/null
-+++ b/nss/nss_files_data.c
-@@ -0,0 +1,161 @@
-+/* Returns a pointer to the global nss_files data structure.
-+   Copyright (C) 2021 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C 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.1 of the License, or (at your option) any later version.
-+
-+   The GNU C 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 the GNU C Library; if not, see
-+   <https://www.gnu.org/licenses/>.  */
-+
-+#include <nss_files.h>
-+
-+#include <allocate_once.h>
-+#include <errno.h>
-+#include <netdb.h>
-+#include <nss.h>
-+#include <stdlib.h>
-+
-+/* This collects all per file-data.   */
-+struct nss_files_data
-+{
-+  struct nss_files_per_file_data files[nss_file_count];
-+};
-+
-+/* For use with allocate_once.  */
-+static void *nss_files_global;
-+static void *
-+nss_files_global_allocate (void *closure)
-+{
-+  struct nss_files_data *result = malloc (sizeof (*result));
-+  if (result != NULL)
-+    {
-+      for (int i = 0; i < nss_file_count; ++i)
-+        {
-+          result->files[i].stream = NULL;
-+          __libc_lock_init (result->files[i].lock);
-+        }
-+    }
-+  return result;
-+}
-+/* Like __nss_files_data_open, but does not perform the open call.  */
-+static enum nss_status
-+__nss_files_data_get (struct nss_files_per_file_data **pdata,
-+                      enum nss_files_file file, int *errnop, int *herrnop)
-+{
-+  struct nss_files_data *data = allocate_once (&nss_files_global,
-+                                               nss_files_global_allocate,
-+                                               NULL, NULL);
-+  if (data == NULL)
-+    {
-+      if (errnop != NULL)
-+        *errnop = errno;
-+      if (herrnop != NULL)
-+        {
-+          __set_h_errno (NETDB_INTERNAL);
-+          *herrnop = NETDB_INTERNAL;
-+        }
-+      return NSS_STATUS_TRYAGAIN;
-+    }
-+
-+  *pdata = &data->files[file];
-+  __libc_lock_lock ((*pdata)->lock);
-+  return NSS_STATUS_SUCCESS;
-+}
-+
-+/* Helper function for opening the backing file at PATH.  */
-+static enum nss_status
-+__nss_files_data_internal_open (struct nss_files_per_file_data *data,
-+                                const char *path)
-+{
-+  enum nss_status status = NSS_STATUS_SUCCESS;
-+
-+  if (data->stream == NULL)
-+    {
-+      data->stream = __nss_files_fopen (path);
-+
-+      if (data->stream == NULL)
-+        status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-+    }
-+
-+  return status;
-+}
-+
-+
-+enum nss_status
-+__nss_files_data_open (struct nss_files_per_file_data **pdata,
-+                       enum nss_files_file file, const char *path,
-+                       int *errnop, int *herrnop)
-+{
-+  enum nss_status status = __nss_files_data_get (pdata, file, errnop, herrnop);
-+  if (status != NSS_STATUS_SUCCESS)
-+    return status;
-+
-+  /* Be prepared that the set*ent function was not called before.  */
-+  if ((*pdata)->stream == NULL)
-+    {
-+      int saved_errno = errno;
-+      status = __nss_files_data_internal_open (*pdata, path);
-+      __set_errno (saved_errno);
-+      if (status != NSS_STATUS_SUCCESS)
-+        __nss_files_data_put (*pdata);
-+    }
-+
-+  return status;
-+}
-+
-+libc_hidden_def (__nss_files_data_open)
-+
-+void
-+__nss_files_data_put (struct nss_files_per_file_data *data)
-+{
-+  __libc_lock_unlock (data->lock);
-+}
-+libc_hidden_def (__nss_files_data_put)
-+
-+enum nss_status
-+__nss_files_data_setent (enum nss_files_file file, const char *path)
-+{
-+  struct nss_files_per_file_data *data;
-+  enum nss_status status = __nss_files_data_get (&data, file, NULL, NULL);
-+  if (status != NSS_STATUS_SUCCESS)
-+    return status;
-+
-+  if (data->stream == NULL)
-+    status = __nss_files_data_internal_open (data, path);
-+  else
-+    rewind (data->stream);
-+
-+  __nss_files_data_put (data);
-+  return status;
-+}
-+libc_hidden_def (__nss_files_data_setent)
-+
-+enum nss_status
-+__nss_files_data_endent (enum nss_files_file file)
-+{
-+  /* No cleanup is necessary if not initialized.  */
-+  struct nss_files_data *data = atomic_load_acquire (&nss_files_global);
-+  if (data == NULL)
-+    return NSS_STATUS_SUCCESS;
-+
-+  struct nss_files_per_file_data *fdata = &data->files[file];
-+  __libc_lock_lock (fdata->lock);
-+  if (fdata->stream != NULL)
-+    {
-+      fclose (fdata->stream);
-+      fdata->stream = NULL;
-+    }
-+  __libc_lock_unlock (fdata->lock);
-+
-+  return NSS_STATUS_SUCCESS;
-+}
-+libc_hidden_def (__nss_files_data_endent)
-diff --git a/nss/nss_files_functions.c b/nss/nss_files_functions.c
-new file mode 100644
-index 0000000000..85720b4311
---- /dev/null
-+++ b/nss/nss_files_functions.c
-@@ -0,0 +1,43 @@
-+/* Direct access for nss_files functions for NSS module loading.
-+   Copyright (C) 2021 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C 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.1 of the License, or (at your option) any later version.
-+
-+   The GNU C 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 the GNU C Library; if not, see
-+   <https://www.gnu.org/licenses/>.  */
-+
-+#include <nss_module.h>
-+#include <nss_files.h>
-+
-+void
-+__nss_files_functions (nss_module_functions_untyped pointers)
-+{
-+  void **fptr = pointers;
-+
-+  /* Functions which are not implemented.  */
-+#define _nss_files_getcanonname_r NULL
-+#define _nss_files_gethostbyaddr2_r NULL
-+#define _nss_files_getpublickey NULL
-+#define _nss_files_getsecretkey NULL
-+#define _nss_files_netname2user NULL
-+
-+#undef DEFINE_NSS_FUNCTION
-+#define DEFINE_NSS_FUNCTION(x) *fptr++ = _nss_files_##x;
-+#include "function.def"
-+
-+#ifdef PTR_MANGLE
-+  void **end = fptr;
-+  for (fptr = pointers; fptr != end; ++fptr)
-+    PTR_MANGLE (*fptr);
-+#endif
-+}
-diff --git a/nss/nss_module.c b/nss/nss_module.c
-index 60c070c851..7b42c585a4 100644
---- a/nss/nss_module.c
-+++ b/nss/nss_module.c
-@@ -30,6 +30,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <nss_files.h>
- 
- /* Suffix after .so of NSS service modules.  This is a bit of magic,
-    but we assume LIBNSS_FILES_SO looks like "libnss_files.so.2" and we
-@@ -110,10 +111,45 @@ static const function_name nss_function_name_array[] =
- #include "function.def"
-   };
- 
-+static bool
-+module_load_nss_files (struct nss_module *module)
-+{
-+  if (is_nscd)
-+    {
-+      void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
-+#  ifdef PTR_DEMANGLE
-+      PTR_DEMANGLE (cb);
-+#  endif
-+      _nss_files_init (cb);
-+    }
-+
-+  /* Initialize the function pointers, following the double-checked
-+     locking idiom.  */
-+  __libc_lock_lock (nss_module_list_lock);
-+  switch ((enum nss_module_state) atomic_load_acquire (&module->state))
-+    {
-+    case nss_module_uninitialized:
-+    case nss_module_failed:
-+      __nss_files_functions (module->functions.untyped);
-+      module->handle = NULL;
-+      /* Synchronizes with unlocked __nss_module_load atomic_load_acquire.  */
-+      atomic_store_release (&module->state, nss_module_loaded);
-+      break;
-+    case nss_module_loaded:
-+      /* Nothing to clean up.  */
-+      break;
-+    }
-+  __libc_lock_unlock (nss_module_list_lock);
-+  return true;
-+}
-+
- /* Internal implementation of __nss_module_load.  */
- static bool
- module_load (struct nss_module *module)
- {
-+  if (strcmp (module->name, "files") == 0)
-+    return module_load_nss_files (module);
-+
-   void *handle;
-   {
-     char *shlib_name;
-@@ -360,7 +396,7 @@ __nss_module_freeres (void)
-   struct nss_module *current = nss_module_list;
-   while (current != NULL)
-     {
--      if (current->state == nss_module_loaded)
-+      if (current->state == nss_module_loaded && current->handle != NULL)
-         __libc_dlclose (current->handle);
- 
-       struct nss_module *next = current->next;
-diff --git a/nss/nss_module.h b/nss/nss_module.h
-index 05c4791d11..c1a1d90b60 100644
---- a/nss/nss_module.h
-+++ b/nss/nss_module.h
-@@ -38,6 +38,10 @@ struct nss_module_functions
- typedef void *nss_module_functions_untyped[sizeof (struct nss_module_functions)
-                                            / sizeof (void *)];
- 
-+/* Locate the nss_files functions, as if by dlopen/dlsym.  */
-+void __nss_files_functions (nss_module_functions_untyped pointers)
-+  attribute_hidden;
-+
- /* Initialization state of a NSS module.  */
- enum nss_module_state
- {
-diff --git a/nss/nss_readline.c b/nss/nss_readline.c
-index 4b3ecbccc8..a2f397a11f 100644
---- a/nss/nss_readline.c
-+++ b/nss/nss_readline.c
-@@ -40,7 +40,7 @@ __nss_readline (FILE *fp, char *buf, size_t len, off64_t *poffset)
-       *poffset = __ftello64 (fp);
- 
-       buf[len - 1] = '\xff';        /* Marker to recognize truncation.  */
--      if (fgets_unlocked (buf, len, fp) == NULL)
-+      if (__fgets_unlocked (buf, len, fp) == NULL)
-         {
-           if (feof_unlocked (fp))
-             {
-@@ -61,7 +61,7 @@ __nss_readline (FILE *fp, char *buf, size_t len, off64_t *poffset)
-            line on the next call.  */
-         return __nss_readline_seek (fp, *poffset);
- 
--      /* fgets_unlocked succeeded.  */
-+      /* __fgets_unlocked succeeded.  */
- 
-       /* Remove leading whitespace.  */
-       char *p = buf;
-diff --git a/nss/nss.h b/nss/nss.h
-index ae213f9a6c..c6d62adc0f 100644
---- a/nss/nss.h
-+++ b/nss/nss.h
-@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);
-   extern nss_endgrent _nss_##module##_endgrent;                          \
-   extern nss_endhostent _nss_##module##_endhostent;                      \
-   extern nss_endnetent _nss_##module##_endnetent;                        \
--  extern nss_endnetgrent _nss_##module##__endnetgrent;                   \
-+  extern nss_endnetgrent _nss_##module##_endnetgrent;                    \
-   extern nss_endprotoent _nss_##module##_endprotoent;                    \
-   extern nss_endpwent _nss_##module##_endpwent;                          \
-   extern nss_endrpcent _nss_##module##_endrpcent;                        \
-diff --git a/nss/nss_module.c b/nss/nss_module.c
-index 7b42c585a4..7ea5ad9887 100644
---- a/nss/nss_module.c
-+++ b/nss/nss_module.c
-@@ -114,14 +114,16 @@ static const function_name nss_function_name_array[] =
- static bool
- module_load_nss_files (struct nss_module *module)
- {
-+#ifdef USE_NSCD
-   if (is_nscd)
-     {
-       void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
--#  ifdef PTR_DEMANGLE
-+# ifdef PTR_DEMANGLE
-       PTR_DEMANGLE (cb);
--#  endif
-+# endif
-       _nss_files_init (cb);
-     }
-+#endif
- 
-   /* Initialize the function pointers, following the double-checked
-      locking idiom.  */
diff --git a/gnu/packages/patches/gnupg-CVE-2022-34903.patch b/gnu/packages/patches/gnupg-CVE-2022-34903.patch
deleted file mode 100644
index 19c055282a..0000000000
--- a/gnu/packages/patches/gnupg-CVE-2022-34903.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-https://dev.gnupg.org/T6027
-https://www.openwall.com/lists/oss-security/2022/06/30/1
-https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=34c649b3601383cd11dbc76221747ec16fd68e1b
-
-From 34c649b3601383cd11dbc76221747ec16fd68e1b Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk@gnupg.org>
-Date: Tue, 14 Jun 2022 11:33:27 +0200
-Subject: [PATCH] g10: Fix garbled status messages in NOTATION_DATA
-
-* g10/cpr.c (write_status_text_and_buffer): Fix off-by-one
---
-
-Depending on the escaping and line wrapping the computed remaining
-buffer length could be wrong.  Fixed by always using a break to
-terminate the escape detection loop.  Might have happened for all
-status lines which may wrap.
-
-GnuPG-bug-id: T6027
----
- g10/cpr.c | 13 ++++---------
- 1 file changed, 4 insertions(+), 9 deletions(-)
-
-diff --git a/g10/cpr.c b/g10/cpr.c
-index 9bfdd3c34..fa8005d6f 100644
---- a/g10/cpr.c
-+++ b/g10/cpr.c
-@@ -372,20 +372,15 @@ write_status_text_and_buffer (int no, const char *string,
-             }
-           first = 0;
-         }
--      for (esc=0, s=buffer, n=len; n && !esc; s++, n--)
-+      for (esc=0, s=buffer, n=len; n; s++, n--)
-         {
-           if (*s == '%' || *(const byte*)s <= lower_limit
-               || *(const byte*)s == 127 )
-             esc = 1;
-           if (wrap && ++count > wrap)
--            {
--              dowrap=1;
--              break;
--            }
--        }
--      if (esc)
--        {
--          s--; n++;
-+            dowrap=1;
-+          if (esc || dowrap)
-+            break;
-         }
-       if (s != buffer)
-         es_fwrite (buffer, s-buffer, 1, statusfp);
--- 
-2.11.0
-
diff --git a/gnu/packages/patches/gnutls-guile-eintr-eagain.patch b/gnu/packages/patches/gnutls-guile-eintr-eagain.patch
deleted file mode 100644
index e04c945158..0000000000
--- a/gnu/packages/patches/gnutls-guile-eintr-eagain.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Fixes <https://issues.guix.gnu.org/47867>.
-
-This fix was merged upstream
-in <https://gitlab.com/gnutls/gnutls/-/merge_requests/1417> and will
-be in GnuTLS 3.7.3.  Upstream commit:
-
-commit 110e2172dbef1fbdf7399dab1e80780847b61c0c
-Author: Ludovic Courtès <ludo@gnu.org>
-Date:   Sat Apr 24 22:02:14 2021 +0200
-
-    guile: Writes to record ports handle EAGAIN/EINTR transparently.
-
-diff --git a/guile/src/core.c b/guile/src/core.c
-index a13670fc7b..0926dc8a97 100644
---- a/guile/src/core.c
-+++ b/guile/src/core.c
-@@ -985,7 +985,10 @@ write_to_session_record_port (SCM port, const void *data, size_t size)
-       c_result = gnutls_record_send (c_session, (char *) data + c_sent,
-                                      size - c_sent);
-       if (EXPECT_FALSE (c_result < 0))
--        scm_gnutls_error (c_result, FUNC_NAME);
-+	{
-+	  if (c_result != GNUTLS_E_AGAIN && c_result != GNUTLS_E_INTERRUPTED)
-+	    scm_gnutls_error (c_result, FUNC_NAME);
-+	}
-       else
-         c_sent += c_result;
-     }
-@@ -1069,7 +1072,8 @@ read_from_session_record_port (SCM port, SCM dst, size_t start, size_t count)
- #undef FUNC_NAME
- 
- /* Return the file descriptor that backs PORT.  This function is called upon a
--   blocking read--i.e., 'read_from_session_record_port' returned -1.  */
-+   blocking read--i.e., 'read_from_session_record_port' or
-+   'write_to_session_record_port' returned -1.  */
- static int
- session_record_port_fd (SCM port)
- {
-@@ -1097,7 +1101,16 @@ write_to_session_record_port (SCM port, SCM src, size_t start, size_t count)
-   c_session = scm_to_gnutls_session (session, 1, FUNC_NAME);
-   data = (char *) SCM_BYTEVECTOR_CONTENTS (src) + start;
- 
--  result = gnutls_record_send (c_session, data, count);
-+  do
-+    result = gnutls_record_send (c_session, data, count);
-+  while (result == GNUTLS_E_INTERRUPTED
-+	 || (result == GNUTLS_E_AGAIN
-+	     && !SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session)));
-+
-+  if (result == GNUTLS_E_AGAIN
-+      && SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session))
-+    /* Tell Guile that reading would block.  */
-+    return (size_t) -1;
- 
-   if (EXPECT_FALSE (result < 0))
-     scm_gnutls_error (result, FUNC_NAME);
diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
index 956fa617c3..8bb86467c0 100644
--- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
+++ b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
@@ -1,11 +1,14 @@
-# Names of libraries included in typelib files are opened by dlopen.  Here we 
-# add the full path.
-#
-# This patch was provided by Luca Bruno <lucabru@src.gnome.org>  for 
-# 'gobject-introspection' 1.40.0 in Nix.
-#
-# It has since been updated to work with newer versions of
-# gobject-introspection.
+Names of libraries included in typelib files are opened by dlopen.
+Here we add the full path.
+
+This patch was provided by Luca Bruno <lucabru@src.gnome.org>,
+for 'gobject-introspection' 1.40.0 in Nix.
+
+It has since been updated to work with newer versions of
+gobject-introspection.
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 1d39ab84..e12ed24e 100644
 --- a/giscanner/scannermain.py
 +++ b/giscanner/scannermain.py
 @@ -95,6 +95,39 @@ def get_windows_option_group(parser):
@@ -48,10 +51,10 @@
  def _get_option_parser():
      parser = optparse.OptionParser('%prog [options] sources',
                                     version='%prog ' + giscanner.__version__)
-@@ -205,6 +238,10 @@ match the namespace prefix.""")
-     parser.add_option("", "--filelist",
-                       action="store", dest="filelist", default=[],
-                       help="file containing headers and sources to be scanned")
+@@ -220,6 +253,10 @@ match the namespace prefix.""")
+     parser.add_option("", "--compiler",
+                       action="store", dest="compiler", default=None,
+                       help="the C compiler to use internally")
 +    parser.add_option("", "--fallback-library-path",
 +                      action="store", dest="fallback_libpath",
 +                      default=_get_default_fallback_libpath(),
@@ -59,6 +62,8 @@
  
      group = get_preprocessor_option_group(parser)
      parser.add_option_group(group)
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index 9f8ab5df..8aa37c99 100644
 --- a/giscanner/shlibs.py
 +++ b/giscanner/shlibs.py
 @@ -57,6 +57,14 @@ def _ldd_library_pattern(library_name):
@@ -76,7 +81,7 @@
  # This is a what we do for non-la files. We assume that we are on an
  # ELF-like system where ldd exists and the soname extracted with ldd is
  # a filename that can be opened with dlopen().
-@@ -106,7 +112,8 @@ def _resolve_non_libtool(options, binary, libraries):
+@@ -108,7 +116,8 @@ def _resolve_non_libtool(options, binary, libraries):
              output = output.decode("utf-8", "replace")
  
          shlibs = resolve_from_ldd_output(libraries, output)
@@ -86,7 +91,7 @@
  
  
  def sanitize_shlib_path(lib):
-@@ -115,19 +122,18 @@ def sanitize_shlib_path(lib):
+@@ -117,19 +126,18 @@ def sanitize_shlib_path(lib):
      # In case we get relative paths on macOS (like @rpath) then we fall
      # back to the basename as well:
      # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222
@@ -111,7 +116,7 @@
      if len(patterns) == 0:
          return []
  
-@@ -139,8 +145,12 @@ def resolve_from_ldd_output(libraries, output):
+@@ -141,8 +149,12 @@ def resolve_from_ldd_output(libraries, output):
          if line.endswith(':'):
              continue
          for word in line.split():
@@ -126,10 +131,11 @@
                  if m:
                      del patterns[library]
                      shlibs.append(m.group())
-
+diff --git a/giscanner/utils.py b/giscanner/utils.py
+index 31c7ea48..630002a8 100644
 --- a/giscanner/utils.py
 +++ b/giscanner/utils.py
-@@ -111,17 +111,11 @@ def extract_libtool_shlib(la_file):
+@@ -114,16 +114,11 @@ def extract_libtool_shlib(la_file):
      if dlname is None:
          return None
  
@@ -141,8 +147,7 @@
 -        if libdir is None:
 -            return dlbasename
 -        return libdir + '/' + dlbasename
--    # From the comments in extract_libtool(), older libtools had
--    # a path rather than the raw dlname
+-    # Older libtools had a path rather than the raw dlname
 -    return os.path.basename(dlname)
 +    dlbasename = os.path.basename(dlname)
 +    libdir = _extract_libdir_field(la_file)
@@ -151,10 +156,12 @@
 +    return libdir + '/' + dlbasename
  
  
- def extract_libtool(la_file):
+ # Returns arguments for invoking libtool, if applicable, otherwise None
+diff --git a/tests/scanner/test_shlibs.py b/tests/scanner/test_shlibs.py
+index a8337c60..7f123103 100644
 --- a/tests/scanner/test_shlibs.py
 +++ b/tests/scanner/test_shlibs.py
-@@ -40,6 +64,7 @@ class TestLddParser(unittest.TestCase):
+@@ -40,7 +40,8 @@ class TestLddParser(unittest.TestCase):
  
          self.assertEqual(
              sanitize_shlib_path('/foo/bar'),
@@ -163,4 +170,4 @@
 +            '/foo/bar')
  
      def test_unresolved_library(self):
-output = ''
+         output = ''
diff --git a/gnu/packages/patches/gobject-introspection-cc.patch b/gnu/packages/patches/gobject-introspection-cc.patch
index 6a86b56b44..d3b1df82af 100644
--- a/gnu/packages/patches/gobject-introspection-cc.patch
+++ b/gnu/packages/patches/gobject-introspection-cc.patch
@@ -1,12 +1,13 @@
 Use gcc as the default C compiler if CC is not set.
 
-diff -ru gobject-introspection-1.58.1.orig/giscanner/__init__.py gobject-introspection-1.58.1/giscanner/__init__.py
---- gobject-introspection-1.58.1.orig/giscanner/__init__.py	1970-01-01 01:00:00.000000000 +0100
-+++ gobject-introspection-1.58.1/giscanner/__init__.py	2018-12-03 13:33:28.788971299 +0100
-@@ -22,6 +22,8 @@
+diff --git a/giscanner/__init__.py b/giscanner/__init__.py
+index 7c2f365a..607fe341 100644
+--- a/giscanner/__init__.py
++++ b/giscanner/__init__.py
+@@ -21,6 +21,8 @@ import os
  builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR')
  if builddir is not None:
-     __path__.append(os.path.join(builddir, 'giscanner'))
+     __path__.append(os.path.join(builddir, 'giscanner'))  # type: ignore  # mypy issue #1422
 +if not 'CC' in os.environ:
 +    os.environ['CC'] = 'gcc'
  try:
diff --git a/gnu/packages/patches/icedtea-7-hotspot-pointer-comparison.patch b/gnu/packages/patches/icedtea-7-hotspot-pointer-comparison.patch
new file mode 100644
index 0000000000..deb305bd96
--- /dev/null
+++ b/gnu/packages/patches/icedtea-7-hotspot-pointer-comparison.patch
@@ -0,0 +1,36 @@
+Avoid ordered comparison of pointer with integer to prevent compile error
+with GCC 11.
+
+diff --git a/src/share/vm/opto/lcm.cpp b/src/share/vm/opto/lcm.cpp
+--- a/src/share/vm/opto/lcm.cpp
++++ b/src/share/vm/opto/lcm.cpp
+@@ -60,7 +60,7 @@
+ // Check whether val is not-null-decoded compressed oop,
+ // i.e. will grab into the base of the heap if it represents NULL.
+ static bool accesses_heap_base_zone(Node *val) {
+-  if (Universe::narrow_oop_base() > 0) { // Implies UseCompressedOops.
++  if (Universe::narrow_oop_base() != NULL) { // Implies UseCompressedOops.
+     if (val && val->is_Mach()) {
+       if (val->as_Mach()->ideal_Opcode() == Op_DecodeN) {
+         // This assumes all Decodes with TypePtr::NotNull are matched to nodes that
+diff --git a/src/share/vm/runtime/virtualspace.cpp b/src/share/vm/runtime/virtualspace.cpp
+--- a/src/share/vm/runtime/virtualspace.cpp
++++ b/src/share/vm/runtime/virtualspace.cpp
+@@ -527,7 +527,7 @@ ReservedHeapSpace::ReservedHeapSpace(size_t size, size_t alignment,
+                 (UseCompressedOops && (Universe::narrow_oop_base() != NULL) &&
+                  Universe::narrow_oop_use_implicit_null_checks()) ?
+                   lcm(os::vm_page_size(), alignment) : 0) {
+-  if (base() > 0) {
++  if (base() != NULL) {
+     MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+   }
+ 
+@@ -546,7 +546,7 @@ ReservedHeapSpace::ReservedHeapSpace(const size_t prefix_size,
+                 (UseCompressedOops && (Universe::narrow_oop_base() != NULL) &&
+                  Universe::narrow_oop_use_implicit_null_checks()) ?
+                   lcm(os::vm_page_size(), prefix_align) : 0) {
+-  if (base() > 0) {
++  if (base() != NULL) {
+     MemTracker::record_virtual_memory_type((address)base(), mtJavaHeap);
+   }
+ 
diff --git a/gnu/packages/patches/inkscape-poppler-compat.patch b/gnu/packages/patches/inkscape-poppler-compat.patch
new file mode 100644
index 0000000000..cb7d1c8eb3
--- /dev/null
+++ b/gnu/packages/patches/inkscape-poppler-compat.patch
@@ -0,0 +1,45 @@
+Fix build with Poppler 22.9.0.
+
+Taken from upstream:
+
+  https://gitlab.com/inkscape/inkscape/-/commit/fb00794923d19cfbb2ca4adca3ae8971553a06be
+
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
+index cca1e840966c7940a1af472025535042b07e3e0f..80d64c9b866d5d3dd095636a9a02571b89061af1 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -697,7 +697,11 @@ void PdfParser::opSetDash(Object args[], int /*numArgs*/)
+       _POPPLER_FREE(obj);
+     }
+   }
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++  state->setLineDash(std::vector<double> (dash, dash + length), args[1].getNum());
++#else
+   state->setLineDash(dash, length, args[1].getNum());
++#endif
+   builder->updateStyle(state);
+ }
+ 
+diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
+index 12f71dd9214b95dbad6fdf7642a96cdd57f2c64a..9fc56fe63c2feee986ad1ff5018e679a0bacb665 100644
+--- a/src/extension/internal/pdfinput/svg-builder.cpp
++++ b/src/extension/internal/pdfinput/svg-builder.cpp
+@@ -389,10 +389,17 @@ void SvgBuilder::_setStrokeStyle(SPCSSAttr *css, GfxState *state) {
+     sp_repr_css_set_property(css, "stroke-miterlimit", os_ml.str().c_str());
+ 
+     // Line dash
+-    double *dash_pattern;
+     int dash_length;
+     double dash_start;
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++    const double *dash_pattern;
++    const std::vector<double> &dash = state->getLineDash(&dash_start);
++    dash_pattern = dash.data();
++    dash_length = dash.size();
++#else
++    double *dash_pattern;
+     state->getLineDash(&dash_pattern, &dash_length, &dash_start);
++#endif
+     if ( dash_length > 0 ) {
+         Inkscape::CSSOStringStream os_array;
+         for ( int i = 0 ; i < dash_length ; i++ ) {
diff --git a/gnu/packages/patches/jsoncpp-pkg-config-version.patch b/gnu/packages/patches/jsoncpp-pkg-config-version.patch
deleted file mode 100644
index 3983cc300c..0000000000
--- a/gnu/packages/patches/jsoncpp-pkg-config-version.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Taken from upstream: https://github.com/open-source-parsers/jsoncpp/issues/1235.
-
-From ac2870298ed5b5a96a688d9df07461b31f83e906 Mon Sep 17 00:00:00 2001
-From: Derick Vigne <derickvigne@me.com>
-Date: Tue, 26 Jan 2021 14:59:12 -0500
-Subject: [PATCH] Fixed pkg-config Version
-
----
- pkg-config/jsoncpp.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
-index 632a377f5..2a2221069 100644
---- a/pkg-config/jsoncpp.pc.in
-+++ b/pkg-config/jsoncpp.pc.in
-@@ -5,7 +5,7 @@ includedir=@includedir_for_pc_file@
- 
- Name: jsoncpp
- Description: A C++ library for interacting with JSON
--Version: @JSONCPP_VERSION@
-+Version: @PROJECT_VERSION@
- URL: https://github.com/open-source-parsers/jsoncpp
- Libs: -L${libdir} -ljsoncpp
- Cflags: -I${includedir}
diff --git a/gnu/packages/patches/libaio-32bit-test.patch b/gnu/packages/patches/libaio-32bit-test.patch
new file mode 100644
index 0000000000..0da8e25c69
--- /dev/null
+++ b/gnu/packages/patches/libaio-32bit-test.patch
@@ -0,0 +1,26 @@
+This fix comes from an upstream pull request, see
+https://pagure.io/libaio/pull-request/22#commit_list
+
+diff --git a/harness/cases/23.t b/harness/cases/23.t
+index cc5a8a1..9bbb05c 100644
+--- a/harness/cases/23.t
++++ b/harness/cases/23.t
+@@ -72,7 +72,7 @@ static void fail_errno(const char *format, ...)
+ static void *thrproc2(void *arg)
+ {
+ 	for (;;) {
+-		off_t offset = 0;
++		off64_t offset = 0;
+ 
+ 		pthread_barrier_wait(&barrier);
+ 		if (exiting)
+@@ -92,7 +92,7 @@ static void *thrproc3(void *arg)
+ {
+ 	for (;;) {
+ 		char c;
+-		off_t offset = 0;
++		off64_t offset = 0;
+ 
+ 		pthread_barrier_wait(&barrier);
+ 		if (exiting)
+
diff --git a/gnu/packages/patches/libffi-3.3-powerpc-fixes.patch b/gnu/packages/patches/libffi-3.3-powerpc-fixes.patch
deleted file mode 100644
index 971ed26180..0000000000
--- a/gnu/packages/patches/libffi-3.3-powerpc-fixes.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-This is a combination of the following 4 commits:
-https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.patch
-https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326.patch
-https://github.com/libffi/libffi/commit/e50b9ef8b910fa642ef158f6642e60d54d7ad740.patch
-https://github.com/libffi/libffi/commit/4d6d2866ae43e55325e8ee96561221804602cd7a.patch
-
-From 2dbfa92a95e3bacabca431b89d2a5925e48a0e40 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Thu, 28 Nov 2019 12:42:41 +0000
-
-powerpc: fix build failure on power7 and older (#532)
-
-Build failure looks as:
-```
-libtool: compile:  powerpc-unknown-linux-gnu-gcc \
-    -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ...
-In file included from src/powerpc/ffi.c:33:
-src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target
-   65 | typedef __int128 float128;
-      |         ^~~~~~~~
-```
-
-The fix avoids using __int128 in favour of aligned char[16].
-
-Closes: https://github.com/libffi/libffi/issues/531
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-
-Address platforms with no __int128.
-
-powerpc64: Use memcpy to help platforms with no __int128. (#534)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Update powerpc sysv assembly for ffi_powerpc.h changes (#541)
-
-Some of the flag bits were moved when adding powerpc64 vector support.
-
-Fixes #536
----
- src/powerpc/ffi_linux64.c | 12 ++++++------
- src/powerpc/ffi_powerpc.h |  2 +-
- src/powerpc/sysv.S        | 12 +++++-------
- 3 files changed, 12 insertions(+), 14 deletions(-)
-
-diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
-index de0d033..4d50878 100644
---- a/src/powerpc/ffi_linux64.c
-+++ b/src/powerpc/ffi_linux64.c
-@@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
-               if (next_arg.ul == gpr_end.ul)
-                 next_arg.ul = rest.ul;
-               if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs)
--                *vec_base.f128++ = **p_argv.f128;
-+		memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128));
-               else
--                *next_arg.f128 = **p_argv.f128;
-+		memcpy (next_arg.f128, *p_argv.f128, sizeof (float128));
-               if (++next_arg.f128 == gpr_end.f128)
-                 next_arg.f128 = rest.f128;
-               vecarg_count++;
-@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
-                     {
-                       if (vecarg_count < NUM_VEC_ARG_REGISTERS64
-                           && i < nfixedargs)
--                        *vec_base.f128++ = *arg.f128++;
-+		        memcpy (vec_base.f128++, arg.f128, sizeof (float128));
-                       else
--                        *next_arg.f128 = *arg.f128++;
-+		        memcpy (next_arg.f128, arg.f128++, sizeof (float128));
-                       if (++next_arg.f128 == gpr_end.f128)
-                         next_arg.f128 = rest.f128;
-                       vecarg_count++;
-@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
-                   do
-                     {
-                       if (pvec < end_pvec && i < nfixedargs)
--                        *to.f128 = *pvec++;
-+		        memcpy (to.f128, pvec++, sizeof (float128));
-                       else
--                        *to.f128 = *from.f128;
-+		        memcpy (to.f128, from.f128, sizeof (float128));
-                       to.f128++;
-                       from.f128++;
-                     }
-diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
-index 5ee2a70..8e2f2f0 100644
---- a/src/powerpc/ffi_powerpc.h
-+++ b/src/powerpc/ffi_powerpc.h
-@@ -62,7 +62,7 @@ typedef _Float128 float128;
- #elif defined(__FLOAT128__)
- typedef __float128 float128;
- #else
--typedef __int128 float128;
-+typedef char float128[16] __attribute__((aligned(16)));
- #endif
- 
- void FFI_HIDDEN ffi_closure_SYSV (void);
-diff --git a/src/powerpc/sysv.S b/src/powerpc/sysv.S
-index 1474ce7..df97734 100644
---- a/src/powerpc/sysv.S
-+++ b/src/powerpc/sysv.S
-@@ -104,17 +104,16 @@ ENTRY(ffi_call_SYSV)
- 	bctrl
- 
- 	/* Now, deal with the return value.  */
--	mtcrf	0x01,%r31 /* cr7  */
-+	mtcrf	0x03,%r31 /* cr6-cr7  */
- 	bt-	31,L(small_struct_return_value)
- 	bt-	30,L(done_return_value)
- #ifndef __NO_FPRS__
- 	bt-	29,L(fp_return_value)
- #endif
- 	stw	%r3,0(%r30)
--	bf+	28,L(done_return_value)
-+	bf+	27,L(done_return_value)
- 	stw	%r4,4(%r30)
--	mtcrf	0x02,%r31 /* cr6  */
--	bf	27,L(done_return_value)
-+	bf	26,L(done_return_value)
- 	stw     %r5,8(%r30)
- 	stw	%r6,12(%r30)
- 	/* Fall through...  */
-@@ -145,10 +144,9 @@ L(done_return_value):
- #ifndef __NO_FPRS__
- L(fp_return_value):
- 	.cfi_restore_state
--	bf	28,L(float_return_value)
-+	bf	27,L(float_return_value)
- 	stfd	%f1,0(%r30)
--	mtcrf   0x02,%r31 /* cr6  */
--	bf	27,L(done_return_value)
-+	bf	26,L(done_return_value)
- 	stfd	%f2,8(%r30)
- 	b	L(done_return_value)
- L(float_return_value):
--- 
-2.26.0
-
diff --git a/gnu/packages/patches/libffi-float128-powerpc64le.patch b/gnu/packages/patches/libffi-float128-powerpc64le.patch
deleted file mode 100644
index 4fd32b0102..0000000000
--- a/gnu/packages/patches/libffi-float128-powerpc64le.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From de93adfb6f48100946bba2c3abad2a77a0cfde0b Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Sun, 24 Nov 2019 09:52:01 +0100
-Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7
-
-This is a patch pulled down from the following:
-https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch
-
-This issue is being hit on OpenBMC code when pulling the latest
-libffi tag and building on a P8 ppc64le machine. I verified this
-patch fixes the issue we are seeing.
-
-Below is the original commit message:
-
-Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7
-fails on:
-
-In file included from ../src/powerpc/ffi.c:33:0:
-../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target
- typedef _Float128 float128;
-         ^~~~~~~~~
-
-Fix this build failure by checking for __HAVE_FLOAT128 before using
-_Float128, as _Float128 is enabled only on specific conditions, see
-output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h:
-
- /* Defined to 1 if the current compiler invocation provides a
-    floating-point type with the IEEE 754 binary128 format, and this glibc
-    includes corresponding *f128 interfaces for it.  */
- #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \
-     && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH
- # define __HAVE_FLOAT128 1
- #else
- # define __HAVE_FLOAT128 0
- #endif
-
-Fixes:
- - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
----
- src/powerpc/ffi_powerpc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
-index 8e2f2f0e..960a5c42 100644
---- a/src/powerpc/ffi_powerpc.h
-+++ b/src/powerpc/ffi_powerpc.h
-@@ -57,7 +57,7 @@ typedef union
-   double d;
- } ffi_dblfl;
- 
--#if defined(__FLOAT128_TYPE__)
-+#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128)
- typedef _Float128 float128;
- #elif defined(__FLOAT128__)
- typedef __float128 float128;
diff --git a/gnu/packages/patches/libssh2-CVE-2019-17498.patch b/gnu/packages/patches/libssh2-CVE-2019-17498.patch
deleted file mode 100644
index 6f69e562e2..0000000000
--- a/gnu/packages/patches/libssh2-CVE-2019-17498.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-https://github.com/libssh2/libssh2/commit/dedcbd106f8e52d5586b0205bc7677e4c9868f9c.patch
-
-From dedcbd106f8e52d5586b0205bc7677e4c9868f9c Mon Sep 17 00:00:00 2001
-From: Will Cosgrove <will@panic.com>
-Date: Fri, 30 Aug 2019 09:57:38 -0700
-Subject: [PATCH] packet.c: improve message parsing (#402)
-
-* packet.c: improve parsing of packets
-
-file: packet.c
-
-notes:
-Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST.
----
- src/packet.c | 68 ++++++++++++++++++++++------------------------------
- 1 file changed, 29 insertions(+), 39 deletions(-)
-
-diff --git a/src/packet.c b/src/packet.c
-index 38ab62944..2e01bfc5d 100644
---- a/src/packet.c
-+++ b/src/packet.c
-@@ -419,8 +419,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
-                     size_t datalen, int macstate)
- {
-     int rc = 0;
--    char *message = NULL;
--    char *language = NULL;
-+    unsigned char *message = NULL;
-+    unsigned char *language = NULL;
-     size_t message_len = 0;
-     size_t language_len = 0;
-     LIBSSH2_CHANNEL *channelp = NULL;
-@@ -472,33 +472,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
- 
-         case SSH_MSG_DISCONNECT:
-             if(datalen >= 5) {
--                size_t reason = _libssh2_ntohu32(data + 1);
-+                uint32_t reason = 0;
-+                struct string_buf buf;
-+                buf.data = (unsigned char *)data;
-+                buf.dataptr = buf.data;
-+                buf.len = datalen;
-+                buf.dataptr++; /* advance past type */
- 
--                if(datalen >= 9) {
--                    message_len = _libssh2_ntohu32(data + 5);
-+                _libssh2_get_u32(&buf, &reason);
-+                _libssh2_get_string(&buf, &message, &message_len);
-+                _libssh2_get_string(&buf, &language, &language_len);
- 
--                    if(message_len < datalen-13) {
--                        /* 9 = packet_type(1) + reason(4) + message_len(4) */
--                        message = (char *) data + 9;
--
--                        language_len =
--                            _libssh2_ntohu32(data + 9 + message_len);
--                        language = (char *) data + 9 + message_len + 4;
--
--                        if(language_len > (datalen-13-message_len)) {
--                            /* bad input, clear info */
--                            language = message = NULL;
--                            language_len = message_len = 0;
--                        }
--                    }
--                    else
--                        /* bad size, clear it */
--                        message_len = 0;
--                }
-                 if(session->ssh_msg_disconnect) {
--                    LIBSSH2_DISCONNECT(session, reason, message,
--                                       message_len, language, language_len);
-+                    LIBSSH2_DISCONNECT(session, reason, (const char *)message,
-+                                       message_len, (const char *)language,
-+                                       language_len);
-                 }
-+
-                 _libssh2_debug(session, LIBSSH2_TRACE_TRANS,
-                                "Disconnect(%d): %s(%s)", reason,
-                                message, language);
-@@ -539,24 +529,24 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
-                 int always_display = data[1];
- 
-                 if(datalen >= 6) {
--                    message_len = _libssh2_ntohu32(data + 2);
--
--                    if(message_len <= (datalen - 10)) {
--                        /* 6 = packet_type(1) + display(1) + message_len(4) */
--                        message = (char *) data + 6;
--                        language_len = _libssh2_ntohu32(data + 6 +
--                                                        message_len);
--
--                        if(language_len <= (datalen - 10 - message_len))
--                            language = (char *) data + 10 + message_len;
--                    }
-+                    struct string_buf buf;
-+                    buf.data = (unsigned char *)data;
-+                    buf.dataptr = buf.data;
-+                    buf.len = datalen;
-+                    buf.dataptr += 2; /* advance past type & always display */
-+
-+                    _libssh2_get_string(&buf, &message, &message_len);
-+                    _libssh2_get_string(&buf, &language, &language_len);
-                 }
- 
-                 if(session->ssh_msg_debug) {
--                    LIBSSH2_DEBUG(session, always_display, message,
--                                  message_len, language, language_len);
-+                    LIBSSH2_DEBUG(session, always_display,
-+                                  (const char *)message,
-+                                  message_len, (const char *)language,
-+                                  language_len);
-                 }
-             }
-+
-             /*
-              * _libssh2_debug will actually truncate this for us so
-              * that it's not an inordinate about of data
-@@ -579,7 +569,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
-                 uint32_t len = 0;
-                 unsigned char want_reply = 0;
-                 len = _libssh2_ntohu32(data + 1);
--                if(datalen >= (6 + len)) {
-+                if((len <= (UINT_MAX - 6)) && (datalen >= (6 + len))) {
-                     want_reply = data[5 + len];
-                     _libssh2_debug(session,
-                                    LIBSSH2_TRACE_CONN,
diff --git a/gnu/packages/patches/libtiff-CVE-2022-34526.patch b/gnu/packages/patches/libtiff-CVE-2022-34526.patch
new file mode 100644
index 0000000000..a5ad9d79a5
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2022-34526.patch
@@ -0,0 +1,22 @@
+Fix CVE-2022-34526:
+
+  https://nvd.nist.gov/vuln/detail/CVE-2022-34526
+  https://gitlab.com/libtiff/libtiff/-/issues/433
+
+Patch taken from upstream source repository:
+
+  https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990
+
+diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
+--- a/libtiff/tif_dirinfo.c
++++ b/libtiff/tif_dirinfo.c
+@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
+ 	    default:
+ 		return 1;
+ 	}
++	if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) {
++		return 0;
++	}
+ 	/* Check if codec specific tags are allowed for the current
+ 	 * compression scheme (codec) */
+ 	switch (tif->tif_dir.td_compression) {
diff --git a/gnu/packages/patches/libtool-grep-compat.patch b/gnu/packages/patches/libtool-grep-compat.patch
new file mode 100644
index 0000000000..46e5c6873d
--- /dev/null
+++ b/gnu/packages/patches/libtool-grep-compat.patch
@@ -0,0 +1,51 @@
+Don't escape forward slashes to prevent a warning from grep 3.8.
+
+diff --git a/tests/link-order.at b/tests/link-order.at
+--- a/tests/link-order.at
++++ b/tests/link-order.at
+@@ -99,12 +99,12 @@ aix* | interix*) ;;  # These systems have different path syntax
+   case $hardcode_direct$hardcode_direct_absolute in
+   yesno)
+     AT_CHECK([if $EGREP relinking stderr; then
+-         $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
++         $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
+        else :; fi], [0], [ignore], [], [echo "wrong link order"])
+     ;;
+   *)
+     AT_CHECK([if $EGREP relinking stderr; then
+-         $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
++         $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
+        else :; fi], [0], [ignore], [], [echo "wrong link order"])
+     ;;
+   esac
+diff --git a/tests/testsuite b/tests/testsuite
+--- a/tests/testsuite
++++ b/tests/testsuite
+@@ -20611,11 +20611,11 @@ aix* | interix*) ;;  # These systems have different path syntax
+   yesno)
+     { set +x
+ $as_echo "$at_srcdir/link-order.at:101: if \$EGREP relinking stderr; then
+-         \$EGREP \" .*\\/new\\/lib/libb\$shared_ext .*\\/old\\/lib/libcee\$shared_ext\" stdout
++         \$EGREP \" .*/new/lib/libb\$shared_ext .*/old/lib/libcee\$shared_ext\" stdout
+        else :; fi"
+ at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:101"
+ ( $at_check_trace; if $EGREP relinking stderr; then
+-         $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
++         $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
+        else :; fi
+ ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+ at_status=$? at_failed=false
+@@ -20633,11 +20633,11 @@ $at_traceon; }
+   *)
+     { set +x
+ $as_echo "$at_srcdir/link-order.at:106: if \$EGREP relinking stderr; then
+-         \$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout
++         \$EGREP \" -L.*/new\\/lib -lb -L.*/old/lib -lcee\" stdout
+        else :; fi"
+ at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:106"
+ ( $at_check_trace; if $EGREP relinking stderr; then
+-         $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
++         $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
+        else :; fi
+ ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
+ at_status=$? at_failed=false
diff --git a/gnu/packages/patches/libtool-skip-tests2.patch b/gnu/packages/patches/libtool-skip-tests2.patch
index 3f86191b4f..91beaa903e 100644
--- a/gnu/packages/patches/libtool-skip-tests2.patch
+++ b/gnu/packages/patches/libtool-skip-tests2.patch
@@ -16,7 +16,7 @@ Skip the nopic test on ARM, MIPS and RISC-V systems.
 @@ -8741,7 +8741,7 @@
  
  { set +x
- $as_echo "$at_srcdir/demo.at:535: case \$host in
+ $as_echo "$at_srcdir/demo.at:513: case \$host in
 -hppa*|x86_64*|s390*)
 +hppa*|x86_64*|s390*|arm*|mips*|riscv*)
    # These hosts cannot use non-PIC shared libs
@@ -24,7 +24,7 @@ Skip the nopic test on ARM, MIPS and RISC-V systems.
  *-solaris*|*-sunos*)
 @@ -8766,7 +8766,7 @@
  "
- at_fn_check_prepare_notrace 'a `...` command substitution' "demo.at:535"
+ at_fn_check_prepare_notrace 'a `...` command substitution' "demo.at:513"
  ( $at_check_trace; case $host in
 -hppa*|x86_64*|s390*)
 +hppa*|x86_64*|s390*|arm*|mips*|riscv*)
diff --git a/gnu/packages/patches/libwpd-gcc-compat.patch b/gnu/packages/patches/libwpd-gcc-compat.patch
new file mode 100644
index 0000000000..ee206beafe
--- /dev/null
+++ b/gnu/packages/patches/libwpd-gcc-compat.patch
@@ -0,0 +1,17 @@
+Fix build with newer GCC.
+
+Taken from upstream:
+
+  https://sourceforge.net/p/libwpd/code/ci/333c8a26f231bea26ec3d56245315041bbf5577f/
+
+--- a/src/lib/WPXTable.h
++++ b/src/lib/WPXTable.h
+@@ -53,7 +53,7 @@
+ 	~WPXTable();
+ 	void insertRow();
+ 	void insertCell(unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits);
+-	const WPXTableCell  *getCell(size_t i, size_t j)
++	const WPXTableCell  *getCell(std::size_t i, std::size_t j)
+ 	{
+ 		return &(m_tableRows[i])[j];
+ 	}
diff --git a/gnu/packages/patches/libxml2-parent-pointers.patch b/gnu/packages/patches/libxml2-parent-pointers.patch
deleted file mode 100644
index 1f0615c512..0000000000
--- a/gnu/packages/patches/libxml2-parent-pointers.patch
+++ /dev/null
@@ -1,228 +0,0 @@
-Fix a regression in 2.9.12 where some corrupt XML structures were handled
-incorrectly:
-
-  https://gitlab.gnome.org/GNOME/libxml2/-/issues/255
-
-This is an amalgamation of these upstream commits:
-
-  https://gitlab.gnome.org/GNOME/libxml2/-/commit/85b1792e37b131e7a51af98a37f92472e8de5f3f
-  https://gitlab.gnome.org/GNOME/libxml2/-/commit/13ad8736d294536da4cbcd70a96b0a2fbf47070c
-
-diff --git a/HTMLtree.c b/HTMLtree.c
---- a/HTMLtree.c
-+++ b/HTMLtree.c
-@@ -744,7 +744,7 @@ void
- htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
- 	                 xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED,
-                          int format) {
--    xmlNodePtr root;
-+    xmlNodePtr root, parent;
-     xmlAttrPtr attr;
-     const htmlElemDesc * info;
- 
-@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-     }
- 
-     root = cur;
-+    parent = cur->parent;
-     while (1) {
-         switch (cur->type) {
-         case XML_HTML_DOCUMENT_NODE:
-@@ -762,13 +763,25 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-             if (((xmlDocPtr) cur)->intSubset != NULL) {
-                 htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL);
-             }
--            if (cur->children != NULL) {
-+            /* Always validate cur->parent when descending. */
-+            if ((cur->parent == parent) && (cur->children != NULL)) {
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-             break;
- 
-         case XML_ELEMENT_NODE:
-+            /*
-+             * Some users like lxml are known to pass nodes with a corrupted
-+             * tree structure. Fall back to a recursive call to handle this
-+             * case.
-+             */
-+            if ((cur->parent != parent) && (cur->children != NULL)) {
-+                htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
-+                break;
-+            }
-+
-             /*
-              * Get specific HTML info for that node.
-              */
-@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                     (cur->name != NULL) &&
-                     (cur->name[0] != 'p')) /* p, pre, param */
-                     xmlOutputBufferWriteString(buf, "\n");
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                 (info != NULL) && (!info->isinline)) {
-                 if ((cur->next->type != HTML_TEXT_NODE) &&
-                     (cur->next->type != HTML_ENTITY_REF_NODE) &&
--                    (cur->parent != NULL) &&
--                    (cur->parent->name != NULL) &&
--                    (cur->parent->name[0] != 'p')) /* p, pre, param */
-+                    (parent != NULL) &&
-+                    (parent->name != NULL) &&
-+                    (parent->name[0] != 'p')) /* p, pre, param */
-                     xmlOutputBufferWriteString(buf, "\n");
-             }
- 
-@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                 break;
-             if (((cur->name == (const xmlChar *)xmlStringText) ||
-                  (cur->name != (const xmlChar *)xmlStringTextNoenc)) &&
--                ((cur->parent == NULL) ||
--                 ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) &&
--                  (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) {
-+                ((parent == NULL) ||
-+                 ((xmlStrcasecmp(parent->name, BAD_CAST "script")) &&
-+                  (xmlStrcasecmp(parent->name, BAD_CAST "style"))))) {
-                 xmlChar *buffer;
- 
-                 buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
-@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                 break;
-             }
- 
--            /*
--             * The parent should never be NULL here but we want to handle
--             * corrupted documents gracefully.
--             */
--            if (cur->parent == NULL)
--                return;
--            cur = cur->parent;
-+            cur = parent;
-+            /* cur->parent was validated when descending. */
-+            parent = cur->parent;
- 
-             if ((cur->type == XML_HTML_DOCUMENT_NODE) ||
-                 (cur->type == XML_DOCUMENT_NODE)) {
-@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                     (cur->next != NULL)) {
-                     if ((cur->next->type != HTML_TEXT_NODE) &&
-                         (cur->next->type != HTML_ENTITY_REF_NODE) &&
--                        (cur->parent != NULL) &&
--                        (cur->parent->name != NULL) &&
--                        (cur->parent->name[0] != 'p')) /* p, pre, param */
-+                        (parent != NULL) &&
-+                        (parent->name != NULL) &&
-+                        (parent->name[0] != 'p')) /* p, pre, param */
-                         xmlOutputBufferWriteString(buf, "\n");
-                 }
-             }
-diff --git a/xmlsave.c b/xmlsave.c
---- a/xmlsave.c
-+++ b/xmlsave.c
-@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
- static void
- xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-     int format = ctxt->format;
--    xmlNodePtr tmp, root, unformattedNode = NULL;
-+    xmlNodePtr tmp, root, unformattedNode = NULL, parent;
-     xmlAttrPtr attr;
-     xmlChar *start, *end;
-     xmlOutputBufferPtr buf;
-@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-     buf = ctxt->buf;
- 
-     root = cur;
-+    parent = cur->parent;
-     while (1) {
-         switch (cur->type) {
-         case XML_DOCUMENT_NODE:
-@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-             break;
- 
-         case XML_DOCUMENT_FRAG_NODE:
--            if (cur->children != NULL) {
-+            /* Always validate cur->parent when descending. */
-+            if ((cur->parent == parent) && (cur->children != NULL)) {
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-             break;
- 
-         case XML_ELEMENT_NODE:
--	    if ((cur != root) && (ctxt->format == 1) && (xmlIndentTreeOutput))
-+            /*
-+             * Some users like lxml are known to pass nodes with a corrupted
-+             * tree structure. Fall back to a recursive call to handle this
-+             * case.
-+             */
-+            if ((cur->parent != parent) && (cur->children != NULL)) {
-+                xmlNodeDumpOutputInternal(ctxt, cur);
-+                break;
-+            }
-+
-+	    if ((ctxt->level > 0) && (ctxt->format == 1) &&
-+                (xmlIndentTreeOutput))
- 		xmlOutputBufferWrite(buf, ctxt->indent_size *
- 				     (ctxt->level > ctxt->indent_nr ?
- 				      ctxt->indent_nr : ctxt->level),
-@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-                 xmlOutputBufferWrite(buf, 1, ">");
-                 if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n");
-                 if (ctxt->level >= 0) ctxt->level++;
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-                 break;
-             }
- 
--            /*
--             * The parent should never be NULL here but we want to handle
--             * corrupted documents gracefully.
--             */
--            if (cur->parent == NULL)
--                return;
--            cur = cur->parent;
-+            cur = parent;
-+            /* cur->parent was validated when descending. */
-+            parent = cur->parent;
- 
-             if (cur->type == XML_ELEMENT_NODE) {
-                 if (ctxt->level > 0) ctxt->level--;
-diff --git a/xmlsave.c b/xmlsave.c
---- a/xmlsave.c
-+++ b/xmlsave.c
-@@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-             break;
- 
-         case XML_ELEMENT_NODE:
-+	    if ((cur != root) && (ctxt->format == 1) &&
-+                (xmlIndentTreeOutput))
-+		xmlOutputBufferWrite(buf, ctxt->indent_size *
-+				     (ctxt->level > ctxt->indent_nr ?
-+				      ctxt->indent_nr : ctxt->level),
-+				     ctxt->indent);
-+
-             /*
-              * Some users like lxml are known to pass nodes with a corrupted
-              * tree structure. Fall back to a recursive call to handle this
-@@ -900,13 +907,6 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-                 break;
-             }
- 
--	    if ((ctxt->level > 0) && (ctxt->format == 1) &&
--                (xmlIndentTreeOutput))
--		xmlOutputBufferWrite(buf, ctxt->indent_size *
--				     (ctxt->level > ctxt->indent_nr ?
--				      ctxt->indent_nr : ctxt->level),
--				     ctxt->indent);
--
-             xmlOutputBufferWrite(buf, 1, "<");
-             if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
-                 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
diff --git a/gnu/packages/patches/libxml2-terminating-newline.patch b/gnu/packages/patches/libxml2-terminating-newline.patch
deleted file mode 100644
index 3f5c88dd4e..0000000000
--- a/gnu/packages/patches/libxml2-terminating-newline.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Fix a regression in 2.9.12 where serializing empty HTML documents would
-not add a terminating newline.
-
-  https://gitlab.gnome.org/GNOME/libxml2/-/issues/266
-
-Taken from upstream:
-
-  https://gitlab.gnome.org/GNOME/libxml2/-/commit/92d9ab4c28842a09ca2b76d3ff2f933e01b6cd6f
-
-diff --git a/HTMLtree.c b/HTMLtree.c
---- a/HTMLtree.c
-+++ b/HTMLtree.c
-@@ -763,11 +763,15 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-             if (((xmlDocPtr) cur)->intSubset != NULL) {
-                 htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL);
-             }
--            /* Always validate cur->parent when descending. */
--            if ((cur->parent == parent) && (cur->children != NULL)) {
--                parent = cur;
--                cur = cur->children;
--                continue;
-+            if (cur->children != NULL) {
-+                /* Always validate cur->parent when descending. */
-+                if (cur->parent == parent) {
-+                    parent = cur;
-+                    cur = cur->children;
-+                    continue;
-+                }
-+            } else {
-+                xmlOutputBufferWriteString(buf, "\n");
-             }
-             break;
- 
diff --git a/gnu/packages/patches/libxml2-xpath-recursion-limit.patch b/gnu/packages/patches/libxml2-xpath-recursion-limit.patch
deleted file mode 100644
index 051196c635..0000000000
--- a/gnu/packages/patches/libxml2-xpath-recursion-limit.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix recursion accounting in XPath expressions:
-
-  https://gitlab.gnome.org/GNOME/libxml2/-/issues/264
-
-Taken from upstream:
-
-  https://gitlab.gnome.org/GNOME/libxml2/-/commit/3e1aad4fe584747fd7d17cc7b2863a78e2d21a77
-
-diff --git a/xpath.c b/xpath.c
---- a/xpath.c
-+++ b/xpath.c
-@@ -10983,7 +10983,7 @@ xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort) {
-     }
- 
-     if (xpctxt != NULL)
--        xpctxt->depth -= 1;
-+        xpctxt->depth -= 10;
- }
- 
- /**
diff --git a/gnu/packages/patches/linux-pam-unix_chkpwd.patch b/gnu/packages/patches/linux-pam-unix_chkpwd.patch
new file mode 100644
index 0000000000..0e865ff18c
--- /dev/null
+++ b/gnu/packages/patches/linux-pam-unix_chkpwd.patch
@@ -0,0 +1,9 @@
+unix_chkpwd is designed to have a suid bit, but it's not possible to set it
+for files in the store.  This patch tells unix_pam.so to look for
+unix_chkpwd in setuid program directory on Guix System.
+
+--- a/modules/pam_unix/Makefile.in
++++ b/modules/pam_unix/Makefile.in
+@@ -651,1 +651,1 @@
+-	-DCHKPWD_HELPER=\"$(sbindir)/unix_chkpwd\" \
++	-DCHKPWD_HELPER=\"/run/setuid-programs/unix_chkpwd\" \
diff --git a/gnu/packages/patches/llvm-8-missing-include.patch b/gnu/packages/patches/llvm-8-missing-include.patch
new file mode 100644
index 0000000000..4d7ca6d332
--- /dev/null
+++ b/gnu/packages/patches/llvm-8-missing-include.patch
@@ -0,0 +1,17 @@
+Add missing include statement for compatibility with libstdc++ 11.
+
+Taken from upstream:
+
+  https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1
+
+diff --git a/utils/benchmark/src/benchmark_register.h b/utils/benchmark/src/benchmark_register.h
+--- a/utils/benchmark/src/benchmark_register.h
++++ b/utils/benchmark/src/benchmark_register.h
+@@ -1,6 +1,7 @@
+ #ifndef BENCHMARK_REGISTER_H
+ #define BENCHMARK_REGISTER_H
+ 
++#include <limits>
+ #include <vector>
+ 
+ #include "check.h"
diff --git a/gnu/packages/patches/m4-gnulib-libio.patch b/gnu/packages/patches/m4-gnulib-libio.patch
deleted file mode 100644
index a26622ccf3..0000000000
--- a/gnu/packages/patches/m4-gnulib-libio.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-Adjust the bundled gnulib to cope with removal of libio interface in
-glibc 2.28.
-
-Based on this upstream patch, without hunks that do not apply to m4:
-https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e
-
-diff --git a/lib/fflush.c b/lib/fflush.c
-index 983ade0..a6edfa1 100644
---- a/lib/fflush.c
-+++ b/lib/fflush.c
-@@ -33,7 +33,7 @@
- #undef fflush
- 
- 
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- 
- /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
- static void
-@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
- 
- #endif
- 
--#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
-+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
- 
- # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
-   if (stream == NULL || ! freading (stream))
-     return fflush (stream);
- 
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- 
-   clear_ungetc_buffer_preserving_position (stream);
- 
-diff --git a/lib/fpending.c b/lib/fpending.c
-index c84e3a5..789f50e 100644
---- a/lib/fpending.c
-+++ b/lib/fpending.c
-@@ -32,7 +32,7 @@ __fpending (FILE *fp)
-   /* Most systems provide FILE as a struct and the necessary bitmask in
-      <stdio.h>, because they need it for implementing getc() and putc() as
-      fast macros.  */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-   return fp->_IO_write_ptr - fp->_IO_write_base;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
-   /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-diff --git a/lib/fpurge.c b/lib/fpurge.c
-index b1d417c..3aedcc3 100644
---- a/lib/fpurge.c
-+++ b/lib/fpurge.c
-@@ -62,7 +62,7 @@ fpurge (FILE *fp)
-   /* Most systems provide FILE as a struct and the necessary bitmask in
-      <stdio.h>, because they need it for implementing getc() and putc() as
-      fast macros.  */
--# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-   fp->_IO_read_end = fp->_IO_read_ptr;
-   fp->_IO_write_ptr = fp->_IO_write_base;
-   /* Avoid memory leak when there is an active ungetc buffer.  */
-diff --git a/lib/freadahead.c b/lib/freadahead.c
-index c2ecb5b..23ec76e 100644
---- a/lib/freadahead.c
-+++ b/lib/freadahead.c
-@@ -30,7 +30,7 @@ extern size_t __sreadahead (FILE *);
- size_t
- freadahead (FILE *fp)
- {
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-   if (fp->_IO_write_ptr > fp->_IO_write_base)
-     return 0;
-   return (fp->_IO_read_end - fp->_IO_read_ptr)
-diff --git a/lib/freading.c b/lib/freading.c
-index 73c28ac..c24d0c8 100644
---- a/lib/freading.c
-+++ b/lib/freading.c
-@@ -31,7 +31,7 @@ freading (FILE *fp)
-   /* Most systems provide FILE as a struct and the necessary bitmask in
-      <stdio.h>, because they need it for implementing getc() and putc() as
-      fast macros.  */
--# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-   return ((fp->_flags & _IO_NO_WRITES) != 0
-           || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
-               && fp->_IO_read_base != NULL));
-diff --git a/lib/fseeko.c b/lib/fseeko.c
-index 0101ab5..193f4e8 100644
---- a/lib/fseeko.c
-+++ b/lib/fseeko.c
-@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
- #endif
- 
-   /* These tests are based on fpurge.c.  */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-   if (fp->_IO_read_end == fp->_IO_read_ptr
-       && fp->_IO_write_ptr == fp->_IO_write_base
-       && fp->_IO_save_base == NULL)
-@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
-           return -1;
-         }
- 
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-       fp->_flags &= ~_IO_EOF_SEEN;
-       fp->_offset = pos;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
-diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
-index 78d896e..05c5752 100644
---- a/lib/stdio-impl.h
-+++ b/lib/stdio-impl.h
-@@ -18,6 +18,12 @@
-    the same implementation of stdio extension API, except that some fields
-    have different naming conventions, or their access requires some casts.  */
- 
-+/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
-+   problem by defining it ourselves.  FIXME: Do not rely on glibc
-+   internals.  */
-+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
-+# define _IO_IN_BACKUP 0x100
-+#endif
- 
- /* BSD stdio derived implementations.  */
- 
diff --git a/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch b/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
new file mode 100644
index 0000000000..50ac5530a2
--- /dev/null
+++ b/gnu/packages/patches/mesa-fix-sporadic-test-failures.patch
@@ -0,0 +1,27 @@
+commit 7749599d737d205a88bbb6fa755ba095d9b581fa
+Author: Gert Wollny <gert.wollny@collabora.com>
+Date:   Mon Aug 15 17:15:43 2022 +0200
+
+    r600/sfn: Initialize out buffer when printing op
+    
+    79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
+       r600/sfn: rewrite NIR backend
+    
+    Closes: #7021
+    
+    Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
+    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18130>
+
+diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
+index 3d40ea1796a..00826ed6457 100644
+--- a/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
++++ b/src/gallium/drivers/r600/sfn/sfn_instr_export.cpp
+@@ -206,7 +206,7 @@ bool WriteScratchInstr::do_ready() const
+ 
+ void WriteScratchInstr::do_print(std::ostream& os) const
+ {
+-   char buf[6];
++   char buf[6] = {0};
+ 
+    os << "WRITE_SCRATCH ";
+    if (m_address)
diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch
deleted file mode 100644
index 7ff571dcf5..0000000000
--- a/gnu/packages/patches/mesa-skip-tests.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-This test fails on i686-linux. I couldn't come up with a regex that
-could be used to disable it just on i686-linux, so we disable it
-completely with this patch:
-
-https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091
-
-diff --git a/src/util/meson.build b/src/util/meson.build
-index 319b22d9bf7..93790c72675 100644
---- a/src/util/meson.build
-+++ b/src/util/meson.build
-@@ -344,7 +344,7 @@ if with_tests
-     )
-   endif
- 
--  foreach t: ['bitset', 'register_allocate', 'u_debug_stack', 'u_qsort']
-+  foreach t: ['bitset', 'register_allocate', 'u_qsort']
-     test(
-       t,
-       executable(
diff --git a/gnu/packages/patches/mm-common-reproducible-tarball.patch b/gnu/packages/patches/mm-common-reproducible-tarball.patch
new file mode 100644
index 0000000000..f0890aaf57
--- /dev/null
+++ b/gnu/packages/patches/mm-common-reproducible-tarball.patch
@@ -0,0 +1,40 @@
+From 024c121c844a4ec920133eb3f7e6b6ee8044c0b6 Mon Sep 17 00:00:00 2001
+From: Vagrant Cascadian <vagrant@reproducible-builds.org>
+Date: Sat, 12 Dec 2020 04:05:56 +0000
+Original-Patch: https://bugs.debian.org/977177
+Subject: [PATCH] Set uid, username, gid, and group name on files in
+ generated tarball.
+
+The user and group may otherwise vary between builds on different systems.
+
+---
+ util/meson_aux/skeletonmm-tarball.py | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/util/meson_aux/skeletonmm-tarball.py b/util/meson_aux/skeletonmm-tarball.py
+index db9e650..89049b6 100755
+--- a/util/meson_aux/skeletonmm-tarball.py
++++ b/util/meson_aux/skeletonmm-tarball.py
+@@ -39,10 +39,18 @@ elif output_file.endswith('.gz'):
+ else:
+   mode = 'w'
+ 
++def reproducible(tarinfo):
++  # Set consistent user and group on files in the tar archive
++  tarinfo.uid = 0
++  tarinfo.uname = 'root'
++  tarinfo.gid = 0
++  tarinfo.gname = 'root'
++  return tarinfo
++
+ with tarfile.open(output_file, mode=mode) as tar_file:
+   os.chdir(source_dir) # Input filenames are relative to source_dir.
+   for file in sys.argv[3:]:
+-    tar_file.add(file)
++    tar_file.add(file, filter=reproducible)
+ # Errors raise exceptions. If an exception is raised, Meson+ninja will notice
+ # that the command failed, despite exit(0).
+ sys.exit(0)
+-- 
+2.29.2
+
diff --git a/gnu/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch b/gnu/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch
new file mode 100644
index 0000000000..a8144b85e6
--- /dev/null
+++ b/gnu/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch
@@ -0,0 +1,52 @@
+From 5a224b981ee32d7cf59aaa9e2c101af65a275edc Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Mon, 20 Feb 2023 19:14:12 +0100
+Subject: [PATCH] Dynamically allocate the alternate signal stack.
+
+This patch is a backport of https://github.com/ocaml/ocaml/pull/10266.
+---
+ asmrun/signals_asm.c | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/asmrun/signals_asm.c b/asmrun/signals_asm.c
+index 3895d75..7e2abe8 100644
+--- a/asmrun/signals_asm.c
++++ b/asmrun/signals_asm.c
+@@ -182,7 +182,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler)
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
+ 
+ static char * system_stack_top;
+-static char sig_alt_stack[SIGSTKSZ];
+ 
+ #if defined(SYS_linux)
+ /* PR#4746: recent Linux kernels with support for stack randomization
+@@ -274,15 +273,19 @@ void caml_init_signals(void)
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
+   {
+     stack_t stk;
+-    struct sigaction act;
+-    stk.ss_sp = sig_alt_stack;
++    stk.ss_sp = malloc(SIGSTKSZ);
+     stk.ss_size = SIGSTKSZ;
+     stk.ss_flags = 0;
+-    SET_SIGACT(act, segv_handler);
+-    act.sa_flags |= SA_ONSTACK | SA_NODEFER;
+-    sigemptyset(&act.sa_mask);
+-    system_stack_top = (char *) &act;
+-    if (sigaltstack(&stk, NULL) == 0) { sigaction(SIGSEGV, &act, NULL); }
++    if (stk.ss_sp != NULL) {
++      if (sigaltstack(&stk, NULL) != -1) {                                     
++        struct sigaction act;                                                  
++        SET_SIGACT(act, segv_handler);                                         
++        act.sa_flags |= SA_ONSTACK | SA_NODEFER;                               
++        sigemptyset(&act.sa_mask);                                             
++        system_stack_top = (char *) &act;                                      
++        sigaction(SIGSEGV, &act, NULL);                                        
++      }
++    }
+   }
+ #endif
+ }
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch b/gnu/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch
new file mode 100644
index 0000000000..2af1582976
--- /dev/null
+++ b/gnu/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch
@@ -0,0 +1,52 @@
+From 95f5016955e519c392c746e38e0c9460f2c1aa0c Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sun, 19 Feb 2023 09:58:57 +0100
+Subject: [PATCH] Dynamically allocate the alternate signal stack.
+
+This patch is a backport of https://github.com/ocaml/ocaml/pull/10266.
+---
+ runtime/signals_nat.c | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/runtime/signals_nat.c b/runtime/signals_nat.c
+index 29a5f49..a193fc2 100644
+--- a/runtime/signals_nat.c
++++ b/runtime/signals_nat.c
+@@ -182,7 +182,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler)
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
+ 
+ static char * system_stack_top;
+-static char sig_alt_stack[SIGSTKSZ];
+ 
+ #if defined(SYS_linux)
+ /* PR#4746: recent Linux kernels with support for stack randomization
+@@ -274,15 +273,19 @@ void caml_init_signals(void)
+ #ifdef HAS_STACK_OVERFLOW_DETECTION
+   {
+     stack_t stk;
+-    struct sigaction act;
+-    stk.ss_sp = sig_alt_stack;
++    stk.ss_sp = malloc(SIGSTKSZ);
+     stk.ss_size = SIGSTKSZ;
+     stk.ss_flags = 0;
+-    SET_SIGACT(act, segv_handler);
+-    act.sa_flags |= SA_ONSTACK | SA_NODEFER;
+-    sigemptyset(&act.sa_mask);
+-    system_stack_top = (char *) &act;
+-    if (sigaltstack(&stk, NULL) == 0) { sigaction(SIGSEGV, &act, NULL); }
++    if (stk.ss_sp != NULL) {
++      if (sigaltstack(&stk, NULL) != -1) {
++        struct sigaction act;
++        SET_SIGACT(act, segv_handler);
++        act.sa_flags |= SA_ONSTACK | SA_NODEFER;
++        sigemptyset(&act.sa_mask);
++        system_stack_top = (char *) &act;
++        sigaction(SIGSEGV, &act, NULL);
++      }
++    }
+   }
+ #endif
+ }
+-- 
+2.38.1
+
diff --git a/gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch b/gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch
new file mode 100644
index 0000000000..20a40488d8
--- /dev/null
+++ b/gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch
@@ -0,0 +1,49 @@
+Building p7zip with GCC 11 or newer normally fails with error messages like
+
+  ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an
+  operand of type ‘bool’ in ‘operator++’ is forbidden in C++17
+    308 |           numMethods++;
+        |           ^~~~~~~~~~
+
+This patch causes GCC to interpret the code using the GNU dialect of the C++14
+standard, as GCC 10 did by default, and reduces these errors to warnings.
+
+diff --git a/makefile.linux_amd64_asm b/makefile.linux_amd64_asm
+index 075c6a8..b7d73ee 100644
+--- a/makefile.linux_amd64_asm
++++ b/makefile.linux_amd64_asm
+@@ -11,6 +11,8 @@ ALLFLAGS=-m64 ${OPTFLAGS} -pipe \
+ 	-D_7ZIP_ASM \
+ 	$(LOCAL_FLAGS)
+ 
++ALLFLAGS_CPP=-std=gnu++14
++
+ CXX=g++
+ CC=gcc
+ CC_SHARED=-fPIC
+diff --git a/makefile.linux_any_cpu_gcc_4.X b/makefile.linux_any_cpu_gcc_4.X
+index be093b5..c0f3120 100644
+--- a/makefile.linux_any_cpu_gcc_4.X
++++ b/makefile.linux_any_cpu_gcc_4.X
+@@ -10,7 +10,7 @@ ALLFLAGS=${OPTFLAGS} -pipe \
+ 	-D_7ZIP_LARGE_PAGES \
+ 	$(LOCAL_FLAGS)
+ 
+-ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden
++ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -std=gnu++14 -fvisibility=hidden -fvisibility-inlines-hidden
+ 
+ CXX=g++
+ CC=gcc
+diff --git a/makefile.linux_x86_asm_gcc_4.X b/makefile.linux_x86_asm_gcc_4.X
+index 1ac339b..6e736d9 100644
+--- a/makefile.linux_x86_asm_gcc_4.X
++++ b/makefile.linux_x86_asm_gcc_4.X
+@@ -12,7 +12,7 @@ ALLFLAGS=${OPTFLAGS} -pipe -m32 \
+ 	-D_7ZIP_ASM \
+ 	$(LOCAL_FLAGS)
+ 
+-ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden
++ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -std=gnu++14 -fvisibility=hidden -fvisibility-inlines-hidden
+ 
+ CXX=g++
+ CC=gcc
diff --git a/gnu/packages/patches/pciutils-hurd-configure.patch b/gnu/packages/patches/pciutils-hurd-configure.patch
deleted file mode 100644
index 226891a995..0000000000
--- a/gnu/packages/patches/pciutils-hurd-configure.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Add ability to detect GNU/Hurd when configuring.
-
-Adapted from https://git.hadrons.org/cgit/debian/pkgs/pciutils.git/tree/debian/patches/00-configure-hurd.patch
-
-From e39a3af22501234a91cf28e8c57b45f9379f9101 Mon Sep 17 00:00:00 2001
-From: Damien Zammit <damien@zamaudio.com>
-Date: Fri, 26 Oct 2018 09:24:04 -0400
-Subject: [PATCH 2/2] Add ability to detect GNU/Hurd when configuring
-
----
- lib/configure |    6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/lib/configure
-+++ b/lib/configure
-@@ -25,7 +25,7 @@ if [ -z "$HOST" ] ; then
- 		proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
- 		cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
- 	else
--		cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`
-+		cpu=`uname -m | sed 's/^i.86-AT386/i386/;s/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`
- 	fi
- 	if [ "$sys" = "DragonFly" ]
- 	then
-@@ -39,6 +39,10 @@ if [ -z "$HOST" ] ; then
- 	then
- 		sys=cygwin
- 	fi
-+	if [ "$sys" = "GNU" ]
-+	then
-+		sys=gnu
-+	fi
- 	HOST=${3:-$cpu-$sys}
- fi
- [ -n "$RELEASE" ] && rel="${RELEASE}"
diff --git a/gnu/packages/patches/pciutils-hurd-fix.patch b/gnu/packages/patches/pciutils-hurd-fix.patch
deleted file mode 100644
index f1979d4352..0000000000
--- a/gnu/packages/patches/pciutils-hurd-fix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix a build error on GNU/Hurd for pciutils 3.7.0.
-
-commit 053cf6c8b2acafadf828912828336d90fe9b8696
-Author: Martin Mares <mj@ucw.cz>
-Date:   Sun May 31 11:53:28 2020 +0200
-
-    HURD backend should compile again
-    
-    Fixes a bug introduced by commit 82c06b47dea5a38075ce9d56f743360bc47b4c78.
-
-diff --git a/lib/hurd.c b/lib/hurd.c
-index 7b3b2ae..ccd92f6 100644
---- a/lib/hurd.c
-+++ b/lib/hurd.c
-@@ -307,7 +307,6 @@ hurd_fill_regions(struct pci_dev *d)
-       d->base_addr[i] |= regions[i].is_64 << 2;
-       d->base_addr[i] |= regions[i].is_prefetchable << 3;
- 
--      if (flags & PCI_FILL_SIZES)
--	d->size[i] = regions[i].size;
-+      d->size[i] = regions[i].size;
-     }
- }
diff --git a/gnu/packages/patches/procps-strtod-test.patch b/gnu/packages/patches/procps-strtod-test.patch
new file mode 100644
index 0000000000..db1cee320e
--- /dev/null
+++ b/gnu/packages/patches/procps-strtod-test.patch
@@ -0,0 +1,36 @@
+See https://gitlab.com/procps-ng/procps/-/issues/271
+
+diff -u -r procps-ng-4.0.3.alt/src/tests/test_strtod_nol.c procps-ng-4.0.3/src/tests/test_strtod_nol.c
+--- procps-ng-4.0.3.alt/src/tests/test_strtod_nol.c	2022-12-18 23:44:18.383960834 +0100
++++ procps-ng-4.0.3/src/tests/test_strtod_nol.c	2023-03-20 16:52:26.680032658 +0100
+@@ -1,6 +1,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include "strutils.h"
+ 
+ struct strtod_tests {
+@@ -25,6 +26,11 @@
+     {NULL, 0.0}
+ };
+ 
++#define EPSILON 1.0  // Really not trying for precision here
++int dequal(const double d1, const double d2)
++{
++    return fabs(d1-d2) < EPSILON;
++}
+ 
+ 
+ int main(int argc, char *argv[])
+@@ -33,8 +39,8 @@
+     double val;
+ 
+     for(i=0; tests[i].string != NULL; i++) {
+-        if(strtod_nol_or_err(tests[i].string, "Cannot parse number") !=
+-           tests[i].result) {
++        if(!dequal (strtod_nol_or_err(tests[i].string, "Cannot parse number"),
++                    tests[i].result)) {
+             fprintf(stderr, "FAIL: strtod_nol_or_err(\"%s\") != %f\n",
+                     tests[i].string, tests[i].result);
+             return EXIT_FAILURE;
diff --git a/gnu/packages/patches/python-2.7-expat-compat.patch b/gnu/packages/patches/python-2.7-expat-compat.patch
new file mode 100644
index 0000000000..9cbdf8bd6a
--- /dev/null
+++ b/gnu/packages/patches/python-2.7-expat-compat.patch
@@ -0,0 +1,59 @@
+Fix test failure with newer Expat:
+
+  https://bugs.python.org/issue46811
+
+This is a backport of this upstream commit:
+
+  https://github.com/python/cpython/commit/2cae93832f46b245847bdc252456ddf7742ef45e
+
+diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
+index 2eb642395b..1793f9365d 100644
+--- a/Lib/test/test_minidom.py
++++ b/Lib/test/test_minidom.py
+@@ -6,12 +6,14 @@ from StringIO import StringIO
+ from test import support
+ import unittest
+ 
++import pyexpat
+ import xml.dom
+ import xml.dom.minidom
+ import xml.parsers.expat
+ 
+ from xml.dom.minidom import parse, Node, Document, parseString
+ from xml.dom.minidom import getDOMImplementation
++from xml.parsers.expat import ExpatError
+ 
+ 
+ tstfile = support.findfile("test.xml", subdir="xmltestdata")
+@@ -1051,7 +1053,13 @@ class MinidomTest(unittest.TestCase):
+ 
+         # Verify that character decoding errors raise exceptions instead
+         # of crashing
+-        self.assertRaises(UnicodeDecodeError, parseString,
++        if pyexpat.version_info >= (2, 4, 5):
++            self.assertRaises(ExpatError, parseString,
++                    b'<fran\xe7ais></fran\xe7ais>')
++            self.assertRaises(ExpatError, parseString,
++                    b'<franais>Comment \xe7a va ? Tr\xe8s bien ?</franais>')
++        else:
++            self.assertRaises(UnicodeDecodeError, parseString,
+                 '<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>')
+ 
+         doc.unlink()
+diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
+index c75d55f05c..0855bc07ca 100644
+--- a/Lib/test/test_xml_etree.py
++++ b/Lib/test/test_xml_etree.py
+@@ -1482,12 +1482,6 @@ class BugsTest(unittest.TestCase):
+                 b"<?xml version='1.0' encoding='ascii'?>\n"
+                 b'<body>t&#227;g</body>')
+ 
+-    def test_issue3151(self):
+-        e = ET.XML('<prefix:localname xmlns:prefix="${stuff}"/>')
+-        self.assertEqual(e.tag, '{${stuff}}localname')
+-        t = ET.ElementTree(e)
+-        self.assertEqual(ET.tostring(e), b'<ns0:localname xmlns:ns0="${stuff}" />')
+-
+     def test_issue6565(self):
+         elem = ET.XML("<body><tag/></body>")
+         self.assertEqual(summarize_list(elem), ['tag'])
diff --git a/gnu/packages/patches/python-3-fix-tests.patch b/gnu/packages/patches/python-3-fix-tests.patch
index b44e743c71..d31af35630 100644
--- a/gnu/packages/patches/python-3-fix-tests.patch
+++ b/gnu/packages/patches/python-3-fix-tests.patch
@@ -6,34 +6,12 @@ Subject: [PATCH] Skip problematic Python 3 tests in Guix.
 A subset of the hunks in this patch is tracked upstream at
 https://bugs.python.org/issue38845, which was contributed by Tanguy Le
 Carrour <tanguy@bioneland.org>.
----
- Lib/ctypes/test/test_callbacks.py         | 3 +++
- Lib/ctypes/test/test_find.py              | 1 +
- Lib/ctypes/test/test_libc.py              | 3 +++
- Lib/distutils/tests/test_archive_util.py  | 2 ++
- Lib/distutils/tests/test_sdist.py         | 1 +
- Lib/test/_test_multiprocessing.py         | 2 ++
- Lib/test/test_asyncio/test_base_events.py | 2 ++
- Lib/test/test_generators.py               | 1 +
- Lib/test/test_pathlib.py                  | 3 +--
- Lib/test/test_pdb.py                      | 4 ++--
- Lib/test/test_regrtest.py                 | 2 ++
- Lib/test/test_resource.py                 | 1 +
- Lib/test/test_shutil.py                   | 2 ++
- Lib/test/test_signal.py                   | 4 ++++
- Lib/test/test_socket.py                   | 8 ++++++++
- Lib/test/test_spwd.py                     | 6 ++----
- Lib/test/test_tarfile.py                  | 9 ++++++---
- Lib/test/test_threading.py                | 3 +++
- Lib/test/test_unicodedata.py              | 1 +
- Tools/scripts/run_tests.py                | 2 +-
- 20 files changed, 48 insertions(+), 12 deletions(-)
 
 diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py
 index d8e9c5a760..94fc5929c9 100644
 --- a/Lib/ctypes/test/test_callbacks.py
 +++ b/Lib/ctypes/test/test_callbacks.py
-@@ -5,6 +5,7 @@ from test import support
+@@ -5,6 +5,7 @@
  from ctypes import *
  from ctypes.test import need_symbol
  import _ctypes_test
@@ -41,7 +19,7 @@ index d8e9c5a760..94fc5929c9 100644
  
  class Callbacks(unittest.TestCase):
      functype = CFUNCTYPE
-@@ -178,6 +179,8 @@ class SampleCallbacksTestCase(unittest.TestCase):
+@@ -178,6 +179,8 @@ def func(x):
  
          self.assertLess(diff, 0.01, "%s not less than 0.01" % diff)
  
@@ -51,10 +29,10 @@ index d8e9c5a760..94fc5929c9 100644
          from ctypes.util import find_library
          libc_path = find_library("c")
 diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
-index 92ac1840ad..c8eb75dedd 100644
+index 1ff9d019b1..5194954914 100644
 --- a/Lib/ctypes/test/test_find.py
 +++ b/Lib/ctypes/test/test_find.py
-@@ -116,6 +116,7 @@ class FindLibraryLinux(unittest.TestCase):
+@@ -117,6 +117,7 @@ def test_find_library_with_gcc(self):
          with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None):
              self.assertNotEqual(find_library('c'), None)
  
@@ -66,7 +44,7 @@ diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py
 index 56285b5ff8..c088ab3db8 100644
 --- a/Lib/ctypes/test/test_libc.py
 +++ b/Lib/ctypes/test/test_libc.py
-@@ -2,6 +2,7 @@ import unittest
+@@ -2,6 +2,7 @@
  
  from ctypes import *
  import _ctypes_test
@@ -74,7 +52,7 @@ index 56285b5ff8..c088ab3db8 100644
  
  lib = CDLL(_ctypes_test.__file__)
  
-@@ -17,6 +18,8 @@ class LibTest(unittest.TestCase):
+@@ -17,6 +18,8 @@ def test_sqrt(self):
          import math
          self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
  
@@ -84,10 +62,10 @@ index 56285b5ff8..c088ab3db8 100644
          comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char))
          lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc
 diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
-index e9aad0e40f..8bbaa51ee5 100644
+index edcec2513e..a716150763 100644
 --- a/Lib/distutils/tests/test_archive_util.py
 +++ b/Lib/distutils/tests/test_archive_util.py
-@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
+@@ -335,6 +335,7 @@ def test_make_archive_xztar(self):
          self.assertEqual(os.path.basename(res), 'archive.tar.xz')
          self.assertEqual(self._tarinfo(res), self._created_files)
  
@@ -95,7 +73,7 @@ index e9aad0e40f..8bbaa51ee5 100644
      def test_make_archive_owner_group(self):
          # testing make_archive with owner and group, with various combinations
          # this works even if there's not gid/uid support
-@@ -362,6 +363,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
+@@ -364,6 +365,7 @@ def test_make_archive_owner_group(self):
  
      @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib")
      @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
@@ -104,10 +82,10 @@ index e9aad0e40f..8bbaa51ee5 100644
          tmpdir =  self._create_files()
          base_name = os.path.join(self.mkdtemp(), 'archive')
 diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py
-index 23db126959..6e2329df7d 100644
+index 752e9db5ba..c66b6323e4 100644
 --- a/Lib/distutils/tests/test_sdist.py
 +++ b/Lib/distutils/tests/test_sdist.py
-@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase):
+@@ -444,6 +444,7 @@ def test_manual_manifest(self):
                       "The tar command is not found")
      @unittest.skipIf(find_executable('gzip') is None,
                       "The gzip command is not found")
@@ -116,10 +94,10 @@ index 23db126959..6e2329df7d 100644
          # now building a sdist
          dist, cmd = self.get_cmd()
 diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
-index e47905c863..31a5a9c308 100644
+index 8dced90c53..59947e3023 100644
 --- a/Lib/test/_test_multiprocessing.py
 +++ b/Lib/test/_test_multiprocessing.py
-@@ -1577,6 +1577,7 @@ class _TestCondition(BaseTestCase):
+@@ -1589,6 +1589,7 @@ def _test_wait_result(cls, c, pid):
          if pid is not None:
              os.kill(pid, signal.SIGINT)
  
@@ -127,7 +105,7 @@ index e47905c863..31a5a9c308 100644
      def test_wait_result(self):
          if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
              pid = os.getpid()
-@@ -3905,6 +3906,7 @@ class _TestSharedMemory(BaseTestCase):
+@@ -4008,6 +4009,7 @@ def test_shared_memory_across_processes(self):
          sms.close()
  
      @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
@@ -136,10 +114,10 @@ index e47905c863..31a5a9c308 100644
          # bpo-36368: protect SharedMemoryManager server process from
          # KeyboardInterrupt signals.
 diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
-index 533d5cc7f5..c4f860cc3b 100644
+index d77bf95a7b..79912c8230 100644
 --- a/Lib/test/test_asyncio/test_base_events.py
 +++ b/Lib/test/test_asyncio/test_base_events.py
-@@ -1341,6 +1341,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
+@@ -1359,6 +1359,8 @@ def test_create_connection_no_inet_pton(self, m_socket):
          self._test_create_connection_ip_addr(m_socket, False)
  
      @patch_socket
@@ -149,10 +127,10 @@ index 533d5cc7f5..c4f860cc3b 100644
          m_socket.getaddrinfo = socket.getaddrinfo
          sock = m_socket.socket.return_value
 diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
-index 3bf1522808..04bac8a7db 100644
+index 3bf5f3b743..23368c8d8b 100644
 --- a/Lib/test/test_generators.py
 +++ b/Lib/test/test_generators.py
-@@ -33,6 +33,7 @@ class SignalAndYieldFromTest(unittest.TestCase):
+@@ -33,6 +33,7 @@ def generator2(self):
          else:
              return "FAILED"
  
@@ -161,42 +139,40 @@ index 3bf1522808..04bac8a7db 100644
          gen = self.generator1()
          gen.send(None)
 diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
-index 3da35710b9..5404f9193d 100644
+index bf3fc5fb24..21015403f3 100644
 --- a/Lib/test/test_pathlib.py
 +++ b/Lib/test/test_pathlib.py
-@@ -2408,8 +2408,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
-         self.assertEqual(given, expect)
-         self.assertEqual(set(p.rglob("FILEd*")), set())
- 
--    @unittest.skipUnless(hasattr(pwd, 'getpwall'),
--                         'pwd module does not expose getpwall()')
+@@ -2546,6 +2546,7 @@ def test_rglob(self):
+                          'pwd module does not expose getpwall()')
+     @unittest.skipIf(sys.platform == "vxworks",
+                      "no home directory on VxWorks")
 +    @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests")
      def test_expanduser(self):
          P = self.cls
-         support.import_module('pwd')
+         import_helper.import_module('pwd')
 diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
-index 8016f81e5a..10190486b4 100644
+index 6ac1a4a3c3..4f58cf9b40 100644
 --- a/Lib/test/test_pdb.py
 +++ b/Lib/test/test_pdb.py
-@@ -1219,11 +1219,11 @@ def test_pdb_issue_20766():
+@@ -1315,11 +1315,11 @@ def test_pdb_issue_20766():
      > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
      -> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
      (Pdb) continue
 -    pdb 1: <built-in function default_int_handler>
 +    pdb 1: Handlers.SIG_IGN
-     > <doctest test.test_pdb.test_pdb_issue_20766[0]>(5)test_function()
-     -> sess.set_trace(sys._getframe())
+     > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
+     -> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
      (Pdb) continue
 -    pdb 2: <built-in function default_int_handler>
 +    pdb 2: Handlers.SIG_IGN
      """
  
- 
+ def test_pdb_issue_43318():
 diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
-index a77638b10a..2069b349a8 100644
+index 62e6c28280..7ffee56635 100644
 --- a/Lib/test/test_regrtest.py
 +++ b/Lib/test/test_regrtest.py
-@@ -811,6 +811,7 @@ class ArgsTestCase(BaseTestCase):
+@@ -810,6 +810,7 @@ def test_fromfile(self):
          output = self.run_tests('--fromfile', filename)
          self.check_executed_tests(output, tests)
  
@@ -204,7 +180,7 @@ index a77638b10a..2069b349a8 100644
      def test_interrupted(self):
          code = TEST_INTERRUPTED
          test = self.create_test('sigint', code=code)
-@@ -828,6 +829,7 @@ class ArgsTestCase(BaseTestCase):
+@@ -827,6 +828,7 @@ def test_slowest(self):
                   % (self.TESTNAME_REGEX, len(tests)))
          self.check_line(output, regex)
  
@@ -213,10 +189,10 @@ index a77638b10a..2069b349a8 100644
          # Issue #25373: test --slowest with an interrupted test
          code = TEST_INTERRUPTED
 diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
-index e5ece5284c..5299e54507 100644
+index f2642c6ba1..4358a20dae 100644
 --- a/Lib/test/test_resource.py
 +++ b/Lib/test/test_resource.py
-@@ -148,6 +148,7 @@ class ResourceTest(unittest.TestCase):
+@@ -150,6 +150,7 @@ def test_freebsd_contants(self):
  
      @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
      @support.requires_linux_version(2, 6, 36)
@@ -225,10 +201,10 @@ index e5ece5284c..5299e54507 100644
          self.assertRaises(TypeError, resource.prlimit)
          self.assertRaises(ProcessLookupError, resource.prlimit,
 diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
-index e19af64be0..1b893df6fa 100644
+index 62e9180375..3eda176fa3 100644
 --- a/Lib/test/test_shutil.py
 +++ b/Lib/test/test_shutil.py
-@@ -1427,6 +1427,7 @@ class TestArchives(BaseTest, unittest.TestCase):
+@@ -1497,6 +1497,7 @@ def test_make_archive(self):
          base_name = os.path.join(tmpdir, 'archive')
          self.assertRaises(ValueError, make_archive, base_name, 'xxx')
  
@@ -236,7 +212,7 @@ index e19af64be0..1b893df6fa 100644
      @support.requires_zlib()
      def test_make_archive_owner_group(self):
          # testing make_archive with owner and group, with various combinations
-@@ -1455,6 +1456,7 @@ class TestArchives(BaseTest, unittest.TestCase):
+@@ -1525,6 +1526,7 @@ def test_make_archive_owner_group(self):
          self.assertTrue(os.path.isfile(res))
  
  
@@ -245,10 +221,10 @@ index e19af64be0..1b893df6fa 100644
      @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
      def test_tarfile_root_owner(self):
 diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
-index 45553a6a42..55623f01a3 100644
+index c2b5861fc3..3c7a9c42cb 100644
 --- a/Lib/test/test_signal.py
 +++ b/Lib/test/test_signal.py
-@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
+@@ -89,6 +89,7 @@ def test_valid_signals(self):
          self.assertLess(len(s), signal.NSIG)
  
      @unittest.skipUnless(sys.executable, "sys.executable required.")
@@ -256,7 +232,7 @@ index 45553a6a42..55623f01a3 100644
      def test_keyboard_interrupt_exit_code(self):
          """KeyboardInterrupt triggers exit via SIGINT."""
          process = subprocess.run(
-@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
+@@ -139,6 +140,7 @@ def test_issue9324(self):
              signal.signal(7, handler)
  
      @unittest.skipUnless(sys.executable, "sys.executable required.")
@@ -264,7 +240,7 @@ index 45553a6a42..55623f01a3 100644
      def test_keyboard_interrupt_exit_code(self):
          """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
          # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
-@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
+@@ -1322,6 +1324,7 @@ def cycle_handlers():
  
  class RaiseSignalTest(unittest.TestCase):
  
@@ -272,7 +248,7 @@ index 45553a6a42..55623f01a3 100644
      def test_sigint(self):
          with self.assertRaises(KeyboardInterrupt):
              signal.raise_signal(signal.SIGINT)
-@@ -1275,6 +1278,7 @@ class RaiseSignalTest(unittest.TestCase):
+@@ -1352,6 +1355,7 @@ def handler(a, b):
  
  class PidfdSignalTest(unittest.TestCase):
  
@@ -281,10 +257,10 @@ index 45553a6a42..55623f01a3 100644
          hasattr(signal, "pidfd_send_signal"),
          "pidfd support not built in",
 diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
-index aefba4f397..6c89f558d5 100755
+index 9c5f6d3dc9..ef74fc5694 100644
 --- a/Lib/test/test_socket.py
 +++ b/Lib/test/test_socket.py
-@@ -1009,6 +1009,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1006,6 +1006,8 @@ def testHostnameRes(self):
          if not fqhn in all_host_names:
              self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))
  
@@ -293,16 +269,16 @@ index aefba4f397..6c89f558d5 100755
      def test_host_resolution(self):
          for addr in [socket_helper.HOSTv4, '10.0.0.1', '255.255.255.255']:
              self.assertEqual(socket.gethostbyname(addr), addr)
-@@ -1140,6 +1142,8 @@ class GeneralModuleTests(unittest.TestCase):
-             self.assertWarns(DeprecationWarning, socket.ntohs, k)
-             self.assertWarns(DeprecationWarning, socket.htons, k)
+@@ -1136,6 +1138,8 @@ def testNtoHErrors(self):
+             self.assertRaises(OverflowError, socket.ntohl, k)
+             self.assertRaises(OverflowError, socket.htonl, k)
  
 +    @unittest.skipUnless(os.path.exists("/etc/services"),
 +                         "getservbyname uses /etc/services, which is not in the chroot")
      def testGetServBy(self):
          eq = self.assertEqual
          # Find one service that exists, then check all the related interfaces.
-@@ -1489,6 +1493,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1485,6 +1489,8 @@ def test_sio_loopback_fast_path(self):
              raise
          self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
  
@@ -311,7 +287,7 @@ index aefba4f397..6c89f558d5 100755
      def testGetaddrinfo(self):
          try:
              socket.getaddrinfo('localhost', 80)
-@@ -1571,6 +1577,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1567,6 +1573,8 @@ def test_getnameinfo(self):
          # only IP addresses are allowed
          self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0)
  
@@ -321,11 +297,11 @@ index aefba4f397..6c89f558d5 100755
                           'network is not enabled')
      def test_idna(self):
 diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
-index 07793c84c8..fec672bcbe 100644
+index a143acc659..f7207887c0 100644
 --- a/Lib/test/test_spwd.py
 +++ b/Lib/test/test_spwd.py
-@@ -5,8 +5,7 @@ from test import support
- spwd = support.import_module('spwd')
+@@ -6,8 +6,7 @@
+ spwd = import_helper.import_module('spwd')
  
  
 -@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0,
@@ -334,7 +310,7 @@ index 07793c84c8..fec672bcbe 100644
  class TestSpwdRoot(unittest.TestCase):
  
      def test_getspall(self):
-@@ -56,8 +55,7 @@ class TestSpwdRoot(unittest.TestCase):
+@@ -57,8 +56,7 @@ def test_getspnam(self):
              self.assertRaises(TypeError, spwd.getspnam, bytes_name)
  
  
@@ -345,10 +321,10 @@ index 07793c84c8..fec672bcbe 100644
  
      def test_getspnam_exception(self):
 diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
-index 29cde91bf7..8d0f20e8bf 100644
+index c658cca7a7..b7188e411e 100644
 --- a/Lib/test/test_tarfile.py
 +++ b/Lib/test/test_tarfile.py
-@@ -2607,9 +2607,12 @@ def root_is_uid_gid_0():
+@@ -2737,9 +2737,12 @@ def root_is_uid_gid_0():
          import pwd, grp
      except ImportError:
          return False
@@ -365,18 +341,18 @@ index 29cde91bf7..8d0f20e8bf 100644
      return True
  
 diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
-index c21cdf8eb7..6c9d575032 100644
+index c54806e594..d9bbca4e6a 100644
 --- a/Lib/test/test_threading.py
 +++ b/Lib/test/test_threading.py
-@@ -1398,6 +1398,7 @@ class MiscTestCase(unittest.TestCase):
- 
+@@ -1620,6 +1620,7 @@ def check_interrupt_main_noerror(self, signum):
+             # Restore original handler
+             signal.signal(signum, handler)
  
- class InterruptMainTests(unittest.TestCase):
 +    @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.')
      def test_interrupt_main_subthread(self):
          # Calling start_new_thread with a function that executes interrupt_main
          # should raise KeyboardInterrupt upon completion.
-@@ -1409,6 +1410,8 @@ class InterruptMainTests(unittest.TestCase):
+@@ -1631,6 +1632,8 @@ def call_interrupt():
              t.join()
          t.join()
  
@@ -386,10 +362,10 @@ index c21cdf8eb7..6c9d575032 100644
          # Make sure that if interrupt_main is called in main thread that
          # KeyboardInterrupt is raised instantly.
 diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
-index b552d2bd17..28b1144e15 100644
+index 213b3cf252..a5edd4a119 100644
 --- a/Lib/test/test_unicodedata.py
 +++ b/Lib/test/test_unicodedata.py
-@@ -309,6 +309,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
+@@ -315,6 +315,7 @@ def test_linebreak_7643(self):
                  self.assertEqual(len(lines), 1,
                                   r"\u%.4x should not be a linebreak" % i)
  
@@ -398,10 +374,10 @@ index b552d2bd17..28b1144e15 100644
      @staticmethod
      def check_version(testfile):
 diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
-index bcfa5e943b..1f2484971b 100644
+index 48feb3f778..e82cafc88a 100644
 --- a/Tools/scripts/run_tests.py
 +++ b/Tools/scripts/run_tests.py
-@@ -41,7 +41,7 @@ def main(regrtest_args):
+@@ -40,7 +40,7 @@ def main(regrtest_args):
      if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
          args.extend(['-j', '0'])  # Use all CPU cores
      if not any(is_resource_use_flag(arg) for arg in regrtest_args):
@@ -410,6 +386,3 @@ index bcfa5e943b..1f2484971b 100644
      args.extend(regrtest_args)
      print(' '.join(args))
      if sys.platform == 'win32':
--- 
-2.29.2
-
diff --git a/gnu/packages/patches/python-3-no-static-lib.patch b/gnu/packages/patches/python-3-no-static-lib.patch
deleted file mode 100644
index b44dbc976c..0000000000
--- a/gnu/packages/patches/python-3-no-static-lib.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: David Malcolm <dmalcolm@redhat.com>
-Date: Mon, 18 Jan 2010 17:59:07 +0000
-Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Downstream only: not appropriate for upstream.
-
-See https://bugzilla.redhat.com/show_bug.cgi?id=556092
-
-Co-authored-by: David Malcolm <dmalcolm@redhat.com>
-Co-authored-by: Bohuslav Kabrda <bkabrda@redhat.com>
-Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
-Co-authored-by: Robert Kuska <rkuska@redhat.com>
-Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
-Co-authored-by: Miro Hrončok <miro@hroncok.cz>
----
- Makefile.pre.in | 21 ++-------------------
- 1 file changed, 2 insertions(+), 19 deletions(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 0c3981c132..5587422ec7 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -589,7 +589,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
- 	$(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
- 
- # Build the interpreter
--$(BUILDPYTHON):	Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
-+$(BUILDPYTHON):	Programs/python.o $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
- 	$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
- 
- platform: $(BUILDPYTHON) pybuilddir.txt
-@@ -637,12 +637,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
- 		_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
- 		$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
- 
--
--# Build static library
--$(LIBRARY): $(LIBRARY_OBJS)
--	-rm -f $@
--	$(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
--
- libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
- 	if test $(INSTSONAME) != $(LDLIBRARY); then \
- 		$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
-@@ -724,7 +718,7 @@ Makefile Modules/config.c: Makefile.pre \
- 	@echo "The Makefile was updated, you may need to re-run make."
- 
- 
--Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
-+Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
- 	$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
- 
- ############################################################################
-@@ -1652,17 +1646,6 @@ libainstall:	@DEF_MAKE_RULE@ python-config
- 		else	true; \
- 		fi; \
- 	done
--	@if test -d $(LIBRARY); then :; else \
--		if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
--			if test "$(SHLIB_SUFFIX)" = .dll; then \
--				$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
--			else \
--				$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
--			fi; \
--		else \
--			echo Skip install of $(LIBRARY) - use make frameworkinstall; \
--		fi; \
--	fi
- 	$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- 	$(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
- 	$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
diff --git a/gnu/packages/patches/python-feedparser-missing-import.patch b/gnu/packages/patches/python-feedparser-missing-import.patch
new file mode 100644
index 0000000000..6ed504c1d2
--- /dev/null
+++ b/gnu/packages/patches/python-feedparser-missing-import.patch
@@ -0,0 +1,34 @@
+Since feedparser messes with Python’s internals by assigning
+to __code__ it needs to import SGMLParseError too. It also
+expects SGMLParseError, which was turned into AssertionError by
+https://github.com/python/cpython/commit/e34bbfd61f405eef89e8aa50672b0b25022de320
+
+--- feedparser-6.0.10/feedparser/sgml.py.orig	2023-03-18 09:24:50.976316932 +0100
++++ feedparser-6.0.10/feedparser/sgml.py	2023-03-18 09:26:32.971928811 +0100
+@@ -28,6 +28,7 @@
+ import re
+ 
+ import sgmllib
++from sgmllib import SGMLParseError
+ 
+ __all__ = [
+     'sgmllib',
+@@ -41,6 +42,7 @@
+     'shorttagopen',
+     'starttagopen',
+     'endbracket',
++    'SGMLParseError',
+ ]
+ 
+ # sgmllib defines a number of module-level regular expressions that are
+--- feedparser-6.0.10/feedparser/html.py.orig	2023-03-18 09:32:03.647114745 +0100
++++ feedparser-6.0.10/feedparser/html.py	2023-03-18 09:46:05.021142671 +0100
+@@ -349,7 +349,7 @@
+ 
+         try:
+             return sgmllib.SGMLParser.parse_declaration(self, i)
+-        except sgmllib.SGMLParseError:
++        except AssertionError:
+             # Escape the doctype declaration and continue parsing.
+             self.handle_data('&lt;')
+             return i+1
diff --git a/gnu/packages/patches/python-parso-unit-tests-in-3.10.patch b/gnu/packages/patches/python-parso-unit-tests-in-3.10.patch
new file mode 100644
index 0000000000..1fc7fb701b
--- /dev/null
+++ b/gnu/packages/patches/python-parso-unit-tests-in-3.10.patch
@@ -0,0 +1,186 @@
+Patch from python-parso upstream.
+
+From cf5969d7a109798adbf9538d70e92138f077d700 Mon Sep 17 00:00:00 2001
+From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
+Date: Sun, 4 Dec 2022 13:29:25 +0100
+Subject: [PATCH 1/7] Fix unit tests in Python 3.10 (Closes: #192)
+
+---
+ parso/python/errors.py     | 51 ++++++++++++++++++++++++++++++--------
+ test/test_python_errors.py | 23 +++++++++++++++++
+ 2 files changed, 64 insertions(+), 10 deletions(-)
+
+diff --git a/parso/python/errors.py b/parso/python/errors.py
+index 5da046a..09c5047 100644
+--- a/parso/python/errors.py
++++ b/parso/python/errors.py
+@@ -1,5 +1,6 @@
+ # -*- coding: utf-8 -*-
+ import codecs
++import sys
+ import warnings
+ import re
+ from contextlib import contextmanager
+@@ -33,7 +34,10 @@ def _get_rhs_name(node, version):
+                 return "literal"
+             else:
+                 if second.children[1] == ":" or second.children[0] == "**":
+-                    return "dict display"
++                    if version < (3, 10):
++                        return "dict display"
++                    else:
++                        return "dict literal"
+                 else:
+                     return "set display"
+         elif (
+@@ -47,7 +51,10 @@ def _get_rhs_name(node, version):
+         elif first == "[":
+             return "list"
+         elif first == "{" and second == "}":
+-            return "dict display"
++            if version < (3, 10):
++                return "dict display"
++            else:
++                return "dict literal"
+         elif first == "{" and len(node.children) > 2:
+             return "set display"
+     elif type_ == "keyword":
+@@ -58,7 +65,10 @@ def _get_rhs_name(node, version):
+         else:
+             return str(node.value)
+     elif type_ == "operator" and node.value == "...":
+-        return "Ellipsis"
++        if version < (3, 10):
++            return "Ellipsis"
++        else:
++            return "ellipsis"
+     elif type_ == "comparison":
+         return "comparison"
+     elif type_ in ("string", "number", "strings"):
+@@ -83,7 +93,10 @@ def _get_rhs_name(node, version):
+         or "_test" in type_
+         or type_ in ("term", "factor")
+     ):
+-        return "operator"
++        if version < (3, 10):
++            return "operator"
++        else:
++            return "expression"
+     elif type_ == "star_expr":
+         return "starred"
+     elif type_ == "testlist_star_expr":
+@@ -610,7 +623,10 @@ class _NameChecks(SyntaxRule):
+ 
+ @ErrorFinder.register_rule(type='string')
+ class _StringChecks(SyntaxRule):
+-    message = "bytes can only contain ASCII literal characters."
++    if sys.version_info < (3, 10):
++        message = "bytes can only contain ASCII literal characters."
++    else:
++        message = "bytes can only contain ASCII literal characters"
+ 
+     def is_issue(self, leaf):
+         string_prefix = leaf.string_prefix.lower()
+@@ -1043,14 +1059,20 @@ class _CheckAssignmentRule(SyntaxRule):
+                         error = 'literal'
+                     else:
+                         if second.children[1] == ':':
+-                            error = 'dict display'
++                            if self._normalizer.version < (3, 10):
++                                error = 'dict display'
++                            else:
++                                error = 'dict literal'
+                         else:
+                             error = 'set display'
+                 elif first == "{" and second == "}":
+                     if self._normalizer.version < (3, 8):
+                         error = 'literal'
+                     else:
+-                        error = "dict display"
++                        if self._normalizer.version < (3, 10):
++                            error = "dict display"
++                        else:
++                            error = "dict literal"
+                 elif first == "{" and len(node.children) > 2:
+                     if self._normalizer.version < (3, 8):
+                         error = 'literal'
+@@ -1083,7 +1105,10 @@ class _CheckAssignmentRule(SyntaxRule):
+                 error = str(node.value)
+         elif type_ == 'operator':
+             if node.value == '...':
+-                error = 'Ellipsis'
++                if self._normalizer.version < (3, 10):
++                    error = 'Ellipsis'
++                else:
++                    error = 'ellipsis'
+         elif type_ == 'comparison':
+             error = 'comparison'
+         elif type_ in ('string', 'number', 'strings'):
+@@ -1098,7 +1123,10 @@ class _CheckAssignmentRule(SyntaxRule):
+             if node.children[0] == 'await':
+                 error = 'await expression'
+             elif node.children[-2] == '**':
+-                error = 'operator'
++                if self._normalizer.version < (3, 10):
++                    error = 'operator'
++                else:
++                    error = 'expression'
+             else:
+                 # Has a trailer
+                 trailer = node.children[-1]
+@@ -1120,7 +1148,10 @@ class _CheckAssignmentRule(SyntaxRule):
+         elif ('expr' in type_ and type_ != 'star_expr'  # is a substring
+               or '_test' in type_
+               or type_ in ('term', 'factor')):
+-            error = 'operator'
++            if self._normalizer.version < (3, 10):
++                error = 'operator'
++            else:
++                error = 'expression'
+         elif type_ == "star_expr":
+             if is_deletion:
+                 if self._normalizer.version >= (3, 9):
+diff --git a/test/test_python_errors.py b/test/test_python_errors.py
+index adf5f06..9686d14 100644
+--- a/test/test_python_errors.py
++++ b/test/test_python_errors.py
+@@ -1,6 +1,7 @@
+ """
+ Testing if parso finds syntax errors and indentation errors.
+ """
++import re
+ import sys
+ import warnings
+ 
+@@ -136,6 +137,28 @@ def _get_actual_exception(code):
+         wanted = 'SyntaxError: invalid syntax'
+     elif wanted == "SyntaxError: f-string: single '}' is not allowed":
+         wanted = 'SyntaxError: invalid syntax'
++    elif "Maybe you meant '==' instead of '='?" in wanted:
++        wanted = wanted.removesuffix(" here. Maybe you meant '==' instead of '='?")
++    elif re.match(
++        r"SyntaxError: unterminated string literal \(detected at line \d+\)", wanted
++    ):
++        wanted = "SyntaxError: EOL while scanning string literal"
++    elif re.match(
++        r"SyntaxError: unterminated triple-quoted string literal \(detected at line \d+\)",
++        wanted,
++    ):
++        wanted = 'SyntaxError: EOF while scanning triple-quoted string literal'
++    elif wanted == 'SyntaxError: cannot use starred expression here':
++        wanted = "SyntaxError: can't use starred expression here"
++    elif wanted == 'SyntaxError: f-string: cannot use starred expression here':
++        wanted = "SyntaxError: f-string: can't use starred expression here"
++    elif re.match(
++        r"IndentationError: expected an indented block after '[^']*' statement on line \d",
++        wanted,
++    ):
++        wanted = 'IndentationError: expected an indented block'
++    elif wanted == 'SyntaxError: unterminated string literal':
++        wanted = 'SyntaxError: EOL while scanning string literal'
+     return [wanted], line_nr
+ 
+ 
+-- 
+2.39.1
+
diff --git a/gnu/packages/patches/python-sgmllib3k-assertions.patch b/gnu/packages/patches/python-sgmllib3k-assertions.patch
new file mode 100644
index 0000000000..872f1c62c9
--- /dev/null
+++ b/gnu/packages/patches/python-sgmllib3k-assertions.patch
@@ -0,0 +1,221 @@
+Restores compatibility with Python >=3.9,
+which removed the custom .error() method in
+https://github.com/python/cpython/commit/e34bbfd61f405eef89e8aa50672b0b25022de320
+
+Despite the big diff, only a try…except clause is added.
+
+--- source/sgmllib.py	2023-03-18 08:57:58.726240606 +0100
++++ source/sgmllib.py	2023-03-18 09:02:01.667568916 +0100
+@@ -101,113 +101,116 @@
+         """Handle the remaining data."""
+         self.goahead(1)
+ 
+-    def error(self, message):
+-        raise SGMLParseError(message)
+-
+     # Internal -- handle data as far as reasonable.  May leave state
+     # and data to be processed by a subsequent call.  If 'end' is
+     # true, force handling all data as if followed by EOF marker.
+     def goahead(self, end):
+-        rawdata = self.rawdata
+-        i = 0
+-        n = len(rawdata)
+-        while i < n:
+-            if self.nomoretags:
+-                self.handle_data(rawdata[i:n])
+-                i = n
+-                break
+-            match = interesting.search(rawdata, i)
+-            if match: j = match.start()
+-            else: j = n
+-            if i < j:
+-                self.handle_data(rawdata[i:j])
+-            i = j
+-            if i == n: break
+-            if rawdata[i] == '<':
+-                if starttagopen.match(rawdata, i):
++        try:
++            rawdata = self.rawdata
++            i = 0
++            n = len(rawdata)
++            while i < n:
++                if self.nomoretags:
++                    self.handle_data(rawdata[i:n])
++                    i = n
++                    break
++                match = interesting.search(rawdata, i)
++                if match: j = match.start()
++                else: j = n
++                if i < j:
++                    self.handle_data(rawdata[i:j])
++                i = j
++                if i == n: break
++                if rawdata[i] == '<':
++                    if starttagopen.match(rawdata, i):
++                        if self.literal:
++                            self.handle_data(rawdata[i])
++                            i = i+1
++                            continue
++                        k = self.parse_starttag(i)
++                        if k < 0: break
++                        i = k
++                        continue
++                    if rawdata.startswith("</", i):
++                        k = self.parse_endtag(i)
++                        if k < 0: break
++                        i = k
++                        self.literal = 0
++                        continue
++                    if self.literal:
++                        if n > (i + 1):
++                            self.handle_data("<")
++                            i = i+1
++                        else:
++                            # incomplete
++                            break
++                        continue
++                    if rawdata.startswith("<!--", i):
++                            # Strictly speaking, a comment is --.*--
++                            # within a declaration tag <!...>.
++                            # This should be removed,
++                            # and comments handled only in parse_declaration.
++                        k = self.parse_comment(i)
++                        if k < 0: break
++                        i = k
++                        continue
++                    if rawdata.startswith("<?", i):
++                        k = self.parse_pi(i)
++                        if k < 0: break
++                        i = i+k
++                        continue
++                    if rawdata.startswith("<!", i):
++                        # This is some sort of declaration; in "HTML as
++                        # deployed," this should only be the document type
++                        # declaration ("<!DOCTYPE html...>").
++                        k = self.parse_declaration(i)
++                        if k < 0: break
++                        i = k
++                        continue
++                elif rawdata[i] == '&':
+                     if self.literal:
+                         self.handle_data(rawdata[i])
+                         i = i+1
+                         continue
+-                    k = self.parse_starttag(i)
+-                    if k < 0: break
+-                    i = k
+-                    continue
+-                if rawdata.startswith("</", i):
+-                    k = self.parse_endtag(i)
+-                    if k < 0: break
+-                    i = k
+-                    self.literal = 0
+-                    continue
+-                if self.literal:
+-                    if n > (i + 1):
+-                        self.handle_data("<")
+-                        i = i+1
+-                    else:
+-                        # incomplete
+-                        break
+-                    continue
+-                if rawdata.startswith("<!--", i):
+-                        # Strictly speaking, a comment is --.*--
+-                        # within a declaration tag <!...>.
+-                        # This should be removed,
+-                        # and comments handled only in parse_declaration.
+-                    k = self.parse_comment(i)
+-                    if k < 0: break
+-                    i = k
+-                    continue
+-                if rawdata.startswith("<?", i):
+-                    k = self.parse_pi(i)
+-                    if k < 0: break
+-                    i = i+k
+-                    continue
+-                if rawdata.startswith("<!", i):
+-                    # This is some sort of declaration; in "HTML as
+-                    # deployed," this should only be the document type
+-                    # declaration ("<!DOCTYPE html...>").
+-                    k = self.parse_declaration(i)
+-                    if k < 0: break
+-                    i = k
+-                    continue
+-            elif rawdata[i] == '&':
+-                if self.literal:
++                    match = charref.match(rawdata, i)
++                    if match:
++                        name = match.group(1)
++                        self.handle_charref(name)
++                        i = match.end(0)
++                        if rawdata[i-1] != ';': i = i-1
++                        continue
++                    match = entityref.match(rawdata, i)
++                    if match:
++                        name = match.group(1)
++                        self.handle_entityref(name)
++                        i = match.end(0)
++                        if rawdata[i-1] != ';': i = i-1
++                        continue
++                else:
++                    self.error('neither < nor & ??')
++                # We get here only if incomplete matches but
++                # nothing else
++                match = incomplete.match(rawdata, i)
++                if not match:
+                     self.handle_data(rawdata[i])
+                     i = i+1
+                     continue
+-                match = charref.match(rawdata, i)
+-                if match:
+-                    name = match.group(1)
+-                    self.handle_charref(name)
+-                    i = match.end(0)
+-                    if rawdata[i-1] != ';': i = i-1
+-                    continue
+-                match = entityref.match(rawdata, i)
+-                if match:
+-                    name = match.group(1)
+-                    self.handle_entityref(name)
+-                    i = match.end(0)
+-                    if rawdata[i-1] != ';': i = i-1
+-                    continue
+-            else:
+-                self.error('neither < nor & ??')
+-            # We get here only if incomplete matches but
+-            # nothing else
+-            match = incomplete.match(rawdata, i)
+-            if not match:
+-                self.handle_data(rawdata[i])
+-                i = i+1
+-                continue
+-            j = match.end(0)
+-            if j == n:
+-                break # Really incomplete
+-            self.handle_data(rawdata[i:j])
+-            i = j
+-        # end while
+-        if end and i < n:
+-            self.handle_data(rawdata[i:n])
+-            i = n
+-        self.rawdata = rawdata[i:]
+-        # XXX if end: check for empty stack
++                j = match.end(0)
++                if j == n:
++                    break # Really incomplete
++                self.handle_data(rawdata[i:j])
++                i = j
++            # end while
++            if end and i < n:
++                self.handle_data(rawdata[i:n])
++                i = n
++            self.rawdata = rawdata[i:]
++            # XXX if end: check for empty stack
++        except AssertionError as e:
++            # The .error() method, which threw the custom SGMLParseError was removed
++            # by https://github.com/python/cpython/issues/76025. So we have to catch
++            # _markupbase’s AssertionError and translate it into the old one.
++            raise SGMLParseError (e.args[0]) from e
+ 
+     # Extensions for the DOCTYPE scanner:
+     _decl_otherchars = '='
diff --git a/gnu/packages/patches/python-typeguard-python3.10.patch b/gnu/packages/patches/python-typeguard-python3.10.patch
new file mode 100644
index 0000000000..29321d8918
--- /dev/null
+++ b/gnu/packages/patches/python-typeguard-python3.10.patch
@@ -0,0 +1,47 @@
+Taken from Gentoo, which adapted
+https://github.com/agronholm/typeguard/commit/e0db07a777d5a481eaba6162354adf32286ce21b
+
+diff --git a/src/typeguard/__init__.py b/src/typeguard/__init__.py
+index 5684d63..27fa30b 100644
+--- a/src/typeguard/__init__.py
++++ b/src/typeguard/__init__.py
+@@ -61,22 +61,25 @@ except ImportError:
+     from typing import _ForwardRef as ForwardRef
+     evaluate_forwardref = ForwardRef._eval_type
+ 
+-if sys.version_info >= (3, 10):
+-    from typing import is_typeddict
+-else:
+-    _typed_dict_meta_types = ()
+-    if sys.version_info >= (3, 8):
+-        from typing import _TypedDictMeta
+-        _typed_dict_meta_types += (_TypedDictMeta,)
++try:
++    from typing_extensions import is_typeddict
++except ImportError:
++    if sys.version_info >= (3, 10):
++        from typing import is_typeddict
++    else:
++        _typed_dict_meta_types = ()
++        if sys.version_info >= (3, 8):
++            from typing import _TypedDictMeta
++            _typed_dict_meta_types += (_TypedDictMeta,)
+ 
+-    try:
+-        from typing_extensions import _TypedDictMeta
+-        _typed_dict_meta_types += (_TypedDictMeta,)
+-    except ImportError:
+-        pass
++        try:
++            from typing_extensions import _TypedDictMeta
++            _typed_dict_meta_types += (_TypedDictMeta,)
++        except ImportError:
++            pass
+ 
+-    def is_typeddict(tp) -> bool:
+-        return isinstance(tp, _typed_dict_meta_types)
++        def is_typeddict(tp) -> bool:
++            return isinstance(tp, _typed_dict_meta_types)
+ 
+ 
+ if TYPE_CHECKING:
diff --git a/gnu/packages/patches/source-highlight-gcc-compat.patch b/gnu/packages/patches/source-highlight-gcc-compat.patch
new file mode 100644
index 0000000000..7b543dcf32
--- /dev/null
+++ b/gnu/packages/patches/source-highlight-gcc-compat.patch
@@ -0,0 +1,74 @@
+Fix various compatibility problems with newer GCC.
+
+This is an amalgamation of these upstream commits:
+
+  https://git.savannah.gnu.org/cgit/src-highlite.git/commit/?id=904949c9026cb772dc93fbe0947a252ef47127f4
+  https://git.savannah.gnu.org/cgit/src-highlite.git/commit/?id=ab9fe5cb9b85c5afab94f2a7f4b6d7d473c14ee9
+
+diff --git a/lib/srchilite/fileutil.cc b/lib/srchilite/fileutil.cc
+index 59a6d64..963178c 100644
+--- a/lib/srchilite/fileutil.cc
++++ b/lib/srchilite/fileutil.cc
+@@ -48,7 +48,7 @@ void set_file_util_verbose(bool b) {
+ // FIXME avoid using a global variable
+ std::string start_path;
+ 
+-string readFile(const string &fileName) throw (IOException) {
++string readFile(const string &fileName) {
+     ifstream file(fileName.c_str());
+ 
+     if (!file.is_open()) {
+diff --git a/lib/srchilite/fileutil.h b/lib/srchilite/fileutil.h
+index 7335a9b..042eb56 100644
+--- a/lib/srchilite/fileutil.h
++++ b/lib/srchilite/fileutil.h
+@@ -27,7 +27,7 @@ extern std::string start_path;
+  * @return the contents of the file
+  * @throw IOException
+  */
+-string readFile(const string &fileName) throw (IOException);
++string readFile(const string &fileName);
+ 
+ //char *read_file(const string &fileName);
+ 
+diff --git a/lib/tests/stdboosterror.h b/lib/tests/stdboosterror.h
+index 568545b..d59bfa6 100644
+--- a/lib/tests/stdboosterror.h
++++ b/lib/tests/stdboosterror.h
+@@ -4,7 +4,7 @@
+ #include <boost/regex/pattern_except.hpp>
+ 
+ static boost::regex_error
+-        std_boost_exception(boost::regex_error(boost::regex_constants::error_bad_pattern));
++        std_boost_exception = boost::regex_error(boost::regex_constants::error_bad_pattern);
+ 
+ /**
+  * returns the string representing a standard exception (which
+diff --git a/lib/tests/test_wordtokenizer_main.cpp b/lib/tests/test_wordtokenizer_main.cpp
+index 40e23b1..11ba389 100644
+--- a/lib/tests/test_wordtokenizer_main.cpp
++++ b/lib/tests/test_wordtokenizer_main.cpp
+@@ -11,6 +11,14 @@
+ using namespace std;
+ using namespace srchilite;
+ 
++/*
++ * We have to use 'std' namespaces because 'WordTokenizer::WordTokenizerResults::value_type'
++ * is an std::pair<std::string, std::string> in disguise. We have to place 'operator<<()'
++ * into the same namespace for ADL to work. Otherwise gcc-12 or clang-13 can't find the
++ * overload.
++ */
++namespace std {
++
+ static ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &);
+ 
+ ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &token) {
+@@ -23,6 +31,8 @@ ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::val
+     return os;
+ }
+ 
++}
++
+ int main() {
+     WordTokenizer::WordTokenizerResults tokens;
+ 
\ No newline at end of file
diff --git a/gnu/packages/patches/swig-support-gcc-12.patch b/gnu/packages/patches/swig-support-gcc-12.patch
new file mode 100644
index 0000000000..ece7928aa2
--- /dev/null
+++ b/gnu/packages/patches/swig-support-gcc-12.patch
@@ -0,0 +1,16 @@
+Fix for https://github.com/swig/swig/issues/2145 made in unreleased upstream commit
+https://github.com/swig/swig/commit/76d5a9ec270a763c892ae28070e391cf99e0b7cd
+
+diff --git a/Examples/test-suite/nested_class.i b/Examples/test-suite/nested_class.i
+index b10c339493e..c778a12cf7c 100644
+--- a/Examples/test-suite/nested_class.i
++++ b/Examples/test-suite/nested_class.i
+@@ -201,7 +201,7 @@ struct Outer {
+     Integer xx;
+   } MultipleInstanceAnonDerived1, MultipleInstanceAnonDerived2, *MultipleInstanceAnonDerived3, MultipleInstanceAnonDerived4[2];
+ 
+-#if defined(__GNUC__) || defined(_MSC_VER) || defined(SWIG)
++#if (defined(__GNUC__) && __GNUC__ < 12) || defined(_MSC_VER) || defined(SWIG)
+ /* some compilers do not accept these */
+   struct : public InnerMultiple {
+     Integer xx;
diff --git a/gnu/packages/patches/texinfo-headings-single.patch b/gnu/packages/patches/texinfo-headings-single.patch
new file mode 100644
index 0000000000..5147449ddc
--- /dev/null
+++ b/gnu/packages/patches/texinfo-headings-single.patch
@@ -0,0 +1,21 @@
+Fix a regression in 6.8 where the 'single' headings option was not recognized.
+
+Taken from upstream:
+
+  https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=13a8894fe2faa45b04033d7122a8fe7939ce6aa2
+
+diff --git a/tp/Texinfo/XS/parsetexi/end_line.c b/tp/Texinfo/XS/parsetexi/end_line.c
+index 4556780052..3fc2065616 100644
+--- a/tp/Texinfo/XS/parsetexi/end_line.c
++++ b/tp/Texinfo/XS/parsetexi/end_line.c
+@@ -778,8 +778,8 @@ kdbinputstyle_invalid:
+     case CM_headings:
+       {
+         if (!strcmp (line, "off") || !strcmp (line, "on")
+-            || !strcmp (line, "double") || !strcmp (line, "singleafter")
+-            || !strcmp (line, "doubleafter"))
++            || !strcmp (line, "single") || !strcmp (line, "double")
++            || !strcmp (line, "singleafter") || !strcmp (line, "doubleafter"))
+           {
+             ADD_ARG(line);
+           }
diff --git a/gnu/packages/patches/util-linux-CVE-2021-3995.patch b/gnu/packages/patches/util-linux-CVE-2021-3995.patch
deleted file mode 100644
index 7faea83801..0000000000
--- a/gnu/packages/patches/util-linux-CVE-2021-3995.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-Fix CVE-2021-3995:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3995
-https://seclists.org/oss-sec/2022/q1/66
-
-Patch copied from upstream source repository:
-
-https://github.com/util-linux/util-linux/commit/f3db9bd609494099f0c1b95231c5dfe383346929
-
-From f3db9bd609494099f0c1b95231c5dfe383346929 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Wed, 24 Nov 2021 13:53:25 +0100
-Subject: [PATCH] libmount: fix UID check for FUSE umount [CVE-2021-3995]
-
-Improper UID check allows an unprivileged user to unmount FUSE
-filesystems of users with similar UID.
-
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- include/strutils.h            |  2 +-
- libmount/src/context_umount.c | 14 +++---------
- libmount/src/mountP.h         |  1 +
- libmount/src/optstr.c         | 42 +++++++++++++++++++++++++++++++++++
- 4 files changed, 47 insertions(+), 12 deletions(-)
-
-diff --git a/include/strutils.h b/include/strutils.h
-index 6e95707ea..a84d29594 100644
---- a/include/strutils.h
-+++ b/include/strutils.h
-@@ -106,8 +106,8 @@ static inline char *mem2strcpy(char *dest, const void *src, size_t n, size_t nma
- 	if (n + 1 > nmax)
- 		n = nmax - 1;
- 
-+	memset(dest, '\0', nmax);
- 	memcpy(dest, src, n);
--	dest[nmax-1] = '\0';
- 	return dest;
- }
- 
-diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
-index 173637a15..8773c65ff 100644
---- a/libmount/src/context_umount.c
-+++ b/libmount/src/context_umount.c
-@@ -453,10 +453,7 @@ static int is_fuse_usermount(struct libmnt_context *cxt, int *errsv)
- 	struct libmnt_ns *ns_old;
- 	const char *type = mnt_fs_get_fstype(cxt->fs);
- 	const char *optstr;
--	char *user_id = NULL;
--	size_t sz;
--	uid_t uid;
--	char uidstr[sizeof(stringify_value(ULONG_MAX))];
-+	uid_t uid, entry_uid;
- 
- 	*errsv = 0;
- 
-@@ -473,11 +470,7 @@ static int is_fuse_usermount(struct libmnt_context *cxt, int *errsv)
- 	optstr = mnt_fs_get_fs_options(cxt->fs);
- 	if (!optstr)
- 		return 0;
--
--	if (mnt_optstr_get_option(optstr, "user_id", &user_id, &sz) != 0)
--		return 0;
--
--	if (sz == 0 || user_id == NULL)
-+	if (mnt_optstr_get_uid(optstr, "user_id", &entry_uid) != 0)
- 		return 0;
- 
- 	/* get current user */
-@@ -494,8 +487,7 @@ static int is_fuse_usermount(struct libmnt_context *cxt, int *errsv)
- 		return 0;
- 	}
- 
--	snprintf(uidstr, sizeof(uidstr), "%lu", (unsigned long) uid);
--	return strncmp(user_id, uidstr, sz) == 0;
-+	return uid == entry_uid;
- }
- 
- /*
-diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h
-index d43a83541..22442ec55 100644
---- a/libmount/src/mountP.h
-+++ b/libmount/src/mountP.h
-@@ -399,6 +399,7 @@ extern const struct libmnt_optmap *mnt_optmap_get_entry(
- 			     const struct libmnt_optmap **mapent);
- 
- /* optstr.c */
-+extern int mnt_optstr_get_uid(const char *optstr, const char *name, uid_t *uid);
- extern int mnt_optstr_remove_option_at(char **optstr, char *begin, char *end);
- extern int mnt_optstr_fix_gid(char **optstr, char *value, size_t valsz, char **next);
- extern int mnt_optstr_fix_uid(char **optstr, char *value, size_t valsz, char **next);
-diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
-index 921b9318e..16800f571 100644
---- a/libmount/src/optstr.c
-+++ b/libmount/src/optstr.c
-@@ -1076,6 +1076,48 @@ int mnt_optstr_fix_user(char **optstr)
- 	return rc;
- }
- 
-+/*
-+ * Converts value from @optstr addressed by @name to uid.
-+ *
-+ * Returns: 0 on success, 1 if not found, <0 on error
-+ */
-+int mnt_optstr_get_uid(const char *optstr, const char *name, uid_t *uid)
-+{
-+	char *value = NULL;
-+	size_t valsz = 0;
-+	char buf[sizeof(stringify_value(UINT64_MAX))];
-+	int rc;
-+	uint64_t num;
-+
-+	assert(optstr);
-+	assert(name);
-+	assert(uid);
-+
-+	rc = mnt_optstr_get_option(optstr, name, &value, &valsz);
-+	if (rc != 0)
-+		goto fail;
-+
-+	if (valsz > sizeof(buf) - 1) {
-+		rc = -ERANGE;
-+		goto fail;
-+	}
-+	mem2strcpy(buf, value, valsz, sizeof(buf));
-+
-+	rc = ul_strtou64(buf, &num, 10);
-+	if (rc != 0)
-+		goto fail;
-+	if (num > ULONG_MAX || (uid_t) num != num) {
-+		rc = -ERANGE;
-+		goto fail;
-+	}
-+	*uid = (uid_t) num;
-+
-+	return 0;
-+fail:
-+	DBG(UTILS, ul_debug("failed to convert '%s'= to number [rc=%d]", name, rc));
-+	return rc;
-+}
-+
- /**
-  * mnt_match_options:
-  * @optstr: options string
--- 
-2.34.0
-
diff --git a/gnu/packages/patches/util-linux-CVE-2021-3996.patch b/gnu/packages/patches/util-linux-CVE-2021-3996.patch
deleted file mode 100644
index 59edf5c7cf..0000000000
--- a/gnu/packages/patches/util-linux-CVE-2021-3996.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-Fix CVE-2021-3996:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3996
-https://seclists.org/oss-sec/2022/q1/66
-
-Patch copied from upstream source repository:
-
-https://github.com/util-linux/util-linux/commit/018a10907fa9885093f6d87401556932c2d8bd2b
-
-From 018a10907fa9885093f6d87401556932c2d8bd2b Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Tue, 4 Jan 2022 10:54:20 +0100
-Subject: [PATCH] libmount: fix (deleted) suffix issue [CVE-2021-3996]
-
-This issue is related to parsing the /proc/self/mountinfo file allows an
-unprivileged user to unmount other user's filesystems that are either
-world-writable themselves or mounted in a world-writable directory.
-
-The support for "(deleted)" is no more necessary as the Linux kernel does
-not use it in /proc/self/mountinfo and /proc/self/mount files anymore.
-
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- libmount/src/tab_parse.c                            |  5 -----
- tests/expected/findmnt/filter-options               |  1 -
- tests/expected/findmnt/filter-options-nameval-neg   |  3 +--
- tests/expected/findmnt/filter-types-neg             |  1 -
- tests/expected/findmnt/outputs-default              |  3 +--
- tests/expected/findmnt/outputs-force-tree           |  3 +--
- tests/expected/findmnt/outputs-kernel               |  3 +--
- tests/expected/libmount/tabdiff-mount               |  1 -
- tests/expected/libmount/tabdiff-move                |  1 -
- tests/expected/libmount/tabdiff-remount             |  1 -
- tests/expected/libmount/tabdiff-umount              |  1 -
- tests/expected/libmount/tabfiles-parse-mountinfo    | 11 -----------
- tests/expected/libmount/tabfiles-py-parse-mountinfo | 11 -----------
- tests/ts/findmnt/files/mountinfo                    |  1 -
- tests/ts/findmnt/files/mountinfo-nonroot            |  1 -
- tests/ts/libmount/files/mountinfo                   |  1 -
- 16 files changed, 4 insertions(+), 44 deletions(-)
-
-diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
-index 917779ab6..4407f9c9c 100644
---- a/libmount/src/tab_parse.c
-+++ b/libmount/src/tab_parse.c
-@@ -227,11 +227,6 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s)
- 		goto fail;
- 	}
- 
--	/* remove "\040(deleted)" suffix */
--	p = (char *) endswith(fs->target, PATH_DELETED_SUFFIX);
--	if (p && *p)
--		*p = '\0';
--
- 	s = skip_separator(s);
- 
- 	/* (6) vfs options (fs-independent) */
-diff --git a/tests/expected/findmnt/filter-options b/tests/expected/findmnt/filter-options
-index 2606bce76..97b0ead0a 100644
---- a/tests/expected/findmnt/filter-options
-+++ b/tests/expected/findmnt/filter-options
-@@ -28,5 +28,4 @@ TARGET                       SOURCE           FSTYPE                OPTIONS
- /home/kzak/.gvfs             gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
- /var/lib/nfs/rpc_pipefs      sunrpc           rpc_pipefs            rw,relatime
- /mnt/sounds                  //foo.home/bar/  cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--/mnt/foo                     /fooooo          bar                   rw,relatime
- rc=0
-diff --git a/tests/expected/findmnt/filter-options-nameval-neg b/tests/expected/findmnt/filter-options-nameval-neg
-index 5471d65af..f0467ef75 100644
---- a/tests/expected/findmnt/filter-options-nameval-neg
-+++ b/tests/expected/findmnt/filter-options-nameval-neg
-@@ -29,6 +29,5 @@ TARGET                         SOURCE                FSTYPE                OPTIO
- |-/home/kzak                   /dev/mapper/kzak-home ext4                  rw,noatime,barrier=1,data=ordered
- | `-/home/kzak/.gvfs           gvfs-fuse-daemon      fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
- |-/var/lib/nfs/rpc_pipefs      sunrpc                rpc_pipefs            rw,relatime
--|-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--`-/mnt/foo                     /fooooo               bar                   rw,relatime
-+`-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
- rc=0
-diff --git a/tests/expected/findmnt/filter-types-neg b/tests/expected/findmnt/filter-types-neg
-index 2606bce76..97b0ead0a 100644
---- a/tests/expected/findmnt/filter-types-neg
-+++ b/tests/expected/findmnt/filter-types-neg
-@@ -28,5 +28,4 @@ TARGET                       SOURCE           FSTYPE                OPTIONS
- /home/kzak/.gvfs             gvfs-fuse-daemon fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
- /var/lib/nfs/rpc_pipefs      sunrpc           rpc_pipefs            rw,relatime
- /mnt/sounds                  //foo.home/bar/  cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--/mnt/foo                     /fooooo          bar                   rw,relatime
- rc=0
-diff --git a/tests/expected/findmnt/outputs-default b/tests/expected/findmnt/outputs-default
-index 59495797b..01599355e 100644
---- a/tests/expected/findmnt/outputs-default
-+++ b/tests/expected/findmnt/outputs-default
-@@ -30,6 +30,5 @@ TARGET                         SOURCE                FSTYPE                OPTIO
- |-/home/kzak                   /dev/mapper/kzak-home ext4                  rw,noatime,barrier=1,data=ordered
- | `-/home/kzak/.gvfs           gvfs-fuse-daemon      fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
- |-/var/lib/nfs/rpc_pipefs      sunrpc                rpc_pipefs            rw,relatime
--|-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--`-/mnt/foo                     /fooooo               bar                   rw,relatime
-+`-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
- rc=0
-diff --git a/tests/expected/findmnt/outputs-force-tree b/tests/expected/findmnt/outputs-force-tree
-index 59495797b..01599355e 100644
---- a/tests/expected/findmnt/outputs-force-tree
-+++ b/tests/expected/findmnt/outputs-force-tree
-@@ -30,6 +30,5 @@ TARGET                         SOURCE                FSTYPE                OPTIO
- |-/home/kzak                   /dev/mapper/kzak-home ext4                  rw,noatime,barrier=1,data=ordered
- | `-/home/kzak/.gvfs           gvfs-fuse-daemon      fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
- |-/var/lib/nfs/rpc_pipefs      sunrpc                rpc_pipefs            rw,relatime
--|-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--`-/mnt/foo                     /fooooo               bar                   rw,relatime
-+`-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
- rc=0
-diff --git a/tests/expected/findmnt/outputs-kernel b/tests/expected/findmnt/outputs-kernel
-index 59495797b..01599355e 100644
---- a/tests/expected/findmnt/outputs-kernel
-+++ b/tests/expected/findmnt/outputs-kernel
-@@ -30,6 +30,5 @@ TARGET                         SOURCE                FSTYPE                OPTIO
- |-/home/kzak                   /dev/mapper/kzak-home ext4                  rw,noatime,barrier=1,data=ordered
- | `-/home/kzak/.gvfs           gvfs-fuse-daemon      fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500
- |-/var/lib/nfs/rpc_pipefs      sunrpc                rpc_pipefs            rw,relatime
--|-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--`-/mnt/foo                     /fooooo               bar                   rw,relatime
-+`-/mnt/sounds                  //foo.home/bar/       cifs                  rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
- rc=0
-diff --git a/tests/expected/libmount/tabdiff-mount b/tests/expected/libmount/tabdiff-mount
-index 420aeacd5..3c18f8dc4 100644
---- a/tests/expected/libmount/tabdiff-mount
-+++ b/tests/expected/libmount/tabdiff-mount
-@@ -1,3 +1,2 @@
- /dev/mapper/kzak-home on /home/kzak: MOUNTED
--/fooooo on /mnt/foo: MOUNTED
- tmpfs on /mnt/test/foo
bar: MOUNTED
-diff --git a/tests/expected/libmount/tabdiff-move b/tests/expected/libmount/tabdiff-move
-index 24f9bc791..95820d93e 100644
---- a/tests/expected/libmount/tabdiff-move
-+++ b/tests/expected/libmount/tabdiff-move
-@@ -1,3 +1,2 @@
- //foo.home/bar/ on /mnt/music: MOVED to /mnt/music
--/fooooo on /mnt/foo: UMOUNTED
- tmpfs on /mnt/test/foo
bar: UMOUNTED
-diff --git a/tests/expected/libmount/tabdiff-remount b/tests/expected/libmount/tabdiff-remount
-index 82ebeab39..876bfd953 100644
---- a/tests/expected/libmount/tabdiff-remount
-+++ b/tests/expected/libmount/tabdiff-remount
-@@ -1,4 +1,3 @@
- /dev/mapper/kzak-home on /home/kzak: REMOUNTED from 'rw,noatime,barrier=1,data=ordered' to 'ro,noatime,barrier=1,data=ordered'
- //foo.home/bar/ on /mnt/sounds: REMOUNTED from 'rw,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344' to 'ro,relatime,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344'
--/fooooo on /mnt/foo: UMOUNTED
- tmpfs on /mnt/test/foo
bar: UMOUNTED
-diff --git a/tests/expected/libmount/tabdiff-umount b/tests/expected/libmount/tabdiff-umount
-index a3e0fe48a..c7be725b9 100644
---- a/tests/expected/libmount/tabdiff-umount
-+++ b/tests/expected/libmount/tabdiff-umount
-@@ -1,3 +1,2 @@
- /dev/mapper/kzak-home on /home/kzak: UMOUNTED
--/fooooo on /mnt/foo: UMOUNTED
- tmpfs on /mnt/test/foo
bar: UMOUNTED
-diff --git a/tests/expected/libmount/tabfiles-parse-mountinfo b/tests/expected/libmount/tabfiles-parse-mountinfo
-index 47eb77006..d5ba5248e 100644
---- a/tests/expected/libmount/tabfiles-parse-mountinfo
-+++ b/tests/expected/libmount/tabfiles-parse-mountinfo
-@@ -351,17 +351,6 @@ id:     47
- parent: 20
- devno:  0:38
- ------ fs:
--source: /fooooo
--target: /mnt/foo
--fstype: bar
--optstr: rw,relatime
--VFS-optstr: rw,relatime
--FS-opstr: rw
--root:   /
--id:     48
--parent: 20
--devno:  0:39
-------- fs:
- source: tmpfs
- target: /mnt/test/foo
bar
- fstype: tmpfs
-diff --git a/tests/expected/libmount/tabfiles-py-parse-mountinfo b/tests/expected/libmount/tabfiles-py-parse-mountinfo
-index 47eb77006..d5ba5248e 100644
---- a/tests/expected/libmount/tabfiles-py-parse-mountinfo
-+++ b/tests/expected/libmount/tabfiles-py-parse-mountinfo
-@@ -351,17 +351,6 @@ id:     47
- parent: 20
- devno:  0:38
- ------ fs:
--source: /fooooo
--target: /mnt/foo
--fstype: bar
--optstr: rw,relatime
--VFS-optstr: rw,relatime
--FS-opstr: rw
--root:   /
--id:     48
--parent: 20
--devno:  0:39
-------- fs:
- source: tmpfs
- target: /mnt/test/foo
bar
- fstype: tmpfs
-diff --git a/tests/ts/findmnt/files/mountinfo b/tests/ts/findmnt/files/mountinfo
-index 475ea1a33..ff1e664a8 100644
---- a/tests/ts/findmnt/files/mountinfo
-+++ b/tests/ts/findmnt/files/mountinfo
-@@ -30,4 +30,3 @@
- 44 41 0:36 / /home/kzak/.gvfs rw,nosuid,nodev,relatime - fuse.gvfs-fuse-daemon gvfs-fuse-daemon rw,user_id=500,group_id=500
- 45 20 0:37 / /var/lib/nfs/rpc_pipefs rw,relatime - rpc_pipefs sunrpc rw
- 47 20 0:38 / /mnt/sounds rw,relatime - cifs //foo.home/bar/ rw,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--48 20 0:39 / /mnt/foo\040(deleted) rw,relatime - bar /fooooo rw
-diff --git a/tests/ts/findmnt/files/mountinfo-nonroot b/tests/ts/findmnt/files/mountinfo-nonroot
-index e15b46701..87b421d2e 100644
---- a/tests/ts/findmnt/files/mountinfo-nonroot
-+++ b/tests/ts/findmnt/files/mountinfo-nonroot
-@@ -29,4 +29,3 @@
- 44 41 0:36 / /home/kzak/.gvfs rw,nosuid,nodev,relatime - fuse.gvfs-fuse-daemon gvfs-fuse-daemon rw,user_id=500,group_id=500
- 45 20 0:37 / /var/lib/nfs/rpc_pipefs rw,relatime - rpc_pipefs sunrpc rw
- 47 20 0:38 / /mnt/sounds rw,relatime - cifs //foo.home/bar/ rw,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--48 20 0:39 / /mnt/foo\040(deleted) rw,relatime - bar /fooooo rw
-diff --git a/tests/ts/libmount/files/mountinfo b/tests/ts/libmount/files/mountinfo
-index c06307183..2b0174048 100644
---- a/tests/ts/libmount/files/mountinfo
-+++ b/tests/ts/libmount/files/mountinfo
-@@ -30,5 +30,4 @@
- 44 41 0:36 / /home/kzak/.gvfs rw,nosuid,nodev,relatime - fuse.gvfs-fuse-daemon gvfs-fuse-daemon rw,user_id=500,group_id=500
- 45 20 0:37 / /var/lib/nfs/rpc_pipefs rw,relatime - rpc_pipefs sunrpc rw
- 47 20 0:38 / /mnt/sounds rw,relatime - cifs //foo.home/bar/ rw,unc=\\foo.home\bar,username=kzak,domain=SRGROUP,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.111.1,posixpaths,serverino,acl,rsize=16384,wsize=57344
--48 20 0:39 / /mnt/foo\040(deleted) rw,relatime - bar /fooooo rw
- 49 20 0:56 / /mnt/test/foo
bar rw,relatime shared:323 - tmpfs tmpfs rw
--- 
-2.34.0
-
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index ec6bb76d5d..741dcdf787 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2022 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -80,20 +81,24 @@ Each database is contained in a specific package output, such as the
 (define-public pciutils
   (package
     (name "pciutils")
-    (version "3.7.0")
+    (version "3.8.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "mirror://kernel.org/software/utils/pciutils/pciutils-"
                     version ".tar.xz"))
-              (patches (search-patches "pciutils-hurd-configure.patch"))
               (sha256
                (base32
-                "1ss0rnfsx8gvqjxaji4mvbhf9xyih4cadmgadbwwv8mnx1xvjh4x"))))
+                "01aglgw9ds9qiswcbi2lx90lswncikrlyv8mmp4haix8542bvvci"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'unbundle-pci.ids
+           (lambda* (#:key native-inputs inputs #:allow-other-keys)
+             (copy-file (search-input-file (or native-inputs inputs)
+                                           "share/hwdata/pci.ids")
+                        "pci.ids")))
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              ;; There's no 'configure' script, just a raw makefile.
@@ -116,50 +121,50 @@ Each database is contained in a specific package output, such as the
                 (string-append "PREFIX := " (assoc-ref outputs "out")
                                "\n"))
                (("^MANDIR:=.*$")
-                 ;; By default the thing tries to automatically
-                 ;; determine whether to use $prefix/man or
-                 ;; $prefix/share/man, and wrongly so.
+                ;; By default the thing tries to automatically
+                ;; determine whether to use $prefix/man or
+                ;; $prefix/share/man, and wrongly so.
                 (string-append "MANDIR := " (assoc-ref outputs "out")
                                "/share/man\n"))
 
                (("^SHARED=.*$")
                 ;; Build libpciutils.so.
                 "SHARED := yes\n")
+
                (("^ZLIB=.*$")
                 ;; Ask for zlib support, for 'pci.ids.gz' decompression.
                 "ZLIB := yes\n")
 
                (("^IDSDIR=.*$")
                 ;; Installation directory of 'pci.ids.gz'.
-                "IDSDIR = $(SHAREDIR)/hwdata\n"))))
+                "IDSDIR = $(SHAREDIR)/hwdata\n")
+
+               ;; Do not install the update script nor its man page.
+               ((".*INSTALL.*update-pciids .*") "")
+               (("update-pciids update-pciids.8 ") "")
+               (("(.*INSTALL.*)update-pciids.8(.*)" _ head tail)
+                (string-append head tail)))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Install the commands, library, and .pc files.
-             (invoke "make" "install" "install-lib")))
-
-         ,@(if (hurd-target?)
-               '((add-after 'unpack 'apply-hurd-patch
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     (let ((patch (assoc-ref inputs "hurd-patch")))
-                       (invoke "patch" "-p1" "--batch" "-i"
-                               patch)))))
-               '()))
+             (invoke "make" "install" "install-lib"))))
 
        ;; Make sure programs have an RPATH so they can find libpciutils.so.
-       #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+       #:make-flags (list ,(string-append "CC="
+                                          (if (%current-target-system)
+                                              (cc-for-target)
+                                              "gcc"))
+                          (string-append "LDFLAGS=-Wl,-rpath="
                                          (assoc-ref %outputs "out") "/lib"))
 
        ;; No test suite.
        #:tests? #f))
     (native-inputs
-     (list which pkg-config))
+     (list `(,hwdata "pci") pkg-config which))
     (inputs
      `(,@(if (not (hurd-target?))
              `(("kmod" ,kmod))
              '())
-       ,@(if (hurd-target?)
-             `(("hurd-patch" ,(search-patch "pciutils-hurd-fix.patch")))
-             '())
        ("zlib" ,zlib)))
     (home-page "https://mj.ucw.cz/sw/pciutils/")
     (synopsis "Programs for inspecting and manipulating PCI devices")
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index fdc86e5047..7c53a27685 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -33,99 +33,102 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
 (define-public pcre
   (package
-   (name "pcre")
-   (version "8.45")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://sourceforge/pcre/pcre/"
-                                version "/pcre-" version ".tar.bz2"))
-            (sha256
-             (base32
-              "1f7zichy6iimmkfrqdl575sdlm795cyc75szgg1vc2xvsbf6zbjd"))))
-   (build-system gnu-build-system)
-   (outputs '("out"           ;library & headers
-              "bin"           ;depends on Readline (adds 20MiB to the closure)
-              "doc"           ;1.8 MiB of HTML
-              "static"))      ;1.8 MiB static libraries
-   (inputs (list bzip2 readline zlib))
-   (arguments
-    `(#:disallowed-references ("doc")
-      #:configure-flags '("--enable-utf"
-                          "--enable-pcregrep-libz"
-                          "--enable-pcregrep-libbz2"
-                          "--enable-pcretest-libreadline"
-                          "--enable-unicode-properties"
-                          "--enable-pcre16"
-                          "--enable-pcre32"
-                          ;; pcretest fails on powerpc32.
-                          ;; riscv64-linux is an unsupported architecture.
-                          ,@(if (or (target-ppc32?)
-                                    (target-riscv64?))
-                              '()
-                              `("--enable-jit")))
-      #:phases (modify-phases %standard-phases
-                 (add-after 'install 'move-static-libs
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let ((source (string-append (assoc-ref outputs "out") "/lib"))
-                           (static (string-append (assoc-ref outputs "static") "/lib")))
-                       (mkdir-p static)
-                       (for-each (lambda (lib)
-                                   (link lib (string-append static "/"
-                                                            (basename lib)))
-                                   (delete-file lib))
-                                 (find-files source "\\.a$"))))))))
-   (synopsis "Perl Compatible Regular Expressions")
-   (description
-    "The PCRE library is a set of functions that implement regular expression
+    (name "pcre")
+    (version "8.45")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/pcre/pcre/"
+                                  version "/pcre-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1f7zichy6iimmkfrqdl575sdlm795cyc75szgg1vc2xvsbf6zbjd"))))
+    (build-system gnu-build-system)
+    (outputs '("out"          ;library & headers
+               "bin"          ;depends on Readline (adds 20MiB to the closure)
+               "doc"          ;1.8 MiB of HTML
+               "static"))     ;1.8 MiB static libraries
+    (inputs (list bzip2 readline zlib))
+    (arguments
+     (list
+      #:disallowed-references '("doc")
+      #:configure-flags #~'("--enable-utf"
+                            "--enable-pcregrep-libz"
+                            "--enable-pcregrep-libbz2"
+                            "--enable-pcretest-libreadline"
+                            "--enable-unicode-properties"
+                            "--enable-pcre16"
+                            "--enable-pcre32"
+                            ;; pcretest fails on powerpc32.
+                            ;; riscv64-linux is an unsupported architecture.
+                            #$@(if (or (target-ppc32?) (target-riscv64?))
+                                   #~()
+                                   #~("--enable-jit")))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'move-static-libs
+            (lambda _
+              (let ((source (string-append #$output "/lib"))
+                    (static (string-append #$output:static "/lib")))
+                (mkdir-p static)
+                (for-each (lambda (lib)
+                            (link lib (string-append static "/"
+                                                     (basename lib)))
+                            (delete-file lib))
+                          (find-files source "\\.a$"))))))))
+    (synopsis "Perl Compatible Regular Expressions")
+    (description
+     "The PCRE library is a set of functions that implement regular expression
 pattern matching using the same syntax and semantics as Perl 5.  PCRE has its
 own native API, as well as a set of wrapper functions that correspond to the
 POSIX regular expression API.")
-   (license license:bsd-3)
-   (home-page "https://www.pcre.org/")))
+    (license license:bsd-3)
+    (home-page "https://www.pcre.org/")))
 
 (define-public pcre2
   (package
     (name "pcre2")
-    (version "10.37")
+    (version "10.40")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/pcre/pcre2/"
-                                  version "/pcre2-" version ".tar.bz2"))
+              (uri (string-append "https://github.com/PCRE2Project/pcre2"
+                                  "/releases/download/pcre2-" version
+                                  "/pcre2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0w6jaswjmg3bc0wsw6msn5bvk66p90kf2asnnj9rhll0idpak5ad"))))
-   (build-system gnu-build-system)
-   (inputs (list bzip2 readline zlib))
-   (arguments
-    `(#:configure-flags '("--enable-unicode"
-                          "--enable-pcre2grep-libz"
-                          "--enable-pcre2grep-libbz2"
-                          "--enable-pcre2test-libreadline"
-                          "--enable-pcre2-16"
-                          "--enable-pcre2-32"
-                          ;; pcre2_jit_test fails on powerpc32.
-                          ;; riscv64-linux is an unsupported architecture.
-                          ,@(if (or (target-ppc32?)
-                                    (target-riscv64?))
-                              '()
-                              `("--enable-jit"))
-                          "--disable-static")
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'patch-paths
-          (lambda _
-            (substitute* "RunGrepTest"
-              (("/bin/echo") (which "echo"))))))))
-   (synopsis "Perl Compatible Regular Expressions")
-   (description
-    "The PCRE library is a set of functions that implement regular expression
+                "0s4x2l6g0sb9piwkr3sxqwdswz2g6bk1hhwngv0kv4w38wybir0l"))))
+    (build-system gnu-build-system)
+    (inputs (list bzip2 readline zlib))
+    (arguments
+     (list #:configure-flags
+           #~'("--enable-unicode"
+               "--enable-pcre2grep-libz"
+               "--enable-pcre2grep-libbz2"
+               "--enable-pcre2test-libreadline"
+               "--enable-pcre2-16"
+               "--enable-pcre2-32"
+               ;; pcre2_jit_test fails on powerpc32.
+               ;; riscv64-linux is an unsupported architecture.
+               #$@(if (or (target-ppc32?) (target-riscv64?))
+                      #~()
+                      #~("--enable-jit"))
+               "--disable-static")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-paths
+                 (lambda _
+                   (substitute* "RunGrepTest"
+                     (("/bin/echo") (which "echo"))))))))
+    (synopsis "Perl Compatible Regular Expressions")
+    (description
+     "The PCRE library is a set of functions that implement regular expression
 pattern matching using the same syntax and semantics as Perl 5.  PCRE has its
 own native API, as well as a set of wrapper functions that correspond to the
 POSIX regular expression API.")
-   (license license:bsd-3)
-   (home-page "https://www.pcre.org/")))
+    (license license:bsd-3)
+    (home-page "https://www.pcre.org/")))
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index dd1064bd6c..48420c730f 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -84,6 +84,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
   #:use-module (gnu packages markup)
+  #:use-module (gnu packages nss)
   #:use-module (gnu packages ocr)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
@@ -286,29 +287,30 @@ please install the @code{flyer-composer-gui} package.")))
 (define-public poppler
   (package
    (name "poppler")
-   (version "21.07.0")
+   (version "22.09.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://poppler.freedesktop.org/poppler-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "1m54hsi8z6c13jdbjwz55flkra1mahmkw2igavbf8p86d2gv4sp2"))))
+              "0bhyli95h3dkirjc0ibh08s4nim6rn7f38sbfzdwln8k454gga6p"))))
    (build-system cmake-build-system)
    ;; FIXME:
    ;;  use libcurl:        no
-   (inputs `(("fontconfig" ,fontconfig)
-             ("freetype" ,freetype)
-             ("libjpeg" ,libjpeg-turbo)
-             ("libpng" ,libpng)
-             ("libtiff" ,libtiff)
-             ("lcms" ,lcms)
-             ("openjpeg" ,openjpeg)
-             ("zlib" ,zlib)
-
-             ;; To build poppler-glib (as needed by Evince), we need Cairo and
-             ;; GLib.  But of course, that Cairo must not depend on Poppler.
-             ("cairo" ,cairo-sans-poppler)))
+   (inputs (list fontconfig
+                 freetype
+                 libjpeg-turbo
+                 libpng
+                 libtiff
+                 lcms
+                 nss                              ;for 'pdfsig'
+                 openjpeg
+                 poppler-data
+                 zlib
+                 ;; To build poppler-glib (as needed by Evince), we need Cairo and
+                 ;; GLib.  But of course, that Cairo must not depend on Poppler.
+                 cairo-sans-poppler))
    (propagated-inputs
     ;; As per poppler-cairo and poppler-glib.pc.
     ;; XXX: Ideally we'd propagate Cairo too, but that would require a
@@ -317,24 +319,26 @@ please install the @code{flyer-composer-gui} package.")))
    (native-inputs
       (list pkg-config
             `(,glib "bin") ; glib-mkenums, etc.
-            gobject-introspection))
+            gobject-introspection
+            python))
    (arguments
-    `(#:tests? #f                      ;no test data provided with the tarball
-      #:configure-flags
-      (let* ((out (assoc-ref %outputs "out"))
-             (lib (string-append out "/lib")))
-        (list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files
-              "-DENABLE_ZLIB=ON"
-              "-DENABLE_BOOST=OFF"      ;disable Boost to save size
-              (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
-              (string-append "-DCMAKE_INSTALL_RPATH=" lib)))
-      ,@(if (%current-target-system)
-            `(#:phases
-              (modify-phases %standard-phases
-                (add-after 'unpack 'set-PKG_CONFIG
-                  (lambda _
-                    (setenv "PKG_CONFIG" ,(pkg-config-for-target))))))
-            '())))
+    (list
+     ;; The Poppler test suite needs to be downloaded separately and contains
+     ;; non-free (and non-auditable) files, so we skip them.  See
+     ;; <https://lists.gnu.org/archive/html/guix-devel/2022-06/msg00394.html>.
+     #:tests? #f
+     #:configure-flags
+     #~(list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files
+             "-DENABLE_ZLIB=ON"
+             "-DENABLE_BOOST=OFF"      ;disable Boost to save size
+             (string-append "-DCMAKE_INSTALL_LIBDIR=" #$output "/lib")
+             (string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib"))
+     #:phases
+     (if (%current-target-system) #~%standard-phases
+         #~(modify-phases %standard-phases
+             (add-after 'unpack 'set-PKG_CONFIG
+               (lambda _
+                 (setenv "PKG_CONFIG" #$(pkg-config-for-target))))))))
    (synopsis "PDF rendering library")
    (description
     "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
@@ -899,46 +903,34 @@ line tools for batch rendering @command{pdfdraw}, rewriting files
 
 (define-public qpdf
   (package
-   (name "qpdf")
-   (version "10.0.1")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
-                                "/qpdf-" version ".tar.gz"))
-            (sha256
-             (base32
-              "0yw2cpw7ygfd6jlgpwbi8vsnvv9p55zxp9h17x77z2qq733pf8jx"))))
-   (build-system gnu-build-system)
-   (arguments
-    `(#:disallowed-references (,perl)
-      #:phases
-      (modify-phases %standard-phases
-        (add-before 'configure 'patch-paths
-          (lambda _
-            (substitute* "make/libtool.mk"
-              (("SHELL=/bin/bash")
-               (string-append "SHELL=" (which "bash"))))
-            (substitute* (append
-                          '("qtest/bin/qtest-driver")
-                          (find-files "." "\\.test"))
-              (("/usr/bin/env") (which "env")))
-            #t)))))
-   (native-inputs
-    (list pkg-config perl))
-   (propagated-inputs
-    ;; In Requires.private of libqpdf.pc.
-    (list libjpeg-turbo zlib))
-   (synopsis "Command-line tools and library for transforming PDF files")
-   (description
-    "QPDF is a command-line program that does structural, content-preserving
+    (name "qpdf")
+    (version "11.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
+                                  "/qpdf-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0bg2d4585nxss2zakq105ibhzzsa1bhwpmr0k8752fg2qqxcz9rl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags #~'("-DBUILD_STATIC_LIBS=OFF")))
+    (native-inputs
+     (list perl pkg-config))
+    (propagated-inputs
+     ;; In Requires.private of libqpdf.pc.
+     (list libjpeg-turbo zlib))
+    (synopsis "Command-line tools and library for transforming PDF files")
+    (description
+     "QPDF is a command-line program that does structural, content-preserving
 transformations on PDF files.  It could have been called something like
 pdf-to-pdf.  It includes support for merging and splitting PDFs and to
 manipulate the list of pages in a PDF file.  It is not a PDF viewer or a
 program capable of converting PDF into other formats.")
-   ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0.
-   ;; Users can still choose to use the old license at their option.
-   (license (list license:asl2.0 license:clarified-artistic))
-   (home-page "https://qpdf.sourceforge.net/")))
+    ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0.
+    ;; Users can still choose to use the old license at their option.
+    (license (list license:asl2.0 license:clarified-artistic))
+    (home-page "https://qpdf.sourceforge.net/")))
 
 (define-public qpdfview
   (package
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 08ae11724c..294b99230f 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -104,14 +104,14 @@
   ;; Yeah, Perl...  It is required early in the bootstrap process by Linux.
   (package
     (name "perl")
-    (version "5.34.0")
+    (version "5.36.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/src/5.0/perl-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "16mywn5afpv1mczv9dlc1w84rbgjgrr0pyr4c0hhb2wnif0zq7jm"))
+               "02p0ljvxgay5g8s8j1kghdylkj581qx3qlwavlmgd5n3iapqaq72"))
              (patches (search-patches
                        "perl-no-sys-dirs.patch"
                        "perl-autosplit-default-time.patch"
@@ -239,10 +239,9 @@
                                              "/lib',\n"))))
                          config2)))))))
     (inputs
-     (append (list coreutils-minimal)
-             (if (%current-target-system)
-                 (list bash-minimal)
-                 '())))
+     (if (%current-target-system)
+       (list bash-minimal coreutils-minimal)
+       '()))
     (native-inputs
      (if (%current-target-system)
          `(("perl-cross"
@@ -250,10 +249,10 @@
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/arsv/perl-cross")
-                     (commit "1.3.6")))
-               (file-name (git-file-name "perl-cross" "1.3.6"))
+                     (commit "1.4")))
+               (file-name (git-file-name "perl-cross" "1.4"))
                (sha256
-                (base32 "0k5vyj40czbkfl7r3dcwxpc7dvdlp2xliaav358bviq3dq9vq9bb")))))
+                (base32 "1ydjvlhrk06ccyj4bm8by7xk90krsll2k380mc3x1mhfrc7r9gzy")))))
          '()))
     (native-search-paths (list (search-path-specification
                                 (variable "PERL5LIB")
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index 963587ca2e..c1e579eb58 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -308,19 +308,19 @@ colors, styles, options and details.")
                   texlive-epsf
                   texlive-etoolbox
                   texlive-fonts-ec
-                  texlive-generic-infwarerr
-                  texlive-generic-kvdefinekeys
+                  texlive-infwarerr
+                  texlive-kvdefinekeys
                   texlive-grfext
                   texlive-hyperref
                   texlive-latex-base
                   texlive-latex-geometry
-                  texlive-latex-graphics
-                  texlive-latex-kvoptions
+                  texlive-graphics
+                  texlive-kvoptions
                   texlive-latex-media9
-                  texlive-latex-ocgx2
-                  texlive-latex-pdftexcmds
                   texlive-oberdiek      ;for ifluatex
+                  texlive-latex-ocgx2
                   texlive-latex-parskip
+                  texlive-pdftexcmds
                   texlive-tex-texinfo))))
     (inputs
      (list bash-minimal
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index a5c1b0dc98..6fe7824a57 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -8,9 +8,9 @@
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; 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>
+;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,11 +28,11 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (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 gexp)
   #:use-module (guix memoization)
+  #:use-module ((guix licenses) #:select (lgpl2.0+))
+  #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (guix build utils)
   #:use-module (guix build-system cmake)
@@ -40,92 +40,130 @@
   #:use-module (guix build-system meson)
   #:use-module (gnu packages)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages docker)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages docbook)
-  #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages javascript)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
-  #:use-module (gnu packages xml)
-  #:export (polkit))
+  #:use-module (gnu packages xml))
 
-(define-public polkit-mozjs
+(define-public polkit
   (package
     (name "polkit")
     (version "121")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "https://www.freedesktop.org/software/polkit/releases/"
-                   name "-" version ".tar.gz"))
-             (patches (search-patches "polkit-disable-systemd.patch"))
-             (sha256
-              (base32
-               "1apz3bh7nbpmlp1cr00pb8z8wp0c7yb23ninb959jz3r38saxiwx"))
-             (modules '((guix build utils)))
-             (snippet
-              '(begin
-                 ;; 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/meson.build"
-                   (("subdir\\('polkitbackend'\\)")
-                    ""))
-                 ;; Look up actions and rules from /etc/polkit ...
-                 (substitute* "src/polkitbackend/meson.build"
-                   (("'-DPACKAGE_SYSCONF_DIR=.*,")
-                    "'-DPACKAGE_SYSCONF_DIR=\"/etc\"',"))
-                 (substitute* "src/polkitbackend/polkitbackendinteractiveauthority.c"
-                   (("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
-                    "PACKAGE_SYSCONF_DIR \"/polkit-1/actions\""))
-                 ;; ... but install package files below the prefix.
-                 (substitute* "meson.build"
-                   (("pk_sysconfdir = get_option\\('sysconfdir'\\)")
-                    "pk_sysconfdir = get_option('prefix') + '/etc'"))
-                 ;; Set the setuid helper's real location.
-                 (substitute* "src/polkitagent/polkitagentsession.c"
-                   (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
-                    "\"/run/setuid-programs/polkit-agent-helper-1\""))))))
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.freedesktop.org/software/polkit/releases/"
+                    name "-" version ".tar.gz"))
+              (patches (search-patches "polkit-disable-systemd.patch"))
+              (sha256
+               (base32
+                "1apz3bh7nbpmlp1cr00pb8z8wp0c7yb23ninb959jz3r38saxiwx"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; This is so that the default example rules files can be
+                  ;; installed along the package; otherwise it would fail
+                  ;; attempting to write to /etc.  Unlike with GNU Autotools,
+                  ;; Meson can't override the pkgsysconfdir value at install
+                  ;; time; instead, we rewrite the pkgsysconfdir references
+                  ;; in the build system to point to #$output/etc.
+                  ;; Look up actions and rules from /etc/polkit ...
+                  (substitute* "src/polkitbackend/meson.build"
+                    (("'-DPACKAGE_SYSCONF_DIR=.*,")
+                     "'-DPACKAGE_SYSCONF_DIR=\"/etc\"',"))
+                  (substitute* "src/polkitbackend/polkitbackendinteractiveauthority.c"
+                    (("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
+                     "PACKAGE_SYSCONF_DIR \"/polkit-1/actions\""))
+                  ;; ... but install package files below the prefix.
+                  (substitute* "meson.build"
+                    (("pk_sysconfdir = get_option\\('sysconfdir'\\)")
+                     "pk_sysconfdir = get_option('prefix') + '/etc'"))
+                  ;; Set the setuid helper's real location.
+                  (substitute* "src/polkitagent/polkitagentsession.c"
+                    (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
+                     "\"/run/setuid-programs/polkit-agent-helper-1\""))))))
     (build-system meson-build-system)
+    (arguments
+     (list
+      #:imported-modules `(,@%meson-build-system-modules
+                           (guix build syscalls))
+      #:modules '((guix build meson-build-system)
+                  (guix build syscalls)
+                  (guix build utils)
+                  (ice-9 match))
+      #:configure-flags
+      #~(list "--sysconfdir=/etc"
+              "-Dsession_tracking=libelogind"
+              "-Dman=true"
+              "-Dtests=true"
+              ;; Work around cross-compilation failure.  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")
+                     '()))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'patch-bash
+            (lambda _
+              (substitute* (list "subprojects/mocklibc-1.0/bin/mocklibc"
+                                 (string-append "../polkit-v." #$version
+                                                "/test/data/etc/passwd")
+                                 (string-append "../polkit-v." #$version
+                                                "/test/data/etc/polkit-1"
+                                                "/rules.d/10-testing.rules"))
+                (("/bin/(bash|false|true)" _ command)
+                 (which command)))))
+          (replace 'check
+            (lambda* (#:key tests? test-options #:allow-other-keys)
+              (when tests?
+                ;; Run the test suite through tini to ensure signals are
+                ;; properly handled and zombie processes reaped.
+                (match (primitive-fork)
+                  (0                    ;child process
+                   (set-child-subreaper!)
+                   ;; Use tini so that signals are properly handled and
+                   ;; doubly-forked processes get reaped; otherwise,
+                   ;; python-dbusmock would waste time polling for the dbus
+                   ;; processes it spawns to be reaped, in vain.
+                   (apply execlp "tini" "--"
+                          "meson" "--" "test" "-t" "0" "--print-errorlogs"
+                          test-options))
+                  (pid
+                   (match (waitpid pid)
+                     ((_ . status)
+                      (unless (zero? status)
+                        (error "`meson test' exited with status"
+                               status))))))))))))
     (inputs
-     (list elogind
-           expat
-           linux-pam
-           mozjs-91
-           nspr))
+     (list duktape expat elogind linux-pam nspr))
     (propagated-inputs
      (list glib))                       ;required by polkit-gobject-1.pc
     (native-inputs
-     (list pkg-config
-           gettext-minimal
-           perl
+     (list gettext-minimal
            `(,glib "bin")               ;for glib-mkenums
+           docbook-xsl                  ;for man page generation
            gobject-introspection
-           libxml2                      ;for man page generation
+           libxml2                      ;for XML_CATALOG_FILES
            libxslt                      ;for man page generation
-           docbook-xsl))                ;for man page generation
-    (arguments
-     (list #:configure-flags
-           #~'("--sysconfdir=/etc"
-               "-Dsession_tracking=libelogind"
-               "-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")
-                      '()))))
+           perl
+           pkg-config
+           python
+           python-dbusmock
+           tini))
     (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
@@ -135,36 +173,6 @@ making process with respect to granting access to privileged operations
 for unprivileged applications.")
     (license lgpl2.0+)))
 
-;;; Variant of polkit built with Duktape, a lighter JavaScript engine compared
-;;; to mozjs.
-(define-public polkit-duktape
-  (let ((base polkit-mozjs))
-    (package/inherit base
-      (name "polkit-duktape")
-      (arguments
-       (substitute-keyword-arguments (package-arguments base)
-         ((#:configure-flags flags)
-          #~(delete "-Djs_engine=mozjs" #$flags))))
-      (inputs
-       (modify-inputs (package-inputs base)
-         (replace "mozjs" duktape))))))
-
-(define polkit-for-system
-  (mlambda (system)
-    "Return a polkit package that can be built for SYSTEM; that is, either the
-regular polkit that requires mozjs or its duktape variant."
-    (if (string-prefix? "x86_64" system)
-        polkit-mozjs
-        polkit-duktape)))
-
-;;; Define a top level polkit variable that can be built on any of the
-;;; supported platforms.  This is to work around the fact that our
-;;; mrustc-bootstrapped rust toolchain currently only supports the x86_64
-;;; architecture.
-(define-syntax polkit
-  (identifier-syntax (polkit-for-system
-                      (or (%current-target-system) (%current-system)))))
-
 (define-public polkit-qt
   (package
     (name "polkit-qt")
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 7bc54c4a0b..416e5b90c2 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -33,6 +33,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages bison)
@@ -275,6 +276,7 @@ a fast alternative to @code{IOStreams}.")
       (method url-fetch)
       (uri (string-append "mirror://gnu/src-highlite/source-highlight-"
                           version ".tar.gz"))
+      (patches (search-patches "source-highlight-gcc-compat.patch"))
       (sha256
        (base32
         "148w47k3zswbxvhg83z38ifi85f9dqcpg7icvvw1cm6bg21x4zrs"))))
@@ -286,39 +288,40 @@ a fast alternative to @code{IOStreams}.")
     (native-inputs
      (list bison flex))
     (arguments
-     `(#:configure-flags
-       (list (string-append "--with-boost="
-                            (assoc-ref %build-inputs "boost")))
-       #:parallel-tests? #f             ;There appear to be race conditions
-       #:phases
-       (modify-phases %standard-phases
-         ,@(if (%current-target-system)
-               ;; 'doc/Makefile.am' tries to run stuff even when
-               ;; cross-compiling.  Explicitly skip it.
-               ;; XXX: Inline this on next rebuild cycle.
-               `((add-before 'build 'skip-doc-directory
-                   (lambda _
-                     (substitute* "Makefile"
-                       (("^SUBDIRS = (.*) doc(.*)$" _ before after)
-                        (string-append "SUBDIRS = " before
-                                       " " after "\n")))
-                     #t)))
-               '())
-         (add-before 'check 'patch-test-files
-           (lambda _
-             ;; Unpatch shebangs in test input so that source-highlight
-             ;; is still able to infer input language
-             (substitute* '("tests/test.sh"
-                            "tests/test2.sh"
-                            "tests/test.tcl")
-               (((string-append "#! *" (which "sh"))) "#!/bin/sh"))
-             ;; Initial patching unrecoverably removes whitespace, so
-             ;; remove it also in the comparison output.
-             (substitute* '("tests/test.sh.html"
-                            "tests/test2.sh.html"
-                            "tests/test.tcl.html")
-               (("#! */bin/sh") "#!/bin/sh"))
-             #t)))))
+     (list #:configure-flags
+           #~(list (string-append "--with-boost=" (assoc-ref %build-inputs "boost")))
+           #:parallel-tests? #f ;There appear to be race conditions
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'build 'rename-lesspipe-to-lesspipe.sh.in
+                 (lambda _
+                   (substitute* "src/src-hilite-lesspipe.sh.in"
+                     (("lesspipe") "lesspipe.sh"))))
+           #$@(if (%current-target-system)
+                  ;; 'doc/Makefile.am' tries to run stuff even when
+                  ;; cross-compiling.  Explicitly skip it.
+                  ;; XXX: Inline this on next rebuild cycle.
+                  #~((add-before 'build 'skip-doc-directory
+                       (lambda _
+                         (substitute* "Makefile"
+                           (("^SUBDIRS = (.*) doc(.*)$" _ before after)
+                            (string-append "SUBDIRS = " before
+                                           " " after "\n"))))))
+                  '())
+               (add-before 'check 'patch-test-files
+                  (lambda _
+                    ;; Unpatch shebangs in test input so that source-highlight
+                    ;; is still able to infer input language
+                    (substitute* '("tests/test.sh"
+                                   "tests/test2.sh"
+                                   "tests/test.tcl")
+                      (((string-append "#! *" (which "sh"))) "#!/bin/sh"))
+                    ;; Initial patching unrecoverably removes whitespace, so
+                    ;; remove it also in the comparison output.
+                    (substitute* '("tests/test.sh.html"
+                                   "tests/test2.sh.html"
+                                   "tests/test.tcl.html")
+                      (("#! */bin/sh") "#!/bin/sh")))))))
     (home-page "https://www.gnu.org/software/src-highlite/")
     (synopsis "Produce a document with syntax highlighting from a source file")
     (description
diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index aff864eb99..cadeccd660 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,6 +35,7 @@
 (define-module (gnu packages pulseaudio)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix l:)
@@ -178,57 +180,55 @@ rates.")
 (define-public pulseaudio
   (package
     (name "pulseaudio")
-    (version "15.0")
+    (version "16.1")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "https://freedesktop.org/software/pulseaudio/releases/"
-                   name "-" version ".tar.xz"))
-             (sha256
-              (base32
-               "1851rg4h6sjwanvd294hn52z321rc6vbs4gbfrlw53597dx8h2x4"))
-             (modules '((guix build utils)))
-             (snippet
-              ;; Disable console-kit support by default since it's deprecated
-              ;; anyway.
-              '(begin
-                 (substitute* "src/daemon/default.pa.in"
-                   (("load-module module-console-kit" all)
-                    (string-append "#" all "\n")))
-                 #t))
-             (patches (search-patches
-                       "pulseaudio-fix-mult-test.patch"
-                       "pulseaudio-longer-test-timeout.patch"))))
+              (method url-fetch)
+              (uri (string-append
+                    "https://freedesktop.org/software/pulseaudio/releases/"
+                    name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1r2aa0g7al9jhrrbrnih6i3bfznd73kkbafrbzwpjyflj7735vwf"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Disable console-kit support by default since it's deprecated
+               ;; anyway.
+               '(substitute* "src/daemon/default.pa.in"
+                  (("load-module module-console-kit" all)
+                   (string-append "#" all "\n"))))
+              (patches (search-patches
+                        "pulseaudio-fix-mult-test.patch"
+                        "pulseaudio-longer-test-timeout.patch"))))
     (build-system meson-build-system)
     (arguments
-     `(#:configure-flags
-       (let ((out (assoc-ref %outputs "out")))
-         (list "-Doss-output=disabled"
-               "-Dlocalstatedir=/var"
-               (string-append "-Dudevrulesdir="
-                              out "/lib/udev/rules.d")
-               ;; Ensure the RUNPATH contains all installed library locations.
-               (string-append "-Dc_link_args=-Wl,-rpath="
-                              out "/lib/pulseaudio:"
-                              out "/lib:"
-                              out "/lib/pulse-" ,version "/modules")))
-       #:phases (modify-phases %standard-phases
-                 (add-before 'check 'pre-check
-                   (lambda _
-                     ;; 'tests/lock-autospawn-test.c' wants to create a file
-                     ;; under ~/.config/pulse.
-                     (setenv "HOME" (getcwd))
-                     ;; 'thread-test' needs more time on hydra and on slower
-                     ;; machines, so we set the default timeout to 120 seconds.
-                     (setenv "CK_DEFAULT_TIMEOUT" "120")
-                     #t)))))
+     (list
+      #:configure-flags
+      #~(list "-Doss-output=disabled"
+              "-Dlocalstatedir=/var"
+              (string-append "-Dudevrulesdir="
+                             #$output "/lib/udev/rules.d")
+              ;; Ensure the RUNPATH contains all installed library locations.
+              (string-append "-Dc_link_args=-Wl,-rpath="
+                             #$output "/lib/pulseaudio:"
+                             #$output "/lib:"
+                             #$output "/lib/pulse-" #$version "/modules"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'pre-check
+            (lambda _
+              ;; 'tests/lock-autospawn-test.c' wants to create a file
+              ;; under ~/.config/pulse.
+              (setenv "HOME" (getcwd))
+              ;; 'thread-test' needs more time on hydra and on slower
+              ;; machines, so we set the default timeout to 120 seconds.
+              (setenv "CK_DEFAULT_TIMEOUT" "120"))))))
     (inputs
      (list alsa-lib
            bluez
            sbc
            speexdsp
            libsndfile
-           jack-1 ; For routing the output to jack.
+           jack-1                       ; For routing the output to jack.
            dbus
            glib
            libltdl
@@ -241,16 +241,16 @@ rates.")
            libxcb
            libxtst
            elogind
-           eudev))         ;for the detection of hardware audio devices
+           eudev))                ;for the detection of hardware audio devices
     (native-inputs
-     `(("check" ,check)
-       ("doxygen" ,doxygen)
-       ("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin")
-       ("m4" ,m4)
-       ("perl" ,perl)
-       ("perl-xml-parser" ,perl-xml-parser)
-       ("pkg-config" ,pkg-config)))
+     (list check
+           doxygen
+           gettext-minimal
+           `(,glib "bin")
+           m4
+           perl
+           perl-xml-parser
+           pkg-config))
     (propagated-inputs
      ;; 'libpulse*.la' contain `-ltdb' and `-lcap', so propagate them.
      (list libcap tdb))
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 41a6997190..6ecdcb4c41 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -174,9 +174,9 @@ tests in cram.")
                (add-installed-pythonpath inputs outputs)
                (invoke "pytest")))))))
     (native-inputs
-     (list python-pytest-flake8 python-pytest-xdist-next python-tabulate))
+     (list python-pytest-flake8 python-pytest-xdist python-tabulate))
     (propagated-inputs
-     (list python-pytest-6 python-six))
+     (list python-pytest python-six))
     (home-page "https://github.com/nicoulaj/pytest-csv")
     (synopsis "CSV reporter for Pytest")
     (description "This package provides a plugin for Pytest that enables a
@@ -249,7 +249,10 @@ are useful when writing automated tests in Python.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1915ab77nfb1rfw4i2ps0zy19wpf20lwxn81qxxbwyd2gy7m0fn8"))))
+         "1915ab77nfb1rfw4i2ps0zy19wpf20lwxn81qxxbwyd2gy7m0fn8"))
+       (modules '((guix build utils)))
+       (snippet '(substitute* "setup.py"
+                  (("'coverage>=4.1,<6.0',") "'coverage',")))))
     (build-system python-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -260,7 +263,8 @@ are useful when writing automated tests in Python.")
                   (replace 'check
                     (lambda* (#:key tests? #:allow-other-keys)
                       (if tests?
-                          (invoke "pytest" "-vv")
+                          ;; Test fails for unknown reasons. No fix available.
+                          (invoke "pytest" "-vv" "-k" "not test_reporter_with_branches")
                           (format #t "test suite not run~%")))))))
     (propagated-inputs
      (list python-coverage python-docopt python-pyyaml python-requests))
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index c9071c4cf6..602768ae85 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -75,30 +75,6 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (srfi srfi-1))
 
-(define-public python-potr
-  (package
-    (name "python-potr")
-    (version "1.0.2")
-    (source
-     (origin
-       (method git-fetch)
-       (uri
-        (git-reference
-         (url "https://github.com/python-otr/pure-python-otr")
-         (commit version)))
-       (file-name
-        (git-file-name name version))
-       (sha256
-        (base32 "1hzw6h01fm216nmipyylgz0zybd80w1xsk12m7djycnhqrnrvvv1"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     (list python-pycrypto))
-    (synopsis "Python OTR Implementation")
-    (description "Python OTR is an Off-The-Record Protocol Implementation in
-Python.  It does not bind to libotr.")
-    (home-page "https://github.com/python-otr/pure-python-otr")
-    (license license:lgpl3+)))
-
 (define-public python-base58
   (package
     (name "python-base58")
@@ -264,41 +240,6 @@ messages, and verify the signatures.  The keys and signatures are very short,
 making them easy to handle and incorporate into other protocols.")
     (license license:expat)))
 
-;;; Pycrypto is abandoned upstream:
-;;;
-;;; https://github.com/dlitz/pycrypto/issues/173
-;;;
-;;; TODO Remove this package from GNU Guix.
-(define-public python-pycrypto
-  (package
-    (name "python-pycrypto")
-    (version "2.6.1")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "pycrypto" version))
-      (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"
-                               "python-pycrypto-time-clock.patch"))
-      (sha256
-       (base32
-        "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
-    (build-system python-build-system)
-    (inputs
-     (list python gmp))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'set-build-env
-           ;; pycrypto runs an autoconf configure script behind the scenes
-           (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
-    (home-page "https://www.dlitz.net/software/pycrypto/")
-    (synopsis "Cryptographic modules for Python")
-    (description
-     "Pycrypto is a collection of both secure hash functions (such as SHA256
-and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
-etc.).  The package is structured to make adding new modules easy.")
-    (license license:public-domain)))
-
 (define-public python-kerberos
   (package
     (name "python-kerberos")
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 072d160c26..bb36591a54 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1350,7 +1350,7 @@ and that could be anything you want.")
                (add-installed-pythonpath inputs outputs)
                (invoke "python" "-m" "pytest" "-vv" "test")))))))
     (native-inputs
-     (list python-hypothesis-next python-pytest))
+     (list python-hypothesis python-pytest))
     (propagated-inputs
      (list python-hpack python-hyperframe))
     (home-page "https://github.com/python-hyper/h2")
@@ -2192,14 +2192,14 @@ connection to each user.")
 (define-public python-tornado-6
   (package
     (name "python-tornado")
-    (version "6.1")
+    (version "6.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "tornado" version))
        (sha256
         (base32
-         "14cpzdv6p6qvk6vn02krdh5rcfdi174ifdbr5s6lcnymgcfyiiik"))))
+         "04rwzjfqa31ajz8vvkfcsp1539m8n960msnppxkcckp8plch8qwv"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
@@ -3606,15 +3606,15 @@ Python.")
              (when tests?
                (invoke "pytest" "-v")))))))
     (native-inputs
-     (list python-mock
-           python-pytest
+     (list python-pytest
            python-pytest-asyncio
            python-pytest-httpserver))
     (propagated-inputs
      (list python-requests
-           python-cookies
-           python-six
-           python-types-toml))
+           python-toml
+           python-types-toml
+           python-typing-extensions
+           python-urllib3))
     (home-page "https://github.com/getsentry/responses")
     (synopsis "Utility for mocking out the `requests` Python library")
     (description "A utility library for mocking out the `requests` Python
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index abe4862121..0f3f85e376 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2017, 2021, 2022 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
@@ -1059,7 +1059,7 @@ generator MkDocs.")
 (define-public python-slixmpp
   (package
     (name "python-slixmpp")
-    (version "1.5.2")
+    (version "1.8.3")
     (source
      (origin
        (method git-fetch)
@@ -1071,7 +1071,7 @@ generator MkDocs.")
        (file-name
         (git-file-name name version))
        (sha256
-        (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
+        (base32 "0cvr037qhf0fpby5dci6ckqngaly1mnjs2zpndwgmvr3dyvrd8l8"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1087,7 +1087,12 @@ generator MkDocs.")
        ("gnupg" ,gnupg)
        ("pkg-config" ,pkg-config)))
     (propagated-inputs
-     (list python-aiodns python-aiohttp python-pyasn1
+     (list python-aiodns
+           python-aiohttp
+           python-cryptography
+           python-defusedxml
+           python-emoji
+           python-pyasn1
            python-pyasn1-modules))
     (inputs
      (list libidn python)) ; We are building a Python extension.
@@ -3018,14 +3023,14 @@ lossless but can be tweaked for more aggressive cleaning.")
 (define-public python-mechanize
   (package
     (name "python-mechanize")
-    (version "0.4.5")
+    (version "0.4.7")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "mechanize" version))
       (sha256
        (base32
-        "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
+        "02b845y85ka5sl2cj93lll3v326d8bww07bq1q0y1643h7sshwqp"))))
     (build-system python-build-system)
     (propagated-inputs
      (list python-html5lib))
@@ -3430,6 +3435,7 @@ and is not compatible with JSON.")
     (build-system python-build-system)
     (arguments
      (list
+      #:tests? #f                       ;TODO: Circular dependency on pytest
       #:phases
       #~(modify-phases %standard-phases
           ;; XXX: PEP 517 manual build/install procedures copied from
@@ -3449,7 +3455,7 @@ and is not compatible with JSON.")
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
                 (invoke "pytest" "-vv" "tests")))))))
-    (native-inputs (list python-flit-scm python-pypa-build python-pytest))
+    (native-inputs (list python-flit-scm python-pypa-build))
     (home-page "https://github.com/agronholm/exceptiongroup")
     (synopsis "PEP 654 backport from Python 3.11")
     (description "This is a backport of the @code{BaseExceptionGroup} and
@@ -3612,14 +3618,14 @@ port forwards using @acronym{UPnP, Universal Plug and Play}.")
 (define-public python-py
   (package
     (name "python-py")
-    (version "1.10.0")
+    (version "1.11.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "py" version))
        (sha256
         (base32
-         "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
+         "06c7m7sfcn7587xd4s2bng8m6q1gsfd3j93afhplfjq74r0mrisi"))))
     (build-system python-build-system)
     (arguments
      ;; FIXME: "ImportError: 'test' module incorrectly imported from
@@ -4202,6 +4208,18 @@ JavaScript-like message boxes.  Types of dialog boxes include:
                (base32
                 "1ynkqpv2akldmvkll5vh5zhwj433s1d59iv0f76lygyak4silgwr"))))
     (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'skip-broken-test
+            (lambda _
+              ;; FIXME: This test fails for no good reason:
+              ;; https://github.com/pympler/pympler/issues/153
+              (substitute* "test/muppy/test_tracker.py"
+                (("^([[:blank:]]+)def test_stracker_create_summary" all indent)
+                 (string-append indent "@unittest.skipIf(True, \
+'Fails on Guix too for unknown reasons')\n" all))))))))
     (synopsis "Measure, monitor and analyze memory behavior")
     (description
      "Pympler is a development tool to measure, monitor and analyze
@@ -4461,14 +4479,14 @@ possible.")
 (define-public python-markupsafe
   (package
     (name "python-markupsafe")
-    (version "2.0.1")
+    (version "2.1.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "MarkupSafe" version))
        (sha256
         (base32
-         "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
+         "0jqxp5sfrc0byp6bk0gwdmildi4mck2gprp42afri3z4r5y1k4bz"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -6219,7 +6237,7 @@ writing C extensions for Python as easy as Python itself.")
 (define-public python-numpy
   (package
     (name "python-numpy")
-    (version "1.21.6")
+    (version "1.23.2")
     (source
      (origin
        (method url-fetch)
@@ -6228,7 +6246,7 @@ writing C extensions for Python as easy as Python itself.")
              version "/numpy-" version ".tar.gz"))
        (sha256
         (base32
-         "0b0c5y35rd3mvwfk5is1d5ppfw9nl4d2rgx9xkwh1p0w394wdvyl"))))
+         "00bx3idjwhmzkdawg2dx1bp0316ig37jfx0dm82bvyv1hbj013dp"))))
     (build-system python-build-system)
     (arguments
      (list
@@ -6250,7 +6268,10 @@ writing C extensions for Python as easy as Python itself.")
 [openblas]
 libraries = openblas
 library_dirs = ~a/lib
-include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))
+include_dirs = ~:*~a/include~%"
+                          (dirname (dirname
+                                    (search-input-file
+                                     inputs "include/openblas_config.h"))))))))
           (add-before 'build 'fix-executable-paths
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
@@ -6274,7 +6295,11 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))
                               ;; These tests may fail on 32-bit systems (see:
                               ;; https://github.com/numpy/numpy/issues/18387).
                               "not test_float_remainder_overflow "
-                              "and not test_pareto"
+                              "and not test_pareto "
+                              ;; The 'test_rint_big_int' test fails on older
+                              ;; x86_64 CPUs such as the Core 2 Duo (see:
+                              ;; https://github.com/numpy/numpy/issues/22170).
+                              "and not test_rint_big_int "
                               ;; These tests seem to fail on machines without
                               ;; an FPU is still under investigation upstream.
                               ;; https://github.com/numpy/numpy/issues/20635
@@ -6284,9 +6309,10 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))
                                    '())))))))))
     (native-inputs
      (list python-cython
-           python-hypothesis-next
+           python-hypothesis
            python-pytest
            python-pytest-xdist
+           python-typing-extensions
            gfortran))
     (inputs (list bash openblas))
     (home-page "https://numpy.org")
@@ -6300,22 +6326,6 @@ capabilities.")
      '((upstream-name . "numpy")))
     (license license:bsd-3)))
 
-(define-public python-numpy-next
-  (package
-    (inherit python-numpy)
-    (name "python-numpy-next")
-    (version "1.22.3")
-    (source
-     (origin
-       (inherit (package-source python-numpy))
-       (method url-fetch)
-       (uri (string-append
-             "https://github.com/numpy/numpy/releases/download/v"
-             version "/numpy-" version ".tar.gz"))
-       (sha256
-        (base32
-         "19dw91pqbqcniw2z57kiyqs1qp56g7kqy1bdyv664g8s62sc01m9"))))))
-
 (define-public python-numpy-documentation
   (package
     (inherit python-numpy)
@@ -7061,9 +7071,16 @@ tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk"))))))
                   (invoke "pytest"
                           "-n" (number->string (parallel-job-count))
                           "-m" "not network" "--pyargs" "matplotlib"
-                          ;; The 'test_lazy_auto_backend_selection' fails
-                          ;; because it would require an X server; skip it.
-                          "-k" "not test_lazy_auto_backend_selection"))))))))
+                          "-k"
+                          (string-append
+                           ;; The 'test_lazy_auto_backend_selection' fails
+                           ;; because it would require an X server; skip it.
+                           "not test_lazy_auto_backend_selection"
+                           ;; test_getattr fails for the GTK backend because
+                           ;; of an unexpected warning from Python 3.10
+                           ;; (via the gi module):
+                           ;; https://gitlab.gnome.org/GNOME/pygobject/-/issues/494
+                           " and not test_getattr")))))))))
     (propagated-inputs
      (list gobject-introspection
            python-cairocffi
@@ -7546,31 +7563,43 @@ by pycodestyle.")
 (define-public python-distlib
   (package
     (name "python-distlib")
-    (version "0.3.1")
+    (version "0.3.5")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "distlib" version ".zip"))
+       (uri (pypi-uri "distlib" version))
        (sha256
         (base32
-         "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
+         "1zmjraasgqkz0gfv4mc4w4fj4k2fxj62h1pf5dgb5qqbqwvmgxx7"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'no-/bin/sh
-           (lambda _
-             (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
-               (("/bin/sh") (which "sh")))
-             #t))
-         (add-before 'check 'prepare-test-env
-           (lambda _
-             (setenv "HOME" "/tmp")
-             ;; NOTE: Any value works, the variable just has to be present.
-             (setenv "SKIP_ONLINE" "1")
-             #t)))))
-    (native-inputs (list unzip))
-    (home-page "https://bitbucket.org/pypa/distlib")
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda _
+              ;; ZIP does not support timestamps before 1980.
+              (setenv "SOURCE_DATE_EPOCH" "315532800")
+              (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+          (add-before 'build 'no-/bin/sh
+            (lambda _
+              (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
+                (("/bin/sh") (which "sh")))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (setenv "HOME" "/tmp")
+              ;; NOTE: Any value works, the variable just has to be present.
+              (setenv "SKIP_ONLINE" "1")
+              (when tests?
+                (invoke "pytest" "-vv"))))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl)))))))
+    (native-inputs
+     (list python-pypa-build python-pytest))
+    (home-page "https://github.com/pypa/distlib")
     (synopsis "Distribution utilities")
     (description "Distlib is a library which implements low-level functions that
 relate to packaging and distribution of Python software.  It is intended to be
@@ -8771,14 +8800,14 @@ older Python versions.")
 (define-public python-importlib-metadata
   (package
     (name "python-importlib-metadata")
-    (version "4.11.3")
+    (version "5.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "importlib_metadata" version))
        (sha256
         (base32
-         "0f951zynlh39yicqnhrs3p1qa5p3g6ajjfcggf12y51ppxz5jk7a"))))
+         "1kf7qclcz820xl5wwjpzcwpfy6shj7ymwh4xzxvpl2xs5gb4hka0"))))
     (build-system python-build-system)
     (arguments
      (list
@@ -9558,13 +9587,13 @@ abstract syntax tree (AST) nodes without side effects.")
 (define-public python-asttokens
   (package
     (name "python-asttokens")
-    (version "2.0.5")
+    (version "2.2.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "asttokens" version))
        (sha256
-        (base32 "1mglbkikxvnhrk3inbx0v1qzxwd38qjr6l35sn098yicy0ac2m4s"))))
+        (base32 "1wwlpvnrh67z4228841zgpqc46vigslzmbvk2izbfc3g585i28j6"))))
     (build-system python-build-system)
     (propagated-inputs (list python-six))
     (native-inputs (list python-astroid python-pytest python-setuptools-scm))
@@ -9623,13 +9652,13 @@ than the default.")
 (define-public python-ipython
   (package
     (name "python-ipython")
-    (version "8.2.0")
+    (version "8.5.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ipython" version ".tar.gz"))
        (sha256
-        (base32 "1hcxa713wh3axa57412iy02rj0494ljvv6gpnls4lndc5h9yprbh"))))
+        (base32 "114z175hnv1lgprj06zfcil7lkq013rggjbrc43gsxkmv1fdyyq9"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -12052,13 +12081,13 @@ number of lines in the contained files easily.")
   (hidden-package
    (package
      (name "python-fonttools")
-     (version "4.28.5")
+     (version "4.37.1")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "fonttools" version ".zip"))
                (sha256
                 (base32
-                 "1jhl5n3rfqq7fznvsh6r80n7ylap1a7ppq1040y8cflhyz80ap2l"))))
+                 "1ryc1wca2v92wn24baryj5fr32lspl8rbsig32fnkxp1islf21j6"))))
      (build-system python-build-system)
      (native-inputs
       (list unzip))
@@ -12111,18 +12140,6 @@ from an XML-based format.")
            python-zopfli))
     (properties (alist-delete 'hidden? (package-properties python-fonttools)))))
 
-(define-public python-fonttools-next
-  (package
-    (inherit python-fonttools-full)
-    (version "4.37.1")
-    (source (origin
-              (inherit (package-source python-fonttools-full))
-              (method url-fetch)
-              (uri (pypi-uri "fonttools" version ".zip"))
-              (sha256
-               (base32
-                "1ryc1wca2v92wn24baryj5fr32lspl8rbsig32fnkxp1islf21j6"))))))
-
 (define-public python-ly
   (package
     (name "python-ly")
@@ -12148,14 +12165,14 @@ provided that can be used to do various manipulations with LilyPond files.")
 (define-public python-appdirs
   (package
     (name "python-appdirs")
-    (version "1.4.3")
+    (version "1.4.4")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "appdirs" version))
         (sha256
           (base32
-            "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
+            "0hfzmwknxqhg20aj83fx80vna74xfimg8sk18wb85fmin9kh2pbx"))))
     (build-system python-build-system)
     (home-page "https://github.com/ActiveState/appdirs")
     (synopsis
@@ -13719,20 +13736,21 @@ Debian-related files, such as:
 (define-public python-json-spec
   (package
     (name "python-json-spec")
-    (version "0.10.1")
+    (version "0.11.0")
     (source
       (origin
         (method url-fetch)
-        (uri (pypi-uri "json-spec" version))
+        (uri (pypi-uri "json_spec" version))
         (sha256
           (base32
-            "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
+            "0fwxirzxx5s9l0lwnjl6ki39xw1fsjm0vr6cm67ws27fkmcxcry7"))))
     (build-system python-build-system)
     (propagated-inputs
-      (list python-pathlib python-six))
+      (list python-importlib-metadata
+            python-termcolor))
     (native-inputs
       (list python-pytest))
-    (home-page "http://py.errorist.io/json-spec")
+    (home-page "https://json-spec.readthedocs.io/")
     (synopsis
       "JSON Schema, JSON Pointer and JSON Reference for Python")
     (description
@@ -13798,8 +13816,7 @@ significantly better performance.")
             python-pylint
             python-pytest
             python-pytest-benchmark
-            python-pytest-cache
-            python-validictory))
+            python-pytest-cache))
     (home-page
       "https://github.com/horejsek/python-fastjsonschema")
     (synopsis
@@ -14064,7 +14081,8 @@ time.")
      (list python-ipykernel
            ;; Adding ipywidgets would create a cycle.
            ;;python-ipywidgets
-           ;;python-pyppeteer    ;TODO: package me
+           ;; XXX: Disabled, not in guix.
+           ;;python-pyppeteer
            python-pytest
            python-pytest-xdist))
     (propagated-inputs
@@ -14090,14 +14108,14 @@ time.")
            texlive-caption
            texlive-enumitem
            texlive-fontspec
-           texlive-generic-iftex
+           texlive-iftex
            texlive-grffile
            texlive-hyperref
-           texlive-latex-fancyvrb
+           texlive-fancyvrb
            texlive-latex-float
            texlive-latex-geometry
            texlive-latex-jknapltx
-           texlive-latex-ms
+           texlive-ms
            texlive-latex-parskip
            texlive-latex-trimspaces
            texlive-latex-upquote
@@ -15860,27 +15878,27 @@ of @acronym{REGEXPs, regular expressions}.")
 (define-public python-mako
   (package
     (name "python-mako")
-    (version "1.1.3")
+    (version "1.2.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Mako" version))
        (sha256
         (base32
-         "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
+         "0gqnv9py1dqp01jmf5zxp0vj2dbhq1l9zy55fai319iv6sdqc91p"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (replace 'check
                     (lambda* (#:key tests? #:allow-other-keys)
                       (if tests?
-                          (invoke "nosetests" "-v")
+                          (invoke "pytest" "-vv")
                           (format #t "test suite not run~%"))
                       #t)))))
     (propagated-inputs
      (list python-markupsafe))
     (native-inputs
-     (list python-mock python-nose))
+     (list python-mock python-pytest))
     (home-page "https://www.makotemplates.org/")
     (synopsis "Templating language for Python")
     (description "Mako is a templating language for Python that compiles
@@ -16432,7 +16450,7 @@ import platform
   reason=\"Fails on 32 bit architectures\")
 " m))))))))
     (build-system python-build-system)
-    (native-inputs (list python-pytest-6))
+    (native-inputs (list python-pytest))
     (home-page "https://software.clapper.org/munkres/")
     (synopsis "Implementation of the Munkres algorithm")
     (description "The Munkres module provides an implementation of the Munkres
@@ -16774,9 +16792,7 @@ for Python inspired by modern web development.")
      (list which))
     (inputs
      ;; python-magic needs to be able to find libmagic.so.
-     ;; Use a newer version because 5.39 returns bogus for some archives
-     ;; (notably Chromium .crx extensions), which breaks e.g. 'diffoscope'.
-     (list file-next))
+     (list file))
     (synopsis "File type identification using libmagic")
     (description
      "This module uses ctypes to access the libmagic file type
@@ -17566,13 +17582,13 @@ docstring and colored output.")
 (define-public python-tomlkit
   (package
     (name "python-tomlkit")
-    (version "0.7.0")
+    (version "0.11.6")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "tomlkit" version))
        (sha256
-        (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
+        (base32 "0wsxnv9bs7jk8ig8blj9c438a1ygvdad7y9cn1zr720nfbjm5fbi"))))
     (build-system python-build-system)
     (native-inputs
      (list python-pytest python-pyyaml))
@@ -17730,7 +17746,7 @@ strings require only one extra byte in addition to the strings themselves.")
                         ;; build system and new Rust dependencies.
                         "--ignore" "tests/test_preconf.py")))))))
     (native-inputs
-     (list python-hypothesis-next
+     (list python-hypothesis
            python-immutables
            python-msgpack
            python-poetry-core
@@ -18250,7 +18266,7 @@ scans through a file and detects issues.")
 (define-public python-jedi
   (package
     (name "python-jedi")
-    (version "0.18.1")
+    (version "0.18.2")
     (source
      (origin
        (method git-fetch)
@@ -18261,26 +18277,12 @@ scans through a file and detects issues.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; Adjust comprehension syntax for Python > 3.8.
-        ;; From <https://github.com/davidhalter/jedi/issues/1824>.
-        '(substitute* "test/completion/lambdas.py"
-           (("if lambda: 3")
-            "if (lambda: 3)")))))
+         "1nhsajmkn3qj32k5z3ymrd3r6dz2aliv2pqb824m5kaib986dm44"))
+       (modules '((guix build utils)))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'fix-completion-test
-           (lambda _
-             ;; This resolves a failure in the 'test_completion' test (see:
-             ;; https://github.com/davidhalter/jedi/issues/1824).
-             ;; TODO: Remove after a new release is made (currently: 0.18.1).
-             (substitute* "test/completion/lambdas.py"
-               (("\\[a for a in \\[1,2\\] if lambda: 3\\]\\[0\\]")
-                "[a for a in [1,2] if (lambda: 3)][0]"))))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
@@ -19262,42 +19264,6 @@ task each process is busy with.  The technique is used by PostgreSQL and the
 OpenSSH Server for example.")
     (license license:bsd-3)))
 
-(define-public python-validictory
-  (package
-    (name "python-validictory")
-    (version "1.0.1")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "validictory" version))
-      (sha256
-       (base32
-        "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
-    (build-system python-build-system)
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'bootstrap
-           ;; Move the tests out of the package directory to avoid
-           ;; packaging them.
-           (lambda* _
-             (rename-file "validictory/tests" "tests")
-             (delete-file "tests/__init__.py")))
-         (replace 'check
-           (lambda _
-             (invoke "py.test" "-vv" ))))))
-    (native-inputs
-     (list python-pytest))
-    (home-page
-     "https://github.com/jamesturk/validictory")
-    (synopsis "General purpose Python data validator")
-    (description "It allows validation of arbitrary Python data structures.
-
-     The schema format is based on the JSON Schema
-     proposal (http://json-schema.org), so combined with json the library is also
-     useful as a validator for JSON data.")
-  (license license:expat)))
-
 (define-public python-pyelftools
   (package
     (name "python-pyelftools")
@@ -19539,14 +19505,14 @@ from the header, as well as section details and data available.")
 (define-public python-cheetah
   (package
     (name "python-cheetah")
-    (version "3.2.4")
+    (version "3.3.1")
     (source
       (origin
         (method url-fetch)
-        (uri (pypi-uri "Cheetah3" version))
+        (uri (pypi-uri "CT3" version))
         (sha256
           (base32
-           "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
+           "1j36vampqip18jx0jzngb9rnkhhhl8hqnscg117y0d6cgrgm57qw"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -20008,21 +19974,21 @@ from the header, as well as section details and data available.")
      and bit flag values.")
     (license license:expat)))
 
-(define-public python-attrdict
+(define-public python-attrdict3
   (package
-    (name "python-attrdict")
-    (version "2.0.1")
+    (name "python-attrdict3")
+    (version "2.0.2")
     (source (origin
               (method url-fetch)
-              (uri (pypi-uri "attrdict" version))
+              (uri (pypi-uri "attrdict3" version))
               (sha256
                (base32
-                "0w3vsz64j9npxfgh83hghsh161wwkrx1fxqi1533js2wnnc0dj9m"))))
+                "1s2z6c9jam5azm746l49wsqsyi29zbbrknq1axsw230jl4f1fk00"))))
     (build-system python-build-system)
     ;; The package is no longer maintained and tests need some work.
     (arguments '(#:tests? #f))
     (propagated-inputs (list python-six))
-    (home-page "https://github.com/bcj/AttrDict")
+    (home-page "https://github.com/pirofti/AttrDict3")
     (synopsis "Attribute-style access dictionaries")
     (description
      "This package provides mapping objects whose elements can be accessed
@@ -20136,7 +20102,7 @@ both as keys and as attributes.")
 (define-public python-astroid
   (package
     (name "python-astroid")
-    (version "2.9.0")
+    (version "2.11.7")
     (source
      (origin
        (method git-fetch)
@@ -20145,7 +20111,7 @@ both as keys and as attributes.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "19iiys4233cicpm48fd7lrkm31kk47qiv44wvk952rqbcn4rd2dh"))))
+        (base32 "0lmm5bhszg1nj0xsjnh5nm39if2jzpa3ycgvhy6ddycz28dy568y"))))
     (build-system python-build-system)
     (propagated-inputs
      (list python-lazy-object-proxy python-typing-extensions python-wrapt))
@@ -22508,7 +22474,8 @@ based on the CPython 2.7 and 3.7 parsers.")
        (method url-fetch)
        (uri (pypi-uri "typeguard" version))
        (sha256
-        (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))))
+        (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))
+       (patches (search-patches "python-typeguard-python3.10.patch"))))
     (build-system python-build-system)
     (arguments
      (list
@@ -22533,26 +22500,19 @@ with PEP 484 argument (and return) type annotations.")
 (define-public python-typing-extensions
   (package
     (name "python-typing-extensions")
-    (version "4.0.1")
+    (version "4.3.0")
     (source (origin
-              ;; The test script is missing from the PyPI archive.
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/python/typing")
-                    (commit version)))
-              (file-name (git-file-name name version))
+              (method url-fetch)
+              (uri (pypi-uri "typing_extensions" version))
               (sha256
                (base32
-                "0a35fh5wk9s538x0w3dz95y0avnhd2srzyv9s1a372711n8hdl4p"))))
+                "19n4l57qazwrbvxjrbxw2vvfyd0zbk8ivnwm4zmwfzzl69x6glp6"))))
     (build-system python-build-system)
     (arguments
      (list
       #:tests? #f       ;requires Python's test module, not available in Guix
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'enter-source-directory
-            (lambda _
-              (chdir "typing_extensions")))
           ;; XXX: PEP 517 manual build copied from python-isort.
           (replace 'build
             (lambda _
@@ -22798,7 +22758,9 @@ time-based (TOTP) passwords.")
        (method url-fetch)
        (uri (pypi-uri "parso" version))
        (sha256
-        (base32 "185gkxq92kqiw2h5zp1cmyn04055x0lix4hmi5c077xm1clvw1wc"))))
+        (base32 "185gkxq92kqiw2h5zp1cmyn04055x0lix4hmi5c077xm1clvw1wc"))
+       (patches
+        (search-patches "python-parso-unit-tests-in-3.10.patch"))))
     (native-inputs
      (list python-pytest))
     (build-system python-build-system)
@@ -24026,25 +23988,19 @@ that is accessible to other projects developed in Cython.")
 (define-public python-sortedcontainers
   (package
     (name "python-sortedcontainers")
-    (version "2.1.0")
+    (version "2.4.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sortedcontainers" version))
        (sha256
         (base32
-         "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
+         "126vpywl7aly6zir033a9indgyficlzl68qls61nn2y3djhabji5"))))
     (build-system python-build-system)
     (arguments
-     ;; FIXME: Tests require many extra dependencies, and would introduce
-     ;; a circular dependency on hypothesis, which uses this package.
+     ;; TODO: Circular dependency on pytest.
      '(#:tests? #f))
-    (propagated-inputs
-     `(("python-appdirs" ,python-appdirs)
-       ("python-distlib" ,python-distlib)
-       ("python-filelock" ,python-filelock)
-       ("python-six" ,python-six-bootstrap)))
-    (home-page "https://www.grantjenks.com/docs/sortedcontainers/")
+    (home-page "https://grantjenks.com/docs/sortedcontainers/")
     (synopsis "Sorted List, Sorted Dict, Sorted Set")
     (description
      "This package provides a sorted collections library, written in
@@ -24574,13 +24530,13 @@ make your work easier.")
 (define-public python-outcome
   (package
     (name "python-outcome")
-    (version "1.0.1")
+    (version "1.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "outcome" version))
        (sha256
-        (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
+        (base32 "0wi6bmsfn73aw1hbpa1nhhshlx9k2vxcl7kp3z7h78sxwhyvv0kg"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -27803,7 +27759,7 @@ By default it uses the open Python vulnerability database Safety DB.")
     (native-inputs
      `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
                                         texlive-fonts-ec
-                                        texlive-generic-iftex
+                                        texlive-iftex
                                         texlive-hyperref
                                         texlive-oberdiek
                                         texlive-lm
@@ -29171,7 +29127,8 @@ supports x86_64 instructions up to AVX-512 and SHA.")
          (file-name (git-file-name name version))
          (sha256
           (base32
-           "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
+           "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))
+         (patches (search-patches "python-sgmllib3k-assertions.patch"))))
       (build-system python-build-system)
       (home-page "https://github.com/hsoft/sgmllib")
       (synopsis "Python 3 port of sgmllib")
@@ -29294,7 +29251,7 @@ symbolic expressions in pure Python using the technique of logical unification."
          "0w9giq196wps7mbm47c4shdzs5yvwvqajqzkim2p92i51sm5qgvm"))))
     (build-system python-build-system)
     (native-inputs
-     (list python-pytest-6 python-toml))
+     (list python-pytest python-toml))
     (propagated-inputs
      (list python-logical-unification))
     (home-page "https://github.com/pythological/python-cons")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 077814719d..3e3074d5d8 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -150,6 +150,7 @@
                                 "python-2.7-adjust-tests.patch"
                                 "python-cross-compile.patch"
                                 "python-2.7-CVE-2021-3177.patch"
+                                "python-2.7-expat-compat.patch"
                                 "python-2.7-no-static-lib.patch"))
        (modules '((guix build utils)))
        (snippet
@@ -419,11 +420,11 @@ data types.")
 ;; Current 2.x version.
 (define-public python-2 python-2.7)
 
-(define-public python-3.9
+(define-public python-3.10
   (package
     (inherit python-2)
     (name "python")
-    (version "3.9.9")
+    (version "3.10.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.python.org/ftp/python/"
@@ -433,11 +434,10 @@ data types.")
                         "python-3-deterministic-build-info.patch"
                         "python-3-fix-tests.patch"
                         "python-3-hurd-configure.patch"
-                        "python-3-search-paths.patch"
-                        "python-3-no-static-lib.patch"))
+                        "python-3-search-paths.patch"))
               (sha256
                (base32
-                "09vd7g71i11iz5ydqghwc8kaxr0vgji94hhwwnj77h3kll28r0h6"))
+                "0j6wvh2ad5jjq5n7sjmj1k66mh6lipabavchc3rb4vsinwaq9vbf"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -451,6 +451,8 @@ data types.")
                             (find-files "Lib/distutils/command" "\\.exe$"))))))
     (arguments
      (substitute-keyword-arguments (package-arguments python-2)
+       ((#:configure-flags flags)
+        `(append ,flags '("--without-static-libpython")))
        ((#:make-flags _)
         `(list (string-append
                 (format #f "TESTOPTS=-j~d" (parallel-job-count))
@@ -575,7 +577,7 @@ data types.")
             (files (list "share/zoneinfo")))))))
 
 ;; Current 3.x version.
-(define-public python-3 python-3.9)
+(define-public python-3 python-3.10)
 
 ;; Current major version.
 (define-public python python-3)
@@ -633,30 +635,38 @@ for more information.")))
     (inputs `(("bash" ,bash)))
     (propagated-inputs `(("python" ,python)))
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
-                 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
-                (mkdir-p bin)
-                (for-each
+     (list #:modules '((guix build utils))
+           #:builder
+           #~(begin
+               (use-modules (guix build utils))
+
+               ;; TODO: Remove 'assoc-ref' uses on next rebuild cycle.
+               (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
+                     (python (string-append
+                              ;; XXX: '%build-inputs' contains the native
+                              ;; Python when cross-compiling.
+                              #$(if (%current-target-system)
+                                    (this-package-input "python")
+                                    #~(assoc-ref %build-inputs "python"))
+                              "/bin/")))
+                 (mkdir-p bin)
+                 (for-each
                   (lambda (old new)
                     (symlink (string-append python old)
                              (string-append bin "/" new)))
                   `("python3" ,"pydoc3" ,"pip3")
                   `("python"  ,"pydoc"  ,"pip"))
-                ;; python-config outputs search paths based upon its location,
-                ;; use a bash wrapper to avoid changing its outputs.
-                (let ((bash (string-append (assoc-ref %build-inputs "bash")
-                                           "/bin/bash"))
-                      (old  (string-append python "python3-config"))
-                      (new  (string-append bin "/python-config")))
-                  (with-output-to-file new
-                    (lambda ()
-                      (format #t "#!~a~%" bash)
-                      (format #t "exec \"~a\" \"$@\"~%" old)
-                      (chmod new #o755))))))))
+                 ;; python-config outputs search paths based upon its location,
+                 ;; use a bash wrapper to avoid changing its outputs.
+                 (let ((bash (string-append (assoc-ref %build-inputs "bash")
+                                            "/bin/bash"))
+                       (old  (string-append python "python3-config"))
+                       (new  (string-append bin "/python-config")))
+                   (with-output-to-file new
+                     (lambda ()
+                       (format #t "#!~a~%" bash)
+                       (format #t "exec \"~a\" \"$@\"~%" old)
+                       (chmod new #o755))))))))
     (synopsis "Wrapper for the Python 3 commands")
     (description
      "This package provides wrappers for the commands of Python@tie{}3.x such
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 2e9cc3e1f5..1b94b9866e 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015, 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
@@ -125,6 +125,8 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define %qt-version "5.15.8")
+
 (define-public qite
   (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
         (revision "74"))
@@ -337,13 +339,13 @@ system, and the core design of Django is reused in Grantlee.")
 (define-public qtbase-5
   (package
     (name "qtbase")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
               (method url-fetch)
               (uri (qt-urls name version))
               (sha256
                (base32
-                "1p2fa94m1y8qzhdfi2d7dck93qh1lgsinibwl1wy92bwmacwfhhc"))
+                "175ynjndpzsw69vnsq4swykn9f48568ww9b4z3yw7azkqwk13cdz"))
               ;; Use TZDIR to avoid depending on package "tzdata".
               (patches (search-patches "qtbase-use-TZDIR.patch"
                                        "qtbase-moc-ignore-gcc-macro.patch"
@@ -872,13 +874,13 @@ developers using C++ or QML, a CSS & JavaScript like language.")
   (package
     (inherit qtbase-5)
     (name "qt3d")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
               (method url-fetch)
               (uri (qt-urls name version))
               (sha256
                (base32
-                "1m3y7d58crn0qgfwkimxcggssn2pbs8nj5b9diwns6rwqg4aqk20"))))
+                "18hbv4l9w0czaxcch6af9130fgs4sf400xp0pfzl81c78fwrkfsb"))))
     (propagated-inputs `())
     (native-inputs (list perl))
     (inputs (list mesa qtbase-5 vulkan-headers zlib))
@@ -964,13 +966,13 @@ came with the @{qtgraphicaleffects} Qt 5 package.")
   (package
     (inherit qtbase-5)
     (name "qtsvg")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
               (method url-fetch)
               (uri (qt-urls name version))
               (sha256
                (base32
-                "0cdhmhxngv4y7kl5vbcii4l4anbz0hj7dvhlddy1agyl19j9xky4"))))
+                "0qnmcvp5jap4qq9w7xak66g6fsb48q1lg02rn4lycvnhgwzblbww"))))
     (propagated-inputs `())
     (native-inputs (list perl))
     (inputs
@@ -1063,13 +1065,13 @@ HostData=lib/qt5
 (define-public qtimageformats
   (package (inherit qtsvg-5)
     (name "qtimageformats")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1xjb2z2h1ajw7z9cwq8djpdvjwalpnmirwcwrlbjqv5r4ghmi82a"))
+               "0c6fq9zcw5hbkiny56wx2fbm123x14l7habydv6zhvnhn3rhwi31"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -1090,13 +1092,13 @@ support for MNG, TGA, TIFF and WBMP image formats.")))
 (define-public qtx11extras
   (package (inherit qtsvg-5)
     (name "qtx11extras")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0wxsrnnkkn68myy211rfz98brs7j3qmx3hmy097vh5avgsmw11bn"))))
+               "1gzmf0y2byzrgfbing7xk3cwlbk1cyjlhqjbfh8n37y09gg65maf"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1155,13 +1157,13 @@ XLSX document format.")
 (define-public qtxmlpatterns
   (package (inherit qtsvg-5)
     (name "qtxmlpatterns")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "065vj1gk5i4cg0f9spksyb9ps4px0vssx262y77aakvw408vfmq5"))))
+               "1inf7ar32a557faqpwdsmafhz1p6k8hywpw3wbsdjlj74dkgdq35"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -1183,13 +1185,13 @@ xmlpatternsvalidator.")))
 (define-public qtdeclarative-5
   (package (inherit qtsvg-5)
     (name "qtdeclarative")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0ji5131g7h2mrgxw1wxc5mcvmsn3fbw64j28gzpa25gv3vcnkhaw"))))
+               "1kb8nj17vmnky0ayiwypim7kf6rmlmfcjf6gnrw8rydmp61w0vh2"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f)             ;TODO: Enable the tests
@@ -1364,13 +1366,13 @@ integrate QML code with JavaScript and C++.")
 (define-public qtconnectivity
   (package (inherit qtsvg-5)
     (name "qtconnectivity")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0b2dnxw1rjbp1srhgns148cwl99f50mx29588dal3avv0f73s597"))))
+               "1j6qgkg77ycwcjxnhh38i9np1z8pjsqrzvfk3zsyq07f6k563fnc"))))
     (native-inputs
      (list perl pkg-config qtdeclarative-5))
     (inputs
@@ -1382,13 +1384,13 @@ with Bluetooth and NFC.")))
 (define-public qtwebsockets-5
   (package (inherit qtsvg-5)
     (name "qtwebsockets")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0f120rfqnmlffjhrm5jbpipk1qsbzp1a2v3q8gz94hz6n9dqpav6"))))
+               "12h520lpj2pljgkyq36p1509mw4pxgb76n30d32kg52crjsk34pa"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -1444,13 +1446,13 @@ consume data received from the server, or both.")
 (define-public qtsensors
   (package (inherit qtsvg-5)
     (name "qtsensors")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0zlhm4js02niibb23rw87wf4ik0gy4ai08fwprnwy7zf4rm1ss3d"))))
+               "1fdpgbikvxjacyipcyac0czqhv96pvc75dl9cyafslws8m53fm56"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:parallel-tests? _ #f) #f) ; can lead to race condition
@@ -1473,13 +1475,13 @@ recognition API for devices.")))
   (package
     (inherit qtsvg-5)
     (name "qtmultimedia")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0q76iy1frcgm85mid17lh4p6gnn04n19n6zklgpv4w3md1ng97xw"))
+               "1fz0ffpckvbg6qfhab2rrzfnvh4mlalqxcn0kbkd21mi44apjirk"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -1611,7 +1613,7 @@ set of plugins for interacting with pulseaudio and GStreamer.")
 (define-public qtwayland-5
   (package (inherit qtsvg-5)
     (name "qtwayland")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
@@ -1620,7 +1622,7 @@ set of plugins for interacting with pulseaudio and GStreamer.")
                                       "qtwayland-cleanup-callbacks.patch"))
              (sha256
               (base32
-               "0yy8qf9kn15iqsxi2r7jbcsc0vsdyfz7bbxmfn4i9qmz1yvg0jgr"))))
+               "0aa5jcvvap6qca6imdkhs1mhv5bnaxn466mmpl7x78jx1za7n3ps"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -1711,13 +1713,13 @@ compositor libraries.")
 (define-public qtserialport
   (package (inherit qtsvg-5)
     (name "qtserialport")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0xg2djwhrj5jqamawlp75g70nmwbp2ph2hh1pm45s36jkxm0k7al"))))
+               "04i8pdyml1sw4dkk9vyw2xy5bz3fp6f90fws7ag5y8iizfgs5v2v"))))
     (native-inputs (list perl))
     (inputs
      (list qtbase-5 eudev))
@@ -1740,13 +1742,13 @@ interacting with serial ports from within Qt.")))
 (define-public qtserialbus
   (package (inherit qtsvg-5)
     (name "qtserialbus")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "180gm1jvqfn0h3251zafdd1wd3af00phwaa5qljsbrj6s6ywj79j"))))
+               "0ws3pjbp4g8f49k8q0qa5hgyisbyk3m7kl8pwzkfws048glvz570"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases '%standard-phases)
@@ -1769,13 +1771,13 @@ and others.")))
 (define-public qtwebchannel-5
   (package (inherit qtsvg-5)
     (name "qtwebchannel")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1w8mcpdqlphgg3a6yfq18liwlj2nkwrafv0n80h242x5l2mk3ljf"))))
+               "1pfmy6fqis47awjb590r63y13vvsfm0fq70an3ylsknhyq3firgn"))))
     (native-inputs
      (list perl qtdeclarative-5 qtwebsockets-5))
     (inputs (list qtbase-5))
@@ -1825,13 +1827,13 @@ application).")
 (define-public qtwebglplugin
   (package (inherit qtsvg-5)
     (name "qtwebglplugin")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1m0p4ssykw07lbip2qyv6w34f8ng13bxb63j0w446f5w0492nn9f"))))
+               "1gvzhgfn55kdp5g11fg5yja5xb6wghx5sfc8vfp8zzpxnak7pbn1"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -1853,13 +1855,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.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0arwaky3jy5ql3z4d8f7k7diidzb1kncdans7pn50hsa1bzacfal"))))
+               "1b03dzlff840n2i53r105c7sv91ivwzxn7ldpgnhiyrhr897i9kj"))))
     (native-inputs
      (list perl))
     (inputs
@@ -1872,13 +1874,13 @@ native APIs where it makes sense.")))
 (define-public qtlocation
   (package (inherit qtsvg-5)
     (name "qtlocation")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0mlhhhcxx3gpr9kh04c6fljxcj50c2j21r0wb9f7d7nk4flip7b2"))))
+               "0r16qxy0pfpwvna4gpz67jk3qv3qizfd659kc9iwdh8bhz7lpjrw"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f)   ; TODO: Enable the tests
@@ -1930,13 +1932,13 @@ plugin for Adobe After Effects.")
 (define-public qttools-5
   (package (inherit qtsvg-5)
     (name "qttools")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0v7wkzq9i8w3qrw0z8al7lb6clr57lfisyb1fm9cnhi73fvph1vd"))))
+               "1i79fwsn799x3n3jidp3f4gz9d5vi9gg6p8g8lbswb832gggigm3"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2013,13 +2015,13 @@ the Qt community.")
 (define-public qtscript
   (package (inherit qtsvg-5)
     (name "qtscript")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "17yk0p8ci47xlfpllc17arlycng47wrnnskimskzz85bspabc8pm"))
+               "0rjj1pn0fwdq0qz0nzisxza671ywfrq5cv6iplywfyflh7q4dmcs"))
              (patches (search-patches "qtscript-disable-tests.patch"))))
     (native-inputs
      (list perl qttools-5))
@@ -2033,13 +2035,13 @@ ECMAScript and Qt.")))
 (define-public qtquickcontrols-5
   (package (inherit qtsvg-5)
     (name "qtquickcontrols")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0mjw25wcgd2bvjz9rr4qjydb423c63615rcx1vws4jmydqdihssr"))))
+               "0yp47bpkfckms76vw0hrwnzchy8iak23ih6w9pnwrnjkmbc65drc"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2053,7 +2055,7 @@ can be used to build complete interfaces in Qt Quick.")))
 (define-public qtquickcontrols2-5
   (package (inherit qtsvg-5)
     (name "qtquickcontrols2")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
@@ -2080,13 +2082,13 @@ not available.")))
 (define-public qtgraphicaleffects
   (package (inherit qtsvg-5)
     (name "qtgraphicaleffects")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0xznn5zqp6xrqfgl54l8cig9asqf9m2hz0p3ga514rh8spmdazr3"))))
+               "0wypji8i19kjq18qd92z8kkd3fj2n0d5hgh6xiza96833afvibj9"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2103,13 +2105,13 @@ coloring, and many more.")))
 (define-public qtgamepad
   (package (inherit qtsvg-5)
     (name "qtgamepad")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0wa4d8f025hlp4bmdzdy5wcahm9wjg6bkwig8dpw9nrsj3idz5b0"))))
+               "0vgxprgk7lak209wsg2ljzfkpwgjzscpbxmj5fyvvwm2pbnpspvk"))))
     (native-inputs
      (list perl pkg-config))
     (inputs
@@ -2129,13 +2131,13 @@ and mobile applications targeting TV-like form factors.")))
 (define-public qtscxml
   (package (inherit qtsvg-5)
     (name "qtscxml")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0xf5mqsrw16h8xjglymgfc8qg2qa5bi4fgdl4j3dkhvvpr7vrphp"))
+               "17j6npvgr8q3lyrqmvfh1n47mkhfzk18r998hcjm2w75xj46km1n"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -2188,13 +2190,13 @@ information and perform area based monitoring.")
 (define-public qtpurchasing
   (package (inherit qtsvg-5)
     (name "qtpurchasing")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "04z6mwzn73gg56hgs7gividinfgndx4kmcnp7w6h3wamrdlkfdx7"))))
+               "0bjky5ncg9yhz4a63g3jl1r5pa6i09f6g8wgzs591mhybrbmhcw8"))))
     (inputs
      (list qtbase-5 qtdeclarative-5))
     (synopsis "Qt Purchasing module")
@@ -2204,13 +2206,13 @@ purchasing goods and services.")))
 (define-public qtcharts
   (package (inherit qtsvg-5)
     (name "qtcharts")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0y051i1837bfybkf8cm7cx8k5wjmbi47pxawaaz6wm0hd2z5b4qi"))))
+               "1q11ank69l9qw3iks2svr0g2g6pzng9v8p87dpsmjs988f4ysmll"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -2233,13 +2235,13 @@ selecting one of the charts themes.")
 (define-public qtdatavis3d
   (package (inherit qtsvg-5)
     (name "qtdatavis3d")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0sczwqlc36jdywf7bqxz0hm6mr7fn8p1fsnc33jliiqzn9yrg77x"))))
+               "1mr2kdshahxrkjs9wlgpr59jbqvyvlax16rlnca4iq00w3v5hrdh"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2256,13 +2258,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.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0c7mz715rlpg0cqgs6s0aszmslyamkhnpamc1iij6i571sj5j2f1"))))
+               "0fsmpjwkzzy3281shld7gs1gj217smb1f8ai63gdvnkp0jb2fhc5"))))
     (inputs
      (list qtbase-5))
     (synopsis "Qt Network Authorization module")
@@ -2292,13 +2294,13 @@ implementation of OAuth and OAuth2 authenticathon methods for Qt.")
 (define-public qtremoteobjects
   (package (inherit qtsvg-5)
     (name "qtremoteobjects")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "1m0xcqlbxsfn0cd4ajin1h3i4l51dajmkw91v0r4a61xi14i0kks"))))
+               "1bi9yzipyccskda18pf5wis45q8qcxzvvi1slabjzdbvd9wkzj54"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:phases phases)
@@ -2324,13 +2326,13 @@ processes or computers.")))
 (define-public qtspeech
   (package (inherit qtsvg-5)
     (name "qtspeech")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
              (method url-fetch)
              (uri (qt-urls name version))
              (sha256
               (base32
-               "0xskp9dzjy5nqszygk8gwvjyiylgynx5sq3nk2vi3zwgfdh5jpm4"))))
+               "1q56lyj7s05sx52j5z6gcs000mni4c7mb7qyq4lfval7c06hw5p6"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f))) ; TODO: Enable the tests
@@ -2434,14 +2436,14 @@ using the Enchant spell-checking library.")
   (package
     (inherit qtsvg-5)
     (name "qtwebengine")
-    (version "5.15.5")
+    (version %qt-version)
     (source
      (origin
        (method url-fetch)
        (uri (qt-urls name version))
        (sha256
         (base32
-         "0zahr9w6rqdxwh2whsgk3fhcszs7wa9j95lq4sqi8xzin2wcgl17"))
+         "1qv15g5anhlfsdwnjxy21vc3zxxm8149vysi774l93iab6mxqmjg"))
        (modules '((ice-9 ftw)
                   (ice-9 match)
                   (srfi srfi-1)
@@ -3271,7 +3273,7 @@ module provides support functions to the automatically generated code.")
 (define-public python-pyqt
   (package
     (name "python-pyqt")
-    (version "5.15.5")
+    (version %qt-version)
     (source
       (origin
         (method url-fetch)
@@ -3284,7 +3286,7 @@ module provides support functions to the automatically generated code.")
         (file-name (string-append "PyQt5-" version ".tar.gz"))
         (sha256
          (base32
-          "0aya963kkmbwfwmpd0p6k85y4g7wl5zarjqxxfgir403zalbf4dl"))
+          "0q53xn1ax2kpfqwxkasby787ryq5a21chmw1p345cp0kp7py71dw"))
         (patches (search-patches "pyqt-configure.patch"))))
     (build-system gnu-build-system)
     (native-inputs
@@ -3359,14 +3361,14 @@ contain over 620 classes.")
 (define-public python-pyqt5-sip
   (package
     (name "python-pyqt5-sip")
-    (version "12.10.1")
+    (version "12.11.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "PyQt5_sip" version))
        (sha256
         (base32
-         "09771b6fdn0rx34l5a0wzcd899yd57zxp5sw3bsqhd25biwhiq4p"))))
+         "0sa3vad8r7qm98k4ngimwjp87bh2f9f2vv19cnzb3vb11zdgplwp"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;; No test code.
@@ -3378,7 +3380,7 @@ contain over 620 classes.")
 (define-public python-pyqtwebengine
   (package
     (name "python-pyqtwebengine")
-    (version "5.15.5")
+    (version %qt-version)
     (source
      (origin
        (method url-fetch)
@@ -3954,7 +3956,7 @@ color-related widgets.")
 (define-public python-shiboken-2
   (package
     (name "python-shiboken-2")
-    (version "5.15.5")
+    (version %qt-version)
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.qt.io/official_releases"
@@ -3963,7 +3965,7 @@ color-related widgets.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0cwvw6695215498rsbm2xzkwaxdr3w7zfvy4kc62c01k6pxs881r"))))
+                "0pbbdypwkn3vrgy8ww207fl8pqq4jv80bck9qz5v9dfyr0166hr3"))))
     (build-system cmake-build-system)
     (inputs
      (list clang-toolchain
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index d981445db1..648d6c9281 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -660,7 +660,7 @@ used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
            (texlive-updmap.cfg (list texlive-amsfonts
                                      texlive-amsmath
                                      ;; TODO: Add newunicodechar.
-                                     texlive-latex-graphics))
+                                     texlive-graphics))
            xorg-server-for-tests))
     (inputs
      (list alsa-lib
@@ -870,7 +870,7 @@ to access different radio hardware.")
        ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
                                         texlive-amsmath
                                         ;; TODO: Add newunicodechar.
-                                        texlive-latex-graphics)))))
+                                        texlive-graphics)))))
     (inputs
      (list fftwf))
     (arguments
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index edd4752c05..8200a24f1a 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019, 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +27,7 @@
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
@@ -51,7 +52,8 @@
 (define %patch-series-8.1
   (patch-series
    "8.1"
-   (1 "0i4ikdqgcjnb40y2ss3lm09rq56zih5rzma3bib50dk3d1d4cak8")))
+   (1 "0i4ikdqgcjnb40y2ss3lm09rq56zih5rzma3bib50dk3d1d4cak8")
+   (2 "1p15sfx5xg5k4lam12lyd0givk7dfjddqpnb1jdp3c4clray0nz5")))
 
 (define %patch-series-7.0
   (patch-series
@@ -79,27 +81,30 @@
               (patch-flags '("-p0"))))
     (build-system gnu-build-system)
     (propagated-inputs (list ncurses))
-    (arguments `(#:configure-flags
-                 (list (string-append "LDFLAGS=-Wl,-rpath -Wl,"
-                                      (assoc-ref %build-inputs "ncurses")
-                                      "/lib")
+    (arguments
+     (list #:configure-flags
+           #~(list (string-append
+                    "LDFLAGS=-Wl,-rpath -Wl,"
+                    (dirname (search-input-file %build-inputs
+                                                "lib/libncurses.so")))
 
-                       ;; This test does an 'AC_TRY_RUN', which aborts when
-                       ;; cross-compiling, so provide the correct answer.
-                       ,@(if (%current-target-system)
-                             '("bash_cv_wcwidth_broken=no")
-                             '())
-                       ;; MinGW: ncurses provides the termcap api.
-                       ,@(if (target-mingw?)
-                             '("bash_cv_termcap_lib=ncurses")
-                             '()))
+                   ;; This test does an 'AC_TRY_RUN', which aborts when
+                   ;; cross-compiling, so provide the correct answer.
+                   #$@(if (%current-target-system)
+                          '("bash_cv_wcwidth_broken=no")
+                          '())
+                   ;; MinGW: ncurses provides the termcap api.
+                   #$@(if (target-mingw?)
+                          '("bash_cv_termcap_lib=ncurses")
+                          '()))
 
-                 ,@(if (target-mingw?)
-                       ;; MinGW: termcap in ncurses
-                       ;; some SIG_* #defined in _POSIX
-                       '(#:make-flags '("TERMCAP_LIB=-lncurses"
-                                        "CPPFLAGS=-D_POSIX -D'chown(f,o,g)=0'"))
-                       '())))
+           #:make-flags
+           (if (target-mingw?)
+               ;; MinGW: termcap in ncurses
+               ;; some SIG_* #defined in _POSIX
+               #~'("TERMCAP_LIB=-lncurses"
+                   "CPPFLAGS=-D_POSIX -D'chown(f,o,g)=0'")
+               #~'())))
     (synopsis "Edit command lines while typing, with history support")
     (description
      "The GNU readline library allows users to edit command lines as they
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 44e2c7c0ca..595aa1c974 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017, 2019-2022 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017, 2018, 2019 Christopher Baines <mail@cbaines.net>
@@ -157,8 +157,7 @@ a focus on simplicity and productivity.")
 (define-public ruby-2.7
   (package
     (inherit ruby-2.6)
-    (version "2.7.4")
-    (replacement ruby-2.7-fixed) ; security fixes
+    (version "2.7.6")
     (source
      (origin
        (inherit (package-source ruby-2.6))
@@ -167,7 +166,7 @@ a focus on simplicity and productivity.")
                            "/ruby-" version ".tar.gz"))
        (sha256
         (base32
-         "0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"))))
+         "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877"))))
     (arguments
      `(#:test-target "test"
        #:configure-flags '("--enable-shared") ; dynamic linking
@@ -4488,8 +4487,9 @@ is to be run.")
        `(#:phases
          (modify-phases %standard-phases
            (replace 'check
-             (lambda _
-               (invoke "script/test"))))))
+             (lambda* (#:key tests? #:allow-other-keys)
+               (when tests?
+                 (invoke "sh" "script/test")))))))
       (native-inputs
        (list bundler ruby-turn))
       (synopsis "Pretty-print hashes and arrays in MiniTest")
@@ -5225,14 +5225,14 @@ across multiple CPU cores.")
 (define-public ruby-parser
   (package
     (name "ruby-parser")
-    (version "3.0.0.0")
+    (version "3.1.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (rubygems-uri "parser" version))
        (sha256
         (base32
-         "1jixakyzmy0j5c1rb0fjrrdhgnyryvrr6vgcybs14jfw09akv5ml"))))
+         "08q20ckhn58m49lccf93p0yv7pkc7hymmcz3di762kb658d5fd38"))))
     (build-system ruby-build-system)
     (arguments
      '(#:tests? #f)) ; tests not included in gem
@@ -8750,14 +8750,14 @@ neither too verbose nor too minimal.")
 (define-public ruby-sqlite3
   (package
     (name "ruby-sqlite3")
-    (version "1.4.2")
+    (version "1.4.4")
     (source
      (origin
        (method url-fetch)
        (uri (rubygems-uri "sqlite3" version))
        (sha256
         (base32
-         "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
+         "1z1wa639c278bsipczn6kv8b13fj85pi8gk7x462chqx6k0wm0ax"))))
     (build-system ruby-build-system)
     (arguments
      `(#:phases
@@ -8768,7 +8768,7 @@ neither too verbose nor too minimal.")
     (inputs
      (list sqlite))
     (native-inputs
-     (list ruby-hoe ruby-rake-compiler ruby-mini-portile))
+     (list ruby-hoe ruby-rake-compiler ruby-mini-portile-2))
     (synopsis "Interface with SQLite3 databases")
     (description
      "This module allows Ruby programs to interface with the SQLite3 database
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 133c46fb7c..4d7790cfc6 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -176,14 +176,6 @@
        ("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.
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index da103ed839..8c004a1aac 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2022 Simon Streit <simon@netpanic.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (gnu packages acl)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages avahi)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
@@ -66,7 +68,8 @@
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (srfi srfi-1))
 
 (define-public cifs-utils
   (package
@@ -169,128 +172,88 @@ The library is small, thread safe, and written in portable ANSI C with no
 external dependencies.")
     (license license:x11)))
 
-(define-public samba
-  (package
-    (name "samba")
-    (version "4.16.8")
-    (source
-     ;; For updaters: the current PGP fingerprint is
-     ;; 81F5E2832BD2545A1897B713AA99442FB680B620.
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://download.samba.org/pub/samba/stable/"
-                           "samba-" version ".tar.gz"))
-       (sha256
-        (base32 "11a1vikbijaq7csg49h5ivn25gx84v6wx8z8kgsj1wmkhsf9bcmv"))))
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'configure 'setup-docbook-stylesheets
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; Append Samba's own DTDs to XML_CATALOG_FILES
-              ;; (c.f. docs-xml/build/README).
-              (copy-file "docs-xml/build/catalog.xml.in"
-                         "docs-xml/build/catalog.xml")
-              (substitute* "docs-xml/build/catalog.xml"
-                (("/@abs_top_srcdir@")
-                 (string-append (getcwd) "/docs-xml")))
-              ;; Honor XML_CATALOG_FILES.
-              (substitute* "buildtools/wafsamba/wafsamba.py"
-                (("XML_CATALOG_FILES=\"\\$\\{SAMBA_CATALOGS\\}" all)
-                 (string-append all " $XML_CATALOG_FILES")))))
-          (replace 'configure
-            ;; Samba uses a custom configuration script that runs WAF.
-            (lambda* (#:key inputs #:allow-other-keys)
-              (let* ((libdir (string-append #$output "/lib")))
-                (invoke "./configure"
-                        "--enable-selftest"
-                        "--enable-fhs"
-                        (string-append "--prefix=" #$output)
-                        "--sysconfdir=/etc"
-                        "--localstatedir=/var"
-                        ;; Install public and private libraries into
-                        ;; a single directory to avoid RPATH issues.
-                        (string-append "--libdir=" libdir)
-                        (string-append "--with-privatelibdir=" libdir)
-                        "--with-system-mitkrb5" ;#$(this-package-input "mit-krb5")
-                        (string-append "--with-system-mitkdc="
-                                       (search-input-file inputs "sbin/krb5kdc"))
-                        "--with-experimental-mit-ad-dc"))))
-          (add-before 'install 'disable-etc,var-samba-directories-setup
-            (lambda _
-              (substitute* "dynconfig/wscript"
-                (("bld\\.INSTALL_DIR.*") "")))))
-      ;; FIXME: The test suite seemingly hangs after failing to provision the
-      ;; test environment.
-      #:tests? #f))
-    (inputs
-     (list acl
-           cmocka
-           cups
-           gamin
-           dbus
-           gpgme
-           gnutls
-           jansson
-           libarchive
-           libtirpc
-           linux-pam
-           lmdb
-           mit-krb5
-           openldap
-           perl
-           python
-           popt
-           readline
-           tdb))
-    (propagated-inputs
-     ;; In Requires or Requires.private of pkg-config files.
-     (list ldb talloc tevent))
-    (native-inputs
-     (list perl-parse-yapp
-           pkg-config
-           python-cryptography          ;for krb5 tests
-           python-dnspython
-           python-iso8601
-           python-markdown
-           rpcsvc-proto                 ;for 'rpcgen'
-           python-pyasn1                ;for krb5 tests
-           ;; For generating man pages.
-           docbook-xml-4.2
-           docbook-xsl-next             ;otherwise the man pages are corrupted
-           libxslt
-           libxml2))                    ;for XML_CATALOG_FILES
-    (home-page "https://www.samba.org/")
-    (synopsis
-     "The standard Windows interoperability suite of programs for GNU and Unix")
-    (description
-     "Since 1992, Samba has provided secure, stable and fast file and print
-services for all clients using the SMB/CIFS protocol, such as all versions of
-DOS and Windows, OS/2, GNU/Linux and many others.
-
-Samba is an important component to seamlessly integrate Linux/Unix Servers and
-Desktops into Active Directory environments using the winbind daemon.")
-    (license license:gpl3+)))
-
-;;; FIXME: Invert inheritance relationship; the "pinned" package shouldn't be
-;;; susceptible to changes in the free one.
 (define-public samba/pinned
-  ;; Version that rarely changes, depended on by libsoup.
   (hidden-package
    (package
-     (inherit samba)
-     (replacement samba/fixed)
-     (version "4.15.3")
+     (name "samba")
+     (version "4.17.0")
      (source
+      ;; For updaters: the current PGP fingerprint is
+      ;; 81F5E2832BD2545A1897B713AA99442FB680B620.
       (origin
         (method url-fetch)
         (uri (string-append "https://download.samba.org/pub/samba/stable/"
                             "samba-" version ".tar.gz"))
         (sha256
-         (base32 "1nrp85aya0pbbqdqjaqcw82cnzzys16yls37hi2h6mci8d09k4si"))))
+         (base32 "0fl2y5avmyxjadh6zz0fwz35akd6c4j9lldzp2kyvjrgm36qx1h4"))))
+     (build-system gnu-build-system)
+     (arguments
+      (list
+       #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long
+       #:phases
+       #~(modify-phases %standard-phases
+           (add-before 'configure 'setup-docbook-stylesheets
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; Append Samba's own DTDs to XML_CATALOG_FILES
+               ;; (c.f. docs-xml/build/README).
+               (copy-file "docs-xml/build/catalog.xml.in"
+                          "docs-xml/build/catalog.xml")
+               (substitute* "docs-xml/build/catalog.xml"
+                 (("/@abs_top_srcdir@")
+                  (string-append (getcwd) "/docs-xml")))
+               ;; Honor XML_CATALOG_FILES.
+               (substitute* "buildtools/wafsamba/wafsamba.py"
+                 (("XML_CATALOG_FILES=\"\\$\\{SAMBA_CATALOGS\\}" all)
+                  (string-append all " $XML_CATALOG_FILES")))))
+           (replace 'configure
+             ;; Samba uses a custom configuration script that runs WAF.
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let* ((libdir (string-append #$output "/lib")))
+                 (invoke "./configure"
+                         "--enable-selftest"
+                         "--enable-fhs"
+                         (string-append "--prefix=" #$output)
+                         "--sysconfdir=/etc"
+                         "--localstatedir=/var"
+                         ;; Install public and private libraries into
+                         ;; a single directory to avoid RPATH issues.
+                         (string-append "--libdir=" libdir)
+                         (string-append "--with-privatelibdir=" libdir)
+                         "--with-system-mitkrb5"
+                         (string-append "--with-system-mitkdc="
+                                        (search-input-file inputs "sbin/krb5kdc"))
+                         "--with-experimental-mit-ad-dc"))))
+           (add-before 'install 'disable-etc,var-samba-directories-setup
+             (lambda _
+               (substitute* "dynconfig/wscript"
+                 (("bld\\.INSTALL_DIR.*") "")))))
+       ;; FIXME: The test suite seemingly hangs after failing to provision the
+       ;; test environment.
+       #:tests? #f))
+     (inputs
+      (list acl
+            avahi
+            cmocka
+            cups
+            gamin
+            dbus
+            gpgme
+            gnutls
+            jansson
+            libarchive
+            libtirpc
+            linux-pam
+            lmdb
+            mit-krb5
+            openldap
+            perl
+            python
+            popt
+            readline
+            tdb))
+     (propagated-inputs
+      ;; In Requires or Requires.private of pkg-config files.
+      (list ldb talloc tevent))
      (native-inputs
       (list perl-parse-yapp
             pkg-config
@@ -304,33 +267,46 @@ Desktops into Active Directory environments using the winbind daemon.")
             docbook-xml-4.2
             docbook-xsl
             libxslt
-            libxml2)))))
+            libxml2))                   ;for XML_CATALOG_FILES
+     (home-page "https://www.samba.org/")
+     (synopsis
+      "The standard Windows interoperability suite of programs for GNU and Unix")
+     (description
+      "Since 1992, Samba has provided secure, stable and fast file and print
+services for all clients using the SMB/CIFS protocol, such as all versions of
+DOS and Windows, OS/2, GNU/Linux and many others.
 
-(define-public samba/fixed
+Samba is an important component to seamlessly integrate Linux/Unix Servers and
+Desktops into Active Directory environments using the winbind daemon.")
+     (license license:gpl3+))))
+
+(define-public samba
   (package
     (inherit samba/pinned)
-    ;; This is 4.15.13, but we need to trim the store file name to have
-    ;; the same length as the one we are grafting above.
-    (version "4.15.A")
+    (name "samba")
+    (version "4.17.0")
     (source
+     ;; For updaters: the current PGP fingerprint is
+     ;; 81F5E2832BD2545A1897B713AA99442FB680B620.
      (origin
        (method url-fetch)
        (uri (string-append "https://download.samba.org/pub/samba/stable/"
-                           "samba-4.15.13.tar.gz"))
+                           "samba-" version ".tar.gz"))
        (sha256
-        (base32 "0s29vzn5f42vjhx6h25c7v67n14ymqxn8glqa97d0rajd99y64n4"))))))
+        (base32 "0fl2y5avmyxjadh6zz0fwz35akd6c4j9lldzp2kyvjrgm36qx1h4"))))
+    (properties (alist-delete 'hidden? (package-properties samba/pinned)))))
 
 (define-public talloc
   (package
     (name "talloc")
-    (version "2.3.3")
+    (version "2.3.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.samba.org/ftp/talloc/talloc-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1ala3l6v8qk2pwq97z1zdkj1isnfnrp1923srp2g22mxd0impsbb"))))
+                "01b5pq39z1l26f86dy8jqb37fsjbvsvx5ji65jmy8rsy4sz9x7qp"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -390,14 +366,14 @@ destructors.  It is the core memory allocator used in Samba.")
 (define-public tevent
   (package
     (name "tevent")
-    (version "0.11.0")
+    (version "0.13.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.samba.org/ftp/tevent/tevent-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1fl2pj4p8p5fa2laykwf1sfjdw7pkw9slklj3vzc5ah8x348d6pf"))))
+                "030x6ziapxiqvmi2m23ri2p9rsa202gfqr7b3cv48lx5gy8plhxr"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -424,14 +400,14 @@ many event types, including timers, signals, and the classic file descriptor eve
 (define-public ldb
   (package
     (name "ldb")
-    (version "2.4.1")
+    (version "2.6.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.samba.org/ftp/ldb/ldb-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "13yd7lavbx8bxwnmzl0j7xnl2gl4wmnn0q9g7n3y7bvbnhm07hb9"))
+                "1j9n2yzhd35xjh0mdfgym58xfbma1d27bcavjv1q4rzqgpvh6x26"))
               (modules '((guix build utils)))
               (snippet
                '(begin
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index a7f5e3acf9..9fe4242268 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages dns)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graphviz)
@@ -226,23 +227,24 @@ with a PKCS #11 Cryptographic Token Interface.")
 (define-public pcsc-lite
   (package
     (name "pcsc-lite")
-    (version "1.9.3")
+    (version "1.9.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://pcsclite.apdu.fr/files/"
                                   "pcsc-lite-" version ".tar.bz2"))
               (sha256
                (base32
-                "0n9y9m1wr5bwanpnylpdza3sf7lawi63jjizrl1aj5yxf4y46mk9"))))
+                "12923c6l5qzga1xlcxvm0vzbqrxnxq1qgzlrxf2y5gpcaz2q0bah"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--enable-usbdropdir=/var/lib/pcsc/drivers"
                            "--disable-libsystemd")))
     (native-inputs
-     (list perl ; for pod2man
+     (list flex
+           perl                         ;for pod2man
            pkg-config))
     (inputs
-     `(("libudev" ,eudev)))
+     (list python eudev))
     (home-page "https://pcsclite.apdu.fr/")
     (synopsis "Middleware to access a smart card using PC/SC")
     (description
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index d898b55129..c45570744a 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -162,7 +162,11 @@ module into a binary representation.")
                 ;; Python bindings.  Instruct it to use the correct output.
                 (substitute* "src/Makefile"
                   (("--prefix=\\$\\(PREFIX\\)")
-                   (string-append "--prefix=" #$output:python)))
+                   (string-append "--prefix=" #$output:python
+                                  ;; Python 3.10 refuses to execute the install
+                                  ;; command unless these flags are present.
+                                  " --single-version-externally-managed"
+                                  " --root=/")))
 
                 (apply invoke "make" "install-pywrap" make-flags)))))))
     ;; These libraries are in "Requires.private" in libselinux.pc.
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 3f0a550920..c2c36eede8 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -39,6 +39,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
@@ -452,26 +453,16 @@ in which the loaded data is arranged in memory.")
 (define-public jsoncpp
   (package
     (name "jsoncpp")
-    (version "1.9.4")
+    (version "1.9.5")
     (home-page "https://github.com/open-source-parsers/jsoncpp")
     (source (origin
               (method git-fetch)
               (uri (git-reference (url home-page) (commit version)))
               (file-name (git-file-name name version))
-              (patches
-               (search-patches "jsoncpp-pkg-config-version.patch"))
               (sha256
                (base32
-                "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
-    (build-system cmake-build-system)
-    (arguments
-     `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
-                           ,@(if (%current-target-system)
-                                 `("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF")
-                                 '()))
-       ,@(if (%current-target-system)
-             '()
-             `(#:cmake ,cmake-bootstrap))))
+                "06zss7z56ykzwcsfdxarmini63hkf8i8gx70q3yw9wb0bw7wj9rv"))))
+    (build-system meson-build-system)
     (synopsis "C++ library for interacting with JSON")
     (description "JsonCpp is a C++ library that allows manipulating JSON values,
 including serialization and deserialization to and from strings.  It can also
@@ -494,7 +485,14 @@ it a convenient format to store user input files.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z"))))))
+                "1180ln8blrb0mwzpcf78k49hlki6di65q77rsvglf83kfcyh4d7z"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           #~'("-DBUILD_SHARED_LIBS:BOOL=YES"
+               #$@(if (%current-target-system)
+                      #~("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF")
+                      #~()))))))
 
 (define-public json.sh
   (let ((commit "0d5e5c77365f63809bf6e77ef44a1f34b0e05840") ;no releases
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index da2455e345..5ca8d842c2 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -383,17 +383,17 @@ written by Paul Haahr and Byron Rakitzis.")
 (define-public tcsh
   (package
     (name "tcsh")
-    (version "6.22.03")
+    (version "6.24.01")
     (source (origin
               (method url-fetch)
               ;; Old tarballs are moved to old/.
-              (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/"
+              (uri (list (string-append "https://astron.com/pub/tcsh/"
                                         "tcsh-" version ".tar.gz")
-                         (string-append "ftp://ftp.astron.com/pub/tcsh/"
+                         (string-append "https://astron.com/pub/tcsh/"
                                         "old/tcsh-" version ".tar.gz")))
               (sha256
                (base32
-                "1dv24bsp6faayinvwds092ylk9sb6894rl9ddm87y31a7mjzsb5y"))
+                "0zhxp4m1fxyd3a2qyvs97gzlrb0h0ah1gjrqcbilgydiffws2nan"))
               (patches (search-patches "tcsh-fix-autotest.patch"))
               (patch-flags '("-p0"))))
     (build-system gnu-build-system)
@@ -402,16 +402,16 @@ written by Paul Haahr and Byron Rakitzis.")
     (inputs
      (list ncurses))
     (arguments
-     `(#:phases
-        (modify-phases %standard-phases
-          ,@(if (%current-target-system)
-                '((add-before 'configure 'set-cross-cc
-                     (lambda _
-                       (substitute* "configure"
-                         (("CC_FOR_GETHOST=\"cc\"")
-                          "CC_FOR_GETHOST=\"gcc\""))
-                       #t)))
-                '())
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(if (%current-target-system)
+                 #~((add-before 'configure 'set-cross-cc
+                      (lambda _
+                        (substitute* "configure"
+                          (("CC_FOR_GETHOST=\"cc\"")
+                           "CC_FOR_GETHOST=\"gcc\"")))))
+                 #~())
           (add-before 'check 'patch-test-scripts
             (lambda _
               ;; Take care of pwd
@@ -438,15 +438,11 @@ written by Paul Haahr and Byron Rakitzis.")
               ;; This file is ISO-8859-1 encoded.
               (with-fluids ((%default-port-encoding #f))
                 (substitute* "tests/testsuite"
-                  (("/bin/sh") (which "sh"))))
-              #t))
+                  (("/bin/sh") (which "sh"))))))
           (add-after 'install 'post-install
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let* ((out (assoc-ref %outputs "out"))
-                     (bin (string-append out "/bin")))
-                (with-directory-excursion bin
-                  (symlink "tcsh" "csh"))
-                #t))))))
+            (lambda _
+              (with-directory-excursion (string-append #$output "/bin")
+                (symlink "tcsh" "csh")))))))
     (home-page "https://www.tcsh.org/")
     (synopsis "Unix shell based on csh")
     (description
@@ -897,29 +893,19 @@ scripts.")
 (define-public gash
   (package
     (name "gash")
-    (version "0.2.0")
+    (version "0.3.0")
     (source
      (origin (method url-fetch)
              (uri (string-append "mirror://savannah/gash/gash-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "13m0yz5h9nj3x40mr6wr5xcpq1lscndfwcicw3skrz801025hhgf"))
-             (modules '((guix build utils)))
-             (snippet
-              '(begin
-                 ;; Allow builds with Guile 3.0.
-                 (substitute* "configure"
-                   (("search=\"2\\.2 2\\.0\"")
-                    "search=\"3.0 2.2 2.0\""))
-                 #t))))
+               "1af2jz4a6rzsshi379wzw4b8d04zvfamdhfzip2pgmk821lyqsjl"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config))
     (inputs
      (list guile-3.0))
-    (arguments
-     '(#:make-flags '("XFAIL_TESTS=tests/redirects.org")))
     (home-page "https://savannah.nongnu.org/projects/gash/")
     (synopsis "POSIX-compatible shell written in Guile Scheme")
     (description "Gash is a POSIX-compatible shell written in Guile
@@ -931,23 +917,14 @@ as part of the Guix bootstrap process.")
 (define-public gash-utils
   (package
     (name "gash-utils")
-    (version "0.1.0")
+    (version "0.2.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://savannah/gash/gash-utils-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0ib2p52qmbac5n0s5bys4fiwim461ps546976l1n7pwbs0avh7fk"))
-              (patches (search-patches "gash-utils-ls-test.patch"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  ;; Allow builds with Guile 3.0.
-                  (substitute* "configure"
-                    (("search=\"2\\.2 2\\.0\"")
-                     "search=\"3.0 2.2 2.0\""))
-                  #t))))
+                "18ylb54l9lmaynapbncc1zhbsirhihznrxihhxgqrpqgyjkfbap6"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config))
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index addf4393b2..160ca8a04d 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -110,24 +110,24 @@
            texlive-capt-of
            texlive-carlisle             ;remreset
            texlive-etoolbox
-           texlive-generic-ltxcmds
+           texlive-ltxcmds
            texlive-hyperref
            texlive-latex-base           ;alltt, atbegshi, makeidx, textcomp
            texlive-latex-cmap
-           texlive-latex-fancyhdr
-           texlive-latex-fancyvrb
+           texlive-fancyhdr
+           texlive-fancyvrb
            texlive-latex-float
            texlive-latex-fncychap
            texlive-latex-framed
            texlive-latex-geometry
-           texlive-latex-graphics       ;graphicx, color
-           texlive-latex-kvoptions
+           texlive-graphics                       ;graphicx, color
+           texlive-kvoptions
            texlive-latex-needspace
            texlive-latex-parskip
            texlive-latex-preview
            texlive-latex-tabulary
-           texlive-latex-titlesec
-           texlive-latex-tools          ;multicol, longtable
+           texlive-titlesec
+           texlive-tools                          ;multicol, longtable
            texlive-latex-upquote
            texlive-latex-varwidth
            texlive-oberdiek             ;hypcap
diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm
index 71cc923a3a..2e727bd933 100644
--- a/gnu/packages/sqlite.scm
+++ b/gnu/packages/sqlite.scm
@@ -38,6 +38,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix utils)
+  #:use-module (guix deprecation)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-26))
 
@@ -62,14 +63,14 @@
 (define-public sqlite
   (package
    (name "sqlite")
-   (version "3.36.0")
+   (version "3.39.3")
    (source (origin
             (method url-fetch)
-            (uri (sqlite-uri version 2021))
+            (uri (sqlite-uri version 2022))
             (patches (search-patches "sqlite-hurd.patch"))
             (sha256
              (base32
-              "1qxwkfvd185dfcqbakrzikrsw6ffr5jp1gl3dch9dsdyjvmw745x"))))
+              "1f922kq16g7f4h3gpzim78lvrp5xw9nvlvqw97s2qgxyh8qgns3q"))))
    (build-system gnu-build-system)
    (inputs (list readline))
    (outputs '("out" "static"))
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 886cb74070..6b4fd47c0c 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -170,7 +170,7 @@ applications.")
 (define-public libssh2
   (package
    (name "libssh2")
-   (version "1.9.0")
+   (version "1.10.0")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -178,13 +178,14 @@ applications.")
                    version ".tar.gz"))
             (sha256
              (base32
-              "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym"))
-            (patches (search-patches "libssh2-CVE-2019-17498.patch"))))
+              "0l8xwhhscvss7q007vpbkbv7jh9s43579rx2sf8lnfgd7l7yjr1d"))))
    (build-system gnu-build-system)
    ;; The installed libssh2.pc file does not include paths to libgcrypt and
    ;; zlib libraries, so we need to propagate the inputs.
    (propagated-inputs (list libgcrypt zlib))
-   (arguments `(#:configure-flags `("--with-libgcrypt")))
+   (arguments
+    (list #:configure-flags #~'("--with-libgcrypt"
+                                "--disable-static")))
    (synopsis "Client-side C library implementing the SSH2 protocol")
    (description
     "libssh2 is a library intended to allow software developers access to
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 2a89c0cb9d..3588cb459a 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -381,11 +381,11 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\
                                      texlive-grfext
                                      texlive-amsfonts
                                      texlive-latex-base
-                                     texlive-latex-fancyvrb
-                                     texlive-latex-graphics
+                                     texlive-fancyvrb
+                                     texlive-graphics
                                      texlive-hyperref
                                      texlive-oberdiek
-                                     texlive-latex-tools
+                                     texlive-tools
                                      texlive-latex-upquote
                                      texlive-url
                                      texlive-latex-xkeyval))
diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm
index b5195e2cc5..51024ef487 100644
--- a/gnu/packages/swig.scm
+++ b/gnu/packages/swig.scm
@@ -43,7 +43,9 @@
                                  name "-" version ".tar.gz"))
              (sha256
               (base32
-               "1z06m5zv87mha6hvys1iay810ghc1jngilfby1ms2n4d1mryjfym"))))
+               "1z06m5zv87mha6hvys1iay810ghc1jngilfby1ms2n4d1mryjfym"))
+             ;; Remove with next release.
+             (patches (search-patches "swig-support-gcc-12.patch"))))
     (build-system gnu-build-system)
     (native-inputs (list boost
                          `(,pcre "bin") ;for 'pcre-config'
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index f071b13146..2a5fbc6fe8 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -46,14 +46,14 @@
 (define-public tcl
   (package
     (name "tcl")
-    (version "8.6.11")
+    (version "8.6.12")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/tcl/Tcl/"
                                   version "/tcl" version "-src.tar.gz"))
               (sha256
                (base32
-                "0n4211j80mxr6ql0xx52rig8r885rcbminfpjdb2qrw6hmk8c14c"))))
+                "19n1wk6ypx19p26gywvibwbhqs2zapp93n3136qlhzhn1zfrbj96"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -193,7 +193,7 @@ X11 GUIs.")
 (define-public tk
   (package
     (name "tk")
-    (version "8.6.11.1")
+    (version "8.6.12")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/tcl/Tcl/"
@@ -201,7 +201,7 @@ X11 GUIs.")
                                  version "-src.tar.gz"))
              (sha256
               (base32
-               "1gh9k7l76qg9l0sb78ijw9xz4xl1af47aqbdifb6mjpf3cbsnv00"))
+               "0c0665h9b55cr3p6civcrgaixx6dldz7k7v870lyssyb7wgmqf8j"))
              (patches (search-patches "tk-find-library.patch"))))
     (build-system gnu-build-system)
     (arguments
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 0c4e545edf..7abf7f93da 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2017, 2020-2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
 ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
@@ -20,6 +20,7 @@
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
 ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
+;;; Copyright © 2022 Simon South <simon@simonsouth.net>
 ;;; Copyright © 2022 Jack Hill <jackhill@jackhill.us>
 ;;; Copyright © 2022 Fabio Natali <me@fabionatali.com>
 ;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
@@ -363,6 +364,14 @@ files from LOCATIONS with expected checksum HASH.  CODE is not currently in use.
 
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-psutils-test
+           (lambda _
+             ;; This test fails due to a rounding difference with libpaper 1.2:
+             ;;   https://github.com/rrthomas/libpaper/issues/23
+             ;; Adjust the expected outcome to account for the minute difference.
+             (substitute* "texk/psutils/tests/playres.ps"
+               (("844\\.647799")
+                "844.647797"))))
          (add-after 'unpack 'configure-ghostscript-executable
            ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
            ;; and the "gs" ghostscript executable on Unix. It detects Unix by
@@ -602,8 +611,8 @@ This package contains the binaries.")
                          (mkdir-p doc)
                          (copy-recursively (string-append #$source "/doc")
                                            doc)))))))
-    (propagated-inputs (list texlive-generic-iftex
-                             texlive-generic-ltxcmds
+    (propagated-inputs (list texlive-iftex
+                             texlive-ltxcmds
                              texlive-hyperref
                              texlive-latex-xkeyval
                              texlive-zref))
@@ -3064,41 +3073,93 @@ with the required packages, constitutes what every LaTeX distribution should
 contain.")
       (license license:lppl1.3c+))))
 
-(define-public texlive-latex-atveryend
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-atveryend"
-              '("/doc/latex/atveryend/README.md"
-                "/tex/latex/atveryend/")
-              (base32
-               "1gz5ssxjlqa53a8blsmdk2qjahzc910ldh26xjxfxgqnqb03rqx7")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/atveryend")
-    (synopsis "Hooks at the very end of a document")
-    (description
-     "This LaTeX package provides two hooks for @code{\\end@{document@}}
-that are executed after the hook of @code{\\AtEndDocument}:
+(define-public texlive-atveryend
+  (let ((template (simple-texlive-package
+                   "texlive-atveryend"
+                   (list "doc/latex/atveryend/"
+                         "source/latex/atveryend/"
+                         "tex/latex/atveryend/")
+                   (base32 "1rp805h0m99rxs107a798l951lyahlnp7irfklfadn2a2ljzhafn"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ #t)
+          "latex/atveryend")
+         ((#:build-targets _ #t)
+          #~(list "atveryend.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/atveryend/")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))
+              (add-after 'copy-files 'remove-generated-file
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (with-directory-excursion #$output
+                    (for-each delete-file
+                              (find-files "." "\\.(drv|ins)$")))))))))
+      (home-page "https://ctan.org/macros/latex/contrib/atveryend")
+      (synopsis "Hooks at the very end of a document")
+      (description
+       "This LaTeX packages provides two hooks for @code{\\end{document}} that
+are executed after the hook of @code{\\AtEndDocument}:
 @code{\\AfterLastShipout} can be used for code that is to be executed right
 after the last @code{\\clearpage} before the @file{.aux} file is closed.
-@code{\\AtVeryEndDocument} is used for code after closing and final reading
-of the @file{.aux} file.")
-    (license license:lppl1.3c+)))
+@code{\\AtVeryEndDocument} is used for code after closing and final reading of
+the @file{.aux} file.")
+      (license license:lppl1.3+))))
 
-(define-public texlive-latex-auxhook
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-auxhook"
-              '("/doc/latex/auxhook/README.md"
-                "/tex/latex/auxhook/")
-              (base32
-               "1xh445shr00rh43nnz03xh8k2mdrxgsr03lllqpgvwhm6yzsydkf")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/auxhook")
-    (synopsis "Hooks for auxiliary files")
-    (description
-     "This package provides hooks for adding code at the beginning of
+(define-deprecated-package texlive-latex-atveryend texlive-atveryend)
+
+(define-public texlive-auxhook
+  (let ((template (simple-texlive-package
+                   "texlive-auxhook"
+                   (list "doc/latex/auxhook/"
+                         "source/latex/auxhook/"
+                         "tex/latex/auxhook/")
+                   (base32
+                    "1qfs7bz8ryp4prr2fw4hwypnfc6yr4rc4wd8qy4rpmab0hab0vdy"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/auxhook")
+         ((#:build-targets _ '())
+          #~(list "auxhook.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/auxhook")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/auxhook")
+      (synopsis "Hooks for auxiliary files")
+      (description
+       "This package provides hooks for adding code at the beginning of
 @file{.aux} files.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-auxhook texlive-auxhook)
 
 (define-public texlive-latex-epstopdf-pkg
   (package
@@ -3169,30 +3230,6 @@ users, via its Plain TeX version.)")
   (package
     (inherit (simple-texlive-package
               "texlive-fancyvrb"
-              (list "/doc/latex/fancyvrb"
-                    "/tex/latex/fancyvrb/")
-              (base32
-               "1qlrmc70ck2v3wqh8gjd5jl0f6011zzcsg9a93qf1z9b9virvjy2")
-              #:trivial? #t))
-    (propagated-inputs (list texlive-latex-upquote))
-    (home-page "https://ctan.org/macros/latex/contrib/fancyvrb")
-    (synopsis "Sophisticated verbatim text")
-    (description
-     "This package provides tools for the flexible handling of verbatim text
-including: verbatim commands in footnotes; a variety of verbatim environments
-with many parameters; ability to define new customized verbatim environments;
-save and restore verbatim text and environments; write and read files in
-verbatim mode; build @code{example} environments (showing both result and
-verbatim source).")
-    (license license:lppl1.3+)))
-
-;; FIXME: This package needs to be deprecated in favour of `texlive-fancyvrb',
-;; but this triggers 17k rebuilds.  So leave it there and wait for
-;; core-updates or a topic branch to catch-up.
-(define-public texlive-latex-fancyvrb
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-fancyvrb"
               (list "/doc/latex/fancyvrb/README"
                     "/tex/latex/fancyvrb/")
               (base32
@@ -3209,6 +3246,8 @@ verbatim mode; build \"example\" environments (showing both result and
 verbatim source).")
     (license license:lppl1.0+)))
 
+(define-deprecated-package texlive-latex-fancyvrb texlive-fancyvrb)
+
 (define-public texlive-graphics-def
   (package
     (inherit (simple-texlive-package
@@ -3245,6 +3284,57 @@ packages.")
 set default \"driver\" options for the color and graphics packages.")
     (license license:public-domain)))
 
+(define-public texlive-graphics
+  (let ((template (simple-texlive-package
+                   "texlive-graphics"
+                   (list "doc/latex/graphics/"
+                         "source/latex/graphics/"
+                         "tex/latex/graphics/")
+                   (base32
+                    "0prw1zcv4fcj3zg0kyhj0k7ax0530adl60bajzvbv3fi16d7rqlq"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/graphics")
+         ((#:build-targets _ '())
+          #~(list "graphics-drivers.ins" "graphics.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/graphics")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc)
+                    ;; This file is not generated from the sources.
+                    (install-file
+                     (string-append
+                      origin
+                      "/tex/latex/graphics/graphics-2017-06-25.sty")
+                     (string-append
+                      #$output
+                      "/share/texmf-dist/tex/latex/graphics")))))))))
+      (propagated-inputs (list texlive-graphics-def texlive-graphics-cfg))
+      (home-page "https://ctan.org/macros/latex/required/graphics")
+      (synopsis "The LaTeX standard graphics bundle")
+      (description
+       "This is a collection of LaTeX packages for: producing colour including
+graphics (e.g., PostScript) files rotation and scaling of text in LaTeX
+documents.  It comprises the packages color, graphics, graphicx, trig, epsfig,
+keyval, and lscape.")
+      (license license:lppl1.3c))))
+
+(define-deprecated-package texlive-latex-graphics texlive-graphics)
+
 (define-public texlive-greek-fontenc
   (package
     (inherit (simple-texlive-package
@@ -3262,71 +3352,83 @@ set default \"driver\" options for the color and graphics packages.")
 for Greek text font encodings for use with fontenc.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-graphics
-  (package
-    (name "texlive-latex-graphics")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "graphics"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0fgjl58f25zvagssz4dwmmsclzw8cr7mx00kdrbx2kcnamcb7h8d"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/graphics"))
-    (propagated-inputs
-     (list texlive-graphics-cfg texlive-graphics-def))
-    (home-page "https://www.ctan.org/pkg/latex-graphics")
-    (synopsis "LaTeX standard graphics bundle")
-    (description
-     "This is a collection of LaTeX packages for producing color, including
-graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
-documents.  It comprises the packages color, graphics, graphicx, trig, epsfig,
-keyval, and lscape.")
-    (license license:lppl1.3c+)))
-
-(define-public texlive-latex-hycolor
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-hycolor"
-              (list "/doc/latex/hycolor/README.md"
-                    "/tex/latex/hycolor/")
-              (base32
-               "026lfb4l7b3q8g6zc68siqandhb1x98cbycn7njknqva6s99aiqn")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/latex-graphics")
-    (synopsis "Color for hyperref and bookmark")
-    (description
-     "This package provides the code for the @code{color} option that is
+(define-public texlive-hycolor
+  (let ((template  (simple-texlive-package
+                    "texlive-hycolor"
+                    (list "doc/latex/hycolor/"
+                          "source/latex/hycolor/"
+                          "tex/latex/hycolor/")
+                    (base32
+                     "0hmkx37wwmznxjqqnca87shy7qrgqrh2cn5r941ddgivnym31xbh"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/hycolor")
+         ((#:build-targets _ '())
+          #~(list "hycolor.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/hycolor")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/latex-graphics")
+      (synopsis "Color for hyperref and bookmark")
+      (description
+       "This package provides the code for the @code{color} option that is
 used by @code{hyperref} and @code{bookmark}.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-hycolor texlive-hycolor)
 
 (define-public texlive-xcolor
   (let ((template (simple-texlive-package
                    "texlive-xcolor"
-                   (list "/doc/latex/xcolor/"
-                         "/source/latex/xcolor/")
+                   (list "doc/latex/xcolor/"
+                         "dvips/xcolor/"
+                         "source/latex/xcolor/"
+                         "tex/latex/xcolor/")
                    (base32
-                    "12q6spmpxg30alhvarjmxzigmz7lazapbrb0mc4vhbn6n1sdz7pp"))))
+                    "1d7108b67fcaf1sgyk43ph18l0z5m35iqg3aahqs1ymzwdfnd3f7"))))
     (package
       (inherit template)
+      (outputs '("out" "doc"))
       (arguments
        (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
+         ((#:tex-directory _ '())
           "latex/xcolor")
+         ((#:build-targets _ '())
+          #~(list "xcolor.ins"))
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/xcolor") #t))
-             (add-after 'install 'move-files
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let ((share (string-append (assoc-ref outputs "out")
-                                             "/share/texmf-dist")))
-                   (mkdir-p (string-append share "/dvips/xcolor"))
-                   (rename-file (string-append share "/tex/latex/xcolor/xcolor.pro")
-                                (string-append share "/dvips/xcolor/xcolor.pro"))
-                   #t)))))))
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _ (chdir "source/latex/xcolor")))
+              (replace 'copy-files
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc)
+                    (let ((share (string-append #$output
+                                                "/share/texmf-dist")))
+                      (mkdir-p (string-append share "/dvips/xcolor"))
+                      (rename-file
+                       (string-append share "/tex/latex/xcolor/xcolor.pro")
+                       (string-append share "/dvips/xcolor/xcolor.pro"))))))))))
       ;; TODO: Propagate texlive-hyperref and many others in the next rebuild
       ;; cycle.  Grep for '\usepackage' to see what packages it requires.
       ;; (propagated-inputs (list texlive-hyperref ...))
@@ -3415,48 +3517,62 @@ XML, using UTF-8 or a suitable 8-bit encoding.")
 (define-public texlive-hyperref
   (let ((template (simple-texlive-package
                    "texlive-hyperref"
-                   (list "/doc/latex/hyperref/"
-                         "/source/latex/hyperref/"
-                         ;; These files are not generated from the sources
-                         "/tex/latex/hyperref/minitoc-hyper.sty"
-                         "/tex/latex/hyperref/ntheorem-hyper.sty"
-                         "/tex/latex/hyperref/xr-hyper.sty")
-                   (base32
-                    "0nmbxaq676m2y9fgdji0bxqchmrli4hwhspijaszx51b3ki6bj2h"))))
+                   (list "doc/latex/hyperref/"
+                         "source/latex/hyperref/"
+                         "tex/latex/hyperref/")
+                   (base32 "052k1nygm4msaivn8245n86km4h41knivigw80q58b7rc13s6hrk"))))
     (package
       (inherit template)
       (arguments
        (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
+         ((#:tex-directory _ '())
           "latex/hyperref")
+         ((#:build-targets _ '())
+          #~(list "hyperref.ins"))
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/hyperref") #t))))))
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/hyperref")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc)
+                    ;; XXX: These files are not auto-generated from the
+                    ;; sources.
+                    (for-each (lambda (f)
+                                (install-file
+                                 (string-append origin "/tex/latex/hyperref/" f)
+                                 (string-append
+                                  #$output
+                                  "/share/texmf-dist/tex/latex/hyperref")))
+                              '("minitoc-hyper.sty"
+                                "ntheorem-hyper.sty"
+                                "xr-hyper.sty")))))))))
       (propagated-inputs
-       (list texlive-generic-atbegshi
-             texlive-generic-bitset
-             texlive-generic-etexcmds
-             texlive-generic-gettitlestring
-             texlive-generic-iftex
-             texlive-generic-infwarerr
-             texlive-generic-intcalc
-             texlive-generic-kvdefinekeys
-             texlive-generic-kvsetkeys
-             texlive-generic-ltxcmds
-             texlive-generic-pdfescape
-             texlive-latex-auxhook
-             texlive-latex-atveryend
-             texlive-latex-hycolor
-             texlive-latex-kvoptions
-             texlive-latex-letltxmacro
-             texlive-latex-pdftexcmds
-             texlive-latex-refcount
-             texlive-latex-rerunfilecheck
-             texlive-url
+       (list texlive-atbegshi
+             texlive-auxhook
+             texlive-bitset
              texlive-cm
-             texlive-latex-graphics     ;for keyval
+             texlive-etexcmds
+             texlive-gettitlestring
+             texlive-graphics           ;for keyval
+             texlive-hycolor
+             texlive-intcalc
+             texlive-kvdefinekeys
+             texlive-kvsetkeys
+             texlive-letltxmacro
+             texlive-ltxcmds
+             texlive-pdfescape
+             texlive-refcount
+             texlive-rerunfilecheck
              texlive-stringenc
+             texlive-url
              texlive-zapfding))
       (home-page "https://www.ctan.org/pkg/hyperref")
       (synopsis "Extensive support for hypertext in LaTeX")
@@ -3474,40 +3590,118 @@ pdf and HTML backends.  The package is distributed with the @code{backref} and
 (define-deprecated-package texlive-latex-hyperref texlive-hyperref)
 
 (define-public texlive-oberdiek
-  (package
-    (name "texlive-oberdiek")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "oberdiek"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1cadrkpdqs65gxsaszfgfd8wqp8pvpik2sjmlyq3hz5p9yna3p9m"))))
-    (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/oberdiek"
-       #:build-targets '("oberdiek.ins")
-       #:phases
-       (modify-phases %standard-phases
-         ;; "ifpdf.ins" is not generated, so we need to process the dtx file.
-         (add-after 'unpack 'do-not-process-ifpdf.ins
-           (lambda _
-             (substitute* "oberdiek.ins"
-               (("ifpdf.ins") "ifpdf.dtx"))
-             #t)))))
-    (propagated-inputs
-     (list texlive-generic-iftex))
-    (home-page "https://www.ctan.org/pkg/oberdiek")
-    (synopsis "Bundle of packages submitted by Heiko Oberdiek")
-    (description
-     "The bundle comprises various LaTeX packages, providing among others:
+  (let ((template (simple-texlive-package
+                   "texlive-oberdiek"
+                   (list "bibtex/bib/oberdiek/"
+                         "doc/latex/oberdiek/"
+                         "source/latex/oberdiek/"
+                         "tex/generic/oberdiek/"
+                         "tex/latex/oberdiek/")
+                   (base32
+                    "00lp24fckawpy997j7zagsxv89jif40wgjq8fw502v06d225ikp3"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/oberdiek")
+         ((#:build-targets _ '())
+          #~(list "oberdiek.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/oberdiek")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc)
+                    ;; XXX: `#:tex-directory' is limited to one location, but
+                    ;; the package needs to install files elsewhere, so we do
+                    ;; that manually here.
+                    (with-directory-excursion origin
+                      (let ((extra '("bibtex/bib/oberdiek"
+                                     "tex/generic/oberdiek")))
+                        (for-each
+                         (lambda (d)
+                           (for-each (lambda (f)
+                                       (install-file
+                                        f
+                                        (string-append #$output
+                                                       "/share/texmf-dist/"
+                                                       d)))
+                                     (find-files d)))
+                         extra))))))))))
+      (propagated-inputs
+       (list texlive-auxhook
+             texlive-grfext
+             texlive-grffile
+             texlive-iftex
+             texlive-infwarerr
+             texlive-kvoptions
+             texlive-pdftexcmds))
+      (home-page "https://www.ctan.org/pkg/oberdiek")
+      (synopsis "Bundle of packages submitted by Heiko Oberdiek")
+      (description
+       "The bundle comprises various LaTeX packages, providing among others:
 better accessibility support for PDF files; extensible chemists reaction
 arrows; record information about document class(es) used; and many more.")
-    (license license:lppl1.3+)))
+      (license license:lppl1.3+))))
 
 (define-deprecated-package texlive-latex-oberdiek texlive-oberdiek)
 
+(define-public texlive-rerunfilecheck
+  (let ((template (simple-texlive-package
+                   "texlive-rerunfilecheck"
+                   (list "doc/latex/rerunfilecheck/"
+                         "source/latex/rerunfilecheck/"
+                         "tex/latex/rerunfilecheck/")
+                   (base32
+                    "0f53b6dlnlrxkzj7h7x750p0489i2gg3isfqn0dlpncpq23w1r36"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/rerunfilecheck")
+         ((#:build-targets _ '())
+          #~(list "rerunfilecheck.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/rerunfilecheck")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-atveryend
+             texlive-infwarerr
+             texlive-kvoptions
+             texlive-pdftexcmds
+             texlive-uniquecounter))
+      (home-page "https://www.ctan.org/pkg/rerunfilecheck")
+      (synopsis "Checksum based rerun checks on auxiliary files")
+      (description
+       "This package provides additional rerun warnings if some auxiliary
+files have changed.  It is based on MD5 checksum, provided by pdfTeX.")
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-rerunfilecheck texlive-rerunfilecheck)
+
 (define-public texlive-onedown
   (let ((template
          (simple-texlive-package
@@ -3552,63 +3746,62 @@ diagrams, automated check on consistency of suit and hands, and multilingual
 output of bridge terms.")
       (license license:lppl1.3+))))
 
-(define-public texlive-latex-rerunfilecheck
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-rerunfilecheck"
-              '("/doc/latex/rerunfilecheck/"
-                "/tex/latex/rerunfilecheck/")
-              (base32
-               "1myz0d5bxhxvl4220ikywh921qld8n324kk9kscqbc5iw4063g56")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-generic-infwarerr texlive-generic-uniquecounter
-           texlive-latex-atveryend texlive-latex-kvoptions
-           texlive-latex-pdftexcmds))
-    (home-page "https://www.ctan.org/pkg/rerunfilecheck")
-    (synopsis "Checksum based rerun checks on auxiliary files")
-    (description
-     "This package provides additional rerun warnings if some auxiliary
-files have changed.  It is based on MD5 checksum, provided by pdfTeX.")
-    (license license:lppl1.3c+)))
+(define-public texlive-tools
+  (let ((template (simple-texlive-package
+                   "texlive-tools"
+                   (list "doc/latex/tools/"
+                         "source/latex/tools/"
+                         "tex/latex/tools/")
+                   (base32
+                    "0c0ixkcvrlzx6sdj25ak3bx0j65qghf51w66yg5wlnpg08d3awrs"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/tools")
+         ((#:build-targets _ '())
+          #~(list "tools.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/tools")))
+              (replace 'copy-files
+                (lambda _
+                  (let ((origin #$(package-source this-package))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc)
+                    ;; These files are not generated.
+                    (let ((directory "/tex/latex/tools"))
+                      (with-directory-excursion (string-append origin directory)
+                        (for-each
+                         (lambda (f)
+                           (install-file f (string-append #$output
+                                                          "/share/texmf-dist"
+                                                          directory)))
+                         '("array-2016-10-06.sty"
+                           "array-2020-02-10.sty"
+                           "multicol-2017-04-11.sty"
+                           "varioref-2016-02-16.sty")))))))))))
+      (home-page "https://www.ctan.org/tex-archive/macros/latex/required/tools/")
+      (synopsis "LaTeX standard tools bundle")
+      (description "This package provides a collection of simple tools that
+are part of the LaTeX required tools distribution, comprising the packages:
+@code{afterpage}, @code{array}, @code{bm}, @code{calc}, @code{dcolumn},
+@code{delarray}, @code{enumerate}, @code{fileerr}, @code{fontsmpl},
+@code{ftnright}, @code{hhline}, @code{indentfirst}, @code{layout},
+@code{longtable}, @code{multicol}, @code{rawfonts}, @code{showkeys},
+@code{somedefs}, @code{tabularx}, @code{theorem}, @code{trace},
+@code{varioref}, @code{verbatim}, @code{xr}, and @code{xspace}.")
+      (license license:lppl1.3+))))
 
-(define-public texlive-latex-tools
-  (package
-    (name "texlive-latex-tools")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "tools"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1vm5wfyd0vbmv31a29fc7k8y14xiw00msvdx9n7dzsn9zpfjflqs"))))
-    (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/tools"
-       #:build-targets '("tools.ins")
-       #:phases (modify-phases %standard-phases
-                  (add-after 'install 'provide-array-2016-10-06.sty
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; XXX: array.sty does:
-                      ;;  "DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}"
-                      ;; ...which causes some users (hypre) to look for that
-                      ;; file specifically.  Provide it.
-                      (with-directory-excursion (string-append
-                                                 (assoc-ref outputs "out")
-                                                 "/share/texmf-dist/tex"
-                                                 "/latex/tools")
-                        (symlink "array.sty" "array-2016-10-06.sty")))))))
-    (home-page "https://www.ctan.org/pkg/latex-tools")
-    (synopsis "LaTeX standard tools bundle")
-    (description
-     "This package is a collection of (variously) simple tools provided as
-part of the LaTeX required tools distribution, comprising the following
-packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
-fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
-rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
-xr, and xspace.")
-    (license license:lppl1.3+)))
+(define-deprecated-package texlive-latex-tools texlive-tools)
 
 (define-public texlive-url
   (package
@@ -4486,6 +4679,7 @@ language that is written in a Cyrillic alphabet.")
                     "11f14dzhwsy4pli21acccip43d36nf3pac33ihjffnps1i2mhqkd"))))
     (package
       (inherit template)
+      (outputs '("out" "doc"))
       (arguments
        (substitute-keyword-arguments (package-arguments template)
          ((#:tex-directory _ #t)
@@ -4495,14 +4689,34 @@ language that is written in a Cyrillic alphabet.")
              (add-after 'unpack 'chdir
                (lambda _
                  (chdir "source/latex/psnfss")))
-           (add-before 'copy-files 'unchdir
-             (lambda _
-               (chdir "../../..")))
-           (add-after 'copy-files 'delete-extra-files
-             (lambda* (#:key outputs #:allow-other-keys)
-               (delete-file-recursively
-                (string-append (assoc-ref outputs "out")
-                               "/share/texmf-dist/source/latex/psnfss/build"))))))))
+             (add-after 'install 'chdir-back
+               (lambda _
+                 (chdir "../../..")))
+             (add-after 'chdir-back 'clean-installed-files
+               (lambda _
+                 ;; Remove the generated .sty files from the build area as
+                 ;; these were already copied to the default output in the
+                 ;; "install" phase.
+                 (delete-file-recursively "source/latex/psnfss/build")))
+             (add-after 'clean-installed-files 'move-doc-files
+               (lambda* (#:key outputs #:allow-other-keys)
+                 (let* ((doc (assoc-ref outputs "doc"))
+                        (doc-root (string-append doc "/share/texmf-dist"))
+                        (doc-path "doc/latex/psnfss")
+                        (source-path "source/latex/psnfss"))
+                   ;; Move the PDF documentation to the "doc" output.
+                   (let* ((file-name "psnfss2e.pdf")
+                          (source (string-append doc-path "/" file-name))
+                          (target-dir (string-append doc-root "/" doc-path)))
+                     (mkdir-p target-dir)
+                     (copy-file source
+                                (string-append target-dir "/" file-name))
+                     (delete-file source))
+
+                   ;; Keep the remaining files together with the package's
+                   ;; source, as per the installation instructions.
+                   (copy-recursively doc-path source-path)
+                   (delete-file-recursively "doc"))))))))
       (native-inputs
        (list texlive-cm))
       (home-page "https://www.ctan.org/pkg/psnfss")
@@ -4532,6 +4746,7 @@ part of the LaTeX required set of packages.")
                 texlive-cm
                 texlive-cm-super ; to avoid bitmap fonts
                 texlive-fonts-latex
+                texlive-graphics
                 texlive-metafont
                 texlive-latex-base
                 texlive-kpathsea       ;for mktex.opt
@@ -4541,9 +4756,8 @@ part of the LaTeX required set of packages.")
                 texlive-babel
                 texlive-generic-babel-english
                 texlive-latex-cyrillic
-                texlive-latex-graphics
                 texlive-psnfss
-                texlive-latex-tools
+                texlive-tools
                 texlive-tetex)))
     (package
       (name "texlive-base")
@@ -5096,24 +5310,47 @@ Unicode characters.  The document should be processed by (pdf)LaTeX with the
 Unicode option of @code{inputenc} or @code{inputenx}, or by XeLaTeX/LuaLaTeX.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-latex-pdftexcmds
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-pdftexcmds"
-              '("/doc/generic/pdftexcmds/"
-                "/tex/generic/pdftexcmds/")
-              (base32
-               "1hph0djbfc8hlwfc41rzlf8l3ccyyvc0n7a0qdrr9881jwd6iv1b")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-generic-iftex texlive-generic-infwarerr
-           texlive-generic-ltxcmds))
-    (home-page "https://www.ctan.org/pkg/pdftexcmds")
-    (synopsis "LuaTeX support for pdfTeX utility functions")
-    (description
-     "This package makes a number of utility functions from pdfTeX
-available for luaTeX by reimplementing them using Lua.")
-    (license license:lppl1.3c+)))
+(define-public texlive-pdftexcmds
+  (let ((template (simple-texlive-package
+                   "texlive-pdftexcmds"
+                   (list "doc/generic/pdftexcmds/"
+                         "source/generic/pdftexcmds/"
+                         "tex/generic/pdftexcmds/")
+                   (base32
+                    "0gad1vi0r5xw7gyj1cb2cp58j4dqrw4awcfxmfrna9xbz91g4sn9"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/pdftexcmds")
+         ((#:build-targets _ '())
+          #~(list "pdftexcmds.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/generic/pdftexcmds")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-iftex texlive-infwarerr texlive-ltxcmds))
+      (home-page "https://www.ctan.org/pkg/pdftexcmds")
+      (synopsis "LuaTeX support for pdfTeX utility functions")
+      (description
+       "This package makes a number of utility functions from pdfTeX
+available for LuaTeX by reimplementing them using Lua.")
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-pdftexcmds texlive-pdftexcmds)
 
 (define-public texlive-latex-psfrag
   (package
@@ -5152,12 +5389,12 @@ rotated.")
     (propagated-inputs
      (list texlive-latex-bigfoot ; for suffix
            texlive-filemod
-           texlive-latex-graphics
+           texlive-graphics
            texlive-latex-ifplatform
            texlive-latex-l3kernel ; for expl3
            texlive-oberdiek
            texlive-latex-psfrag
-           texlive-latex-tools ; for shellesc
+           texlive-tools ; for shellesc
            texlive-latex-trimspaces
            texlive-latex-xkeyval))
     (home-page "https://www.ctan.org/pkg/pstool")
@@ -5171,24 +5408,48 @@ re-processing.")
 
 (define-deprecated-package texlive-latex-pstool texlive-pstool)
 
-(define-public texlive-latex-refcount
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-refcount"
-              (list "/doc/latex/refcount/"
-                    "/tex/latex/refcount/")
-              (base32
-               "0pkmqj2qihndlv3ks33xzqw91q46jx79r3aygj68d8dflyddi583")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/refcount")
-    (synopsis "Counter operations with label references")
-    (description
-     "This package provides the @code{\\setcounterref} and
+(define-public texlive-refcount
+  (let ((template (simple-texlive-package
+                   "texlive-refcount"
+                   (list "doc/latex/refcount/"
+                         "source/latex/refcount/"
+                         "tex/latex/refcount/")
+                   (base32
+                    "128cvwdl4wcdshvs59yn5iljdxxdrc5jircbxav77y7kc3l33z7z"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/refcount")
+         ((#:build-targets _ '())
+          #~(list "refcount.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/refcount")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/refcount")
+      (synopsis "Counter operations with label references")
+      (description
+       "This package provides the @code{\\setcounterref} and
 @code{\\addtocounterref} commands which use the section (or other) number
 from the reference as the value to put into the counter.  It also provides
 @code{\\setcounterpageref} and @code{\\addtocounterpageref} that do the
 corresponding thing with the page reference of the label.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-refcount texlive-refcount)
 
 (define-public texlive-seminar
   (package
@@ -5602,7 +5863,7 @@ BibLaTeX, and is considered experimental.")
     (arguments '(#:tex-directory "latex/geometry"))
     (propagated-inputs
      (list texlive-oberdiek             ;for ifpdf
-           texlive-latex-graphics))     ;for keyval
+           texlive-graphics))           ;for keyval
     (home-page "https://www.ctan.org/pkg/geometry")
     (synopsis "Flexible and complete interface to document dimensions")
     (description
@@ -5766,15 +6027,15 @@ routine.")
                          texlive-booktabs
                          texlive-cm
                          texlive-fontspec
-                         texlive-generic-iftex
+                         texlive-iftex
                          texlive-latex-base
                          texlive-latex-eukdate
-                         texlive-latex-graphics
+                         texlive-graphics
                          texlive-latex-multirow
                          texlive-lm     ;for lmroman10-regular
                          texlive-stix2-otf))
-    (propagated-inputs (list texlive-fontspec texlive-generic-iftex
-                             texlive-latex-graphics))
+    (propagated-inputs (list texlive-fontspec texlive-iftex
+                             texlive-graphics))
     (home-page "https://ctan.org/pkg/metalogo")
     (synopsis "Extended TeX logo macros")
     (description "This package exposes spacing parameters for various TeX
@@ -5890,7 +6151,7 @@ also provides compacted versions of enumerate and itemize.")
                          texlive-booktabs
                          texlive-caption
                          texlive-context
-                         texlive-latex-fancyvrb
+                         texlive-fancyvrb
                          texlive-etoolbox
                          texlive-fonts-latex
                          texlive-fontspec
@@ -5900,13 +6161,13 @@ also provides compacted versions of enumerate and itemize.")
                          ;; them.
                          texlive-stringenc
                          texlive-zapfding
-                         texlive-latex-graphics
+                         texlive-graphics
                          texlive-kpathsea ;for cp227.tcx & friends
                          texlive-makecmds
                          texlive-metalogo
                          texlive-microtype
                          texlive-paralist
-                         texlive-latex-tools
+                         texlive-tools
                          texlive-tex-ini-files)) ;for pdftexconfig
     ;; polyglossia.sty \RequirePackage or \\usepackage these other TexLive
     ;; packages.
@@ -5922,7 +6183,7 @@ also provides compacted versions of enumerate and itemize.")
            texlive-zapfding
            texlive-makecmds
            texlive-latex-l3packages     ;expl3, l3keys2e, xparse
-           texlive-latex-tools
+           texlive-tools
            texlive-latex-xkeyval))
     (home-page "https://www.ctan.org/pkg/polyglossia")
     (synopsis "Alternative to Babel for XeLaTeX and LuaLaTeX")
@@ -6258,39 +6519,45 @@ using box macros and flexible verbatim macros.  You can box mathematics,
 floats, center, flushleft, and flushright, lists, and pages.")
     (license license:lppl1.2+)))
 
-(define-public texlive-latex-fancyhdr
-  (package
-    (name "texlive-latex-fancyhdr")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/fancyhdr"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1h2zv7cps0pknqhy2dyfclyi002lmsfshm0rn6ywfl9p4fnvh0bc"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/fancyhdr")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/fancyhdr")
-    (synopsis "Extensive control of page headers and footers in LaTeX2e")
-    (description
-     "The package provides extensive facilities, both for constructing headers
-and footers, and for controlling their use (for example, at times when LaTeX
-would automatically change the heading style in use).")
-    (license license:lppl)))
+(define-public texlive-fancyhdr
+  (let ((template (simple-texlive-package
+                   "texlive-fancyhdr"
+                   (list "doc/latex/fancyhdr/"
+                         "source/latex/fancyhdr/"
+                         "tex/latex/fancyhdr/")
+                   (base32
+                    "15fainwxs22gg4xhwsv1vmjgdhg34dbkir26nnk4pb6jprpwb83f"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/fancyhdr")
+         ((#:build-targets _ '())
+          #~(list "fancyhdr.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _ (chdir "source/latex/fancyhdr")))
+              (replace 'copy-files
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/fancyhdr")
+      (synopsis "Extensive control of page headers and footers in LaTeX2e")
+      (description
+       "This package provides extensive facilities, both for constructing
+headers and footers, and for controlling their use (for example, at times when
+LaTeX would automatically change the heading style in use).")
+      (license license:lppl))))
+
+(define-deprecated-package texlive-latex-fancyhdr texlive-fancyhdr)
 
 (define-public texlive-latex-float
   (package
@@ -6340,6 +6607,48 @@ the same place.  The package also has a range of techniques for labelling
 footnotes with symbols rather than numbers.")
     (license license:lppl1.3+)))
 
+(define-public texlive-letltxmacro
+  (let ((template (simple-texlive-package
+                   "texlive-letltxmacro"
+                   (list "doc/latex/letltxmacro/"
+                         "source/latex/letltxmacro/"
+                         "tex/latex/letltxmacro/")
+                   (base32
+                    "16bmwsng9p80jf78sdmib24apwnw3raw306cs1ms50z5s9dsfdby"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/letltxmacro")
+         ((#:build-targets _ '())
+          #~(list "letltxmacro.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/letltxmacro")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/letltxmacro")
+      (synopsis "Let assignment for macros")
+      (description
+       "TeX’s @code{\\let} assignment does not work for LaTeX macros with
+optional arguments, or for macros that are defined as robust macros by
+@code{\\DeclareRobustCommand}.  This package defines @code{\\LetLtxMacro}
+that also takes care of the involved internal macros.")
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-letltxmacro texlive-letltxmacro)
+
 (define-public texlive-latex-frankenstein
   (package
     (name "texlive-latex-frankenstein")
@@ -6379,52 +6688,47 @@ BibTeX bibliography style.  The individual packages are: @code{abbrevs},
     ;; later.
     (license license:lppl1.2+)))
 
-(define-public texlive-latex-letltxmacro
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-letltxmacro"
-              (list "/doc/latex/letltxmacro/"
-                    "/tex/latex/letltxmacro/")
-              (base32
-               "0yy1m1jiyxq2pssp0pidaa2swx6lyxw3zwpm2r8m0v2r3lvsyyxx")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/letltxmacro")
-    (synopsis "Let assignment for macros")
-    (description
-     "TeX’s @code{\\let} assignment does not work for LaTeX macros with
-optional arguments, or for macros that are defined as robust macros by
-@code{\\DeclareRobustCommand}.  This package defines @code{\\LetLtxMacro}
-that also takes care of the involved internal macros.")
-    (license license:lppl1.3c+)))
-
 (define-public texlive-listings
-  (package
-    (name "texlive-listings")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "listings"))
-              (file-name
-               ;; TODO: Drop "latex-" on next rebuild cycle.
-               (string-append "texlive-latex-listings-" version "-checkout"))
-              (sha256
-               (base32
-                "082zri3gp8s6p2difhk1pbix2vzmvsf6fmld2z78v35xwk3fiya0"))))
-    (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/listings"
-       #:build-targets '("listings.ins")))
-    (home-page "https://www.ctan.org/pkg/listings")
-    (synopsis "Typeset source code listings using LaTeX")
-    (description
-     "The package enables the user to typeset programs (programming code)
+  (let ((template
+         (simple-texlive-package
+          "texlive-listings"
+          (list "doc/latex/listings/"
+                "source/latex/listings/"
+                "tex/latex/listings/")
+          (base32 "15dnm0j86305x84ss3ymhhcczcw45b2liq01vrab6fj204wzsahk"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/listings")
+         ((#:build-targets _ '())
+          #~(list "listings.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/listings")))
+              (replace 'copy-files
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/listings")
+      (synopsis "Typeset source code listings using LaTeX")
+      (description
+       "The package enables the user to typeset programs (programming code)
 within LaTeX; the source code is read directly by TeX---no front-end processor
 is needed.  Keywords, comments and strings can be typeset using different
 styles.  Support for @code{hyperref} is provided.")
-    (license license:lppl1.3+)))
+      (license license:lppl1.3+))))
 
-(define-public texlive-latex-listings
-  (deprecated-package "texlive-latex-listings" texlive-listings))
+(define-deprecated-package texlive-latex-listings texlive-listings)
 
 (define-public texlive-latex-jknapltx
   (package
@@ -6465,23 +6769,47 @@ transliterate semitic languages; patches to make (La)TeX formulae embeddable
 in SGML; use maths minus in text as appropriate; simple Young tableaux.")
     (license license:gpl2)))
 
-(define-public texlive-latex-kvoptions
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-kvoptions"
-              (list "/doc/latex/kvoptions/"
-                    "/tex/latex/kvoptions/")
-              (base32
-               "02i4n2n3j4lg68d3nam08m63kb4irc99wfhyc2z51r02lm1wwmvw")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-generic-kvsetkeys texlive-generic-ltxcmds))
-    (home-page "https://www.ctan.org/pkg/kvoptions")
-    (synopsis "Key/value format for package options")
-    (description
-     "This package provides facilities for using key-value format in
+(define-public texlive-kvoptions
+  (let ((template (simple-texlive-package
+                   "texlive-kvoptions"
+                   (list "doc/latex/kvoptions/"
+                         "source/latex/kvoptions/"
+                         "tex/latex/kvoptions/")
+                   (base32
+                    "1b8q93l54160b8gn3fq484n15n6cylrhmf2xk7p42czg2rqw7w3l"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/kvoptions")
+         ((#:build-targets _ '())
+          #~(list "kvoptions.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/kvoptions")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-kvsetkeys texlive-ltxcmds))
+      (home-page "https://www.ctan.org/pkg/kvoptions")
+      (synopsis "Key/value format for package options")
+      (description
+       "This package provides facilities for using key-value format in
 package options.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-latex-kvoptions texlive-kvoptions)
 
 (define-public texlive-fonts-ec
   (package
@@ -6738,12 +7066,12 @@ format under XeTeX.")
               (mkdir-p doc)
               (copy-recursively (string-append (getenv "ROOT_DIR") "/doc")
                                 doc))))))
-    (propagated-inputs (list texlive-generic-atbegshi
-                             texlive-generic-gettitlestring
-                             texlive-generic-iftex
-                             texlive-latex-atveryend
-                             texlive-latex-kvoptions
-                             texlive-latex-pdftexcmds
+    (propagated-inputs (list texlive-atbegshi
+                             texlive-gettitlestring
+                             texlive-iftex
+                             texlive-atveryend
+                             texlive-kvoptions
+                             texlive-pdftexcmds
                              texlive-latex-xkeyval))
     (home-page "https://github.com/ho-tex/zref")
     (synopsis "Reference scheme for LaTeX")
@@ -6858,26 +7186,53 @@ format.  LaTeX support, for using these fonts in mathematics, is available via
 one of the packages @code{calrsfs} and @code{mathrsfs}.")
     (license (license:fsf-free "http://mirrors.ctan.org/fonts/rsfs/README"))))
 
-(define-public texlive-latex-eso-pic
-  (package
-    (name "texlive-latex-eso-pic")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "eso-pic"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "12f7pbhiav4iz3rra5vq85v9f14h8j1ybi42kvnkzgjsay87p7gf"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/eso-pic"))
-    (home-page "https://www.ctan.org/pkg/eso-pic")
-    (synopsis "Add picture commands (or backgrounds) to every page")
-    (description
-     "The package adds one or more user commands to LaTeX's @code{shipout}
+(define-public texlive-eso-pic
+  (let ((template (simple-texlive-package
+                   "texlive-eso-pic"
+                   (list "doc/latex/eso-pic/"
+                         "source/latex/eso-pic/"
+                         "tex/latex/eso-pic/")
+                   (base32
+                    "05bqm4x209wji0q6xk1jrjp0nzqafp44dlq30hlpcagrggjb3d9s"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/eso-pic")
+         ((#:build-targets _ '())
+          #~(list "eso-pic.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/eso-pic")))
+              (replace 'copy-files
+                (lambda _
+                  (let ((origin #$(package-source this-package))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc)
+                    ;; This file is not generated.
+                    (install-file
+                     (string-append origin
+                                    "/tex/latex/eso-pic/showframe.sty")
+                     (string-append
+                      #$output
+                      "/share/texmf-dist/tex/latex/eso-pic")))))))))
+      (home-page "https://ctan.org/macros/latex/contrib/eso-pic")
+      (synopsis "Add picture commands (or backgrounds) to every page")
+      (description
+       "The package adds one or more user commands to LaTeX's @code{shipout}
 routine, which may be used to place the output at fixed positions.  The
 @code{grid} option may be used to find the correct places.")
-    (license license:lppl1.3+)))
+      (license license:lppl1.3+))))
+
+(define-deprecated-package texlive-latex-eso-pic texlive-eso-pic)
 
 (define-public texlive-latex-eepic
   (package
@@ -7077,29 +7432,51 @@ the box width to that of the enclosed text, up to the maximum width given.  The
 package also defines some associated length commands.")
     (license license:gpl3+)))
 
-(define-public texlive-latex-pdfpages
-  (package
-    (name "texlive-latex-pdfpages")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "pdfpages"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "140kl8r7g2ak2frjn5pmwiwibfynyfwp897r9vk8pypmn390lzr2"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/pdfpages"))
-    (home-page "https://www.ctan.org/pkg/pdfpages")
-    (synopsis "Include PDF documents in LaTeX")
-    (description
-     "This package simplifies the inclusion of external multi-page PDF
+(define-public texlive-pdfpages
+  (let ((template (simple-texlive-package
+                   "texlive-pdfpages"
+                   (list "doc/latex/pdfpages/"
+                         "source/latex/pdfpages/"
+                         "tex/latex/pdfpages/")
+                   (base32
+                    "0a68vxkygk20fp51fkp7nvs8mc7h6irdvxal8qsnn9zrgr965d76"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/pdfpages")
+         ((#:build-targets _ '())
+          #~(list "pdfpages.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/pdfpages")))
+              (replace 'copy-files
+                (lambda _
+                  (let ((origin #$(package-source this-package))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-tools texlive-oberdiek texlive-graphics texlive-eso-pic))
+      (home-page "https://ctan.org/macros/latex/contrib/pdfpages")
+      (synopsis "Include PDF documents in LaTeX")
+      (description
+       "This package simplifies the inclusion of external multi-page PDF
 documents in LaTeX documents.  Pages may be freely selected and it is possible
 to put several logical pages onto each sheet of paper.  Furthermore a lot of
 hypertext features like hyperlinks and article threads are provided.  The
 package supports pdfTeX (pdfLaTeX) and VTeX.  With VTeX it is even possible to
 use this package to insert PostScript files, in addition to PDF files.")
-    (license license:lppl1.3+)))
+      (license license:lppl1.3+))))
+
+(define-deprecated-package texlive-latex-pdfpages texlive-pdfpages)
 
 (define-public texlive-stix2-otf
   (let ((base (simple-texlive-package
@@ -7204,23 +7581,41 @@ the whole font.")
 
 (define-deprecated-package texlive-fonts-stmaryrd texlive-stmaryrd)
 
-(define-public texlive-latex-subfigure
-  (package
-    (name "texlive-latex-subfigure")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "subfigure"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "15spcl5wb7w269qd6y596vp4yi8sa5ppcx8w4z2i9kyp02r3a0yb"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/subfigure"))
-    (home-page "https://www.ctan.org/pkg/subfigure")
-    (synopsis "Figures divided into subfigures")
-    (description
-     "This (deprecated) package provides support for the manipulation and
+(define-public texlive-subfigure
+  (let ((template (simple-texlive-package
+                   "texlive-subfigure"
+                   (list "doc/latex/subfigure/"
+                         "source/latex/subfigure/"
+                         "tex/latex/subfigure/")
+                   (base32
+                    "1327ygajf6gza5msvhfjjnk6r3sw7vb7rxg23v4gx4dmyxqfqrbi"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/subfigure")
+         ((#:build-targets _ '())
+          #~(list "subfigure.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/subfigure")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/subfigure")
+      (synopsis "Figures divided into subfigures")
+      (description
+       "This (deprecated) package provides support for the manipulation and
 reference of small or \"sub\" figures and tables within a single figure or
 table environment.  It is convenient to use this package when your subfigures
 are to be separately captioned, referenced, or are to be included in the
@@ -7229,7 +7624,9 @@ used inside a figure environment for each subfigure.  An optional first
 argument is used as the caption for that subfigure.  The package is now
 considered obsolete: it was superseded by @code{subfig}, but users may find
 the more recent @code{subcaption} package more satisfactory.")
-    (license license:lppl)))
+      (license license:lppl))))
+
+(define-deprecated-package texlive-latex-subfigure texlive-subfigure)
 
 (define-public texlive-latex-tabulary
   (package
@@ -7483,9 +7880,9 @@ Simple Young tableaux.
              texlive-jknappen
              texlive-hyperref
              texlive-latex-colortbl
-             texlive-latex-fancyhdr
-             texlive-latex-graphics ;for color.sty
-             texlive-latex-tools ;for array.sty
+             texlive-fancyhdr
+             texlive-graphics ;for color.sty
+             texlive-tools ;for array.sty
              texlive-marvosym
              texlive-tex-ini-files ;for pdftexconfig
              texlive-ulem))
@@ -7560,33 +7957,15 @@ The (currently) supported encodings are: OT1, T1, IL2, TS1, T2*, X2, QX, and
 LGR.  The package doesn't (currently) support mathematics.")
     (license license:lppl)))
 
-(define-public texlive-latex-titlesec
+(define-public texlive-titlesec
   (package
-    (name "texlive-latex-titlesec")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/titlesec"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1kw7dvxvdfbf31zw0n8r0g5xak3vcdf25n33fqw93j59zpc5nvbl"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/titlesec")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/titlesec")
+    (inherit
+     (simple-texlive-package
+      "texlive-titlesec"
+      (list "doc/latex/titlesec/" "tex/latex/titlesec/")
+      (base32 "01nwh4p15xblc3kgivjliihy9kr8yr2cqsf9wn2iwqv1njx0i2zw")
+      #:trivial? #t))
+    (home-page "https://ctan.org/macros/latex/contrib/titlesec")
     (synopsis "Select alternative section titles")
     (description
      "This package provides an interface to sectioning commands for selection
@@ -7596,6 +7975,8 @@ styles.  It also includes a package to change the page styles when there are
 floats in a page.  You may assign headers/footers to individual floats, too.")
     (license license:lppl)))
 
+(define-deprecated-package texlive-latex-titlesec texlive-titlesec)
+
 (define-public texlive-latex-type1cm
   (package
     (name "texlive-latex-type1cm")
@@ -8556,35 +8937,45 @@ including:
 It also ensures compatibility with the @code{media9} and @code{animate} packages.")
     (license license:lppl)))
 
-(define-public texlive-latex-ms
-  (package
-    (name "texlive-latex-ms")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "ms"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "04ww5abfm7dx81d21yr2gwy9jswaalnfm2384xp4cyx7srd9spfv"))))
-    (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/ms"
-       #:tex-format "latex"))
-    (home-page "https://ctan.org/pkg/ms")
-    (synopsis "Various LATEX packages by Martin Schröder")
-    (description
-     "A bundle of LATEX packages by Martin Schröder; the collection comprises:
+(define-public texlive-ms
+  (let ((template
+         (simple-texlive-package
+          "texlive-ms"
+          (list "doc/latex/ms/" "source/latex/ms/" "tex/latex/ms/")
+          (base32 "1cgrpx5mybiirjjdmni8kvqdg37dwfkixq3h9ami0mgxqqqfl2x3"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/ms")
+         ((#:tex-format _ "latex") "latex")
+         ((#:build-targets _ '())
+          #~(list "count1to.ins" "multitoc.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/ms")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://ctan.org/macros/latex/contrib/ms")
+      (synopsis "Various LaTeX packages by Martin Schroder")
+      (description
+       "The remains of a bundle of LaTeX packages by Martin Schroder; the
+collection comprises: count1to, make use of TeX counters; and multitoc,
+typeset the table of contents in multiple columns.")
+      (license license:lppl))))
 
-@itemize
-@item @command{count1to}, make use of fixed TEX counters;
-@item @command{everysel}, set commands to execute every time a font is selected;
-@item @command{everyshi}, set commands to execute whenever a page is shipped out;
-@item @command{multitoc}, typeset the table of contents in multiple columns;
-@item @command{prelim2e}, mark typeset pages as preliminary; and
-@item @command{ragged2e}, typeset ragged text and allow hyphenation.
-@end itemize\n")
-    (license license:lppl1.3c+)))
+(define-deprecated-package texlive-latex-ms texlive-ms)
 
 (define-public texlive-numprint
   (let ((template
@@ -8746,69 +9137,57 @@ from a typewriter.  The package also offers double and wavy underlining, and
 striking out (line through words) and crossing out (/// over words).")
     (license license:lppl1.3c+)))
 
-(define-deprecated-package texlive-generic-ulem texlive-ulem)
-
 (define-public texlive-pgf
   (package
-    (name "texlive-pgf")
-    (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (svn-reference
-             (url (string-append "svn://www.tug.org/texlive/tags/"
-                                 %texlive-tag "/Master/texmf-dist/"
-                                 "/tex/latex/pgf"))
-             (revision %texlive-revision)))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "1jk10rxz5f8vh46am11b40hxhhikk67h9jr3z877q5qc8kwppgza"))))
-    (build-system trivial-build-system)
-    (native-inputs
-     `(("texlive-latex-pgf-generic"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-             (url (string-append "svn://www.tug.org/texlive/tags/"
-                                 %texlive-tag "/Master/texmf-dist/"
-                                 "/tex/generic/pgf"))
-             (revision %texlive-revision)))
-           (file-name (string-append "texlive-latex-pgf-generic" version "-checkout"))
-           (sha256
-            (base32
-             "05zdq7y3am109m5534ahqqp9x5iar3ha68v1r4zkrdly2mijxz2j"))))))
+    (inherit (simple-texlive-package
+              "texlive-pgf"
+              (list "doc/generic/pgf/"
+                    "scripts/pgf/"
+                    "source/generic/pgf/c/"
+                    "source/generic/pgf/testsuite/external/"
+                    "source/generic/pgf/testsuite/mathtest/"
+                    "tex/context/third/pgf/basiclayer/"
+                    "tex/context/third/pgf/frontendlayer/"
+                    "tex/context/third/pgf/math/"
+                    "tex/context/third/pgf/systemlayer/"
+                    "tex/context/third/pgf/utilities/"
+                    "tex/generic/pgf/"
+                    "tex/latex/pgf/basiclayer/"
+                    "tex/latex/pgf/compatibility/"
+                    "tex/latex/pgf/doc/"
+                    "tex/latex/pgf/frontendlayer/"
+                    "tex/latex/pgf/math/"
+                    "tex/latex/pgf/systemlayer/"
+                    "tex/latex/pgf/utilities/"
+                    "tex/plain/pgf/basiclayer/"
+                    "tex/plain/pgf/frontendlayer/"
+                    "tex/plain/pgf/math/"
+                    "tex/plain/pgf/systemlayer/"
+                    "tex/plain/pgf/utilities/")
+              (base32
+               "02qfx9k0ggqfrbrjpfz74w8rkvvzk07rmgr37r7y64gggwpn4cw5")
+              #:trivial? #t))
     (propagated-inputs
-     (list texlive-xcolor))
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target-generic (string-append (assoc-ref %outputs "out")
-                                              "/share/texmf-dist/tex/generic/pgf"))
-               (target-latex (string-append (assoc-ref %outputs "out")
-                                            "/share/texmf-dist/tex/latex/pgf")))
-           (mkdir-p target-generic)
-           (mkdir-p target-latex)
-           (copy-recursively (assoc-ref %build-inputs "texlive-latex-pgf-generic") target-generic)
-           (copy-recursively (assoc-ref %build-inputs "source") target-latex)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/tikz")
+     (list texlive-atveryend
+           texlive-fp
+           texlive-graphics
+           texlive-ms
+           texlive-pdftexcmds
+           texlive-xcolor))
+    (home-page "https://ctan.org/graphics/pgf/base")
     (synopsis "Create PostScript and PDF graphics in TeX")
     (description
      "PGF is a macro package for creating graphics.  It is platform- and
 format-independent and works together with the most important TeX backend
 drivers, including pdfTeX and dvips.  It comes with a user-friendly syntax layer
-called TikZ.
+called TikZ.  Its usage is similar to pstricks and the standard picture
+environment.  PGF works with plain (pdf-)TeX, (pdf-)LaTeX, and ConTeXt.  Unlike
+pstricks, it can produce either PostScript or PDF output.")
+    ;; The code of the package is dual-license: GPL-2 or LPPL-1.3c+.  The
+    ;; documentation is also dual-license: LPPL-1.3c+ or GFDL-1.2.
+    (license (list license:gpl2 license:lppl1.3c+ license:fdl1.2+))))
 
-Its usage is similar to pstricks and the standard picture environment.  PGF
-works with plain (pdf-)TeX, (pdf-)LaTeX, and ConTeXt.  Unlike pstricks, it can
-produce either PostScript or PDF output.")
-    (license license:lppl1.3c+)))
-
-(define-public texlive-latex-pgf
-  (deprecated-package "texlive-latex-pgf" texlive-pgf))
+(define-deprecated-package texlive-latex-pgf texlive-pgf)
 
 (define-public texlive-latex-koma-script
   (package
@@ -8869,162 +9248,381 @@ refers to the version of scrbook, scrreprt, scrartcl, scrlttr2 and
 typearea (which are the main parts of the bundle).")
     (license license:lppl1.3+)))
 
-(define-public texlive-generic-atbegshi
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-atbegshi"
-              '("/doc/latex/atbegshi/"
-                "/tex/generic/atbegshi/")
-              (base32
-               "184fr5kd3wl44ix63lwb3ll7dhiikkyw1czbnzrl4am4rx0zh4d8")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/atbegshi")
-    (synopsis "Execute commands at @code{\\shipout} time")
-    (description
-     "This package is a modern reimplementation of package @code{everyshi},
+(define-public texlive-atbegshi
+  (let ((template (simple-texlive-package
+                   "texlive-atbegshi"
+                   (list "doc/latex/atbegshi/"
+                         "source/latex/atbegshi/"
+                         "tex/generic/atbegshi/")
+                   (base32
+                    "0vd90wdjwj5w4g4xka4nms3rgixjw63iwf0hj0v1akcfflwvgn69"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/atbegshi")
+         ((#:build-targets _ '())
+          #~(list "atbegshi.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/atbegshi")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/atbegshi")
+      (synopsis "Execute commands at @code{\\shipout} time")
+      (description
+       "This package is a modern reimplementation of package @code{everyshi},
 providing various commands to be executed before a @code{\\shipout} command.
 It makes use of e-TeX’s facilities if they are available.  The package may
 be used either with LaTeX or with plain TeX.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-bigintcalc
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-bigintcalc"
-              '("/doc/latex/bigintcalc/README.md"
-                "/tex/generic/bigintcalc/")
-              (base32
-               "19grk4p1dh566hgpzhnjyjnrw57hpjijcpr7ci401n9jszcc1xkz")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-latex-pdftexcmds))
-    (home-page "https://www.ctan.org/pkg/bigintcalc")
-    (synopsis "Integer calculations on very large numbers")
-    (description
-     "This package provides expandable arithmetic operations with big
+(define-deprecated-package texlive-generic-atbegshi texlive-atbegshi)
+
+(define-public texlive-bigintcalc
+  (let ((template (simple-texlive-package
+                   "texlive-bigintcalc"
+                   (list "doc/latex/bigintcalc/"
+                         "source/latex/bigintcalc/"
+                         "tex/generic/bigintcalc/")
+                   (base32
+                    "1cyv4mcvx83ab782l6h2f86a63ipm845r7hv1m6f1z2336vy7rc5"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/bigintcalc")
+         ((#:build-targets _ '())
+          #~(list "bigintcalc.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/bigintcalc")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-pdftexcmds))
+      (home-page "https://www.ctan.org/pkg/bigintcalc")
+      (synopsis "Integer calculations on very large numbers")
+      (description
+       "This package provides expandable arithmetic operations with big
 integers that can exceed TeX's number limits.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-bitset
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-bitset"
-              '("/doc/latex/bitset/README.md"
-                "/tex/generic/bitset/")
-              (base32
-               "0inj6qpzizvsbxdfsaijnl4iq976kyrnchnm3gc1kc2w389zrn1l")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-generic-infwarerr texlive-generic-intcalc
-           texlive-generic-bigintcalc))
-    (home-page "https://www.ctan.org/pkg/bitset")
-    (synopsis "Handle bit-vector datatype")
-    (description
-     "This package defines and implements the data type bit set, a vector
+(define-deprecated-package texlive-generic-bigintcalc texlive-bigintcalc)
+
+(define-public texlive-bitset
+  (let ((template (simple-texlive-package
+                   "texlive-bitset"
+                   (list "doc/latex/bitset/"
+                         "source/latex/bitset/"
+                         "tex/generic/bitset/")
+                   (base32
+                    "1q7vk5gr5a4vaa3l20j178cg2q7a99rxdiyxhzpx9a6lfqfkjddz"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/bitset")
+         ((#:build-targets _ '())
+          #~(list "bitset.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/bitset")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-bigintcalc texlive-infwarerr texlive-intcalc))
+      (home-page "https://www.ctan.org/pkg/bitset")
+      (synopsis "Handle bit-vector datatype")
+      (description
+       "This package defines and implements the data type bit set, a vector
 of bits.  The size of the vector may grow dynamically.  Individual bits
 can be manipulated.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-etexcmds
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-etexcmds"
-              '("/doc/latex/etexcmds/README.md"
-                "/tex/generic/etexcmds/")
-              (base32
-               "11y6pnlq13bp0ybi7c82g8ds8085zv1zaslgqv3dzhgi3dklpc0c")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-generic-infwarerr texlive-generic-iftex))
-    (home-page "https://www.ctan.org/pkg/etexcmds")
-    (synopsis "Avoid name clashes with e-TeX commands")
-    (description
-     "New primitive commands are introduced in e-TeX; sometimes the names
+(define-deprecated-package texlive-generic-bitset texlive-bitset)
+
+(define-public texlive-etexcmds
+  (let ((template (simple-texlive-package
+                   "texlive-etexcmds"
+                   (list "doc/latex/etexcmds/"
+                         "source/latex/etexcmds/"
+                         "tex/generic/etexcmds/")
+                   (base32
+                    "13cf1fs5x9d8749b2jgxmgnkrx0r4hwpl389r15kq3ldz9jfl627"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/etexcmds")
+         ((#:build-targets _ '())
+          #~(list "etexcmds.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/etexcmds")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-iftex texlive-infwarerr))
+      (home-page "https://www.ctan.org/pkg/etexcmds")
+      (synopsis "Avoid name clashes with e-TeX commands")
+      (description
+       "New primitive commands are introduced in e-TeX; sometimes the names
 collide with existing macros.  This package solves the name clashes by
 adding a prefix to e-TeX’s commands.  For example, ε-TeX’s
 @code{\\unexpanded} is provided as @code{\\etex@@unexpanded}.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-gettitlestring
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-gettitlestring"
-              '("/doc/latex/gettitlestring/"
-                "/tex/generic/gettitlestring/")
-              (base32
-               "1p4hg9mac03rzvj9dw0ws3zdh55fy1ns954f912algw9f2aq4xgp")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/gettitlestring")
-    (synopsis "Clean up title references")
-    (description
-     "This package provides commands for cleaning up the title string
+(define-deprecated-package texlive-generic-etexcmds texlive-etexcmds)
+
+(define-public texlive-gettitlestring
+  (let ((template (simple-texlive-package
+                   "texlive-gettitlestring"
+                   (list "doc/latex/gettitlestring/"
+                         "source/latex/gettitlestring/"
+                         "tex/generic/gettitlestring/")
+                   (base32
+                    "1vbvmwrpsvy37gbwdmsqbbsicjiww3i0bh1yqnb75jiya9an0sjb"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/gettitlestring")
+         ((#:build-targets _ '())
+          #~(list "gettitlestring.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/gettitlestring")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/gettitlestring")
+      (synopsis "Clean up title references")
+      (description
+       "This package provides commands for cleaning up the title string
 (such as removing @code{\\label} commands) for packages that typeset such
 strings.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-infwarerr
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-infwarerr"
-              '("/tex/generic/infwarerr/")
-              (base32
-               "19nlrbfmqbkjrrx9x75s9nd6crg1lzimb2fr3hfblaivj6lx8p4r")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/infwarerr")
-    (synopsis "Information/warning/error macros")
-    (description
-     "This package provides a complete set of macros for information,
+(define-deprecated-package texlive-generic-gettitlestring texlive-gettitlestring)
+
+(define-public texlive-infwarerr
+  (let ((template (simple-texlive-package
+                   "texlive-infwarerr"
+                   (list "doc/latex/infwarerr/"
+                         "source/latex/infwarerr/"
+                         "tex/generic/infwarerr/")
+                   (base32
+                    "0lpcrpf3d6xfdp68ri22126x57mvmq5dpj9np68ph8p8lhvhqdjd"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/infwarerr")
+         ((#:build-targets _ '())
+          #~(list "infwarerr.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/infwarerr")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/infwarerr")
+      (synopsis "Information/warning/error macros")
+      (description
+       "This package provides a complete set of macros for information,
 warning and error messages.  Under LaTeX, the commands are wrappers for
 the corresponding LaTeX commands; under Plain TeX they are available as
 complete implementations.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-intcalc
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-intcalc"
-              '("/tex/generic/intcalc/")
-              (base32
-               "0llrnayqwdqxi91yh7panbbiljina3bynv2hxhi6sssaw3pyd92l")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/intcalc")
-    (synopsis "Expandable arithmetic operations with integers")
-    (description
-     "This package provides expandable arithmetic operations with integers,
+(define-deprecated-package texlive-generic-infwarerr texlive-infwarerr)
+
+(define-public texlive-intcalc
+  (let ((template (simple-texlive-package
+                   "texlive-intcalc"
+                   (list "doc/latex/intcalc/"
+                         "source/latex/intcalc/"
+                         "tex/generic/intcalc/")
+                   (base32
+                    "15alwp9cr8wasfajs3p201p7nqml37vly9mpg1j5l6xv95javk7x"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/intcalc")
+         ((#:build-targets _ '())
+          #~(list "intcalc.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/intcalc")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/intcalc")
+      (synopsis "Expandable arithmetic operations with integers")
+      (description
+       "This package provides expandable arithmetic operations with integers,
 using the e-TeX extension @code{\\numexpr} if it is available.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-kvdefinekeys
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-kvdefinekeys"
-              '("/tex/generic/kvdefinekeys/")
-              (base32
-               "12nn74skhwiszbdhawqds31caz6d59a5pjmwar0r8lmk4f1jr3xh")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/kvdefinekeys")
-    (synopsis "Define keys for use in the @code{kvsetkeys} package")
-    (description
-     "This package provides the @code{\\kv@@define@@key} (analogous to
+(define-deprecated-package texlive-generic-intcalc texlive-intcalc)
+
+(define-public texlive-kvdefinekeys
+  (let ((template (simple-texlive-package
+                   "texlive-kvdefinekeys"
+                   (list "doc/latex/kvdefinekeys/"
+                         "source/latex/kvdefinekeys/"
+                         "tex/generic/kvdefinekeys/")
+                   (base32
+                    "1026h223ph3nzhs6jqbasa0bzsrdg3zgllfcwwcavfzb5i6p9jdf"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/kvdefinekeys")
+         ((#:build-targets _ '())
+          #~(list "kvdefinekeys.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/kvdefinekeys")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/kvdefinekeys")
+      (synopsis "Define keys for use in the @code{kvsetkeys} package")
+      (description
+       "This package provides the @code{\\kv@@define@@key} (analogous to
 keyval’s @code{\\define@@key}, to define keys for use by @code{kvsetkeys}.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-kvsetkeys
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-kvsetkeys"
-              '("/tex/generic/kvsetkeys/")
-              (base32
-               "149vpmv4vms269dzq4sghlngg380sasvxnb3sx9rfs7d9j0finvi")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/kvsetkeys")
-    (synopsis "Key value parser with default handler support")
-    (description
-     "This package provides @code{\\kvsetkeys}, a variant of @code{\\setkeys}
+(define-deprecated-package texlive-generic-kvdefinekeys texlive-kvdefinekeys)
+
+(define-public texlive-kvsetkeys
+  (let ((template (simple-texlive-package
+                   "texlive-kvsetkeys"
+                   (list "doc/latex/kvsetkeys/"
+                         "source/latex/kvsetkeys/"
+                         "tex/generic/kvsetkeys/")
+                   (base32
+                    "0b2f2r49vi8x54qshm1h9sh8zhdmy0mc2y44yd05kcmmbiiq7hfz"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/kvsetkeys")
+         ((#:build-targets _ '())
+          #~(list "kvsetkeys.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/kvsetkeys")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/kvsetkeys")
+      (synopsis "Key value parser with default handler support")
+      (description
+       "This package provides @code{\\kvsetkeys}, a variant of @code{\\setkeys}
 from the @code{keyval} package.  Users can specify a handler that deals with
 unknown options.  Active commas and equal signs may be used, and only one
 level of curly braces are removed from the values.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-generic-kvsetkeys texlive-kvsetkeys)
 
 (define-public texlive-generic-listofitems
   (package
@@ -9060,56 +9658,130 @@ the parsing character has been selected by the user, and to access any of
 these items with a simple syntax.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-generic-ltxcmds
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-ltxcmds"
-              '("/tex/generic/ltxcmds/")
-              (base32
-               "1lr77yai2qivlx26s5094czpfxmg96bhxps5wbm8xn7cpsw0zbd9")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/ltxcmds")
-    (synopsis "LaTeX kernel commands extracted for general use")
-    (description
-     "This package exports some utility macros from the LaTeX kernel into
+(define-public texlive-ltxcmds
+  (let ((template (simple-texlive-package
+                   "texlive-ltxcmds"
+                   (list "doc/generic/ltxcmds/"
+                         "source/generic/ltxcmds/"
+                         "tex/generic/ltxcmds/")
+                   (base32
+                    "1izcw9jl64iij541183hc156sjwamvxm7q9fkpfnz8sppyg31fkb"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/ltxcmds")
+         ((#:build-targets _ '())
+          #~(list "ltxcmds.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/generic/ltxcmds")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/ltxcmds")
+      (synopsis "LaTeX kernel commands extracted for general use")
+      (description
+       "This package exports some utility macros from the LaTeX kernel into
 a separate namespace and also makes them available for other formats such
 as plain TeX.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-pdfescape
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-pdfescape"
-              '("/tex/generic/pdfescape/")
-              (base32
-               "1vbdjmm9bi9ngzz2z1b8jnf6nzf9xsaj5pvyswg13y4dr00mnz6n")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/pdfescape")
-    (synopsis "Use escape features from pdfTeX with plain TeX")
-    (description
-     "This package implements pdfTeX's escape features (@code{\\pdfescapehex},
+(define-deprecated-package texlive-generic-ltxcmds texlive-ltxcmds)
+
+(define-public texlive-pdfescape
+  (let ((template (simple-texlive-package
+                   "texlive-pdfescape"
+                   (list "doc/latex/pdfescape/"
+                         "source/latex/pdfescape/"
+                         "tex/generic/pdfescape/")
+                   (base32
+                    "16a0rdmpa4wxh6gyf46qwfgyh399rwdind2wc89phqd50ky9b5m4"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/pdfescape")
+         ((#:build-targets _ '())
+          #~(list "pdfescape.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/pdfescape")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/pdfescape")
+      (synopsis "pdfTeX's escape features for plain TeX")
+      (description
+       "This package implements pdfTeX's escape features (@code{\\pdfescapehex},
 @code{\\pdfunescapehex}, @code{\\pdfescapename}, @code{\\pdfescapestring})
 using TeX or e-TeX.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
 
-(define-public texlive-generic-uniquecounter
-  (package
-    (inherit (simple-texlive-package
-              "texlive-generic-uniquecounter"
-              '("/doc/latex/uniquecounter/"
-                "/tex/generic/uniquecounter/")
-              (base32
-               "1bjh8vwiqlkmjqndnh4xp116524x4m3hdcyq2s231jiqy8il8dcc")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-generic-bigintcalc texlive-generic-infwarerr))
-    (home-page "https://www.ctan.org/pkg/uniquecounter")
-    (synopsis "Unlimited unique counter")
-    (description
-     "This package provides a kind of counter that provides unique number
+(define-deprecated-package texlive-generic-pdfescape texlive-pdfescape)
+
+(define-public texlive-uniquecounter
+  (let ((template (simple-texlive-package
+                   "texlive-uniquecounter"
+                   (list "doc/latex/uniquecounter/"
+                         "source/latex/uniquecounter/"
+                         "tex/generic/uniquecounter/")
+                   (base32
+                    "1ll3iwk8x44l3qx1dhna399ngg66vbllivv8i3lwzriwkx22xbf3"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "generic/uniquecounter")
+         ((#:build-targets _ '())
+          #~(list "uniquecounter.dtx"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/uniquecounter")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (propagated-inputs
+       (list texlive-bigintcalc texlive-infwarerr))
+      (home-page "https://www.ctan.org/pkg/uniquecounter")
+      (synopsis "Unlimited unique counter")
+      (description
+       "This package provides a kind of counter that provides unique number
 values.  Several counters can be created with different names.  The numeric
 values are not limited.")
-    (license license:lppl1.3c+)))
+      (license license:lppl1.3c+))))
+
+(define-deprecated-package texlive-generic-uniquecounter texlive-uniquecounter)
 
 (define-public texlive-latex-readarray
   (package
@@ -9648,9 +10320,9 @@ may be used instead of @code{\\marginpar} at almost every place where
 frames made with the @code{framed} package.")
       (license license:lppl1.3c+))))
 
-(define-public texlive-generic-iftex
+(define-public texlive-iftex
   (let ((template (simple-texlive-package
-                   "texlive-generic-iftex"
+                   "texlive-iftex"
                    (list "/doc/generic/iftex/"
                          "/tex/generic/iftex/")
                    (base32
@@ -9668,9 +10340,9 @@ package also provides the @code{\\RequirePDFTeX}, @code{\\RequireXeTeX}, and
 LuaTeX (respectively) is not the engine in use.")
       (license license:lppl1.3+))))
 
-(define-deprecated-package texlive-iftex texlive-generic-iftex)
+(define-deprecated-package texlive-generic-iftex texlive-iftex)
 
-(define-deprecated-package texlive-generic-ifxetex texlive-generic-iftex)
+(define-deprecated-package texlive-generic-ifxetex texlive-iftex)
 
 (define-public texlive-tabu
   (let ((template
@@ -9716,37 +10388,6 @@ used in place of @code{tabular}, @code{tabular*} and @code{tabularx}
 environments, as well as the @code{array} environment in maths mode.")
       (license license:lppl1.3+))))
 
-(define-public texlive-tools
-  (let ((template (simple-texlive-package
-                   "texlive-tools"
-                   (list "/doc/latex/tools/"
-                         "/source/latex/tools/")
-                   (base32
-                    "1xas0b69r3d5x4zhcqysgybyqaikd9avv6r1bdckb947id3iaz58"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/tools")
-         ((#:build-targets _ '())
-          ''("tools.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/tools") #t))))))
-      (home-page "https://www.ctan.org/tex-archive/macros/latex/required/tools/")
-      (synopsis "LaTeX standard tools bundle")
-      (description "This package provides a collection of simple tools that
-are part of the LaTeX required tools distribution, comprising the packages:
-@code{afterpage}, @code{array}, @code{bm}, @code{calc}, @code{dcolumn},
-@code{delarray}, @code{enumerate}, @code{fileerr}, @code{fontsmpl},
-@code{ftnright}, @code{hhline}, @code{indentfirst}, @code{layout},
-@code{longtable}, @code{multicol}, @code{rawfonts}, @code{showkeys},
-@code{somedefs}, @code{tabularx}, @code{theorem}, @code{trace},
-@code{varioref}, @code{verbatim}, @code{xr}, and @code{xspace}.")
-      (license license:lppl1.3+))))
-
 (define-public texlive-latex-xkeyval
   (package
     (name "texlive-latex-xkeyval")
@@ -9809,17 +10450,12 @@ are part of the LaTeX required tools distribution, comprising the packages:
            texlive-graphics-def
            texlive-xcolor
            texlive-latex-footmisc
-
-           ;; TODO: Use non-deprecated name on next rebuild cycle.
-           texlive-latex-listings
-
-           texlive-generic-iftex
+           texlive-iftex
+           texlive-listings
            texlive-pstricks
            texlive-pst-text
            texlive-tools
-
-           ;; TODO: Use non-deprecated name on next rebuild cycle.
-           texlive-latex-pgf))
+           texlive-pgf))
     (home-page "http://www.ctan.org/pkg/xkeyval")
     (synopsis "Extension of the keyval package")
     (description
@@ -10204,6 +10840,21 @@ uppercase letters commonly used to represent various number sets.
 LaTeX macro support is provided in package @code{psnfss}.")
     (license license:gpl3+)))
 
+(define-public texlive-fp
+  (package
+    (inherit
+     (simple-texlive-package
+      "texlive-fp"
+      (list "doc/latex/fp/" "tex/latex/fp/" "tex/plain/fp/")
+      (base32 "1q555fx71cf88sn3npzb0j2i10ak920k0qc9ccdygz99vqg10dad")
+      #:trivial? #t))
+    (home-page "https://ctan.org/macros/latex/contrib/fp")
+    (synopsis "Fixed point arithmetic")
+    (description
+     "This package provides an extensive collection of arithmetic operations
+for fixed point real numbers of high precision.")
+    (license license:lppl)))
+
 (define-public texlive-fpl
   (package
     (inherit (simple-texlive-package
@@ -10764,22 +11415,39 @@ The macros were designed for use within other macros.")
 (define-public texlive-grfext
   (let ((template (simple-texlive-package
                    "texlive-grfext"
-                   (list "/doc/latex/grfext/README.md"
-                         "/source/latex/grfext/grfext.dtx")
+                   (list "doc/latex/grfext/"
+                         "source/latex/grfext/"
+                         "tex/latex/grfext/")
                    (base32
-                    "1cdvjp9gcnixxlbl8ibwz1yr799gwax5hm686hwmwsigdgafhzgq"))))
+                    "1x35r10mkjg8dzx7aj99y4dwyf69jgs41qwapdx523lbglywmgxp"))))
     (package
       (inherit template)
+      (outputs '("out" "doc"))
       (arguments
        (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
+         ((#:tex-directory _ #t)
           "latex/grfext")
-         ((#:build-targets _ '())
-          ''("grfext.dtx"))
+         ((#:build-targets _ #t)
+          #~(list "grfext.dtx"))
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/grfext")))))))
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _
+                  (chdir "source/latex/grfext")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))
+              (add-after 'copy-files 'remove-generated-file
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (with-directory-excursion #$output
+                    (for-each delete-file
+                              (find-files "." "\\.(drv|ins)$")))))))))
       (home-page "https://github.com/ho-tex/grfext")
       (synopsis "Manipulate the graphics package's list of extensions")
       (description "This package provides macros for adding to, and reordering
@@ -10808,12 +11476,12 @@ the list of graphics file extensions recognised by package graphics.")
       (native-inputs
        (list texlive-ydoc))
       (propagated-inputs
-       (list texlive-pgf
-             texlive-latex-varwidth
+       (list texlive-latex-varwidth
              texlive-latex-xkeyval
              texlive-collectbox
              texlive-ifoddpage
-             texlive-storebox))
+             texlive-storebox
+             texlive-pgf))
       (home-page "https://www.ctan.org/pkg/adjustbox")
       (synopsis "Graphics package-alike macros for “general” boxes")
       (description "The package provides several macros to adjust boxed
@@ -10891,8 +11559,7 @@ levels.  All functionality is provided by the single @code{\\qrcode} command.")
     (package
       (inherit template)
       (propagated-inputs
-       (list texlive-etoolbox texlive-latex-environ texlive-pgf
-             texlive-latex-tools))
+       (list texlive-etoolbox texlive-latex-environ texlive-pgf texlive-tools))
       (home-page "https://www.ctan.org/pkg/tcolorbox")
       (synopsis "Colored boxes, for LaTeX examples and theorems, etc")
       (description "This package provides an environment for colored and
@@ -11338,11 +12005,11 @@ and selecting references used in a publication.")
                              texlive-booktabs
                              texlive-endnotes
                              texlive-etoolbox
+                             texlive-fancyhdr
                              texlive-xstring
+                             texlive-graphics
                              texlive-latex-draftwatermark
-                             texlive-latex-fancyhdr
                              texlive-latex-float
-                             texlive-latex-graphics
                              texlive-lm
                              texlive-substr
                              texlive-times
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 77fc3baaf7..bd0b22176e 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -49,14 +49,15 @@
 (define-public texinfo
   (package
     (name "texinfo")
-    (version "6.7")
+    (version "6.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/texinfo/texinfo-"
                                   version ".tar.xz"))
+              (patches (search-patches "texinfo-headings-single.patch"))
               (sha256
                (base32
-                "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q"))))
+                "1i7yb7mrp3inz25zbzv2pllr4y7d58v818f1as7iz8mw53nm7dwf"))))
     (build-system gnu-build-system)
     (arguments
      ;; When cross-compiling, the package is configured twice: once with the
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 5a44fa89dc..d41efe23b0 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2017, 2019-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2017, 2019-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
@@ -15,7 +15,7 @@
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
@@ -40,6 +40,7 @@
 
 (define-module (gnu packages tls)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix deprecation)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -89,7 +90,7 @@
 (define-public libtasn1
   (package
     (name "libtasn1")
-    (version "4.17.0")
+    (version "4.19.0")
     (source
      (origin
       (method url-fetch)
@@ -97,7 +98,7 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "19a53i1ajs4dd8nnlr2i6gbzvla84ay71g3y1phvh8krx8f5brzc"))))
+        "0yizlr2y6gfjh86v68qw5wjcfg16arnw1f731kndd17l3jng04qn"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--disable-static")))
@@ -141,52 +142,51 @@ in intelligent transportation networks.")
 (define-public p11-kit
   (package
     (name "p11-kit")
-    (version "0.23.22")
+    (version "0.24.1")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "https://github.com/p11-glue/p11-kit/releases/"
-                          "download/" version "/p11-kit-" version ".tar.xz"))
-      (sha256
-       (base32 "1dn6br4v033d3gp2max9lsr3y4q0nj6iyr1yq3kzi8ym7lal13wa"))))
+       (method url-fetch)
+       (uri (string-append "https://github.com/p11-glue/p11-kit/releases/"
+                           "download/" version "/p11-kit-" version ".tar.xz"))
+       (sha256
+        (base32 "1y5fm9gwhkh902r26p90qf1g2h1ziqrk4hgf9i9sxm2wzlz7ignq"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(,@(if (hurd-target?)
-             `(("autoconf" ,autoconf)
-               ("automake" ,automake)
-               ("gettext" ,gettext-minimal) ;for autopoint
-               ("libtool" ,libtool))
-             '())
-       ("pkg-config" ,pkg-config)))
+     (append (list pkg-config)
+             (if (hurd-target?)
+                 (list autoconf automake gettext-minimal libtool)
+                 '())))
     (inputs
-     `(("libffi" ,libffi)
-       ,@(if (hurd-target?)
-             `(("libbsd" ,libbsd)
-               ("hurd-patch" ,(search-patch "p11-kit-hurd.patch")))
-             '())
-       ("libtasn1" ,libtasn1)))
+     (append (list libffi libtasn1)
+             (if (hurd-target?)
+                 (list libbsd)
+                 '())))
     (arguments
-     `(#:configure-flags '("--without-trust-paths")
-       #:phases (modify-phases %standard-phases
-                  ,@(if (hurd-target?)
-                        '((add-after 'unpack 'apply-hurd-patch
-                            (lambda* (#:key inputs #:allow-other-keys)
-                              (let ((patch (assoc-ref inputs "hurd-patch")))
-                                (invoke "patch" "-p1" "--batch" "-i"
-                                        patch))))
-                          (replace 'bootstrap
-                            (lambda _
-                              (invoke "autoreconf" "-fiv"))))
-                        '())
-                  (add-before 'check 'prepare-tests
-                    (lambda _
-                      ;; "test-runtime" expects XDG_RUNTIME_DIR to be set up
-                      ;; and looks for .cache and other directories (only).
-                      ;; For simplicity just drop it since it is irrelevant
-                      ;; in the build container.
-                      (substitute* "Makefile"
-                        (("test-runtime\\$\\(EXEEXT\\)") ""))
-                      #t)))))
+     (list #:configure-flags
+           ;; Use the default certificates so that users such as flatpak
+           ;; find them.  See <https://issues.guix.gnu.org/49957>.
+           #~'("--with-trust-paths=/etc/ssl/certs/ca-certificates.crt")
+           #:phases #~(modify-phases %standard-phases
+                        #$@(if (hurd-target?)
+                               #~((add-after 'unpack 'apply-hurd-patch
+                                    (lambda* (#:key inputs #:allow-other-keys)
+                                      (define patch
+                                        #$(local-file
+                                           (search-patch "p11-kit-hurd.patch")))
+                                      (invoke "patch" "-p1" "--batch" "-i"
+                                              patch)))
+                                  (replace 'bootstrap
+                                    (lambda _
+                                      (invoke "autoreconf" "-fiv"))))
+                               #~())
+                        (add-before 'check 'prepare-tests
+                          (lambda _
+                            ;; "test-runtime" expects XDG_RUNTIME_DIR to be set up
+                            ;; and looks for .cache and other directories (only).
+                            ;; For simplicity just drop it since it is irrelevant
+                            ;; in the build container.
+                            (substitute* "Makefile"
+                              (("test-runtime\\$\\(EXEEXT\\)") "")))))))
     (home-page "https://p11-glue.github.io/p11-glue/p11-kit.html")
     (synopsis "PKCS#11 library")
     (description
@@ -197,32 +197,10 @@ coordinating the use of PKCS#11 by different components or libraries
 living in the same process.")
     (license license:bsd-3)))
 
-(define-public p11-kit-next
-  (package
-    (inherit p11-kit)
-    (version "0.24.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/p11-glue/p11-kit/releases/"
-                           "download/" version "/p11-kit-" version ".tar.xz"))
-       (sha256
-        (base32 "1y5fm9gwhkh902r26p90qf1g2h1ziqrk4hgf9i9sxm2wzlz7ignq"))))
-    (build-system meson-build-system)
-    (arguments
-     ;; Use the default certificates so that users such as flatpak find them.
-     ;; See <https://issues.guix.gnu.org/49957>.
-     (substitute-keyword-arguments (package-arguments p11-kit)
-       ((#:configure-flags flags ''())
-        ''("-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt"))
-       ;; p11-kit is still on gnu-build-system.
-       ((#:phases gnu-phases)
-        '%standard-phases)))))
-
 (define-public gnutls
   (package
     (name "gnutls")
-    (version "3.7.2")
+    (version "3.7.7")
     (source (origin
               (method url-fetch)
               ;; Note: Releases are no longer on ftp.gnu.org since the
@@ -231,101 +209,81 @@ living in the same process.")
                                   (version-major+minor version)
                                   "/gnutls-" version ".tar.xz"))
               (patches (search-patches "gnutls-skip-trust-store-test.patch"
-                                       "gnutls-cross.patch"
-                                       "gnutls-guile-eintr-eagain.patch"))
+                                       "gnutls-cross.patch"))
               (sha256
                (base32
-                "0li7mwjnm64mbxhacz0rpf6i9qd83f53fvbrx96alpqqk9d6qvk4"))))
+                "01i1gl15k6qwvxmxx0by1mn9nlmcmym18wdpm7dn9awfsp8474dy"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? ,(not (or (%current-target-system)
-                          (hurd-target?)))
-       ;; Ensure we don't keep a reference to the tools used for testing.
-       #:disallowed-references ,(if (hurd-target?)
-                                    '()
-                                    (list net-tools iproute socat))
-       #:configure-flags
-       (cons*
-             ;; GnuTLS doesn't consult any environment variables to specify
-             ;; the location of the system-wide trust store.  Instead it has a
-             ;; configure-time option.  Unless specified, its configure script
-             ;; attempts to auto-detect the location by looking for common
-             ;; places in the file system, none of which are present in our
-             ;; chroot build environment.  If not found, then no default trust
-             ;; store is used, so each program has to provide its own
-             ;; fallback, and users have to configure each program
-             ;; independently.  This seems suboptimal.
-             "--with-default-trust-store-dir=/etc/ssl/certs"
-
-             ;; Tell the build system that we want Guile bindings installed to
-             ;; the output instead of Guiles own module directory.
-             (string-append "--with-guile-site-dir="
-                            "$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)")
-             (string-append "--with-guile-site-ccache-dir="
-                            "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache")
-             (string-append "--with-guile-extension-dir="
-                            "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions")
+     (list #:tests? (not (or (%current-target-system)
+                             (hurd-target?)))
+           ;; Ensure we don't keep a reference to the tools used for testing.
+           #:disallowed-references (if (hurd-target?)
+                                       '()
+                                       (list net-tools iproute socat))
+           #:configure-flags
+           #~(cons*
+              ;; GnuTLS doesn't consult any environment variables to specify
+              ;; the location of the system-wide trust store.  Instead it has a
+              ;; configure-time option.  Unless specified, its configure script
+              ;; attempts to auto-detect the location by looking for common
+              ;; places in the file system, none of which are present in our
+              ;; chroot build environment.  If not found, then no default trust
+              ;; store is used, so each program has to provide its own
+              ;; fallback, and users have to configure each program
+              ;; independently.  This seems suboptimal.
+              "--with-default-trust-store-dir=/etc/ssl/certs"
 
-             (let ((system ,(or (%current-target-system)
-                                (%current-system))))
-               (if (string-prefix? "mips64el" system)
-                   (list
-                    ;; FIXME: Temporarily disable p11-kit support since it is
-                    ;; not working on mips64el.
-                    "--without-p11-kit")
-                   '())))
+              (let ((system #$(or (%current-target-system)
+                                  (%current-system))))
+                (if (string-prefix? "mips64el" system)
+                    (list
+                     ;; FIXME: Temporarily disable p11-kit support since it is
+                     ;; not working on mips64el.
+                     "--without-p11-kit")
+                    '())))
 
-       #:phases (modify-phases %standard-phases
-                  ;; fastopen.sh fails to connect to the server in the builder
-                  ;; environment (see:
-                  ;; https://gitlab.com/gnutls/gnutls/-/issues/1095).
-                  (add-after 'unpack 'disable-failing-tests
-                    (lambda _
-                      (substitute* "tests/fastopen.sh"
-                        (("^unset RETCODE")
-                         "exit 77\n")))) ;skip
-                  (add-after 'install 'move-doc
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     ;; Copy the 4.1 MiB of section 3 man pages to "doc".
-                     (let* ((out    (assoc-ref outputs "out"))
-                            (doc    (assoc-ref outputs "doc"))
-                            (mandir (string-append doc "/share/man/man3"))
-                            (oldman (string-append out "/share/man/man3")))
-                       (mkdir-p mandir)
-                       (copy-recursively oldman mandir)
-                       (delete-file-recursively oldman)))))))
+           #:phases
+           #~(modify-phases %standard-phases
+               ;; fastopen.sh fails to connect to the server in the builder
+               ;; environment (see:
+               ;; https://gitlab.com/gnutls/gnutls/-/issues/1095).
+               (add-after 'unpack 'disable-failing-tests
+                 (lambda _
+                   (substitute* "tests/fastopen.sh"
+                     (("^unset RETCODE")
+                      "exit 77\n"))))      ;skip
+               (add-after 'install 'move-doc
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; Copy the 4.1 MiB of section 3 man pages to "doc".
+                   (let* ((out    (assoc-ref outputs "out"))
+                          (doc    (assoc-ref outputs "doc"))
+                          (mandir (string-append doc "/share/man/man3"))
+                          (oldman (string-append out "/share/man/man3")))
+                     (mkdir-p mandir)
+                     (copy-recursively oldman mandir)
+                     (delete-file-recursively oldman)))))))
     (outputs '("out"                              ;4.4 MiB
                "debug"
                "doc"))                            ;4.1 MiB of man pages
     (native-inputs
-     `(,@(if (%current-target-system)             ;for cross-build
-             `(("guile" ,guile-3.0))              ;to create .go files
-             '())
-       ,@(if (hurd-target?)
-             '()
-             `(("net-tools" ,net-tools)
-               ("iproute" ,iproute)               ;for 'ss'
-               ("socat" ,socat)))                 ;several tests rely on it
-       ("pkg-config" ,pkg-config)
-       ("texinfo" ,texinfo)
-       ("which" ,which)
-       ,@(if (hurd-target?)
-             '()
-             `(("datefudge" ,datefudge)))         ;tests rely on 'datefudge'
-       ("util-linux" ,util-linux)))               ;one test needs 'setsid'
-    (inputs
-     (list guile-3.0))
+     (append (list pkg-config texinfo which
+                   util-linux)                    ;one test needs 'setsid'
+             (if (hurd-target?)
+                 '()
+                 (list net-tools
+                       iproute                    ;for 'ss'
+                       socat                      ;several tests rely on it
+                       datefudge))))              ;tests rely on 'datefudge'
+    (inputs (list libunistring))
     (propagated-inputs
      ;; These are all in the 'Requires.private' field of gnutls.pc.
-     `(("libtasn1" ,libtasn1)
-       ("libidn2" ,libidn2)
-       ("nettle" ,nettle)
-       ("zlib" ,zlib)
-       ,@(let ((system (or (%current-target-system)
-                           (%current-system))))
-           (if (string-prefix? "mips64el" system)
-               '()
-               `(("p11-kit" ,p11-kit))))))
+     (append (list libtasn1 libidn2 nettle zlib)
+             (let ((system (or (%current-target-system)
+                               (%current-system))))
+               (if (string-prefix? "mips64el" system)
+                   '()
+                   (list p11-kit)))))
     (home-page "https://www.gnu.org/software/gnutls/")
     (synopsis "Transport layer security library")
     (description
@@ -337,34 +295,7 @@ required structures.")
     (properties '((ftp-server . "ftp.gnutls.org")
                   (ftp-directory . "/gcrypt/gnutls")))))
 
-(define-public gnutls-latest
-  (package
-    (inherit gnutls)
-    (version "3.7.7")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnupg/gnutls/v"
-                                  (version-major+minor version)
-                                  "/gnutls-" version ".tar.xz"))
-              (patches (search-patches "gnutls-skip-trust-store-test.patch"
-                                       "gnutls-cross.patch"))
-              (sha256
-               (base32
-                "01i1gl15k6qwvxmxx0by1mn9nlmcmym18wdpm7dn9awfsp8474dy"))))
-
-    ;; Disable Guile bindings: they are now provided by Guile-GnuTLS.
-    (inputs (modify-inputs (package-inputs gnutls)
-              (delete "guile")
-              (append libunistring)))             ;GnuTLS depends on it
-    (native-inputs (modify-inputs (package-native-inputs gnutls)
-                     (delete "guile")))))
-
-(define-public gnutls/guile-2.0
-  ;; GnuTLS for Guile 2.0.
-  (package/inherit gnutls
-    (name "guile2.0-gnutls")
-    (inputs `(("guile" ,guile-2.0)
-              ,@(alist-delete "guile" (package-inputs gnutls))))))
+(define-deprecated/public-alias gnutls-latest gnutls)
 
 (define-public gnutls/dane
   ;; GnuTLS with build libgnutls-dane, implementing DNS-based
@@ -373,15 +304,8 @@ required structures.")
   ;; to have the choice between GnuTLS with Dane and without Dane.
   (package/inherit gnutls
     (name "gnutls-dane")
-    (inputs `(("unbound" ,unbound)
-              ,@(package-inputs gnutls)))))
-
-(define-public guile2.2-gnutls
-  (package/inherit gnutls
-    (name "guile2.2-gnutls")
-    (inputs `(("guile" ,guile-2.2)
-              ,@(alist-delete "guile"
-                              (package-inputs gnutls))))))
+    (inputs (modify-inputs (package-inputs gnutls)
+              (prepend unbound)))))
 
 (define-public guile-gnutls
   (package
@@ -434,14 +358,14 @@ required structures.")
            libtool
            pkg-config
            texinfo
-           gnutls-latest          ;XXX: 'guile-snarf' invokes the native 'cpp'
-           guile-3.0
+           gnutls
+           guile-3.0              ;XXX: 'guile-snarf' invokes the native 'cpp'
            (gnulib-checkout
             #:version "2022-12-06"
             #:commit "440b528b1d81dd31b2a2e4dde20d5c837c147811"
             #:hash (base32 "15mq43abbnkbamchc9lynrvrd5ql8qacgyx2ph4kkngxf1bz3pqy"))))
     (inputs
-     (list gnutls-latest
+     (list gnutls
            guile-3.0))
     (properties '((release-tag-prefix . "v")
                   (release-tag-version-delimiter . ".")))
@@ -452,6 +376,16 @@ the @acronym{TLS, Transport-Layer Security} protocol.  It supersedes the Guile
 bindings that were formerly provided as part of GnuTLS.")
     (license license:lgpl2.1+)))
 
+(define-public guile2.2-gnutls
+  (package/inherit guile-gnutls
+    (name "guile2.2-gnutls")
+    (native-inputs
+     (modify-inputs (package-native-inputs guile-gnutls)
+       (replace "guile" guile-2.2)))
+    (inputs
+     (modify-inputs (package-inputs guile-gnutls)
+       (replace "guile" guile-2.2)))))
+
 (define (target->openssl-target target)
   "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling
 OpenSSL for TARGET."
@@ -500,8 +434,7 @@ OpenSSL for TARGET."
 (define-public openssl-1.1
   (package
     (name "openssl")
-    (version "1.1.1l")
-    (replacement openssl/fixed)
+    (version "1.1.1q")
     (source (origin
               (method url-fetch)
               (uri (list (string-append "https://www.openssl.org/source/openssl-"
@@ -514,114 +447,106 @@ OpenSSL for TARGET."
               (patches (search-patches "openssl-1.1-c-rehash-in.patch"))
               (sha256
                (base32
-                "1lbblxps2fhmz7bqh058iywh5wxfignbfx1s1kz2fj63b5g3wyhb"))))
+                "1jhhzp4gh6ymidxm1ckjk948l583awp0w3y2nvqdz7022kk9r4yp"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "doc"        ;6.8 MiB of man3 pages and full HTML documentation
                "static"))   ;6.4 MiB of .a files
     (native-inputs (list perl))
     (arguments
-     `(#:parallel-tests? #f
-       #:test-target "test"
-
-       ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
-       ;; so we explicitly disallow it here.
-       #:disallowed-references ,(list (canonical-package perl))
-       #:phases
-       ,#~
-       (modify-phases %standard-phases
-         #$@(if (%current-target-system)
-                #~((add-before
-                       'configure 'set-cross-compile
-                     (lambda* (#:key target #:allow-other-keys)
-                       (setenv "CROSS_COMPILE" (string-append target "-"))
-                       (setenv "CONFIGURE_TARGET_ARCH"
-                               #$(target->openssl-target
-                                  (%current-target-system))))))
-                #~())
-         ;; This test seems to be dependant on kernel features.
-         ;; https://github.com/openssl/openssl/issues/12242
-         #$@(if (or (target-arm?)
-                    (target-riscv64?))
-                #~((replace 'check
-                     (lambda* (#:key tests? test-target #:allow-other-keys)
-                       (when tests?
-                         (invoke "make" "TESTS=-test_afalg" test-target)))))
-                #~())
-         (replace 'configure
-           (lambda* (#:key configure-flags #:allow-other-keys)
-             (let* ((out #$output)
-                    (lib (string-append out "/lib")))
-               ;; It's not a shebang so patch-source-shebangs misses it.
-               (substitute* "config"
-                 (("/usr/bin/env")
-                  (string-append (assoc-ref %build-inputs "coreutils")
-                                 "/bin/env")))
-               (apply
-                invoke #$@(if (%current-target-system)
-                              #~("./Configure")
-                              #~("./config"))
-                "shared"                ;build shared libraries
-                "--libdir=lib"
+     (list
+      #:parallel-tests? #f
+      #:make-flags
+      ;; 'test_ssl_new.t' in 1.1.1n and 3.0.3 fails due to an expired
+      ;; certificate: <https://github.com/openssl/openssl/issues/18441>.  Skip
+      ;; it.
+      #~(list #$@(if (or (target-arm?) (target-riscv64?))
+                     ;; 'test_afalg' seems to be dependent on kernel features:
+                     ;; <https://github.com/openssl/openssl/issues/12242>.
+                     #~("TESTS=-test_afalg -tls_ssl_new")
+                     #~("TESTS=-test_ssl_new")))
+      #:test-target "test"
+      ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
+      ;; so we explicitly disallow it here.
+      #:disallowed-references (list (canonical-package perl))
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(if (%current-target-system)
+                 #~((add-before 'configure 'set-cross-compile
+                      (lambda* (#:key target #:allow-other-keys)
+                        (setenv "CROSS_COMPILE" (string-append target "-"))
+                        (setenv "CONFIGURE_TARGET_ARCH"
+                                #$(target->openssl-target
+                                   (%current-target-system))))))
+                 #~())
+          (replace 'configure
+            (lambda* (#:key configure-flags #:allow-other-keys)
+              ;; It's not a shebang so patch-source-shebangs misses it.
+              (substitute* "config"
+                (("/usr/bin/env")
+                 (which "env")))
+              (apply
+               invoke #$@(if (%current-target-system)
+                             #~("./Configure")
+                             #~("./config"))
+               "shared"                 ;build shared libraries
+               "--libdir=lib"
 
-                ;; The default for this catch-all directory is
-                ;; PREFIX/ssl.  Change that to something more
-                ;; conventional.
-                (string-append "--openssldir=" out
-                               "/share/openssl-"
-                               #$(package-version this-package))
+               ;; The default for this catch-all directory is
+               ;; PREFIX/ssl.  Change that to something more
+               ;; conventional.
+               (string-append "--openssldir=" #$output
+                              "/share/openssl-"
+                              #$(package-version this-package))
 
-                (string-append "--prefix=" out)
-                (string-append "-Wl,-rpath," lib)
-                #$@(if (%current-target-system)
-                       #~((getenv "CONFIGURE_TARGET_ARCH"))
-                       #~())
-                configure-flags)
-               ;; Output the configure variables.
-               (invoke "perl" "configdata.pm" "--dump"))))
-         (add-after 'install 'move-static-libraries
-           (lambda _
-             ;; Move static libraries to the "static" output.
-             (let* ((out    #$output)
-                    (lib    (string-append out "/lib"))
-                    (static #$output:static)
-                    (slib   (string-append static "/lib")))
-               (for-each (lambda (file)
-                           (install-file file slib)
-                           (delete-file file))
-                         (find-files
-                          lib
-                          #$(if (target-mingw?)
-                                '(lambda (filename _)
-                                   (and (string-suffix? ".a" filename)
-                                        (not (string-suffix? ".dll.a" filename))))
-                                "\\.a$"))))))
-         (add-after 'install 'move-extra-documentation
-           (lambda _
-             ;; Move man pages and full HTML documentation to "doc".
-             (let* ((out    #$output)
-                    (man    (string-append out "/share/man"))
-                    (html   (string-append out "/share/doc/openssl"))
-                    (doc    #$output:doc)
-                    (man-target (string-append doc "/share/man"))
-                    (html-target (string-append doc "/share/doc/openssl")))
-               (mkdir-p (dirname man-target))
-               (mkdir-p (dirname html-target))
-               (rename-file man man-target)
-               (rename-file html html-target))))
-         (add-after
-             'install 'remove-miscellany
-           (lambda _
-             ;; The 'misc' directory contains random undocumented shell and Perl
-             ;; scripts.  Remove them to avoid retaining a reference on Perl.
-             (delete-file-recursively (string-append #$output "/share/openssl-"
-                                                     #$(package-version this-package)
-                                                     "/misc")))))))
+               (string-append "--prefix=" #$output)
+               (string-append "-Wl,-rpath," (string-append #$output "/lib"))
+               #$@(if (%current-target-system)
+                      #~((getenv "CONFIGURE_TARGET_ARCH"))
+                      #~())
+               configure-flags)
+              ;; Output the configure variables.
+              (invoke "perl" "configdata.pm" "--dump")))
+          (add-after 'install 'move-static-libraries
+            (lambda _
+              ;; Move static libraries to the "static" output.
+              (let* ((lib    (string-append #$output "/lib"))
+                     (slib   (string-append #$output:static "/lib")))
+                (for-each (lambda (file)
+                            (install-file file slib)
+                            (delete-file file))
+                          (find-files
+                           lib
+                           #$(if (target-mingw?)
+                                 '(lambda (filename _)
+                                    (and (string-suffix? ".a" filename)
+                                         (not (string-suffix? ".dll.a"
+                                                              filename))))
+                                 "\\.a$"))))))
+          (add-after 'install 'move-extra-documentation
+            (lambda _
+              ;; Move man pages and full HTML documentation to "doc".
+              (let* ((man    (string-append #$output "/share/man"))
+                     (html   (string-append #$output "/share/doc/openssl"))
+                     (man-target (string-append #$output:doc "/share/man"))
+                     (html-target (string-append
+                                   #$output:doc "/share/doc/openssl")))
+                (mkdir-p (dirname man-target))
+                (mkdir-p (dirname html-target))
+                (rename-file man man-target)
+                (rename-file html html-target))))
+          (add-after 'install 'remove-miscellany
+            (lambda _
+              ;; The 'misc' directory contains random undocumented shell and
+              ;; Perl scripts.  Remove them to avoid retaining a reference on
+              ;; Perl.
+              (delete-file-recursively
+               (string-append #$output "/share/openssl-"
+                              #$(package-version this-package) "/misc")))))))
     (native-search-paths
      (list $SSL_CERT_DIR $SSL_CERT_FILE))
     (synopsis "SSL/TLS implementation")
-    (description
-     "OpenSSL is an implementation of SSL/TLS.")
+    (description "OpenSSL is an implementation of SSL/TLS.")
     (license license:openssl)
     (home-page "https://www.openssl.org/")))
 
@@ -672,7 +597,7 @@ OpenSSL for TARGET."
                                            "/bin/perl"))))))))
     (license license:asl2.0)))
 
-(define-public openssl openssl-1.1)
+(define-public openssl openssl-3.0)
 
 (define-public bearssl
   (package
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 85291b12b7..dd5692527d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -266,214 +266,213 @@ Python 3.3 and later, rather than on Python 2.")
       ("python" ,python) ; for git-p4
       ("zlib" ,zlib)
 
-      ;; For PCRE support in git grep (USE_LIBPCRE2).
-      ("pcre" ,pcre2)
-
-      ;; For 'gitweb.cgi'.
-      ("perl-cgi" ,perl-cgi)
-
-      ;; For 'git-svn'.
-      ("subversion" ,subversion)
-      ("perl-term-readkey" ,perl-term-readkey)
-
-      ;; For 'git-send-email'.
-      ("perl-authen-sasl" ,perl-authen-sasl)
-      ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
-      ("perl-io-socket-ssl" ,perl-io-socket-ssl)
-
-      ;; For 'git gui', 'gitk', and 'git citool'.
-      ("tcl" ,tcl)
-      ("tk" ,tk)
-
-      ;; For 'git-credential-libsecret'
-      ("glib" ,glib)
-      ("libsecret" ,libsecret)))
-   (outputs '("out"                               ; the core
-              "send-email"                        ; for git-send-email
-              "svn"                               ; git-svn
-              "credential-netrc"                  ; git-credential-netrc
-              "credential-libsecret"              ; git-credential-libsecret
-              "subtree"                           ; git-subtree
-              "gui"))                             ; gitk, git gui
-   (arguments
-    `(#:make-flags `("V=1"                        ;more verbose compilation
-
-                     ,(string-append "SHELL_PATH="
-                                     (assoc-ref %build-inputs "bash")
-                                     "/bin/sh")
-
-                     ;; Tests require a bash with completion support.
-                     ,(string-append "TEST_SHELL_PATH="
-                                     (assoc-ref %build-inputs "bash-for-tests")
-                                     "/bin/bash")
-
-                     "USE_LIBPCRE2=yes"
-
-                     ;; By default 'make install' creates hard links for
-                     ;; things in 'libexec/git-core', which leads to huge
-                     ;; nars; see <https://bugs.gnu.org/21949>.
-                     "NO_INSTALL_HARDLINKS=indeed")
-
-      ;; Make sure the full bash does not end up in the final closure.
-      #:disallowed-references (,bash)
-
-      #:test-target "test"
-
-      ;; The explicit --with-tcltk forces the build system to hardcode the
-      ;; absolute file name to 'wish'.
-      #:configure-flags (list (string-append "--with-tcltk="
-                                             (assoc-ref %build-inputs "tk")
-                                             "/bin/wish8.6")  ; XXX
-                              ,@(if (%current-target-system)
-                                    git-cross-configure-flags
-                                    '()))
-
-      #:modules ((srfi srfi-1)
-                 (srfi srfi-26)
-                 ((guix build gnu-build-system) #:prefix gnu:)
-                 ,@%gnu-build-system-modules)
-      #:phases
-      (modify-phases %standard-phases
-        ,@(if (%current-target-system)
-              ;; The git build system assumes build == host
-              `((add-after 'unpack  'use-host-uname_S
-                  (lambda _
-                    (substitute* "config.mak.uname"
-                      (("uname_S := .*" all)
-                       (if (equal? ,(%current-target-system) "i586-pc-gnu")
-                         "uname_S := GNU\n"
-                         all)))
-                    #t)))
-              ;; We do not have bash-for-tests when cross-compiling.
-              `((add-after 'unpack 'modify-PATH
-                  (lambda* (#:key inputs #:allow-other-keys)
-                    (let ((path (string-split (getenv "PATH") #\:))
-                          (bash-full (assoc-ref inputs "bash-for-tests")))
-                      ;; Drop the test bash from PATH so that (which "sh") and
-                      ;; similar does the right thing.
-                      (setenv "PATH" (string-join
-                                      (remove (cut string-prefix? bash-full <>) path)
-                                      ":"))
-                      #t)))))
-        ;; Add cross curl-config script to PATH when cross-compiling.
-        ,@(if (%current-target-system)
-              '((add-before 'configure 'add-cross-curl-config
+       ;; For PCRE support in git grep (USE_LIBPCRE2).
+       ("pcre" ,pcre2)
+
+       ;; For 'gitweb.cgi'.
+       ("perl-cgi" ,perl-cgi)
+
+       ;; For 'git-svn'.
+       ("subversion" ,subversion)
+       ("perl-term-readkey" ,perl-term-readkey)
+
+       ;; For 'git-send-email'.
+       ("perl-authen-sasl" ,perl-authen-sasl)
+       ("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
+       ("perl-io-socket-ssl" ,perl-io-socket-ssl)
+
+       ;; For 'git gui', 'gitk', and 'git citool'.
+       ("tcl" ,tcl)
+       ("tk" ,tk)
+
+       ;; For 'git-credential-libsecret'
+       ("glib" ,glib)
+       ("libsecret" ,libsecret)))
+    (outputs '("out"                    ; the core
+               "send-email"             ; for git-send-email
+               "svn"                    ; git-svn
+               "credential-netrc"       ; git-credential-netrc
+               "credential-libsecret"   ; git-credential-libsecret
+               "subtree"                ; git-subtree
+               "gui"))                  ; gitk, git gui
+    (arguments
+     `(#:make-flags `("V=1"             ;more verbose compilation
+
+                      ,(string-append "SHELL_PATH="
+                                      (assoc-ref %build-inputs "bash")
+                                      "/bin/sh")
+
+                      ;; Tests require a bash with completion support.
+                      ,(string-append "TEST_SHELL_PATH="
+                                      (assoc-ref %build-inputs "bash-for-tests")
+                                      "/bin/bash")
+
+                      "USE_LIBPCRE2=yes"
+
+                      ;; By default 'make install' creates hard links for
+                      ;; things in 'libexec/git-core', which leads to huge
+                      ;; nars; see <https://bugs.gnu.org/21949>.
+                      "NO_INSTALL_HARDLINKS=indeed")
+
+       ;; Make sure the full bash does not end up in the final closure.
+       #:disallowed-references (,bash)
+
+       #:test-target "test"
+
+       ;; The explicit --with-tcltk forces the build system to hardcode the
+       ;; absolute file name to 'wish'.
+       #:configure-flags (list (string-append "--with-tcltk="
+                                              (assoc-ref %build-inputs "tk")
+                                              "/bin/wish8.6") ; XXX
+                               ,@(if (%current-target-system)
+                                     git-cross-configure-flags
+                                     '()))
+
+       #:modules ((srfi srfi-1)
+                  (srfi srfi-26)
+                  ((guix build gnu-build-system) #:prefix gnu:)
+                  ,@%gnu-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         ,@(if (%current-target-system)
+               ;; The git build system assumes build == host
+               `((add-after 'unpack  'use-host-uname_S
+                   (lambda _
+                     (substitute* "config.mak.uname"
+                       (("uname_S := .*" all)
+                        (if (equal? ,(%current-target-system) "i586-pc-gnu")
+                            "uname_S := GNU\n"
+                            all))))))
+               ;; We do not have bash-for-tests when cross-compiling.
+               `((add-after 'unpack 'modify-PATH
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (let ((path (string-split (getenv "PATH") #\:))
+                           (bash-full (assoc-ref inputs "bash-for-tests")))
+                       ;; Drop the test bash from PATH so that (which "sh") and
+                       ;; similar does the right thing.
+                       (setenv "PATH" (string-join
+                                       (remove (cut string-prefix? bash-full <>) path)
+                                       ":")))))))
+         ;; Add cross curl-config script to PATH when cross-compiling.
+         ,@(if (%current-target-system)
+               '((add-before 'configure 'add-cross-curl-config
                    (lambda* (#:key inputs #:allow-other-keys)
                      (setenv "PATH"
                              (string-append (assoc-ref inputs "curl") "/bin:"
-                                            (getenv "PATH")))
-                     #t)))
-              '())
-        (add-after 'configure 'patch-makefiles
-          (lambda _
-            (substitute* "Makefile"
-              (("/usr/bin/perl") (which "perl"))
-              (("/usr/bin/python") (which "python3")))
-            #t))
-        (add-after 'configure 'add-PM.stamp
-          (lambda _
-            ;; Add the "PM.stamp" to avoid "no rule to make target".
-            (call-with-output-file "perl/PM.stamp" (const #t))
-            #t))
-        (add-after 'build 'build-subtree
-          (lambda* (#:key inputs #:allow-other-keys)
-            (with-directory-excursion "contrib/subtree"
-              (substitute* "Makefile"
-                ;; Apparently `xmlto' does not bother to looks up the stylesheets
-                ;; specified in the XML, unlike the above substitution.  Instead it
-                ;; uses a hard-coded URL.  Work around it here, but if this is
-                ;; common perhaps we should hardcode this path in xmlto itself.
-                (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
-                 (string-append "$(XMLTO) -x "
-                                (string-append (assoc-ref inputs "docbook-xsl")
-                                               "/xml/xsl/docbook-xsl-"
-                                               ,(package-version docbook-xsl))
-                                "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
-              (invoke "make")
-              (invoke "make" "install")
-              (invoke "make" "install-doc")
-              (substitute* "git-subtree"
-                (("/bin/sh") (which "sh"))))
-            #t))
-        (add-before 'check 'patch-tests
-          (lambda _
-            (let ((store-directory (%store-directory)))
-              ;; These files contain some funny bytes that Guile is unable
-              ;; to decode for shebang patching. Just delete them.
-              (for-each delete-file '("t/t4201-shortlog.sh"
-                                      "t/t7813-grep-icase-iso.sh"))
-              ;; Many tests contain inline shell scripts (hooks etc).
-              (substitute* (find-files "t" "\\.sh$")
-                (("#!/bin/sh") (string-append "#!" (which "sh"))))
-              ;; Un-do shebang patching here to prevent checksum mismatch.
-              (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
-                (("^#!.*/bin/perl") "#!/usr/bin/perl"))
-              (substitute* "t/t5003-archive-zip.sh"
-                (("cp /bin/sh") (string-append "cp " (which "sh"))))
-              (substitute* "t/t6030-bisect-porcelain.sh"
-                (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
-              ;; FIXME: This test runs `git commit` with a bogus EDITOR
-              ;; and empty commit message, but does not fail the way it's
-              ;; expected to. The test passes when invoked interactively.
-              (substitute* "t/t7508-status.sh"
-                (("\tcommit_template_commented") "\ttrue"))
-              ;; More checksum mismatches due to odd shebangs.
-              (substitute* "t/t9100-git-svn-basic.sh"
-                (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
-              (substitute* "t/t9300-fast-import.sh"
-                (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
-                (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
-              ;; FIXME: Some hooks fail with "basename: command not found".
-              ;; See 't/trash directory.t9164.../svn-hook.log'.
-              (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
-
-              ;; XXX: These tests fail intermittently for unknown reasons:
-              ;; <https://bugs.gnu.org/29546>.
-              (for-each delete-file
-                        '("t/t9128-git-svn-cmd-branch.sh"
-                          "t/t9167-git-svn-cmd-branch-subproject.sh"
-                          "t/t9141-git-svn-multiple-branches.sh"))
-              #t)))
-        (add-after 'install 'install-shell-completion
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out         (assoc-ref outputs "out"))
-                   (completions (string-append out "/etc/bash_completion.d")))
-              ;; TODO: Install the tcsh and zsh completions in the right place.
-              (mkdir-p completions)
-              (copy-file "contrib/completion/git-completion.bash"
-                         (string-append completions "/git"))
-              #t)))
-        (add-after 'install 'install-credential-netrc
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((netrc (assoc-ref outputs "credential-netrc")))
-              (install-file "contrib/credential/netrc/git-credential-netrc.perl"
-                            (string-append netrc "/bin"))
-              (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
-                           (string-append netrc "/bin/git-credential-netrc"))
-              ;; Previously, Git.pm was automatically found by netrc.
-              ;; Perl 5.26 changed how it locates modules so that @INC no
-              ;; longer includes the current working directory (the Perl
-              ;; community calls this "dotless @INC").
-              (wrap-program (string-append netrc "/bin/git-credential-netrc")
-                `("PERL5LIB" ":" prefix
-                  (,(string-append (assoc-ref outputs "out") "/share/perl5"))))
-              #t)))
-        (add-after 'install 'install-credential-libsecret
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((libsecret (assoc-ref outputs "credential-libsecret")))
-              (with-directory-excursion "contrib/credential/libsecret"
-                ((assoc-ref gnu:%standard-phases 'build))
-                (install-file "git-credential-libsecret"
-                              (string-append libsecret "/bin"))
-                #t))))
-        (add-after 'install 'install-subtree
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((subtree (assoc-ref outputs "subtree")))
-              (install-file "contrib/subtree/git-subtree"
-                            (string-append subtree "/bin"))
-              (install-file "contrib/subtree/git-subtree.1"
-                            (string-append subtree "/share/man/man1"))
-              #t)))
+                                            (getenv "PATH"))))))
+               '())
+         (add-after 'configure 'patch-makefiles
+           (lambda _
+             (substitute* "Makefile"
+               (("/usr/bin/perl") (which "perl"))
+               (("/usr/bin/python") (which "python3")))))
+         (add-after 'configure 'add-PM.stamp
+           (lambda _
+             ;; Add the "PM.stamp" to avoid "no rule to make target".
+             (call-with-output-file "perl/PM.stamp" (const #t))))
+         (add-after 'build 'build-subtree
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "contrib/subtree"
+               (substitute* "Makefile"
+                 ;; Apparently `xmlto' does not bother to looks up the stylesheets
+                 ;; specified in the XML, unlike the above substitution.  Instead it
+                 ;; uses a hard-coded URL.  Work around it here, but if this is
+                 ;; common perhaps we should hardcode this path in xmlto itself.
+                 (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
+                  (string-append "$(XMLTO) -x "
+                                 (string-append (assoc-ref inputs "docbook-xsl")
+                                                "/xml/xsl/docbook-xsl-"
+                                                ,(package-version docbook-xsl))
+                                 "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
+               (invoke "make")
+               (invoke "make" "install")
+               (invoke "make" "install-doc")
+               (substitute* "git-subtree"
+                 (("/bin/sh") (which "sh"))))))
+         (add-before 'check 'patch-tests
+           (lambda _
+             (let ((store-directory (%store-directory)))
+               ;; These files contain some funny bytes that Guile is unable
+               ;; to decode for shebang patching. Just delete them.
+               (for-each delete-file '("t/t4201-shortlog.sh"
+                                       "t/t7813-grep-icase-iso.sh"))
+               ;; Many tests contain inline shell scripts (hooks etc).
+               (substitute* (find-files "t" "\\.sh$")
+                 (("#!/bin/sh") (string-append "#!" (which "sh"))))
+               ;; Un-do shebang patching here to prevent checksum mismatch.
+               (substitute* '("t/t4034/perl/pre" "t/t4034/perl/post")
+                 (("^#!.*/bin/perl") "#!/usr/bin/perl"))
+               (substitute* "t/t5003-archive-zip.sh"
+                 (("cp /bin/sh") (string-append "cp " (which "sh"))))
+               (substitute* "t/t6030-bisect-porcelain.sh"
+                 (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
+               ;; FIXME: This test runs `git commit` with a bogus EDITOR
+               ;; and empty commit message, but does not fail the way it's
+               ;; expected to. The test passes when invoked interactively.
+               (substitute* "t/t7508-status.sh"
+                 (("\tcommit_template_commented") "\ttrue"))
+               ;; More checksum mismatches due to odd shebangs.
+               (substitute* "t/t9100-git-svn-basic.sh"
+                 (((string-append "\"#!" store-directory ".*/bin/sh")) "\"#!/bin/sh") )
+               (substitute* "t/t9300-fast-import.sh"
+                 (((string-append "\t#!" store-directory ".*/bin/sh")) "\t#!/bin/sh")
+                 (((string-append "'#!" store-directory ".*/bin/sh")) "'#!/bin/sh"))
+               ;; FIXME: Some hooks fail with "basename: command not found".
+               ;; See 't/trash directory.t9164.../svn-hook.log'.
+               (delete-file "t/t9164-git-svn-dcommit-concurrent.sh")
+
+               ;; XXX: These tests fail intermittently for unknown reasons:
+               ;; <https://bugs.gnu.org/29546>.
+               (for-each delete-file
+                         '("t/t9128-git-svn-cmd-branch.sh"
+                           "t/t9167-git-svn-cmd-branch-subproject.sh"
+                           "t/t9141-git-svn-multiple-branches.sh")))))
+         (add-after 'install 'install-info-manual
+           (lambda* (#:key parallel-build? #:allow-other-keys)
+             (define job-count (if parallel-build?
+                                   (number->string (parallel-job-count))
+                                   "1"))
+             (invoke "make" "-C" "Documentation" "install-info"
+                     "-j" job-count
+                     ;; The Makefile refer to 'docbook2x-texi', but our binary
+                     ;; is named 'docbook2texi'.
+                     "DOCBOOK2X_TEXI=docbook2texi" "PERL_PATH=perl")))
+         (add-after 'install 'install-shell-completion
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out         (assoc-ref outputs "out"))
+                    (completions (string-append out "/etc/bash_completion.d")))
+               ;; TODO: Install the tcsh and zsh completions in the right place.
+               (mkdir-p completions)
+               (copy-file "contrib/completion/git-completion.bash"
+                          (string-append completions "/git")))))
+         (add-after 'install 'install-credential-netrc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((netrc (assoc-ref outputs "credential-netrc")))
+               (install-file "contrib/credential/netrc/git-credential-netrc.perl"
+                             (string-append netrc "/bin"))
+               (rename-file (string-append netrc "/bin/git-credential-netrc.perl")
+                            (string-append netrc "/bin/git-credential-netrc"))
+               ;; Previously, Git.pm was automatically found by netrc.
+               ;; Perl 5.26 changed how it locates modules so that @INC no
+               ;; longer includes the current working directory (the Perl
+               ;; community calls this "dotless @INC").
+               (wrap-program (string-append netrc "/bin/git-credential-netrc")
+                 `("PERL5LIB" ":" prefix
+                   (,(string-append (assoc-ref outputs "out") "/share/perl5")))))))
+         (add-after 'install 'install-credential-libsecret
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((libsecret (assoc-ref outputs "credential-libsecret")))
+               (with-directory-excursion "contrib/credential/libsecret"
+                 ((assoc-ref gnu:%standard-phases 'build))
+                 (install-file "git-credential-libsecret"
+                               (string-append libsecret "/bin"))))))
+         (add-after 'install 'install-subtree
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((subtree (assoc-ref outputs "subtree")))
+               (install-file "contrib/subtree/git-subtree"
+                             (string-append subtree "/bin"))
+               (install-file "contrib/subtree/git-subtree.1"
+                             (string-append subtree "/share/man/man1")))))
          (add-after 'install 'restore-sample-hooks-shebang
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -482,128 +481,125 @@ Python 3.3 and later, rather than on Python 2.")
                            (format #t "restoring shebang on `~a'~%" file)
                            (substitute* file
                              (("^#!.*/bin/sh") "#!/bin/sh")))
-                         (find-files dir ".*"))
-               #t)))
-        (add-after 'install 'split
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            ;; Split the binaries to the various outputs.
-            (let* ((out      (assoc-ref outputs "out"))
-                   (se       (assoc-ref outputs "send-email"))
-                   (svn      (assoc-ref outputs "svn"))
-                   (gui      (assoc-ref outputs "gui"))
-                   (gitk     (string-append out "/bin/gitk"))
-                   (gitk*    (string-append gui "/bin/gitk"))
-                   (git-gui  (string-append out "/libexec/git-core/git-gui"))
-                   (git-gui* (string-append gui "/libexec/git-core/git-gui"))
-                   (git-cit  (string-append out "/libexec/git-core/git-citool"))
-                   (git-cit* (string-append gui "/libexec/git-core/git-citool"))
-                   (git-se   (string-append out "/libexec/git-core/git-send-email"))
-                   (git-se*  (string-append se  "/libexec/git-core/git-send-email"))
-                   (git-svn  (string-append out "/libexec/git-core/git-svn"))
-                   (git-svn* (string-append svn "/libexec/git-core/git-svn"))
-                   (git-sm   (string-append out
-                                            "/libexec/git-core/git-submodule")))
-              (mkdir-p (string-append gui "/bin"))
-              (mkdir-p (string-append gui "/libexec/git-core"))
-              (mkdir-p (string-append se  "/libexec/git-core"))
-              (mkdir-p (string-append svn "/libexec/git-core"))
-
-              (for-each (lambda (old new)
-                          (copy-file old new)
-                          (delete-file old)
-                          (chmod new #o555))
-                        (list gitk git-gui git-cit git-se git-svn)
-                        (list gitk* git-gui* git-cit* git-se* git-svn*))
-
-              ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
-              (wrap-program git-svn*
-                `("PATH" ":" prefix
-                  (,(string-append (assoc-ref inputs "subversion")
-                                   "/bin")))
-                `("PERL5LIB" ":" prefix
-                  ,(map (lambda (i) (string-append (assoc-ref inputs i)
-                                                   "/lib/perl5/site_perl"))
-                        '("subversion" "perl-term-readkey")))
-
-                ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
-                ;; help it find 'libsvn_client-1.so'.
-                `("LD_LIBRARY_PATH" ":" prefix
-                  (,(string-append (assoc-ref inputs "subversion")
-                                   "/lib"))))
-
-              ;; Tell 'git-send-email' where perl modules are.
-              (wrap-program git-se*
-                `("PERL5LIB" ":" prefix
-                  ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
-                        (list
-                         ,@(transitive-input-references
-                            'inputs
-                            (map (lambda (l)
-                                   (assoc l (package-inputs this-package)))
-                                 '("perl-authen-sasl"
-                                   "perl-net-smtp-ssl"
-                                   "perl-io-socket-ssl")))))))
-
-              ;; Tell 'gitweb.cgi' where perl modules are.
-              (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
-                `("PERL5LIB" ":" prefix
-                  ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
-                        (list
-                         ,@(transitive-input-references
-                            'inputs
-                            (map (lambda (l)
-                                   (assoc l (package-inputs this-package)))
-                                 '("perl-cgi")))))))
-
-              ;; Tell 'git-submodule' where Perl is.
-              (wrap-program git-sm
-                `("PATH" ":" prefix
-                  (,(string-append (assoc-ref inputs "perl")
-                                   "/bin"))))
-
-              #t)))
-        (add-after 'split 'install-man-pages
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (man (string-append out "/share/man"))
-                   (manpages (assoc-ref inputs "git-manpages")))
-              (mkdir-p man)
-              (with-directory-excursion man
-                (invoke "tar" "xvf" manpages))))))))
-
-   (native-search-paths
-    ;; For HTTPS access, Git needs a single-file certificate bundle, specified
-    ;; with $GIT_SSL_CAINFO.
-    (list (search-path-specification
-           (variable "GIT_SSL_CAINFO")
-           (file-type 'regular)
-           (separator #f)                         ;single entry
-           (files '("etc/ssl/certs/ca-certificates.crt")))
-          (search-path-specification
-           (variable "GIT_EXEC_PATH")
-           (separator #f)                         ;single entry
-           (files '("libexec/git-core")))))
-
-   (synopsis "Distributed version control system")
-   (description
-    "Git is a free distributed version control system designed to handle
+                         (find-files dir ".*")))))
+         (add-after 'install 'split
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Split the binaries to the various outputs.
+             (let* ((out      (assoc-ref outputs "out"))
+                    (se       (assoc-ref outputs "send-email"))
+                    (svn      (assoc-ref outputs "svn"))
+                    (gui      (assoc-ref outputs "gui"))
+                    (gitk     (string-append out "/bin/gitk"))
+                    (gitk*    (string-append gui "/bin/gitk"))
+                    (git-gui  (string-append out "/libexec/git-core/git-gui"))
+                    (git-gui* (string-append gui "/libexec/git-core/git-gui"))
+                    (git-cit  (string-append out "/libexec/git-core/git-citool"))
+                    (git-cit* (string-append gui "/libexec/git-core/git-citool"))
+                    (git-se   (string-append out "/libexec/git-core/git-send-email"))
+                    (git-se*  (string-append se  "/libexec/git-core/git-send-email"))
+                    (git-svn  (string-append out "/libexec/git-core/git-svn"))
+                    (git-svn* (string-append svn "/libexec/git-core/git-svn"))
+                    (git-sm   (string-append out
+                                             "/libexec/git-core/git-submodule")))
+               (mkdir-p (string-append gui "/bin"))
+               (mkdir-p (string-append gui "/libexec/git-core"))
+               (mkdir-p (string-append se  "/libexec/git-core"))
+               (mkdir-p (string-append svn "/libexec/git-core"))
+
+               (for-each (lambda (old new)
+                           (copy-file old new)
+                           (delete-file old)
+                           (chmod new #o555))
+                         (list gitk git-gui git-cit git-se git-svn)
+                         (list gitk* git-gui* git-cit* git-se* git-svn*))
+
+               ;; Tell 'git-svn' where Subversion and perl-term-readkey are.
+               (wrap-program git-svn*
+                 `("PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "subversion")
+                                    "/bin")))
+                 `("PERL5LIB" ":" prefix
+                   ,(map (lambda (i) (string-append (assoc-ref inputs i)
+                                                    "/lib/perl5/site_perl"))
+                         '("subversion" "perl-term-readkey")))
+
+                 ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
+                 ;; help it find 'libsvn_client-1.so'.
+                 `("LD_LIBRARY_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "subversion")
+                                    "/lib"))))
+
+               ;; Tell 'git-send-email' where perl modules are.
+               (wrap-program git-se*
+                 `("PERL5LIB" ":" prefix
+                   ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
+                         (list
+                          ,@(transitive-input-references
+                             'inputs
+                             (map (lambda (l)
+                                    (assoc l (package-inputs this-package)))
+                                  '("perl-authen-sasl"
+                                    "perl-net-smtp-ssl"
+                                    "perl-io-socket-ssl")))))))
+
+               ;; Tell 'gitweb.cgi' where perl modules are.
+               (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
+                 `("PERL5LIB" ":" prefix
+                   ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
+                         (list
+                          ,@(transitive-input-references
+                             'inputs
+                             (map (lambda (l)
+                                    (assoc l (package-inputs this-package)))
+                                  '("perl-cgi")))))))
+
+               ;; Tell 'git-submodule' where Perl is.
+               (wrap-program git-sm
+                 `("PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "perl")
+                                    "/bin")))))))
+         (add-after 'split 'install-man-pages
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man"))
+                    (manpages (assoc-ref inputs "git-manpages")))
+               (mkdir-p man)
+               (with-directory-excursion man
+                 (invoke "tar" "xvf" manpages))))))))
+
+    (native-search-paths
+     ;; For HTTPS access, Git needs a single-file certificate bundle, specified
+     ;; with $GIT_SSL_CAINFO.
+     (list (search-path-specification
+            (variable "GIT_SSL_CAINFO")
+            (file-type 'regular)
+            (separator #f)              ;single entry
+            (files '("etc/ssl/certs/ca-certificates.crt")))
+           (search-path-specification
+            (variable "GIT_EXEC_PATH")
+            (separator #f)              ;single entry
+            (files '("libexec/git-core")))))
+
+    (synopsis "Distributed version control system")
+    (description
+     "Git is a free distributed version control system designed to handle
 everything from small to very large projects with speed and efficiency.")
-   ;; XXX: Ignore this CVE to work around a name clash with the unrelated
-   ;; "cpe:2.3:a:jenkins:git" package.  The proper fix is for (guix cve) to
-   ;; account for "vendor names".
-   (properties '((lint-hidden-cve . ("CVE-2018-1000182"
-                                     "CVE-2018-1000110"
-                                     "CVE-2019-1003010"
-                                     "CVE-2020-2136"
-                                     "CVE-2021-21684"
-                                     "CVE-2022-30947"
-                                     "CVE-2022-30948"
-                                     "CVE-2022-30949"
-                                     "CVE-2022-36882"
-                                     "CVE-2022-36883"
-                                     "CVE-2022-36884"))))
-   (license license:gpl2)
-   (home-page "https://git-scm.com/")))
+    ;; XXX: Ignore this CVE to work around a name clash with the unrelated
+    ;; "cpe:2.3:a:jenkins:git" package.  The proper fix is for (guix cve) to
+    ;; account for "vendor names".
+    (properties '((lint-hidden-cve . ("CVE-2018-1000182"
+                                      "CVE-2018-1000110"
+                                      "CVE-2019-1003010"
+                                      "CVE-2020-2136"
+                                      "CVE-2021-21684"
+                                      "CVE-2022-30947"
+                                      "CVE-2022-30948"
+                                      "CVE-2022-30949"
+                                      "CVE-2022-36882"
+                                      "CVE-2022-36883"
+                                      "CVE-2022-36884"))))
+    (license license:gpl2)
+    (home-page "https://git-scm.com/")))
 
 (define-public git-minimal
   ;; The size of the closure of 'git-minimal' is two thirds that of 'git'.
@@ -619,11 +615,11 @@ everything from small to very large projects with speed and efficiency.")
            (replace 'patch-makefiles
              (lambda _
                (substitute* "Makefile"
-                 (("/usr/bin/perl") (which "perl")))
-               #t))
+                 (("/usr/bin/perl") (which "perl")))))
            (delete 'build-subtree)
            (delete 'split)
            (delete 'install-man-pages)
+           (delete 'install-info-manual)
            (delete 'install-subtree)
            (delete 'install-credential-netrc)
            (delete 'install-credential-libsecret)
@@ -647,8 +643,7 @@ everything from small to very large projects with speed and efficiency.")
 
                  ;; Gitweb depends on Perl as well.
                  (delete-file-recursively
-                  (string-append out "/share/gitweb"))
-                 #t)))))
+                  (string-append out "/share/gitweb")))))))
        ((#:make-flags flags)
         `(delete "USE_LIBPCRE2=yes" ,flags))
        ((#:configure-flags flags)
@@ -1861,7 +1856,7 @@ execution of any hook written in any language before every commit.")
     (native-search-paths
      (list (search-path-specification
             (variable "HGEXTENSIONPATH")
-            (files '("lib/python3.9/site-packages/hgext3rd")))))
+            (files '("lib/python3.10/site-packages/hgext3rd")))))
     (home-page "https://www.mercurial-scm.org/")
     (synopsis "Decentralized version control system")
     (description
@@ -2692,7 +2687,7 @@ by rclone usable with git-annex.")
            which                        ;for tests only
            ed))                         ;ditto
     (inputs
-     (list openssl zlib sqlite-next))   ;SQLite 3.37 or later
+     (list openssl zlib sqlite))
     (arguments
      `(#:configure-flags (list "--with-openssl=auto"
                                "--disable-internal-sqlite")
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 73d0c1ca54..9dbcdc72c1 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1523,17 +1523,17 @@ quality and performance.")
 (define-public libva
   (package
     (name "libva")
-    (version "2.15.0")
+    (version "2.17.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/intel/libva/releases/download/"
                            version "/libva-" version ".tar.bz2"))
        (sha256
-        (base32 "1jhy8qzfp4ydbxs9qd9km7k5wq8r4s2vq20r1q07lgld8l4x93i5"))))
+        (base32 "1b2f1hik4x3n4n8217sg1k602wqjba8x20r7nsdmmq05qckyprgk"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list pkg-config))
+     (list config pkg-config))
     (inputs
      (list libdrm
            libx11
@@ -1555,6 +1555,14 @@ quality and performance.")
       #~(list (string-append "dummy_drv_video_ladir=" #$output "/lib/dri"))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'update-config-scripts
+             (lambda* (#:key native-inputs inputs #:allow-other-keys)
+               (for-each (lambda (file)
+                               (install-file
+                                 (search-input-file
+                                   (or native-inputs inputs)
+                                   (string-append "/bin/" file)) "."))
+                         '("config.guess" "config.sub"))))
           (add-before 'build 'fix-dlopen-paths
             (lambda _
               (substitute* "va/drm/va_drm_auth_x11.c"
@@ -3181,7 +3189,7 @@ and custom quantization matrices.")
      (list python-pysocks
            python-websocket-client
            python-isodate
-           python-lxml-4.7
+           python-lxml
            python-pycountry
            python-pycryptodome
            python-requests
@@ -3618,7 +3626,7 @@ application with @code{obs-gamecapture}.")
 (define-public libvdpau
   (package
     (name "libvdpau")
-    (version "1.4")
+    (version "1.5")
     (source
       (origin
         (method git-fetch)
@@ -3628,7 +3636,7 @@ application with @code{obs-gamecapture}.")
         (file-name (git-file-name name version))
         (sha256
          (base32
-          "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
+          "1zfbh5q9adzlydpgwq7hl5w1j2b29j7zns6dxf9fp9pvkj23fz5l"))))
     (build-system meson-build-system)
     (native-inputs
      (list pkg-config))
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 9203731865..218a7b21ea 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -146,18 +146,16 @@ SPIR-V, aiming to emit GLSL or MSL that looks like human-written code.")
 (define-public glslang
   (package
     (name "glslang")
-    (version "10-11.0.0")
+    (version "11.11.0")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/KhronosGroup/glslang")
-             ;; Tag "10-11.0.0" was moved to "11.0.0".
-             ;; FIXME: Use (commit version) on next update.
-             (commit "11.0.0")))
+             (commit version)))
        (sha256
         (base32
-         "14mn2awswl022ls75mfpsnpsl0ai0jgfbqj3sxcsqawyj5f432py"))
+         "03jnaj90q2cg2hjdsg96ashz28dw5hcsg9rvf60bp2mphzzsklpq"))
        (file-name (string-append name "-" version "-checkout"))))
     (build-system cmake-build-system)
     (arguments
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 7c0497be41..8ed2822bb9 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -487,6 +487,7 @@ interface.")
            python-markupsafe
            python-pygments
            python-pynacl
+           python-pypeg2
            python-pyyaml
            ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
            ;; that it's __init__.py is used first.
@@ -502,6 +503,11 @@ interface.")
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-systemdir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "qutebrowser/utils/standarddir.py"
+                 (("/usr/share") (string-append out "/share"))))))
          (add-after 'unpack 'find-userscripts
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "qutebrowser/commands/userscripts.py"
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 7b05a99752..b1d6e8768b 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1091,19 +1091,29 @@ libraries for working with JNLP applets.")
 (define-public jansson
   (package
     (name "jansson")
-    (version "2.13.1")
+    (version "2.14")
     (source (origin
              (method url-fetch)
-             (uri
-              (string-append "http://www.digip.org/jansson/releases/jansson-"
-                             version ".tar.bz2"))
+             (uri (string-append "https://github.com/akheron/jansson"
+                                 "/releases/download/v" version
+                                 "/jansson-" version ".tar.bz2"))
              (sha256
               (base32
-               "1g8h18vh8gyxlwfmvdivdp1siad26ywj5zr4j4avgdyjg7wa147f"))))
+               "1fdgji964mrrz19glx0zh91asji542fvybymvzk6rrbagkr5dagv"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--disable-static")))
-    (home-page "http://www.digip.org/jansson/")
+     (list
+      #:configure-flags #~'("--disable-static")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-tests
+            (lambda _
+              ;; Take a fix from upstream for testing with symbol versioning:
+              ;; https://github.com/akheron/jansson/pull/593
+              (substitute* "test/suites/api/check-exports"
+                (("(grep ' \\[DT\\] ' \\$test_log/symbols.*) \\| sort" _ cmd)
+                 (string-append cmd "| sed 's/@@libjansson.*//' | sort"))))))))
+    (home-page "https://github.com/akheron/jansson")
     (synopsis "JSON C library")
     (description
      "Jansson is a C library for encoding, decoding and manipulating JSON
@@ -2016,8 +2026,7 @@ from streaming URLs.  It is a command-line wrapper for the libquvi library.")
            ;;("gss" ,gss)
            zlib))
     (arguments
-     `(#:scons ,scons-3   ;TODO: remove in the next rebuild cycle
-       #:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs "apr"))
+     `(#:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs "apr"))
                            (string-append "APU=" (assoc-ref %build-inputs "apr-util"))
                            (string-append "OPENSSL=" (assoc-ref %build-inputs "openssl"))
                            ;; (string-append "GSSAPI=" (assoc-ref %build-inputs "gss"))
@@ -3846,14 +3855,14 @@ and IPv6 sockets, intended as a replacement for IO::Socket::INET.")
 (define-public perl-io-socket-ssl
   (package
     (name "perl-io-socket-ssl")
-    (version "2.068")
+    (version "2.074")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/S/SU/SULLR/"
                                   "IO-Socket-SSL-" version ".tar.gz"))
               (sha256
                (base32
-                "1ycgzg1l7p07y5wc0vzgnj122vm51p5aqpi4s56pp0piaq0gq824"))))
+                "0cm810ys5az6z3h3pql71jpliva1gfd0dxwwh4lx194xwimnnj1n"))))
     (build-system perl-build-system)
     (propagated-inputs
      (list perl-net-ssleay
@@ -4702,13 +4711,14 @@ their web site.")
 (define-public python-feedparser
   (package
     (name "python-feedparser")
-    (version "6.0.8")
+    (version "6.0.10")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "feedparser" version ".tar.gz"))
        (sha256
-        (base32 "0qcnkyjjfj5gg5rhd1j4zzlqx5h34bma18zwgj68q95b0l543q2w"))))
+        (base32 "0lfa1c8s6abnlksbwxdpq78bg4rb6603mcgarmip3kip8rglini7"))
+       (patches (search-patches "python-feedparser-missing-import.patch"))))
     (build-system python-build-system)
     (propagated-inputs
      (list python-sgmllib3k))
@@ -7696,7 +7706,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
 (define-public nghttp2
   (package
     (name "nghttp2")
-    (version "1.44.0")
+    (version "1.49.0")
     (source
      (origin
        (method url-fetch)
@@ -7705,7 +7715,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
                            "nghttp2-" version ".tar.xz"))
        (sha256
         (base32
-         "0p9wvva4g8hwj55x19rbyvnq2dbsnf65rphhxnpqs7ll54xlg6an"))))
+         "0vm692c7q2wc4xxz8c41nr8jps2fkwf51xp8fb233cghpf9d9kxh"))))
     (build-system gnu-build-system)
     (outputs (list "out"
                    "lib"))              ; only libnghttp2
@@ -7715,44 +7725,42 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
            cunit python tzdata-for-tests))
     (inputs
      ;; Required to build the tools (i.e. without ‘--enable-lib-only’).
-     `(("c-ares" ,c-ares)
-       ("jansson" ,jansson)             ; for HPACK tools
-       ,@(if (hurd-target?) '()
-             `(("jemalloc" ,jemalloc))) ; fight nghttpd{,x} heap fragmentation
-       ("libev" ,libev)
-       ("libxml2" ,libxml2)             ; for ‘nghttp -a’
-       ("openssl" ,openssl)
-       ,@(if (hurd-target?)
-             `(("openssl-static" ,openssl "static"))
-             '())))
+     (append
+      (if (hurd-target?)
+          `((,openssl "static"))
+          (list jemalloc))              ; fight nghttpd{,x} heap fragmentation
+      (list c-ares
+            jansson                     ; for HPACK tools
+            libev
+            libxml2                     ; for ‘nghttp -a’
+            openssl)))
     (arguments
-     `(#:configure-flags
-       (list (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
-             "--enable-app"             ; build all the tools
-             "--enable-hpack-tools"     ; ...all the tools
-             "--disable-examples"
-             "--disable-static"         ; don't bother building .a files
-             ,@(if (%current-target-system)
-                   '("--disable-python-bindings")
-                   '()))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'break-circular-reference
-           ;; libnghttp2.pc by default retains a reference to the ‘out’ output,
-           ;; which is not allowed.  Break this cycle.  While we could install
-           ;; only the library to ‘out’ and move everything else to a separate
-           ;; output, this would inconvenience the majority of (human) users.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "lib/libnghttp2.pc.in"
-               (("@prefix@")
-                (assoc-ref outputs "lib")))
-             #t))
-         (add-before 'check 'set-timezone-directory
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
-             (setenv "TZDIR" (string-append
-                               (assoc-ref (or native-inputs inputs) "tzdata")
-                               "/share/zoneinfo"))
-             #t)))))
+     (list
+      #:configure-flags
+      #~(list (string-append "--libdir=" #$output:lib "/lib")
+              "--enable-app"            ; build all the tools
+              "--enable-hpack-tools"    ; ...all the tools
+              "--disable-examples"
+              "--disable-static"        ; don't bother building .a files
+              #$@(if (%current-target-system)
+                     '("--disable-python-bindings")
+                     '()))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'break-circular-reference
+            ;; libnghttp2.pc by default retains a reference to the ‘out’ output,
+            ;; which is not allowed.  Break this cycle.  While we could install
+            ;; only the library to ‘out’ and move everything else to a separate
+            ;; output, this would inconvenience the majority of (human) users.
+            (lambda _
+              (substitute* "lib/libnghttp2.pc.in"
+                (("@prefix@")
+                 #$output:lib))))
+          (add-before 'check 'set-timezone-directory
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (setenv "TZDIR" (search-input-directory
+                               (or native-inputs inputs)
+                               "share/zoneinfo")))))))
     (home-page "https://nghttp2.org/")
     (synopsis "HTTP/2 protocol client, proxy, server, and library")
     (description
@@ -7780,6 +7788,35 @@ compressed JSON header blocks.
 @end itemize\n")
     (license license:expat)))
 
+;; Older variant for Node versions < 17 (upstream commit 43291b98edaa682
+;; add support for newer nghttp2, but is difficult to backport).
+(define-public nghttp2-for-node
+  (hidden-package
+   (package
+     (inherit nghttp2)
+     (version "1.44.0")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append "https://github.com/nghttp2/nghttp2/"
+                                   "releases/download/v" version "/"
+                                   "nghttp2-" version ".tar.xz"))
+               (sha256
+                (base32
+                 "0p9wvva4g8hwj55x19rbyvnq2dbsnf65rphhxnpqs7ll54xlg6an"))))
+     (arguments
+      (substitute-keyword-arguments (package-arguments nghttp2)
+        ((#:phases phases #~%standard-phases)
+         #~(modify-phases #$phases
+             (add-after 'unpack 'workaround-broken-python-version-check
+               (lambda _
+                 (substitute* "configure"
+                   ;; The configure script uses a string comparison to
+                   ;; determine whether the Python interpreter is recent
+                   ;; enough, which fails when comparing 3.8 to 3.10.
+                   ;; Convert to tuples for a more reliable check.
+                   (("print \\(ver >= '3\\.8'\\)")
+                    "print (tuple(map(int, ver.split('.'))) >= (3,8))")))))))))))
+
 (define-public hpcguix-web
   (package
     (name "hpcguix-web")
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index 0a51479985..8ef95ce518 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -290,8 +290,7 @@ propagated by default) such as @code{gst-plugins-good} and
        (replace "gtk+" gtk)))
     (inputs
      (modify-inputs (package-inputs webkitgtk)
-       (delete "gtk+-2" "libnotify")
-       (append pango-next)))))          ;TODO: remove after it's the default
+       (delete "gtk+-2" "libnotify")))))
 
 ;;; Required by e.g. emacs-next-pgtk, emacs-xwidgets, and some other GNOME
 ;;; packages for webkit2gtk-4.0.  See also the upstream tracker for libsoup 3:
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index b55525b580..985c1ac56b 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -45,7 +45,7 @@
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
 ;;; Copyright © 2021 lasnesne <lasnesne@lagunposprasihopre.org>
-;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2021, 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2021, 2023 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
@@ -1410,7 +1410,7 @@ project derived from the original Calm Window Manager.")
 (define-public dwl
   (package
     (name "dwl")
-    (version "0.2.1")
+    (version "0.3.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1419,7 +1419,7 @@ project derived from the original Calm Window Manager.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0js8xjc2rx1ml6s58s90jrak5n7vh3kj5na2j4yy3qy0cb501xcm"))))
+                "0952kajc60ijy6qz14y6s5n7dyyf14ndzrhs4ynxj97k76742z2l"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; no tests
@@ -1539,16 +1539,16 @@ functionality to display information about the most commonly used services.")
 (define-public wlroots
   (package
     (name "wlroots")
-    (version "0.14.1")
+    (version "0.15.1")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/swaywm/wlroots")
+             (url "https://gitlab.freedesktop.org/wlroots/wlroots")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1sshp3lvlkl1i670kxhwsb4xzxl8raz6769kqvgmxzcb63ns9ay1"))))
+        (base32 "00s73nhi3sc48l426jdlqwpclg41kx1hv0yk4yxhbzw19gqpfm1h"))))
     (build-system meson-build-system)
     (arguments
      `(#:phases
@@ -1585,7 +1585,7 @@ modules for building a Wayland compositor.")
 (define-public sway
   (package
     (name "sway")
-    (version "1.6.1")
+    (version "1.7")
     (source
      (origin
        (method git-fetch)
@@ -1594,7 +1594,7 @@ modules for building a Wayland compositor.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0j4sdbsrlvky1agacc0pcz9bwmaxjmrapjnzscbd2i0cria2fc5j"))))
+        (base32 "0ss3l258blyf2d0lwd7pi7ga1fxfj8pxhag058k7cmjhs3y30y5l"))))
     (build-system meson-build-system)
     (arguments
      `(;; elogind is propagated by wlroots -> libseat
@@ -1673,7 +1673,7 @@ modules for building a Wayland compositor.")
     (inputs (list cairo gdk-pixbuf libxkbcommon
                   ;("linux-pam" ,linux-pam) ; FIXME: Doesn't work.
                   wayland))
-    (native-inputs (list pango pkg-config scdoc wayland-protocols-next))
+    (native-inputs (list pango pkg-config scdoc wayland-protocols))
     (home-page "https://github.com/swaywm/sway")
     (synopsis "Screen locking utility for Wayland compositors")
     (description "Swaylock is a screen locking utility for Wayland compositors.")
@@ -1744,7 +1744,7 @@ display a clock or apply image manipulation techniques to the background image."
            pkg-config
            python-minimal
            scdoc
-           vala-next))
+           vala))
     (inputs
      (list json-glib
            glib
@@ -2706,7 +2706,7 @@ shows a notification for the user on the screen.")
 (define-public cagebreak
   (package
     (name "cagebreak")
-    (version "1.8.0")
+    (version "1.8.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2715,13 +2715,18 @@ shows a notification for the user on the screen.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0296mnzk7qd0zvnhw716jvpp7madjsar373ixx4qcff0m0jwfrxm"))))
+                "0vm97ak0589v39m3fljf1qhy92dqgiqcrrfp757gg7q58qwa6dkf"))))
     (build-system meson-build-system)
-    (arguments '(#:configure-flags '("-Dxwayland=true")))
-    (native-inputs
-     (list pandoc pkg-config))
-    (inputs
-     (list libevdev pango wlroots))
+    (arguments
+     `(#:configure-flags '("-Dxwayland=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-data-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/etc/") (string-append (assoc-ref outputs "out") "/etc"))))))))
+    (native-inputs (list pandoc pkg-config))
+    (inputs (list libevdev pango wlroots))
     (home-page "https://github.com/project-repo/cagebreak")
     (synopsis "Tiling wayland compositor inspired by ratpoison")
     (description
@@ -2757,26 +2762,26 @@ read and write, and compatible with JSON.")
 (define-public hikari
   (package
     (name "hikari")
-    (version "2.3.2")
+    (version "2.3.3")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hikari.acmelabs.space/releases/"
                            "hikari-" version ".tar.gz"))
        (sha256
-        (base32 "1jvy21irh6s7czff2hk63spswqibjcjhrpsgmrki5bii9ddi73wy"))))
+        (base32 "1qjd9dhpmv75idf6jjzwff8wgliad4d0af8pih9526p14vrnyws0"))))
     (build-system gnu-build-system)
     (native-inputs
      (list bmake pkg-config wayland-protocols))
     (inputs
-     `(("cairo" ,cairo)
-       ("libinput" ,libinput-minimal)
-       ("libucl" ,libucl)
-       ("libxkbcommon" ,libxkbcommon)
-       ("pam" ,linux-pam)
-       ("pango" ,pango)
-       ("wayland" ,wayland)
-       ("wlroots" ,wlroots)))
+     (list cairo
+           libinput-minimal
+           libucl
+           libxkbcommon
+           linux-pam
+           pango
+           wayland
+           wlroots))
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 5440a2725b..b226aa4e83 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2023 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -306,7 +307,7 @@ and many other languages.")
     (native-inputs
      (list pkg-config python-waf))
     (propagated-inputs
-     (list python-attrdict python-numpy python-pillow python-six))
+     (list python-attrdict3 python-numpy python-pillow python-six))
     (home-page "https://wxpython.org/")
     (synopsis "Cross platform GUI toolkit for Python")
     (description "wxPython is a cross-platform GUI toolkit for the Python
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 4366e951e9..d1228a110e 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -11,7 +11,7 @@
 ;;; Copyright © 2015 Florian Paul Schmidt <mista.tapas@gmx.net>
 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016-2021, 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
@@ -499,14 +499,14 @@ avoiding password prompts when X11 forwarding has already been setup.")
 (define-public libxkbcommon
   (package
     (name "libxkbcommon")
-    (version "1.3.0")
+    (version "1.4.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://xkbcommon.org/download/libxkbcommon-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0ysynzzgzd9jdrh1321r4bgw8wd5zljrlyn5y1a31g39xacf02bv"))))
+               "0fbb2dyjvf71p42y2jmwdcylsvj03w52f5rb23c2d00rwahhfg4l"))))
     (build-system meson-build-system)
     (inputs
      (list libx11
@@ -523,13 +523,13 @@ avoiding password prompts when X11 forwarding has already been setup.")
                  (list pkg-config-for-build wayland)
                  '())))
     (arguments
-     `(#:configure-flags
-       (list (string-append "-Dxkb-config-root="
-                            (assoc-ref %build-inputs "xkeyboard-config")
-                            "/share/X11/xkb")
-             (string-append "-Dx-locale-root="
-                            (assoc-ref %build-inputs "libx11")
-                            "/share/X11/locale"))))
+     (list #:configure-flags
+           #~(list (string-append "-Dxkb-config-root="
+                                  (search-input-directory %build-inputs
+                                   "share/X11/xkb"))
+                   (string-append "-Dx-locale-root="
+                                  (search-input-directory %build-inputs
+                                   "share/X11/locale")))))
     (home-page "https://xkbcommon.org/")
     (synopsis "Library to handle keyboard descriptions")
     (description "Xkbcommon is a library to handle keyboard descriptions,
@@ -710,7 +710,7 @@ rasterisation.")
 (define-public libdrm
   (package
     (name "libdrm")
-    (version "2.4.107")
+    (version "2.4.114")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -718,24 +718,24 @@ rasterisation.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65"))))
+                "09nhk3jx3qzggl5vyii3yh4zm0npjqsbxhzvxrg2xla77a2cyj9h"))))
     (build-system meson-build-system)
     (arguments
-     `(#:configure-flags
-       '(,@(match (%current-system)
+     (list #:configure-flags
+           (match (%current-system)
              ((or "armhf-linux" "aarch64-linux")
-              '("-Dexynos=true"
-                "-Domap=true"
-                "-Detnaviv=true"
-                "-Dtegra=true"
-                "-Dfreedreno-kgsl=true"))
-             (_ '())))
-
-       #:phases (modify-phases %standard-phases
-                  (replace 'check
-                    (lambda* (#:key tests? #:allow-other-keys)
-                      (when tests?
-                        (invoke "meson" "test" "--timeout-multiplier" "5")))))))
+              #~(list "-Dexynos=enabled"
+                      "-Domap=enabled"
+                      "-Detnaviv=enabled"
+                      "-Dtegra=enabled"
+                      "-Dfreedreno-kgsl=true"))
+             (_ ''()))
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "meson" "test" "--timeout-multiplier" "5")))))))
     (propagated-inputs
      (list libpciaccess))
     (native-inputs
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index dffad299e9..96651c03a0 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -238,14 +238,14 @@ It currently supports:
 (define-public flac
   (package
    (name "flac")
-   (version "1.3.3")
+   (version "1.3.4")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://downloads.xiph.org/releases/flac/flac-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0j0p9sf56a2fm2hkjnf7x3py5ir49jyavg4q5zdyd7bcf6yq4gi1"))))
+              "0dz7am8kbc97a6afml1h4yp085274prg8j7csryds8m3fmz61w4g"))))
    (build-system gnu-build-system)
    (arguments
     `(#:parallel-tests? #f))
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 0b26a63e85..1841cb3bda 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015-2018, 2020-2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
@@ -13,7 +13,7 @@
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
@@ -80,6 +80,7 @@
   #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix deprecation)
   #:use-module (guix utils)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config))
@@ -117,8 +118,7 @@ the entire document.")
 (define-public expat
   (package
     (name "expat")
-    (version "2.4.1")
-    (replacement expat/fixed)
+    (version "2.5.0")
     (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
               (origin
                 (method url-fetch)
@@ -130,7 +130,7 @@ the entire document.")
                             "/expat-" version ".tar.xz")))
                 (sha256
                  (base32
-                  "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))
+                  "1gnwihpfz4x18rwd6cbrdggmfqjzwsdfh1gpmc0ph21c4gq2097g")))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (modify-phases %standard-phases
@@ -154,23 +154,6 @@ stream-oriented parser in which an application registers handlers for
 things the parser might find in the XML document (like start tags).")
     (license license:expat)))
 
-(define expat/fixed
-  (package
-    (inherit expat)
-    (version "2.4.9")
-    (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
-              (origin
-                (method url-fetch)
-                (uri (list (string-append "mirror://sourceforge/expat/expat/"
-                                          version "/expat-" version ".tar.xz")
-                           (string-append
-                            "https://github.com/libexpat/libexpat/releases/download/R_"
-                            (string-map dot->underscore version)
-                            "/expat-" version ".tar.xz")))
-                (sha256
-                 (base32
-                  "0m03zh7al39mx4rf0s2bgdn77r658qqf9k3a7bwx6z2wzql0g33f")))))))
-
 (define-public libebml
   (package
     (name "libebml")
@@ -195,20 +178,19 @@ binary extension of XML for the purpose of storing and manipulating data in a
 hierarchical form with variable field lengths.")
     (license license:lgpl2.1)))
 
+;; Note: Remember to check python-libxml2 when updating this package.
 (define-public libxml2
   (package
     (name "libxml2")
-    (version "2.9.12")
+    (version "2.9.14")
     (source (origin
              (method url-fetch)
-             (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
-                                 version ".tar.gz"))
+             (uri (string-append "https://download.gnome.org/sources/libxml2/"
+                                 (version-major+minor version)"/libxml2-"
+                                 version ".tar.xz"))
              (sha256
               (base32
-               "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8"))
-             (patches (search-patches "libxml2-parent-pointers.patch"
-                                      "libxml2-terminating-newline.patch"
-                                      "libxml2-xpath-recursion-limit.patch"))))
+               "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0"))))
     (build-system gnu-build-system)
     (outputs '("out" "static" "doc"))
     (arguments
@@ -224,7 +206,7 @@ hierarchical form with variable field lengths.")
                         (for-each (lambda (dir)
                                     (rename-file (string-append src "/share/" dir)
                                                  (string-append doc "/" dir)))
-                                  '("doc" "gtk-doc"))
+                                  '("gtk-doc"))
                         (for-each (lambda (ar)
                                     (rename-file ar (string-append dst "/"
                                                                    (basename ar))))
@@ -267,6 +249,35 @@ project (but it is usable outside of the Gnome platform).")
 provides an @code{--xpath0} option to @command{xmllint} that enables it
 to output XPath results with a null delimiter.")))
 
+(define-public python-libxml2
+  (package/inherit libxml2
+    (name "python-libxml2")
+    (source (origin
+              (inherit (package-source libxml2))
+              (patches
+                (append (search-patches "python-libxml2-utf8.patch")
+                        (origin-patches (package-source libxml2))))))
+    (build-system python-build-system)
+    (outputs '("out"))
+    (arguments
+     (list
+      ;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              (chdir "python")
+              (let ((libxml2-headers (search-input-directory
+                                      inputs "include/libxml2")))
+                (substitute* "setup.py"
+                  ;; The build system ignores C_INCLUDE_PATH & co, so
+                  ;; provide the absolute directory name.
+                  (("/opt/include")
+                   (dirname libxml2-headers)))))))))
+    (inputs (list libxml2))
+    (synopsis "Python bindings for the libxml2 library")))
+
 (define-public libxlsxwriter
   (package
     (name "libxlsxwriter")
@@ -309,68 +320,51 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
     (license (list license:bsd-2
                    license:public-domain)))) ; third_party/md5
 
-(define-public python-libxml2
-  (package/inherit libxml2
-    (name "python-libxml2")
-    (source (origin
-              (inherit (package-source libxml2))
-              (patches
-                (append (search-patches "python-libxml2-utf8.patch")
-                        (origin-patches (package-source libxml2))))))
-    (build-system python-build-system)
-    (outputs '("out"))
-    (arguments
-     `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before
-          'build 'configure
-          (lambda* (#:key inputs #:allow-other-keys)
-            (chdir "python")
-            (let ((glibc   (assoc-ref inputs ,(if (%current-target-system)
-                                                  "cross-libc" "libc")))
-                  (libxml2 (assoc-ref inputs "libxml2")))
-              (substitute* "setup.py"
-                ;; For 'libxml2/libxml/tree.h'.
-                (("ROOT = r'/usr'")
-                 (format #f "ROOT = r'~a'" libxml2))
-                ;; For 'iconv.h'.
-                (("/opt/include")
-                 (string-append glibc "/include")))))))))
-    (inputs `(("libxml2" ,libxml2)))
-    (synopsis "Python bindings for the libxml2 library")))
-
 (define-public libxslt
   (package
     (name "libxslt")
-    (version "1.1.34")
+    (version "1.1.37")
     (source (origin
              (method url-fetch)
-             (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
-                                 version ".tar.gz"))
+             (uri (string-append "https://download.gnome.org/sources"
+                                 "/libxslt/" (version-major+minor version)
+                                 "/libxslt-" version ".tar.xz"))
              (sha256
               (base32
-               "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq"))
+               "1d1s2bk0m6d7bzml9w90ycl0jlpcy4v07595cwaddk17h3f2fjrs"))
              (patches (search-patches "libxslt-generated-ids.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'disable-fuzz-tests
-                    (lambda _
-                      ;; Disable libFuzzer tests, because they require
-                      ;; instrumentation builds of libxml2 and libxslt.
-                      (substitute* "tests/Makefile"
-                        (("exslt plugins fuzz")
-                         "exslt plugins"))
-                      #t)))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'disable-fuzz-tests
+                 (lambda _
+                   ;; Disable libFuzzer tests, because they require
+                   ;; instrumentation builds of libxml2 and libxslt.
+                   (substitute* "tests/Makefile"
+                     (("exslt plugins fuzz")
+                      "exslt plugins"))
+                   ;; Also disable Python tests since they require
+                   ;; python-libxml2 which would introduce a
+                   ;; circular dependency.
+                   (substitute* "python/Makefile"
+                     (("cd tests && \\$\\(MAKE\\) tests")
+                      "$(info Python tests are disabled by Guix.)")))))
+           #:configure-flags
+           (if (%current-target-system)
+               ;; 'configure.ac' uses 'AM_PATH_PYTHON', which looks for
+               ;; 'python' in $PATH and tries to run it.  Skip all that when
+               ;; cross-compiling.
+               #~'("--without-python")
+               #~'())))
     (home-page "http://xmlsoft.org/XSLT/index.html")
     (synopsis "C library for applying XSLT stylesheets to XML documents")
-    (inputs `(("libgcrypt" ,libgcrypt)
-              ("libxml2" ,libxml2)
-              ("python" ,python-minimal-wrapper)
-              ("zlib" ,zlib)
-              ("xz" ,xz)))
+    (inputs
+     (list libgcrypt
+           libxml2
+           python-minimal-wrapper
+           zlib
+           xz))
     (native-inputs
      (list pkg-config))
     (description
@@ -1853,26 +1847,20 @@ because lxml.etree already has its own implementation of XPath 1.0.")
 (define-public python-lxml
   (package
     (name "python-lxml")
-    (version "4.6.3")
+    (version "4.9.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "lxml" version))
        (sha256
-        (base32 "0s14r1w2x9sdlcsw8mxiqgw4rz5zs5lpqpxrfyn4a1mkndqqbdrr"))
-       ;; Adapt a test to libxml2 2.9.12, taken from this commit:
-       ;; https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047e
-       (modules '((guix build utils)))
-       (snippet
-        '(substitute* "src/lxml/tests/test_etree.py"
-             (("self\\.assertEqual\\(\\{'hha': None\\}, el\\.nsmap\\)")
-              "self.assertEqual({}, el.nsmap)")))))
+         (base32 "0grczyrrq2rbwhvpri15cyhv330s494vbz3js3jky8xp5c2rnx7y"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (replace 'check
-                    (lambda _
-                      (invoke "make" "test"))))))
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "make" "test")))))))
     (inputs
      (list libxml2 libxslt))
     (home-page "https://lxml.de/")
@@ -1882,17 +1870,8 @@ because lxml.etree already has its own implementation of XPath 1.0.")
 libxml2 and libxslt.")
     (license license:bsd-3))) ; and a few more, see LICENSES.txt
 
-(define-public python-lxml-4.7
-  (package
-    (inherit python-lxml)
-    (version "4.7.1")
-    (source
-     (origin
-       (inherit (package-source python-lxml))
-       (uri (pypi-uri "lxml" version))
-       (sha256
-        (base32
-         "090viyanaki4q7w7i000xl0qh4in52bkl3qal55sz2bbm8w3hqd1"))))))
+(define-deprecated python-lxml-4.7 python-lxml)
+(export python-lxml-4.7)
 
 (define-public python-untangle
   ;; The latest tagged release is from 2014; use the latest commit.
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index e916ca0012..cd867cc410 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -11,7 +11,7 @@
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016, 2017 John Darrington <jmd@gnu.org>
-;;; Copyright © 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2017-2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2017, 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -86,7 +86,6 @@
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -242,14 +241,14 @@ which can be read by any architecture.")
 (define-public xorgproto
   (package
     (name "xorgproto")
-    (version "2021.5")
+    (version "2022.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "ftp://ftp.freedesktop.org/pub/xorg//individual/proto/"
-                                  "xorgproto-" version ".tar.bz2"))
+              (uri (string-append "mirror://xorg/individual/proto"
+                                  "/xorgproto-" version ".tar.xz"))
               (sha256
                (base32
-                "05d0kib351qmnlfimaznaw0220fr0ym7fx2gn9h2jqxxilxncbxa"))))
+                "17kbq1x68jl9mz69ays5c0w72lpkqi937raxk0im7y88pvrdn4sx"))))
     (build-system gnu-build-system)
     (propagated-inputs
      ;; To get util-macros in (almost?) all package inputs.
@@ -1274,8 +1273,7 @@ with the Cygwin XWin server when running X11 in a rootless mode.")
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--disable-static")))
-    (inputs
-      (list libbsd xorgproto))
+    (inputs (list xorgproto))
     (native-inputs
        (list pkg-config))
     (home-page "https://www.x.org/wiki/")
@@ -1286,7 +1284,7 @@ with the Cygwin XWin server when running X11 in a rootless mode.")
 (define-public libxft
   (package
     (name "libxft")
-    (version "2.3.3")
+    (version "2.3.4")
     (source
       (origin
         (method url-fetch)
@@ -1296,15 +1294,15 @@ with the Cygwin XWin server when running X11 in a rootless mode.")
                ".tar.bz2"))
         (sha256
           (base32
-            "05lja9s54090xwh31r0bqms4v3pimng5xr09g2rdnafx2vk6hp12"))))
+            "1pdbr6gzfvixc791pjf42i9gg8wvfq6cpq6sdca04h4i42mxmpjp"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--disable-static")))
     (propagated-inputs
      ;; xft.pc refers to all these.
-      `(("libxrender" ,libxrender)
-        ("freetype" ,freetype)
-        ("fontconfig" ,fontconfig)))
+     (list libxrender
+           freetype
+           fontconfig))
     (inputs
       (list libx11 xorgproto))
     (native-inputs
@@ -2038,7 +2036,7 @@ emulate a TI-30 or an HP-10C.")
 (define-public xcb-proto
   (package
     (name "xcb-proto")
-    (version "1.14")
+    (version "1.15.2")
     (source
       (origin
         (method url-fetch)
@@ -2047,17 +2045,10 @@ emulate a TI-30 or an HP-10C.")
                version ".tar.xz"))
         (sha256
          (base32
-          "01d62r286yfc3rpz714nqdgkl0wk9j0wqkd4ylas1d7r4vmkqshq"))
-        (modules '((guix build utils)))
-        (snippet
-         '(begin
-            ;; fractions.gcd has been deprecated since python-3.5.
-            (substitute* "xcbgen/align.py"
-              (("from fractions import gcd") "from math import gcd"))
-            #t))))
+          "1vak6q53abwxnkfn6by7j24m48kd2iy7jnskkqzzx8l0ysqvwwkh"))))
     (build-system gnu-build-system)
     (native-inputs
-      `(("pkg-config" ,pkg-config) ("python" ,python-minimal-wrapper)))
+     (list pkg-config python-minimal-wrapper))
     (home-page "https://xcb.freedesktop.org/")
     (synopsis "XML-XCB protocol descriptions")
     (description
@@ -3718,25 +3709,18 @@ extension to the X11 protocol.  It includes:
 (define-public xkeyboard-config
   (package
     (name "xkeyboard-config")
-    (version "2.34")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (string-append
-              "ftp://ftp.freedesktop.org/pub/xorg//individual/data/xkeyboard-config/xkeyboard-config-"
-              version
-              ".tar.bz2"))
-        (sha256
-          (base32
-            "1kmq2ykwmh10sd6155gml4jhdxmvsll6xdg7zw86czpfhrvd48dk"))))
-    (build-system gnu-build-system)
-    (inputs
-      (list libx11 xkbcomp-intermediate))
-    (native-inputs
-      `(("gettext" ,gettext-minimal)
-        ("perl" ,perl)
-        ("pkg-config" ,pkg-config)
-        ("python" ,python)))
+    (version "2.36")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://xorg/individual/data/xkeyboard-config/"
+                    "xkeyboard-config-" version ".tar.xz"))
+              (sha256
+               (base32
+                "158m7r6ga7w12ry35q6d0z6hilbpj9h7ilw56h55478n58lv26qz"))))
+    (build-system meson-build-system)
+    (inputs (list libx11 xkbcomp-intermediate))
+    (native-inputs (list gettext-minimal libxslt perl pkg-config python))
     (home-page "https://www.x.org/wiki/")
     (synopsis "Xorg XKB configuration files")
     (description
@@ -4534,17 +4518,17 @@ protocol and arbitrary X extension protocol.")
 (define-public libxv
   (package
     (name "libxv")
-    (version "1.0.11")
+    (version "1.0.12")
     (source
       (origin
         (method url-fetch)
         (uri (string-append
                "mirror://xorg/individual/lib/libXv-"
                version
-               ".tar.bz2"))
+               ".tar.xz"))
         (sha256
           (base32
-            "125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j"))))
+            "0j1qqrhbhdi3kqz0am5i1lhs31ql9pbc14z41w0a5xw9yq4zmxxa"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
@@ -4661,8 +4645,7 @@ common definitions and porting layer.")
      '(#:configure-flags '("--disable-static")))
     (propagated-inputs
       (list xorgproto))
-    (inputs
-      (list libbsd xtrans))
+    (inputs (list xtrans))
     (native-inputs
       (list pkg-config))
     (home-page "https://www.x.org/wiki/")
@@ -4673,17 +4656,16 @@ common definitions and porting layer.")
 (define-public libxau
   (package
     (name "libxau")
-    (version "1.0.9")
+    (version "1.0.10")
     (source
       (origin
         (method url-fetch)
         (uri (string-append
                "mirror://xorg/individual/lib/libXau-"
-               version
-               ".tar.bz2"))
+               version ".tar.xz"))
         (sha256
           (base32
-            "1v3krc6x0zliaa66qq1bf9j60x5nqfy68v8axaiglxpnvgqcpy6c"))))
+            "02hc3azypiiahr9y1cyn0mqc5zd997hh3h0rp7jqfbsd6f9g5rlb"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--disable-static")))
@@ -4834,17 +4816,15 @@ new API's in libXft, or the legacy API's in libX11.")
 (define-public libxvmc
   (package
     (name "libxvmc")
-    (version "1.0.12")
+    (version "1.0.13")
     (source
-      (origin
-        (method url-fetch)
-        (uri (string-append
-               "mirror://xorg/individual/lib/libXvMC-"
-               version
-               ".tar.bz2"))
-        (sha256
-          (base32
-            "1kbdjsvkm5l7axv7g477qj18sab2wnqhliy6197syzizgfbsfgbb"))))
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://xorg/individual/lib/libXvMC-"
+                           version ".tar.xz"))
+       (sha256
+        (base32
+         "0z35xqna3dnrfxgn9aa1y6jx7mrwsn8vi8dcwm3sg23qx9nvx7ha"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
@@ -4894,7 +4874,7 @@ protocol.")
 (define-public libxcb
   (package
     (name "libxcb")
-    (version "1.14")
+    (version "1.15")
     (source
       (origin
         (method url-fetch)
@@ -4902,7 +4882,7 @@ protocol.")
                             "libxcb-" version ".tar.xz"))
         (sha256
           (base32
-           "0d2chjgyn5lr9sfhacfvqgnj9l9faz11vn322a06jd6lk3dxcpm5"))))
+           "0nd035rf83xf531cnjzsf9ykb5w9rdzz6bbyhi683xkwh57p8f6c"))))
     (build-system gnu-build-system)
     (outputs '("out" "doc"))                      ;5.5 MiB of man pages
     (propagated-inputs
@@ -4910,8 +4890,7 @@ protocol.")
     (inputs
       (list xcb-proto libxslt))
     (native-inputs
-      `(("pkg-config" ,pkg-config)
-        ("python" ,python-minimal-wrapper)))
+     (list pkg-config python-minimal-wrapper))
     (arguments
      `(#:configure-flags (list "--enable-xkb"
                                "--disable-static"
@@ -5256,7 +5235,7 @@ Wayland.")
 (define-public libx11
   (package
     (name "libx11")
-    (version "1.7.3.1")
+    (version "1.8.1")
     (source
      (origin
        (method url-fetch)
@@ -5264,7 +5243,7 @@ Wayland.")
                            "/individual/lib/libX11-" version ".tar.xz"))
        (sha256
         (base32
-         "1289nvs52q9fnp7zl30bdpbvqggnjjb39vy0zll511zvcrr43z9g"))))
+         "1xyry8i7zqmlkvpbyyqwi18rrdw6ycczlvfp63rh2570pfhimi0v"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "doc"))                  ;8 MiB of man pages + XML
@@ -5291,17 +5270,15 @@ Wayland.")
 (define-public libxcursor
   (package
     (name "libxcursor")
-    (version "1.2.0")
+    (version "1.2.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "mirror://xorg/individual/lib/libXcursor-"
-             version
-             ".tar.bz2"))
+       (uri (string-append "mirror://xorg/individual/lib/libXcursor-"
+                           version ".tar.xz"))
        (sha256
         (base32
-         "10l7c9fm0jmpkm9ab9dz8r6m1pr87vvgqjnbx1psz50h4pwfklrs"))))
+         "011195an3w4xld3x0dr534kar1xjf52q96hmf0hgvfhh2rrl7ha6"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--disable-static")))