From 5cf5c84725e416b0d101761e38d7c69362dce143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 5 Dec 2019 14:14:36 +0100 Subject: [PATCH] Subpackage Thread-Semaphore --- gendep.macros | 10 ++++++++-- perl.rpmlintrc | 2 +- perl.spec | 38 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/gendep.macros b/gendep.macros index 19699d4..d3f86c1 100644 --- a/gendep.macros +++ b/gendep.macros @@ -1674,6 +1674,13 @@ Requires: perl(threads::shared) >= 1.21 \ Requires: perl(warnings) \ Provides: perl(Thread::Queue) = 3.13 \ %{nil} +%global gendep_perl_Thread_Semaphore \ +Requires: perl(Scalar::Util) >= 1.10 \ +Requires: perl(strict) \ +Requires: perl(threads::shared) \ +Requires: perl(warnings) \ +Provides: perl(Thread::Semaphore) = 2.13 \ +%{nil} %global gendep_perl_Time_HiRes \ Requires: perl(Exporter) \ Requires: perl(XSLoader) \ @@ -1852,7 +1859,7 @@ Requires: perl(IO::File) \ Requires: perl(IPC::Open3) \ Requires: perl(Opcode) \ Requires: perl(POSIX) \ -Requires: perl(Scalar::Util) >= 1.10 \ +Requires: perl(Scalar::Util) \ Requires: perl(Symbol) \ Requires: perl(Text::Tabs) \ Requires: perl(Tie::Handle) \ @@ -1944,7 +1951,6 @@ Provides: perl(SelectSaver) = 1.02 \ Provides: perl(Symbol) = 1.08 \ Provides: perl(Sys::Hostname) = 1.22 \ Provides: perl(Thread) = 3.04 \ -Provides: perl(Thread::Semaphore) = 2.13 \ Provides: perl(Tie::Array) = 1.07 \ Provides: perl(Tie::ExtraHash) \ Provides: perl(Tie::File) = 1.02 \ diff --git a/perl.rpmlintrc b/perl.rpmlintrc index 99e9243..5b71ed3 100644 --- a/perl.rpmlintrc +++ b/perl.rpmlintrc @@ -1,5 +1,5 @@ from Config import * -addFilter("spelling-error .* (autoloaded|awk|gmtime|groff|libnet|localtime|Memoizing|metapackage|Nestable|perlbug|perldoc|perlfunc|perllocale|perlmain|perlpod|perlsub|reachability|redispatch|rpmbuild|sed|splain|truncations|usr|writemain)"); +addFilter("spelling-error .* (autoloaded|awk|decrement|gmtime|groff|libnet|localtime|Memoizing|metapackage|Nestable|perlbug|perldoc|perlfunc|perllocale|perlmain|perlpod|perlsub|reachability|redispatch|rpmbuild|sed|splain|truncations|usr|writemain)"); addFilter("unexpanded-macro %description .* %INC"); # Applied with "git am" addFilter("patch-not-applied Patch58: perl-5.30.0-PATCH-perl-134329-Use-after-free-in-regcomp.c.patch"); diff --git a/perl.spec b/perl.spec index 8076ab6..0387f7a 100644 --- a/perl.spec +++ b/perl.spec @@ -413,11 +413,13 @@ Requires: perl-Term-ANSIColor, perl-Term-Cap, perl-Term-Complete, Requires: perl-Term-ReadLine, Requires: perl-Test, perl-Test-Harness, perl-Test-Simple, Requires: perl-Text-Abbrev, perl-Text-Balanced, perl-Text-ParseWords, -Requires: perl-Text-Tabs+Wrap, perl-Thread-Queue, perl-Tie-RefHash, +Requires: perl-Text-Tabs+Wrap, +Requires: perl-Thread-Queue, perl-Thread-Semaphore, +Requires: perl-threads, perl-threads-shared, +Requires: perl-Tie-RefHash, Requires: perl-Time-HiRes, perl-Time-Local, perl-Time-Piece, Requires: perl-Unicode-Collate, perl-Unicode-Normalize, Requires: perl-version, -Requires: perl-threads, perl-threads-shared, # Full EVR is for compatibility with systems that swapped perl and perl-core # , @@ -3060,6 +3062,28 @@ with implementations that return objects. It does so in a backwards compatible manner, so that using localtime or gmtime as documented in perlfunc still behave as expected. +%package Thread-Semaphore +Summary: Thread-safe semaphores +License: GPL+ or Artistic +Epoch: 0 +Version: 2.13 +Requires: %perl_compat +Requires: perl(Carp) +%if %{defined perl_bootstrap} +%gendep_perl_Thread_Semaphore +%endif +BuildArch: noarch +Conflicts: perl-interpreter < 4:5.30.1-451 + +%description Thread-Semaphore +Semaphores provide a mechanism to regulate access to resources. Unlike locks, +semaphores aren't tied to particular scalars, and so may be used to control +access to anything you care to use them for. Semaphores don't limit their +values to zero and one, so they can be used to control access to some resource +that there may be more than one of (e.g., file handles). Increment and +decrement amounts aren't fixed at one either, so threads can reserve or return +multiple resources at once. + %if %{dual_life} || %{rebuild_from_scratch} %package threads Summary: Perl interpreter-based threads @@ -4483,6 +4507,10 @@ popd %exclude %{privlib}/Thread/Queue.pm %exclude %{_mandir}/man3/Thread::Queue.* +# Thread-Semaphore +%exclude %{privlib}/Thread/Semaphore.pm +%exclude %{_mandir}/man3/Thread::Semaphore.* + # Tie-RefHash %exclude %{privlib}/Tie/RefHash.pm %exclude %{_mandir}/man3/Tie::RefHash.* @@ -5636,6 +5664,11 @@ popd %{_mandir}/man3/Thread::Queue.* %endif +%files Thread-Semaphore +%dir %{privlib}/Thread +%{privlib}/Thread/Semaphore.pm +%{_mandir}/man3/Thread::Semaphore.* + %files Tie-RefHash %dir %{privlib}/Tie %{privlib}/Tie/RefHash.pm @@ -5734,6 +5767,7 @@ popd - Subpackage Term-Complete - Subpackage Term-ReadLine - Subpackage Text-Abbrev +- Subpackage Thread-Semaphore * Wed Jan 29 2020 Fedora Release Engineering - 4:5.30.1-450 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild