diff --git a/.gitignore b/.gitignore index 92882aa..9e0a1d0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /Object-Pad-0.45.tar.gz /Object-Pad-0.46.tar.gz /Object-Pad-0.47.tar.gz +/Object-Pad-0.48.tar.gz diff --git a/Object-Pad-0.47-rt137952.patch b/Object-Pad-0.47-rt137952.patch deleted file mode 100644 index fa208e2..0000000 --- a/Object-Pad-0.47-rt137952.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: leonerd-cpan [...] leonerd.org.uk - -https://rt.cpan.org/Public/Bug/Display.html?id=137952 - ---- old/src/class.c 2021-07-30 17:08:56 +0000 -+++ new/src/class.c 2021-07-31 12:55:46 +0000 -@@ -87,6 +87,9 @@ - #define embed_cv(cv, embedding) S_embed_cv(aTHX_ cv, embedding) - static CV *S_embed_cv(pTHX_ CV *cv, RoleEmbedding *embedding) - { -+ assert(cv); -+ assert(CvOUTSIDE(cv)); -+ - CV *embedded_cv = cv_clone(cv); - SV *embeddingsv = embedding->embeddingsv; - -@@ -358,6 +361,19 @@ - - ENTER; - -+ if(!PL_compcv) { -+ /* We require the initslots CV to have a CvOUTSIDE, or else cv_clone() -+ * will segv when we compose role slots. Any class dynamically generated -+ * by string eval() will likely not get one, because it won't inherit a -+ * PL_compcv here. We'll fake it up -+ * See also https://rt.cpan.org/Ticket/Display.html?id=137952 -+ */ -+ SAVEVPTR(PL_compcv); -+ PL_compcv = find_runcv(0); -+ -+ assert(PL_compcv); -+ } -+ - I32 floor_ix = start_subparse(FALSE, 0); - SAVEFREESV(PL_compcv); - -@@ -519,6 +535,9 @@ - - meta->initslots = newATTRSUB(floor_ix, NULL, NULL, NULL, ops); - -+ assert(meta->initslots); -+ assert(CvOUTSIDE(meta->initslots)); -+ - LEAVE; - } - - diff --git a/Object-Pad-0.48-t-99exported-symbols.t-Locate-shared-object-file-wit.patch b/Object-Pad-0.48-t-99exported-symbols.t-Locate-shared-object-file-wit.patch new file mode 100644 index 0000000..cf3682e --- /dev/null +++ b/Object-Pad-0.48-t-99exported-symbols.t-Locate-shared-object-file-wit.patch @@ -0,0 +1,39 @@ +From b7eaa2a6f1b19c30434badfb69b4f1103c9b6a72 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 3 Aug 2021 13:37:54 +0200 +Subject: [PATCH] t/99exported-symbols.t: Locate shared object file with + DynaLoader +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is more portable and allows running the test against +an already installed code. + +Signed-off-by: Petr Písař +--- + t/99exported-symbols.t | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/t/99exported-symbols.t b/t/99exported-symbols.t +index a0159d7..358ffa6 100644 +--- a/t/99exported-symbols.t ++++ b/t/99exported-symbols.t +@@ -8,7 +8,13 @@ use Test::More; + $^O eq "linux" or + plan skip_all => "This test only works on Linux (or at least, ELF platforms)"; + +-my $sofile = "blib/arch/auto/Object/Pad/Pad.so"; ++require Object::Pad; ++my $i; ++for (@DynaLoader::dl_modules) { ++ last if $_ eq 'Object::Pad'; ++ $i++; ++} ++my $sofile = $DynaLoader::dl_shared_objects[$i]; + + # Since we load with RTLD_GLOBAL it's important that we don't pollute the + # symbol namespace. Therefore, aside from the `boot_Object__Pad` function, the +-- +2.31.1 + diff --git a/perl-Object-Pad.spec b/perl-Object-Pad.spec index 976664e..c5b4855 100644 --- a/perl-Object-Pad.spec +++ b/perl-Object-Pad.spec @@ -4,15 +4,15 @@ %bcond_without perl_Object_Pad_enables_optional_test Name: perl-Object-Pad -Version: 0.47 +Version: 0.48 Release: 1%{?dist} Summary: Simple syntax for lexical slot-based objects License: GPL+ or Artistic URL: https://metacpan.org/release/Object-Pad Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Object-Pad-%{version}.tar.gz -# Fix a crash in when generating classes at run-time, CPAN RT#137952, -# proposed by the upstream -Patch0: Object-Pad-0.47-rt137952.patch +# Enable t/99exported-symbols.t test to work against an installed code, +# CPAN RT#138320, proposed to an upstream. +Patch0: Object-Pad-0.48-t-99exported-symbols.t-Locate-shared-object-file-wit.patch BuildRequires: coreutils BuildRequires: perl-devel BuildRequires: perl-generators @@ -25,7 +25,7 @@ BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Module::Build) BuildRequires: perl(strict) BuildRequires: perl(warnings) -BuildRequires: perl(XS::Parse::Keyword::Builder) >= 0.08 +BuildRequires: perl(XS::Parse::Keyword::Builder) >= 0.10 BuildRequires: perl(XS::Parse::Sublike::Builder) >= 0.10 # Run-time: BuildRequires: perl(:VERSION) >= 5.14 @@ -37,12 +37,14 @@ BuildRequires: perl(feature) # indirect not used (only with 5.20.0 <= perl < 5.31.9) BuildRequires: perl(mro) # XS::Parse::Keyword is loaded from a header file generated by ./Build.PL, -# version specified in lib/Object/Pad.xs -BuildRequires: perl(XS::Parse::Keyword) >= 0.08 +# version specified in lib/Object/Pad.xs, out-dated CPAN RT#138318 +BuildRequires: perl(XS::Parse::Keyword) >= 0.10 # XS::Parse::Sublike is loaded from a header file generated by ./Build.PL, # version specified in lib/Object/Pad.xs BuildRequires: perl(XS::Parse::Sublike) >= 0.10 # Tests: +# binutils for nm +BuildRequires: binutils BuildRequires: perl(attributes) BuildRequires: perl(base) BuildRequires: perl(Data::Dump) @@ -50,6 +52,7 @@ BuildRequires: perl(Scalar::Util) BuildRequires: perl(Test::Fatal) BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::Refcount) +BuildRequires: perl(utf8) %if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap} # A cycle: perl-Future-AsyncAwait → perl-Object-Pad # A cycle: perl-Syntax-Keyword-Dynamically → perl-Object-Pad @@ -63,7 +66,7 @@ BuildRequires: perl(Test::Pod) >= 1.00 %endif Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(experimental) -Requires: perl(XS::Parse::Keyword) >= 0.08 +Requires: perl(XS::Parse::Keyword) >= 0.10 %if %{defined perl_XS_Parse_Keyword_ABI} Requires: %{perl_XS_Parse_Keyword_ABI} %endif @@ -83,6 +86,8 @@ fields. Summary: Tests for %{name} BuildArch: noarch Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +# binutils for nm +Requires: binutils Requires: perl-Test-Harness Requires: perl(strict) Requires: perl(Test::More) >= 0.88 @@ -143,6 +148,9 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print %{_libexecdir}/%{name} %changelog +* Tue Aug 03 2021 Petr Pisar - 0.48-1 +- 0.48 bump + * Thu Jul 29 2021 Petr Pisar - 0.47-1 - 0.47 bump - Fix a crash in when generating classes at run-time (CPAN RT#137952) diff --git a/sources b/sources index b5d9ace..53abe2d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Object-Pad-0.47.tar.gz) = 3483f98b026d8a6206e93c9d61625b727821ac4184cf3c0de5bd69d825bed4e16ad7d93bcc62539aad4f222719f27e63beb5fe4989a5e7574da87125dc046774 +SHA512 (Object-Pad-0.48.tar.gz) = 67f45833c96406250f09dd966b257872fea4ac381d52f040b3119ea49724ce4d310a18ff42740d4110a1a3eae7fc85de1b0c2acbaa6d83c23d9ebeaea2bce882