aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/bash-completion-directories.patch20
-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/cmake-curl-certificates.patch15
-rw-r--r--gnu/packages/patches/coreutils-ls.patch117
-rw-r--r--gnu/packages/patches/curl-nghttp2-compat.patch141
-rw-r--r--gnu/packages/patches/cyrus-sasl-CVE-2019-19906.patch25
-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/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/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/jsoncpp-pkg-config-version.patch24
-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/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-skip-tests.patch19
-rw-r--r--gnu/packages/patches/mm-common-reproducible-tarball.patch40
-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/python-2.7-expat-compat.patch59
-rw-r--r--gnu/packages/patches/source-highlight-gcc-compat.patch74
-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/patches/zlib-cc.patch21
-rw-r--r--gnu/packages/patches/zlib-correct-crc32-inputs.patch44
40 files changed, 664 insertions, 2048 deletions
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/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/cmake-curl-certificates.patch b/gnu/packages/patches/cmake-curl-certificates.patch
index 7fe2615271..8dd93de724 100644
--- a/gnu/packages/patches/cmake-curl-certificates.patch
+++ b/gnu/packages/patches/cmake-curl-certificates.patch
@@ -4,22 +4,23 @@ 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 @@
+diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
+index 28ee24dfe9..6b2bb09ff5 100644
+--- a/Source/cmCurl.cxx
++++ b/Source/cmCurl.cxx
+@@ -2,10 +2,7 @@
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"
+ #include "cmSystemTools.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);
+@@ -38,6 +35,19 @@ std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile)
+ ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile.c_str());
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
}
+
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-nghttp2-compat.patch b/gnu/packages/patches/curl-nghttp2-compat.patch
new file mode 100644
index 0000000000..e3f69c6010
--- /dev/null
+++ b/gnu/packages/patches/curl-nghttp2-compat.patch
@@ -0,0 +1,141 @@
+Use CRLF headers in test responses to cope with newer nghttp2.
+
+Taken from upstream:
+
+ https://github.com/curl/curl/commit/ef121401d6eabed204a716f16b2776ededc75c0e
+
+diff --git a/tests/data/test1700 b/tests/data/test1700
+index 8b1ef4ae336c3..7f78bcf5f92ed 100644
+--- a/tests/data/test1700
++++ b/tests/data/test1700
+@@ -11,26 +11,26 @@ HTTP/2
+ # Server-side
+ <reply>
+ <data nocheck="yes">
+-HTTP/1.1 200 OK
+-Date: Tue, 09 Nov 2010 14:49:00 GMT
+-Server: test-server/fake
+-Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+-ETag: "21025-dc7-39462498"
+-Accept-Ranges: bytes
+-Content-Length: 6
+-Connection: close
+-Content-Type: text/html
+-Funny-head: yesyes
+-
++HTTP/1.1 200 OK
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
+ -foo-
+ </data>
+ <data1>
+-HTTP/1.1 200 OK
+-Date: Tue, 09 Nov 2010 14:49:00 GMT
+-Content-Length: 6
+-Connection: close
+-Content-Type: text/html
+-
++HTTP/1.1 200 OK
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++
+ -maa-
+ </data1>
+ </reply>
+diff --git a/tests/data/test1701 b/tests/data/test1701
+index 3c1a2bd0b8217..22f6147d0503a 100644
+--- a/tests/data/test1701
++++ b/tests/data/test1701
+@@ -11,17 +11,17 @@ HTTP/2
+ # Server-side
+ <reply>
+ <data nocheck="yes">
+-HTTP/1.1 200 OK
+-Date: Tue, 09 Nov 2010 14:49:00 GMT
+-Server: test-server/fake
+-Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+-ETag: "21025-dc7-39462498"
+-Accept-Ranges: bytes
+-Content-Length: 6
+-Connection: close
+-Content-Type: text/html
+-Funny-head: yesyes
+-
++HTTP/1.1 200 OK
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
+ -foo-
+ </data>
+ </reply>
+diff --git a/tests/data/test358 b/tests/data/test358
+index 8b4f6606247a0..0f8a9801bbcb5 100644
+--- a/tests/data/test358
++++ b/tests/data/test358
+@@ -12,14 +12,14 @@ HTTP/2
+ # Server-side
+ <reply>
+ <data nocheck="yes">
+-HTTP/1.1 200 OK
+-Date: Tue, 09 Nov 2010 14:49:00 GMT
+-Content-Length: 6
+-Connection: close
+-Content-Type: text/html
+-Funny-head: yesyes
+-Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
+-
++HTTP/1.1 200 OK
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
++
+ -foo-
+ </data>
+ </reply>
+diff --git a/tests/data/test359 b/tests/data/test359
+index a5ba4e3ae0971..0e684e39e5aa5 100644
+--- a/tests/data/test359
++++ b/tests/data/test359
+@@ -12,14 +12,14 @@ HTTP/2
+ # Server-side
+ <reply>
+ <data nocheck="yes">
+-HTTP/1.1 200 OK
+-Date: Tue, 09 Nov 2010 14:49:00 GMT
+-Content-Length: 6
+-Connection: close
+-Content-Type: text/html
+-Funny-head: yesyes
+-Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
+-
++HTTP/1.1 200 OK
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0
++
+ -foo-
+ </data>
+ </reply>
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/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/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/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/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/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/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-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/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/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/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/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/patches/zlib-cc.patch b/gnu/packages/patches/zlib-cc.patch
new file mode 100644
index 0000000000..6b9666f5b4
--- /dev/null
+++ b/gnu/packages/patches/zlib-cc.patch
@@ -0,0 +1,21 @@
+Fix configure issue that discarded provided CC definition.
+
+Taken from upstream:
+
+ https://github.com/madler/zlib/commit/05796d3d8d5546cf1b4dfe2cd72ab746afae505d
+
+diff --git a/configure b/configure
+index 52ff4a04e..3fa3e8618 100755
+--- a/configure
++++ b/configure
+@@ -174,7 +174,10 @@ if test -z "$CC"; then
+ else
+ cc=${CROSS_PREFIX}cc
+ fi
++else
++ cc=${CC}
+ fi
++
+ cflags=${CFLAGS-"-O3"}
+ # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
+ case "$cc" in
diff --git a/gnu/packages/patches/zlib-correct-crc32-inputs.patch b/gnu/packages/patches/zlib-correct-crc32-inputs.patch
new file mode 100644
index 0000000000..8b09436e2b
--- /dev/null
+++ b/gnu/packages/patches/zlib-correct-crc32-inputs.patch
@@ -0,0 +1,44 @@
+Correct incorrect inputs provided to the CRC functions.
+
+Taken from upstream:
+
+ https://github.com/madler/zlib/commit/ec3df00224d4b396e2ac6586ab5d25f673caa4c2
+
+diff --git a/crc32.c b/crc32.c
+index a1bdce5c2..451887bc7 100644
+--- a/crc32.c
++++ b/crc32.c
+@@ -630,7 +630,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
+ #endif /* DYNAMIC_CRC_TABLE */
+
+ /* Pre-condition the CRC */
+- crc ^= 0xffffffff;
++ crc = (~crc) & 0xffffffff;
+
+ /* Compute the CRC up to a word boundary. */
+ while (len && ((z_size_t)buf & 7) != 0) {
+@@ -749,7 +749,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
+ #endif /* DYNAMIC_CRC_TABLE */
+
+ /* Pre-condition the CRC */
+- crc ^= 0xffffffff;
++ crc = (~crc) & 0xffffffff;
+
+ #ifdef W
+
+@@ -1077,7 +1077,7 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
+ #ifdef DYNAMIC_CRC_TABLE
+ once(&made, make_crc_table);
+ #endif /* DYNAMIC_CRC_TABLE */
+- return multmodp(x2nmodp(len2, 3), crc1) ^ crc2;
++ return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff);
+ }
+
+ /* ========================================================================= */
+@@ -1112,5 +1112,5 @@ uLong crc32_combine_op(crc1, crc2, op)
+ uLong crc2;
+ uLong op;
+ {
+- return multmodp(op, crc1) ^ crc2;
++ return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
+ }