summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2024-03-27 05:22:31 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2024-03-27 05:22:31 +0100
commit4c70f5242befb5786cb437559a4d8701e630bd29 (patch)
treedbbff437004184d50c9a53f6c4897a85361aceb1 /gnu/packages/patches
parenta9e65e0341d5045e425e3cf8d741a3d13cfa35a1 (diff)
parent929ddec8f4a181be653152c7436581c2adc54eee (diff)
downloadguix-patches-4c70f5242befb5786cb437559a4d8701e630bd29.tar
guix-patches-4c70f5242befb5786cb437559a4d8701e630bd29.tar.gz
Merge branch 'master' into emacs-team
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch14
-rw-r--r--gnu/packages/patches/libextractor-tidy-support.patch81
-rw-r--r--gnu/packages/patches/python-3.12-fix-tests.patch334
-rw-r--r--gnu/packages/patches/python-poppler-qt5-fix-build.patch116
-rw-r--r--gnu/packages/patches/qemu-build-info-manual.patch37
-rw-r--r--gnu/packages/patches/qemu-disable-bios-tables-test.patch (renamed from gnu/packages/patches/qemu-disable-some-qtests-tests.patch)36
-rw-r--r--gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch45
7 files changed, 496 insertions, 167 deletions
diff --git a/gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch b/gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch
new file mode 100644
index 0000000000..f94840527e
--- /dev/null
+++ b/gnu/packages/patches/clang-17.0-link-dsymutil-latomic.patch
@@ -0,0 +1,14 @@
+This was mistakenly added to llvm-17 while a patch was being rebased.
+
+---
+
+diff --git a/llvm/tools/dsymutil/CMakeLists.txt b/llvm/tools/dsymutil/CMakeLists.txt
+index 3cb88a50ce25..8699d0bb1d6b 100644
+--- a/llvm/tools/dsymutil/CMakeLists.txt
++++ b/llvm/tools/dsymutil/CMakeLists.txt
+@@ -42,4 +42,4 @@ if(APPLE)
+ target_link_libraries(dsymutil PRIVATE "-framework CoreFoundation")
+ endif(APPLE)
+
+-# target_link_libraries(dsymutil PRIVATE ${LLVM_ATOMIC_LIB})
++target_link_libraries(dsymutil PRIVATE ${LLVM_ATOMIC_LIB})
diff --git a/gnu/packages/patches/libextractor-tidy-support.patch b/gnu/packages/patches/libextractor-tidy-support.patch
new file mode 100644
index 0000000000..8fe2f21b2b
--- /dev/null
+++ b/gnu/packages/patches/libextractor-tidy-support.patch
@@ -0,0 +1,81 @@
+Upstream status: submitted to bug-libextractor@gnu.org.
+
+From 1fc6daaeaf829fb941a176831c011888a73c43b9 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Mon, 11 Mar 2024 09:36:26 -0400
+Subject: [PATCH] html_extractor: Add support for modern tidy-html.
+
+* configure.ac: Use PKG_PROG_PKG_CONFIG to initialize pkg-config detection.
+<tidy>: Check for library via pkg-config.
+* src/plugins/html_extractor.c: Standardize tidy include file names.
+---
+ configure.ac | 28 +++++++++-------------------
+ src/plugins/html_extractor.c | 4 ++--
+ 2 files changed, 11 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d17ff39..e89d70c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -176,6 +176,8 @@ AS_CASE(["$target_os"],
+
+ AM_ICONV
+
++PKG_PROG_PKG_CONFIG()
++
+ # We define the paths here, because MinGW/GCC expands paths
+ # passed through the command line ("-DLOCALEDIR=..."). This would
+ # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
+@@ -424,25 +426,13 @@ AC_CHECK_LIB(magic, magic_open,
+ AM_CONDITIONAL(HAVE_MAGIC, false))],
+ AM_CONDITIONAL(HAVE_MAGIC, false))
+
+-AC_MSG_CHECKING(for tidyNodeGetValue -ltidy)
+-AC_LANG_PUSH(C++)
+-SAVED_LIBS=$LIBS
+-LIBS="$LIBS -ltidy"
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM([[#include <tidy/tidy.h>]],
+- [[ Bool b = tidyNodeGetValue (NULL, NULL, NULL); ]])],
+- [AC_MSG_RESULT(yes)
+- AM_CONDITIONAL(HAVE_TIDY, true)
+- AC_DEFINE(HAVE_TIDY,1,[Have tidyNodeGetValue in libtidy])],
+- [AC_MSG_RESULT(no)
+- AM_CONDITIONAL(HAVE_TIDY, false)])
+-LIBS=$SAVED_LIBS
+-AC_LANG_POP(C++)
+-
+-# restore LIBS
+-LIBS=$LIBSOLD
+-
+-
++dnl tidyNodeGetValue was already available in 5.0.0, released in 2015.
++PKG_CHECK_MODULES([TIDY], [tidy >= 5.0.0],
++ [AC_DEFINE(HAVE_TIDY, 1, [Have tidy])
++ AM_CONDITIONAL(HAVE_TIDY, true)],
++ [AM_CONDITIONAL(HAVE_TIDY, false)])
++CFLAGS="$CFLAGS $TIDY_CFLAGS"
++LIBS="$LIBS $TIDY_LIBS"
+
+ # should 'make check' run tests?
+ AC_MSG_CHECKING(whether to run tests)
+diff --git a/src/plugins/html_extractor.c b/src/plugins/html_extractor.c
+index 5ebf97b..88100d3 100644
+--- a/src/plugins/html_extractor.c
++++ b/src/plugins/html_extractor.c
+@@ -26,8 +26,8 @@
+ #include "platform.h"
+ #include "extractor.h"
+ #include <magic.h>
+-#include <tidy/tidy.h>
+-#include <tidy/tidybuffio.h>
++#include <tidy.h>
++#include <tidybuffio.h>
+
+ /**
+ * Mapping of HTML META names to LE types.
+
+base-commit: a75f40b64b5868967c95ea214e8eaac4f7088b23
+--
+2.41.0
+
diff --git a/gnu/packages/patches/python-3.12-fix-tests.patch b/gnu/packages/patches/python-3.12-fix-tests.patch
new file mode 100644
index 0000000000..fa5c8027ce
--- /dev/null
+++ b/gnu/packages/patches/python-3.12-fix-tests.patch
@@ -0,0 +1,334 @@
+From f0698133e7d6c353a3e6ae0fc62e57ba558a9bc0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Wed, 28 Oct 2020 22:55:05 -0400
+Subject: [PATCH] Skip problematic Python 3 tests in Guix.
+
+A subset of the hunks in this patch is tracked upstream at
+https://bugs.python.org/issue38845, which was contributed by Tanguy Le
+Carrour <tanguy@bioneland.org>.
+
+diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
+index e42c7ab4bd..8087c84dab 100644
+--- a/Lib/test/_test_multiprocessing.py
++++ b/Lib/test/_test_multiprocessing.py
+@@ -1695,6 +1695,7 @@ def _test_wait_result(cls, c, pid):
+ 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()
+@@ -4150,6 +4151,7 @@ def test_shared_memory_across_processes(self):
+ sms.close()
+
+ @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
+ # bpo-36368: protect SharedMemoryManager server process from
+ # KeyboardInterrupt signals.
+diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
+index 85c8152d49..e35cfffe84 100644
+--- a/Lib/test/test_asyncio/test_base_events.py
++++ b/Lib/test/test_asyncio/test_base_events.py
+@@ -1377,6 +1377,8 @@ def test_create_connection_no_inet_pton(self, m_socket):
+ 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 --git a/Lib/test/test_ctypes/test_find.py b/Lib/test/test_ctypes/test_find.py
+index a41e94971d..1291af3057 100644
+--- a/Lib/test/test_ctypes/test_find.py
++++ b/Lib/test/test_ctypes/test_find.py
+@@ -117,6 +117,7 @@ def test_find_library_with_gcc(self):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None):
+ self.assertNotEqual(find_library('c'), None)
+
++ @unittest.skipIf(True, 'Fails on Guix.')
+ def test_find_library_with_ld(self):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \
+ unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None):
+diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
+index 1ee9958445..ab6b41befe 100644
+--- a/Lib/test/test_generators.py
++++ b/Lib/test/test_generators.py
+@@ -34,6 +34,7 @@ def generator2(self):
+ 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 --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
+index ec105ae1a0..ae4c5b672e 100644
+--- a/Lib/test/test_pathlib.py
++++ b/Lib/test/test_pathlib.py
+@@ -3069,6 +3069,7 @@ def test_rglob(self):
+ 'pwd module does not expose getpwall()')
+ @unittest.skipIf(sys.platform == "vxworks",
+ "no home directory on VxWorks")
++ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests")
+ def test_expanduser(self):
+ P = self.cls
+ import_helper.import_module('pwd')
+diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
+index 51b844262e..004d3133cf 100644
+--- a/Lib/test/test_pdb.py
++++ b/Lib/test/test_pdb.py
+@@ -1580,6 +1580,7 @@ def test_pdb_next_command_subiterator():
+ (Pdb) continue
+ """
+
++@unittest.skipIf(True, 'Fails on Guix… but skipIf not taken into account?!')
+ def test_pdb_issue_20766():
+ """Test for reference leaks when the SIGINT handler is set.
+
+@@ -1598,11 +1599,11 @@ def test_pdb_issue_20766():
+ > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
+ -> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
+ (Pdb) continue
+- pdb 1: <built-in function default_int_handler>
++ pdb 1: 1
+ > <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: 1
+ """
+
+ def test_pdb_issue_43318():
+diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
+index 2ab6f6a986..8cf6b4d1c8 100644
+--- a/Lib/test/test_regrtest.py
++++ b/Lib/test/test_regrtest.py
+@@ -1049,6 +1049,7 @@ def test_fromfile(self):
+ output = self.run_tests('--fromfile', filename)
+ self.check_executed_tests(output, tests, stats=stats)
+
++ @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)
+@@ -1066,6 +1067,7 @@ def test_slowest(self):
+ % (self.TESTNAME_REGEX, len(tests)))
+ self.check_line(output, regex)
+
++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.')
+ def test_slowest_interrupted(self):
+ # Issue #25373: test --slowest with an interrupted test
+ code = TEST_INTERRUPTED
+diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
+index 317e7ca8f8..7f272daf24 100644
+--- a/Lib/test/test_resource.py
++++ b/Lib/test/test_resource.py
+@@ -151,6 +151,7 @@ def test_freebsd_contants(self):
+
+ @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 --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
+index bf60f37934..5e3a96380a 100644
+--- a/Lib/test/test_shutil.py
++++ b/Lib/test/test_shutil.py
+@@ -1743,6 +1743,7 @@ def test_make_archive(self):
+ base_name = os.path.join(tmpdir, 'archive')
+ self.assertRaises(ValueError, make_archive, base_name, 'xxx')
+
++ @unittest.skipIf(True, "The Guix build container has no root user")
+ @support.requires_zlib()
+ def test_make_archive_owner_group(self):
+ # testing make_archive with owner and group, with various combinations
+@@ -1771,6 +1772,7 @@ def test_make_archive_owner_group(self):
+ self.assertTrue(os.path.isfile(res))
+
+
++ @unittest.skipIf(True, "The Guix build container has no root user")
+ @support.requires_zlib()
+ @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
+ def test_tarfile_root_owner(self):
+diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
+index 637a0ca3b3..2fb804e340 100644
+--- a/Lib/test/test_signal.py
++++ b/Lib/test/test_signal.py
+@@ -160,6 +160,7 @@ def test_valid_signals(self):
+ self.assertLess(signum, signal.NSIG)
+
+ @unittest.skipUnless(sys.executable, "sys.executable required.")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ @support.requires_subprocess()
+ def test_keyboard_interrupt_exit_code(self):
+ """KeyboardInterrupt triggers exit via SIGINT."""
+@@ -211,6 +212,7 @@ def test_issue9324(self):
+ signal.signal(7, handler)
+
+ @unittest.skipUnless(sys.executable, "sys.executable required.")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ @support.requires_subprocess()
+ def test_keyboard_interrupt_exit_code(self):
+ """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
+@@ -1407,6 +1409,7 @@ def cycle_handlers():
+
+ class RaiseSignalTest(unittest.TestCase):
+
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_sigint(self):
+ with self.assertRaises(KeyboardInterrupt):
+ signal.raise_signal(signal.SIGINT)
+@@ -1452,6 +1455,7 @@ def __del__(self):
+
+ class PidfdSignalTest(unittest.TestCase):
+
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ @unittest.skipUnless(
+ hasattr(signal, "pidfd_send_signal"),
+ "pidfd support not built in",
+diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+index 4eb5af99d6..9c7b8f6dbc 100644
+--- a/Lib/test/test_socket.py
++++ b/Lib/test/test_socket.py
+@@ -1016,6 +1016,8 @@ def testHostnameRes(self):
+ if not fqhn in all_host_names:
+ self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))
+
++ @unittest.skipUnless(support.is_resource_enabled('network'),
++ 'network is not enabled')
+ def test_host_resolution(self):
+ for addr in [socket_helper.HOSTv4, '10.0.0.1', '255.255.255.255']:
+ self.assertEqual(socket.gethostbyname(addr), addr)
+@@ -1161,6 +1163,8 @@ def testNtoHErrors(self):
+ self.assertRaises(OverflowError, socket.ntohl, k)
+ self.assertRaises(OverflowError, socket.htonl, k)
+
++ @unittest.skipUnless(os.path.exists("/etc/services"),
++ "getservbyname uses /etc/services, which is not in the chroot")
+ def testGetServBy(self):
+ eq = self.assertEqual
+ # Find one service that exists, then check all the related interfaces.
+@@ -1521,6 +1525,8 @@ def test_sio_loopback_fast_path(self):
+ 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)
+@@ -1653,6 +1659,8 @@ def test_getnameinfo(self):
+ # 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 --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
+index 50766c2548..0c7eb7a83a 100644
+--- a/Lib/test/test_spwd.py
++++ b/Lib/test/test_spwd.py
+@@ -9,8 +9,7 @@
+ spwd = import_helper.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):
+@@ -60,8 +59,7 @@ def test_getspnam(self):
+ 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 --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
+index 71489ea493..33351919fe 100644
+--- a/Lib/test/test_tarfile.py
++++ b/Lib/test/test_tarfile.py
+@@ -2911,9 +2911,12 @@ def root_is_uid_gid_0():
+ 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/Lib/test/test_threading.py b/Lib/test/test_threading.py
+index 00d9e591c7..2515603715 100644
+--- a/Lib/test/test_threading.py
++++ b/Lib/test/test_threading.py
+@@ -1962,6 +1962,7 @@ def check_interrupt_main_noerror(self, signum):
+ # Restore original handler
+ signal.signal(signum, handler)
+
++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.')
+ def test_interrupt_main_subthread(self):
+ # Calling start_new_thread with a function that executes interrupt_main
+ # should raise KeyboardInterrupt upon completion.
+@@ -1973,6 +1974,8 @@ def call_interrupt():
+ t.join()
+ t.join()
+
++
++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.')
+ def test_interrupt_main_mainthread(self):
+ # Make sure that if interrupt_main is called in main thread that
+ # KeyboardInterrupt is raised instantly.
+diff --git a/Lib/test/test_tools/test_freeze.py b/Lib/test/test_tools/test_freeze.py
+index 0e7ed67de7..6539a2983b 100644
+--- a/Lib/test/test_tools/test_freeze.py
++++ b/Lib/test/test_tools/test_freeze.py
+@@ -23,6 +23,7 @@
+ 'test is too slow with PGO')
+ class TestFreeze(unittest.TestCase):
+
++ @unittest.skipIf(True, 'Fails on Guix.')
+ @support.requires_resource('cpu') # Building Python is slow
+ def test_freeze_simple_script(self):
+ script = textwrap.dedent("""
+diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
+index 515c3840cb..a96dfad0fe 100644
+--- a/Lib/test/test_unicodedata.py
++++ b/Lib/test/test_unicodedata.py
+@@ -342,6 +342,7 @@ def test_linebreak_7643(self):
+ self.assertEqual(len(lines), 1,
+ r"\u%.4x should not be a linebreak" % i)
+
++@requires_resource('network')
+ class NormalizationTest(unittest.TestCase):
+ @staticmethod
+ def check_version(testfile):
+diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
+index 445a34ae3e..8f750537c3 100644
+--- a/Tools/scripts/run_tests.py
++++ b/Tools/scripts/run_tests.py
+@@ -69,7 +69,7 @@ def main(regrtest_args):
+ else:
+ args.extend(['-j', '0']) # Use all CPU cores
+ if not any(is_resource_use_flag(arg) for arg in regrtest_args):
+- args.extend(['-u', 'all,-largefile,-audio,-gui'])
++ args.extend(['-u', 'all,-largefile,-audio,-gui,-network'])
+
+ if cross_compile and hostrunner:
+ # If HOSTRUNNER is set and -p/--python option is not given, then
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
deleted file mode 100644
index 099bb86d2f..0000000000
--- a/gnu/packages/patches/python-poppler-qt5-fix-build.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Patch taken from the upstream repository
-https://github.com/frescobaldi/python-poppler-qt5/issues/43
-
-From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
-From: Ben Greiner <code@bnavigator.de>
-Date: Thu, 4 Mar 2021 17:02:51 +0100
-Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
- FormFieldChoice::choicesWithExportValues() (#45)
-
----
- types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
-diff --git a/types.sip b/types.sip
-index 239b8c9..81cb283 100644
---- a/types.sip
-+++ b/types.sip
-@@ -331,5 +331,98 @@ template <TYPE>
- };
-
-
-+/**
-+ * Convert QVector< QPair<TYPE, TYPE> >
-+ * from and to a Python list of a 2-item tuple
-+ */
-+
-+template<TYPE>
-+%MappedType QVector< QPair<TYPE, TYPE> >
-+{
-+%TypeHeaderCode
-+#include <qvector.h>
-+#include <qpair.h>
-+%End
-+
-+%ConvertFromTypeCode
-+ // Create the list.
-+ PyObject *l;
-+
-+ if ((l = PyList_New(sipCpp->size())) == NULL)
-+ return NULL;
-+
-+ // Set the list elements.
-+ for (int i = 0; i < sipCpp->size(); ++i)
-+ {
-+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
-+ PyObject *ptuple = PyTuple_New(2);
-+ PyObject *pfirst;
-+ PyObject *psecond;
-+
-+ TYPE *sfirst = new TYPE(p->first);
-+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 0, pfirst);
-+
-+ TYPE *ssecond = new TYPE(p->second);
-+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ Py_DECREF(pfirst);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 1, psecond);
-+
-+ PyList_SET_ITEM(l, i, ptuple);
-+ }
-+
-+ return l;
-+%End
-+
-+%ConvertToTypeCode
-+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
-+
-+ // Check the type if that is all that is required.
-+ if (sipIsErr == NULL)
-+ {
-+ if (!PySequence_Check(sipPy))
-+ return 0;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
-+ return 0;
-+
-+ return 1;
-+ }
-+
-+
-+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ {
-+ int state;
-+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
-+
-+ if (*sipIsErr)
-+ {
-+ sipReleaseType(p, qpair_type, state);
-+ delete qv;
-+ return 0;
-+ }
-+ qv->append(*p);
-+ sipReleaseType(p, qpair_type, state);
-+ }
-+
-+ *sipCppPtr = qv;
-+ return sipGetState(sipTransferObj);
-+%End
-+
-+};
-+
-
- /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
diff --git a/gnu/packages/patches/qemu-build-info-manual.patch b/gnu/packages/patches/qemu-build-info-manual.patch
index ff28266aaa..0950787810 100644
--- a/gnu/packages/patches/qemu-build-info-manual.patch
+++ b/gnu/packages/patches/qemu-build-info-manual.patch
@@ -13,50 +13,33 @@ readers.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
diff --git a/docs/meson.build b/docs/meson.build
+index 9040f860ae..2ae7886fcb 100644
--- a/docs/meson.build
+++ b/docs/meson.build
-@@ -92,4 +92,25 @@ if build_docs
+@@ -98,4 +98,26 @@ if build_docs
alias_target('sphinxdocs', sphinxdocs)
alias_target('html', sphinxdocs)
alias_target('man', sphinxmans)
+
-+ # Generate a Texinfo version of the QEMU manual.
++ # Add a target to build and install a Texinfo version of the QEMU
++ # manual, if 'makeinfo' is available.
+ makeinfo = find_program(['texi2any', 'makeinfo'])
+ if makeinfo.found()
+ sphinxtexi = custom_target(
-+ 'QEMU manual generated texinfo source',
-+ output: ['QEMU.texi', 'sphinxtexi.stamp'],
++ 'qemu.texi',
++ output: ['qemu.texi', 'sphinxtexi.stamp'],
+ depfile: 'sphinxtexi.d',
+ command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
+ '-Ddepfile_stamp=@OUTPUT1@', '-b', 'texinfo',
-+ meson.current_source_dir(), meson.current_build_dir()])
++ '-d', private_dir, input_dir, meson.current_build_dir()])
+ sphinxinfo = custom_target(
-+ 'QEMU info manual',
++ 'qemu.info',
+ input: sphinxtexi,
-+ output: 'QEMU.info',
++ output: 'qemu.info',
+ install: true,
+ install_dir: get_option('infodir'),
-+ command: [makeinfo, '--no-split', '@INPUT0@', '--output=@OUTPUT@'])
++ command: [makeinfo, '--no-split', '--output=@OUTPUT@', '@INPUT0@'])
+ alias_target('texi', sphinxtexi)
+ alias_target('info', sphinxinfo)
+ endif
endif
-diff --git a/meson.build b/meson.build
---- a/meson.build
-+++ b/meson.build
-@@ -37,6 +37,7 @@ endif
- qemu_confdir = get_option('sysconfdir') / get_option('qemu_suffix')
- qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
- qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
-+qemu_infodir = get_option('infodir') / get_option('qemu_suffix')
- qemu_moddir = get_option('libdir') / get_option('qemu_suffix')
-
- qemu_desktopdir = get_option('datadir') / 'applications'
-@@ -3698,6 +3699,7 @@ else
- summary_info += {'local state directory': 'queried at runtime'}
- endif
- summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')}
-+summary_info += {'Info directory': get_option('prefix') / get_option('infodir')}
- summary_info += {'Build directory': meson.current_build_dir()}
- summary_info += {'Source path': meson.current_source_dir()}
- summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
diff --git a/gnu/packages/patches/qemu-disable-some-qtests-tests.patch b/gnu/packages/patches/qemu-disable-bios-tables-test.patch
index f60698de8f..39b7b0b53c 100644
--- a/gnu/packages/patches/qemu-disable-some-qtests-tests.patch
+++ b/gnu/packages/patches/qemu-disable-bios-tables-test.patch
@@ -1,20 +1,18 @@
-Disable the qtest-aarch64/migration-test, which sometimes fail
-non-deterministically (see:
-https://gitlab.com/qemu-project/qemu/-/issues/1230).
+The bios-tables-test may fail; disable it (see: https://gitlab.com/qemu-project/qemu/-/issues/1098)
-Also disable the bios-tables-test, which may fail on older machines (see:
-https://gitlab.com/qemu-project/qemu/-/issues/1098).
-
---- qemu-8.1.0/tests/qtest/meson.build.old 2023-08-30 11:48:27.871146249 -0400
-+++ qemu-8.1.0/tests/qtest/meson.build 2023-08-30 13:53:25.994084948 -0400
-@@ -1,6 +1,5 @@
+diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
+index f096cf3ecd..82f6e1ffeb 100644
+--- a/tests/qtest/meson.build
++++ b/tests/qtest/meson.build
+@@ -1,7 +1,6 @@
slow_qtests = {
'ahci-test' : 60,
+ 'aspeed_smc-test': 360,
- 'bios-tables-test' : 120,
'boot-serial-test' : 60,
'migration-test' : 150,
'npcm7xx_pwm-test': 150,
-@@ -81,9 +80,6 @@
+@@ -82,9 +81,6 @@ qtests_i386 = \
config_all_devices.has_key('CONFIG_Q35') and \
config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \
slirp.found() ? ['virtio-net-failover'] : []) + \
@@ -24,27 +22,17 @@ https://gitlab.com/qemu-project/qemu/-/issues/1098).
qtests_pci + \
qtests_cxl + \
['fdc-test',
-@@ -212,7 +208,6 @@
-
+@@ -213,7 +209,6 @@ qtests_arm = \
+
# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
qtests_aarch64 = \
- (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + \
(config_all.has_key('CONFIG_TCG') and config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? \
['tpm-tis-device-test', 'tpm-tis-device-swtpm-test'] : []) + \
(config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \
-@@ -222,8 +217,7 @@
- config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \
- ['arm-cpu-features',
- 'numa-test',
-- 'boot-serial-test',
-- 'migration-test']
-+ 'boot-serial-test']
-
- qtests_s390x = \
- qtests_filter + \
-@@ -301,7 +295,6 @@
+@@ -304,7 +299,6 @@ if gnutls.found()
endif
-
+
qtests = {
- 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'],
'cdrom-test': files('boot-sector.c'),
diff --git a/gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch b/gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch
new file mode 100644
index 0000000000..cd501bb343
--- /dev/null
+++ b/gnu/packages/patches/ruby-x25519-automatic-fallback-non-x86_64.patch
@@ -0,0 +1,45 @@
+from https://patch-diff.githubusercontent.com/raw/RubyCrypto/x25519/pull/36.patch
+
+From 5886507e08488c0ed116b1979a073b78b9495683 Mon Sep 17 00:00:00 2001
+From: Eric Long <i@hack3r.moe>
+Date: Sat, 15 Apr 2023 02:58:26 +0800
+Subject: [PATCH] Add automatic fallback for non-x86_64 targets
+
+---
+ Rakefile | 2 +-
+ ext/x25519_precomputed/extconf.rb | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Rakefile b/Rakefile
+index 535697c..6e4f4d3 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -7,7 +7,7 @@ CLEAN.include("**/*.o", "**/*.so", "**/*.bundle", "pkg", "tmp")
+
+ require "rake/extensiontask"
+ %w[precomputed ref10].each do |provider|
+- next if provider == "precomputed" && RUBY_PLATFORM =~ /arm64-darwin/
++ next if provider == "precomputed" && RUBY_PLATFORM !~ /x86_64|x64/
+
+ Rake::ExtensionTask.new("x25519_#{provider}") do |ext|
+ ext.ext_dir = "ext/x25519_#{provider}"
+diff --git a/ext/x25519_precomputed/extconf.rb b/ext/x25519_precomputed/extconf.rb
+index 7f2ba4d..b049f98 100644
+--- a/ext/x25519_precomputed/extconf.rb
++++ b/ext/x25519_precomputed/extconf.rb
+@@ -4,12 +4,12 @@
+
+ require "mkmf"
+
+-if RUBY_PLATFORM =~ /arm64-darwin|aarch64-linux/
+- File.write("Makefile", "install clean: ;")
+-else
++if RUBY_PLATFORM =~ /x86_64|x64/
+ $CFLAGS << " -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=haswell"
+
+ create_makefile "x25519_precomputed"
++else
++ File.write("Makefile", "install clean: ;")
+ end
+
+ # rubocop:enable Style/GlobalVars