From bb2405cb993df82a01121690bb68a0d573b79035 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 21 May 2021 09:26:29 +0200 Subject: [PATCH] Upgrade to 2.26 as provided in perl-5.34.0 --- perl-threads.spec | 10 ++- threads-2.25-Upgrade-to-2.26.patch | 134 +++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 threads-2.25-Upgrade-to-2.26.patch diff --git a/perl-threads.spec b/perl-threads.spec index e1e9d41..7f694cb 100644 --- a/perl-threads.spec +++ b/perl-threads.spec @@ -1,8 +1,8 @@ %global base_version 2.21 Name: perl-threads Epoch: 1 -Version: 2.25 -Release: 458%{?dist} +Version: 2.26 +Release: 447%{?dist} Summary: Perl interpreter-based threads License: GPL+ or Artistic URL: https://metacpan.org/release/threads @@ -11,6 +11,8 @@ Source0: https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/threads-%{bas Patch0: threads-2.21-Upgrade-to-2.22.patch # Unbundled from perl 5.32.0 Patch1: threads-2.21-Upgrade-to-2.25.patch +# Unbundled from perl 5.34.0 +Patch2: threads-2.25-Upgrade-to-2.26.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc @@ -58,6 +60,7 @@ This threading model has been deprecated, and was removed as of Perl 5.10.0.) %setup -q -n threads-%{base_version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 chmod -x examples/* %build @@ -81,6 +84,9 @@ make test %{_mandir}/man3/* %changelog +* Fri May 21 2021 Jitka Plesnikova - 1:2.26-477 +- Upgrade to 2.26 as provided in perl-5.34.0 + * Wed Jan 27 2021 Fedora Release Engineering - 1:2.25-458 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/threads-2.25-Upgrade-to-2.26.patch b/threads-2.25-Upgrade-to-2.26.patch new file mode 100644 index 0000000..142dea2 --- /dev/null +++ b/threads-2.25-Upgrade-to-2.26.patch @@ -0,0 +1,134 @@ +From 9334f9fbc3fe291eb1791ff7f2bf93b9e713d4b0 Mon Sep 17 00:00:00 2001 +From: Jitka Plesnikova +Date: Thu, 6 May 2021 10:02:15 +0200 +Subject: [PATCH] Upgrade to 2.26 + +--- + lib/threads.pm | 4 ++-- + t/libc.t | 6 ++++++ + threads.xs | 18 +++++++++--------- + 3 files changed, 17 insertions(+), 11 deletions(-) + +diff --git a/lib/threads.pm b/lib/threads.pm +index ee201a2..4453a8d 100644 +--- a/lib/threads.pm ++++ b/lib/threads.pm +@@ -5,7 +5,7 @@ use 5.008; + use strict; + use warnings; + +-our $VERSION = '2.25'; # remember to update version in POD! ++our $VERSION = '2.26'; # remember to update version in POD! + my $XS_VERSION = $VERSION; + $VERSION = eval $VERSION; + +@@ -134,7 +134,7 @@ threads - Perl interpreter-based threads + + =head1 VERSION + +-This document describes threads version 2.25 ++This document describes threads version 2.26 + + =head1 WARNING + +diff --git a/t/libc.t b/t/libc.t +index 4f6f6ed..6595894 100644 +--- a/t/libc.t ++++ b/t/libc.t +@@ -9,6 +9,12 @@ BEGIN { + skip_all(q/Perl not compiled with 'useithreads'/); + } + ++ my $time_out_factor = $ENV{PERL_TEST_TIME_OUT_FACTOR} || 1; ++ $time_out_factor = 1 if $time_out_factor < 1; ++ ++ # Guard against bugs that result in deadlock ++ watchdog(1 * 60 * $time_out_factor); ++ + plan(11); + } + +diff --git a/threads.xs b/threads.xs +index ab64dc0..e544eba 100644 +--- a/threads.xs ++++ b/threads.xs +@@ -421,7 +421,7 @@ STATIC const MGVTBL ithread_vtbl = { + ithread_mg_free, /* free */ + 0, /* copy */ + ithread_mg_dup, /* dup */ +-#if (PERL_VERSION > 8) || (PERL_VERSION == 8 && PERL_SUBVERSION > 8) ++#if PERL_VERSION_GT(5,8,8) + 0 /* local */ + #endif + }; +@@ -751,7 +751,7 @@ S_ithread_create( + AV *params; + SV **array; + +-#if PERL_VERSION <= 8 && PERL_SUBVERSION <= 7 ++#if PERL_VERSION_LE(5,8,7) + SV **tmps_tmp = PL_tmps_stack; + IV tmps_ix = PL_tmps_ix; + #endif +@@ -849,7 +849,7 @@ S_ithread_create( + * context for the duration of our work for new interpreter. + */ + { +-#if (PERL_VERSION > 13) || (PERL_VERSION == 13 && PERL_SUBVERSION > 1) ++#if PERL_VERSION_GE(5,13,2) + CLONE_PARAMS *clone_param = Perl_clone_params_new(aTHX, thread->interp); + #else + CLONE_PARAMS clone_param_s; +@@ -859,7 +859,7 @@ S_ithread_create( + + MY_CXT_CLONE; + +-#if (PERL_VERSION < 13) || (PERL_VERSION == 13 && PERL_SUBVERSION <= 1) ++#if PERL_VERSION_LT(5,13,2) + clone_param->flags = 0; + #endif + +@@ -886,7 +886,7 @@ S_ithread_create( + perl_clone() and sv_dup_inc(). Hence copy the parameters + somewhere under our control first, before duplicating. */ + if (num_params) { +-#if (PERL_VERSION > 8) ++#if PERL_VERSION_GE(5,9,0) + Copy(parent_perl->Istack_base + params_start, array, num_params, SV *); + #else + Copy(parent_perl->Tstack_base + params_start, array, num_params, SV *); +@@ -897,11 +897,11 @@ S_ithread_create( + } + } + +-#if (PERL_VERSION > 13) || (PERL_VERSION == 13 && PERL_SUBVERSION > 1) ++#if PERL_VERSION_GE(5,13,2) + Perl_clone_params_del(clone_param); + #endif + +-#if PERL_VERSION <= 8 && PERL_SUBVERSION <= 7 ++#if PERL_VERSION_LT(5,8,8) + /* The code below checks that anything living on the tmps stack and + * has been cloned (so it lives in the ptr_table) has a refcount + * higher than 0. +@@ -1339,7 +1339,7 @@ ithread_join(...) + /* Get the return value from the call_sv */ + /* Objects do not survive this process - FIXME */ + if ((thread->gimme & G_WANT) != G_VOID) { +-#if (PERL_VERSION < 13) || (PERL_VERSION == 13 && PERL_SUBVERSION <= 1) ++#if PERL_VERSION_LT(5,13,2) + AV *params_copy; + PerlInterpreter *other_perl; + CLONE_PARAMS clone_params; +@@ -1766,7 +1766,7 @@ ithread_error(...) + + /* If thread died, then clone the error into the calling thread */ + if (thread->state & PERL_ITHR_DIED) { +-#if (PERL_VERSION < 13) || (PERL_VERSION == 13 && PERL_SUBVERSION <= 1) ++#if PERL_VERSION_LT(5,13,2) + PerlInterpreter *other_perl; + CLONE_PARAMS clone_params; + ithread *current_thread; +-- +2.30.2 +