Browse Source

initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 1 year ago
commit
25f0bf7760
  1. 82
      SOURCES/threads-2.21-Upgrade-to-2.22.patch
  2. 103
      SOURCES/threads-2.21-Upgrade-to-2.25.patch
  3. 296
      SPECS/perl-threads.spec

82
SOURCES/threads-2.21-Upgrade-to-2.22.patch

@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
From a0eaa97e59b5b2ad8e2a83f8509da3787ff4b4bf Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Thu, 24 May 2018 11:32:01 +0200
Subject: [PATCH] Upgrade to 2.22

---
lib/threads.pm | 29 ++++++++++++++++++++++++++++-
threads.xs | 4 ++++
2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/lib/threads.pm b/lib/threads.pm
index 2eb926a..1b99567 100644
--- a/lib/threads.pm
+++ b/lib/threads.pm
@@ -5,7 +5,7 @@ use 5.008;
use strict;
use warnings;
-our $VERSION = '2.21'; # remember to update version in POD!
+our $VERSION = '2.22'; # remember to update version in POD!
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -937,6 +937,33 @@ C<chdir()>) will affect all the threads in the application.
On MSWin32, each thread maintains its own the current working directory
setting.
+=item Locales
+
+Prior to Perl 5.28, locales could not be used with threads, due to various
+race conditions. Starting in that release, on systems that implement
+thread-safe locale functions, threads can be used, with some caveats.
+This includes Windows starting with Visual Studio 2005, and systems compatible
+with POSIX 2008. See L<perllocale/Multi-threaded operation>.
+
+Each thread (except the main thread) is started using the C locale. The main
+thread is started like all other Perl programs; see L<perllocale/ENVIRONMENT>.
+You can switch locales in any thread as often as you like.
+
+If you want to inherit the parent thread's locale, you can, in the parent, set
+a variable like so:
+
+ $foo = POSIX::setlocale(LC_ALL, NULL);
+
+and then pass to threads->create() a sub that closes over C<$foo>. Then, in
+the child, you say
+
+ POSIX::setlocale(LC_ALL, $foo);
+
+Or you can use the facilities in L<threads::shared> to pass C<$foo>;
+or if the environment hasn't changed, in the child, do
+
+ POSIX::setlocale(LC_ALL, "");
+
=item Environment variables
Currently, on all platforms except MSWin32, all I<system> calls (e.g., using
diff --git a/threads.xs b/threads.xs
index 4e9e31f..3da9165 100644
--- a/threads.xs
+++ b/threads.xs
@@ -580,6 +580,8 @@ S_ithread_run(void * arg)
S_set_sigmask(&thread->initial_sigmask);
#endif
+ thread_locale_init();
+
PL_perl_destruct_level = 2;
{
@@ -665,6 +667,8 @@ S_ithread_run(void * arg)
MUTEX_UNLOCK(&thread->mutex);
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
+ thread_locale_term();
+
/* Exit application if required */
if (exit_app) {
(void)S_jmpenv_run(aTHX_ 2, thread, NULL, &exit_app, &exit_code);
--
2.14.3

103
SOURCES/threads-2.21-Upgrade-to-2.25.patch

@ -0,0 +1,103 @@ @@ -0,0 +1,103 @@
From 0bb2d0b00e011f1d77d1766fac4777c6bc376af7 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Mon, 1 Jun 2020 13:23:16 +0200
Subject: [PATCH] Upgrade to 2.25

---
lib/threads.pm | 22 +++++++++++-----------
threads.xs | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/threads.pm b/lib/threads.pm
index 1b99567..ee201a2 100644
--- a/lib/threads.pm
+++ b/lib/threads.pm
@@ -5,7 +5,7 @@ use 5.008;
use strict;
use warnings;
-our $VERSION = '2.22'; # remember to update version in POD!
+our $VERSION = '2.25'; # remember to update version in POD!
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -134,13 +134,13 @@ threads - Perl interpreter-based threads
=head1 VERSION
-This document describes threads version 2.21
+This document describes threads version 2.25
=head1 WARNING
The "interpreter-based threads" provided by Perl are not the fast, lightweight
system for multitasking that one might expect or hope for. Threads are
-implemented in a way that make them easy to misuse. Few people know how to
+implemented in a way that makes them easy to misuse. Few people know how to
use them correctly or will be able to provide help.
The use of interpreter-based threads in perl is officially
@@ -914,7 +914,7 @@ C<-E<gt>import()>) after any threads are started, and in such a way that no
other threads are started afterwards.
If the above does not work, or is not adequate for your application, then file
-a bug report on L<http://rt.cpan.org/Public/> against the problematic module.
+a bug report on L<https://rt.cpan.org/Public/> against the problematic module.
=item Memory consumption
@@ -1090,7 +1090,7 @@ determine whether your system supports it.
In prior perl versions, spawning threads with open directory handles would
crash the interpreter.
-L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>
+L<[perl #75154]|https://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>
=item Detached threads and global destruction
@@ -1118,8 +1118,8 @@ unreferenced scalars. However, such warnings are harmless, and may safely be
ignored.
You can search for L<threads> related bug reports at
-L<http://rt.cpan.org/Public/>. If needed submit any new bugs, problems,
-patches, etc. to: L<http://rt.cpan.org/Public/Dist/Display.html?Name=threads>
+L<https://rt.cpan.org/Public/>. If needed submit any new bugs, problems,
+patches, etc. to: L<https://rt.cpan.org/Public/Dist/Display.html?Name=threads>
=back
@@ -1137,14 +1137,14 @@ L<https://github.com/Dual-Life/threads>
L<threads::shared>, L<perlthrtut>
-L<http://www.perl.com/pub/a/2002/06/11/threads.html> and
-L<http://www.perl.com/pub/a/2002/09/04/threads.html>
+L<https://www.perl.com/pub/a/2002/06/11/threads.html> and
+L<https://www.perl.com/pub/a/2002/09/04/threads.html>
Perl threads mailing list:
-L<http://lists.perl.org/list/ithreads.html>
+L<https://lists.perl.org/list/ithreads.html>
Stack size discussion:
-L<http://www.perlmonks.org/?node_id=532956>
+L<https://www.perlmonks.org/?node_id=532956>
Sample code in the I<examples> directory of this distribution on CPAN.
diff --git a/threads.xs b/threads.xs
index 3da9165..ab64dc0 100644
--- a/threads.xs
+++ b/threads.xs
@@ -676,7 +676,7 @@ S_ithread_run(void * arg)
}
/* At this point, the interpreter may have been freed, so call
- * free in the the context of of the 'main' interpreter which
+ * free in the context of the 'main' interpreter which
* can't have been freed due to the veto_cleanup mechanism.
*/
aTHX = MY_POOL.main_thread.interp;
--
2.25.4

296
SPECS/perl-threads.spec

@ -0,0 +1,296 @@ @@ -0,0 +1,296 @@
%global base_version 2.21
Name: perl-threads
Epoch: 1
Version: 2.25
Release: 460%{?dist}
Summary: Perl interpreter-based threads
License: GPL+ or Artistic
URL: https://metacpan.org/release/threads
Source0: https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/threads-%{base_version}.tar.gz
# Unbundled from perl 5.28.0
Patch0: threads-2.21-Upgrade-to-2.22.patch
# Unbundled from perl 5.32.0
Patch1: threads-2.21-Upgrade-to-2.25.patch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: make
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Spec)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
BuildRequires: perl(Carp)
BuildRequires: perl(overload)
BuildRequires: perl(XSLoader)
# Tests only:
BuildRequires: perl(blib)
BuildRequires: perl(Cwd)
BuildRequires: perl(ExtUtils::testlib)
BuildRequires: perl(File::Path)
BuildRequires: perl(Hash::Util)
BuildRequires: perl(IO::File)
BuildRequires: perl(POSIX)
BuildRequires: perl(Test::More)
# Optional tests:
BuildRequires: perl(Thread::Queue)
BuildRequires: perl(Thread::Semaphore)
BuildRequires: perl(threads::shared)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Carp)

%{?perl_default_filter}

%description
Since Perl 5.8, thread programming has been available using a model called
interpreter threads which provides a new Perl interpreter for each thread,
and, by default, results in no data or state information being shared
between threads.

(Prior to Perl 5.8, 5005threads was available through the "Thread.pm" API.
This threading model has been deprecated, and was removed as of Perl 5.10.0.)

%prep
%setup -q -n threads-%{base_version}
%patch0 -p1
%patch1 -p1
chmod -x examples/*

%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
%{make_build}

%install
%{make_install}
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*

%check
unset GIT_DIR PERL_BUILD_PACKAGING PERL_CORE PERL_RUNPERL_DEBUG \
PERL5_ITHREADS_STACK_SIZE RUN_MAINTAINER_TESTS
make test

%files
%doc Changes examples README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/threads*
%{_mandir}/man3/*

%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.25-460
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688

* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.25-459
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.25-458
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.25-457
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.25-456
- Upgrade to 2.25 as provided in perl-5.32.0

* Thu Feb 06 2020 Petr Pisar <ppisar@redhat.com> - 1:2.22-442
- Specify all dependencies

* Thu Feb 06 2020 Tom Stellard <tstellar@redhat.com> - 1:2.22-441
- Spec file cleanups: Use make_build and make_install macros
- https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make
- https://fedoraproject.org/wiki/Perl/Tips#ExtUtils::MakeMake

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.22-440
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.22-439
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.22-438
- Increase release to favour standalone package

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.22-418
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.22-417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.22-416
- Upgrade to 2.22 as provided in perl-5.28.0
- Perl 5.28 rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jan 24 2018 Petr Pisar <ppisar@redhat.com> - 1:2.21-1
- 2.21 bump

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.16-2
- Perl 5.26 re-rebuild of bootstrapped packages

* Mon Jun 05 2017 Petr Pisar <ppisar@redhat.com> - 1:2.16-1
- 2.16 bump

* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.15-393
- Perl 5.26 rebuild

* Mon Feb 27 2017 Petr Pisar <ppisar@redhat.com> - 1:2.15-1
- 2.15 bump

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Jan 02 2017 Petr Pisar <ppisar@redhat.com> - 1:2.12-1
- 2.12 bump

* Mon May 23 2016 Petr Pisar <ppisar@redhat.com> - 1:2.09-1
- 2.09 bump

* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.08-3
- Perl 5.24 rebuild

* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.08-2
- Perl 5.24 rebuild

* Tue May 17 2016 Petr Pisar <ppisar@redhat.com> - 1:2.08-1
- 2.08 bump

* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.07-365
- Increase release to favour standalone package

* Mon May 02 2016 Petr Pisar <ppisar@redhat.com> - 1:2.07-1
- 2.07 bump

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.02-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.02-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Jun 15 2015 Petr Pisar <ppisar@redhat.com> - 1:2.02-1
- 2.02 bump

* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.01-345
- Increase release to favour standalone package

* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.01-2
- Perl 5.22 rebuild

* Fri Mar 13 2015 Petr Pisar <ppisar@redhat.com> - 1:2.01-1
- 2.01 bump

* Mon Mar 09 2015 Petr Pisar <ppisar@redhat.com> - 1:1.99-1
- 1.99 bump

* Fri Mar 06 2015 Petr Pisar <ppisar@redhat.com> - 1:1.98-1
- 1.98 bump

* Thu Mar 05 2015 Petr Pisar <ppisar@redhat.com> - 1:1.97-1
- 1.97 bump

* Wed Sep 10 2014 Petr Pisar <ppisar@redhat.com> - 1:1.96-1
- 1.96 bump

* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.92-4
- Perl 5.20 rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.92-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.92-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Feb 05 2014 Petr Pisar <ppisar@redhat.com> - 1:1.92-1
- 1.92 bump

* Wed Oct 02 2013 Petr Pisar <ppisar@redhat.com> - 1:1.89-1
- 1.89 bump

* Tue Sep 24 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.87-6
- Update dependencies

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.87-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:1.87-4
- Link minimal build-root packages against libperl.so explicitly

* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:1.87-3
- Perl 5.18 rebuild

* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:1.87-2
- Perl 5.18 rebuild

* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:1.87-1
- Increase epoch to compete with perl.spec

* Mon Jul 01 2013 Petr Pisar <ppisar@redhat.com> - 1.87-2
- Specify all dependencies

* Thu May 30 2013 Petr Pisar <ppisar@redhat.com> - 1.87-1
- 1.87 bump

* Tue Apr 30 2013 Petr Pisar <ppisar@redhat.com> - 1.86-243
- Increase release number to supersede perl sub-package (bug #957931)

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.86-242
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Nov 01 2012 Jitka Plesnikova <jplesnik@redhat.com> - 1.86-241
- Update dependencies.
- Use DESTDIR rather than PERL_INSTALL_ROOT

* Mon Aug 13 2012 Marcela Mašláňová <mmaslano@redhat.com> - 1.86-240
- bump release to override sub-package from perl.spec

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.86-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Jun 06 2012 Petr Pisar <ppisar@redhat.com> - 1.86-3
- Perl 5.16 rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.86-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Dec 15 2011 Petr Pisar <ppisar@redhat.com> - 1.86-1
- 1.86 bump

* Tue Sep 06 2011 Petr Pisar <ppisar@redhat.com> - 1.85-1
- 1.85 bump

* Tue Aug 16 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.83-4
- change path on vendor, so our debuginfo are not conflicting with
perl core debuginfos

* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.83-3
- Perl mass rebuild

* Thu Jun 09 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.83-2
- Perl 5.14 mass rebuild

* Tue Apr 26 2011 Petr Pisar <ppisar@redhat.com> - 1.83-1
- 1.83 bump

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.82-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jan 03 2011 Petr Pisar <ppisar@redhat.com> - 1.82-1
- 1.82 bump

* Wed Oct 06 2010 Petr Pisar <ppisar@redhat.com> - 1.81-1
- 1.81 bump

* Fri Oct 01 2010 Petr Pisar <ppisar@redhat.com> 1.79-1
- Specfile autogenerated by cpanspec 1.78.
- Remove BuildRoot stuff
Loading…
Cancel
Save