summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/biber-sortinithash.patch9
-rw-r--r--gnu/packages/patches/dbus-CVE-2020-12049.patch58
-rw-r--r--gnu/packages/patches/emacs-zones-called-interactively.patch43
-rw-r--r--gnu/packages/patches/haskell-mode-make-check.patch35
-rw-r--r--gnu/packages/patches/haskell-mode-unused-variables.patch44
-rw-r--r--gnu/packages/patches/icecat-makeicecat.patch4
-rw-r--r--gnu/packages/patches/java-openjfx-build-jdk_version.patch27
-rw-r--r--gnu/packages/patches/lib2geom-enable-assertions.patch36
-rw-r--r--gnu/packages/patches/lib2geom-link-tests-against-glib.patch34
-rw-r--r--gnu/packages/patches/lib2geom-use-system-googletest.patch94
-rw-r--r--gnu/packages/patches/nss-CVE-2020-12399.patch138
-rw-r--r--gnu/packages/patches/openscad-parser-boost-1.72.patch26
-rw-r--r--gnu/packages/patches/plotutils-libpng-jmpbuf.patch23
-rw-r--r--gnu/packages/patches/pypy3-7.3.1-fix-tests.patch278
-rw-r--r--gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch103
-rw-r--r--gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch17
16 files changed, 719 insertions, 250 deletions
diff --git a/gnu/packages/patches/biber-sortinithash.patch b/gnu/packages/patches/biber-sortinithash.patch
index 1f054d25e4..5a626705e6 100644
--- a/gnu/packages/patches/biber-sortinithash.patch
+++ b/gnu/packages/patches/biber-sortinithash.patch
@@ -21,6 +21,15 @@ index b4f641e..c6f86c7 100644
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{title}{The Title}
+@@ -116,7 +116,7 @@ my $ann2 = q| \entry{ann2}{misc}{}
+ \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c}
+ \field{extraname}{2}
+ \field{sortinit}{L}
+- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
++ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
+ \field{labelnamesource}{author}
+ \field{labeltitlesource}{title}
+ \field{title}{The Title}
diff --git a/t/basic-misc.t b/t/basic-misc.t
index d4664b1..a9168cc 100644
--- a/t/basic-misc.t
diff --git a/gnu/packages/patches/dbus-CVE-2020-12049.patch b/gnu/packages/patches/dbus-CVE-2020-12049.patch
new file mode 100644
index 0000000000..71280144a1
--- /dev/null
+++ b/gnu/packages/patches/dbus-CVE-2020-12049.patch
@@ -0,0 +1,58 @@
+Fix CVE-2020-12049:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12049
+https://lists.freedesktop.org/archives/ftp-release/2020-June/000753.html
+
+Taken from upstream:
+
+https://gitlab.freedesktop.org/dbus/dbus/-/commit/272d484283883fa9ff95b69d924fff6cd34842f5
+
+diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
+--- a/dbus/dbus-sysdeps-unix.c
++++ b/dbus/dbus-sysdeps-unix.c
+@@ -435,18 +435,6 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd,
+ struct cmsghdr *cm;
+ dbus_bool_t found = FALSE;
+
+- if (m.msg_flags & MSG_CTRUNC)
+- {
+- /* Hmm, apparently the control data was truncated. The bad
+- thing is that we might have completely lost a couple of fds
+- without chance to recover them. Hence let's treat this as a
+- serious error. */
+-
+- errno = ENOSPC;
+- _dbus_string_set_length (buffer, start);
+- return -1;
+- }
+-
+ for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
+ if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS)
+ {
+@@ -501,6 +489,26 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd,
+ if (!found)
+ *n_fds = 0;
+
++ if (m.msg_flags & MSG_CTRUNC)
++ {
++ unsigned int i;
++
++ /* Hmm, apparently the control data was truncated. The bad
++ thing is that we might have completely lost a couple of fds
++ without chance to recover them. Hence let's treat this as a
++ serious error. */
++
++ /* We still need to close whatever fds we *did* receive,
++ * otherwise they'll never get closed. (CVE-2020-12049) */
++ for (i = 0; i < *n_fds; i++)
++ close (fds[i]);
++
++ *n_fds = 0;
++ errno = ENOSPC;
++ _dbus_string_set_length (buffer, start);
++ return -1;
++ }
++
+ /* put length back (doesn't actually realloc) */
+ _dbus_string_set_length (buffer, start + bytes_read);
+
diff --git a/gnu/packages/patches/emacs-zones-called-interactively.patch b/gnu/packages/patches/emacs-zones-called-interactively.patch
deleted file mode 100644
index eefcfdd12e..0000000000
--- a/gnu/packages/patches/emacs-zones-called-interactively.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 81603e53ebaae0f0b23c4c52c7dab83e808964ec Mon Sep 17 00:00:00 2001
-From: Brian Leung <bkleung89@gmail.com>
-Date: Sun, 17 Mar 2019 01:32:04 +0100
-Subject: [PATCH] This patch silences the byte-compiler.
-
----
- zones.el | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/zones.el b/zones.el
-index ca88d48..594ea36 100644
---- a/zones.el
-+++ b/zones.el
-@@ -1075,7 +1075,7 @@ You can use `C-x n x' to widen to a previous buffer restriction.
-
- This is a destructive operation. The list structure of the variable
- value can be modified."
-- (zz-narrow-advice (interactive-p)))
-+ (zz-narrow-advice (called-interactively-p 'interactive)))
-
- (defadvice narrow-to-defun (after zz-add-zone--defun activate)
- "Push the defun limits to the current `zz-izones-var'.
-@@ -1083,7 +1083,7 @@ You can use `C-x n x' to widen to a previous buffer restriction.
-
- This is a destructive operation. The list structure of the variable
- value can be modified."
-- (zz-narrow-advice (interactive-p)))
-+ (zz-narrow-advice (called-interactively-p 'interactive)))
-
- ;; Call `zz-add-zone' if interactive or `zz-add-zone-anyway-p'.
- ;;
-@@ -1093,7 +1093,7 @@ You can use `C-x n x' to widen to a previous buffer restriction.
-
- This is a destructive operation. The list structure of the variable
- value can be modified."
-- (zz-narrow-advice (interactive-p)))
-+ (zz-narrow-advice (called-interactively-p 'interactive)))
-
- ;;(@* "General Commands")
-
---
-2.22.0
-
diff --git a/gnu/packages/patches/haskell-mode-make-check.patch b/gnu/packages/patches/haskell-mode-make-check.patch
deleted file mode 100644
index a4d4d525f2..0000000000
--- a/gnu/packages/patches/haskell-mode-make-check.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Copied from upstream repository.
-Hunk #2 is removed since it cannot be applied and it is not needed.
-
-From 7cead7137bf54851c1b7df5a3854351296d21276 Mon Sep 17 00:00:00 2001
-From: Vasantha Ganesh K <vasanthaganesh.k@tuta.io>
-Date: Thu, 22 Jun 2017 23:38:40 +0530
-Subject: [PATCH] removed `check-conventions' from make
-
----
- Makefile | 7 +-
- tests/haskell-code-conventions.el | 165 ------------------------------
- 2 files changed, 1 insertion(+), 171 deletions(-)
- delete mode 100644 tests/haskell-code-conventions.el
-
-diff --git a/Makefile b/Makefile
-index b2c89d6..aa907c5 100644
---- a/Makefile
-+++ b/Makefile
-@@ -79,12 +79,7 @@ build-$(EMACS_VERSION)/build-flag : build-$(EMACS_VERSION) $(patsubst %.el,build
- check-%: tests/%-tests.el
- $(BATCH) -l "$<" -f ert-run-tests-batch-and-exit;
-
--check: compile $(AUTOLOADS) check-ert check-conventions
--
--check-conventions :
-- $(BATCH) -l tests/haskell-code-conventions.el \
-- -f haskell-check-conventions-batch-and-exit
-- @echo "conventions are okay"
-+check: compile $(AUTOLOADS) check-ert
-
- check-ert: $(ELCHECKS)
- $(BATCH) --eval "(when (= emacs-major-version 24) \
---
-2.18.0
-
diff --git a/gnu/packages/patches/haskell-mode-unused-variables.patch b/gnu/packages/patches/haskell-mode-unused-variables.patch
deleted file mode 100644
index b175fae28c..0000000000
--- a/gnu/packages/patches/haskell-mode-unused-variables.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Copied verbatim from upstream repository.
-
-From cee22450ee30e79952f594796721dc6b17798ee6 Mon Sep 17 00:00:00 2001
-From: Sascha Wilde <wilde@sha-bang.de>
-Date: Fri, 23 Sep 2016 15:35:59 +0200
-Subject: [PATCH] Removed unused lexical variables.
-
----
- haskell-lexeme.el | 3 +--
- haskell-process.el | 4 +---
- 2 files changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/haskell-lexeme.el b/haskell-lexeme.el
-index 4256a79..b832560 100644
---- a/haskell-lexeme.el
-+++ b/haskell-lexeme.el
-@@ -138,8 +138,7 @@ When match is successful, match-data will contain:
- (match-text 2) - whole qualified identifier
- (match-text 3) - unqualified part of identifier
- (match-text 4) - closing backtick"
-- (let ((begin (point))
-- (match-data-old (match-data))
-+ (let ((match-data-old (match-data))
- first-backtick-start
- last-backtick-start
- qid-start
-diff --git a/haskell-process.el b/haskell-process.el
-index b4efba2..4f3f859 100644
---- a/haskell-process.el
-+++ b/haskell-process.el
-@@ -160,9 +160,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
- (defun haskell-process-log (msg)
- "Effective append MSG to the process log (if enabled)."
- (when haskell-process-log
-- (let* ((append-to (get-buffer-create "*haskell-process-log*"))
-- (windows (get-buffer-window-list append-to t t))
-- move-point-in-windows)
-+ (let* ((append-to (get-buffer-create "*haskell-process-log*")))
- (with-current-buffer append-to
- ;; point should follow insertion so that it stays at the end
- ;; of the buffer
---
-2.18.0
-
diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch
index 2978a5789e..d3d95cbf28 100644
--- a/gnu/packages/patches/icecat-makeicecat.patch
+++ b/gnu/packages/patches/icecat-makeicecat.patch
@@ -25,7 +25,7 @@ index 8be2362..48716f2 100755
-wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc
-gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353
-gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc
--echo -n fa5b2266d225878d4b35694678f79fd7e7a6d3c62759a40326129bd90f63e842 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c -
+-echo -n 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c -
-
-echo Extracting Firefox tarball
-tar -xf firefox-${FFVERSION}esr.source.tar.xz
@@ -37,7 +37,7 @@ index 8be2362..48716f2 100755
+# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc
+# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353
+# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc
-+# echo -n fa5b2266d225878d4b35694678f79fd7e7a6d3c62759a40326129bd90f63e842 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c -
++# echo -n 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c -
+#
+# echo Extracting Firefox tarball
+# tar -xf firefox-${FFVERSION}esr.source.tar.xz
diff --git a/gnu/packages/patches/java-openjfx-build-jdk_version.patch b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
new file mode 100644
index 0000000000..7be954467a
--- /dev/null
+++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch
@@ -0,0 +1,27 @@
+Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME
+
+Icedtea contains guix in its version, so build.gradle failes to run. Openjfx
+packaging is not trivial, so you will probably need to try build it with
+gradlew.
+
+---
+ build.gradle | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/build.gradle b/build.gradle
+index df82f63..2c626cd 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -742,9 +742,9 @@ try {
+ if (inStream.readLine() != null) {
+ String v = inStream.readLine();
+ if (v != null) {
+- int ib = v.indexOf(" (build ");
++ int ib = v.indexOf(" (guix build ");
+ if (ib != -1) {
+- String ver = v.substring(ib + 8, v.size() - 1);
++ String ver = v.substring(ib + 13, v.size() - 1);
+
+ defineProperty("jdkRuntimeVersion", ver)
+ defineProperty("jdkVersion", jdkRuntimeVersion.split("-")[0])
+2.24.1
diff --git a/gnu/packages/patches/lib2geom-enable-assertions.patch b/gnu/packages/patches/lib2geom-enable-assertions.patch
new file mode 100644
index 0000000000..8feb44acbf
--- /dev/null
+++ b/gnu/packages/patches/lib2geom-enable-assertions.patch
@@ -0,0 +1,36 @@
+From 4aa78f52232682b353eb15c219171e466987bac7 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Thu, 16 Jan 2020 00:19:29 -0500
+Subject: [PATCH] build: Enable assertions for the RelWithDebugInfo build type.
+
+This fixes issue #5 (see:
+https://gitlab.com/inkscape/lib2geom/issues/5).
+
+* CMakeLists.txt: Remove the "-DNDEBUG" CXX flag from the default
+configuration for the RelWithDebugInfo build type.
+---
+ CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bfeb8f03..a663a1b0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,6 +19,14 @@ enable_testing()
+
+ include(CheckCXXSourceCompiles)
+
++# Enable assertions for the RelWithDebugInfo build type. This is
++# useful as some tests make use of it (see:
++# https://gitlab.com/inkscape/lib2geom/issues/5).
++if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
++ string(REPLACE "-DNDEBUG" ""
++ CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
++endif()
++
+ # Find dependencies
+ find_package(Boost 1.40 REQUIRED)
+ find_package(DoubleConversion REQUIRED)
+--
+2.24.1
+
diff --git a/gnu/packages/patches/lib2geom-link-tests-against-glib.patch b/gnu/packages/patches/lib2geom-link-tests-against-glib.patch
new file mode 100644
index 0000000000..2b4f7ca6bf
--- /dev/null
+++ b/gnu/packages/patches/lib2geom-link-tests-against-glib.patch
@@ -0,0 +1,34 @@
+From f95925afef451755fc1449e57fbfdc2e7277f4b4 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Sat, 11 Jan 2020 00:44:55 -0500
+Subject: [PATCH 1/3] tests: Link against GLib.
+
+This resolves an error about not finding <glib.h> when linking the
+tests that make use of GLib.
+
+* src/tests/CMakeLists.txt[2GEOM_GTESTS_SRC]: Add the glib library to
+the link target libraries.
+---
+ src/tests/CMakeLists.txt | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
+index 5ddf7f9c..626cfd87 100644
+--- a/src/tests/CMakeLists.txt
++++ b/src/tests/CMakeLists.txt
+@@ -32,8 +32,10 @@ sbasis-test
+
+ foreach(source ${2GEOM_GTESTS_SRC})
+ add_executable(${source} ${source}.cpp)
+- target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS})
+- target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} ${GTK3_LIBRARIES})
++ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS}
++ ${GTK3_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS})
++ target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES}
++ ${GTK3_LIBRARIES} ${GLIB_LIBRARIES})
+ add_test(NAME ${source} COMMAND ${source})
+ endforeach()
+
+--
+2.24.1
+
diff --git a/gnu/packages/patches/lib2geom-use-system-googletest.patch b/gnu/packages/patches/lib2geom-use-system-googletest.patch
new file mode 100644
index 0000000000..16cce1799f
--- /dev/null
+++ b/gnu/packages/patches/lib2geom-use-system-googletest.patch
@@ -0,0 +1,94 @@
+From 6693b9c8ff1ae1ec02c9002c0a8f5f416f0c88f0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Sun, 12 Jan 2020 23:23:33 -0500
+Subject: [PATCH 3/3] build: Prefer googletest from the system.
+
+Fixes issue #4.
+
+The build system now look for a system installed googletest or falls
+back to the bundled copy of googletest otherwise.
+
+* CMakeLists.txt: Add call to find_package(GTest).
+(include_directories): Remove "src/googletest/googletest/include" from
+arg.
+* src/CMakeLists.txt[NOT GTEST_FOUND]: Define the gtest and gtest_main
+libraries when GTEST_FOUND is false. Globally include the googletest
+headers here. Define aliases for the gtest and gtest_main libraries
+that match those defined by the FindGTest module.
+* src/tests/CMakeLists.txt: Replace references to gtest_main and gtest
+by GTest::Main and GTest::GTest, respectively.
+---
+ CMakeLists.txt | 3 ++-
+ src/CMakeLists.txt | 15 +++++++++++----
+ src/tests/CMakeLists.txt | 6 +++---
+ 3 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bfeb8f03..96fbd58c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,13 +25,14 @@ find_package(DoubleConversion REQUIRED)
+ find_package(PkgConfig REQUIRED)
+ find_package(Cython)
+ find_package(Threads)
++find_package(GTest)
+ pkg_check_modules(GTK3 gtk+-3.0)
+ pkg_check_modules(GLIB glib-2.0)
+ pkg_check_modules(CAIRO cairo)
+ pkg_check_modules(GSL gsl)
+
+ # Add global include and link directories
+-include_directories(src src/googletest/googletest/include ${CMAKE_CURRENT_BINARY_DIR})
++include_directories(src ${CMAKE_CURRENT_BINARY_DIR})
+ link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/2geom)
+
+ check_cxx_source_compiles("#include <math.h>\nint main() { double a=0.5,b=0.5,c=0.5; sincos(a, &b, &c); return 0; }" HAVE_SINCOS)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index eefb3ac5..941dc4c7 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,7 +1,14 @@
+-add_library(gtest SHARED googletest/googletest/src/gtest-all.cc)
+-target_include_directories(gtest PRIVATE googletest/googletest)
+-target_link_libraries(gtest Threads::Threads)
+-add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc)
++if(NOT GTEST_FOUND)
++ message("No system googletest library: using bundled copy.")
++ add_library(gtest SHARED googletest/googletest/src/gtest-all.cc)
++ add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc)
++ target_include_directories(gtest PRIVATE googletest/googletest)
++ target_link_libraries(gtest Threads::Threads)
++ include_directories(SYSTEM googletest/googletest/include)
++ # Aliases to share the same nomenclature with FindGTest.
++ add_library(GTest::GTest ALIAS gtest)
++ add_library(GTest::Main ALIAS gtest_main)
++endif()
+
+ add_subdirectory(2geom)
+ add_subdirectory(tests)
+diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
+index 626cfd87..3538f8cf 100644
+--- a/src/tests/CMakeLists.txt
++++ b/src/tests/CMakeLists.txt
+@@ -34,15 +34,15 @@ foreach(source ${2GEOM_GTESTS_SRC})
+ add_executable(${source} ${source}.cpp)
+ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS}
+ ${GTK3_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS})
+- target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES}
+- ${GTK3_LIBRARIES} ${GLIB_LIBRARIES})
++ target_link_libraries(${source} 2geom GTest::Main GTest::GTest
++ ${GSL_LIBRARIES} ${GTK3_LIBRARIES} ${GLIB_LIBRARIES})
+ add_test(NAME ${source} COMMAND ${source})
+ endforeach()
+
+ foreach(source ${2GEOM_TESTS_SRC})
+ add_executable(${source} ${source}.cpp)
+ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS})
+- target_link_libraries(${source} 2geom gtest ${GSL_LIBRARIES} ${GTK3_LIBRARIES})
++ target_link_libraries(${source} 2geom GTest::GTest ${GSL_LIBRARIES} ${GTK3_LIBRARIES})
+ add_test(NAME ${source} COMMAND ${source})
+ endforeach(source)
+
+--
+2.24.1
+
diff --git a/gnu/packages/patches/nss-CVE-2020-12399.patch b/gnu/packages/patches/nss-CVE-2020-12399.patch
new file mode 100644
index 0000000000..0d91b655e2
--- /dev/null
+++ b/gnu/packages/patches/nss-CVE-2020-12399.patch
@@ -0,0 +1,138 @@
+Fix CVE-2020-12399 (Timing attack on DSA signature generation: NSS has
+shown timing differences when performing DSA signatures, which was
+exploitable and could eventually leak private keys.)
+
+Copied from upstream:
+<https://hg.mozilla.org/projects/nss/rev/daa823a4a29bcef0fec33a379ec83857429aea2e>
+but with "nss/" inserted into the file name to patch.
+
+# HG changeset patch
+# User Robert Relyea <rrelyea@redhat.com>
+# Date 1589907685 0
+# Node ID daa823a4a29bcef0fec33a379ec83857429aea2e
+# Parent d2cfb4ccdf167e5ea06d2bb5bc39c50f789929c8
+Bug 1631576 - Force a fixed length for DSA exponentiation r=pereida,bbrumley
+
+Differential Revision: https://phabricator.services.mozilla.com/D72011
+
+diff --git a/nss/lib/freebl/dsa.c b/nss/lib/freebl/dsa.c
+--- a/nss/lib/freebl/dsa.c
++++ b/nss/lib/freebl/dsa.c
+@@ -308,23 +308,24 @@ DSA_NewKeyFromSeed(const PQGParams *para
+ SECItem seedItem;
+ seedItem.data = (unsigned char *)seed;
+ seedItem.len = PQG_GetLength(&params->subPrime);
+ return dsa_NewKeyExtended(params, &seedItem, privKey);
+ }
+
+ static SECStatus
+ dsa_SignDigest(DSAPrivateKey *key, SECItem *signature, const SECItem *digest,
+- const unsigned char *kb)
++ const unsigned char *kbytes)
+ {
+ mp_int p, q, g; /* PQG parameters */
+ mp_int x, k; /* private key & pseudo-random integer */
+ mp_int r, s; /* tuple (r, s) is signature) */
+ mp_int t; /* holding tmp values */
+ mp_int ar; /* holding blinding values */
++ mp_digit fuzz; /* blinding multiplier for q */
+ mp_err err = MP_OKAY;
+ SECStatus rv = SECSuccess;
+ unsigned int dsa_subprime_len, dsa_signature_len, offset;
+ SECItem localDigest;
+ unsigned char localDigestData[DSA_MAX_SUBPRIME_LEN];
+ SECItem t2 = { siBuffer, NULL, 0 };
+
+ /* FIPS-compliance dictates that digest is a SHA hash. */
+@@ -368,31 +369,46 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt
+ CHECK_MPI_OK(mp_init(&q));
+ CHECK_MPI_OK(mp_init(&g));
+ CHECK_MPI_OK(mp_init(&x));
+ CHECK_MPI_OK(mp_init(&k));
+ CHECK_MPI_OK(mp_init(&r));
+ CHECK_MPI_OK(mp_init(&s));
+ CHECK_MPI_OK(mp_init(&t));
+ CHECK_MPI_OK(mp_init(&ar));
++
+ /*
+ ** Convert stored PQG and private key into MPI integers.
+ */
+ SECITEM_TO_MPINT(key->params.prime, &p);
+ SECITEM_TO_MPINT(key->params.subPrime, &q);
+ SECITEM_TO_MPINT(key->params.base, &g);
+ SECITEM_TO_MPINT(key->privateValue, &x);
+- OCTETS_TO_MPINT(kb, &k, dsa_subprime_len);
++ OCTETS_TO_MPINT(kbytes, &k, dsa_subprime_len);
++
++ /* k blinding create a single value that has the high bit set in
++ * the mp_digit*/
++ if (RNG_GenerateGlobalRandomBytes(&fuzz, sizeof(mp_digit)) != SECSuccess) {
++ PORT_SetError(SEC_ERROR_NEED_RANDOM);
++ rv = SECFailure;
++ goto cleanup;
++ }
++ fuzz |= 1ULL << ((sizeof(mp_digit) * PR_BITS_PER_BYTE - 1));
+ /*
+ ** FIPS 186-1, Section 5, Step 1
+ **
+ ** r = (g**k mod p) mod q
+ */
+- CHECK_MPI_OK(mp_exptmod(&g, &k, &p, &r)); /* r = g**k mod p */
+- CHECK_MPI_OK(mp_mod(&r, &q, &r)); /* r = r mod q */
++ CHECK_MPI_OK(mp_mul_d(&q, fuzz, &t)); /* t = q*fuzz */
++ CHECK_MPI_OK(mp_add(&k, &t, &t)); /* t = k+q*fuzz */
++ /* length of t is now fixed, bits in k have been blinded */
++ CHECK_MPI_OK(mp_exptmod(&g, &t, &p, &r)); /* r = g**t mod p */
++ /* r is now g**(k+q*fuzz) == g**k mod p */
++ CHECK_MPI_OK(mp_mod(&r, &q, &r)); /* r = r mod q */
++
+ /*
+ ** FIPS 186-1, Section 5, Step 2
+ **
+ ** s = (k**-1 * (HASH(M) + x*r)) mod q
+ */
+ if (DSA_NewRandom(NULL, &key->params.subPrime, &t2) != SECSuccess) {
+ PORT_SetError(SEC_ERROR_NEED_RANDOM);
+ rv = SECFailure;
+@@ -406,25 +422,34 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt
+ goto cleanup;
+ }
+ SECITEM_TO_MPINT(t2, &ar); /* ar <-$ Zq */
+ SECITEM_FreeItem(&t2, PR_FALSE);
+
+ /* Using mp_invmod on k directly would leak bits from k. */
+ CHECK_MPI_OK(mp_mul(&k, &ar, &k)); /* k = k * ar */
+ CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */
+- CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */
++ /* k is now k*t*ar */
++ CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */
++ /* k is now (k*t*ar)**-1 */
+ CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */
+- SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */
++ /* k is now (k*ar)**-1 */
++ SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */
+ /* To avoid leaking secret bits here the addition is blinded. */
+- CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */
+- CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */
++ CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */
++ /* x is now x*ar */
++ CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */
++ /* x is now x*r*ar */
+ CHECK_MPI_OK(mp_mulmod(&s, &ar, &q, &t)); /* t = s * ar mod q */
+- CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */
+- CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */
++ /* t is now hash(M)*ar */
++ CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */
++ /* s is now (HASH(M)+x*r)*ar */
++ CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */
++ /* s is now (HASH(M)+x*r)*ar*(k*ar)**-1 = (k**-1)*(HASH(M)+x*r) */
++
+ /*
+ ** verify r != 0 and s != 0
+ ** mentioned as optional in FIPS 186-1.
+ */
+ if (mp_cmp_z(&r) == 0 || mp_cmp_z(&s) == 0) {
+ PORT_SetError(SEC_ERROR_NEED_RANDOM);
+ rv = SECFailure;
+ goto cleanup;
+
diff --git a/gnu/packages/patches/openscad-parser-boost-1.72.patch b/gnu/packages/patches/openscad-parser-boost-1.72.patch
new file mode 100644
index 0000000000..35311e6173
--- /dev/null
+++ b/gnu/packages/patches/openscad-parser-boost-1.72.patch
@@ -0,0 +1,26 @@
+https://github.com/openscad/openscad/commit/b6c170cc5d.patch
+
+From b6c170cc5dd1bc677176ee732cdb0ddae57e5cf0 Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Fri, 25 Oct 2019 15:10:26 +0000
+Subject: [PATCH] Add missing header bootlegged by Boost < 1.72
+
+src/parser.y:76:6: error: no template named 'stack' in namespace 'std'
+std::stack<LocalScope *> scope_stack;
+~~~~~^
+---
+ src/parser.y | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/parser.y b/src/parser.y
+index 7f4fd56ca7..4c77c989ea 100644
+--- a/src/parser.y
++++ b/src/parser.y
+@@ -46,6 +46,7 @@
+ #include "printutils.h"
+ #include "memory.h"
+ #include <sstream>
++#include <stack>
+ #include <boost/filesystem.hpp>
+ #include "boost-utils.h"
+ #include "feature.h"
diff --git a/gnu/packages/patches/plotutils-libpng-jmpbuf.patch b/gnu/packages/patches/plotutils-libpng-jmpbuf.patch
deleted file mode 100644
index 07ef60996c..0000000000
--- a/gnu/packages/patches/plotutils-libpng-jmpbuf.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Use the `png_jmpbuf' accessor, as recommended since libpng 1.4.0:
-http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt .
-
---- plotutils-2.6/libplot/z_write.c 2013-07-12 17:19:12.000000000 +0200
-+++ plotutils-2.6/libplot/z_write.c 2013-07-12 17:19:07.000000000 +0200
-@@ -164,7 +164,7 @@ _pl_z_maybe_output_image (S___(Plotter *
- }
-
- /* cleanup after libpng errors (error handler does a longjmp) */
-- if (setjmp (png_ptr->jmpbuf))
-+ if (setjmp (png_jmpbuf (png_ptr)))
- {
- png_destroy_write_struct (&png_ptr, (png_info **)NULL);
- return -1;
-@@ -444,7 +444,7 @@ _our_error_fn_stdio (png_struct *png_ptr
- #endif
- }
-
-- longjmp (png_ptr->jmpbuf, 1);
-+ longjmp (png_jmpbuf (png_ptr), 1);
- }
-
- static void
diff --git a/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch b/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch
new file mode 100644
index 0000000000..464aad967f
--- /dev/null
+++ b/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch
@@ -0,0 +1,278 @@
+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/websocketpp-fix-for-boost-1.70.patch b/gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch
deleted file mode 100644
index ece414a1cb..0000000000
--- a/gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-This patch for Boost >= 1.70 was made by merging two patches that
-are in the 'develop' branch (c769c92 and f810ca2).
-
-diff -u b/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp
---- b/websocketpp/transport/asio/connection.hpp
-+++ b/websocketpp/transport/asio/connection.hpp
-@@ -311,9 +311,10 @@
- * needed.
- */
- timer_ptr set_timer(long duration, timer_handler callback) {
-- timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>(
-- lib::ref(*m_io_service),
-- lib::asio::milliseconds(duration)
-+ timer_ptr new_timer(
-+ new lib::asio::steady_timer(
-+ *m_io_service,
-+ lib::asio::milliseconds(duration))
- );
-
- if (config::enable_multithreading) {
-@@ -461,8 +462,7 @@
- m_io_service = io_service;
-
- if (config::enable_multithreading) {
-- m_strand = lib::make_shared<lib::asio::io_service::strand>(
-- lib::ref(*io_service));
-+ m_strand.reset(new lib::asio::io_service::strand(*io_service));
- }
-
- lib::error_code ec = socket_con_type::init_asio(io_service, m_strand,
-diff -u b/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp
---- b/websocketpp/transport/asio/endpoint.hpp
-+++ b/websocketpp/transport/asio/endpoint.hpp
-@@ -195,8 +195,7 @@
-
- m_io_service = ptr;
- m_external_io_service = true;
-- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>(
-- lib::ref(*m_io_service));
-+ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service));
-
- m_state = READY;
- ec = lib::error_code();
-@@ -688,9 +687,7 @@
- * @since 0.3.0
- */
- void start_perpetual() {
-- m_work = lib::make_shared<lib::asio::io_service::work>(
-- lib::ref(*m_io_service)
-- );
-+ m_work.reset(new lib::asio::io_service::work(*m_io_service));
- }
-
- /// Clears the endpoint's perpetual flag, allowing it to exit when empty
-@@ -854,8 +851,7 @@
-
- // Create a resolver
- if (!m_resolver) {
-- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(
-- lib::ref(*m_io_service));
-+ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service));
- }
-
- tcon->set_uri(u);
-unchanged:
---- a/websocketpp/transport/asio/security/none.hpp
-+++ b/websocketpp/transport/asio/security/none.hpp
-@@ -168,8 +168,7 @@ protected:
- return socket::make_error_code(socket::error::invalid_state);
- }
-
-- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
-- lib::ref(*service));
-+ m_socket.reset(new lib::asio::ip::tcp::socket(*service));
-
- if (m_socket_init_handler) {
- m_socket_init_handler(m_hdl, *m_socket);
-unchanged:
---- a/websocketpp/transport/asio/security/tls.hpp
-+++ b/websocketpp/transport/asio/security/tls.hpp
-@@ -193,8 +193,7 @@ protected:
- if (!m_context) {
- return socket::make_error_code(socket::error::invalid_tls_context);
- }
-- m_socket = lib::make_shared<socket_type>(
-- _WEBSOCKETPP_REF(*service),lib::ref(*m_context));
-+ m_socket.reset(new socket_type(*service, *m_context));
-
- if (m_socket_init_handler) {
- m_socket_init_handler(m_hdl, get_socket());
-only in patch2:
-unchanged:
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -202,7 +202,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
- endif ()
-
- if (NOT Boost_USE_STATIC_LIBS)
-- add_definitions (/DBOOST_TEST_DYN_LINK)
-+ add_definitions (-DBOOST_TEST_DYN_LINK)
- endif ()
-
- set (Boost_FIND_REQUIRED TRUE)
diff --git a/gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch b/gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch
new file mode 100644
index 0000000000..ea759d022b
--- /dev/null
+++ b/gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch
@@ -0,0 +1,17 @@
+From: Tobias Geerinckx-Rice <me@tobias.gr>
+Date: Fri, 05 Jun 2020 18:37:51 +0200
+Subject: [PATCH] gnu: websocketpp: Fix build with CMake >= 3.15.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57ed01e78..43c772d78 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -215,7 +215,7 @@
+ set (Boost_USE_MULTITHREADED TRUE)
+ set (Boost_ADDITIONAL_VERSIONS "1.39.0" "1.40.0" "1.41.0" "1.42.0" "1.43.0" "1.44.0" "1.46.1") # todo: someone who knows better spesify these!
+
+- find_package (Boost 1.39.0 COMPONENTS "${WEBSOCKETPP_BOOST_LIBS}")
++ find_package (Boost 1.39.0 COMPONENTS ${WEBSOCKETPP_BOOST_LIBS})
+
+ if (Boost_FOUND)
+ # Boost is a project wide global dependency.