Add patch to fix Perl 5.38
This commit is contained in:
parent
9c9ed7bb59
commit
97ad256c11
@ -1,7 +1,7 @@
|
||||
From d2e335b2d05e68c1fc7ed9b507fd5cafc172a112 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 13 Jun 2023 20:11:34 +0100
|
||||
Subject: [PATCH 01/15] tests/test-tar-info*: Remove bogus test requires of
|
||||
Subject: [PATCH 01/16] tests/test-tar-info*: Remove bogus test requires of
|
||||
guestfish
|
||||
|
||||
These tests don't need guestfish so don't test for it.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From eb44ca26a84c369a7908f19517c0a2f8f621d57f Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 13 Jun 2023 20:25:40 +0100
|
||||
Subject: [PATCH 02/15] tar: Document the optional tar option in --help output
|
||||
Subject: [PATCH 02/16] tar: Document the optional tar option in --help output
|
||||
and synopsis
|
||||
|
||||
Fixes: commit 05b49f89dccb0ca3fd0919e9502c54dbcadf0b73
|
||||
|
@ -1,7 +1,7 @@
|
||||
From ae3fb4def811f5bc42563128e8fae0a4288584d1 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 13 Jun 2023 20:01:05 +0100
|
||||
Subject: [PATCH 03/15] tar: Implement tar-limit
|
||||
Subject: [PATCH 03/16] tar: Implement tar-limit
|
||||
|
||||
This can be used to ensure that the tar filter does not read
|
||||
indefinite amounts of input when opening the tar file.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 35db543e38293808e910b291ff26b17284640ec9 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 19 Jun 2023 13:53:09 +0100
|
||||
Subject: [PATCH 04/15] xz: Fix error message to refer to xz-max-block
|
||||
Subject: [PATCH 04/16] xz: Fix error message to refer to xz-max-block
|
||||
parameter
|
||||
|
||||
In the original xz plugin the parameter was called "maxblock", but
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 4398b1871f8832109fcdbe25c70a1dd341ed5bd4 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 Jun 2023 13:05:22 +0100
|
||||
Subject: [PATCH 05/15] configure: Recommend using -g with OCAMLOPTFLAGS
|
||||
Subject: [PATCH 05/16] configure: Recommend using -g with OCAMLOPTFLAGS
|
||||
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b53b78e542fe8e49ce5c670e8ddc9d2be66f73cc Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 Jun 2023 18:47:40 +0100
|
||||
Subject: [PATCH 06/15] tests/test_ocaml_plugin.ml: Print a message when test
|
||||
Subject: [PATCH 06/16] tests/test_ocaml_plugin.ml: Print a message when test
|
||||
plugin initializes
|
||||
|
||||
It's useful to have a message which is printed as the top level
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b778c56443e11817d4974dcab5356e2d4065980b Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 Jun 2023 18:56:58 +0100
|
||||
Subject: [PATCH 07/15] ocaml: Add -I +unix before using unix.cmxa
|
||||
Subject: [PATCH 07/16] ocaml: Add -I +unix before using unix.cmxa
|
||||
|
||||
In OCaml 5.0 you will see this warning:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f8b761c62f177176dfe154a95824576eef740827 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 Jun 2023 19:07:00 +0100
|
||||
Subject: [PATCH 08/15] ocaml: Replace caml_leave_blocking_section with
|
||||
Subject: [PATCH 08/16] ocaml: Replace caml_leave_blocking_section with
|
||||
caml_acquire_runtime_system
|
||||
|
||||
Replace:
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f4d5f179c9be6db3c39bc0752e36f262c3f87716 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 Jun 2023 20:15:46 +0100
|
||||
Subject: [PATCH 09/15] ocaml: Always unregister the global root and free the
|
||||
Subject: [PATCH 09/16] ocaml: Always unregister the global root and free the
|
||||
handle
|
||||
|
||||
If the OCaml code did not provide a close method, we would never call
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 9d4b87e0338d45456c0506fd2c25b80f7ef6b1e1 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 21 Jun 2023 20:18:58 +0100
|
||||
Subject: [PATCH 10/15] ocaml: Fix thread registration for OCaml 5
|
||||
Subject: [PATCH 10/16] ocaml: Fix thread registration for OCaml 5
|
||||
|
||||
OCaml 5 is strict about registering threads before calling OCaml heap
|
||||
functions, and will abort the program with this error if you don't do
|
||||
|
@ -1,7 +1,7 @@
|
||||
From c78266258709e2cbe6f0e869c866d09ad72c072c Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 22 Jun 2023 10:33:31 +0100
|
||||
Subject: [PATCH 11/15] tests/test-cc-ocaml.sh: Use nbdkit -v option to help
|
||||
Subject: [PATCH 11/16] tests/test-cc-ocaml.sh: Use nbdkit -v option to help
|
||||
with debugging
|
||||
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From d968c4858847388e515bc1ef84ff4479c18a414d Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 22 Jun 2023 10:44:10 +0100
|
||||
Subject: [PATCH 12/15] tests: Replace $SRCDIR with $abs_top_srcdir
|
||||
Subject: [PATCH 12/16] tests: Replace $SRCDIR with $abs_top_srcdir
|
||||
|
||||
functions.sh defines $abs_top_srcdir so there's no need to use $SRCDIR
|
||||
in any test scripts.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 92ae65f93d8ebeb09500552d7ebfc1e8149ded6f Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 22 Jun 2023 10:48:51 +0100
|
||||
Subject: [PATCH 13/15] tests/test-read-password*: Remove use of $SRCDIR
|
||||
Subject: [PATCH 13/16] tests/test-read-password*: Remove use of $SRCDIR
|
||||
|
||||
These tests required exporting $abs_top_srcdir so that the plugin
|
||||
(which is a C script) can use it.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 2e3dcb2a720e4258b54d04ffd081c5159783df8e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 22 Jun 2023 10:50:17 +0100
|
||||
Subject: [PATCH 14/15] tests: Stop setting $SRCDIR for tests
|
||||
Subject: [PATCH 14/16] tests: Stop setting $SRCDIR for tests
|
||||
|
||||
Since no tests use this variable any longer we can stop setting it.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3e4c1b79a72970c17cb42b21070e61ec634a38bb Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 22 Jun 2023 11:15:27 +0100
|
||||
Subject: [PATCH 15/15] tests: Explicitly add -L../plugins/ocaml/.libs to find
|
||||
Subject: [PATCH 15/16] tests: Explicitly add -L../plugins/ocaml/.libs to find
|
||||
-lnbdkitocaml
|
||||
|
||||
The actual libnbdkitocaml.so library is located in
|
||||
|
39
0016-perl-Call-PERL_SET_CONTEXT-from-.open-method.patch
Normal file
39
0016-perl-Call-PERL_SET_CONTEXT-from-.open-method.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 495708e9d1b396ff450df15d5789b4f6c51f6ebc Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 13 Jul 2023 11:50:02 +0100
|
||||
Subject: [PATCH 16/16] perl: Call PERL_SET_CONTEXT from .open method
|
||||
|
||||
This appears to be necessary with Perl 5.38.
|
||||
---
|
||||
plugins/perl/perl.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c
|
||||
index d3b7cede2..1d8d0c2b4 100644
|
||||
--- a/plugins/perl/perl.c
|
||||
+++ b/plugins/perl/perl.c
|
||||
@@ -339,6 +339,21 @@ perl_open (int readonly)
|
||||
SV *sv;
|
||||
dSP;
|
||||
|
||||
+ /*
|
||||
+ * From perlembed(1):
|
||||
+ *
|
||||
+ * "PERL_SET_CONTEXT(interp) should also be called whenever "interp"
|
||||
+ * is used by a thread that did not create it (using either
|
||||
+ * perl_alloc(), or the more esoteric perl_clone())."
|
||||
+ *
|
||||
+ * Since we may be called here from a new thread created within
|
||||
+ * nbdkit, do this. This is necessary since Perl 5.38. It didn't
|
||||
+ * seem to make a difference with earlier Perl, but doesn't break
|
||||
+ * them either.
|
||||
+ */
|
||||
+
|
||||
+ PERL_SET_CONTEXT (my_perl);
|
||||
+
|
||||
/* We check in perl_config that this callback is defined. */
|
||||
ENTER;
|
||||
SAVETMPS;
|
||||
--
|
||||
2.41.0
|
||||
|
@ -95,6 +95,7 @@ Patch: 0012-tests-Replace-SRCDIR-with-abs_top_srcdir.patch
|
||||
Patch: 0013-tests-test-read-password-Remove-use-of-SRCDIR.patch
|
||||
Patch: 0014-tests-Stop-setting-SRCDIR-for-tests.patch
|
||||
Patch: 0015-tests-Explicitly-add-L.-plugins-ocaml-.libs-to-find-.patch
|
||||
Patch: 0016-perl-Call-PERL_SET_CONTEXT-from-.open-method.patch
|
||||
|
||||
BuildRequires: make
|
||||
%if 0%{patches_touch_autotools}
|
||||
|
Loading…
Reference in New Issue
Block a user