diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9072efc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/B-COW-[0-9.]*.tar.gz diff --git a/perl-B-COW.rpmlintrc b/perl-B-COW.rpmlintrc new file mode 100644 index 0000000..3534559 --- /dev/null +++ b/perl-B-COW.rpmlintrc @@ -0,0 +1,8 @@ +from Config import * + +# It can be spelled naïve or naive +addFilter("spelling-error %description -l en_US naïve") + +# The link error is because of a weak __cxa_finalize symbol +# Weak symbols do not need to be fulfilled +addFilter("library-not-linked-against-libc /.*/COW.so") diff --git a/perl-B-COW.spec b/perl-B-COW.spec new file mode 100644 index 0000000..92e53f9 --- /dev/null +++ b/perl-B-COW.spec @@ -0,0 +1,80 @@ +Name: perl-B-COW +Version: 0.004 +Release: 1%{?dist} +Summary: Additional B helpers to check Copy On Write status +License: GPL+ or Artistic +URL: https://metacpan.org/release/B-COW +Source0: https://cpan.metacpan.org/modules/by-module/B/B-COW-%{version}.tar.gz +# Module Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) +# Module Runtime +BuildRequires: perl(base) +BuildRequires: perl(Exporter) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) +# Test Suite +BuildRequires: perl(Devel::Peek) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Test::More) +# Optional Tests +BuildRequires: perl(CPAN::Meta) >= 2.120900 +BuildRequires: perl(CPAN::Meta::Prereqs) +# Runtime +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +# Don't "provide" private Perl libs +%{?perl_default_filter} + +%description +B::COW provides some naïve additional B helpers to check the Copy On Write +(COW) status of one SvPV (a Perl string variable). + +A COWed SvPV is sharing its string (the PV) with other SvPVs. It's a (kind of) +Read Only C string, which would be Copied On Write (COW). More than one SV can +share the same PV, but when one PV needs to alter it, it would perform a copy +of it, decreasing the COWREFCNT counter. One SV can then drop the COW flag when +it's the only one holding a pointer to the PV. The COWREFCNT is stored at the +end of the PV, after the null byte terminating the string. That value is +limited to 255: when we reach 255, a new PV would be created. + +%prep +%setup -q -n B-COW-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -delete +find %{buildroot} -type f -name '*.bs' -empty -delete +%{_fixperms} -c %{buildroot} + +%check +make test + +%files +%license LICENSE +%doc Changes examples/ README +%{perl_vendorarch}/auto/B/ +%{perl_vendorarch}/B/ +%{_mandir}/man3/B::COW.3* + +%changelog +* Fri Apr 24 2020 Paul Howarth - 0.004-1 +- Update to 0.004 + - Fix CowREFCNT issues on big endian + +* Tue Apr 21 2020 Paul Howarth - 0.003-2 +- Sanitize for Fedora submission + +* Tue Apr 21 2020 Paul Howarth - 0.003-1 +- Initial RPM version diff --git a/sources b/sources new file mode 100644 index 0000000..f4990ed --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (B-COW-0.004.tar.gz) = 97beaac8056e4aaeafb535a8e69f103632eb3746fa815313f84612414081155ab640299c18b4cb7b9ff0f61263cc1b9ce25de3313bbefce318163902a4503292