summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch22
-rw-r--r--gnu/packages/patches/boost-fix-transitive-linking.patch16
-rw-r--r--gnu/packages/patches/dbus-CVE-2020-12049.patch58
-rw-r--r--gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch11
-rw-r--r--gnu/packages/patches/docbook-xsl-support-old-url.patch17
-rw-r--r--gnu/packages/patches/findutils-test-rwlock-threads.patch38
-rw-r--r--gnu/packages/patches/fontconfig-hurd-path-max.patch17
-rw-r--r--gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch21
-rw-r--r--gnu/packages/patches/ghostscript-CVE-2020-15900.patch36
-rw-r--r--gnu/packages/patches/glibc-bootstrap-system.patch38
-rw-r--r--gnu/packages/patches/glibc-dl-cache.patch140
-rw-r--r--gnu/packages/patches/guile-ssh-fix-test-suite.patch217
-rw-r--r--gnu/packages/patches/icu4c-CVE-2020-10531.patch127
-rw-r--r--gnu/packages/patches/inetutils-hurd.patch583
-rw-r--r--gnu/packages/patches/jsoncpp-fix-inverted-case.patch22
-rw-r--r--gnu/packages/patches/libtirpc-hurd-client.patch50
-rw-r--r--gnu/packages/patches/meson-for-build-rpath.patch24
-rw-r--r--gnu/packages/patches/nss-3.56-pkgconfig.patch187
-rw-r--r--gnu/packages/patches/nss-increase-test-timeout.patch4
-rw-r--r--gnu/packages/patches/perl-deterministic-ordering.patch29
-rw-r--r--gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch33
-rw-r--r--gnu/packages/patches/perl-no-sys-dirs.patch99
-rw-r--r--gnu/packages/patches/python-3-fix-tests.patch194
-rw-r--r--gnu/packages/patches/python-3-hurd-configure.patch27
-rw-r--r--gnu/packages/patches/python-3.8-fix-tests.patch42
-rw-r--r--gnu/packages/patches/python-babel-fix-parse-future-test.patch68
-rw-r--r--gnu/packages/patches/python-libxml2-python39-compat.patch94
-rw-r--r--gnu/packages/patches/python-pyflakes-fix-tests.patch40
-rw-r--r--gnu/packages/patches/python-typing-inspect-fix.patch38
-rw-r--r--gnu/packages/patches/rust-1.19-mrustc.patch28
-rw-r--r--gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch111
-rw-r--r--gnu/packages/patches/rust-1.30-gdb-llvm.patch89
-rw-r--r--gnu/packages/patches/rust-1.45-linker-locale.patch14
-rw-r--r--gnu/packages/patches/rust-1.48-linker-locale.patch14
-rw-r--r--gnu/packages/patches/rust-bootstrap-stage0-test.patch55
-rw-r--r--gnu/packages/patches/tcsh-fix-autotest.patch11
-rw-r--r--gnu/packages/patches/zziplib-CVE-2018-16548.patch49
37 files changed, 1033 insertions, 1630 deletions
diff --git a/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch b/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch
new file mode 100644
index 0000000000..56d404da15
--- /dev/null
+++ b/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch
@@ -0,0 +1,22 @@
+Patch borrowed from Arch Linux. Allows compiling bdb 5.3 and earlier with GCC newer than 7.
+
+--- src/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400
++++ src/dbinc/atomic.h.change 2013-03-12 14:06:35.000000000 -0400
+@@ -144,7 +144,7 @@
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __atomic_compare_exchange_db((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __atomic_compare_exchange_db(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
diff --git a/gnu/packages/patches/boost-fix-transitive-linking.patch b/gnu/packages/patches/boost-fix-transitive-linking.patch
new file mode 100644
index 0000000000..a42feab109
--- /dev/null
+++ b/gnu/packages/patches/boost-fix-transitive-linking.patch
@@ -0,0 +1,16 @@
+Patch from https://github.com/boostorg/boost_install/issues/47
+which should be included in the Boost 1.76 release.
+
+This patch prevents CMake from explicitly linking against Boost dependencies
+when building against the shared Boost libraries.
+--- a/tools/boost_install/boost-install.jam
++++ b/tools/boost_install/boost-install.jam
+@@ -483,7 +483,7 @@ rule generate-cmake-variant- ( target : sources * : properties * )
+
+ .info " deps3=" $(deps3) ;
+
+- if $(deps3)
++ if $(deps3) && $(link) = static
+ {
+ print.text
+
diff --git a/gnu/packages/patches/dbus-CVE-2020-12049.patch b/gnu/packages/patches/dbus-CVE-2020-12049.patch
deleted file mode 100644
index 71280144a1..0000000000
--- a/gnu/packages/patches/dbus-CVE-2020-12049.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Fix CVE-2020-12049:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12049
-https://lists.freedesktop.org/archives/ftp-release/2020-June/000753.html
-
-Taken from upstream:
-
-https://gitlab.freedesktop.org/dbus/dbus/-/commit/272d484283883fa9ff95b69d924fff6cd34842f5
-
-diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
---- a/dbus/dbus-sysdeps-unix.c
-+++ b/dbus/dbus-sysdeps-unix.c
-@@ -435,18 +435,6 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd,
- struct cmsghdr *cm;
- dbus_bool_t found = FALSE;
-
-- if (m.msg_flags & MSG_CTRUNC)
-- {
-- /* Hmm, apparently the control data was truncated. The bad
-- thing is that we might have completely lost a couple of fds
-- without chance to recover them. Hence let's treat this as a
-- serious error. */
--
-- errno = ENOSPC;
-- _dbus_string_set_length (buffer, start);
-- return -1;
-- }
--
- for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
- if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS)
- {
-@@ -501,6 +489,26 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd,
- if (!found)
- *n_fds = 0;
-
-+ if (m.msg_flags & MSG_CTRUNC)
-+ {
-+ unsigned int i;
-+
-+ /* Hmm, apparently the control data was truncated. The bad
-+ thing is that we might have completely lost a couple of fds
-+ without chance to recover them. Hence let's treat this as a
-+ serious error. */
-+
-+ /* We still need to close whatever fds we *did* receive,
-+ * otherwise they'll never get closed. (CVE-2020-12049) */
-+ for (i = 0; i < *n_fds; i++)
-+ close (fds[i]);
-+
-+ *n_fds = 0;
-+ errno = ENOSPC;
-+ _dbus_string_set_length (buffer, start);
-+ return -1;
-+ }
-+
- /* put length back (doesn't actually realloc) */
- _dbus_string_set_length (buffer, start + bytes_read);
-
diff --git a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
index 4199dd18a5..fed4b76429 100644
--- a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
+++ b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
@@ -5,7 +5,7 @@ https://bugzilla.samba.org/show_bug.cgi?id=9515
https://bugzilla.gnome.org/show_bug.cgi?id=736077 (for xsltproc)
Patch copied from Debian:
-https://anonscm.debian.org/cgit/collab-maint/docbook-xsl.git/tree/debian/patches/765567_non-recursive_string_subst.patch
+https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/765567_non-recursive_string_subst.patch
Description: use EXSLT "replace" function when available
A recursive implementation of string.subst is problematic,
@@ -15,11 +15,12 @@ Bug-Debian: https://bugs.debian.org/750593
--- a/lib/lib.xsl
+++ b/lib/lib.xsl
-@@ -10,7 +10,10 @@
+@@ -6,7 +6,11 @@
+
This module implements DTD-independent functions
- ******************************************************************** -->
--<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+- ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
++ ******************************************************************** -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:str="http://exslt.org/strings"
+ exclude-result-prefixes="str"
@@ -27,7 +28,7 @@ Bug-Debian: https://bugs.debian.org/750593
<xsl:template name="dot.count">
<!-- Returns the number of "." characters in a string -->
-@@ -56,6 +59,9 @@
+@@ -52,6 +56,9 @@
<xsl:param name="replacement"/>
<xsl:choose>
diff --git a/gnu/packages/patches/docbook-xsl-support-old-url.patch b/gnu/packages/patches/docbook-xsl-support-old-url.patch
new file mode 100644
index 0000000000..5b7dda458f
--- /dev/null
+++ b/gnu/packages/patches/docbook-xsl-support-old-url.patch
@@ -0,0 +1,17 @@
+Docbook 1.79.2 makes very few changes apart from changing the canonical URL
+to cdn.docbook.org. This patch adds support for the previous URL to avoid
+breaking packages that still use that.
+
+Adapted from Debian:
+https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/0005-catalog.xml-Compatibility-with-1.79.1-or-earlier.patch
+
+--- a/catalog.xml
++++ b/catalog.xml
+@@ -5,4 +5,7 @@
+ <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
+ <rewriteURI uriStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
+ <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
++ <!-- Also support old URI of v1.79.1 or earlier -->
++ <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
++ <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
+ </catalog>
diff --git a/gnu/packages/patches/findutils-test-rwlock-threads.patch b/gnu/packages/patches/findutils-test-rwlock-threads.patch
deleted file mode 100644
index 3062577c21..0000000000
--- a/gnu/packages/patches/findutils-test-rwlock-threads.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Skip "test-rwlock1" when multithreading is disabled, which is the case
-during bootstrapping on architectures not supported by GNU Mes.
-
-Taken from upstream gnulib:
-https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=fdff8bd09a7f053381f8bdb107ab5280b7c95959
-
-diff --git a/gnulib-tests/test-rwlock1.c b/gnulib-tests/test-rwlock1.c
---- a/gnulib-tests/test-rwlock1.c
-+++ b/gnulib-tests/test-rwlock1.c
-@@ -21,6 +21,8 @@
-
- #include <config.h>
-
-+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
-+
- #include "glthread/lock.h"
-
- #include <errno.h>
-@@ -151,3 +153,18 @@ main ()
- sleep (1);
- }
- }
-+
-+#else
-+
-+/* No multithreading available. */
-+
-+#include <stdio.h>
-+
-+int
-+main ()
-+{
-+ fputs ("Skipping test: multithreading not enabled\n", stderr);
-+ return 77;
-+}
-+
-+#endif
-
diff --git a/gnu/packages/patches/fontconfig-hurd-path-max.patch b/gnu/packages/patches/fontconfig-hurd-path-max.patch
deleted file mode 100644
index f804e6801f..0000000000
--- a/gnu/packages/patches/fontconfig-hurd-path-max.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Avoid usage of PATH_MAX.
-
-Taken from https://salsa.debian.org/freedesktop-team/fontconfig/-/blob/master/debian/patches/path_max.patch
-
-Index: fontconfig-2.13.1/src/fccfg.c
-===================================================================
---- fontconfig-2.13.1.orig/src/fccfg.c
-+++ fontconfig-2.13.1/src/fccfg.c
-@@ -2231,7 +2231,7 @@ FcConfigRealFilename (FcConfig *config,
-
- if (n)
- {
-- FcChar8 buf[PATH_MAX];
-+ FcChar8 buf[FC_PATH_MAX];
- ssize_t len;
-
- if (sysroot)
diff --git a/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch b/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
deleted file mode 100644
index 1358e30633..0000000000
--- a/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Do not override PYTHONPATH when calling Python code from the Haskell
-daemons. This is necessary because the Python library dependencies are
-only available through PYTHONPATH.
-
-diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs
---- a/src/Ganeti/Query/Exec.hs
-+++ b/src/Ganeti/Query/Exec.hs
-@@ -99,12 +99,10 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $
- do
- use_debug <- isDebugMode
- env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0")
-- . M.insert "PYTHONPATH" AC.pythondir
- . M.fromList)
- `liftM` getEnvironment
- execPy <- P.jqueueExecutorPy
- logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy
-- ++ " with PYTHONPATH=" ++ AC.pythondir
-
- (master, child) <- pipeClient connectConfig
- let (rh, wh) = clientToHandle child
-
diff --git a/gnu/packages/patches/ghostscript-CVE-2020-15900.patch b/gnu/packages/patches/ghostscript-CVE-2020-15900.patch
deleted file mode 100644
index b6658d7c7f..0000000000
--- a/gnu/packages/patches/ghostscript-CVE-2020-15900.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fix CVE-2020-15900.
-
-https://cve.circl.lu/cve/CVE-2020-15900
-https://artifex.com/security-advisories/CVE-2020-15900
-
-Taken from upstream:
-https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5d499272b95a6b890a1397e11d20937de000d31b
-
-diff --git a/psi/zstring.c b/psi/zstring.c
---- a/psi/zstring.c
-+++ b/psi/zstring.c
-@@ -142,13 +142,18 @@ search_impl(i_ctx_t *i_ctx_p, bool forward)
- return 0;
- found:
- op->tas.type_attrs = op1->tas.type_attrs;
-- op->value.bytes = ptr;
-- r_set_size(op, size);
-+ op->value.bytes = ptr; /* match */
-+ op->tas.rsize = size; /* match */
- push(2);
-- op[-1] = *op1;
-- r_set_size(op - 1, ptr - op[-1].value.bytes);
-- op1->value.bytes = ptr + size;
-- r_set_size(op1, count + (!forward ? (size - 1) : 0));
-+ op[-1] = *op1; /* pre */
-+ op[-3].value.bytes = ptr + size; /* post */
-+ if (forward) {
-+ op[-1].tas.rsize = ptr - op[-1].value.bytes; /* pre */
-+ op[-3].tas.rsize = count; /* post */
-+ } else {
-+ op[-1].tas.rsize = count; /* pre */
-+ op[-3].tas.rsize -= count + size; /* post */
-+ }
- make_true(op);
- return 0;
- }
diff --git a/gnu/packages/patches/glibc-bootstrap-system.patch b/gnu/packages/patches/glibc-bootstrap-system.patch
index 39eb47ef26..fcaf17132d 100644
--- a/gnu/packages/patches/glibc-bootstrap-system.patch
+++ b/gnu/packages/patches/glibc-bootstrap-system.patch
@@ -3,17 +3,10 @@ and popen(3) need to be tweaked to use the right shell. For the bootstrap
glibc, we just use whatever `sh' can be found in $PATH. The final glibc
instead uses the hard-coded absolute file name of `bash'.
---- a/sysdeps/posix/system.c
-+++ b/sysdeps/posix/system.c
-@@ -140,7 +140,7 @@ do_system (const char *line)
- __posix_spawnattr_setflags (&spawn_attr,
- POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK);
-
-- status = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr,
-+ status = posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr,
- (char *const[]){ (char*) SHELL_NAME,
- (char*) "-c",
- (char *) line, NULL },
+In addition, status should be initialized to 0 and not -1.
+
+diff --git a/libio/iopopen.c b/libio/iopopen.c
+index ebc381ed7c..e0d3ed1bc3 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -85,7 +85,7 @@ spawn_process (posix_spawn_file_actions_t *fa, FILE *fp, const char *command,
@@ -25,4 +18,25 @@ instead uses the hard-coded absolute file name of `bash'.
(char *const[]){ (char*) "sh", (char*) "-c",
(char *) command, NULL }, __environ) != 0)
return false;
-
+diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c
+index a03f478fc7..94da6facf3 100644
+--- a/sysdeps/posix/system.c
++++ b/sysdeps/posix/system.c
+@@ -101,7 +101,7 @@ cancel_handler (void *arg)
+ static int
+ do_system (const char *line)
+ {
+- int status = -1;
++ int status = 0;
+ int ret;
+ pid_t pid;
+ struct sigaction sa;
+@@ -145,7 +145,7 @@ do_system (const char *line)
+ __posix_spawnattr_setflags (&spawn_attr,
+ POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK);
+
+- ret = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr,
++ ret = posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr,
+ (char *const[]){ (char *) SHELL_NAME,
+ (char *) "-c",
+ (char *) line, NULL },
diff --git a/gnu/packages/patches/glibc-dl-cache.patch b/gnu/packages/patches/glibc-dl-cache.patch
new file mode 100644
index 0000000000..68c3a94846
--- /dev/null
+++ b/gnu/packages/patches/glibc-dl-cache.patch
@@ -0,0 +1,140 @@
+Read the shared library cache relative to $ORIGIN instead of reading
+from /etc/ld.so.cache. Also arrange so that this cache takes
+precedence over RUNPATH.
+
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index 93d185e788..e0760a1f40 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -171,6 +171,51 @@ _dl_cache_libcmp (const char *p1, const char *p2)
+ return *p1 - *p2;
+ }
+
++/* Special value representing the lack of an ld.so cache. */
++static const char ld_so_cache_lacking[] = "/ld.so cache is lacking";
++
++/* Return the per-application ld.so cache, relative to $ORIGIN, or NULL if
++ that fails for some reason. Do not return the system-wide LD_SO_CACHE
++ since on a foreign distro it would contain invalid information. */
++static const char *
++ld_so_cache (void)
++{
++ static const char *loader_cache;
++
++ if (loader_cache == NULL)
++ {
++ static const char store[] = @STORE_DIRECTORY@;
++ const char *origin = _dl_get_origin ();
++
++ /* Check whether ORIGIN is something like "/gnu/store/…-foo/bin". */
++ if (strncmp (store, origin, strlen (store)) == 0
++ && origin[sizeof store - 1] == '/')
++ {
++ char *store_item_end = strchr (origin + sizeof store, '/');
++
++ if (store_item_end != NULL)
++ {
++ static const char suffix[] = "/etc/ld.so.cache";
++ size_t store_item_len = store_item_end - origin;
++
++ /* Note: We can't use 'malloc' because it can be interposed.
++ Likewise, 'strncpy' is not available. */
++ char *cache = alloca (strlen (origin) + sizeof suffix);
++
++ strcpy (cache, origin);
++ strcpy (cache + store_item_len, suffix);
++
++ loader_cache = __strdup (cache) ?: ld_so_cache_lacking;
++ }
++ else
++ loader_cache = ld_so_cache_lacking;
++ }
++ else
++ loader_cache = ld_so_cache_lacking;
++ }
++
++ return loader_cache;
++}
+
+ /* Look up NAME in ld.so.cache and return the file name stored there, or null
+ if none is found. The cache is loaded if it was not already. If loading
+@@ -190,12 +235,15 @@ _dl_load_cache_lookup (const char *name)
+
+ /* Print a message if the loading of libs is traced. */
+ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+- _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
++ _dl_debug_printf (" search cache=%s\n", ld_so_cache ());
++
++ if (__glibc_unlikely (ld_so_cache () == ld_so_cache_lacking))
++ return NULL;
+
+ if (cache == NULL)
+ {
+ /* Read the contents of the file. */
+- void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize,
++ void *file = _dl_sysdep_read_whole_file (ld_so_cache (), &cachesize,
+ PROT_READ);
+
+ /* We can handle three different cache file formats here:
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index f3201e7c14..a69aec3428 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -2152,28 +2152,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+ loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
+ LA_SER_LIBPATH, &found_other_class);
+
+- /* Look at the RUNPATH information for this binary. */
+- if (fd == -1 && loader != NULL
+- && cache_rpath (loader, &loader->l_runpath_dirs,
+- DT_RUNPATH, "RUNPATH"))
+- fd = open_path (name, namelen, mode,
+- &loader->l_runpath_dirs, &realname, &fb, loader,
+- LA_SER_RUNPATH, &found_other_class);
+-
+- if (fd == -1)
+- {
+- realname = _dl_sysdep_open_object (name, namelen, &fd);
+- if (realname != NULL)
+- {
+- fd = open_verify (realname, fd,
+- &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded,
+- LA_SER_CONFIG, mode, &found_other_class,
+- false);
+- if (fd == -1)
+- free (realname);
+- }
+- }
+-
+ #ifdef USE_LDCONFIG
+ if (fd == -1
+ && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
+@@ -2232,6 +2210,28 @@ _dl_map_object (struct link_map *loader, const char *name,
+ }
+ #endif
+
++ /* Look at the RUNPATH information for this binary. */
++ if (fd == -1 && loader != NULL
++ && cache_rpath (loader, &loader->l_runpath_dirs,
++ DT_RUNPATH, "RUNPATH"))
++ fd = open_path (name, namelen, mode,
++ &loader->l_runpath_dirs, &realname, &fb, loader,
++ LA_SER_RUNPATH, &found_other_class);
++
++ if (fd == -1)
++ {
++ realname = _dl_sysdep_open_object (name, namelen, &fd);
++ if (realname != NULL)
++ {
++ fd = open_verify (realname, fd,
++ &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded,
++ LA_SER_CONFIG, mode, &found_other_class,
++ false);
++ if (fd == -1)
++ free (realname);
++ }
++ }
++
+ /* Finally, try the default path. */
+ if (fd == -1
+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
diff --git a/gnu/packages/patches/guile-ssh-fix-test-suite.patch b/gnu/packages/patches/guile-ssh-fix-test-suite.patch
new file mode 100644
index 0000000000..dc10e08b0f
--- /dev/null
+++ b/gnu/packages/patches/guile-ssh-fix-test-suite.patch
@@ -0,0 +1,217 @@
+From f7942cded8b65341916a555186e2219efe174cd0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Thu, 4 Feb 2021 14:38:25 -0500
+Subject: [PATCH] tests: Fix test suite for Guile 3.0.5.
+
+The test-runner object is now reset to #f when calling the 'test-end'
+procedure. See the commit de5d1a7f99b8e952b115237ebc29633062f99bb9 in
+Guile (srfi-64: Reset test-runner-current if done) which introduced this
+change.
+
+* tests/client-server.scm (exit-status): New variable. Use it when calling
+exit.
+* tests/dist.scm: Likewise.
+* tests/key.scm: Likewise.
+* tests/log.scm: Likewise.
+* tests/popen.scm: Likewise.
+* tests/server-client.scm: Likewise.
+* tests/server.scm: Likewise.
+* tests/session.scm: Likewise.
+* tests/shell.scm: Likewise.
+* tests/sssh-ssshd.scm: Likewise.
+* tests/tunnel.scm: Likewise.
+---
+ tests/client-server.scm | 4 +++-
+ tests/dist.scm | 4 +++-
+ tests/key.scm | 3 ++-
+ tests/log.scm | 5 ++++-
+ tests/popen.scm | 4 +++-
+ tests/server-client.scm | 4 +++-
+ tests/server.scm | 4 +++-
+ tests/session.scm | 4 +++-
+ tests/shell.scm | 3 ++-
+ tests/sssh-ssshd.scm | 4 +++-
+ tests/tunnel.scm | 4 +++-
+ 11 files changed, 32 insertions(+), 11 deletions(-)
+
+diff --git a/tests/client-server.scm b/tests/client-server.scm
+index 432a48c..fc46140 100644
+--- a/tests/client-server.scm
++++ b/tests/client-server.scm
+@@ -743,8 +743,10 @@
+
+ ;;;
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "client-server")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; client-server.scm ends here.
+diff --git a/tests/dist.scm b/tests/dist.scm
+index 2a3a75f..79f9e23 100644
+--- a/tests/dist.scm
++++ b/tests/dist.scm
+@@ -269,8 +269,10 @@ $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
+ ;;;
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "dist")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; dist.scm ends here.
+diff --git a/tests/key.scm b/tests/key.scm
+index be31378..e1678f4 100644
+--- a/tests/key.scm
++++ b/tests/key.scm
+@@ -170,9 +170,10 @@
+ (eq? (get-key-type key) 'ecdsa-p256)))))))
+
+ ;;;
++(define exit-status (test-runner-fail-count (test-runner-current)))
+
+ (test-end "key")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; key.scm ends here.
+diff --git a/tests/log.scm b/tests/log.scm
+index f547202..d528251 100644
+--- a/tests/log.scm
++++ b/tests/log.scm
+@@ -64,8 +64,11 @@
+ (get-log-verbosity))
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "log")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
++
+
+ ;;; log.scm ends here
+diff --git a/tests/popen.scm b/tests/popen.scm
+index e063e0b..fe77108 100644
+--- a/tests/popen.scm
++++ b/tests/popen.scm
+@@ -129,8 +129,10 @@
+ (format-log/scm 'nolog "open-remote-output-pipe" "channel: ~A" channel)
+ (output-only? channel)))))))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "popen")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; popen.scm ends here.
+diff --git a/tests/server-client.scm b/tests/server-client.scm
+index 920aa22..b6ed3eb 100644
+--- a/tests/server-client.scm
++++ b/tests/server-client.scm
+@@ -148,8 +148,10 @@
+ (equal? x session))))))
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "server-client")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; server-client.scm ends here.
+diff --git a/tests/server.scm b/tests/server.scm
+index c7f8b6c..1a6daea 100644
+--- a/tests/server.scm
++++ b/tests/server.scm
+@@ -157,9 +157,11 @@
+ (server-listen server)
+ #t))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "server")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; server.scm ends here.
+
+diff --git a/tests/session.scm b/tests/session.scm
+index 8caa039..7310647 100644
+--- a/tests/session.scm
++++ b/tests/session.scm
+@@ -210,8 +210,10 @@
+ (let ((session (%make-session)))
+ (not (connected? session))))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "session")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; session.scm ends here.
+diff --git a/tests/shell.scm b/tests/shell.scm
+index 7d613fb..e36e661 100644
+--- a/tests/shell.scm
++++ b/tests/shell.scm
+@@ -113,9 +113,10 @@
+
+
+ ;;;
++(define exit-status (test-runner-fail-count (test-runner-current)))
+
+ (test-end "shell")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; shell.scm ends here.
+diff --git a/tests/sssh-ssshd.scm b/tests/sssh-ssshd.scm
+index 2fe23db..edb53fc 100644
+--- a/tests/sssh-ssshd.scm
++++ b/tests/sssh-ssshd.scm
+@@ -118,8 +118,10 @@
+ result)))
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "sssh-ssshd")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; sssh-ssshd.scm ends here.
+diff --git a/tests/tunnel.scm b/tests/tunnel.scm
+index ef5a568..d6453b7 100644
+--- a/tests/tunnel.scm
++++ b/tests/tunnel.scm
+@@ -191,8 +191,10 @@
+ (= pnum portnum)))
+ (eq? (channel-cancel-forward session "localhost" portnum) 'ok))))))))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "tunnel")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; tunnel.scm ends here.
+--
+2.30.0
+
diff --git a/gnu/packages/patches/icu4c-CVE-2020-10531.patch b/gnu/packages/patches/icu4c-CVE-2020-10531.patch
deleted file mode 100644
index c2ab923bdc..0000000000
--- a/gnu/packages/patches/icu4c-CVE-2020-10531.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-Fix CVE-2020-10531:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10531
-
-Patch copied from upstream source repository (changes to the test suite
-are commented out):
-
-https://github.com/unicode-org/icu/commit/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
-
-From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
-From: Frank Tang <ftang@chromium.org>
-Date: Sat, 1 Feb 2020 02:39:04 +0000
-Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
-
-See #971
----
- icu4c/source/common/unistr.cpp | 6 ++-
- icu4c/source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
- icu4c/source/test/intltest/ustrtest.h | 1 +
- 3 files changed, 68 insertions(+), 1 deletion(-)
-
-diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
-index 901bb3358ba..077b4d6ef20 100644
---- a/icu4c/source/common/unistr.cpp
-+++ b/icu4c/source/common/unistr.cpp
-@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
- }
-
- int32_t oldLength = length();
-- int32_t newLength = oldLength + srcLength;
-+ int32_t newLength;
-+ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) {
-+ setToBogus();
-+ return *this;
-+ }
-
- // Check for append onto ourself
- const UChar* oldArray = getArrayStart();
-#diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp
-#index b6515ea813c..ad38bdf53a3 100644
-#--- a/icu4c/source/test/intltest/ustrtest.cpp
-#+++ b/icu4c/source/test/intltest/ustrtest.cpp
-#@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &
-# TESTCASE_AUTO(TestWCharPointers);
-# TESTCASE_AUTO(TestNullPointers);
-# TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
-#+ TESTCASE_AUTO(TestLargeAppend);
-# TESTCASE_AUTO_END;
-# }
-#
-#@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
-# str.insert(2, sub);
-# assertEquals("", u"abbcdcde", str);
-# }
-#+
-#+void UnicodeStringTest::TestLargeAppend() {
-#+ if(quick) return;
-#+
-#+ IcuTestErrorCode status(*this, "TestLargeAppend");
-#+ // Make a large UnicodeString
-#+ int32_t len = 0xAFFFFFF;
-#+ UnicodeString str;
-#+ char16_t *buf = str.getBuffer(len);
-#+ // A fast way to set buffer to valid Unicode.
-#+ // 4E4E is a valid unicode character
-#+ uprv_memset(buf, 0x4e, len * 2);
-#+ str.releaseBuffer(len);
-#+ UnicodeString dest;
-#+ // Append it 16 times
-#+ // 0xAFFFFFF times 16 is 0xA4FFFFF1,
-#+ // which is greater than INT32_MAX, which is 0x7FFFFFFF.
-#+ int64_t total = 0;
-#+ for (int32_t i = 0; i < 16; i++) {
-#+ dest.append(str);
-#+ total += len;
-#+ if (total <= INT32_MAX) {
-#+ assertFalse("dest is not bogus", dest.isBogus());
-#+ } else {
-#+ assertTrue("dest should be bogus", dest.isBogus());
-#+ }
-#+ }
-#+ dest.remove();
-#+ total = 0;
-#+ for (int32_t i = 0; i < 16; i++) {
-#+ dest.append(str);
-#+ total += len;
-#+ if (total + len <= INT32_MAX) {
-#+ assertFalse("dest is not bogus", dest.isBogus());
-#+ } else if (total <= INT32_MAX) {
-#+ // Check that a string of exactly the maximum size works
-#+ UnicodeString str2;
-#+ int32_t remain = INT32_MAX - total;
-#+ char16_t *buf2 = str2.getBuffer(remain);
-#+ if (buf2 == nullptr) {
-#+ // if somehow memory allocation fail, return the test
-#+ return;
-#+ }
-#+ uprv_memset(buf2, 0x4e, remain * 2);
-#+ str2.releaseBuffer(remain);
-#+ dest.append(str2);
-#+ total += remain;
-#+ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total);
-#+ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length());
-#+ assertFalse("dest is not bogus", dest.isBogus());
-#+
-#+ // Check that a string size+1 goes bogus
-#+ str2.truncate(1);
-#+ dest.append(str2);
-#+ total++;
-#+ assertTrue("dest should be bogus", dest.isBogus());
-#+ } else {
-#+ assertTrue("dest should be bogus", dest.isBogus());
-#+ }
-#+ }
-#+}
-#diff --git a/icu4c/source/test/intltest/ustrtest.h b/icu4c/source/test/intltest/ustrtest.h
-#index 218befdcc68..4a356a92c7a 100644
-#--- a/icu4c/source/test/intltest/ustrtest.h
-#+++ b/icu4c/source/test/intltest/ustrtest.h
-#@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest {
-# void TestWCharPointers();
-# void TestNullPointers();
-# void TestUnicodeStringInsertAppendToSelf();
-#+ void TestLargeAppend();
-# };
-#
-# #endif
diff --git a/gnu/packages/patches/inetutils-hurd.patch b/gnu/packages/patches/inetutils-hurd.patch
deleted file mode 100644
index bd65c4feb1..0000000000
--- a/gnu/packages/patches/inetutils-hurd.patch
+++ /dev/null
@@ -1,583 +0,0 @@
-Support compiling on the Hurd.
-
-Taken from https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/0002-ifconfig-Improve-the-support-for-GNU-Hurd.patch
-
-From 9a90d9b9119906df23cb2db1503cb0f099942dd9 Mon Sep 17 00:00:00 2001
-From: Mats Erik Andersson <gnu@gisladisker.se>
-Date: Sat, 18 Jul 2015 01:12:41 +0200
-Subject: [PATCH 02/35] ifconfig: Improve the support for GNU/Hurd.
-
-Use system specific code instead of generic code.
-This provides abilities similar to other systems.
----
- ChangeLog | 17 +++
- ifconfig/system.c | 10 +-
- ifconfig/system.h | 2 +
- ifconfig/system/Makefile.am | 4 +-
- ifconfig/system/generic.c | 14 +-
- ifconfig/system/hurd.c | 292 ++++++++++++++++++++++++++++++++++++
- ifconfig/system/hurd.h | 50 ++++++
- 7 files changed, 381 insertions(+), 8 deletions(-)
- create mode 100644 ifconfig/system/hurd.c
- create mode 100644 ifconfig/system/hurd.h
-
-diff --git a/ifconfig/system.c b/ifconfig/system.c
-index 30677e41..e108dc2e 100644
---- a/ifconfig/system.c
-+++ b/ifconfig/system.c
-@@ -25,10 +25,12 @@
- # include "system/solaris.c"
- #elif defined __QNX__
- # include "system/qnx.c"
--# elif defined __DragonFly__ || defined __FreeBSD__ || \
-- defined __FreeBSD_kernel__ || \
-- defined __NetBSD__ || defined __OpenBSD__
--# include "system/bsd.c"
-+#elif defined __DragonFly__ || defined __FreeBSD__ || \
-+ defined __FreeBSD_kernel__ || \
-+ defined __NetBSD__ || defined __OpenBSD__
-+# include "system/bsd.c"
-+#elif defined __GNU__
-+# include "system/hurd.c"
- #else
- # include "system/generic.c"
- #endif
-diff --git a/ifconfig/system.h b/ifconfig/system.h
-index 8521ad95..66878d3a 100644
---- a/ifconfig/system.h
-+++ b/ifconfig/system.h
-@@ -97,6 +97,8 @@ extern struct if_nameindex* (*system_if_nameindex) (void);
- defined __FreeBSD_kernel__ || \
- defined __NetBSD__ || defined __OpenBSD__
- # include "system/bsd.h"
-+# elif defined __GNU__
-+# include "system/hurd.h"
- # else
- # include "system/generic.h"
- # endif
-diff --git a/ifconfig/system/Makefile.am b/ifconfig/system/Makefile.am
-index 954c6774..62a9f1c4 100644
---- a/ifconfig/system/Makefile.am
-+++ b/ifconfig/system/Makefile.am
-@@ -26,8 +26,10 @@ noinst_HEADERS = \
- linux.h \
- solaris.h \
- qnx.h \
-+ hurd.h \
- bsd.c \
- generic.c \
- linux.c \
- solaris.c \
-- qnx.c
-+ qnx.c \
-+ hurd.c
-diff --git a/ifconfig/system/generic.c b/ifconfig/system/generic.c
-index 9a2bda55..20a78bde 100644
---- a/ifconfig/system/generic.c
-+++ b/ifconfig/system/generic.c
-@@ -22,6 +22,8 @@
- #include <config.h>
-
- #include "../ifconfig.h"
-+
-+#include <unused-parameter.h>
-
-
- /* Output format stuff. */
-@@ -36,19 +38,25 @@ const char *system_help;
- struct argp_child system_argp_child;
-
- int
--system_parse_opt (struct ifconfig **ifp, char option, char *optarg)
-+system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER,
-+ char option _GL_UNUSED_PARAMETER,
-+ char *optarg _GL_UNUSED_PARAMETER)
- {
- return 0;
- }
-
- int
--system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[])
-+system_parse_opt_rest (struct ifconfig **ifp _GL_UNUSED_PARAMETER,
-+ int argc _GL_UNUSED_PARAMETER,
-+ char *argv[] _GL_UNUSED_PARAMETER)
- {
- return 0;
- }
-
- int
--system_configure (int sfd, struct ifreq *ifr, struct system_ifconfig *ifs)
-+system_configure (int sfd _GL_UNUSED_PARAMETER,
-+ struct ifreq *ifr _GL_UNUSED_PARAMETER,
-+ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER)
- {
- return 0;
- }
-diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
-new file mode 100644
-index 00000000..3bd19775
---- /dev/null
-+++ b/ifconfig/system/hurd.c
-@@ -0,0 +1,292 @@
-+/* hurd.c -- Code for ifconfig specific to GNU/Hurd.
-+ Copyright (C) 2015 Free Software Foundation, Inc.
-+
-+ This file is part of GNU Inetutils.
-+
-+ GNU Inetutils is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or (at
-+ your option) any later version.
-+
-+ GNU Inetutils is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see `http://www.gnu.org/licenses/'. */
-+
-+/* Mostly written by Marcus Brinkmann.
-+ Adaptions to GNU/Hurd by Mats Erik Andersson. */
-+
-+#include <config.h>
-+
-+#include <stdlib.h>
-+#include <sys/ioctl.h>
-+#include <net/if_arp.h>
-+#include "../ifconfig.h"
-+
-+#include <unused-parameter.h>
-+
-+
-+/* Output format stuff. */
-+
-+const char *system_default_format = "gnu";
-+
-+
-+/* Argument parsing stuff. */
-+
-+const char *system_help = "NAME [ADDR]\
-+ [broadcast BRDADDR] [netmask MASK]\
-+ [mtu N] [up|down] [FLAGS]";
-+
-+struct argp_child system_argp_child;
-+
-+int
-+system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER,
-+ char option _GL_UNUSED_PARAMETER,
-+ char *optarg _GL_UNUSED_PARAMETER)
-+{
-+ return 0;
-+}
-+
-+int
-+system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[])
-+{
-+ int i = 0, mask, rev;
-+ enum {
-+ EXPECT_NOTHING,
-+ EXPECT_AF,
-+ EXPECT_BROADCAST,
-+ EXPECT_NETMASK,
-+ EXPECT_METRIC,
-+ EXPECT_MTU
-+ } expect = EXPECT_AF;
-+
-+ *ifp = parse_opt_new_ifs (argv[0]);
-+
-+ while (++i < argc)
-+ {
-+ switch (expect)
-+ {
-+ case EXPECT_BROADCAST:
-+ parse_opt_set_brdaddr (*ifp, argv[i]);
-+ break;
-+
-+ case EXPECT_NETMASK:
-+ parse_opt_set_netmask (*ifp, argv[i]);
-+ break;
-+
-+ case EXPECT_MTU:
-+ parse_opt_set_mtu (*ifp, argv[i]);
-+ break;
-+
-+ /* XXX: 2015-07-18, GNU/Hurd does not yet support
-+ ioctl(SIOCSIFMETRIC), but we let the code
-+ handle this standard ability anyway!
-+ */
-+ case EXPECT_METRIC:
-+ parse_opt_set_metric (*ifp, argv[i]);
-+ break;
-+
-+ case EXPECT_AF:
-+ expect = EXPECT_NOTHING;
-+ if (!strcmp (argv[i], "inet"))
-+ continue;
-+ else if (!strcmp (argv[i], "inet6"))
-+ {
-+ error (0, 0, "%s is not a supported address family", argv[i]);
-+ return 0;
-+ }
-+ break;
-+
-+ case EXPECT_NOTHING:
-+ break;
-+ }
-+
-+ if (expect != EXPECT_NOTHING)
-+ expect = EXPECT_NOTHING;
-+ else if (!strcmp (argv[i], "broadcast"))
-+ expect = EXPECT_BROADCAST;
-+ else if (!strcmp (argv[i], "netmask"))
-+ expect = EXPECT_NETMASK;
-+ else if (!strcmp (argv[i], "metric"))
-+ expect = EXPECT_METRIC;
-+ else if (!strcmp (argv[i], "mtu"))
-+ expect = EXPECT_MTU;
-+ else if (!strcmp (argv[i], "up"))
-+ parse_opt_set_flag (*ifp, IFF_UP | IFF_RUNNING, 0);
-+ else if (!strcmp (argv[i], "down"))
-+ parse_opt_set_flag (*ifp, IFF_UP, 1);
-+ else if (((mask = if_nameztoflag (argv[i], &rev))
-+ & ~IU_IFF_CANTCHANGE) != 0)
-+ parse_opt_set_flag (*ifp, mask, rev);
-+ else
-+ {
-+ if (!((*ifp)->valid & IF_VALID_ADDR))
-+ parse_opt_set_address (*ifp, argv[i]);
-+ else if (!((*ifp)->valid & IF_VALID_DSTADDR))
-+ parse_opt_set_dstaddr (*ifp, argv[i]);
-+ }
-+ }
-+
-+ switch (expect)
-+ {
-+ case EXPECT_BROADCAST:
-+ error (0, 0, "option `broadcast' requires an argument");
-+ break;
-+
-+ case EXPECT_NETMASK:
-+ error (0, 0, "option `netmask' requires an argument");
-+ break;
-+
-+ case EXPECT_METRIC:
-+ error (0, 0, "option `metric' requires an argument");
-+ break;
-+
-+ case EXPECT_MTU:
-+ error (0, 0, "option `mtu' requires an argument");
-+ break;
-+
-+ case EXPECT_AF:
-+ case EXPECT_NOTHING:
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+int
-+system_configure (int sfd _GL_UNUSED_PARAMETER,
-+ struct ifreq *ifr _GL_UNUSED_PARAMETER,
-+ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER)
-+{
-+ return 0;
-+}
-+
-+struct if_nameindex* (*system_if_nameindex) (void) = if_nameindex;
-+
-+static void
-+print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER,
-+ unsigned char *data)
-+{
-+ *column += printf ("%02X:%02X:%02X:%02X:%02X:%02X",
-+ data[0], data[1], data[2], data[3], data[4], data[5]);
-+ had_output = 1;
-+}
-+
-+struct arphrd_symbol
-+{
-+ const char *name;
-+ const char *title;
-+ int value;
-+ void (*print_hwaddr) (format_data_t form, unsigned char *data);
-+} arphrd_symbols[] =
-+ {
-+#ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */
-+ { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether},
-+#endif
-+#ifdef ARPHRD_LOOPBACK /* Loopback device. */
-+ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL},
-+#endif
-+ /* XXX: The image debian-hurd-20150424 returns the value 4
-+ instead of expected ARPHRD_LOOPBACK. This has been
-+ discussed in the list debian-hurd, where I was asked
-+ to resist the temptation of a work around!
-+ */
-+ { NULL, NULL, 0, NULL}
-+ };
-+
-+struct arphrd_symbol *
-+arphrd_findvalue (int value)
-+{
-+ struct arphrd_symbol *arp = arphrd_symbols;
-+ while (arp->name != NULL)
-+ {
-+ if (arp->value == value)
-+ break;
-+ arp++;
-+ }
-+ if (arp->name)
-+ return arp;
-+ else
-+ return NULL;
-+}
-+
-+void
-+system_fh_hwaddr_query (format_data_t form, int argc, char *argv[])
-+{
-+#ifdef SIOCGIFHWADDR
-+ struct arphrd_symbol *arp;
-+
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0)
-+ select_arg (form, argc, argv, 1);
-+
-+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family);
-+ select_arg (form, argc, argv, (arp && arp->print_hwaddr) ? 0 : 1);
-+#else
-+ select_arg (form, argc, argv, 1);
-+#endif
-+}
-+
-+void
-+system_fh_hwaddr (format_data_t form, int argc _GL_UNUSED_PARAMETER,
-+ char *argv[] _GL_UNUSED_PARAMETER)
-+{
-+#ifdef SIOCGIFHWADDR
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0)
-+ error (EXIT_FAILURE, errno,
-+ "SIOCGIFHWADDR failed for interface `%s'",
-+ form->ifr->ifr_name);
-+ else
-+ {
-+ struct arphrd_symbol *arp;
-+
-+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family);
-+ if (arp && arp->print_hwaddr)
-+ arp->print_hwaddr (form,
-+ (unsigned char *) form->ifr->ifr_hwaddr.sa_data);
-+ else
-+ put_string (form, "(hwaddr unknown)");
-+ }
-+#else
-+ *column += printf ("(not available)");
-+ had_output = 1;
-+#endif
-+}
-+
-+void
-+system_fh_hwtype_query (format_data_t form, int argc, char *argv[])
-+{
-+#ifdef SIOCGIFHWADDR
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) >= 0)
-+ select_arg (form, argc, argv, 0);
-+ else
-+#endif
-+ select_arg (form, argc, argv, 1);
-+}
-+
-+void
-+system_fh_hwtype (format_data_t form, int argc _GL_UNUSED_PARAMETER,
-+ char *argv[] _GL_UNUSED_PARAMETER)
-+{
-+#ifdef SIOCGIFHWADDR
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0)
-+ error (EXIT_FAILURE, errno,
-+ "SIOCGIFHWADDR failed for interface `%s'",
-+ form->ifr->ifr_name);
-+ else
-+ {
-+ struct arphrd_symbol *arp;
-+
-+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family);
-+ if (arp)
-+ put_string (form, arp->title);
-+ else
-+ put_string (form, "(hwtype unknown)");
-+ }
-+#else
-+ *column += printf ("(not available)");
-+ had_output = 1;
-+#endif
-+}
-diff --git a/ifconfig/system/hurd.h b/ifconfig/system/hurd.h
-new file mode 100644
-index 00000000..bab14565
---- /dev/null
-+++ b/ifconfig/system/hurd.h
-@@ -0,0 +1,50 @@
-+/*
-+ Copyright (C) 2015 Free Software Foundation, Inc.
-+
-+ This file is part of GNU Inetutils.
-+
-+ GNU Inetutils is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or (at
-+ your option) any later version.
-+
-+ GNU Inetutils is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see `http://www.gnu.org/licenses/'. */
-+
-+/* Written by Mats Erik Andersson. */
-+
-+#ifndef IFCONFIG_SYSTEM_HURD_H
-+# define IFCONFIG_SYSTEM_HURD_H
-+
-+# include "../printif.h"
-+# include "../options.h"
-+
-+
-+/* Option support. */
-+
-+struct system_ifconfig
-+{
-+ int valid;
-+};
-+
-+
-+/* Output format support. */
-+
-+# define SYSTEM_FORMAT_HANDLER \
-+ { "hurd", fh_nothing}, \
-+ { "hwaddr?", system_fh_hwaddr_query}, \
-+ { "hwaddr", system_fh_hwaddr}, \
-+ { "hwtype?", system_fh_hwtype_query}, \
-+ { "hwtype", system_fh_hwtype},
-+
-+void system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]);
-+void system_fh_hwaddr (format_data_t form, int argc, char *argv[]);
-+void system_fh_hwtype_query (format_data_t form, int argc, char *argv[]);
-+void system_fh_hwtype (format_data_t form, int argc, char *argv[]);
-+
-+#endif /* !IFCONFIG_SYSTEM_HURD_H */
---
-2.23.0.rc1.170.gbd704faa3e
-
-From 589dab9c7d3119da82837dabae34c8a3d16cbe49 Mon Sep 17 00:00:00 2001
-From: Mats Erik Andersson <gnu@gisladisker.se>
-Date: Thu, 30 Jul 2015 01:06:42 +0200
-Subject: [PATCH 07/35] ifconfig: Hardware detection in GNU/Hurd.
-
-A work-around needed to distinguish hardware type.
----
- ChangeLog | 10 ++++++++++
- ifconfig/system/hurd.c | 19 ++++++++++++-------
- 2 files changed, 22 insertions(+), 7 deletions(-)
-
-diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
-index 3bd19775..b6261a00 100644
---- a/ifconfig/system/hurd.c
-+++ b/ifconfig/system/hurd.c
-@@ -175,6 +175,16 @@ print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER,
- had_output = 1;
- }
-
-+/* GNU/Hurd and Mach are using a mixture of BSD definitions
-+ * and GNU/Linux interface headers, which in this situation
-+ * means that sa_family_t is an unsigned char, from BSD, while
-+ * all ARPHRD_* come from GNU/Linux and are thus 16 bits wide.
-+ * We must account for this. The following bitmask will
-+ * adapt to any future change!
-+ */
-+
-+#define _ARP_MASK ((sizeof (sa_family_t) == 1) ? 0xff : 0xffff)
-+
- struct arphrd_symbol
- {
- const char *name;
-@@ -184,16 +194,11 @@ struct arphrd_symbol
- } arphrd_symbols[] =
- {
- #ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */
-- { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether},
-+ { "ETHER", "Ethernet", ARPHRD_ETHER & _ARP_MASK, print_hwaddr_ether},
- #endif
- #ifdef ARPHRD_LOOPBACK /* Loopback device. */
-- { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL},
-+ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK & _ARP_MASK, NULL},
- #endif
-- /* XXX: The image debian-hurd-20150424 returns the value 4
-- instead of expected ARPHRD_LOOPBACK. This has been
-- discussed in the list debian-hurd, where I was asked
-- to resist the temptation of a work around!
-- */
- { NULL, NULL, 0, NULL}
- };
-
---
-2.23.0.rc1.170.gbd704faa3e
-
-From d379784b4461d17b2536effd1b52bae21cd28a32 Mon Sep 17 00:00:00 2001
-From: Guillem Jover <guillem@hadrons.org>
-Date: Fri, 16 Aug 2019 00:34:03 +0200
-Subject: [PATCH 35/35] telnet: Several ioctls have been disabled in the Hurd's
- glibc
-
-But not the related option macros. inetutils uses those macros to decide
-whether the ioctls are available, so it is FTBFS now. The Hurd's glibc
-is being fixed, but we'll use this for now to get the builds going.
----
- telnet/sys_bsd.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c
-index 662536ab..5eb35cb5 100644
---- a/telnet/sys_bsd.c
-+++ b/telnet/sys_bsd.c
-@@ -63,6 +63,7 @@
- #include <errno.h>
- #include <arpa/telnet.h>
- #include <sys/select.h>
-+#include <sys/ioctl.h>
- #include <unused-parameter.h>
-
- #include "ring.h"
-@@ -157,7 +158,7 @@ TerminalRead (char *buf, int n)
- int
- TerminalAutoFlush (void)
- {
--#if defined LNOFLSH
-+#if defined TIOCLGET && defined LNOFLSH
- int flush;
-
- ioctl (0, TIOCLGET, (char *) &flush);
-@@ -260,7 +261,9 @@ TerminalSaveState (void)
- ioctl (0, TIOCGETP, (char *) &ottyb);
- ioctl (0, TIOCGETC, (char *) &otc);
- ioctl (0, TIOCGLTC, (char *) &oltc);
-+#ifdef TIOCLGET
- ioctl (0, TIOCLGET, (char *) &olmode);
-+#endif
-
- ntc = otc;
- nltc = oltc;
-@@ -755,7 +758,9 @@ TerminalNewMode (register int f)
- #endif
- }
- #ifndef USE_TERMIO
-+#ifdef TIOCLSET
- ioctl (tin, TIOCLSET, (char *) &lmode);
-+#endif
- ioctl (tin, TIOCSLTC, (char *) &ltc);
- ioctl (tin, TIOCSETC, (char *) &tc);
- ioctl (tin, TIOCSETN, (char *) &sb);
---
-2.23.0.rc1.170.gbd704faa3e
-
diff --git a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch b/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
deleted file mode 100644
index e4897de1b8..0000000000
--- a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This patch fixes a bug and related test failure on platforms where 'char'
-is unsigned.
-
-Taken from upstream:
-https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb
-
-diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
-index 8e06cca2..56195dc1 100644
---- a/src/lib_json/json_writer.cpp
-+++ b/src/lib_json/json_writer.cpp
-@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
-
- char const* const end = s + n;
- for (char const* cur = s; cur < end; ++cur) {
-- if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
-- static_cast<unsigned char>(*cur) < 0x80)
-+ if (*cur == '\\' || *cur == '\"' ||
-+ static_cast<unsigned char>(*cur) < ' ' ||
-+ static_cast<unsigned char>(*cur) >= 0x80)
- return true;
- }
- return false;
diff --git a/gnu/packages/patches/libtirpc-hurd-client.patch b/gnu/packages/patches/libtirpc-hurd-client.patch
deleted file mode 100644
index 526ad262d2..0000000000
--- a/gnu/packages/patches/libtirpc-hurd-client.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Taken from https://salsa.debian.org/debian/libtirpc/-/raw/master/debian/patches/06-hurd-client-port.diff
-
-Description: Fix client code for hurd, avoiding malloc overflow
- When trying to setup a inet connection, it happens the following:
- - in libtirp, src/clnt_vc.c, clnt_vc_create gets called
- - when trying to allocate vc_fd_locks, __rpc_dtbsize() is used as size
- for that array of fd locks
- - __rpc_dtbsize(), in src/rpc_generic.c, queries using rlimit the
- maximum (rlim_max) number of file descriptors (RLIMIT_NOFILE):
- - on Linux, the default is { rlim_cur = 1024, rlim_max = 4096 }
- - on kFreeBSD, the default is { rlim_cur = 1024, rlim_max = 1024 }
- - on Hurd, the default is { rlim_cur = 1024, rlim_max = RLIM_INFINITY }
- meaning that on Hurd the memory allocation fails (as
- __rpc_dtbsize() * sizeof(int) overflows and is negative)
-
- Change libtiprc so __rpc_dtbsize falls back on rlim_cur if rlim_max
- is unlimited.
-
- This patch fixes the client connection using inet sockets; local unix
- sockets are not working, for two reasons so far:
- - getpeername on them gives EOPNOTSUPP
- - SO_REUSEADDR is not implemented for them
-Author: Pino Toscano <pino@debian.org>
-
-Bug-Debian: http://bugs.debian.org/739674
-Forwarded: no
-Reviewed-By: Petter Reinholdtsen
-Last-Update: 2014-03-03
-
---- a/src/rpc_generic.c
-+++ b/src/rpc_generic.c
-@@ -107,12 +107,17 @@
- {
- static int tbsize;
- struct rlimit rl;
-+ rlim_t lim;
-
- if (tbsize) {
- return (tbsize);
- }
- if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
-- return (tbsize = (int)rl.rlim_max);
-+ lim = rl.rlim_max;
-+ if (lim == RLIM_INFINITY) {
-+ lim = rl.rlim_cur;
-+ }
-+ return (tbsize = (int)lim);
- }
- /*
- * Something wrong. I'll try to save face by returning a
diff --git a/gnu/packages/patches/meson-for-build-rpath.patch b/gnu/packages/patches/meson-for-build-rpath.patch
deleted file mode 100644
index ef9a73f07c..0000000000
--- a/gnu/packages/patches/meson-for-build-rpath.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-This patch removes a part of meson that clears the rpath upon installation.
-This will only be applied to a special version of meson, used for the
-meson-build-system.
-
-Original patch for Meson 0.42.0 by Peter Mikkelsen <petermikkelsen10@gmail.com>
-
---- meson-0.47.1/mesonbuild/minstall.py.old 2018-08-10 11:01:27.812327013 +0200
-+++ meson-0.47.1/mesonbuild/minstall.py 2018-08-10 11:01:51.940368505 +0200
-@@ -436,15 +436,6 @@
- print("Symlink creation does not work on this platform. "
- "Skipping all symlinking.")
- printed_symlink_error = True
-- if os.path.isfile(outname):
-- try:
-- depfixer.fix_rpath(outname, install_rpath, final_path,
-- install_name_mappings, verbose=False)
-- except SystemExit as e:
-- if isinstance(e.code, int) and e.code == 0:
-- pass
-- else:
-- raise
-
- def run(args):
- parser = buildparser()
diff --git a/gnu/packages/patches/nss-3.56-pkgconfig.patch b/gnu/packages/patches/nss-3.56-pkgconfig.patch
index 91b6aef604..df3f474aec 100644
--- a/gnu/packages/patches/nss-3.56-pkgconfig.patch
+++ b/gnu/packages/patches/nss-3.56-pkgconfig.patch
@@ -1,25 +1,79 @@
-Description: Create nss.pc and nss-config
-Author: Lars Wendler <polynomial-c@gentoo.org>
-Source: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/nss/files/nss-3.17.1-gentoo-fixups.patch
+From 1b3c48499abb000d708abe5f05413c1f4155e086 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Mon, 8 Jun 2020 12:22:29 -0500
+Subject: [PATCH] Add pkg-config and nss-config for Gentoo
-Modifications:
- Change libdir from ${prefix}/lib64 to ${prefix}/lib/nss.
- Remove optional patching in nss/Makefile.
- Include -L$libdir in output from "nss-config --libs".
+Modifications to use with Guix and the latest NSS source checkout code: use
+'install' instead of 'ln -sf' and adapt the relative file names.
-Later adapted to apply cleanly to nss-3.53.
+---
+ Makefile | 15 +----
+ config/Makefile | 40 ++++++++++++
+ config/nss-config.in | 145 +++++++++++++++++++++++++++++++++++++++++++
+ config/nss.pc.in | 12 ++++
+ manifest.mn | 2 +-
+ 5 files changed, 200 insertions(+), 14 deletions(-)
+ create mode 100644 config/Makefile
+ create mode 100644 config/nss-config.in
+ create mode 100644 config/nss.pc.in
---- nss-3.21/nss/config/Makefile
-+++ nss-3.21/nss/config/Makefile
+diff --git a/Makefile b/Makefile
+index eb4ed1a..f979d90 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,6 +4,8 @@
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
++default: nss_build_all
++
+ #######################################################################
+ # (1) Include initial platform-independent assignments (MANDATORY). #
+ #######################################################################
+@@ -48,12 +50,9 @@ include $(CORE_DEPTH)/coreconf/rules.mk
+ #######################################################################
+
+ nss_build_all:
+- $(MAKE) build_nspr
+ $(MAKE) all
+- $(MAKE) latest
+
+ nss_clean_all:
+- $(MAKE) clobber_nspr
+ $(MAKE) clobber
+
+ NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status
+@@ -138,16 +137,6 @@ $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
+ --prefix='$(NSS_GYP_PREFIX)'
+ endif
+
+-build_nspr: $(NSPR_CONFIG_STATUS)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests
+-
+-install_nspr: build_nspr
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install
+-
+-clobber_nspr: $(NSPR_CONFIG_STATUS)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
+-
+ build_docs:
+ $(MAKE) -C $(CORE_DEPTH)/doc
+
+diff --git a/config/Makefile b/config/Makefile
+new file mode 100644
+index 0000000..aaf1991
+--- /dev/null
++++ b/config/Makefile
@@ -0,0 +1,40 @@
+CORE_DEPTH = ..
+DEPTH = ..
+
+include $(CORE_DEPTH)/coreconf/config.mk
+
-+NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
-+NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
-+NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_MAJOR_VERSION = $(shell grep -F "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}')
++NSS_MINOR_VERSION = $(shell grep -F "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}')
++NSS_PATCH_VERSION = $(shell grep -F "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}')
+PREFIX = /usr
+
+all: export libs
@@ -29,14 +83,14 @@ Later adapted to apply cleanly to nss-3.53.
+ mkdir -p $(DIST)/lib/pkgconfig
+ sed -e "s,@prefix@,$(PREFIX)," \
+ -e "s,@exec_prefix@,\$${prefix}," \
-+ -e "s,@libdir@,\$${prefix}/lib/nss," \
++ -e "s,@libdir@,\$${prefix}/lib64," \
+ -e "s,@includedir@,\$${prefix}/include/nss," \
+ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
+ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
+ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+ nss.pc.in > nss.pc
+ chmod 0644 nss.pc
-+ cp nss.pc $(DIST)/lib/pkgconfig
++ install nss.pc $(DIST)/lib/pkgconfig
+
+ # Create the nss-config script
+ mkdir -p $(DIST)/bin
@@ -46,14 +100,17 @@ Later adapted to apply cleanly to nss-3.53.
+ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+ nss-config.in > nss-config
+ chmod 0755 nss-config
-+ cp nss-config $(DIST)/bin
++ install nss-config $(DIST)/bin
+
+libs:
+
+dummy: all export libs
+
---- nss-3.21/nss/config/nss-config.in
-+++ nss-3.21/nss/config/nss-config.in
+diff --git a/config/nss-config.in b/config/nss-config.in
+new file mode 100644
+index 0000000..3a957b8
+--- /dev/null
++++ b/config/nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
@@ -95,31 +152,31 @@ Later adapted to apply cleanly to nss-3.53.
+
+while test $# -gt 0; do
+ case "$1" in
-+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++ -*=*) optarg=$(echo "$1" | sed 's/[-_a-zA-Z0-9]*=//') ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
-+ prefix=$optarg
++ prefix=${optarg}
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
-+ exec_prefix=$optarg
++ exec_prefix=${optarg}
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
-+ includedir=$optarg
++ includedir=${optarg}
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
-+ libdir=$optarg
++ libdir=${optarg}
+ ;;
+ --libdir)
+ echo_libdir=yes
@@ -153,55 +210,58 @@ Later adapted to apply cleanly to nss-3.53.
+done
+
+# Set variables that may be dependent upon other variables
-+if test -z "$exec_prefix"; then
-+ exec_prefix=`pkg-config --variable=exec_prefix nss`
++if test -z "${exec_prefix}"; then
++ exec_prefix=$(pkg-config --variable=exec_prefix nss)
+fi
-+if test -z "$includedir"; then
-+ includedir=`pkg-config --variable=includedir nss`
++if test -z "${includedir}"; then
++ includedir=$(pkg-config --variable=includedir nss)
+fi
-+if test -z "$libdir"; then
-+ libdir=`pkg-config --variable=libdir nss`
++if test -z "${libdir}"; then
++ libdir=$(pkg-config --variable=libdir nss)
+fi
+
-+if test "$echo_prefix" = "yes"; then
-+ echo $prefix
++if test "${echo_prefix}" = "yes"; then
++ echo ${prefix}
+fi
+
-+if test "$echo_exec_prefix" = "yes"; then
-+ echo $exec_prefix
++if test "${echo_exec_prefix}" = "yes"; then
++ echo ${exec_prefix}
+fi
+
-+if test "$echo_includedir" = "yes"; then
-+ echo $includedir
++if test "${echo_includedir}" = "yes"; then
++ echo ${includedir}
+fi
+
-+if test "$echo_libdir" = "yes"; then
-+ echo $libdir
++if test "${echo_libdir}" = "yes"; then
++ echo ${libdir}
+fi
+
-+if test "$echo_cflags" = "yes"; then
-+ echo -I$includedir
++if test "${echo_cflags}" = "yes"; then
++ echo -I${includedir}
+fi
+
-+if test "$echo_libs" = "yes"; then
-+ libdirs=-L$libdir
-+ if test -n "$lib_ssl"; then
-+ libdirs="$libdirs -lssl${major_version}"
++if test "${echo_libs}" = "yes"; then
++ libdirs=""
++ if test -n "${lib_ssl}"; then
++ libdirs="${libdirs} -lssl${major_version}"
+ fi
-+ if test -n "$lib_smime"; then
-+ libdirs="$libdirs -lsmime${major_version}"
++ if test -n "${lib_smime}"; then
++ libdirs="${libdirs} -lsmime${major_version}"
+ fi
-+ if test -n "$lib_nss"; then
-+ libdirs="$libdirs -lnss${major_version}"
++ if test -n "${lib_nss}"; then
++ libdirs="${libdirs} -lnss${major_version}"
+ fi
-+ if test -n "$lib_nssutil"; then
-+ libdirs="$libdirs -lnssutil${major_version}"
++ if test -n "${lib_nssutil}"; then
++ libdirs="${libdirs} -lnssutil${major_version}"
+ fi
-+ echo $libdirs
++ echo ${libdirs}
+fi
+
---- nss-3.21/nss/config/nss.pc.in
-+++ nss-3.21/nss/config/nss.pc.in
+diff --git a/config/nss.pc.in b/config/nss.pc.in
+new file mode 100644
+index 0000000..03f1e39
+--- /dev/null
++++ b/config/nss.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -211,18 +271,23 @@ Later adapted to apply cleanly to nss-3.53.
+Name: NSS
+Description: Network Security Services
+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
-+Requires: nspr >= 4.8
-+Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
++Requires: nspr >= 4.25
++Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
+Cflags: -I${includedir}
+
---- nss-3.21/nss/manifest.mn
-+++ nss-3.21/nss/manifest.mn
-@@ -10,7 +10,7 @@
-
+diff --git a/manifest.mn b/manifest.mn
+index dada8ab..72dc9b3 100644
+--- a/manifest.mn
++++ b/manifest.mn
+@@ -10,7 +10,7 @@ IMPORTS = nspr20/v4.8 \
+
RELEASE = nss
-
+
-DIRS = coreconf lib cmd cpputil gtests
-+DIRS = coreconf lib cmd cpputil gtests config
-
++DIRS = coreconf lib cmd cpputil config
+
lib: coreconf
cmd: lib
+--
+2.26.2
+
diff --git a/gnu/packages/patches/nss-increase-test-timeout.patch b/gnu/packages/patches/nss-increase-test-timeout.patch
index 55117c02e9..1f6dd42bd7 100644
--- a/gnu/packages/patches/nss-increase-test-timeout.patch
+++ b/gnu/packages/patches/nss-increase-test-timeout.patch
@@ -3,8 +3,8 @@ machine. Even a busy x86_64 machine can use more than 5s on some tests.
Increase timeouts to increase chances of a successful build.
---- a/nss/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:47:30.855813629 +0100
-+++ b/nss/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:48:49.042335273 +0100
+--- a/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:47:30.855813629 +0100
++++ b/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:48:49.042335273 +0100
@@ -245,7 +245,7 @@
ASSERT_TRUE_WAIT((client_->state() != TlsAgent::STATE_CONNECTING) &&
diff --git a/gnu/packages/patches/perl-deterministic-ordering.patch b/gnu/packages/patches/perl-deterministic-ordering.patch
deleted file mode 100644
index be63d5cde3..0000000000
--- a/gnu/packages/patches/perl-deterministic-ordering.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From <https://bugs.debian.org/801523>.
-
-From c01f602d1926b0671fd2c8d91f7e52c4e4c9fb24 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sun, 11 Oct 2015 19:27:56 +0300
-Subject: [PATCH] Sort the list of XS code files when generating RealPPPort.xs
-
-all_files_in_dir() uses readdir() ordering to make the list of
-input files. This can vary between build systems, breaking build
-reproducibility.
----
- cpan/Devel-PPPort/PPPort_xs.PL | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dist/Devel-PPPort/PPPort_xs.PL b/dist/Devel-PPPort/PPPort_xs.PL
-index 5f18940..149f2fe 100644
---- a/dist/Devel-PPPort/PPPort_xs.PL
-+++ b/dist/Devel-PPPort/PPPort_xs.PL
-@@ -38,7 +38,7 @@ END
- my $file;
- my $sec;
-
--for $file (all_files_in_dir('parts/inc')) {
-+for $file (sort(all_files_in_dir('parts/inc'))) {
- my $spec = parse_partspec($file);
-
- my $msg = 0;
---
-2.5.1
diff --git a/gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch b/gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch
deleted file mode 100644
index f2166aebfd..0000000000
--- a/gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Work around a problem arising from the update to OpenSSL 1.0.2f, based on the
-following upstream commit:
-
- https://github.com/noxxi/p5-io-socket-ssl/commit/6e23ee4a433f83f1065bd2467255eba5ee9b1ddd
-
-Attempting to update to IO-Socket-SSL-2.023, which includes this commit,
-caused other test failures. See:
-
- https://lists.gnu.org/archive/html/guix-devel/2016-01/msg01032.html
-
-Description from the upstream commit:
-
- OpenSSL 1.0.2f changed the behavior of SSL shutdown in case the TLS connection
- was not fully established (commit: f73c737c7ac908c5d6407c419769123392a3b0a9).
- This somehow resulted in Net::SSLeay::shutdown returning 0 (i.e. keep trying)
- which caused an endless loop. It will now ignore this result in case the TLS
- connection was not yet established and consider the TLS connection closed
- instead.
-
---- IO-Socket-SSL-2.002/lib/IO/Socket/SSL.pm.orig 2014-10-21 16:51:16.000000000 -0400
-+++ IO-Socket-SSL-2.002/lib/IO/Socket/SSL.pm 2016-01-31 15:07:14.971099894 -0500
-@@ -1213,6 +1213,11 @@
- # shutdown complete
- last;
- }
-+ if ((${*$self}{'_SSL_opened'}||0) <= 0) {
-+ # not really open, thus don't expect shutdown to return
-+ # something meaningful
-+ last;
-+ }
-
- # initiate or complete shutdown
- local $SIG{PIPE} = 'IGNORE';
diff --git a/gnu/packages/patches/perl-no-sys-dirs.patch b/gnu/packages/patches/perl-no-sys-dirs.patch
index 2269d715c7..14d634cac9 100644
--- a/gnu/packages/patches/perl-no-sys-dirs.patch
+++ b/gnu/packages/patches/perl-no-sys-dirs.patch
@@ -6,7 +6,7 @@ Patch adapted from Nixpkgs, originally by Eelco Dolstra
diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
--- perl-5.20.0-orig/Configure 2014-05-26 15:34:18.000000000 +0200
+++ perl-5.20.0/Configure 2014-06-25 10:43:35.368285986 +0200
-@@ -106,15 +106,7 @@
+@@ -108,15 +108,7 @@
fi
: Proper PATH setting
@@ -23,8 +23,8 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
for p in $paths
do
-@@ -1337,8 +1329,7 @@
- archname=''
+@@ -1435,8 +1427,7 @@
+ i_whoami=''
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
@@ -33,8 +33,8 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
:
: no include file wanted by default
inclwanted=''
-@@ -1349,17 +1340,12 @@
-
+@@ -1450,17 +1441,12 @@
+ archobjs=''
libnames=''
: change the next line if compiling for Xenix/286 on Xenix/386
-xlibpth='/usr/lib/386 /lib/386'
@@ -54,8 +54,8 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
-@@ -1391,8 +1377,6 @@
- libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
+@@ -1495,8 +1481,6 @@
+ libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
-glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -63,7 +63,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
: Do not use vfork unless overridden by a hint file.
usevfork=false
-@@ -2446,7 +2430,6 @@
+@@ -2553,7 +2537,6 @@
zip
"
pth=`echo $PATH | sed -e "s/$p_/ /g"`
@@ -71,7 +71,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
for file in $loclist; do
eval xxx=\$$file
case "$xxx" in
-@@ -4936,7 +4919,7 @@
+@@ -5049,7 +5033,7 @@
: Set private lib path
case "$plibpth" in
'') if ./mips; then
@@ -80,7 +80,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
fi;;
esac
case "$libpth" in
-@@ -8600,13 +8583,8 @@
+@@ -8877,13 +8861,8 @@
echo " "
case "$sysman" in
'')
@@ -96,7 +96,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
;;
esac
if $test -d "$sysman"; then
-@@ -19900,9 +19878,10 @@
+@@ -21027,9 +21006,10 @@
case "$full_ar" in
'') full_ar=$ar ;;
esac
@@ -169,7 +169,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/freebsd.sh perl-5.20.0/hints/
diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/linux.sh
--- perl-5.20.0-orig/hints/linux.sh 2014-05-26 15:34:20.000000000 +0200
+++ perl-5.20.0/hints/linux.sh 2014-06-25 10:33:47.354883843 +0200
-@@ -150,25 +150,6 @@
+@@ -150,28 +150,6 @@
;;
esac
@@ -188,6 +188,9 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/li
-# plibpth to bypass this check.
-if [ -x /usr/bin/gcc ] ; then
- gcc=/usr/bin/gcc
+-# clang also provides -print-search-dirs
+-elif ${cc:-cc} --version 2>/dev/null | grep -q '^clang ' ; then
+- gcc=${cc:-cc}
-else
- gcc=gcc
-fi
@@ -195,7 +198,40 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/li
case "$plibpth" in
'') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
-@@ -367,33 +322,6 @@
+@@ -208,32 +186,6 @@
+ ;;
+ esac
+
+-case "$libc" in
+-'')
+-# If you have glibc, then report the version for ./myconfig bug reporting.
+-# (Configure doesn't need to know the specific version since it just uses
+-# gcc to load the library for all tests.)
+-# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
+-# are insufficiently precise to distinguish things like
+-# libc-2.0.6 and libc-2.0.7.
+- for p in $plibpth
+- do
+- for trylib in libc.so.6 libc.so
+- do
+- if $test -e $p/$trylib; then
+- libc=`ls -l $p/$trylib | awk '{print $NF}'`
+- if $test "X$libc" != X; then
+- break
+- fi
+- fi
+- done
+- if $test "X$libc" != X; then
+- break
+- fi
+- done
+- ;;
+-esac
+-
+ if ${sh:-/bin/sh} -c exit; then
+ echo ''
+ echo 'You appear to have a working bash. Good.'
+@@ -311,33 +263,6 @@
;;
esac
@@ -229,40 +265,3 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/li
# Linux on Synology.
if [ -f /etc/synoinfo.conf -a -d /usr/syno ]; then
# Tested on Synology DS213 and DS413
-diff --git a/hints/linux.sh b/hints/linux.sh
-index 3f38ea0..97aed11 100644
---- a/hints/linux.sh
-+++ b/hints/linux.sh
-@@ -195,32 +195,6 @@ case "$usequadmath" in
- ;;
- esac
-
--case "$libc" in
--'')
--# If you have glibc, then report the version for ./myconfig bug reporting.
--# (Configure doesn't need to know the specific version since it just uses
--# gcc to load the library for all tests.)
--# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
--# are insufficiently precise to distinguish things like
--# libc-2.0.6 and libc-2.0.7.
-- for p in $plibpth
-- do
-- for trylib in libc.so.6 libc.so
-- do
-- if $test -e $p/$trylib; then
-- libc=`ls -l $p/$trylib | awk '{print $NF}'`
-- if $test "X$libc" != X; then
-- break
-- fi
-- fi
-- done
-- if $test "X$libc" != X; then
-- break
-- fi
-- done
-- ;;
--esac
--
- if ${sh:-/bin/sh} -c exit; then
- echo ''
- echo 'You appear to have a working bash. Good.'
diff --git a/gnu/packages/patches/python-3-fix-tests.patch b/gnu/packages/patches/python-3-fix-tests.patch
index e13790bd41..b44e743c71 100644
--- a/gnu/packages/patches/python-3-fix-tests.patch
+++ b/gnu/packages/patches/python-3-fix-tests.patch
@@ -1,10 +1,39 @@
-See the discussion about the issues fixed here at:
-http://bugs.python.org/issue20868 .
+From f0698133e7d6c353a3e6ae0fc62e57ba558a9bc0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Wed, 28 Oct 2020 22:55:05 -0400
+Subject: [PATCH] Skip problematic Python 3 tests in Guix.
+
+A subset of the hunks in this patch is tracked upstream at
+https://bugs.python.org/issue38845, which was contributed by Tanguy Le
+Carrour <tanguy@bioneland.org>.
+---
+ Lib/ctypes/test/test_callbacks.py | 3 +++
+ Lib/ctypes/test/test_find.py | 1 +
+ Lib/ctypes/test/test_libc.py | 3 +++
+ Lib/distutils/tests/test_archive_util.py | 2 ++
+ Lib/distutils/tests/test_sdist.py | 1 +
+ Lib/test/_test_multiprocessing.py | 2 ++
+ Lib/test/test_asyncio/test_base_events.py | 2 ++
+ Lib/test/test_generators.py | 1 +
+ Lib/test/test_pathlib.py | 3 +--
+ Lib/test/test_pdb.py | 4 ++--
+ Lib/test/test_regrtest.py | 2 ++
+ Lib/test/test_resource.py | 1 +
+ Lib/test/test_shutil.py | 2 ++
+ Lib/test/test_signal.py | 4 ++++
+ Lib/test/test_socket.py | 8 ++++++++
+ Lib/test/test_spwd.py | 6 ++----
+ Lib/test/test_tarfile.py | 9 ++++++---
+ Lib/test/test_threading.py | 3 +++
+ Lib/test/test_unicodedata.py | 1 +
+ Tools/scripts/run_tests.py | 2 +-
+ 20 files changed, 48 insertions(+), 12 deletions(-)
diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py
+index d8e9c5a760..94fc5929c9 100644
--- a/Lib/ctypes/test/test_callbacks.py
+++ b/Lib/ctypes/test/test_callbacks.py
-@@ -3,6 +3,7 @@ import unittest
+@@ -5,6 +5,7 @@ from test import support
from ctypes import *
from ctypes.test import need_symbol
import _ctypes_test
@@ -12,7 +41,7 @@ diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.
class Callbacks(unittest.TestCase):
functype = CFUNCTYPE
-@@ -176,6 +177,8 @@ class SampleCallbacksTestCase(unittest.TestCase):
+@@ -178,6 +179,8 @@ class SampleCallbacksTestCase(unittest.TestCase):
self.assertLess(diff, 0.01, "%s not less than 0.01" % diff)
@@ -21,7 +50,20 @@ diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.
def test_issue_8959_a(self):
from ctypes.util import find_library
libc_path = find_library("c")
+diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
+index 92ac1840ad..c8eb75dedd 100644
+--- a/Lib/ctypes/test/test_find.py
++++ b/Lib/ctypes/test/test_find.py
+@@ -116,6 +116,7 @@ class FindLibraryLinux(unittest.TestCase):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None):
+ self.assertNotEqual(find_library('c'), None)
+
++ @unittest.skipIf(True, "ldconfig is not used on Guix")
+ def test_find_library_with_ld(self):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \
+ unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None):
diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py
+index 56285b5ff8..c088ab3db8 100644
--- a/Lib/ctypes/test/test_libc.py
+++ b/Lib/ctypes/test/test_libc.py
@@ -2,6 +2,7 @@ import unittest
@@ -42,6 +84,7 @@ diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py
comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char))
lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc
diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
+index e9aad0e40f..8bbaa51ee5 100644
--- a/Lib/distutils/tests/test_archive_util.py
+++ b/Lib/distutils/tests/test_archive_util.py
@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
@@ -61,6 +104,7 @@ diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test
tmpdir = self._create_files()
base_name = os.path.join(self.mkdtemp(), 'archive')
diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py
+index 23db126959..6e2329df7d 100644
--- a/Lib/distutils/tests/test_sdist.py
+++ b/Lib/distutils/tests/test_sdist.py
@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase):
@@ -72,9 +116,10 @@ diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.
# now building a sdist
dist, cmd = self.get_cmd()
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
+index e47905c863..31a5a9c308 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
-@@ -1473,6 +1473,7 @@ class _TestCondition(BaseTestCase):
+@@ -1577,6 +1577,7 @@ class _TestCondition(BaseTestCase):
if pid is not None:
os.kill(pid, signal.SIGINT)
@@ -82,10 +127,19 @@ diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.
def test_wait_result(self):
if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
pid = os.getpid()
+@@ -3905,6 +3906,7 @@ class _TestSharedMemory(BaseTestCase):
+ sms.close()
+
+ @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
+ # bpo-36368: protect SharedMemoryManager server process from
+ # KeyboardInterrupt signals.
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
+index 533d5cc7f5..c4f860cc3b 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
-@@ -1323,6 +1323,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
+@@ -1341,6 +1341,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self._test_create_connection_ip_addr(m_socket, False)
@patch_socket
@@ -95,9 +149,10 @@ diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/t
m_socket.getaddrinfo = socket.getaddrinfo
sock = m_socket.socket.return_value
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
+index 3bf1522808..04bac8a7db 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
-@@ -34,6 +34,7 @@ class SignalAndYieldFromTest(unittest.TestCase):
+@@ -33,6 +33,7 @@ class SignalAndYieldFromTest(unittest.TestCase):
else:
return "FAILED"
@@ -105,30 +160,11 @@ diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
def test_raise_and_yield_from(self):
gen = self.generator1()
gen.send(None)
-diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
---- a/Lib/test/test_normalization.py
-+++ b/Lib/test/test_normalization.py
-@@ -2,6 +2,7 @@ from test.support import open_urlresource
- import unittest
-
- from http.client import HTTPException
-+from urllib.error import URLError
- import sys
- from unicodedata import normalize, unidata_version
-
-@@ -43,6 +44,8 @@ class NormalizationTest(unittest.TestCase):
- except PermissionError:
- self.skipTest(f"Permission error when downloading {TESTDATAURL} "
- f"into the test data directory")
-+ except URLError:
-+ self.skipTest("DNS lookups are not enabled.")
- except (OSError, HTTPException):
- self.fail(f"Could not retrieve {TESTDATAURL}")
-
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
+index 3da35710b9..5404f9193d 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
-@@ -2134,8 +2134,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
+@@ -2408,8 +2408,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
self.assertEqual(given, expect)
self.assertEqual(set(p.rglob("FILEd*")), set())
@@ -139,9 +175,10 @@ diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
P = self.cls
support.import_module('pwd')
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
+index 8016f81e5a..10190486b4 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
-@@ -1150,11 +1150,11 @@ def test_pdb_issue_20766():
+@@ -1219,11 +1219,11 @@ def test_pdb_issue_20766():
> <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
-> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
(Pdb) continue
@@ -156,9 +193,10 @@ diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
+index a77638b10a..2069b349a8 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
-@@ -762,6 +762,7 @@ class ArgsTestCase(BaseTestCase):
+@@ -811,6 +811,7 @@ class ArgsTestCase(BaseTestCase):
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
@@ -166,7 +204,7 @@ diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
def test_interrupted(self):
code = TEST_INTERRUPTED
test = self.create_test('sigint', code=code)
-@@ -779,6 +780,7 @@ class ArgsTestCase(BaseTestCase):
+@@ -828,6 +829,7 @@ class ArgsTestCase(BaseTestCase):
% (self.TESTNAME_REGEX, len(tests)))
self.check_line(output, regex)
@@ -175,9 +213,10 @@ diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
# Issue #25373: test --slowest with an interrupted test
code = TEST_INTERRUPTED
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
+index e5ece5284c..5299e54507 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
-@@ -145,6 +145,7 @@ class ResourceTest(unittest.TestCase):
+@@ -148,6 +148,7 @@ class ResourceTest(unittest.TestCase):
@unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
@support.requires_linux_version(2, 6, 36)
@@ -186,37 +225,75 @@ diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
self.assertRaises(TypeError, resource.prlimit)
self.assertRaises(ProcessLookupError, resource.prlimit,
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
+index e19af64be0..1b893df6fa 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
-@@ -1143,6 +1143,7 @@ class TestShutil(unittest.TestCase):
+@@ -1427,6 +1427,7 @@ class TestArchives(BaseTest, unittest.TestCase):
+ base_name = os.path.join(tmpdir, 'archive')
self.assertRaises(ValueError, make_archive, base_name, 'xxx')
- @support.requires_zlib
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
++ @unittest.skipIf(True, "The Guix build container has no root user")
+ @support.requires_zlib()
def test_make_archive_owner_group(self):
# testing make_archive with owner and group, with various combinations
- # this works even if there's not gid/uid support
-@@ -1171,6 +1172,7 @@ class TestShutil(unittest.TestCase):
+@@ -1455,6 +1456,7 @@ class TestArchives(BaseTest, unittest.TestCase):
+ self.assertTrue(os.path.isfile(res))
- @support.requires_zlib
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
++ @unittest.skipIf(True, "The Guix build container has no root user")
+ @support.requires_zlib()
@unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
def test_tarfile_root_owner(self):
- root_dir, base_dir = self._create_files()
+diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
+index 45553a6a42..55623f01a3 100644
+--- a/Lib/test/test_signal.py
++++ b/Lib/test/test_signal.py
+@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
+ self.assertLess(len(s), signal.NSIG)
+
+ @unittest.skipUnless(sys.executable, "sys.executable required.")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_keyboard_interrupt_exit_code(self):
+ """KeyboardInterrupt triggers exit via SIGINT."""
+ process = subprocess.run(
+@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
+ signal.signal(7, handler)
+
+ @unittest.skipUnless(sys.executable, "sys.executable required.")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_keyboard_interrupt_exit_code(self):
+ """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
+ # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
+@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
+
+ class RaiseSignalTest(unittest.TestCase):
+
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_sigint(self):
+ with self.assertRaises(KeyboardInterrupt):
+ signal.raise_signal(signal.SIGINT)
+@@ -1275,6 +1278,7 @@ class RaiseSignalTest(unittest.TestCase):
+
+ class PidfdSignalTest(unittest.TestCase):
+
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ @unittest.skipUnless(
+ hasattr(signal, "pidfd_send_signal"),
+ "pidfd support not built in",
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+index aefba4f397..6c89f558d5 100755
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
-@@ -875,6 +875,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1009,6 +1009,8 @@ class GeneralModuleTests(unittest.TestCase):
if not fqhn in all_host_names:
self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))
+ @unittest.skipUnless(support.is_resource_enabled('network'),
+ 'network is not enabled')
def test_host_resolution(self):
- for addr in [support.HOSTv4, '10.0.0.1', '255.255.255.255']:
+ for addr in [socket_helper.HOSTv4, '10.0.0.1', '255.255.255.255']:
self.assertEqual(socket.gethostbyname(addr), addr)
-@@ -1004,6 +1006,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1140,6 +1142,8 @@ class GeneralModuleTests(unittest.TestCase):
self.assertWarns(DeprecationWarning, socket.ntohs, k)
self.assertWarns(DeprecationWarning, socket.htons, k)
@@ -225,7 +302,7 @@ diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
def testGetServBy(self):
eq = self.assertEqual
# Find one service that exists, then check all the related interfaces.
-@@ -1358,6 +1362,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1489,6 +1493,8 @@ class GeneralModuleTests(unittest.TestCase):
raise
self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
@@ -234,7 +311,7 @@ diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
def testGetaddrinfo(self):
try:
socket.getaddrinfo('localhost', 80)
-@@ -1440,6 +1446,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1571,6 +1577,8 @@ class GeneralModuleTests(unittest.TestCase):
# only IP addresses are allowed
self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0)
@@ -244,6 +321,7 @@ diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
'network is not enabled')
def test_idna(self):
diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
+index 07793c84c8..fec672bcbe 100644
--- a/Lib/test/test_spwd.py
+++ b/Lib/test/test_spwd.py
@@ -5,8 +5,7 @@ from test import support
@@ -267,9 +345,10 @@ diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
def test_getspnam_exception(self):
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
+index 29cde91bf7..8d0f20e8bf 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
-@@ -2509,9 +2509,12 @@ def root_is_uid_gid_0():
+@@ -2607,9 +2607,12 @@ def root_is_uid_gid_0():
import pwd, grp
except ImportError:
return False
@@ -286,9 +365,10 @@ diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
return True
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
+index c21cdf8eb7..6c9d575032 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
-@@ -1249,6 +1249,7 @@ class MiscTestCase(unittest.TestCase):
+@@ -1398,6 +1398,7 @@ class MiscTestCase(unittest.TestCase):
class InterruptMainTests(unittest.TestCase):
@@ -296,7 +376,7 @@ diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
def test_interrupt_main_subthread(self):
# Calling start_new_thread with a function that executes interrupt_main
# should raise KeyboardInterrupt upon completion.
-@@ -1260,6 +1261,8 @@ class InterruptMainTests(unittest.TestCase):
+@@ -1409,6 +1410,8 @@ class InterruptMainTests(unittest.TestCase):
t.join()
t.join()
@@ -305,10 +385,23 @@ diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
def test_interrupt_main_mainthread(self):
# Make sure that if interrupt_main is called in main thread that
# KeyboardInterrupt is raised instantly.
+diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
+index b552d2bd17..28b1144e15 100644
+--- a/Lib/test/test_unicodedata.py
++++ b/Lib/test/test_unicodedata.py
+@@ -309,6 +309,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
+ self.assertEqual(len(lines), 1,
+ r"\u%.4x should not be a linebreak" % i)
+
++@requires_resource('network')
+ class NormalizationTest(unittest.TestCase):
+ @staticmethod
+ def check_version(testfile):
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
+index bcfa5e943b..1f2484971b 100644
--- a/Tools/scripts/run_tests.py
+++ b/Tools/scripts/run_tests.py
-@@ -39,7 +39,7 @@ def main(regrtest_args):
+@@ -41,7 +41,7 @@ def main(regrtest_args):
if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
args.extend(['-j', '0']) # Use all CPU cores
if not any(is_resource_use_flag(arg) for arg in regrtest_args):
@@ -317,3 +410,6 @@ diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
args.extend(regrtest_args)
print(' '.join(args))
if sys.platform == 'win32':
+--
+2.29.2
+
diff --git a/gnu/packages/patches/python-3-hurd-configure.patch b/gnu/packages/patches/python-3-hurd-configure.patch
new file mode 100644
index 0000000000..aa25a401c5
--- /dev/null
+++ b/gnu/packages/patches/python-3-hurd-configure.patch
@@ -0,0 +1,27 @@
+Upstream status: Not upstreamed.
+
+The build system refuses to cross-compile for unknown targets
+even though it works fine. Add GNU/Hurd target.
+
+--- Python-3.8.5/configure.orig 2020-10-26 14:06:09.665423525 +0100
++++ Python-3.8.5/configure 2020-10-26 14:08:30.987765738 +0100
+@@ -3278,6 +3278,9 @@
+ *-*-vxworks*)
+ ac_sys_system=VxWorks
+ ;;
++ *-*-gnu)
++ ac_sys_system=GNU
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+@@ -3328,6 +3331,9 @@
+ *-*-vxworks*)
+ _host_cpu=$host_cpu
+ ;;
++ *-*-gnu)
++ _host_cpu=$host_cpu
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch
deleted file mode 100644
index 4fbdd444c7..0000000000
--- a/gnu/packages/patches/python-3.8-fix-tests.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
-index 1474624..887f8ee 100644
---- a/Lib/test/_test_multiprocessing.py
-+++ b/Lib/test/_test_multiprocessing.py
-@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase):
- sms.close()
-
- @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
- # bpo-36368: protect SharedMemoryManager server process from
- # KeyboardInterrupt signals.
-diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
-index d41e94b..a1c15e7 100644
---- a/Lib/test/test_signal.py
-+++ b/Lib/test/test_signal.py
-@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
- self.assertLess(len(s), signal.NSIG)
-
- @unittest.skipUnless(sys.executable, "sys.executable required.")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_keyboard_interrupt_exit_code(self):
- """KeyboardInterrupt triggers exit via SIGINT."""
- process = subprocess.run(
-@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
- signal.signal(7, handler)
-
- @unittest.skipUnless(sys.executable, "sys.executable required.")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_keyboard_interrupt_exit_code(self):
- """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
- # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
-@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
-
- class RaiseSignalTest(unittest.TestCase):
-
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_sigint(self):
- with self.assertRaises(KeyboardInterrupt):
- signal.raise_signal(signal.SIGINT)
---
-2.23.0
diff --git a/gnu/packages/patches/python-babel-fix-parse-future-test.patch b/gnu/packages/patches/python-babel-fix-parse-future-test.patch
new file mode 100644
index 0000000000..8a90166ec5
--- /dev/null
+++ b/gnu/packages/patches/python-babel-fix-parse-future-test.patch
@@ -0,0 +1,68 @@
+From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001
+From: Felix Schwarz <felix.schwarz@oss.schwarz.eu>
+Date: Tue, 5 May 2020 08:05:56 +0000
+Subject: [PATCH] fix tests when using Python 3.9a6
+
+In Python 3.9a6 integer values for future flags were changed to prevent
+collision with compiler flags. We need to retrieve these at runtime so
+the test suite works with Python <= 3.8 as well as Python 3.9.
+---
+ tests/test_util.py | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/tests/test_util.py b/tests/test_util.py
+index a6a4450c..b9343aaa 100644
+--- a/tests/test_util.py
++++ b/tests/test_util.py
+@@ -11,6 +11,7 @@
+ # individuals. For the exact contribution history, see the revision
+ # history and logs, available at http://babel.edgewall.org/log/.
+
++import __future__
+ import unittest
+
+ import pytest
+@@ -20,6 +21,12 @@
+ from babel.util import parse_future_flags
+
+
++class _FF:
++ division = __future__.division.compiler_flag
++ print_function = __future__.print_function.compiler_flag
++ with_statement = __future__.with_statement.compiler_flag
++ unicode_literals = __future__.unicode_literals.compiler_flag
++
+ def test_distinct():
+ assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4]
+ assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r']
+@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii():
+ from __future__ import print_function,
+ division, with_statement,
+ unicode_literals
+-''', 0x10000 | 0x2000 | 0x8000 | 0x20000),
++''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals),
+ ('''
+ from __future__ import print_function, division
+ print('hello')
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ('''
+ from __future__ import print_function, division, unknown,,,,,
+ print 'hello'
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ('''
+ from __future__ import (
+ print_function,
+ division)
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ('''
+ from __future__ import \\
+ print_function, \\
+ division
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ])
+ def test_parse_future(source, result):
+ fp = BytesIO(source.encode('latin-1'))
diff --git a/gnu/packages/patches/python-libxml2-python39-compat.patch b/gnu/packages/patches/python-libxml2-python39-compat.patch
new file mode 100644
index 0000000000..a707ea3434
--- /dev/null
+++ b/gnu/packages/patches/python-libxml2-python39-compat.patch
@@ -0,0 +1,94 @@
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/e4fb36841800038c289997432ca547c9bfef9db1.patch
+
+From e4fb36841800038c289997432ca547c9bfef9db1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Fri, 28 Feb 2020 12:48:14 +0100
+Subject: [PATCH] Parenthesize Py<type>_Check() in ifs
+
+In C, if expressions should be parenthesized.
+PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized
+expression before, but that's not API to rely on.
+
+Since Python 3.9.0a4 it needs to be parenthesized explicitly.
+
+Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149
+---
+ python/libxml.c | 4 ++--
+ python/types.c | 12 ++++++------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/python/libxml.c b/python/libxml.c
+index bc676c4e..81e709f3 100644
+--- a/python/libxml.c
++++ b/python/libxml.c
+@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (ret) {
++ } else if (PyUnicode_Check (ret)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (ret) {
++ } else if (PyUnicode_Check (ret)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+diff --git a/python/types.c b/python/types.c
+index c2bafeb1..ed284ec7 100644
+--- a/python/types.c
++++ b/python/types.c
+@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+ if (obj == NULL) {
+ return (NULL);
+ }
+- if PyFloat_Check (obj) {
++ if (PyFloat_Check (obj)) {
+ ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
+- } else if PyLong_Check(obj) {
++ } else if (PyLong_Check(obj)) {
+ #ifdef PyLong_AS_LONG
+ ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
+ #else
+ ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
+ #endif
+ #ifdef PyBool_Check
+- } else if PyBool_Check (obj) {
++ } else if (PyBool_Check (obj)) {
+
+ if (obj == Py_True) {
+ ret = xmlXPathNewBoolean(1);
+@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+ ret = xmlXPathNewBoolean(0);
+ }
+ #endif
+- } else if PyBytes_Check (obj) {
++ } else if (PyBytes_Check (obj)) {
+ xmlChar *str;
+
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
+ PyBytes_GET_SIZE(obj));
+ ret = xmlXPathWrapString(str);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (obj) {
++ } else if (PyUnicode_Check (obj)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ xmlChar *str;
+ const char *tmp;
+@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+ ret = xmlXPathWrapString(str);
+ #endif
+ #endif
+- } else if PyList_Check (obj) {
++ } else if (PyList_Check (obj)) {
+ int i;
+ PyObject *node;
+ xmlNodePtr cur;
+--
+GitLab
+
diff --git a/gnu/packages/patches/python-pyflakes-fix-tests.patch b/gnu/packages/patches/python-pyflakes-fix-tests.patch
new file mode 100644
index 0000000000..48107c8253
--- /dev/null
+++ b/gnu/packages/patches/python-pyflakes-fix-tests.patch
@@ -0,0 +1,40 @@
+From c873a25136dfdb062855b595cdf0a992ac825adf Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Sat, 3 Oct 2020 01:36:15 +0200
+Subject: [PATCH] Fix tests with Python 3.9, closes #549
+
+---
+ pyflakes/test/test_api.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 8e1e3c9c..906fb396 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -517,6 +515,8 @@ def foo(bar=baz, bax):
+ if ERROR_HAS_LAST_LINE:
+ if PYPY:
+ column = 7
++ elif sys.version_info >= (3, 9):
++ column = 21
+ elif sys.version_info >= (3, 8):
+ column = 9
+ else:
+@@ -545,6 +545,8 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
+ if ERROR_HAS_LAST_LINE:
+ if PYPY:
+ column = 12
++ elif sys.version_info >= (3, 9):
++ column = 17
+ elif sys.version_info >= (3, 8):
+ column = 14
+ else:
+@@ -579,6 +581,8 @@ def test_invalidEscape(self):
+ position_end = 1
+ if PYPY:
+ column = 6
++ elif ver >= (3,9):
++ column = 13
+ else:
+ column = 7
+ # Column has been "fixed" since 3.2.4 and 3.3.1
diff --git a/gnu/packages/patches/python-typing-inspect-fix.patch b/gnu/packages/patches/python-typing-inspect-fix.patch
new file mode 100644
index 0000000000..e6e28981b7
--- /dev/null
+++ b/gnu/packages/patches/python-typing-inspect-fix.patch
@@ -0,0 +1,38 @@
+From 16919e21936179e53df2f376c8b59b5fc44bd2dd Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Fri, 15 Jan 2021 09:22:52 -0500
+Subject: [PATCH] Fix for Python 3.9+.
+
+Fixes <https://github.com/ilevkivskyi/typing_inspect/issues/60>.
+
+Based on an idea in
+https://github.com/ilevkivskyi/typing_inspect/issues/60#issuecomment-683187584.
+---
+ typing_inspect.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/typing_inspect.py b/typing_inspect.py
+index 1ca68ed..31d05ee 100644
+--- a/typing_inspect.py
++++ b/typing_inspect.py
+@@ -21,7 +21,7 @@ LEGACY_TYPING = False
+
+ if NEW_TYPING:
+ from typing import (
+- Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, ForwardRef
++ Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, _SpecialGenericAlias, ForwardRef
+ )
+ from typing_extensions import Literal
+ else:
+@@ -75,7 +75,7 @@ def is_generic_type(tp):
+ """
+ if NEW_TYPING:
+ return (isinstance(tp, type) and issubclass(tp, Generic) or
+- isinstance(tp, _GenericAlias) and
++ (isinstance(tp, _GenericAlias) or isinstance(tp, _SpecialGenericAlias)) and
+ tp.__origin__ not in (Union, tuple, ClassVar, collections.abc.Callable))
+ return (isinstance(tp, GenericMeta) and not
+ isinstance(tp, (CallableMeta, TupleMeta)))
+--
+2.29.2
+
diff --git a/gnu/packages/patches/rust-1.19-mrustc.patch b/gnu/packages/patches/rust-1.19-mrustc.patch
deleted file mode 100644
index 261162172e..0000000000
--- a/gnu/packages/patches/rust-1.19-mrustc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-See https://github.com/thepowersgang/mrustc/archive/v0.8.0.tar.gz
-
---- rustc-1.19.0-src-orig/src/libcore/intrinsics.rs
-+++ rustc-1.19.0-src/src/libcore/intrinsics.rs
-@@ -678,5 +678,9 @@
- pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
-
-+ /// Obtain the length of a slice pointer
-+ #[cfg(rust_compiler="mrustc")]
-+ pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize;
-+
- /// Gets a static string slice containing the name of a type.
- pub fn type_name<T: ?Sized>() -> &'static str;
-
---- rustc-1.19.0-src-orig/src/libcore/slice/mod.rs
-+++ rustc-1.19.0-src/src/libcore/slice/mod.rs
-@@ -413,6 +413,8 @@
- #[inline]
- fn len(&self) -> usize {
-- unsafe {
-- mem::transmute::<&[T], Repr<T>>(self).len
-- }
-+ #[cfg(not(rust_compiler="mrustc"))]
-+ let rv = unsafe { mem::transmute::<&[T], Repr<T>>(self).len };
-+ #[cfg(rust_compiler="mrustc")]
-+ let rv = unsafe { ::intrinsics::mrustc_slice_len(self) };
-+ rv
- }
diff --git a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch
deleted file mode 100644
index a2bad55117..0000000000
--- a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-GDB responds with some overly detailed lines - which makes the tests fail.
-Patch rust to accept those instead.
-See <https://github.com/rust-lang/rust/issues/54178>.
-diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
---- orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:24:33.775565159 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:25:56.322513658 +0200
-@@ -19,36 +19,36 @@
-
- // gdb-command:print eight_bytes1
- // gdbg-check:$1 = {{RUST$ENUM$DISR = Variant1, __0 = 100}, {RUST$ENUM$DISR = Variant1, __0 = 100}}
--// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum::Variant1(100)
-+// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant1(100)
-
- // gdb-command:print four_bytes1
- // gdbg-check:$2 = {{RUST$ENUM$DISR = Variant1, __0 = 101}, {RUST$ENUM$DISR = Variant1, __0 = 101}}
--// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum::Variant1(101)
-+// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant1(101)
-
- // gdb-command:print two_bytes1
- // gdbg-check:$3 = {{RUST$ENUM$DISR = Variant1, __0 = 102}, {RUST$ENUM$DISR = Variant1, __0 = 102}}
--// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum::Variant1(102)
-+// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant1(102)
-
- // gdb-command:print one_byte1
- // gdbg-check:$4 = {{RUST$ENUM$DISR = Variant1, __0 = 65 'A'}, {RUST$ENUM$DISR = Variant1, __0 = 65 'A'}}
--// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum::Variant1(65)
-+// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant1(65)
-
-
- // gdb-command:print eight_bytes2
- // gdbg-check:$5 = {{RUST$ENUM$DISR = Variant2, __0 = 100}, {RUST$ENUM$DISR = Variant2, __0 = 100}}
--// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum::Variant2(100)
-+// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant2(100)
-
- // gdb-command:print four_bytes2
- // gdbg-check:$6 = {{RUST$ENUM$DISR = Variant2, __0 = 101}, {RUST$ENUM$DISR = Variant2, __0 = 101}}
--// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum::Variant2(101)
-+// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant2(101)
-
- // gdb-command:print two_bytes2
- // gdbg-check:$7 = {{RUST$ENUM$DISR = Variant2, __0 = 102}, {RUST$ENUM$DISR = Variant2, __0 = 102}}
--// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum::Variant2(102)
-+// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant2(102)
-
- // gdb-command:print one_byte2
- // gdbg-check:$8 = {{RUST$ENUM$DISR = Variant2, __0 = 65 'A'}, {RUST$ENUM$DISR = Variant2, __0 = 65 'A'}}
--// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum::Variant2(65)
-+// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant2(65)
-
- // gdb-command:continue
-
-diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs
---- orig/rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs 2018-09-13 10:24:33.775565159 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs 2018-09-13 10:27:43.353108111 +0200
-@@ -19,15 +19,15 @@
-
- // gdb-command:print case1
- // gdbg-check:$1 = {{RUST$ENUM$DISR = Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {RUST$ENUM$DISR = Case1, [...]}, {RUST$ENUM$DISR = Case1, [...]}}
--// gdbr-check:$1 = generic_struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
-+// gdbr-check:$1 = generic_struct_style_enum::Regular<u16, u32, i64>::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
-
- // gdb-command:print case2
- // gdbg-check:$2 = {{RUST$ENUM$DISR = Case2, [...]}, {RUST$ENUM$DISR = Case2, a = 0, b = 286331153, c = 286331153}, {RUST$ENUM$DISR = Case2, [...]}}
--// gdbr-check:$2 = generic_struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153}
-+// gdbr-check:$2 = generic_struct_style_enum::Regular<i16, u32, i64>::Case2{a: 0, b: 286331153, c: 286331153}
-
- // gdb-command:print case3
- // gdbg-check:$3 = {{RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, a = 0, b = 6438275382588823897}}
--// gdbr-check:$3 = generic_struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897}
-+// gdbr-check:$3 = generic_struct_style_enum::Regular<u16, i32, u64>::Case3{a: 0, b: 6438275382588823897}
-
- // gdb-command:print univariant
- // gdbg-check:$4 = {{a = -1}}
-diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs
---- orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs 2018-09-13 10:24:33.775565159 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs 2018-09-13 10:28:26.328546298 +0200
-@@ -21,15 +21,15 @@
-
- // gdb-command:print case1
- // gdbg-check:$1 = {{RUST$ENUM$DISR = Case1, __0 = 0, __1 = 31868, __2 = 31868, __3 = 31868, __4 = 31868}, {RUST$ENUM$DISR = Case1, [...]}, {RUST$ENUM$DISR = Case1, [...]}}
--// gdbr-check:$1 = generic_tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868)
-+// gdbr-check:$1 = generic_tuple_style_enum::Regular<u16, u32, u64>::Case1(0, 31868, 31868, 31868, 31868)
-
- // gdb-command:print case2
- // gdbg-check:$2 = {{RUST$ENUM$DISR = Case2, [...]}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 286331153, __2 = 286331153}, {RUST$ENUM$DISR = Case2, [...]}}
--// gdbr-check:$2 = generic_tuple_style_enum::Regular::Case2(0, 286331153, 286331153)
-+// gdbr-check:$2 = generic_tuple_style_enum::Regular<i16, i32, i64>::Case2(0, 286331153, 286331153)
-
- // gdb-command:print case3
- // gdbg-check:$3 = {{RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 6438275382588823897}}
--// gdbr-check:$3 = generic_tuple_style_enum::Regular::Case3(0, 6438275382588823897)
-+// gdbr-check:$3 = generic_tuple_style_enum::Regular<i16, i32, i64>::Case3(0, 6438275382588823897)
-
- // gdb-command:print univariant
- // gdbg-check:$4 = {{__0 = -1}}
---- orig/rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-09-13 10:24:33.783565071 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-10-26 18:19:20.404564587 +0200
-@@ -17,11 +17,11 @@
-
- // gdb-command:print first
- // gdbg-check:$1 = {<No data fields>}
--// gdbr-check:$1 = <error reading variable>
-+// gdbr-check:$1 = nil_enum::ANilEnum
-
- // gdb-command:print second
- // gdbg-check:$2 = {<No data fields>}
--// gdbr-check:$2 = <error reading variable>
-+// gdbr-check:$2 = nil_enum::AnotherNilEnum
-
- #![allow(unused_variables)]
- #![feature(omit_gdb_pretty_printer_section)]
diff --git a/gnu/packages/patches/rust-1.30-gdb-llvm.patch b/gnu/packages/patches/rust-1.30-gdb-llvm.patch
deleted file mode 100644
index e8f0acc8b4..0000000000
--- a/gnu/packages/patches/rust-1.30-gdb-llvm.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Tweak some gdb tests which were broken during LLVM upgrades.
-This has been subsequently fixed upstream in later rustc versions,
-but still needed to bootstrap some earlier versions of the compiler.
-
-diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs
---- rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 12:49:34.055483896 -0800
-+++ rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 13:01:10.915950356 -0800
-@@ -18,15 +18,15 @@
-
- // gdb-command:print *the_a_ref
- // gdbg-check:$1 = TheA
--// gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA
-+// gdbr-check:$1 = borrowed_c_style_enum::TheA
-
- // gdb-command:print *the_b_ref
- // gdbg-check:$2 = TheB
--// gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB
-+// gdbr-check:$2 = borrowed_c_style_enum::TheB
-
- // gdb-command:print *the_c_ref
- // gdbg-check:$3 = TheC
--// gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC
-+// gdbr-check:$3 = borrowed_c_style_enum::TheC
-
-
- // === LLDB TESTS ==================================================================================
-diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs
---- rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 12:49:34.051483727 -0800
-+++ rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 13:02:00.981997525 -0800
-@@ -19,31 +19,31 @@
-
- // gdb-command:print tuple_interior_padding
- // gdbg-check:$1 = {__0 = 0, __1 = OneHundred}
--// gdbr-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred)
-+// gdbr-check:$1 = (0, c_style_enum_in_composite::OneHundred)
-
- // gdb-command:print tuple_padding_at_end
- // gdbg-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2}
--// gdbr-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2)
-+// gdbr-check:$2 = ((1, c_style_enum_in_composite::OneThousand), 2)
-
- // gdb-command:print tuple_different_enums
- // gdbg-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna}
--// gdbr-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna)
-+// gdbr-check:$3 = (c_style_enum_in_composite::OneThousand, c_style_enum_in_composite::MountainView, c_style_enum_in_composite::OneMillion, c_style_enum_in_composite::Vienna)
-
- // gdb-command:print padded_struct
- // gdbg-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
--// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5}
-+// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::OneMillion, c: 4, d: c_style_enum_in_composite::Toronto, e: 5}
-
- // gdb-command:print packed_struct
- // gdbg-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8}
--// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8}
-+// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::OneHundred, c: 7, d: c_style_enum_in_composite::Vienna, e: 8}
-
- // gdb-command:print non_padded_struct
- // gdbg-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
--// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto}
-+// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::OneMillion, b: c_style_enum_in_composite::MountainView, c: c_style_enum_in_composite::OneThousand, d: c_style_enum_in_composite::Toronto}
-
- // gdb-command:print struct_with_drop
- // gdbg-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9}
--// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9)
-+// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::OneHundred, b: c_style_enum_in_composite::Vienna}, 9)
-
- // === LLDB TESTS ==================================================================================
-
-diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
---- rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 12:49:34.043483393 -0800
-+++ rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 13:02:17.954691634 -0800
-@@ -27,15 +27,15 @@
-
- // gdb-command: print c_style_enum1
- // gdbg-check:$3 = CStyleEnumVar1
--// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar1
-+// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar1
-
- // gdb-command: print c_style_enum2
- // gdbg-check:$4 = CStyleEnumVar2
--// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar2
-+// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar2
-
- // gdb-command: print c_style_enum3
- // gdbg-check:$5 = CStyleEnumVar3
--// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3
-+// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar3
-
- #![allow(dead_code, unused_variables)]
diff --git a/gnu/packages/patches/rust-1.45-linker-locale.patch b/gnu/packages/patches/rust-1.45-linker-locale.patch
deleted file mode 100644
index 40220e8e77..0000000000
--- a/gnu/packages/patches/rust-1.45-linker-locale.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Patch will be included upstream in 1.47: https://github.com/rust-lang/rust/pull/74416
-diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
-index e64aafa599f..12575ac4358 100644
---- a/src/librustc_codegen_ssa/back/linker.rs
-+++ b/src/librustc_codegen_ssa/back/linker.rs
-@@ -28,7 +28,7 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor};
- pub fn disable_localization(linker: &mut Command) {
- // No harm in setting both env vars simultaneously.
- // Unix-style linkers.
-- linker.env("LC_ALL", "C");
-+ linker.env("LC_ALL", "en_US.UTF-8");
- // MSVC's `link.exe`.
- linker.env("VSLANG", "1033");
- }
diff --git a/gnu/packages/patches/rust-1.48-linker-locale.patch b/gnu/packages/patches/rust-1.48-linker-locale.patch
deleted file mode 100644
index d06dcbe682..0000000000
--- a/gnu/packages/patches/rust-1.48-linker-locale.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://github.com/rust-lang/rust/pull/74416
-diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
-index 3df956c465e..f45fee45be4 100644
---- a/compiler/rustc_codegen_ssa/src/back/linker.rs
-+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
-@@ -28,7 +28,7 @@
- pub fn disable_localization(linker: &mut Command) {
- // No harm in setting both env vars simultaneously.
- // Unix-style linkers.
-- linker.env("LC_ALL", "C");
-+ linker.env("LC_ALL", "en_US.UTF-8");
- // MSVC's `link.exe`.
- linker.env("VSLANG", "1033");
- }
diff --git a/gnu/packages/patches/rust-bootstrap-stage0-test.patch b/gnu/packages/patches/rust-bootstrap-stage0-test.patch
deleted file mode 100644
index e8484903e5..0000000000
--- a/gnu/packages/patches/rust-bootstrap-stage0-test.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Bootstrap tests failed with local stage0 cargo and rustc
-Backported changes from https://github.com/rust-lang/rust/pull/51977
-
-From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001
-From: Nikolai Merinov <nikolai.merinov@member.fsf.org>
-Date: Mon, 2 Jul 2018 01:45:35 +0500
-Subject: [PATCH] bootstrap: tests should use rustc from config.toml
-
-Tests should always use "rustc" and "cargo" from config.toml instead
-of assuming that stage0 binaries was downloaded to build directory.
----
- src/bootstrap/bootstrap.py | 2 ++
- src/bootstrap/config.rs | 6 ++----
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 487440becf..1701f7b83a 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -788,6 +788,8 @@ def bootstrap(help_triggered):
- env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
- env["BOOTSTRAP_PYTHON"] = sys.executable
- env["BUILD_DIR"] = build.build_dir
-+ env["CARGO"] = build.cargo()
-+ env["RUSTC"] = build.rustc()
- run(args, env=env, verbose=build.verbose)
-
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 6dd6291be2..d1a0deb583 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -23,7 +23,6 @@ use std::cmp;
-
- use num_cpus;
- use toml;
--use util::exe;
- use cache::{INTERNER, Interned};
- use flags::Flags;
- pub use flags::Subcommand;
-@@ -362,9 +361,8 @@ impl Config {
- config.src = Config::path_from_python("SRC");
- config.out = Config::path_from_python("BUILD_DIR");
-
-- let stage0_root = config.out.join(&config.build).join("stage0/bin");
-- config.initial_rustc = stage0_root.join(exe("rustc", &config.build));
-- config.initial_cargo = stage0_root.join(exe("cargo", &config.build));
-+ config.initial_rustc = Config::path_from_python("RUSTC");
-+ config.initial_cargo = Config::path_from_python("CARGO");
-
- config
- }
---
-2.17.1
-
diff --git a/gnu/packages/patches/tcsh-fix-autotest.patch b/gnu/packages/patches/tcsh-fix-autotest.patch
index 200867cb9b..9f5790641b 100644
--- a/gnu/packages/patches/tcsh-fix-autotest.patch
+++ b/gnu/packages/patches/tcsh-fix-autotest.patch
@@ -63,17 +63,6 @@
AT_DATA([comment2.csh],
[[echo testing...@%:@\
---- tests/subst.at
-+++ tests/subst.at
-@@ -54,7 +54,7 @@ AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }')
- , [1
- ])
-
--AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
-+AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)//foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
- | wc -l | tr -d ' \t'], , [1
- ])
-
--- tests/variables.at
+++ tests/variables.at
@@ -666,7 +666,8 @@ set listflags=(-xA $cwd/args.sh)
diff --git a/gnu/packages/patches/zziplib-CVE-2018-16548.patch b/gnu/packages/patches/zziplib-CVE-2018-16548.patch
deleted file mode 100644
index a17c6a9768..0000000000
--- a/gnu/packages/patches/zziplib-CVE-2018-16548.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The following 3 patches applied to 0.13.69 in this order, combined:
-https://github.com/gdraheim/zziplib/commit/9411bde3e4a70a81ff3ffd256b71927b2d90dcbb.patch
-https://github.com/gdraheim/zziplib/commit/d2e5d5c53212e54a97ad64b793a4389193fec687.patch
-https://github.com/gdraheim/zziplib/commit/0e1dadb05c1473b9df2d7b8f298dab801778ef99.patch
-
-diff --git a/test/test.zip b/test/test.zip
-index 2c992ea..952d475 100644
-Binary files a/test/test.zip and b/test/test.zip differ
-diff --git a/zzip/zip.c b/zzip/zip.c
-index 14e2e06..f97a40a 100644
---- a/zzip/zip.c
-+++ b/zzip/zip.c
-@@ -472,9 +472,15 @@ __zzip_parse_root_directory(int fd,
- } else
- {
- if (io->fd.seeks(fd, zz_rootseek + zz_offset, SEEK_SET) < 0)
-+ {
-+ free(hdr0);
- return ZZIP_DIR_SEEK;
-+ }
- if (io->fd.read(fd, &dirent, sizeof(dirent)) < __sizeof(dirent))
-+ {
-+ free(hdr0);
- return ZZIP_DIR_READ;
-+ }
- d = &dirent;
- }
-
-@@ -574,11 +580,18 @@ __zzip_parse_root_directory(int fd,
-
- if (hdr_return)
- *hdr_return = hdr0;
-+ else
-+ {
-+ /* If it is not assigned to *hdr_return, it will never be free()'d */
-+ free(hdr0);
-+ }
- } /* else zero (sane) entries */
-+ else
-+ free(hdr0);
- # ifndef ZZIP_ALLOW_MODULO_ENTRIES
-- return (entries != zz_entries ? ZZIP_CORRUPTED : 0);
-+ return (entries != zz_entries) ? ZZIP_CORRUPTED : 0;
- # else
-- return ((entries & (unsigned)0xFFFF) != zz_entries ? ZZIP_CORRUPTED : 0);
-+ return ((entries & (unsigned)0xFFFF) != zz_entries) ? ZZIP_CORRUPTED : 0;
- # endif
- }
-