Compare commits

...

29 Commits
f27 ... rawhide

Author SHA1 Message Date
Fedora Release Engineering 4ab8a92934 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 14:10:43 +00:00
Fedora Release Engineering e439828cb8 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 12:58:33 +00:00
Fedora Release Engineering ee35d0a333 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 19:50:20 +00:00
Jitka Plesnikova eedb762e53 Increase release to favour standalone package 2023-07-11 09:34:54 +02:00
Jitka Plesnikova 81878c7f47 Upgrade to 1.54 as provided in perl-5.37.11 2023-05-16 13:34:39 +02:00
Fedora Release Engineering 34205f4426 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 00:27:30 +00:00
Jitka Plesnikova 1b991bf120 Remove perl(MODULE_COMPAT), it will be replaced by generators 2023-01-13 09:07:51 +01:00
Jitka Plesnikova b87c37bb4f Update license to SPDX format 2022-12-20 16:22:37 +01:00
Fedora Release Engineering d42b6b8a27 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 03:47:15 +00:00
Jitka Plesnikova f273284325 Increase release to favour standalone package 2022-05-30 14:27:21 +02:00
Fedora Release Engineering 8ffc8da702 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 23:55:36 +00:00
Fedora Release Engineering c5f26bd774 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 18:39:55 +00:00
Jitka Plesnikova 5b52d58c65 Increase release to favour standalone package 2021-05-21 09:54:02 +02:00
Jitka Plesnikova d68b97b881 Package tests 2021-05-05 14:56:28 +02:00
Jitka Plesnikova 3b05893863 Upgrade to 1.52 as provided in perl-5.34.0 2021-05-05 14:13:12 +02:00
Fedora Release Engineering 17a8b1093b - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 23:49:10 +00:00
Fedora Release Engineering a141ef57de - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 14:03:47 +00:00
Jitka Plesnikova 869ff9dd3f Increase release to favour standalone package 2020-06-22 13:36:04 +02:00
Fedora Release Engineering 2f70229b24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 22:06:18 +00:00
Fedora Release Engineering 0c7732a5c8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 01:06:31 +00:00
Jitka Plesnikova cfdd21200e Increase release to favour standalone package 2019-05-30 10:55:39 +02:00
Fedora Release Engineering 63816c6f1e - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 18:56:55 +00:00
Petr Písař cea1d7e080 Replace patched sources with 1.50 CPAN release 2018-09-10 12:43:15 +02:00
Fedora Release Engineering 59726b9e5e - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 16:09:20 +00:00
Jitka Plesnikova 39c0b8eeaa Increase release to favour standalone package 2018-06-27 02:15:02 +02:00
Petr Písař 1fdc2aa65d cpan.org addresses moved to MetaCPAN <https://fedoraproject.org/wiki/Changes/Perl_Move_to_MetaCPAN> 2018-06-04 14:23:55 +02:00
Jitka Plesnikova 7e37154bcf Upgrade to 1.50 as provided in perl-5.28.0 2018-05-23 14:37:11 +02:00
Petr Písař 217d519372 Prevent from some stack-not-ref-counted crashes in Carp 2018-04-20 10:40:43 +02:00
Fedora Release Engineering b853f44fd4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-08 19:20:34 +00:00
12 changed files with 407 additions and 267 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/Carp-1.35.tar.gz
/Carp-1.36.tar.gz
/Carp-1.38.tar.gz
/Carp-1.50.tar.gz

View File

@ -1,118 +0,0 @@
diff --git a/Changes b/Changes
index b55b49f..dca6a52 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,12 @@
+version 1.40; 2016-03-10
+ * Get arg_string.t to compile in perl v5.6
+ * Add information for how to contribute to Carp.
+
+version 1.39; 2016-03-06
+ * bugfix: longmess() should return the error in scalar context
+ (CPANRT#107225)
+
version 1.38; 2015-11-06
* stable release of changes since v1.36
diff --git a/lib/Carp.pm b/lib/Carp.pm
index 9421c74..92f8866 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -87,7 +87,7 @@ BEGIN {
}
}
-our $VERSION = '1.38';
+our $VERSION = '1.40';
$VERSION =~ tr/_//d;
our $MaxEvalLen = 0;
@@ -445,7 +445,9 @@ sub long_error_loc {
}
sub longmess_heavy {
- return @_ if ref( $_[0] ); # don't break references as exceptions
+ if ( ref( $_[0] ) ) { # don't break references as exceptions
+ return wantarray ? @_ : $_[0];
+ }
my $i = long_error_loc();
return ret_backtrace( $i, @_ );
}
@@ -906,6 +908,12 @@ call die() or warn(), as appropriate.
L<Carp::Always>,
L<Carp::Clan>
+=head1 CONTRIBUTING
+
+L<Carp> is maintained by the perl 5 porters as part of the core perl 5
+version control repository. Please see the L<perlhack> perldoc for how to
+submit patches and contribute to it.
+
=head1 AUTHOR
The Carp module first appeared in Larry Wall's perl 5.000 distribution.
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index 91a42d1..b05d758 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.38';
+our $VERSION = '1.40';
$VERSION =~ tr/_//d;
# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
diff --git a/t/Carp.t b/t/Carp.t
index a18e3b4..9ecdf88 100644
--- a/t/Carp.t
+++ b/t/Carp.t
@@ -3,7 +3,7 @@ no warnings "once";
use Config;
use IPC::Open3 1.0103 qw(open3);
-use Test::More tests => 65;
+use Test::More tests => 66;
sub runperl {
my(%args) = @_;
@@ -39,6 +39,24 @@ BEGIN {
);
}
+package MyClass;
+
+sub new { return bless +{ field => ['value1', 'SecondVal'] }; }
+
+package main;
+
+{
+ my $err = Carp::longmess(MyClass->new);
+
+ # See:
+ # https://rt.cpan.org/Public/Bug/Display.html?id=107225
+ is_deeply(
+ $err->{field},
+ ['value1', 'SecondVal',],
+ "longmess returns sth meaningful in scalar context when passed a ref.",
+ );
+}
+
{
local $SIG{__WARN__} = sub {
like $_[0], qr/ok (\d+)\n at.+\b(?i:carp\.t) line \d+\.$/, 'ok 2\n';
diff --git a/t/arg_string.t b/t/arg_string.t
index 42b43b1..dbd2e6e 100644
--- a/t/arg_string.t
+++ b/t/arg_string.t
@@ -15,7 +15,7 @@ my $e9 = sprintf "%02x", (($] ge 5.007_003)
: ((ord("A") == 193)
? 0x51
: 0xE9));
-my $chr_e9 = chr utf8::unicode_to_native(0xe9);
+my $chr_e9 = chr eval "0x$e9";
my $nl_as_hex = sprintf "%x", ord("\n");
like lm(3), qr/main::lm\(3\)/;

View File

@ -1,128 +0,0 @@
From 7cdc0cd3cf5f9fd6459daa746db8f647c14ef9fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 11 May 2017 08:43:33 +0200
Subject: [PATCH] Upgrade to 1.42
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Unbundled from perl-5.25.12.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
lib/Carp.pm | 6 +++---
lib/Carp/Heavy.pm | 2 +-
t/Carp.t | 13 ++++++++++++-
t/arg_string.t | 10 +++++++++-
4 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/lib/Carp.pm b/lib/Carp.pm
index 92f8866..05052b9 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -87,7 +87,7 @@ BEGIN {
}
}
-our $VERSION = '1.40';
+our $VERSION = '1.42';
$VERSION =~ tr/_//d;
our $MaxEvalLen = 0;
@@ -474,7 +474,7 @@ sub ret_backtrace {
eval {
CORE::die;
};
- if($@ =~ /^Died at .*(, <.*?> line \d+).$/ ) {
+ if($@ =~ /^Died at .*(, <.*?> (?:line|chunk) \d+).$/ ) {
$mess .= $1;
}
}
@@ -636,7 +636,7 @@ Carp - alternative warn and die for modules
# cluck, longmess and shortmess not exported by default
use Carp qw(cluck longmess shortmess);
- cluck "This is how we got here!";
+ cluck "This is how we got here!"; # warn with stack backtrace
$long_message = longmess( "message from cluck() or confess()" );
$short_message = shortmess( "message from carp() or croak()" );
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index b05d758..f9c584a 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.40';
+our $VERSION = '1.42';
$VERSION =~ tr/_//d;
# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
diff --git a/t/Carp.t b/t/Carp.t
index 9ecdf88..65daed7 100644
--- a/t/Carp.t
+++ b/t/Carp.t
@@ -3,7 +3,7 @@ no warnings "once";
use Config;
use IPC::Open3 1.0103 qw(open3);
-use Test::More tests => 66;
+use Test::More tests => 67;
sub runperl {
my(%args) = @_;
@@ -442,6 +442,16 @@ $@ =~ s/\n.*//; # just check first line
is $@, "heek at ".__FILE__." line ".(__LINE__-2).", <DATA> line 2.\n",
'last handle line num is mentioned';
+# [cpan #100183]
+{
+ local $/ = \6;
+ <XD::DATA>;
+ eval { croak 'jeek' };
+ $@ =~ s/\n.*//; # just check first line
+ is $@, "jeek at ".__FILE__." line ".(__LINE__-2).", <DATA> chunk 3.\n",
+ 'last handle chunk num is mentioned';
+}
+
SKIP:
{
skip "IPC::Open3::open3 needs porting", 1 if $Is_VMS;
@@ -531,3 +541,4 @@ __DATA__
1
2
3
+abcdefghijklmnopqrstuvwxyz
diff --git a/t/arg_string.t b/t/arg_string.t
index dbd2e6e..dc70f43 100644
--- a/t/arg_string.t
+++ b/t/arg_string.t
@@ -1,6 +1,8 @@
use warnings;
use strict;
+# confirm that stack args are displayed correctly by longmess()
+
use Test::More tests => 32;
use Carp ();
@@ -22,7 +24,13 @@ like lm(3), qr/main::lm\(3\)/;
like lm(substr("3\x{2603}", 0, 1)), qr/main::lm\(3\)/;
like lm(-3), qr/main::lm\(-3\)/;
like lm(-3.5), qr/main::lm\(-3\.5\)/;
-like lm(-3.5e100), qr/main::lm\(-3\.5[eE]\+?100\)/;
+like lm(-3.5e30),
+ qr/main::lm\(
+ (
+ -3500000000000000000000000000000
+ | -3\.5[eE]\+?0?30
+ )
+ \) /x;
like lm(""), qr/main::lm\(""\)/;
like lm("foo"), qr/main::lm\("foo"\)/;
like lm("a\$b\@c\\d\"e"), qr/main::lm\("a\\\$b\\\@c\\\\d\\\"e"\)/;
--
2.9.3

View File

@ -0,0 +1,187 @@
From a91baa4c8cb395568f4c55199e47ce4807e42bd2 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Wed, 5 May 2021 13:42:36 +0200
Subject: [PATCH] Upgrade to 1.52
---
lib/Carp.pm | 12 ++++++------
lib/Carp/Heavy.pm | 2 +-
t/Carp.t | 6 ++++--
t/Carp_overloadless.t | 6 ++++--
t/broken_can.t | 5 ++++-
t/broken_univ_can.t | 12 +++++++++---
t/vivify_stash.t | 6 +++++-
7 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/lib/Carp.pm b/lib/Carp.pm
index 109b7fe..df563d0 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -211,7 +211,7 @@ BEGIN {
}
-our $VERSION = '1.50';
+our $VERSION = '1.52';
$VERSION =~ tr/_//d;
our $MaxEvalLen = 0;
@@ -284,7 +284,7 @@ sub shortmess {
my $cgc = _cgc();
# Icky backwards compatibility wrapper. :-(
- local @CARP_NOT = $cgc ? $cgc->() : caller();
+ local @CARP_NOT = scalar( $cgc ? $cgc->() : caller() );
shortmess_heavy(@_);
}
@@ -944,10 +944,10 @@ This variable sets a general argument formatter to display references.
Plain scalars and objects that implement C<CARP_TRACE> will not go through
this formatter. Calling C<Carp> from within this function is not supported.
-local $Carp::RefArgFormatter = sub {
- require Data::Dumper;
- Data::Dumper::Dump($_[0]); # not necessarily safe
-};
+ local $Carp::RefArgFormatter = sub {
+ require Data::Dumper;
+ Data::Dumper->Dump($_[0]); # not necessarily safe
+ };
=head2 @CARP_NOT
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index a9b803c..fdb3e52 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.50';
+our $VERSION = '1.52';
$VERSION =~ tr/_//d;
# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
diff --git a/t/Carp.t b/t/Carp.t
index b1e399d..02c047e 100644
--- a/t/Carp.t
+++ b/t/Carp.t
@@ -1,5 +1,6 @@
+use strict;
use warnings;
-no warnings "once";
+
use Config;
use IPC::Open3 1.0103 qw(open3);
@@ -353,6 +354,7 @@ for my $bodge_job ( 2, 1, 0 ) { SKIP: {
print "# required B\n";
}
my $accum = '';
+ no warnings 'once';
local *CORE::GLOBAL::caller = sub {
local *__ANON__ = "fakecaller";
my @c = CORE::caller(@_);
@@ -480,7 +482,7 @@ SKIP:
);
package Foo::No::Autovivify;
- $CARP_NOT = 1;
+ our $CARP_NOT = 1;
eval { Carp::croak(1) };
::ok(
!defined *{$Foo::No::Autovivify::{CARP_NOT}}{ARRAY},
diff --git a/t/Carp_overloadless.t b/t/Carp_overloadless.t
index f4bda04..6b73601 100644
--- a/t/Carp_overloadless.t
+++ b/t/Carp_overloadless.t
@@ -1,12 +1,14 @@
+use strict;
use warnings;
-#no warnings 'once';
+
use Test::More tests => 1;
use Carp;
# test that enabling overload without loading overload.pm does not trigger infinite recursion
-my $p = "OverloadedInXS";
+no strict 'refs';
+my $p = "OverloadedInXS";
*{$p."::(("} = sub{};
*{$p.q!::(""!} = sub { Carp::cluck "<My Stringify>" };
sub { Carp::longmess("longmess:") }->(bless {}, $p);
diff --git a/t/broken_can.t b/t/broken_can.t
index c32fa19..9232d68 100644
--- a/t/broken_can.t
+++ b/t/broken_can.t
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
use Test::More tests => 1;
# [perl #132910]
@@ -10,6 +13,6 @@ package main;
use Carp;
eval {
- sub { confess-sins }->(bless[], Foo);
+ sub { confess-sins }->(bless[], 'Foo');
};
like $@, qr/^-sins at /;
diff --git a/t/broken_univ_can.t b/t/broken_univ_can.t
index 0ec19d7..49c7720 100644
--- a/t/broken_univ_can.t
+++ b/t/broken_univ_can.t
@@ -1,15 +1,21 @@
+use strict;
+use warnings;
+
# [perl #132910]
# This mock-up breaks Test::More. Dont use Test::More.
-sub UNIVERSAL::can { die; }
+{
+ no warnings 'redefine';
+ sub UNIVERSAL::can { die; }
+}
# Carp depends on this to detect the override:
-BEGIN { $UNIVERSAL::can::VERSION = 0xbaff1ed_bee; }
+BEGIN { no warnings 'portable'; $UNIVERSAL::can::VERSION = 0xbaff1ed_bee; }
use Carp;
eval {
- sub { confess-sins }->(bless[], Foo);
+ sub { confess-sins }->(bless[], 'Foo');
};
print "1..1\n";
if ($@ !~ qr/^-sins at /) {
diff --git a/t/vivify_stash.t b/t/vivify_stash.t
index 744d0d2..00181f3 100644
--- a/t/vivify_stash.t
+++ b/t/vivify_stash.t
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
BEGIN { print "1..5\n"; }
our $has_utf8; BEGIN { $has_utf8 = exists($::{"utf8::"}); }
@@ -18,7 +21,8 @@ eval { sub { Carp::longmess() }->(\1) };
print $@ eq '' ? "ok 4 # longmess check1\n" : "not ok 4 # longmess check1\n# $@";
# overload:: glob without hash
-undef *{"overload::"};
+# Clear overload quoted so it happens to the runtime stash.
+{ no strict 'refs'; undef *{"overload::"} }
eval { sub { Carp::longmess() }->(\1) };
print $@ eq '' ? "ok 5 # longmess check2\n" : "not ok 5 # longmess check2\n# $@";
--
2.30.2

View File

@ -0,0 +1,77 @@
From 7b5bfc02532e5a275fadc43beb1d7f9a0ef3fdb8 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Tue, 16 May 2023 12:41:10 +0200
Subject: [PATCH] Upgrade to 1.54
---
lib/Carp.pm | 12 ++++++------
lib/Carp/Heavy.pm | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/Carp.pm b/lib/Carp.pm
index df563d0..20b9708 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -179,7 +179,7 @@ BEGIN {
? do { require "overload.pm"; _fetch_sub overload => 'mycan' }
: \&UNIVERSAL::can;
- # _blessed is either UNIVERAL::isa(...), or, in the presence of an
+ # _blessed is either UNIVERSAL::isa(...), or, in the presence of an
# override, a hideous, but fairly reliable, workaround.
*_blessed = $isa
? sub { &$isa($_[0], "UNIVERSAL") }
@@ -211,7 +211,7 @@ BEGIN {
}
-our $VERSION = '1.52';
+our $VERSION = '1.54';
$VERSION =~ tr/_//d;
our $MaxEvalLen = 0;
@@ -776,8 +776,8 @@ Carp - alternative warn and die for modules
# cluck, longmess and shortmess not exported by default
use Carp qw(cluck longmess shortmess);
cluck "This is how we got here!"; # warn with stack backtrace
- $long_message = longmess( "message from cluck() or confess()" );
- $short_message = shortmess( "message from carp() or croak()" );
+ my $long_message = longmess( "message from cluck() or confess()" );
+ my $short_message = shortmess( "message from carp() or croak()" );
=head1 DESCRIPTION
@@ -802,7 +802,7 @@ Of course, C<Carp> can't guarantee the latter.
You can also alter the way the output and logic of C<Carp> works, by
changing some global variables in the C<Carp> namespace. See the
-section on C<GLOBAL VARIABLES> below.
+section on L</GLOBAL VARIABLES> below.
Here is a more complete description of how C<carp> and C<croak> work.
What they do is search the call-stack for a function call stack where
@@ -868,7 +868,7 @@ or by including the string C<-MCarp=verbose> in the PERL5OPT
environment variable.
Alternately, you can set the global variable C<$Carp::Verbose> to true.
-See the C<GLOBAL VARIABLES> section below.
+See the L</GLOBAL VARIABLES> section below.
=head2 Stack Trace formatting
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index fdb3e52..043e345 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.52';
+our $VERSION = '1.54';
$VERSION =~ tr/_//d;
# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
--
2.40.1

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

View File

@ -1,20 +1,20 @@
%global cpan_version 1.38
%global base_version 1.50
Name: perl-Carp
Version: 1.42
Release: 394%{?dist}
Version: 1.54
Release: 502%{?dist}
Summary: Alternative warn and die for modules
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Carp/
Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Carp-%{cpan_version}.tar.gz
# Unbundled from perl 5.24.0
Patch0: Carp-1.38-Upgrade-to-1.40.patch
# Unbundled from perl 5.25.12
Patch1: Carp-1.40-Upgrade-to-1.42.patch
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/Carp
Source0: https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/Carp-%{base_version}.tar.gz
# Unbundled from perl 5.34.0
Patch0: Carp-1.50-Upgrade-to-1.52.patch
# Unbundled from perl 5.37.11
Patch1: Carp-1.52-Upgrade-to-1.54.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: make
BuildRequires: perl-interpreter
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(warnings)
BuildRequires: perl(strict)
@ -28,10 +28,12 @@ BuildRequires: perl(Data::Dumper)
BuildRequires: perl(IPC::Open3)
BuildRequires: perl(overload)
BuildRequires: perl(Test::More) >= 0.47
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Do not export private DB module stub
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(DB\\)
# Filter versioned tests require IPC::Open3 >= 1.0103, because provides is
# 2-digit number only
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(IPC::Open3\\)
%description
The Carp routines are useful in your own modules because they act like
@ -42,20 +44,46 @@ you can use carp or croak which report the error as being from where your
module was called. There is no guarantee that that is where the error was,
but it is a good educated guess.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl(IPC::Open3)
Requires: perl-Test-Harness
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n Carp-%{cpan_version}
%patch0 -p1
%patch1 -p1
%setup -q -n Carp-%{base_version}
%patch -P0 -p1
%patch -P1 -p1
# Help file to recognise the Perl scripts
for F in t/*.t; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
%{_fixperms} $RPM_BUILD_ROOT/*
%{make_install}
%{_fixperms} %{buildroot}/*
# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/sh
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%check
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
make test
%files
@ -63,7 +91,83 @@ make test
%{perl_vendorlib}/*
%{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.54-502
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.54-501
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.54-500
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1.54-499
- Increase release to favour standalone package
* Tue May 16 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1.54-1
- Upgrade to 1.54 as provided in perl-5.37.11
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.52-490
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.52-489
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.52-488
- Increase release to favour standalone package
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.52-479
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.52-478
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.52-477
- Increase release to favour standalone package
* Wed May 05 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.52-459
- Upgrade to 1.52 as provided in perl-5.34.0
- Package tests
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-458
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-457
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-456
- Increase release to favour standalone package
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-440
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-439
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-438
- Increase release to favour standalone package
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-418
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.50-417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 26 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-416
- Increase release to favour standalone package
* Wed May 23 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-1
- Upgrade to 1.50 as provided in perl-5.28.0
* Fri Apr 20 2018 Petr Pisar <ppisar@redhat.com> - 1.42-396
- Prevent from some stack-not-ref-counted crashes in Carp (RT#52610)
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-395
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-394
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

5
plans/sanity.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Sanity tests
discover:
how: fmf
execute:
how: tmt

View File

@ -1 +1 @@
93ac4c56312a9db6cef3b502a8169859 Carp-1.38.tar.gz
SHA512 (Carp-1.50.tar.gz) = 624e5fe41492d1d5de840d56a648168f2e6066717efaa20d257b277219ea2cd3b73e5bc2bd46a3e37e060cb3e35b4cccc560bdd169c2e252e861d441e90df4b6

4
tests/upstream-tests.fmf Normal file
View File

@ -0,0 +1,4 @@
summary: Upstream tests
component: perl-Carp
require: perl-Carp-tests
test: /usr/libexec/perl-Carp/test