summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-04-28 16:24:46 +0200
committerLudovic Courtès <ludo@gnu.org>2022-04-28 16:24:46 +0200
commit284fa7264963acc5d114ef5d54c347126b1654ba (patch)
tree3e5360fcc81b6d0dce76a65aca60cf8528f2931f /gnu/packages/patches
parent12c9da35389dfba86ae0d863132a6b2c4374205a (diff)
parent882cacc1bb5be0df334dd7ce55b385a3a1678728 (diff)
downloadguix-patches-284fa7264963acc5d114ef5d54c347126b1654ba.tar
guix-patches-284fa7264963acc5d114ef5d54c347126b1654ba.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/clang-14.0-libc-search-path.patch94
-rw-r--r--gnu/packages/patches/efivar-211.patch86
-rw-r--r--gnu/packages/patches/ganeti-haskell-compat.patch18
-rw-r--r--gnu/packages/patches/ganeti-pyyaml-compat.patch41
-rw-r--r--gnu/packages/patches/ganeti-sphinx-compat.patch24
-rw-r--r--gnu/packages/patches/gtk-introspection-test.patch22
-rw-r--r--gnu/packages/patches/hwloc-1-test-btrfs.patch54
-rw-r--r--gnu/packages/patches/idris-build-with-haskeline-0.8.patch85
-rw-r--r--gnu/packages/patches/idris-build-with-megaparsec-9.patch27
-rw-r--r--gnu/packages/patches/idris-disable-test.patch19
-rw-r--r--gnu/packages/patches/idris-test-ffi008.patch26
-rw-r--r--gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch72
-rw-r--r--gnu/packages/patches/pigx-rnaseq-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/python-robotframework-atest.patch61
-rw-r--r--gnu/packages/patches/python-robotframework-source-date-epoch.patch153
-rw-r--r--gnu/packages/patches/python-robotframework-ug2html.patch57
-rw-r--r--gnu/packages/patches/python-w3lib-fix-test-failure.patch60
-rw-r--r--gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch25
-rw-r--r--gnu/packages/patches/tremc-fix-decodestring.patch25
-rw-r--r--gnu/packages/patches/u-boot-allow-disabling-openssl.patch107
-rw-r--r--gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch40
-rw-r--r--gnu/packages/patches/webkitgtk-bind-all-fonts.patch25
-rw-r--r--gnu/packages/patches/webkitgtk-canonicalize-paths.patch66
-rw-r--r--gnu/packages/patches/xterm-370-explicit-xcursor.patch37
-rw-r--r--gnu/packages/patches/zig-disable-libc-note-test.patch31
27 files changed, 724 insertions, 630 deletions
diff --git a/gnu/packages/patches/clang-14.0-libc-search-path.patch b/gnu/packages/patches/clang-14.0-libc-search-path.patch
new file mode 100644
index 0000000000..7e439cd1ef
--- /dev/null
+++ b/gnu/packages/patches/clang-14.0-libc-search-path.patch
@@ -0,0 +1,94 @@
+Clang attempts to guess file names based on the OS and distro (yes!),
+but unfortunately, that doesn't work for us.
+
+This patch makes it easy to insert libc's $libdir so that Clang passes the
+correct absolute file name of crt1.o etc. to 'ld'. It also disables all
+the distro-specific stuff and removes the hard-coded FHS directory names
+to make sure Clang also works on foreign distros.
+
+diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp
+--- a/clang/lib/Driver/Distro.cpp
++++ b/clang/lib/Driver/Distro.cpp
+@@ -96,6 +96,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) {
+ }
+
+ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ Distro::DistroType Version = Distro::UnknownDistro;
+
+ // Newer freedesktop.org's compilant systemd-based systems
+diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
+--- a/clang/lib/Driver/ToolChains/Cuda.cpp
++++ b/clang/lib/Driver/ToolChains/Cuda.cpp
+@@ -117,6 +117,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
+diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
+--- a/clang/lib/Driver/ToolChains/Linux.cpp
++++ b/clang/lib/Driver/ToolChains/Linux.cpp
+@@ -186,6 +186,10 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+
+ Generic_GCC::PushPPaths(PPaths);
+
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
++#if 0
++
+ Distro Distro(D.getVFS(), Triple);
+
+ if (Distro.IsAlpineLinux() || Triple.isAndroid()) {
+@@ -250,6 +254,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+
+ if (IsAndroid || Distro.IsOpenSUSE())
+ ExtraOpts.push_back("--enable-new-dtags");
++#endif
+
+ // The selection of paths to try here is designed to match the patterns which
+ // the GCC driver itself uses, as this is part of the GCC-compatible driver.
+@@ -270,6 +275,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ }
+ Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths);
+
++#if 0
+ addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
+ addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
+
+@@ -298,9 +304,11 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths);
+ addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths);
+ }
++#endif
+
+ Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths);
+
++#if 0
+ // Similar to the logic for GCC above, if we are currently running Clang
+ // inside of the requested system root, add its parent library path to those
+ // searched.
+@@ -313,9 +321,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ if (OSLibDir != "lib")
+ addPathIfExists(D, D.Dir + "/../" + OSLibDir, Paths);
+ }
++#endif
++
++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
++ // and friends can be found.
++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
+ }
+
+ ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const {
diff --git a/gnu/packages/patches/efivar-211.patch b/gnu/packages/patches/efivar-211.patch
new file mode 100644
index 0000000000..39d53a6ee0
--- /dev/null
+++ b/gnu/packages/patches/efivar-211.patch
@@ -0,0 +1,86 @@
+Patch from <https://github.com/rhboot/efivar/pull/211>.
+
+From 15622b7e5761f3dde3f0e42081380b2b41639a48 Mon Sep 17 00:00:00 2001
+From: itd0 <69421122+itd0@users.noreply.github.com>
+Date: Mon, 4 Apr 2022 19:59:58 +0200
+Subject: [PATCH] Avoid format error on i686
+
+On i686 definition of off_t and ssize_t differ. Update format length
+modifiers as needed to avoid format errors with GCC.
+
+Signed-off-by: itd0 <69421122+itd0@users.noreply.github.com>
+---
+ src/esl-iter.c | 18 +++++++++---------
+ src/secdb-dump.c | 2 +-
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/esl-iter.c b/src/esl-iter.c
+index 26b5cb5e..4a1938ad 100644
+--- a/src/esl-iter.c
++++ b/src/esl-iter.c
+@@ -308,13 +308,13 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
+ return -1;
+ }
+ if (iter->offset < 0) {
+- efi_error("iter->offset (%zd) < 0", iter->offset);
++ efi_error("iter->offset (%jd) < 0", (intmax_t)iter->offset);
+ errno = EINVAL;
+ return -1;
+ }
+ if ((uint32_t)iter->offset >= iter->len) {
+- efi_error("iter->offset (%zd) >= iter->len (%zd)",
+- iter->offset, iter->len);
++ efi_error("iter->offset (%jd) >= iter->len (%zd)",
++ (intmax_t)iter->offset, iter->len);
+ errno = EINVAL;
+ return -1;
+ }
+@@ -335,9 +335,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
+ iter->len - iter->offset, iter->len - iter->offset,
+ iter->esl->signature_list_size, iter->esl->signature_list_size);
+ if (correct_size && (iter->len - iter->offset) > 0) {
+- warnx("correcting ESL size from %d to %zd at %lx",
++ warnx("correcting ESL size from %d to %jd at %lx",
+ iter->esl->signature_list_size,
+- iter->len - iter->offset, iter->offset);
++ (intmax_t)(iter->len - iter->offset), iter->offset);
+ debug("correcting ESL size from %d to %zd at %lx",
+ iter->esl->signature_list_size,
+ iter->len - iter->offset, iter->offset);
+@@ -360,9 +360,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
+ if (iter->len - iter->offset < iter->esl->signature_list_size) {
+ debug("EFI_SIGNATURE_LIST is malformed");
+ if (correct_size && (iter->len - iter->offset) > 0) {
+- warnx("correcting ESL size from %d to %zd at 0x%lx",
++ warnx("correcting ESL size from %d to %jd at 0x%lx",
+ iter->esl->signature_list_size,
+- iter->len - iter->offset, iter->offset);
++ (intmax_t)(iter->len - iter->offset), iter->offset);
+ debug("correcting ESL size from %d to %zd at 0x%lx",
+ iter->esl->signature_list_size,
+ iter->len - iter->offset, iter->offset);
+@@ -411,9 +411,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
+ if (iter->esl->signature_list_size > iter->len - iter->offset) {
+ debug("EFI_SIGNATURE_LIST is malformed");
+ if (correct_size && (iter->len - iter->offset) > 0) {
+- warnx("correcting ESL size from %d to %zd at 0x%lx",
++ warnx("correcting ESL size from %d to %jd at 0x%lx",
+ iter->esl->signature_list_size,
+- iter->len - iter->offset, iter->offset);
++ (intmax_t)(iter->len - iter->offset), iter->offset);
+ debug("correcting ESL size from %d to %zd at 0x%lx",
+ iter->esl->signature_list_size,
+ iter->len - iter->offset, iter->offset);
+diff --git a/src/secdb-dump.c b/src/secdb-dump.c
+index 02fb915b..17f64411 100644
+--- a/src/secdb-dump.c
++++ b/src/secdb-dump.c
+@@ -248,7 +248,7 @@ secdb_dump(efi_secdb_t *secdb, bool annotations)
+ esln += 1;
+ }
+ secdb_dump_finish();
+- printf("%08lx\n", offset);
++ printf("%08zx\n", offset);
+
+ fflush(stdout);
+ }
diff --git a/gnu/packages/patches/ganeti-haskell-compat.patch b/gnu/packages/patches/ganeti-haskell-compat.patch
deleted file mode 100644
index 931c50e116..0000000000
--- a/gnu/packages/patches/ganeti-haskell-compat.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Adjust to type change of TupE in Template Haskell 2.16.
-
-diff --git a/src/Ganeti/THH/Types.hs b/src/Ganeti/THH/Types.hs
---- a/src/Ganeti/THH/Types.hs
-+++ b/src/Ganeti/THH/Types.hs
-@@ -123,4 +123,11 @@ curryN n = do
- f <- newName "f"
- ps <- replicateM n (newName "x")
- return $ LamE (VarP f : map VarP ps)
-- (AppE (VarE f) (TupE $ map VarE ps))
-+ (AppE (VarE f) (nonUnaryTupE $ map VarE ps))
-+ where
-+ nonUnaryTupE :: [Exp] -> Exp
-+ nonUnaryTupE es = TupE $
-+#if MIN_VERSION_template_haskell(2,16,0)
-+ map Just
-+#endif
-+ es
diff --git a/gnu/packages/patches/ganeti-pyyaml-compat.patch b/gnu/packages/patches/ganeti-pyyaml-compat.patch
new file mode 100644
index 0000000000..2f74e48a82
--- /dev/null
+++ b/gnu/packages/patches/ganeti-pyyaml-compat.patch
@@ -0,0 +1,41 @@
+Add Loader argument to 'yaml.load' invocations as required by PyYAML 6.0.
+
+Submitted upstream:
+
+ https://github.com/ganeti/ganeti/pull/1668
+
+diff --git a/qa/qa_utils.py b/qa/qa_utils.py
+index da485df48..27428e685 100644
+--- a/qa/qa_utils.py
++++ b/qa/qa_utils.py
+@@ -450,7 +450,7 @@ def GetObjectInfo(infocmd):
+ master = qa_config.GetMasterNode()
+ cmdline = utils.ShellQuoteArgs(infocmd)
+ info_out = GetCommandOutput(master.primary, cmdline)
+- return yaml.load(info_out)
++ return yaml.load(info_out, Loader=yaml.SafeLoader)
+
+
+ def UploadFile(node, src):
+diff --git a/test/py/ganeti.cli_unittest.py b/test/py/ganeti.cli_unittest.py
+index 9cc980afa..242aac9fd 100755
+--- a/test/py/ganeti.cli_unittest.py
++++ b/test/py/ganeti.cli_unittest.py
+@@ -1141,14 +1141,15 @@ class TestFormatPolicyInfo(unittest.TestCase):
+ self._RenameDictItem(minmax, key, keyparts[0])
+ self.assertTrue(constants.IPOLICY_DTS in parsed)
+ parsed[constants.IPOLICY_DTS] = yaml.load("[%s]" %
+- parsed[constants.IPOLICY_DTS])
++ parsed[constants.IPOLICY_DTS],
++ Loader=yaml.SafeLoader)
+
+ @staticmethod
+ def _PrintAndParsePolicy(custom, effective, iscluster):
+ formatted = cli.FormatPolicyInfo(custom, effective, iscluster)
+ buf = StringIO()
+ cli._SerializeGenericInfo(buf, formatted, 0)
+- return yaml.load(buf.getvalue())
++ return yaml.load(buf.getvalue(), Loader=yaml.SafeLoader)
+
+ def _PrintAndCheckParsed(self, policy):
+ parsed = self._PrintAndParsePolicy(policy, NotImplemented, True)
diff --git a/gnu/packages/patches/ganeti-sphinx-compat.patch b/gnu/packages/patches/ganeti-sphinx-compat.patch
deleted file mode 100644
index 4e84abbf37..0000000000
--- a/gnu/packages/patches/ganeti-sphinx-compat.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Adjust documentation for Sphinx 4.0.
-
-Discussed upstream at <https://github.com/ganeti/ganeti/pull/1615>.
-
-diff --git a/doc/index.rst b/doc/index.rst
---- a/doc/index.rst
-+++ b/doc/index.rst
-@@ -119,7 +119,6 @@ Draft designs
- design-hotplug.rst
- design-internal-shutdown.rst
- design-kvmd.rst
-- design-location.rst
- design-linuxha.rst
- design-location.rst
- design-lu-generated-jobs.rst
-diff --git a/lib/build/shell_example_lexer.py b/lib/build/shell_example_lexer.py
---- a/lib/build/shell_example_lexer.py
-+++ b/lib/build/shell_example_lexer.py
-@@ -79,4 +79,4 @@ class ShellExampleLexer(RegexLexer):
-
-
- def setup(app):
-- app.add_lexer("shell-example", ShellExampleLexer())
-+ app.add_lexer("shell-example", ShellExampleLexer)
diff --git a/gnu/packages/patches/gtk-introspection-test.patch b/gnu/packages/patches/gtk-introspection-test.patch
deleted file mode 100644
index 570ea806a9..0000000000
--- a/gnu/packages/patches/gtk-introspection-test.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-# Extend rather than stomp environment variables.
-# Upstream status: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4268
-diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build
-index 6202fb7446..b59191eb0f 100644
---- a/testsuite/introspection/meson.build
-+++ b/testsuite/introspection/meson.build
-@@ -1,9 +1,10 @@
-+env = environment()
-+env.prepend('GI_TYPELIB_PATH',
-+ join_paths(project_build_root, 'gtk'),
-+ gi_dep.get_pkgconfig_variable('typelibdir'))
-+env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so'))
-
- test('api',
- find_program('api.py', dirs: meson.current_source_dir()),
- suite: ['introspection'],
-- env: [
-- 'GI_TYPELIB_PATH=@0@/gtk:@1@'.format(project_build_root,
-- gi_dep.get_pkgconfig_variable('typelibdir')),
-- 'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root),
-- ])
-+ env: env)
diff --git a/gnu/packages/patches/hwloc-1-test-btrfs.patch b/gnu/packages/patches/hwloc-1-test-btrfs.patch
new file mode 100644
index 0000000000..a5d3780e2d
--- /dev/null
+++ b/gnu/packages/patches/hwloc-1-test-btrfs.patch
@@ -0,0 +1,54 @@
+From 093316a897a2eb4972a7a3a5888f40975d03f6bf Mon Sep 17 00:00:00 2001
+From: Brice Goglin <Brice.Goglin@inria.fr>
+Date: Tue, 5 Apr 2022 17:39:50 +0200
+Subject: [PATCH] linux: (partial) fix the discovery of hugepages on btrfs
+ fsroot
+
+btrfs always returns 1 in directory stat.st_nlink.
+It breaks make check in tests/linux/ because the hugepages discovery
+uses st_nlink to allocate the memory page_types array.
+
+Always allocate at least 3 page_types slots
+(enough for all known cases, 1 for normal, 2 for huge pages)
+
+(partially cherry-picked from commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc)
+
+We don't reallocate later if needed as in 2.x commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc
+because v1.11 doesn't deserve a complete fix. Just commit the minimal change
+so that tests/linux/2i386-2t-hugepagesizecount with HWLOC_PAGESIZE_DEBUG=4096
+doesn't crash in btrfs anymore (test-topology.sh fails during make check if /tmp is in btrfs).
+
+Thanks to Philippe Swartvagher for the report.
+
+Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
+---
+ src/topology-linux.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/topology-linux.c b/src/topology-linux.c
+index 58c275fea..269eca7f5 100644
+--- a/src/topology-linux.c
++++ b/src/topology-linux.c
+@@ -1,6 +1,6 @@
+ /*
+ * Copyright © 2009 CNRS
+- * Copyright © 2009-2019 Inria. All rights reserved.
++ * Copyright © 2009-2022 Inria. All rights reserved.
+ * Copyright © 2009-2013, 2015 Université Bordeaux
+ * Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
+ * Copyright © 2015 Intel, Inc. All rights reserved.
+@@ -2329,7 +2329,14 @@ hwloc_get_procfs_meminfo_info(struct hwloc_topology *topology,
+
+ err = hwloc_stat("/sys/kernel/mm/hugepages", &st, data->root_fd);
+ if (!err) {
+- types = 1 + st.st_nlink-2;
++ types = 1 /* normal non-huge size */ + st.st_nlink - 2 /* ignore . and .. */;
++ if (types < 3)
++ /* some buggy filesystems (e.g. btrfs when reading from fsroot)
++ * return wrong st_nlink for directories (always 1 for btrfs).
++ * use 3 as a sane default (default page + 2 huge sizes).
++ * hwloc_parse_hugepages_info() will extend it if needed.
++ */
++ types = 3;
+ has_sysfs_hugepages = 1;
+ }
diff --git a/gnu/packages/patches/idris-build-with-haskeline-0.8.patch b/gnu/packages/patches/idris-build-with-haskeline-0.8.patch
deleted file mode 100644
index 5d1fec2409..0000000000
--- a/gnu/packages/patches/idris-build-with-haskeline-0.8.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 89a87cf666eb8b27190c779e72d0d76eadc1bc14 Mon Sep 17 00:00:00 2001
-From: Niklas Larsson <niklas@mm.st>
-Date: Sat, 6 Jun 2020 15:29:45 +0200
-Subject: [PATCH] Fix to unblock haskeline-0.8
-
----
-Taken from <https://github.com/idris-lang/Idris-dev/pull/4871>
-
- idris.cabal | 2 +-
- src/Idris/Output.hs | 8 --------
- src/Idris/REPL.hs | 12 +++++-------
- 3 files changed, 6 insertions(+), 16 deletions(-)
-
-diff --git a/idris.cabal b/idris.cabal
-index 38359019a9..bc9e265023 100644
---- a/idris.cabal
-+++ b/idris.cabal
-@@ -336,7 +336,7 @@ Library
- , directory >= 1.2.2.0 && < 1.2.3.0 || > 1.2.3.0
- , filepath < 1.5
- , fingertree >= 0.1.4.1 && < 0.2
-- , haskeline >= 0.7 && < 0.8
-+ , haskeline >= 0.8 && < 0.9
- , ieee754 >= 0.7 && < 0.9
- , megaparsec >= 7.0.4 && < 9
- , mtl >= 2.1 && < 2.3
-diff --git a/src/Idris/Output.hs b/src/Idris/Output.hs
-index 70b4d48a30..6b5d59948c 100644
---- a/src/Idris/Output.hs
-+++ b/src/Idris/Output.hs
-@@ -37,21 +37,13 @@ import Prelude hiding ((<$>))
- #endif
-
- import Control.Arrow (first)
--import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT)
- import Data.List (intersperse, nub)
- import Data.Maybe (fromJust, fromMaybe, isJust, listToMaybe)
- import qualified Data.Set as S
--import System.Console.Haskeline.MonadException (MonadException(controlIO),
-- RunIO(RunIO))
- import System.FilePath (replaceExtension)
- import System.IO (Handle, hPutStr, hPutStrLn)
- import System.IO.Error (tryIOError)
-
--instance MonadException m => MonadException (ExceptT Err m) where
-- controlIO f = ExceptT $ controlIO $ \(RunIO run) -> let
-- run' = RunIO (fmap ExceptT . run . runExceptT)
-- in fmap runExceptT $ f run'
--
- pshow :: IState -> Err -> String
- pshow ist err = displayDecorated (consoleDecorate ist) .
- renderPretty 1.0 80 .
-diff --git a/src/Idris/REPL.hs b/src/Idris/REPL.hs
-index 05587d9672..5e0dc21089 100644
---- a/src/Idris/REPL.hs
-+++ b/src/Idris/REPL.hs
-@@ -122,23 +122,21 @@ repl orig mods efile
- (if colour && not isWindows
- then colourisePrompt theme str
- else str) ++ " "
-- x <- H.catch (H.withInterrupt $ getInputLine prompt)
-- (ctrlC (return $ Just ""))
-+ x <- H.handleInterrupt (ctrlC (return $ Just "")) (H.withInterrupt $ getInputLine prompt)
- case x of
- Nothing -> do lift $ when (not quiet) (iputStrLn "Bye bye")
- return ()
- Just input -> -- H.catch
-- do ms <- H.catch (H.withInterrupt $ lift $ processInput input orig mods efile)
-- (ctrlC (return (Just mods)))
-+ do ms <- H.handleInterrupt (ctrlC (return (Just mods))) (H.withInterrupt $ lift $ processInput input orig mods efile)
- case ms of
- Just mods -> let efile' = fromMaybe efile (listToMaybe mods)
- in repl orig mods efile'
- Nothing -> return ()
- -- ctrlC)
- -- ctrlC
-- where ctrlC :: InputT Idris a -> SomeException -> InputT Idris a
-- ctrlC act e = do lift $ iputStrLn (show e)
-- act -- repl orig mods
-+ where ctrlC :: InputT Idris a -> InputT Idris a
-+ ctrlC act = do lift $ iputStrLn "Interrupted"
-+ act -- repl orig mods
-
- showMVs c thm [] = ""
- showMVs c thm ms = "Holes: " ++
diff --git a/gnu/packages/patches/idris-build-with-megaparsec-9.patch b/gnu/packages/patches/idris-build-with-megaparsec-9.patch
deleted file mode 100644
index 6d7ff1d713..0000000000
--- a/gnu/packages/patches/idris-build-with-megaparsec-9.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 6ea9bc913877d765048d7cdb7fc5aec60b196fac Mon Sep 17 00:00:00 2001
-From: Felix Yan <felixonmars@archlinux.org>
-Date: Wed, 16 Dec 2020 21:48:32 +0800
-Subject: [PATCH] Fix compatibility with megaparsec 9
-
----
-Taken from <https://github.com/idris-lang/Idris-dev/pull/4892>
-
- src/Idris/Parser/Stack.hs | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs
-index fb7b611440..879786f4d2 100644
---- a/src/Idris/Parser/Stack.hs
-+++ b/src/Idris/Parser/Stack.hs
-@@ -84,7 +84,11 @@ instance Message ParseError where
- (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
- #endif
- messageText = PP.text . init . P.parseErrorTextPretty . parseError
-+#if MIN_VERSION_megaparsec(9,0,0)
-+ messageSource err = sline
-+#else
- messageSource err = Just sline
-+#endif
- where
- #if MIN_VERSION_megaparsec(8,0,0)
- (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
diff --git a/gnu/packages/patches/idris-disable-test.patch b/gnu/packages/patches/idris-disable-test.patch
deleted file mode 100644
index ec8c7c8451..0000000000
--- a/gnu/packages/patches/idris-disable-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-The "pkg010" test output depends on the version of optparse-applicative being
-used. The expected output requires optparse-applicative >= 0.15.1.0. Skip
-the test for now.
-
---- idris-1.3.3/test/TestData.hs 2021-01-19 23:05:24.238958262 -0600
-+++ idris-1.3.3/test/TestData.hs 2021-01-19 23:10:33.314390997 -0600
-@@ -212,8 +212,10 @@
- ( 5, ANY ),
- ( 6, ANY ),
- ( 7, ANY ),
-- ( 8, ANY ),
-- ( 10, ANY )]),
-+ ( 8, ANY )]),
-+-- FIXME: Expected output depends on optparse-applicative version.
-+-- See https://github.com/idris-lang/Idris-dev/issues/4896
-+-- ( 10, ANY )]),
- ("prelude", "Prelude",
- [ ( 1, ANY )]),
- ("primitives", "Primitive types",
diff --git a/gnu/packages/patches/idris-test-ffi008.patch b/gnu/packages/patches/idris-test-ffi008.patch
new file mode 100644
index 0000000000..530813c20e
--- /dev/null
+++ b/gnu/packages/patches/idris-test-ffi008.patch
@@ -0,0 +1,26 @@
+Avoid "multiple definition of `mystruct'" error from `ld`:
+
+Submitted upstream at https://github.com/idris-lang/Idris-dev/issues/4914
+
+--- a/test/ffi008/ffi008.h 1969-12-31 18:00:01.000000000 -0600
++++ a/test/ffi008/ffi008.h 2022-04-13 00:32:35.561262598 -0500
+@@ -10,7 +10,7 @@
+ int16_t b;
+ };
+
+-struct test2 mystruct;
++extern struct test2 mystruct;
+
+ int size1(void);
+ int size2(void);
+--- a/test/ffi008/ffi008.c 1969-12-31 18:00:01.000000000 -0600
++++ a/test/ffi008/ffi008.c 2022-04-13 00:32:53.145186302 -0500
+@@ -11,6 +11,8 @@
+ return sizeof(struct test2);
+ }
+
++struct test2 mystruct;
++
+ void print_mystruct(void) {
+ printf("a: %d b: %d\n", mystruct.a, mystruct.b);
+ }
diff --git a/gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch b/gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch
new file mode 100644
index 0000000000..9325dd3da6
--- /dev/null
+++ b/gnu/packages/patches/openjdk-15-xcursor-no-dynamic.patch
@@ -0,0 +1,72 @@
+From: Danny Milosavljevic <dannym@scratchpost.org>
+Date: Thu, 31 Mar 2022 17:02:00 +0200
+Subject: Make openjdk use libxcursor directly
+
+Fixes <https://issues.guix.gnu.org/54654>.
+
+This patch makes openjdk use libxcursor directly.
+Without it, libx11 would try to dlopen("libXcursor.so.1") and fail.
+
+diff -ru orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk
+--- orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk 2022-03-31 15:34:08.773419480 +0200
++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/make/modules/java.desktop/lib/Awt2dLibraries.gmk 2022-03-31 21:36:27.854273411 +0200
+@@ -217,7 +217,7 @@
+ endif
+ endif
+
+- LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm
++ LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXcursor -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm
+
+ ifeq ($(call isTargetOs, linux), true)
+ LIBAWT_XAWT_LIBS += -lpthread
+diff -ru orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c
+--- orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 2022-03-31 15:34:11.917502206 +0200
++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 2022-03-31 21:38:16.417253535 +0200
+@@ -40,10 +40,12 @@
+ #include <X11/keysym.h>
+ #include <X11/Sunkeysym.h>
+ #include <X11/Xlib.h>
++#include <X11/Xlibint.h>
+ #include <X11/Xatom.h>
+ #include <X11/XKBlib.h>
+ #include <X11/Xos.h>
+ #include <X11/Xutil.h>
++#include <X11/Xcursor/Xcursor.h>
+
+ #if defined(AIX)
+ #undef X_HAVE_UTF8_STRING
+@@ -972,10 +974,21 @@
+
+ }
+
++static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */
++static XColor _Xconst background = { 0, 65535, 65535, 65535 }; /* white */
++
+ JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XCreateFontCursor
+ (JNIEnv *env, jclass clazz, jlong display, jint shape) {
+ AWT_CHECK_HAVE_LOCK_RETURN(0);
+- return XCreateFontCursor((Display *) jlong_to_ptr(display), (int) shape);
++ Display * dpy = (Display *) jlong_to_ptr(display);
++ if (dpy->cursor_font == None) {
++ dpy->cursor_font = XLoadFont(dpy, "cursor");
++ if (dpy->cursor_font == None) return None;
++ }
++ Cursor result = XcursorTryShapeCursor(dpy, dpy->cursor_font, dpy->cursor_font, (int) shape, (int) shape + 1, &foreground, &background);
++ if (!result)
++ result = XCreateFontCursor(dpy, (int) shape);
++ return result;
+ }
+
+ /*
+diff -ru orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix
+--- orig/22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix 2022-03-31 15:34:10.553466316 +0200
++++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/test/jdk/java/awt/JAWT/Makefile.unix 2022-03-31 21:36:27.854273411 +0200
+@@ -31,7 +31,7 @@
+
+ J_INC = $(TESTJAVA)/include
+ INCLUDES = -I$(J_INC) -I$(J_INC)/$(SYST) -I.
+-LIBS = -L$(TESTJAVA)/lib -ljawt -lX11
++LIBS = -L$(TESTJAVA)/lib -ljawt -lX11 -lXcursor
+
+ all: $(CLASSES) libmylib.so
+
diff --git a/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch b/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch
deleted file mode 100644
index 366ae3890a..0000000000
--- a/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Naur pigx_rnaseq-0.0.19/configure.ac pigx_rnaseq-0.0.19.patched/configure.ac
---- pigx_rnaseq-0.0.19/configure.ac 2021-07-23 14:01:00.304391428 +0200
-+++ pigx_rnaseq-0.0.19.patched/configure.ac 2021-10-06 13:51:29.512960106 +0200
-@@ -38,7 +38,6 @@
- find_or_override_prog([GNUBASH], [bash])
- find_or_override_prog([SNAKEMAKE], [snakemake])
- find_or_override_prog([PANDOC], [pandoc])
--find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
- find_or_override_prog([STAR], [STAR])
- find_or_override_prog([HISAT2], [hisat2])
- find_or_override_prog([HISAT2_BUILD], [hisat2-build])
-diff -Naur pigx_rnaseq-0.0.19/Makefile.in pigx_rnaseq-0.0.19.patched/Makefile.in
---- pigx_rnaseq-0.0.19/Makefile.in 2021-08-13 13:40:10.402922844 +0200
-+++ pigx_rnaseq-0.0.19.patched/Makefile.in 2021-10-06 13:51:04.052247524 +0200
-@@ -410,7 +410,6 @@
- PACKAGE_URL = @PACKAGE_URL@
- PACKAGE_VERSION = @PACKAGE_VERSION@
- PANDOC = @PANDOC@
--PANDOC_CITEPROC = @PANDOC_CITEPROC@
- PATH_SEPARATOR = @PATH_SEPARATOR@
- PYTHON = @PYTHON@
- PYTHONPATH = @PYTHONPATH@
-diff -Naur pigx_rnaseq-0.0.19/pigx-common/common/pigx-runner.in pigx_rnaseq-0.0.19.patched/pigx-common/common/pigx-runner.in
---- pigx_rnaseq-0.0.19/pigx-common/common/pigx-runner.in 2021-08-13 13:27:50.494352532 +0200
-+++ pigx_rnaseq-0.0.19.patched/pigx-common/common/pigx-runner.in 2021-10-06 13:51:38.798220108 +0200
-@@ -379,7 +379,6 @@
- if path.exists(bin): shutil.rmtree(bin)
- os.makedirs(bin, exist_ok=True)
- os.symlink('@PANDOC@', path.join(bin, "pandoc"))
-- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
- os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
- os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
- os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch b/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch
deleted file mode 100644
index 3f34bca6b2..0000000000
--- a/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Naur pigx_sars-cov2-ww-0.0.3/configure.ac pigx_sars-cov2-ww-0.0.3.patched/configure.ac
---- pigx_sars-cov2-ww-0.0.3/configure.ac 2021-06-10 10:12:00.552889984 +0200
-+++ pigx_sars-cov2-ww-0.0.3.patched/configure.ac 2021-10-05 14:52:32.318695129 +0200
-@@ -50,7 +50,6 @@
- find_or_override_prog([MULTIQC], [multiqc])
- find_or_override_prog([WGET], [wget])
- find_or_override_prog([PANDOC], [pandoc])
--find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
-
- AC_ARG_ENABLE([r-packages-check],
- AS_HELP_STRING([--disable-r-packages-check], [Do not check any R packages.]),
-diff -Naur pigx_sars-cov2-ww-0.0.3/Makefile.in pigx_sars-cov2-ww-0.0.3.patched/Makefile.in
---- pigx_sars-cov2-ww-0.0.3/Makefile.in 2021-08-05 16:33:59.164123383 +0200
-+++ pigx_sars-cov2-ww-0.0.3.patched/Makefile.in 2021-10-05 14:52:41.272958547 +0200
-@@ -402,7 +402,6 @@
- PACKAGE_URL = @PACKAGE_URL@
- PACKAGE_VERSION = @PACKAGE_VERSION@
- PANDOC = @PANDOC@
--PANDOC_CITEPROC = @PANDOC_CITEPROC@
- PATH_SEPARATOR = @PATH_SEPARATOR@
- PRINSEQ = @PRINSEQ@
- PYTHON = @PYTHON@
-diff -Naur pigx_sars-cov2-ww-0.0.3/pigx-common/common/pigx-runner.in pigx_sars-cov2-ww-0.0.3.patched/pigx-common/common/pigx-runner.in
---- pigx_sars-cov2-ww-0.0.3/pigx-common/common/pigx-runner.in 2021-07-30 11:10:17.913115902 +0200
-+++ pigx_sars-cov2-ww-0.0.3.patched/pigx-common/common/pigx-runner.in 2021-10-05 14:52:23.602438714 +0200
-@@ -379,7 +379,6 @@
- if path.exists(bin): shutil.rmtree(bin)
- os.makedirs(bin, exist_ok=True)
- os.symlink('@PANDOC@', path.join(bin, "pandoc"))
-- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
- os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
- os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
- os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch b/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch
deleted file mode 100644
index 4cce33fb01..0000000000
--- a/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Naur pigx_scrnaseq-1.1.7/configure.ac pigx_scrnaseq-1.1.7.patched/configure.ac
---- pigx_scrnaseq-1.1.7/configure.ac 2020-03-17 14:37:46.000000000 +0100
-+++ pigx_scrnaseq-1.1.7.patched/configure.ac 2021-10-06 13:55:49.779271317 +0200
-@@ -43,7 +43,6 @@
- find_or_override_prog([GNUBASH], [bash])
- find_or_override_prog([SNAKEMAKE], [snakemake])
- find_or_override_prog([PANDOC], [pandoc])
--find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
- find_or_override_prog([FASTQC], [fastqc])
- find_or_override_prog([STAR], [STAR])
- find_or_override_prog([SAMTOOLS], [samtools])
-diff -Naur pigx_scrnaseq-1.1.7/Makefile.in pigx_scrnaseq-1.1.7.patched/Makefile.in
---- pigx_scrnaseq-1.1.7/Makefile.in 2020-11-30 16:55:48.000000000 +0100
-+++ pigx_scrnaseq-1.1.7.patched/Makefile.in 2021-10-06 13:55:52.224340194 +0200
-@@ -395,7 +395,6 @@
- PACKAGE_URL = @PACKAGE_URL@
- PACKAGE_VERSION = @PACKAGE_VERSION@
- PANDOC = @PANDOC@
--PANDOC_CITEPROC = @PANDOC_CITEPROC@
- PATH_SEPARATOR = @PATH_SEPARATOR@
- PERL = @PERL@
- PYTHON = @PYTHON@
-diff -Naur pigx_scrnaseq-1.1.7/pigx-scrnaseq.in pigx_scrnaseq-1.1.7.patched/pigx-scrnaseq.in
---- pigx_scrnaseq-1.1.7/pigx-scrnaseq.in 2020-11-30 16:08:55.000000000 +0100
-+++ pigx_scrnaseq-1.1.7.patched/pigx-scrnaseq.in 2021-10-06 13:55:47.889218079 +0200
-@@ -274,7 +274,6 @@
- if path.exists(bin): shutil.rmtree(bin)
- os.makedirs(bin, exist_ok=True)
- os.symlink('@PANDOC@', path.join(bin, "pandoc"))
-- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
- os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
- os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
- os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/python-robotframework-atest.patch b/gnu/packages/patches/python-robotframework-atest.patch
new file mode 100644
index 0000000000..619ed61b65
--- /dev/null
+++ b/gnu/packages/patches/python-robotframework-atest.patch
@@ -0,0 +1,61 @@
+Patch submitted upstream: https://github.com/robotframework/robotframework/pull/4286.
+
+diff --git a/atest/robot/standard_libraries/operating_system/modified_time.robot b/atest/robot/standard_libraries/operating_system/modified_time.robot
+index d144ffd34..c7681e61d 100644
+--- a/atest/robot/standard_libraries/operating_system/modified_time.robot
++++ b/atest/robot/standard_libraries/operating_system/modified_time.robot
+@@ -8,7 +8,7 @@ ${TESTFILE} %{TEMPDIR}${/}robot-os-tests${/}f1.txt
+ *** Test Cases ***
+ Get Modified Time As Timestamp
+ ${tc} = Check Test Case ${TESTNAME}
+- Should Match Regexp ${tc.kws[0].msgs[0].message} Last modified time of '<a href=.*</a>' is 20\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d
++ Should Match Regexp ${tc.kws[0].msgs[0].message} Last modified time of '<a href=.*</a>' is \\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d
+
+ Get Modified Time As Seconds After Epoch
+ ${tc} = Check Test Case ${TESTNAME}
+diff --git a/atest/testdata/standard_libraries/builtin/get_time.robot b/atest/testdata/standard_libraries/builtin/get_time.robot
+index 9847d8c42..24ce732ca 100644
+--- a/atest/testdata/standard_libraries/builtin/get_time.robot
++++ b/atest/testdata/standard_libraries/builtin/get_time.robot
+@@ -11,18 +11,18 @@ Get Time As Timestamp
+
+ Get Time As Seconds After Epoch
+ ${time} = Get Time epoch
+- Should Be True 1000000000 < ${time} < 2000000000
++ Should Be True 0 < ${time}
+
+ Get Time As Parts
+ @{time} = Get Time year, month, day, hour, min, sec
+- Should Be True 2000 < ${time}[0] < 2100
++ Should Match Regexp ${time}[0] \\d{4}
+ Should Be True 1 <= int('${time}[1]') <= 12
+ Should Be True 1 <= int('${time}[2]') <= 31
+ Should Be True 0 <= int('${time}[3]') <= 23
+ Should Be True 0 <= int('${time}[4]') <= 59
+ Should Be True 0 <= int('${time}[5]') <= 59
+ ${year} ${min} ${sec} = Get Time seconds and minutes and year and whatnot
+- Should Be True 2000 < ${year} < 2100
++ Should Match Regexp ${year} \\d{4}
+ Should Be True 0 <= int('${min}') <= 59
+ Should Be True 0 <= int('${sec}') <= 59
+
+diff --git a/atest/testdata/standard_libraries/operating_system/modified_time.robot b/atest/testdata/standard_libraries/operating_system/modified_time.robot
+index 9489b3c9c..c712ebaed 100644
+--- a/atest/testdata/standard_libraries/operating_system/modified_time.robot
++++ b/atest/testdata/standard_libraries/operating_system/modified_time.robot
+@@ -14,13 +14,13 @@ Get Modified Time As Timestamp
+
+ Get Modified Time As Seconds After Epoch
+ ${dirtime} = Get Modified Time ${CURDIR} epoch
+- Should Be True 1000000000 < ${dirtime} < 2000000000
++ Should Be True ${dirtime} > 0
+ ${current} = Get Time epoch
+ Should Be True ${current} >= ${dirtime}
+
+ Get Modified Time As Parts
+ ${year} = Get Modified Time ${CURDIR} year
+- Should Be True 2000 < ${year} < 2100
++ Should Match Regexp ${year} \\d{4}
+ ${yyyy} ${mm} ${dd} = Get Modified Time ${CURDIR} year, month, day
+ Should Be Equal ${yyyy} ${year}
+ # Must use `int('x')` because otherwise 08 and 09 are considered octal
diff --git a/gnu/packages/patches/python-robotframework-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-source-date-epoch.patch
index 11424bf4db..7f00d82061 100644
--- a/gnu/packages/patches/python-robotframework-source-date-epoch.patch
+++ b/gnu/packages/patches/python-robotframework-source-date-epoch.patch
@@ -1,12 +1,64 @@
-Do not embed any timestamp in the built documentation.
-
-Upstream issue: https://github.com/robotframework/robotframework/issues/4262.
+Patch submitted upstream: https://github.com/robotframework/robotframework/pull/4286.
+diff --git a/BUILD.rst b/BUILD.rst
+index 67902dd09..749c53fde 100644
+--- a/BUILD.rst
++++ b/BUILD.rst
+@@ -204,6 +204,9 @@ Creating distributions
+
+ 7. Documentation
+
++ - For a reproducible build, set the ``SOURCE_DATE_EPOCH``
++ environment variable to 1.
++
+ - Generate library documentation::
+
+ invoke library-docs all
+diff --git a/atest/robot/libdoc/html_output.robot b/atest/robot/libdoc/html_output.robot
+index f42a4b150..af428c967 100644
+--- a/atest/robot/libdoc/html_output.robot
++++ b/atest/robot/libdoc/html_output.robot
+@@ -15,7 +15,7 @@ Version
+
+ Generated
+ [Template] Should Match Regexp
+- ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}
++ ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}[+-]\\d{2}:\\d{2}
+
+ Scope
+ ${MODEL}[scope] GLOBAL
+diff --git a/atest/robot/libdoc/json_output.robot b/atest/robot/libdoc/json_output.robot
+index 78305a458..654603704 100644
+--- a/atest/robot/libdoc/json_output.robot
++++ b/atest/robot/libdoc/json_output.robot
+@@ -15,7 +15,7 @@ Version
+
+ Generated
+ [Template] Should Match Regexp
+- ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}
++ ${MODEL}[generated] \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}[+-]\\d{2}:\\d{2}
+
+ Scope
+ ${MODEL}[scope] GLOBAL
+diff --git a/atest/robot/libdoc/libdoc_resource.robot b/atest/robot/libdoc/libdoc_resource.robot
+index bd7c10ecd..b7e06aacc 100644
+--- a/atest/robot/libdoc/libdoc_resource.robot
++++ b/atest/robot/libdoc/libdoc_resource.robot
+@@ -92,7 +92,8 @@ Lineno Should Be
+ Element Attribute Should Be ${LIBDOC} lineno ${lineno}
+
+ Generated Should Be Defined
+- Element Attribute Should Match ${LIBDOC} generated ????-??-??T??:??:??Z
++ # For example, '1970-01-01T00:00:01+00:00'.
++ Element Attribute Should Match ${LIBDOC} generated ????-??-??T??:??:?????:??
+
+ Spec version should be correct
+ Element Attribute Should Be ${LIBDOC} specversion 4
diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py
-index 43cdb31bd..550e74a79 100755
+index 033203552..b278c71c8 100755
--- a/doc/userguide/ug2html.py
+++ b/doc/userguide/ug2html.py
-@@ -158,8 +158,7 @@ def create_userguide():
+@@ -150,8 +150,7 @@ def create_userguide():
install_file = _copy_installation_instructions()
description = 'HTML generator for Robot Framework User Guide.'
@@ -17,48 +69,97 @@ index 43cdb31bd..550e74a79 100755
'RobotFrameworkUserGuide.html']
os.chdir(CURDIR)
diff --git a/src/robot/libdocpkg/model.py b/src/robot/libdocpkg/model.py
-index 4d9ffd70b..5c276d1d6 100644
+index 5f44039ef..c36bf4a49 100644
--- a/src/robot/libdocpkg/model.py
+++ b/src/robot/libdocpkg/model.py
-@@ -14,6 +14,7 @@
- # limitations under the License.
+@@ -19,7 +19,7 @@ from itertools import chain
- import json
-+import os
- import re
- from itertools import chain
+ from robot.model import Tags
+ from robot.running import ArgumentSpec
+-from robot.utils import getshortdoc, get_timestamp, Sortable, setter
++from robot.utils import get_timestamp_for_doc, getshortdoc, Sortable, setter
-@@ -113,7 +114,8 @@ class LibraryDoc(object):
+ from .htmlutils import DocFormatter, DocToHtml, HtmlToText
+ from .writer import LibdocWriter
+@@ -113,7 +113,7 @@ class LibraryDoc:
'name': self.name,
'doc': self.doc,
'version': self.version,
- 'generated': get_timestamp(daysep='-', millissep=None),
-+ 'generated': ('' if os.environ['SOURCE_DATE_EPOCH']
-+ else get_timestamp(daysep='-', millissep=None)),
++ 'generated': get_timestamp_for_doc(),
'type': self.type,
'scope': self.scope,
'docFormat': self.doc_format,
diff --git a/src/robot/libdocpkg/xmlwriter.py b/src/robot/libdocpkg/xmlwriter.py
-index 3882e1219..4a84fb42e 100644
+index a765ebb2b..980debebb 100644
--- a/src/robot/libdocpkg/xmlwriter.py
+++ b/src/robot/libdocpkg/xmlwriter.py
-@@ -14,6 +14,8 @@
+@@ -13,9 +13,7 @@
+ # See the License for the specific language governing permissions and
# limitations under the License.
- import os.path
-+import os
-+
- from datetime import datetime
+-from datetime import datetime
+-
+-from robot.utils import XmlWriter
++from robot.utils import XmlWriter, get_timestamp_for_doc
+
- from robot.utils import WINDOWS, XmlWriter, unicode
-@@ -30,7 +32,9 @@ class LibdocXmlWriter(object):
+ class LibdocXmlWriter:
+@@ -32,12 +30,11 @@ class LibdocXmlWriter:
self._write_end(writer)
def _write_start(self, libdoc, writer):
- generated = datetime.utcnow().replace(microsecond=0).isoformat() + 'Z'
-+ generated = (
-+ '' if os.environ['SOURCE_DATE_EPOCH']
-+ else datetime.utcnow().replace(microsecond=0).isoformat() + 'Z')
attrs = {'name': libdoc.name,
'type': libdoc.type,
'format': libdoc.doc_format,
+ 'scope': libdoc.scope,
+- 'generated': generated,
++ 'generated': get_timestamp_for_doc(),
+ 'specversion': '4'}
+ self._add_source_info(attrs, libdoc)
+ writer.start('keywordspec', attrs)
+diff --git a/src/robot/utils/__init__.py b/src/robot/utils/__init__.py
+index 442ffa4f3..80793ec29 100644
+--- a/src/robot/utils/__init__.py
++++ b/src/robot/utils/__init__.py
+@@ -58,9 +58,9 @@ from .robotinspect import is_init
+ from .robotio import binary_file_writer, create_destination_directory, file_writer
+ from .robotpath import abspath, find_file, get_link_path, normpath
+ from .robottime import (elapsed_time_to_string, format_time, get_elapsed_time,
+- get_time, get_timestamp, secs_to_timestamp,
+- secs_to_timestr, timestamp_to_secs, timestr_to_secs,
+- parse_time)
++ get_time, get_timestamp, get_timestamp_for_doc,
++ secs_to_timestamp, secs_to_timestr, timestamp_to_secs,
++ timestr_to_secs, parse_time)
+ from .robottypes import (FALSE_STRINGS, TRUE_STRINGS, is_bytes, is_dict_like, is_falsy,
+ is_integer, is_list_like, is_number, is_pathlike, is_string,
+ is_truthy, is_union, type_name, type_repr, typeddict_types)
+diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py
+index 97a7d1af0..4a0ba2d83 100644
+--- a/src/robot/utils/robottime.py
++++ b/src/robot/utils/robottime.py
+@@ -13,6 +13,8 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
++import datetime
++import os
+ import re
+ import time
+
+@@ -316,6 +318,13 @@ def get_timestamp(daysep='', daytimesep=' ', timesep=':', millissep='.'):
+ return TIMESTAMP_CACHE.get_timestamp(daysep, daytimesep, timesep, millissep)
+
+
++def get_timestamp_for_doc():
++ """Return a timestamp that honors `SOURCE_DATE_EPOCH`."""
++ ts = float(os.getenv('SOURCE_DATE_EPOCH', time.time()))
++ dt = datetime.datetime.fromtimestamp(round(ts), datetime.timezone.utc)
++ return dt.isoformat()
++
++
+ def timestamp_to_secs(timestamp, seps=None):
+ try:
+ secs = _timestamp_to_millis(timestamp, seps) / 1000.0
diff --git a/gnu/packages/patches/python-robotframework-ug2html.patch b/gnu/packages/patches/python-robotframework-ug2html.patch
deleted file mode 100644
index eea88e01f3..0000000000
--- a/gnu/packages/patches/python-robotframework-ug2html.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Do not require the obsolete robotframeworklexer.
-
-Submitted upstream at: https://github.com/robotframework/robotframework/pull/4265.
-diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py
-index 43cdb31bd..033203552 100755
---- a/doc/userguide/ug2html.py
-+++ b/doc/userguide/ug2html.py
-@@ -93,34 +93,26 @@ from docutils.parsers.rst import directives
- from pygments import highlight, __version__ as pygments_version
- from pygments.lexers import get_lexer_by_name
-
--# Use latest version, not version bundled with Pygments
--import robotframeworklexer
--
-
- def too_old(version_string, minimum):
- version = tuple(int(v) for v in version_string.split('.')[:2])
- return version < minimum
-
-
--if too_old(getattr(robotframeworklexer, '__version__', '1.0'), (1, 1)):
-- sys.exit('robotframeworklexer >= 1.1 is required.')
--if too_old(pygments_version, (2, 1)):
-- sys.exit('Pygments >= 2.1 is required.')
-+if too_old(pygments_version, (2, 8)):
-+ sys.exit('Pygments >= 2.8 is required.')
-
-
- def pygments_directive(name, arguments, options, content, lineno,
- content_offset, block_text, state, state_machine):
- try:
-- if arguments[0] == 'robotframework':
-- lexer = robotframeworklexer.RobotFrameworkLexer()
-- else:
-- lexer = get_lexer_by_name(arguments[0])
-+ lexer = get_lexer_by_name(arguments[0])
- except ValueError as err:
- raise ValueError(f'Invalid syntax highlighting language "{arguments[0]}".')
- # take an arbitrary option if more than one is given
- formatter = options and VARIANTS[options.keys()[0]] or DEFAULT
- # possibility to read the content from an external file
-- filtered = [ line for line in content if line.strip() ]
-+ filtered = [line for line in content if line.strip()]
- if len(filtered) == 1:
- path = filtered[0].replace('/', os.sep)
- if os.path.isfile(path):
-diff --git a/requirements-build.txt b/requirements-build.txt
-index e0f5e19a2..a2fcdcfd5 100644
---- a/requirements-build.txt
-+++ b/requirements-build.txt
-@@ -5,5 +5,4 @@ rellu >= 0.7
- twine >= 1.12
- wheel
- docutils
--pygments >= 2.1
--robotframeworklexer >= 1.1
-+pygments >= 2.8
diff --git a/gnu/packages/patches/python-w3lib-fix-test-failure.patch b/gnu/packages/patches/python-w3lib-fix-test-failure.patch
new file mode 100644
index 0000000000..f38fc749df
--- /dev/null
+++ b/gnu/packages/patches/python-w3lib-fix-test-failure.patch
@@ -0,0 +1,60 @@
+From fae6cc40e112cd13697cb0e8d79976f32c72491d Mon Sep 17 00:00:00 2001
+From: Eugenio Lacuesta <eugenio.lacuesta@gmail.com>
+Date: Wed, 10 Mar 2021 12:31:05 -0300
+Subject: [PATCH] [CI] Mark single add_or_replace_parameter test as xfail
+
+---
+This patch is based on upstream commit
+fae6cc40e112cd13697cb0e8d79976f32c72491d which is part of
+https://github.com/scrapy/w3lib/pull/166.
+
+ .gitignore | 3 ++-
+ tests/test_url.py | 25 ++++++++++++++-----------
+ 2 files changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/tests/test_url.py b/tests/test_url.py
+index 8b07c00..0f7458e 100644
+--- a/tests/test_url.py
++++ b/tests/test_url.py
+@@ -1,12 +1,14 @@
+-# -*- coding: utf-8 -*-
+ from __future__ import absolute_import
+ import os
+ import unittest
++
++import pytest
++from six.moves.urllib.parse import urlparse
++
+ from w3lib.url import (is_url, safe_url_string, safe_download_url,
+ url_query_parameter, add_or_replace_parameter, url_query_cleaner,
+ file_uri_to_path, parse_data_uri, path_to_file_uri, any_to_uri,
+ urljoin_rfc, canonicalize_url, parse_url, add_or_replace_parameters)
+-from six.moves.urllib.parse import urlparse
+
+
+ class UrlTests(unittest.TestCase):
+@@ -310,10 +311,6 @@ def test_add_or_replace_parameter(self):
+ self.assertEqual(add_or_replace_parameter(url, 'arg3', 'nv3'),
+ 'http://domain/test?arg1=v1&arg2=v2&arg3=nv3')
+
+- url = 'http://domain/test?arg1=v1;arg2=v2'
+- self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'),
+- 'http://domain/test?arg1=v3&arg2=v2')
+-
+ self.assertEqual(add_or_replace_parameter("http://domain/moreInfo.asp?prodID=", 'prodID', '20'),
+ 'http://domain/moreInfo.asp?prodID=20')
+ url = 'http://rmc-offers.co.uk/productlist.asp?BCat=2%2C60&CatID=60'
+@@ -338,6 +335,13 @@ def test_add_or_replace_parameter(self):
+ self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'),
+ 'http://domain/test?arg1=v3&arg2=v2')
+
++ @pytest.mark.xfail(reason="https://github.com/scrapy/w3lib/issues/164")
++ def test_add_or_replace_parameter_fail(self):
++ self.assertEqual(
++ add_or_replace_parameter('http://domain/test?arg1=v1;arg2=v2', 'arg1', 'v3'),
++ 'http://domain/test?arg1=v3&arg2=v2'
++ )
++
+ def test_add_or_replace_parameters(self):
+ url = 'http://domain/test'
+ self.assertEqual(add_or_replace_parameters(url, {'arg': 'v'}),
diff --git a/gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch b/gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch
new file mode 100644
index 0000000000..7f100d04bd
--- /dev/null
+++ b/gnu/packages/patches/rust-ndarray-0.14-remove-blas-src.patch
@@ -0,0 +1,25 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 57924f1..0c59727 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -43,11 +43,6 @@ bench = false
+ version = "0.4"
+ optional = true
+
+-[dependencies.blas-src]
+-version = "0.6.1"
+-optional = true
+-default-features = false
+-
+ [dependencies.cblas-sys]
+ version = "0.1.4"
+ optional = true
+@@ -92,7 +87,7 @@ version = "0.9"
+ default-features = false
+
+ [features]
+-blas = ["cblas-sys", "blas-src"]
++blas = ["cblas-sys"]
+ docs = ["approx", "serde", "rayon"]
+ serde-1 = ["serde"]
+ test = ["test-blas-openblas-sys"]
diff --git a/gnu/packages/patches/tremc-fix-decodestring.patch b/gnu/packages/patches/tremc-fix-decodestring.patch
deleted file mode 100644
index 346f65e611..0000000000
--- a/gnu/packages/patches/tremc-fix-decodestring.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 79995bc82e81f0429222aab4d90a03440feef057 Mon Sep 17 00:00:00 2001
-From: Matan Ziv-Av <matan@svgalib.org>
-Date: Mon, 29 Jun 2020 15:18:03 +0300
-Subject: [PATCH] Use base64.decodebytes.
-
-Based on upstream commit 79995bc82e81f0429222aab4d90a03440feef057 which
-confuses several unrelated changes.
-
----
- tremc | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/tremc b/tremc
-index b47f012..c626fde 100755
---- a/tremc
-+++ b/tremc
-@@ -440,7 +443,7 @@ class Transmission(object):
- # TAG_TORRENT_DETAILS, but just passing seems to help.(?)
- try:
- torrent_details = response['arguments']['torrents'][0]
-- torrent_details['pieces'] = base64.decodestring(bytes(torrent_details['pieces'], ENCODING))
-+ torrent_details['pieces'] = base64.decodebytes(bytes(torrent_details['pieces'], ENCODING))
- self.torrent_details_cache = torrent_details
- self.upgrade_peerlist()
- except IndexError:
diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
index e3ec92be84..73e5878546 100644
--- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
+++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch
@@ -1,39 +1,15 @@
-From f060e90d148270307228315e2759a0065ec1d796 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Fri, 22 Oct 2021 17:34:53 -0700
Subject: [PATCH] Revert "tools: kwbimage: Do not hide usage of secure header
under CONFIG_ARMADA_38X"
This reverts commit b4f3cc2c42d97967a3a3c8796c340f6b07ecccac.
----
- tools/Makefile | 8 ++++++++
- tools/kwbimage.c | 22 ++++++++++++++++++++++
- 2 files changed, 30 insertions(+)
-diff --git a/tools/Makefile b/tools/Makefile
-index 4a86321f64..9517f203fd 100644
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -169,6 +169,14 @@ HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0xffffffff
- HOST_EXTRACFLAGS += -DCONFIG_FIT_CIPHER
- endif
-
-+ifneq ($(CONFIG_SYS_U_BOOT_OFFS),)
-+HOSTCFLAGS_kwbimage.o += -DCONFIG_SYS_U_BOOT_OFFS=$(CONFIG_SYS_U_BOOT_OFFS)
-+endif
-+
-+ifneq ($(CONFIG_ARMADA_38X),)
-+HOSTCFLAGS_kwbimage.o += -DCONFIG_KWB_SECURE
-+endif
-+
- # MXSImage needs LibSSL
- ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_TOOLS_LIBCRYPTO),)
- HOSTCFLAGS_kwbimage.o += \
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
-index d200ff2425..23d6be3c9a 100644
+index 94b7685392..eec599b0ee 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
-@@ -14,6 +14,7 @@
+@@ -19,6 +19,7 @@
#include <stdint.h>
#include "kwbimage.h"
@@ -41,12 +17,16 @@ index d200ff2425..23d6be3c9a 100644
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
-@@ -39,10 +40,13 @@ void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
+@@ -44,6 +45,7 @@ void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
EVP_MD_CTX_reset(ctx);
}
#endif
+#endif
+ /* fls - find last (most-significant) bit set in 4-bit integer */
+ static inline int fls4(int num)
+@@ -62,7 +64,9 @@ static inline int fls4(int num)
+
static struct image_cfg_element *image_cfg;
static int cfgn;
+#ifdef CONFIG_KWB_SECURE
@@ -55,7 +35,7 @@ index d200ff2425..23d6be3c9a 100644
struct boot_mode {
unsigned int id;
-@@ -237,6 +241,8 @@ image_count_options(unsigned int optiontype)
+@@ -278,6 +282,8 @@ image_count_options(unsigned int optiontype)
return count;
}
@@ -64,16 +44,15 @@ index d200ff2425..23d6be3c9a 100644
static int image_get_csk_index(void)
{
struct image_cfg_element *e;
-@@ -259,6 +265,8 @@ static bool image_get_spezialized_img(void)
- return e->sec_specialized_img;
- }
+@@ -288,6 +294,7 @@ static int image_get_csk_index(void)
+ return e->csk_idx;
+ }
+#endif
-+
- /*
- * Compute a 8-bit checksum of a memory area. This algorithm follows
- * the requirements of the Marvell SoC BootROM specifications.
-@@ -353,6 +361,7 @@ static uint8_t baudrate_to_option(unsigned int baudrate)
+
+ static bool image_get_spezialized_img(void)
+ {
+@@ -432,6 +439,7 @@ static uint8_t baudrate_to_option(unsigned int baudrate)
}
}
@@ -81,18 +60,17 @@ index d200ff2425..23d6be3c9a 100644
static void kwb_msg(const char *fmt, ...)
{
if (verbose_mode) {
-@@ -847,6 +856,8 @@ done:
+@@ -926,6 +934,7 @@ static int kwb_dump_fuse_cmds(struct secure_hdr_v1 *sec_hdr)
+ done:
return ret;
}
-
+#endif
-+
- static void *image_create_v0(size_t *imagesz, struct image_tool_params *params,
- int payloadsz)
+
+ static size_t image_headersz_align(size_t headersz, uint8_t blockid)
{
-@@ -977,11 +988,13 @@ static size_t image_headersz_v1(int *hasext)
- *hasext = 1;
- }
+@@ -1079,11 +1088,13 @@ static size_t image_headersz_v1(int *hasext)
+ */
+ headersz = sizeof(struct main_hdr_v1);
+#if defined(CONFIG_KWB_SECURE)
if (image_get_csk_index() >= 0) {
@@ -102,28 +80,27 @@ index d200ff2425..23d6be3c9a 100644
}
+#endif
- /*
- * The payload should be aligned on some reasonable
-@@ -1058,6 +1071,8 @@ err_close:
+ cpu_sheeva = image_is_cpu_sheeva();
+
+@@ -1270,6 +1281,7 @@ err_close:
return -1;
}
+#if defined(CONFIG_KWB_SECURE)
-+
- int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr)
+ static int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr)
{
FILE *hashf;
-@@ -1170,6 +1185,7 @@ int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr,
+@@ -1382,6 +1394,7 @@ static int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr,
return 0;
}
+#endif
- static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
- uint8_t *ptr, int payloadsz)
-@@ -1177,7 +1193,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
- struct image_cfg_element *e;
+ static void finish_register_set_header_v1(uint8_t **cur, uint8_t **next_ext,
+ struct register_set_hdr_v1 *register_set_hdr,
+@@ -1406,7 +1419,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
struct main_hdr_v1 *main_hdr;
+ struct opt_hdr_v1 *ohdr;
struct register_set_hdr_v1 *register_set_hdr;
+#if defined(CONFIG_KWB_SECURE)
struct secure_hdr_v1 *secure_hdr = NULL;
@@ -131,7 +108,7 @@ index d200ff2425..23d6be3c9a 100644
size_t headersz;
uint8_t *image, *cur;
int hasext = 0;
-@@ -1253,6 +1271,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
+@@ -1491,6 +1506,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
if (main_hdr->blockid == IBR_HDR_PEX_ID)
main_hdr->srcaddr = cpu_to_le32(0xFFFFFFFF);
@@ -139,26 +116,24 @@ index d200ff2425..23d6be3c9a 100644
if (image_get_csk_index() >= 0) {
/*
* only reserve the space here; we fill the header later since
-@@ -1263,6 +1282,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
+@@ -1501,7 +1517,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
*next_ext = 1;
next_ext = &secure_hdr->next;
}
+-
+#endif
-
datai = 0;
- register_set_hdr = (struct register_set_hdr_v1 *)cur;
-@@ -1310,9 +1330,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
- return NULL;
+ for (cfgi = 0; cfgi < cfgn; cfgi++) {
+ e = &image_cfg[cfgi];
+@@ -1552,9 +1568,11 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
+ &datai, delay);
}
+#if defined(CONFIG_KWB_SECURE)
- if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz,
+ if (secure_hdr && add_secure_header_v1(params, ptr, payloadsz + headersz,
headersz, image, secure_hdr))
return NULL;
+#endif
- /* Calculate and set the header checksum */
- main_hdr->checksum = image_checksum8(main_hdr, headersz);
---
-2.30.2
-
+ *imagesz = headersz;
+
diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
deleted file mode 100644
index 468024ab00..0000000000
--- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3fc056f0b9f7c26e58a1e947c8c0184e55919614 Mon Sep 17 00:00:00 2001
-From: David Abdurachmanov <david.abdurachmanov@gmail.com>
-Date: Wed, 21 Aug 2019 12:07:20 -0700
-Subject: [PATCH] qemu-riscv64_smode, sifive-fu540: fix extlinux (define
- preboot)
-Forwarded: https://patchwork.ozlabs.org/patch/1151125/
-
-Commit 37304aaf60bf92a5dc3ef222ba520698bd862a44 removed preboot
-commands in RISC-V targets and broke extlinux support as reported
-by Fu Wei <wefu@redhat.com>.
-
-The patch finishes migration of CONFIG_USE_PREBOOT and CONFIG_REBOOT
-to Kconfig.
-
-Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
----
- configs/qemu-riscv64_smode_defconfig | 2 ++
- configs/sifive_fu540_defconfig | 2 ++
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-Index: u-boot/configs/qemu-riscv64_smode_defconfig
-===================================================================
---- u-boot.orig/configs/qemu-riscv64_smode_defconfig
-+++ u-boot/configs/qemu-riscv64_smode_defconfig
-@@ -14,3 +14,5 @@ CONFIG_CMD_NVEDIT_EFI=y
- CONFIG_OF_PRIOR_STAGE=y
- CONFIG_SYS_RELOC_GD_ENV_ADDR=y
- CONFIG_DM_MTD=y
-+CONFIG_USE_PREBOOT=y
-+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
-Index: u-boot/configs/sifive_fu540_defconfig
-===================================================================
---- u-boot.orig/configs/sifive_unleashed_defconfig
-+++ u-boot/configs/sifive_unleashed_defconfig
-@@ -27,3 +27,5 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
- CONFIG_SPL_CLK=y
- CONFIG_DM_MTD=y
- CONFIG_DM_RESET=y
-+CONFIG_USE_PREBOOT=y
-+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
deleted file mode 100644
index 27013180c4..0000000000
--- a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream commit: https://github.com/WebKit/WebKit/commit/31ac354cbeecf866f9a38f7b2f8f59f7975d3f6a
-
-diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-index ecc804663784..8de174be3c0e 100644
---- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-@@ -288,6 +288,7 @@ static void bindFonts(Vector<CString>& args)
- const char* homeDir = g_get_home_dir();
- const char* dataDir = g_get_user_data_dir();
- const char* cacheDir = g_get_user_cache_dir();
-+ const char* const * dataDirs = g_get_system_data_dirs();
-
- // Configs can include custom dirs but then we have to parse them...
- GUniquePtr<char> fontConfig(g_build_filename(configDir, "fontconfig", nullptr));
-@@ -304,6 +305,10 @@ static void bindFonts(Vector<CString>& args)
- bindIfExists(args, fontHomeConfigDir.get());
- bindIfExists(args, fontData.get());
- bindIfExists(args, fontHomeData.get());
-+ for (auto* dataDir = dataDirs; dataDir && *dataDir; dataDir++) {
-+ GUniquePtr<char> fontDataDir(g_build_filename(*dataDir, "fonts", nullptr));
-+ bindIfExists(args, fontDataDir.get());
-+ }
- bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian.
- }
-
diff --git a/gnu/packages/patches/webkitgtk-canonicalize-paths.patch b/gnu/packages/patches/webkitgtk-canonicalize-paths.patch
deleted file mode 100644
index 741d534831..0000000000
--- a/gnu/packages/patches/webkitgtk-canonicalize-paths.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Upstream commit: https://github.com/WebKit/WebKit/commit/6a87eb254ef57a986a1a6ce9a3a4b66928afeb65
-
-diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-index ecc804663784..a2a1c9d7a4dd 100644
---- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
-@@ -27,7 +27,6 @@
- #include <seccomp.h>
- #include <sys/ioctl.h>
- #include <sys/mman.h>
--#include <unistd.h>
- #include <wtf/FileSystem.h>
- #include <wtf/UniStdExtras.h>
- #include <wtf/glib/GRefPtr.h>
-@@ -165,6 +164,15 @@ enum class BindFlags {
- Device,
- };
-
-+static void bindSymlinksRealPath(Vector<CString>& args, const char* path, const char* bindOption = "--ro-bind")
-+{
-+ WTF::String realPath = FileSystem::realPath(path);
-+ if (path != realPath) {
-+ CString rpath = realPath.utf8();
-+ args.appendVector(Vector<CString>({ bindOption, rpath.data(), rpath.data() }));
-+ }
-+}
-+
- static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bindFlags = BindFlags::ReadOnly)
- {
- if (!path || path[0] == '\0')
-@@ -177,7 +185,16 @@ static void bindIfExists(Vector<CString>& args, const char* path, BindFlags bind
- bindType = "--ro-bind-try";
- else
- bindType = "--bind-try";
-- args.appendVector(Vector<CString>({ bindType, path, path }));
-+
-+ // Canonicalize the source path, otherwise a symbolic link could
-+ // point to a location outside of the namespace.
-+ bindSymlinksRealPath(args, path, bindType);
-+
-+ // As /etc is exposed wholesale, do not layer extraneous bind
-+ // directives on top, which could fail in the presence of symbolic
-+ // links.
-+ if (!g_str_has_prefix(path, "/etc/"))
-+ args.appendVector(Vector<CString>({ bindType, path, path }));
- }
-
- static void bindDBusSession(Vector<CString>& args, bool allowPortals)
-@@ -410,17 +427,6 @@ static void bindV4l(Vector<CString>& args)
- }));
- }
-
--static void bindSymlinksRealPath(Vector<CString>& args, const char* path)
--{
-- char realPath[PATH_MAX];
--
-- if (realpath(path, realPath) && strcmp(path, realPath)) {
-- args.appendVector(Vector<CString>({
-- "--ro-bind", realPath, realPath,
-- }));
-- }
--}
--
- // Translate a libseccomp error code into an error message. libseccomp
- // mostly returns negative errno values such as -ENOMEM, but some
- // standard errno values are used for non-standard purposes where their
diff --git a/gnu/packages/patches/xterm-370-explicit-xcursor.patch b/gnu/packages/patches/xterm-370-explicit-xcursor.patch
new file mode 100644
index 0000000000..2500ccf0c8
--- /dev/null
+++ b/gnu/packages/patches/xterm-370-explicit-xcursor.patch
@@ -0,0 +1,37 @@
+From: Danny Milosavljevic <dannym@scratchpost.org>
+Date: Thu, 2 Apr 2022 12:10:00 +0200
+Subject: Make xterm use libxcursor directly
+
+Fixes <https://issues.guix.gnu.org/54654>.
+
+This patch makes xterm use libxcursor directly.
+Without it, libx11 would try to dlopen("libXcursor.so.1") and fail.
+
+--- xterm-370/misc.c.orig 2022-04-02 11:52:26.225131854 +0200
++++ xterm-370/misc.c 2022-04-02 12:06:13.091482385 +0200
+@@ -79,6 +79,9 @@
+ #ifdef HAVE_LIBXPM
+ #include <X11/xpm.h>
+ #endif
++#ifdef HAVE_LIB_XCURSOR
++#include <X11/Xcursor/Xcursor.h>
++#endif
+
+ #ifdef HAVE_LANGINFO_CODESET
+ #include <langinfo.h>
+@@ -866,7 +869,14 @@
+ * 0, 2 a shape, 3 a mask for 2, etc. <X11/cursorfont.h>
+ * contains defined names for each shape.
+ */
+- c = XCreateGlyphCursor(dpy,
++ c = XcursorTryShapeCursor(dpy,
++ myFont.fs->fid, /* source_font */
++ myFont.fs->fid, /* mask_font */
++ c_index + 0, /* source_char */
++ c_index + 1, /* mask_char */
++ &foreground,
++ &background);
++ if (c == None) c = XCreateGlyphCursor(dpy,
+ myFont.fs->fid, /* source_font */
+ myFont.fs->fid, /* mask_font */
+ c_index + 0, /* source_char */
diff --git a/gnu/packages/patches/zig-disable-libc-note-test.patch b/gnu/packages/patches/zig-disable-libc-note-test.patch
deleted file mode 100644
index 4508cee200..0000000000
--- a/gnu/packages/patches/zig-disable-libc-note-test.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-This test fails with "error.CompilationIncorrectlySucceeded".
-
-diff --git a/test/compile_errors.zig b/test/compile_errors.zig
-index b1eaa0302..621f9db0a 100644
---- a/test/compile_errors.zig
-+++ b/test/compile_errors.zig
-@@ -2943,15 +2943,15 @@ pub fn addCases(ctx: *TestContext) !void {
- "tmp.zig:3:5: error: dependency on libc must be explicitly specified in the build command",
- });
-
-- ctx.testErrStage1("libc headers note",
-- \\const c = @cImport(@cInclude("stdio.h"));
-- \\export fn entry() void {
-- \\ _ = c.printf("hello, world!\n");
-- \\}
-- , &[_][]const u8{
-- "tmp.zig:1:11: error: C import failed",
-- "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc",
-- });
-+ // ctx.testErrStage1("libc headers note",
-+ // \\const c = @cImport(@cInclude("stdio.h"));
-+ // \\export fn entry() void {
-+ // \\ _ = c.printf("hello, world!\n");
-+ // \\}
-+ // , &[_][]const u8{
-+ // "tmp.zig:1:11: error: C import failed",
-+ // "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc",
-+ // });
- }
-
- ctx.testErrStage1("comptime vector overflow shows the index",