summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/instead-use-games-path.patch32
-rw-r--r--gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch22
-rw-r--r--gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch29
-rw-r--r--gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch13
-rw-r--r--gnu/packages/patches/onnx-optimizer-system-library.patch53
-rw-r--r--gnu/packages/patches/pypy3-7.3.1-fix-tests.patch278
-rw-r--r--gnu/packages/patches/python-pytorch-runpath.patch25
-rw-r--r--gnu/packages/patches/python-pytorch-system-libraries.patch131
-rw-r--r--gnu/packages/patches/rapidjson-gcc-compat.patch48
-rw-r--r--gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch51
-rw-r--r--gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch52
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch14
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch28
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch25
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch63
-rw-r--r--gnu/packages/patches/samba-fix-fcntl-hint-detection.patch55
-rw-r--r--gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch4
-rw-r--r--gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch16
18 files changed, 604 insertions, 335 deletions
diff --git a/gnu/packages/patches/instead-use-games-path.patch b/gnu/packages/patches/instead-use-games-path.patch
new file mode 100644
index 0000000000..783fd21add
--- /dev/null
+++ b/gnu/packages/patches/instead-use-games-path.patch
@@ -0,0 +1,32 @@
+From 8b350daa847dd8e131d9e6b5b4434ce68a7903d0 Mon Sep 17 00:00:00 2001
+From: Dmitry Polyakov <polyakov@liltechdude.xyz>
+Date: Wed, 4 Aug 2021 15:46:33 +0500
+Subject: [PATCH] Add support for INSTEAD_GAMES_PATH
+
+In some setups, users might prefer to determine on their own the path in
+which games are located. This patch enables them to do so by setting
+the “INSTEAD_GAMES_PATH” environmnent variable.
+---
+ src/main.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/main.c b/src/main.c
+index ba0ada1d..b05497b8 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -394,6 +394,12 @@ int instead_main(int argc, char *argv[])
+ setdir(game_cwd);
+ profile_load(NULL);
+
++ char *gamespath_env = NULL;
++
++ if (gamespath_env = getenv("INSTEAD_GAMES_PATH"), gamespath_env != NULL) {
++ games_sw = strdup(gamespath_env);
++ }
++
+ for (i = 1; i < argc; i++) {
+ if (lua_sw) /* during load profile */
+ break;
+--
+2.32.0
+
diff --git a/gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch b/gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch
new file mode 100644
index 0000000000..f6bc639f33
--- /dev/null
+++ b/gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch
@@ -0,0 +1,22 @@
+Taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/llvm-roc/files
+
+diff -Naur a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
+--- a/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:49.119055933 +0100
++++ b/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:13.265056070 +0100
+@@ -2,6 +2,7 @@
+ Core
+ MC
+ Support
++ Option
+ )
+
+ find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
+diff -Naur a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt
+--- a/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:41:39.521056199 +0100
++++ b/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:40:23.998056487 +0100
+@@ -79,4 +79,5 @@
+ LINK_LIBS
+ clangBasic
+ ${system_libs}
++ pthread
+ )
diff --git a/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch
new file mode 100644
index 0000000000..f14ec4ac0d
--- /dev/null
+++ b/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch
@@ -0,0 +1,29 @@
+Author: Wilfried (justxi) Holzke
+
+Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch
+
+Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
+===================================================================
+--- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
++++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp
+@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc
+ //
+ // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs
+ // a workaround.
+- SmallString<128> P(D.ResourceDir);
+- if (UsesRuntimeWrapper)
+- llvm::sys::path::append(P, "include", "cuda_wrappers");
+- CC1Args.push_back("-internal-isystem");
+- CC1Args.push_back(DriverArgs.MakeArgString(P));
+ }
+
+ if (DriverArgs.hasArg(options::OPT_nogpuinc))
+@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc
+ return;
+ }
+
+- CC1Args.push_back("-internal-isystem");
+- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath()));
+ if (UsesRuntimeWrapper)
+ CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"});
+ }
diff --git a/gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch b/gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch
new file mode 100644
index 0000000000..f1762a558b
--- /dev/null
+++ b/gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch
@@ -0,0 +1,13 @@
+Taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/llvm-roc/files
+
+diff --color -uprN orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
+--- a/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:57:54.222796911 +0800
++++ b/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:58:35.206796875 +0800
+@@ -11,6 +11,7 @@ add_llvm_component_library(LLVMAMDGPUDis
+ MC
+ MCDisassembler
+ Support
++ Object
+
+ ADD_TO_COMPONENT
+ AMDGPU
diff --git a/gnu/packages/patches/onnx-optimizer-system-library.patch b/gnu/packages/patches/onnx-optimizer-system-library.patch
new file mode 100644
index 0000000000..5c592597e0
--- /dev/null
+++ b/gnu/packages/patches/onnx-optimizer-system-library.patch
@@ -0,0 +1,53 @@
+Arrange so that onnx-optimizer (1) uses our own ONNX build,
+(2) builds as a shared library, and (3) links against the shared
+libraries of ONNX.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2e48b35..8af51076 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,8 +9,6 @@ endif(NOT MSVC)
+
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+-set(ONNX_ROOT ${PROJECT_SOURCE_DIR}/third_party/onnx)
+-add_subdirectory(${ONNX_ROOT})
+
+ file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION)
+ string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION)
+@@ -21,14 +19,18 @@ file(GLOB_RECURSE onnx_opt_srcs "onnxoptimizer/*.cc"
+ list(REMOVE_ITEM onnx_opt_srcs "${PROJECT_SOURCE_DIR}/onnxoptimizer/cpp2py_export.cc")
+
+ add_library(onnx_optimizer ${onnx_opt_srcs})
+-target_link_libraries(onnx_optimizer PUBLIC onnx)
++target_link_libraries(onnx_optimizer PUBLIC onnx onnx_proto)
+ target_include_directories(onnx_optimizer PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include>
+ )
+
++# These cpp macros must be defined so the ONNX headers behave
++# correctly.
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DONNX_ML=1 -DONNX_NAMESPACE=onnx")
++
+ add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
+-target_link_libraries(onnx_optimizer_exec onnx_optimizer)
++target_link_libraries(onnx_optimizer_exec onnx_optimizer protobuf)
+
+ if(BUILD_ONNX_PYTHON)
+ if("${PY_EXT_SUFFIX}" STREQUAL "")
+@@ -79,11 +81,10 @@ if(BUILD_ONNX_PYTHON)
+ PRIVATE $<TARGET_OBJECTS:onnx_optimizer>)
+ else()
+ # Assume everything else is like gcc
+- target_link_libraries(onnx_opt_cpp2py_export
+- PRIVATE "-Wl,--whole-archive" $<TARGET_FILE:onnx_optimizer>
+- "-Wl,--no-whole-archive")
++ target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer)
+ set_target_properties(onnx_opt_cpp2py_export
+- PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL")
++ PROPERTIES LINK_FLAGS
++ "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib")
+ endif()
+
+ target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer)
diff --git a/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch b/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch
deleted file mode 100644
index 464aad967f..0000000000
--- a/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-Fix a few testcases. Adapted from python-3-fix-tests.patch.
-
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_callbacks.py pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_callbacks.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_callbacks.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_callbacks.py 2020-05-21 14:19:14.827288853 +0200
-@@ -4,6 +4,7 @@
- from ctypes import *
- from ctypes.test import need_symbol
- import _ctypes_test
-+import platform
-
- class Callbacks(unittest.TestCase):
- functype = CFUNCTYPE
-@@ -178,6 +179,8 @@
-
- self.assertLess(diff, 0.01, "%s not less than 0.01" % diff)
-
-+ @unittest.skipIf(platform.machine() in ['mips64'],
-+ "This test fails on this platform")
- def test_issue_8959_a(self):
- from ctypes.util import find_library
- libc_path = find_library("c")
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_libc.py pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_libc.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_libc.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_libc.py 2020-05-21 14:19:14.827288853 +0200
-@@ -2,6 +2,7 @@
-
- from ctypes import *
- import _ctypes_test
-+import platform
-
- lib = CDLL(_ctypes_test.__file__)
-
-@@ -17,6 +18,8 @@
- import math
- self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
-
-+ @unittest.skipIf(platform.machine() in ['mips64'],
-+ "This test fails on this platform")
- def test_qsort(self):
- 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 -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_archive_util.py pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_archive_util.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_archive_util.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_archive_util.py 2020-05-21 14:19:14.827288853 +0200
-@@ -333,6 +333,7 @@
- self.assertEqual(os.path.basename(res), 'archive.tar.xz')
- self.assertEqual(self._tarinfo(res), self._created_files)
-
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_make_archive_owner_group(self):
- # testing make_archive with owner and group, with various combinations
- # this works even if there's not gid/uid support
-@@ -362,6 +363,7 @@
-
- @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib")
- @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_tarfile_root_owner(self):
- tmpdir = self._create_files()
- base_name = os.path.join(self.mkdtemp(), 'archive')
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_sdist.py pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_sdist.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_sdist.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_sdist.py 2020-05-21 14:19:14.827288853 +0200
-@@ -443,6 +443,7 @@
- "The tar command is not found")
- @unittest.skipIf(find_executable('gzip') is None,
- "The gzip command is not found")
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_make_distribution_owner_group(self):
- # now building a sdist
- dist, cmd = self.get_cmd()
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_asyncio/test_base_events.py pypy3.6-v7.3.1-src/lib-python/3/test/test_asyncio/test_base_events.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_asyncio/test_base_events.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_asyncio/test_base_events.py 2020-05-21 14:19:14.827288853 +0200
-@@ -1296,6 +1296,8 @@
- self._test_create_connection_ip_addr(m_socket, False)
-
- @patch_socket
-+ @unittest.skipUnless(support.is_resource_enabled('network'),
-+ 'network is not enabled')
- def test_create_connection_service_name(self, m_socket):
- m_socket.getaddrinfo = socket.getaddrinfo
- sock = m_socket.socket.return_value
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_generators.py pypy3.6-v7.3.1-src/lib-python/3/test/test_generators.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_generators.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_generators.py 2020-05-21 14:19:14.827288853 +0200
-@@ -35,6 +35,7 @@
- else:
- return "FAILED"
-
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment')
- def test_raise_and_yield_from(self):
- gen = self.generator1()
- gen.send(None)
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/_test_multiprocessing.py pypy3.6-v7.3.1-src/lib-python/3/test/_test_multiprocessing.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/_test_multiprocessing.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/_test_multiprocessing.py 2020-05-21 14:19:14.827288853 +0200
-@@ -1212,6 +1212,7 @@
- if pid is not None:
- os.kill(pid, signal.SIGINT)
-
-+ @unittest.skipIf(True, "This fails for unknown reasons on Guix")
- def test_wait_result(self):
- if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
- pid = os.getpid()
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_normalization.py pypy3.6-v7.3.1-src/lib-python/3/test/test_normalization.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_normalization.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_normalization.py 2020-05-21 14:19:14.827288853 +0200
-@@ -2,6 +2,7 @@
- import unittest
-
- from http.client import HTTPException
-+from urllib.error import URLError
- import sys
- from unicodedata import normalize, unidata_version
-
-@@ -43,6 +44,8 @@
- 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 -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pathlib.py pypy3.6-v7.3.1-src/lib-python/3/test/test_pathlib.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pathlib.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_pathlib.py 2020-05-21 14:19:14.827288853 +0200
-@@ -2130,8 +2130,7 @@
- self.assertEqual(given, expect)
- self.assertEqual(set(p.rglob("FILEd*")), set())
-
-- @unittest.skipUnless(hasattr(pwd, 'getpwall'),
-- 'pwd module does not expose getpwall()')
-+ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests")
- def test_expanduser(self):
- P = self.cls
- support.import_module('pwd')
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pdb.py pypy3.6-v7.3.1-src/lib-python/3/test/test_pdb.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pdb.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_pdb.py 2020-05-21 14:20:24.377203281 +0200
-@@ -1136,11 +1136,11 @@
- > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
- -> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
- (Pdb) continue
-- pdb 1: <built-in function default_int_handler>
-+ pdb 1: Handlers.SIG_IGN
- > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
- -> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
- (Pdb) continue
-- pdb 2: <built-in function default_int_handler>
-+ pdb 2: Handlers.SIG_IGN
- """
-
- class PdbTestCase(unittest.TestCase):
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_regrtest.py pypy3.6-v7.3.1-src/lib-python/3/test/test_regrtest.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_regrtest.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_regrtest.py 2020-05-21 14:19:14.827288853 +0200
-@@ -766,6 +766,7 @@
- output = self.run_tests('--fromfile', filename)
- self.check_executed_tests(output, tests)
-
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.')
- def test_interrupted(self):
- code = TEST_INTERRUPTED
- test = self.create_test('sigint', code=code)
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_resource.py pypy3.6-v7.3.1-src/lib-python/3/test/test_resource.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_resource.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_resource.py 2020-05-21 14:19:14.827288853 +0200
-@@ -146,6 +146,7 @@
-
- @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
- @support.requires_linux_version(2, 6, 36)
-+ @unittest.skipIf(True, "Bug: the PermissionError is not raised")
- def test_prlimit(self):
- self.assertRaises(TypeError, resource.prlimit)
- self.assertRaises(ProcessLookupError, resource.prlimit,
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_shutil.py pypy3.6-v7.3.1-src/lib-python/3/test/test_shutil.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_shutil.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_shutil.py 2020-05-21 14:19:14.827288853 +0200
-@@ -1138,6 +1138,7 @@
- self.assertRaises(ValueError, make_archive, base_name, 'xxx')
-
- @support.requires_zlib
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- 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
-@@ -1166,6 +1167,7 @@
-
-
- @support.requires_zlib
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
- def test_tarfile_root_owner(self):
- root_dir, base_dir = self._create_files()
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_socket.py pypy3.6-v7.3.1-src/lib-python/3/test/test_socket.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_socket.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_socket.py 2020-05-21 14:19:14.827288853 +0200
-@@ -815,6 +815,8 @@
- 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.HOST, '10.0.0.1', '255.255.255.255']:
- self.assertEqual(socket.gethostbyname(addr), addr)
-@@ -934,6 +936,8 @@
- self.assertRaises(OverflowError, socket.htonl, k)
- self.assertRaises(OverflowError, socket.htons, k)
-
-+ @unittest.skipUnless(os.path.exists("/etc/services"),
-+ "getservbyname uses /etc/services, which is not in the chroot")
- def testGetServBy(self):
- eq = self.assertEqual
- # Find one service that exists, then check all the related interfaces.
-@@ -1278,6 +1282,8 @@
- raise
- self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
-
-+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
-+ "getaddrinfo() will fail")
- def testGetaddrinfo(self):
- try:
- socket.getaddrinfo('localhost', 80)
-@@ -1357,6 +1363,8 @@
- # only IP addresses are allowed
- self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0)
-
-+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
-+ "getaddrinfo() will fail")
- @unittest.skipUnless(support.is_resource_enabled('network'),
- 'network is not enabled')
- def test_idna(self):
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_spwd.py pypy3.6-v7.3.1-src/lib-python/3/test/test_spwd.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_spwd.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_spwd.py 2020-05-21 14:19:14.827288853 +0200
-@@ -5,8 +5,7 @@
- spwd = support.import_module('spwd')
-
-
--@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0,
-- 'root privileges required')
-+@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow')
- class TestSpwdRoot(unittest.TestCase):
-
- def test_getspall(self):
-@@ -56,8 +55,7 @@
- self.assertRaises(TypeError, spwd.getspnam, bytes_name)
-
-
--@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0,
-- 'non-root user required')
-+@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow')
- class TestSpwdNonRoot(unittest.TestCase):
-
- def test_getspnam_exception(self):
-diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_tarfile.py pypy3.6-v7.3.1-src/lib-python/3/test/test_tarfile.py
---- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_tarfile.py 1970-01-01 01:00:01.000000000 +0100
-+++ pypy3.6-v7.3.1-src/lib-python/3/test/test_tarfile.py 2020-05-21 14:19:14.827288853 +0200
-@@ -2491,9 +2491,12 @@
- import pwd, grp
- except ImportError:
- return False
-- if pwd.getpwuid(0)[0] != 'root':
-- return False
-- if grp.getgrgid(0)[0] != 'root':
-+ try:
-+ if pwd.getpwuid(0)[0] != 'root':
-+ return False
-+ if grp.getgrgid(0)[0] != 'root':
-+ return False
-+ except KeyError:
- return False
- return True
-
diff --git a/gnu/packages/patches/python-pytorch-runpath.patch b/gnu/packages/patches/python-pytorch-runpath.patch
new file mode 100644
index 0000000000..6f270ef9b1
--- /dev/null
+++ b/gnu/packages/patches/python-pytorch-runpath.patch
@@ -0,0 +1,25 @@
+Libraries (such as 'libtorch_cpu.so') and executables (such as 'torch_shm_manager')
+get installed, quite surprisingly, to 'lib/python3.8/site-packages/{bin,lib}'.
+Make sure RUNPATH matches that.
+
+--- a/cmake/Dependencies.cmake
++++ b/cmake/Dependencies.cmake
+@@ -4,7 +4,7 @@ if(APPLE)
+ set(CMAKE_MACOSX_RPATH ON)
+ set(_rpath_portable_origin "@loader_path")
+ else()
+- set(_rpath_portable_origin $ORIGIN)
++ set(_rpath_portable_origin $ORIGIN/../lib)
+ endif(APPLE)
+ # Use separate rpaths during build and install phases
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
+
+--- a/caffe2/CMakeLists.txt
++++ b/caffe2/CMakeLists.txt
+@@ -1797,5 +1797,5 @@ if(BUILD_PYTHON)
+ if(${BUILDING_WITH_TORCH_LIBS})
+ # site-packages/caffe2/python/caffe2_pybind11_state
+ # site-packages/torch/lib
+- set(caffe2_pybind11_rpath "${_rpath_portable_origin}/../../torch/lib")
++ set(caffe2_pybind11_rpath $ORIGIN/../../torch/lib)
+ endif(${BUILDING_WITH_TORCH_LIBS})
diff --git a/gnu/packages/patches/python-pytorch-system-libraries.patch b/gnu/packages/patches/python-pytorch-system-libraries.patch
new file mode 100644
index 0000000000..c8d14b3f56
--- /dev/null
+++ b/gnu/packages/patches/python-pytorch-system-libraries.patch
@@ -0,0 +1,131 @@
+Use our own googletest rather than the bundled one.
+Get NNPACK to use our own PeachPy rather than the bundled one.
+
+diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
+index 5d57b9ca78..620cca4e60 100644
+--- a/cmake/Dependencies.cmake
++++ b/cmake/Dependencies.cmake
+@@ -644,11 +644,6 @@ if(BUILD_TEST OR BUILD_MOBILE_BENCHMARK OR BUILD_MOBILE_TEST)
+ # this shouldn't be necessary anymore.
+ get_property(INC_DIR_temp DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+ set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "")
+- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/googletest)
+- set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${INC_DIR_temp})
+-
+- include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/googletest/googletest/include)
+- include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/googletest/googlemock/include)
+
+ # We will not need to test benchmark lib itself.
+ set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing as we don't need it.")
+@@ -1485,7 +1480,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
+ endif()
+ set_property(TARGET onnx_proto PROPERTY IMPORTED_LOCATION ${ONNX_PROTO_LIBRARY})
+ message("-- Found onnx: ${ONNX_LIBRARY} ${ONNX_PROTO_LIBRARY}")
+- list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx)
++ list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx onnx_optimizer)
+ endif()
+ include_directories(${FOXI_INCLUDE_DIRS})
+ list(APPEND Caffe2_DEPENDENCY_LIBS foxi_loader)
+
+diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
+index 50ebb224ce..5953d9ddf7 100644
+--- a/caffe2/CMakeLists.txt
++++ b/caffe2/CMakeLists.txt
+@@ -1632,7 +1632,7 @@ if(BUILD_TEST)
+ if(NOT MSVC)
+ add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}" ../aten/src/ATen/native/quantized/affine_quantizer_base.cpp)
+ # TODO: Get rid of c10 dependency (which is only needed for the implementation of AT_ERROR)
+- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main)
++ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main gtest)
+ if(USE_FBGEMM)
+ target_link_libraries(${test_name}_${CPU_CAPABILITY} fbgemm)
+ endif()
+@@ -1655,7 +1655,7 @@ if(BUILD_TEST)
+ foreach(test_src ${Caffe2_CPU_TEST_SRCS})
+ get_filename_component(test_name ${test_src} NAME_WE)
+ add_executable(${test_name} "${test_src}")
+- target_link_libraries(${test_name} torch_library gtest_main)
++ target_link_libraries(${test_name} torch_library gtest_main gtest)
+ target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
+ target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
+ target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
+@@ -1673,7 +1673,7 @@ if(BUILD_TEST)
+ foreach(test_src ${Caffe2_GPU_TEST_SRCS})
+ get_filename_component(test_name ${test_src} NAME_WE)
+ cuda_add_executable(${test_name} "${test_src}")
+- target_link_libraries(${test_name} torch_library gtest_main)
++ target_link_libraries(${test_name} torch_library gtest_main gtest)
+ target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
+ target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
+ add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
+@@ -1691,7 +1691,7 @@ if(BUILD_TEST)
+ foreach(test_src ${Caffe2_VULKAN_TEST_SRCS})
+ get_filename_component(test_name ${test_src} NAME_WE)
+ add_executable(${test_name} "${test_src}")
+- target_link_libraries(${test_name} torch_library gtest_main)
++ target_link_libraries(${test_name} torch_library gtest_main gtest)
+ target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
+ target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
+ add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
+@@ -1709,7 +1709,7 @@ if(BUILD_TEST)
+ foreach(test_src ${Caffe2_HIP_TEST_SRCS})
+ get_filename_component(test_name ${test_src} NAME_WE)
+ add_executable(${test_name} "${test_src}")
+- target_link_libraries(${test_name} torch_library gtest_main)
++ target_link_libraries(${test_name} torch_library gtest_main gtest)
+ target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
+ target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE} ${Caffe2_HIP_INCLUDE})
+ target_compile_options(${test_name} PRIVATE ${HIP_CXX_FLAGS})
+
+diff --git a/torch/lib/c10d/test/CMakeLists.txt b/torch/lib/c10d/test/CMakeLists.txt
+index b74d4b65f7..fc7c207505 100644
+--- a/torch/lib/c10d/test/CMakeLists.txt
++++ b/torch/lib/c10d/test/CMakeLists.txt
+@@ -16,25 +16,25 @@ function(c10d_add_test test_src)
+ add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
+ endfunction()
+
+-c10d_add_test(FileStoreTest.cpp c10d gtest_main)
+-c10d_add_test(TCPStoreTest.cpp c10d gtest_main)
++c10d_add_test(FileStoreTest.cpp c10d gtest_main gtest)
++c10d_add_test(TCPStoreTest.cpp c10d gtest_main gtest)
+ if(NOT WIN32)
+- c10d_add_test(HashStoreTest.cpp c10d gtest_main)
++ c10d_add_test(HashStoreTest.cpp c10d gtest_main gtest)
+ endif()
+
+ if(USE_CUDA)
+ if(USE_C10D_GLOO)
+- c10d_add_test(ProcessGroupGlooTest.cpp c10d c10d_cuda_test gtest_main)
+- c10d_add_test(ProcessGroupGlooAsyncTest.cpp c10d c10d_cuda_test gtest_main)
++ c10d_add_test(ProcessGroupGlooTest.cpp c10d c10d_cuda_test gtest_main gtest)
++ c10d_add_test(ProcessGroupGlooAsyncTest.cpp c10d c10d_cuda_test gtest_main gtest)
+ endif()
+ if(USE_C10D_NCCL)
+- c10d_add_test(ProcessGroupNCCLTest.cpp c10d c10d_cuda_test gtest_main)
++ c10d_add_test(ProcessGroupNCCLTest.cpp c10d c10d_cuda_test gtest_main gtest)
+ c10d_add_test(ProcessGroupNCCLErrorsTest.cpp c10d c10d_cuda_test
+- gtest_main)
++ gtest_main gtest)
+ endif()
+ else()
+ if(USE_C10D_GLOO)
+- c10d_add_test(ProcessGroupGlooTest.cpp c10d gtest_main)
++ c10d_add_test(ProcessGroupGlooTest.cpp c10d gtest_main gtest)
+ endif()
+ endif()
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5ecd2df..24feae3 100644
+--- a/third_party/NNPACK/CMakeLists.txt
++++ b/third_party/NNPACK/CMakeLists.txt
+@@ -427,8 +427,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ FILE(MAKE_DIRECTORY ${obj_dir})
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${obj}
+- COMMAND "PYTHONPATH=${PEACHPY_PYTHONPATH}"
+- ${PYTHON_EXECUTABLE} -m peachpy.x86_64
++ COMMAND ${PYTHON_EXECUTABLE} -m peachpy.x86_64
+ -mabi=sysv -g4 -mimage-format=${PEACHPY_IMAGE_FORMAT}
+ "-I${PROJECT_SOURCE_DIR}/src" "-I${PROJECT_SOURCE_DIR}/src/x86_64-fma" "-I${FP16_SOURCE_DIR}/include"
+ -o ${obj} "${PROJECT_SOURCE_DIR}/${src}"
diff --git a/gnu/packages/patches/rapidjson-gcc-compat.patch b/gnu/packages/patches/rapidjson-gcc-compat.patch
index b5ffc0a908..8bfdb075d9 100644
--- a/gnu/packages/patches/rapidjson-gcc-compat.patch
+++ b/gnu/packages/patches/rapidjson-gcc-compat.patch
@@ -16,3 +16,51 @@ index 422a5240..d4039716 100644
#endif
#ifdef _MSC_VER
+
+Cast destination pointers to avoid a GCC error about memmove writing to
+a different type.
+
+Adapted from this upstream commit:
+https://github.com/Tencent/rapidjson/commit/fa5963a2f5b231ee2babff771f169ccca22870ed
+
+diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
+--- a/include/rapidjson/document.h
++++ b/include/rapidjson/document.h
+@@ -1425,7 +1425,7 @@ public:
+ MemberIterator pos = MemberBegin() + (first - MemberBegin());
+ for (MemberIterator itr = pos; itr != last; ++itr)
+ itr->~Member();
+- std::memmove(&*pos, &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
++ std::memmove(static_cast<void*>(&*pos), &*last, static_cast<size_t>(MemberEnd() - last) * sizeof(Member));
+ data_.o.size -= static_cast<SizeType>(last - first);
+ return pos;
+ }
+@@ -1628,8 +1628,8 @@ public:
+ RAPIDJSON_ASSERT(last <= End());
+ ValueIterator pos = Begin() + (first - Begin());
+ for (ValueIterator itr = pos; itr != last; ++itr)
+- itr->~GenericValue();
+- std::memmove(pos, last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
++ itr->~GenericValue();
++ std::memmove(static_cast<void*>(pos), last, static_cast<size_t>(End() - last) * sizeof(GenericValue));
+ data_.a.size -= static_cast<SizeType>(last - first);
+ return pos;
+ }
+@@ -1936,7 +1936,7 @@ private:
+ if (count) {
+ GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
+ SetElementsPointer(e);
+- std::memcpy(e, values, count * sizeof(GenericValue));
++ std::memcpy(static_cast<void*>(e), values, count * sizeof(GenericValue));
+ }
+ else
+ SetElementsPointer(0);
+@@ -1949,7 +1949,7 @@ private:
+ if (count) {
+ Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
+ SetMembersPointer(m);
+- std::memcpy(m, members, count * sizeof(Member));
++ std::memcpy(static_cast<void*>(m), members, count * sizeof(Member));
+ }
+ else
+ SetMembersPointer(0);
diff --git a/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
new file mode 100644
index 0000000000..cc510c1cfe
--- /dev/null
+++ b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
@@ -0,0 +1,51 @@
+This cherry-picked patch fixes tests for Go >= 1.15. Restic v0.10 (which
+includes this patch) requires go module support from the Go build system.
+Original patch follows.
+
+---
+From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001
+From: Alexander Neumann <alexander@bumpern.de>
+Date: Sat, 12 Sep 2020 17:36:44 +0200
+Subject: [PATCH] options: Fix test for Go >= 1.15
+
+---
+ internal/options/options_test.go | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/internal/options/options_test.go b/internal/options/options_test.go
+index de94fc90a1..8d268992a3 100644
+--- a/internal/options/options_test.go
++++ b/internal/options/options_test.go
+@@ -3,6 +3,7 @@ package options
+ import (
+ "fmt"
+ "reflect"
++ "regexp"
+ "testing"
+ "time"
+ )
+@@ -199,7 +200,7 @@ var invalidSetTests = []struct {
+ "timeout": "2134",
+ },
+ "ns",
+- `time: missing unit in duration 2134`,
++ `time: missing unit in duration "?2134"?`,
+ },
+ }
+
+@@ -212,8 +213,13 @@ func TestOptionsApplyInvalid(t *testing.T) {
+ t.Fatalf("expected error %v not found", test.err)
+ }
+
+- if err.Error() != test.err {
+- t.Fatalf("expected error %q, got %q", test.err, err.Error())
++ matched, err := regexp.MatchString(test.err, err.Error())
++ if err != nil {
++ t.Fatal(err)
++ }
++
++ if !matched {
++ t.Fatalf("expected error to match %q, got %q", test.err, err.Error())
+ }
+ })
+ }
diff --git a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
new file mode 100644
index 0000000000..c91d273f92
--- /dev/null
+++ b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
@@ -0,0 +1,52 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25
+
+From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Sun, 1 Mar 2020 19:24:22 -0500
+Subject: [PATCH] Link additional required LLVM libraries
+
+Without these additional required dependencies, linking fails with errors such as:
+`undefined reference to llvm::errs()'`
+---
+ CMakeLists.txt | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1794a07..c7b852a 100644
+--- a/lib/comgr/CMakeLists.txt
++++ b/lib/comgr/CMakeLists.txt
+@@ -207,7 +207,11 @@ install(FILES
+ DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
+
+ set(CLANG_LIBS
+- clangFrontendTool)
++ clangFrontendTool
++ clangFrontend
++ clangBasic
++ clangDriver
++ clangSerialization)
+
+ set(LLD_LIBS
+ lldELF
+@@ -218,8 +222,20 @@ if (LLVM_LINK_LLVM_DYLIB)
+ else()
+ llvm_map_components_to_libnames(LLVM_LIBS
+ ${LLVM_TARGETS_TO_BUILD}
++ Option
+ DebugInfoDWARF
+- Symbolize)
++ Symbolize
++ Support
++ Object
++ BitWriter
++ MC
++ MCParser
++ MCDisassembler
++ Core
++ IRReader
++ CodeGen
++ Linker
++ BinaryFormat)
+ endif()
+
+ target_link_libraries(amd_comgr
diff --git a/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch b/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch
new file mode 100644
index 0000000000..d81bb0747f
--- /dev/null
+++ b/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch
@@ -0,0 +1,14 @@
+Add missing include dirs for ROCclr.
+
+--- a/amdocl/CMakeLists.txt 2020-12-05 22:05:55.838529158 +0100
++++ b/amdocl/CMakeLists.txt 2020-12-05 22:07:35.677524507 +0100
+@@ -23,6 +23,9 @@
+ include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos)
+ include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers)
+ include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers/opencl2.2)
++include_directories(${ROCclr_DIR}/../../../include)
++include_directories(${ROCclr_DIR}/../../../include/compiler/lib/include/)
++include_directories(${ROCclr_DIR}/../../../include/elf/)
+
+ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+ (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang"))
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch
new file mode 100644
index 0000000000..5709e0d19a
--- /dev/null
+++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch
@@ -0,0 +1,28 @@
+Do not build and install clinfo.
+
+diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
+index 76847d3..3f62bfe 100644
+--- a/CMakeLists.txt.orig
++++ b/CMakeLists.txt
+@@ -72,7 +72,7 @@ find_package(ROCclr REQUIRED CONFIG
+
+ add_subdirectory(khronos/icd)
+ add_subdirectory(amdocl)
+-add_subdirectory(tools/clinfo)
++#add_subdirectory(tools/clinfo)
+ add_subdirectory(tools/cltrace)
+ if(BUILD_TESTS)
+ add_subdirectory(tests/ocltst)
+@@ -108,9 +108,9 @@ endif()
+ ###--- Packaging ------------------------------------------------------------###
+
+ # MAIN package
+-install(PROGRAMS $<TARGET_FILE:clinfo>
+- DESTINATION bin
+- COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:clinfo>
++# DESTINATION bin
++# COMPONENT MAIN)
+ install(PROGRAMS $<TARGET_FILE:cltrace>
+ DESTINATION lib
+ COMPONENT MAIN)
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch
new file mode 100644
index 0000000000..e0328d7734
--- /dev/null
+++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch
@@ -0,0 +1,25 @@
+Do not build and install cltrace.
+
+diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
+index c449db4..9cff673 100644
+--- a/CMakeLists.txt.orig
++++ b/CMakeLists.txt
+@@ -73,7 +73,7 @@ find_package(ROCclr REQUIRED CONFIG
+ #add_subdirectory(khronos/icd)
+ add_subdirectory(amdocl)
+ #add_subdirectory(tools/clinfo)
+-add_subdirectory(tools/cltrace)
++#add_subdirectory(tools/cltrace)
+ if(BUILD_TESTS)
+ add_subdirectory(tests/ocltst)
+ endif()
+@@ -108,9 +108,6 @@ endif()
+ #install(PROGRAMS $<TARGET_FILE:clinfo>
+ # DESTINATION bin
+ # COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:cltrace>
+- DESTINATION lib
+- COMPONENT MAIN)
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+ DESTINATION lib
+ COMPONENT MAIN)
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
new file mode 100644
index 0000000000..ed20f02503
--- /dev/null
+++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
@@ -0,0 +1,63 @@
+Do not build and install libOpenCL.
+
+--- b/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,7 +70,7 @@
+ ${ROCclr_DIR}
+ ${LIBROCclr_STATIC_DIR})
+
+-add_subdirectory(khronos/icd)
++#add_subdirectory(khronos/icd)
+ add_subdirectory(amdocl)
+ #add_subdirectory(tools/clinfo)
+ add_subdirectory(tools/cltrace)
+@@ -93,9 +93,6 @@
+ OUTPUT_VARIABLE OPENCL_VERSION_GITDATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+-get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION)
+-get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION)
+-
+ find_package(ROCM QUIET CONFIG PATHS /opt/rocm)
+
+ if(ROCM_FOUND)
+@@ -117,25 +114,6 @@
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+ DESTINATION lib
+ COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT MAIN)
+-
+-# DEV package
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL"
+- DESTINATION include
+- COMPONENT DEV
+- USE_SOURCE_PERMISSIONS
+- PATTERN cl_d3d10.h EXCLUDE
+- PATTERN cl_d3d11.h EXCLUDE
+- PATTERN cl_dx9_media_sharing.h EXCLUDE
+- PATTERN cl_egl.h EXCLUDE)
+-install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT DEV)
+
+ #############################
+ # Packaging steps
+--- a/khronos/icd/CMakeLists.txt 2020-06-07 16:05:32.425022904 +0200
++++ b/khronos/icd/CMakeLists.txt 2020-06-07 16:06:03.273022786 +0200
+@@ -132,7 +132,7 @@
+ add_subdirectory (test)
+ endif()
+
+-install (TARGETS OpenCL
+- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++#install (TARGETS OpenCL
++# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/gnu/packages/patches/samba-fix-fcntl-hint-detection.patch b/gnu/packages/patches/samba-fix-fcntl-hint-detection.patch
deleted file mode 100644
index b56c628537..0000000000
--- a/gnu/packages/patches/samba-fix-fcntl-hint-detection.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 454ccd986b61799908a6898a55d0480911f15306 Mon Sep 17 00:00:00 2001
-From: Ralph Boehme <slow@samba.org>
-Date: Mon, 21 Sep 2020 07:48:43 +0200
-Subject: [PATCH] s3: fix fcntl waf configure check
-
-RN: Fix fcntl waf configure check
-BUG: https://bugzilla.samba.org/show_bug.cgi?id=14503
-
-Signed-off-by: Ralph Boehme <slow@samba.org>
-Reviewed-by: Volker Lendecke <vl@samba.org>
-
-Autobuild-User(master): Volker Lendecke <vl@samba.org>
-Autobuild-Date(master): Mon Sep 21 07:26:54 UTC 2020 on sn-devel-184
----
- source3/wscript | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/source3/wscript b/source3/wscript
-index 840ed430c0f..d3ef346eecd 100644
---- a/source3/wscript
-+++ b/source3/wscript
-@@ -1244,7 +1244,7 @@ err:
-
- int main(void)
- {
-- uint64_t *hint, get_hint;
-+ uint64_t hint, get_hint;
- int fd;
-
- fd = open(DATA, O_RDONLY | O_CREAT | O_EXCL);
-@@ -1252,8 +1252,8 @@ int main(void)
- goto err;
- }
-
-- *hint = RWH_WRITE_LIFE_SHORT;
-- int ret = fcntl(fd, F_SET_RW_HINT, hint);
-+ hint = RWH_WRITE_LIFE_SHORT;
-+ int ret = fcntl(fd, F_SET_RW_HINT, &hint);
- if (ret == -1) {
- goto err;
- }
-@@ -1267,8 +1267,8 @@ int main(void)
- goto err;
- }
-
-- *hint = RWH_WRITE_LIFE_EXTREME;
-- ret = fcntl(fd, F_SET_FILE_RW_HINT, hint);
-+ hint = RWH_WRITE_LIFE_EXTREME;
-+ ret = fcntl(fd, F_SET_FILE_RW_HINT, &hint);
- if (ret == -1) {
- goto err;
- }
---
-2.28.0
-
diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
index d6c1987718..468024ab00 100644
--- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
+++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch
@@ -30,8 +30,8 @@ Index: u-boot/configs/qemu-riscv64_smode_defconfig
+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
Index: u-boot/configs/sifive_fu540_defconfig
===================================================================
---- u-boot.orig/configs/sifive_fu540_defconfig
-+++ 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
diff --git a/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch
new file mode 100644
index 0000000000..a5b92e3e8f
--- /dev/null
+++ b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch
@@ -0,0 +1,16 @@
+Description: prevent relocating initrd & fdt, that results in failure to boot
+Author: Heinrich Schuchardt (xypron)
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246
+Index: u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h
+===================================================================
+--- u-boot-2021.07~rc4+dfsg.orig/include/configs/sifive-unmatched.h
++++ u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h
+@@ -62,6 +62,8 @@
+ "name=system,size=-,bootable,type=${type_guid_gpt_system};"
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
++ "fdt_high=0xffffffffffffffff\0" \
++ "initrd_high=0xffffffffffffffff\0" \
+ "kernel_addr_r=0x84000000\0" \
+ "fdt_addr_r=0x88000000\0" \
+ "scriptaddr=0x88100000\0" \