summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-11-23 23:39:47 +0100
committerMarius Bakke <marius@gnu.org>2020-11-23 23:39:47 +0100
commit87a027243fa5e8b00fa6257847fde5d5af04bce6 (patch)
tree87f85b3d5d9f521e29a09d6c36a4f951a426eab0 /gnu/packages/patches
parenta485a98ca8296d760251e9d870583117ac50979e (diff)
parent689d88451e7f1db62df5989ac3ff82f540424061 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/eigen-remove-openmp-error-counting.patch64
-rw-r--r--gnu/packages/patches/lsof-fatal-test-failures.patch58
-rw-r--r--gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch68
-rw-r--r--gnu/packages/patches/python-pydot-regression-test.patch79
-rw-r--r--gnu/packages/patches/ungoogled-chromium-system-nspr.patch22
5 files changed, 280 insertions, 11 deletions
diff --git a/gnu/packages/patches/eigen-remove-openmp-error-counting.patch b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch
new file mode 100644
index 0000000000..556474e8b3
--- /dev/null
+++ b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch
@@ -0,0 +1,64 @@
+From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001
+From: Luke Peterson <hazelnusse@gmail.com>
+Date: Thu, 8 Oct 2020 12:16:53 -0700
+Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm
+
+This resolves a compilation error associated with
+Eigen::eigen_assert_exception. It also eliminates the counting of
+exceptions that may occur in the OpenMP parallel section. If an
+unhandled exception occurs in this section, the behavior is non-conforming
+according to the OpenMP specification.
+---
+ Eigen/src/Core/products/Parallelizer.h | 14 +++++---------
+ test/CMakeLists.txt | 2 +-
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h
+index 67b2442b5..a3cc05b77 100644
+--- a/Eigen/src/Core/products/Parallelizer.h
++++ b/Eigen/src/Core/products/Parallelizer.h
+@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
+
+ ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0);
+
+- int errorCount = 0;
+- #pragma omp parallel num_threads(threads) reduction(+: errorCount)
++ #pragma omp parallel num_threads(threads)
+ {
+ Index i = omp_get_thread_num();
+ // Note that the actual number of threads might be lower than the number of request ones.
+@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
+ info[i].lhs_start = r0;
+ info[i].lhs_length = actualBlockRows;
+
+- EIGEN_TRY {
+- if(transpose) func(c0, actualBlockCols, 0, rows, info);
+- else func(0, rows, c0, actualBlockCols, info);
+- } EIGEN_CATCH(...) {
+- ++errorCount;
+- }
++ if(transpose)
++ func(c0, actualBlockCols, 0, rows, info);
++ else
++ func(0, rows, c0, actualBlockCols, info);
+ }
+- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception());
+ #endif
+ }
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 0747aa6cb..b02577780 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -163,7 +163,7 @@ ei_add_test(constructor)
+ ei_add_test(linearstructure)
+ ei_add_test(integer_types)
+ ei_add_test(unalignedcount)
+-if(NOT EIGEN_TEST_NO_EXCEPTIONS)
++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP)
+ ei_add_test(exceptions)
+ endif()
+ ei_add_test(redux)
+--
+GitLab
+
diff --git a/gnu/packages/patches/lsof-fatal-test-failures.patch b/gnu/packages/patches/lsof-fatal-test-failures.patch
new file mode 100644
index 0000000000..e874ba6ad4
--- /dev/null
+++ b/gnu/packages/patches/lsof-fatal-test-failures.patch
@@ -0,0 +1,58 @@
+From: Tobias Geerinckx-Rice <me@tobias.gr>
+Date: Mon, 23 Nov 2020 05:36:53 +0100
+Subject: [PATCH] gnu: lsof: Make test failures fatal.
+
+Submitted upstream[0].
+
+[0]: https://github.com/lsof-org/lsof/pull/144
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 08574a0..2923bb8 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -27,7 +27,7 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC
+ exit 1 ;\
+ fi
+ @rm -f config.LT*
+- -@err=0; \
++ @err=0; \
+ echo ""; \
+ echo "Basic test:"; \
+ ./${BASTST}; \
+@@ -54,8 +54,11 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC
+ echo "Suggestion: try the optional tests: \"make opt\""; \
+ echo ""; \
+ fi; \
+- fi;
+- @rm -f config.LT*
++ fi; \
++ rm -f config.LT*; \
++ if [ $$err -ne 0 ]; then \
++ exit 1; \
++ fi
+
+ auto: ckDB silent FRC
+
+@@ -112,7 +115,7 @@ LTunix: LTunix.c ${CONFIG} ${LIBOBJ} ${HDR} config.ldflags
+
+ opt: ${CKTSTDB} ${OPTTST} FRC
+ @rm -f config.LT*
+- -@err=0; \
++ @err=0; \
+ echo ""; \
+ echo "Optional tests:"; \
+ for i in ${OPTTST}; do \
+@@ -126,8 +129,11 @@ opt: ${CKTSTDB} ${OPTTST} FRC
+ else \
+ echo "All optional tests succeeded."; \
+ fi; \
+- echo "";
+- @rm -f config.LT*
++ echo ""; \
++ rm -f config.LT*; \
++ if [ $$err -ne 0 ]; then \
++ exit 1; \
++ fi
+
+ optional: opt
+
diff --git a/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch
new file mode 100644
index 0000000000..1ebde1997f
--- /dev/null
+++ b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch
@@ -0,0 +1,68 @@
+From 3c70f2ff18650c4794556049cd4ea22a58cc719e Mon Sep 17 00:00:00 2001
+From: Christophe Troestler <Christophe.Troestler@umons.ac.be>
+Date: Sun, 27 Sep 2020 23:20:52 +0200
+Subject: [PATCH] Do not store the Caml_ba_array_val pointer during surface
+ creation
+
+Extracted from Cairo git-tree on November 22, 2020 by
+Brett Gilio <brettg@gnu.org>
+---
+ src/cairo_stubs.c | 3 ++-
+ tests/image_create.ml | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c
+index 641ee2c..200abf3 100644
+--- a/src/cairo_stubs.c
++++ b/src/cairo_stubs.c
+@@ -1580,6 +1580,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy
+ caml_cairo_image_bigarray_finalize);
+ }
+
++#define b (Caml_ba_array_val(vb))
+ #define SURFACE_CREATE_DATA(name) \
+ CAMLexport value caml_cairo_image_surface_create_for_##name \
+ (value vb, value vformat, value vwidth, value vheight, value vstride) \
+@@ -1588,7 +1589,6 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy
+ CAMLlocal1(vsurf); \
+ cairo_surface_t* surf; \
+ const int width = Int_val(vwidth); \
+- struct caml_ba_array *b = Caml_ba_array_val(vb); \
+ cairo_status_t status; \
+ \
+ if ((b->flags & CAML_BA_MANAGED_MASK) == CAML_BA_MAPPED_FILE) \
+@@ -1610,6 +1610,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy
+
+ SURFACE_CREATE_DATA(data8)
+ SURFACE_CREATE_DATA(data32)
++#undef b
+
+ #define SURFACE_GET_DATA(type, num_dims, dims ...) \
+ CAMLexport value caml_cairo_image_surface_get_##type(value vsurf) \
+diff --git a/tests/image_create.ml b/tests/image_create.ml
+index eec98d6..b13c206 100644
+--- a/tests/image_create.ml
++++ b/tests/image_create.ml
+@@ -10,6 +10,7 @@ let create() =
+
+ let () =
+ let cr = create() in
++ printf "With Cairo handle:\n%!";
+ set_source_rgb cr 1. 1. 1.;
+ rectangle cr 0. 0. ~w:300. ~h:300.;
+ fill cr;
+@@ -21,9 +22,9 @@ let () =
+ show_text cr "Hello";
+ Gc.compact(); Gc.compact();
+
+- eprintf "Write image\n%!";
++ eprintf "- Write image\n%!";
+ PNG.write (get_target cr) "test_image.png";
+- eprintf "Finish surface\n%!";
++ eprintf "- Finish surface\n%!";
+ Surface.finish (get_target cr);
+ Gc.compact()
+
+--
+2.29.2
+
diff --git a/gnu/packages/patches/python-pydot-regression-test.patch b/gnu/packages/patches/python-pydot-regression-test.patch
new file mode 100644
index 0000000000..d2f0f5996e
--- /dev/null
+++ b/gnu/packages/patches/python-pydot-regression-test.patch
@@ -0,0 +1,79 @@
+This patch is taken from the upstream repository
+https://github.com/pydot/pydot/commit/a10ced4d132361027a545a471af4541dea8c5cf5.patch
+It should be included in the 1.4.2 release.
+
+
+From a10ced4d132361027a545a471af4541dea8c5cf5 Mon Sep 17 00:00:00 2001
+From: Peter Nowee <peter@peternowee.com>
+Date: Wed, 26 Jun 2019 15:43:38 +0800
+Subject: [PATCH] Fix multi.dot Graphviz regression test
+
+Commit d6602ad of 2018-12-01 fixed the regression test broken by commit
+2d55978 of 2016-07-01. This revealed that `test/graphs/multi.dot` was
+failing.
+
+`multi.dot` was introduced in commit 2b3f088 of 2010-11-07 together
+with many of the other tests still here today. It has not been touched
+since. It is a DOT-file containing two digraphs. The regression test
+compares the JPEG images rendered from the DOT-file by pydot with those
+rendered by Graphviz's dot directly.
+
+Commit 66734d2 of 2016-07-01 is the actual cause of the failure. It
+changed one of the render methods of the regression test,
+`_render_with_pydot`, from calculating a single hash for all the JPEG
+images to calculating separate hashes for each JPEG image and then
+concatenating those hashes in one long string. The other render method,
+`_render_with_graphviz`, still calculates a single hash over all data.
+For DOT-files that generate only one image the end result is the same,
+but because `multi.dot` has two graphs, it produces two images and this
+leads to comparing a string of two hashes with one single hash.
+
+I do not think the change in generating the hash was intentional, for
+the following reasons:
+- Commit 66734d2 states that its purpose was to adapt the test to an
+ API change in pydot. It does not mention a deliberate choice to
+ change the testing method.
+- There was no effort to change `_render_with_graphviz` to also produce
+ multiple hashes.
+- Except for easier debugging in case of a failing test with multiple
+ images (AFAICT, only `multi.dot`), I do not see much added benefit in
+ checking a concatenation of the hashes of all images vs. checking one
+ hash of all images together: In both cases the test will fail if one
+ or more images is rendered differently.
+- Given that there were many commits authored that same hour, including
+ commit 2d55978 which broke the regression tests, I suspect the author
+ did not run the tests for each individual commit, but only at the end
+ of that batch, and was therefore also not alerted of this change by
+ the test suite.
+
+Assuming that the change was not intended, this commit will now revert
+`_render_with_pydot` to the old behavior of calculating a single hash
+from all JPEG image data.
+
+Tested with Debian 9.9, Graphviz 2.38.0-17, Python 2.7.13-2 and 3.5.3-1.
+
+Fixes https://github.com/pydot/pydot/issues/204.
+---
+ test/pydot_unittest.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/test/pydot_unittest.py b/test/pydot_unittest.py
+index 881ee16..64aa856 100644
+--- a/test/pydot_unittest.py
++++ b/test/pydot_unittest.py
+@@ -194,11 +194,11 @@ def _render_with_graphviz(self, filename, encoding):
+
+ def _render_with_pydot(self, filename, encoding):
+ c = pydot.graph_from_dot_file(filename, encoding=encoding)
+- sha = ''
++ jpe_data = bytearray()
+ for g in c:
+- jpe_data = g.create(prog=TEST_PROGRAM, format='jpe', encoding=encoding)
+- sha += sha256(jpe_data).hexdigest()
+- return sha
++ jpe_data.extend(g.create(prog=TEST_PROGRAM, format='jpe',
++ encoding=encoding))
++ return sha256(jpe_data).hexdigest()
+
+ def test_my_regression_tests(self):
+ path = os.path.join(test_dir, TESTS_DIR_1)
diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
index 6fbc0a56a7..988296b143 100644
--- a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
+++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
@@ -17,8 +17,8 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -14,7 +14,7 @@
- #include "base/macros.h"
- #include "base/no_destructor.h"
+ #include "base/optional.h"
+ #include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
-#include "base/third_party/nspr/prtime.h"
+#include <nspr/prtime.h>
@@ -27,7 +27,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
-@@ -107,6 +107,9 @@ config("base_flags") {
+@@ -102,6 +102,9 @@
"-Wglobal-constructors",
]
}
@@ -37,7 +37,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
}
config("base_implementation") {
-@@ -712,8 +715,6 @@ jumbo_component("base") {
+@@ -720,8 +723,6 @@
"third_party/cityhash_v103/src/city_v103.h",
"third_party/icu/icu_utf.cc",
"third_party/icu/icu_utf.h",
@@ -48,19 +48,19 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
"threading/hang_watcher.cc",
--- a/tools/gn/build/gen.py
+++ b/tools/gn/build/gen.py
-@@ -339,6 +339,9 @@ def WriteGNNinja(path, platform, host, o
+@@ -380,6 +380,9 @@
if not options.no_static_libstdcpp:
ldflags.append('-static-libstdc++')
+ # Additional system libraries that are used.
+ libs.append('-lnspr4')
+
- # This is needed by libc++.
- if not platform.is_mingw():
- libs.append('-ldl')
+ if platform.is_mingw() or platform.is_msys():
+ cflags.remove('-std=c++17')
+ cflags.extend([
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -103,6 +103,9 @@
+@@ -110,6 +110,9 @@
"//build/win:default_exe_manifest",
"//third_party/icu",
]
@@ -72,7 +72,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
# This isn't strictly necessary since we can just add the deps to "platform",
--- a/third_party/crashpad/crashpad/handler/BUILD.gn
+++ b/third_party/crashpad/crashpad/handler/BUILD.gn
-@@ -140,6 +140,9 @@
+@@ -144,6 +144,9 @@
"../third_party/mini_chromium:base",
"../tools:tool_support",
]
@@ -104,7 +104,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
+ "-lnspr4",
+ ]
if (is_ios) {
- libs = [ "UIKit.framework" ]
+ frameworks = [ "UIKit.framework" ]
}
--- a/components/schema_org/BUILD.gn
+++ b/components/schema_org/BUILD.gn