From e425b650c9c489c8d7049a53aee74eeef11aa803 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 10 Jan 2024 01:58:45 +0300 Subject: [PATCH] import perl-CBOR-XS-1.86-1.el9 --- .gitignore | 1 + .perl-CBOR-XS.metadata | 1 + ...BOR-XS-1.6-Include-ecb.h-from-system.patch | 29 +++ ...S-1.84-Cast-char-and-U8-where-needed.patch | 68 ++++++ SOURCES/gating.yaml | 7 + SOURCES/perl-CBOR-XS.rpmlintrc | 2 + SPECS/perl-CBOR-XS.spec | 197 ++++++++++++++++++ 7 files changed, 305 insertions(+) create mode 100644 .gitignore create mode 100644 .perl-CBOR-XS.metadata create mode 100644 SOURCES/CBOR-XS-1.6-Include-ecb.h-from-system.patch create mode 100644 SOURCES/CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch create mode 100644 SOURCES/gating.yaml create mode 100644 SOURCES/perl-CBOR-XS.rpmlintrc create mode 100644 SPECS/perl-CBOR-XS.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2cba3be --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/CBOR-XS-1.86.tar.gz diff --git a/.perl-CBOR-XS.metadata b/.perl-CBOR-XS.metadata new file mode 100644 index 0000000..c3607bc --- /dev/null +++ b/.perl-CBOR-XS.metadata @@ -0,0 +1 @@ +fedbbaada72c22a29972e8e39f03bed091a38d58 SOURCES/CBOR-XS-1.86.tar.gz diff --git a/SOURCES/CBOR-XS-1.6-Include-ecb.h-from-system.patch b/SOURCES/CBOR-XS-1.6-Include-ecb.h-from-system.patch new file mode 100644 index 0000000..754374d --- /dev/null +++ b/SOURCES/CBOR-XS-1.6-Include-ecb.h-from-system.patch @@ -0,0 +1,29 @@ +From dfd64ddb0c6c14ed01665ed2317c86d66d08362c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 8 Dec 2016 09:41:45 +0100 +Subject: [PATCH] Include ecb.h from system +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + XS.xs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/XS.xs b/XS.xs +index 2dc62d2..704a3ad 100644 +--- a/XS.xs ++++ b/XS.xs +@@ -11,7 +11,7 @@ + #include + + #define ECB_NO_THREADS 1 +-#include "ecb.h" ++#include + + // compatibility with perl <5.18 + #ifndef HvNAMELEN_get +-- +2.7.4 + diff --git a/SOURCES/CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch b/SOURCES/CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch new file mode 100644 index 0000000..8e0e88b --- /dev/null +++ b/SOURCES/CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch @@ -0,0 +1,68 @@ +From e35ddf55d3b731452ac33fabd811b3a830f0e626 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 29 Sep 2015 10:31:58 +0200 +Subject: [PATCH] Cast char* and U8* where needed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building with GCC 5.1.1 and perl-5.22.0 produces various warnings about +mismatching signess. This patch corrects it. + +Signed-off-by: Petr Písař +--- + XS.xs | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/XS.xs b/XS.xs +index 91ca74b..28e298f 100644 +--- a/XS.xs ++++ b/XS.xs +@@ -1112,7 +1112,7 @@ decode_str (dec_t *dec, int utf8) + STRLEN len = decode_uint (dec); + + WANT (len); +- sv_catpvn (sv, dec->cur, len); ++ sv_catpvn (sv, (char *)dec->cur, len); + dec->cur += len; + } + } +@@ -1121,7 +1121,7 @@ decode_str (dec_t *dec, int utf8) + STRLEN len = decode_uint (dec); + + WANT (len); +- sv = newSVpvn (dec->cur, len); ++ sv = newSVpvn ((char*)dec->cur, len); + dec->cur += len; + + if (ecb_expect_false (dec->stringref) +@@ -1132,7 +1132,7 @@ decode_str (dec_t *dec, int utf8) + if (utf8) + { + if (ecb_expect_false (dec->cbor.flags & F_VALIDATE_UTF8)) +- if (!cbor_is_utf8_string (SvPVX (sv), SvCUR (sv))) ++ if (!cbor_is_utf8_string ((U8*)SvPVX (sv), SvCUR (sv))) + ERR ("corrupted CBOR data (invalid UTF-8 in text string)"); + + SvUTF8_on (sv); +@@ -1452,7 +1452,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return) + sv = decode_sv (&dec); + + if (offset_return) +- *offset_return = dec.cur; ++ *offset_return = (char *)dec.cur; + + if (!(offset_return || !sv)) + if (dec.cur != dec.end && !dec.err) +@@ -1506,7 +1506,7 @@ incr_parse (CBOR *self, SV *cborstr) + 1, 2, 4, 8,-1,-1,-1,-2 + }; + +- const U8 *p = SvPVX (cborstr) + self->incr_pos; ++ const U8 *p = (U8*)SvPVX (cborstr) + self->incr_pos; + U8 m = *p & MINOR_MASK; + IV count = SvIVX (AvARRAY (self->incr_count)[AvFILLp (self->incr_count)]); + I8 ilen = incr_len[m]; +-- +2.31.1 + diff --git a/SOURCES/gating.yaml b/SOURCES/gating.yaml new file mode 100644 index 0000000..282e16b --- /dev/null +++ b/SOURCES/gating.yaml @@ -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} diff --git a/SOURCES/perl-CBOR-XS.rpmlintrc b/SOURCES/perl-CBOR-XS.rpmlintrc new file mode 100644 index 0000000..0d3e525 --- /dev/null +++ b/SOURCES/perl-CBOR-XS.rpmlintrc @@ -0,0 +1,2 @@ +addFilter('spelling-error .* (versa|superset)') +addFilter('-tests\.noarch: W: no-documentation') diff --git a/SPECS/perl-CBOR-XS.spec b/SPECS/perl-CBOR-XS.spec new file mode 100644 index 0000000..bc2425a --- /dev/null +++ b/SPECS/perl-CBOR-XS.spec @@ -0,0 +1,197 @@ +Name: perl-CBOR-XS +Version: 1.86 +Release: 1%{?dist} +Summary: Concise Binary Object Representation (CBOR) +# COPYING: GPLv3+ +## Replaced by system header-only package +# ecb.h: BSD or GPLv2+ +License: GPLv3+ and (BSD or GPLv2+) +URL: https://metacpan.org/release/CBOR-XS +Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/CBOR-XS-%{version}.tar.gz +# Use system libecb +Patch0: CBOR-XS-1.6-Include-ecb.h-from-system.patch +# Silent compiler warnings +Patch1: CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch +BuildRequires: coreutils +BuildRequires: findutils +# gcc for standard header files +BuildRequires: gcc +BuildRequires: libecb-static +BuildRequires: make +BuildRequires: perl-interpreter +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl(Canary::Stability) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +# Run-time: +BuildRequires: perl(common::sense) +BuildRequires: perl(Exporter) +BuildRequires: perl(Math::BigFloat) +BuildRequires: perl(Math::BigInt) +BuildRequires: perl(Math::BigRat) +BuildRequires: perl(Time::Piece) +BuildRequires: perl(Types::Serialiser) +BuildRequires: perl(URI) +BuildRequires: perl(XSLoader) +# Tests: +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Math::BigInt::FastCalc) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Math::BigFloat) +Requires: perl(Math::BigInt) +Requires: perl(Math::BigRat) +Requires: perl(Time::Piece) +Requires: perl(URI) + +%description +This module converts Perl data structures to the Concise Binary Object +Representation (CBOR) and vice versa. CBOR is a fast binary serialization +format that aims to use an (almost) superset of the JSON data model, i.e. +when you can represent something useful in JSON, you should be able to +represent it in CBOR. + +%package tests +Summary: Tests for %{name} +BuildArch: noarch +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Math::BigInt::FastCalc) + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + +%prep +%autosetup -p1 -n CBOR-XS-%{version} +# Remove bundled libecb +rm ecb.h +perl -i -ne 'print $_ unless m{^ecb\.h}' MANIFEST + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" %{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 +%license COPYING +%doc Changes README +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/CBOR* +%{_mandir}/man3/* + +%files tests +%{_libexecdir}/%{name} + +%changelog +* Wed Jan 10 2024 MSVSphere Packaging Team - 1.86-1 +- Rebuilt for MSVSphere 9.3 + +* Fri Nov 05 2021 Petr Pisar - 1.86-1 +- 1.86 bump (bug #2020382) + +* Mon Oct 25 2021 Petr Pisar - 1.85-1 +- 1.85 bump + +* Thu Oct 21 2021 Petr Pisar - 1.84-1 +- 1.84 bump +- Package the tests + +* Thu Jul 22 2021 Fedora Release Engineering - 1.83-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri May 21 2021 Jitka Plesnikova - 1.83-3 +- Perl 5.34 rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 1.83-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Dec 08 2020 Jitka Plesnikova - 1.83-1 +- 1.83 bump + +* Tue Dec 01 2020 Jitka Plesnikova - 1.82-1 +- 1.82 bump + +* Mon Nov 30 2020 Jitka Plesnikova - 1.80-1 +- 1.8 bump + +* Tue Jul 28 2020 Fedora Release Engineering - 1.71-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jun 23 2020 Jitka Plesnikova - 1.71-6 +- Perl 5.32 rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1.71-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 1.71-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 31 2019 Jitka Plesnikova - 1.71-3 +- Perl 5.30 rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.71-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Nov 19 2018 Petr Pisar - 1.71-1 +- 0.71 bump + +* Fri Jul 13 2018 Fedora Release Engineering - 1.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jun 28 2018 Jitka Plesnikova - 1.7-5 +- Perl 5.28 rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 1.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 27 2017 Petr Pisar - 1.7-1 +- 1.7 bump + +* Sun Jun 04 2017 Jitka Plesnikova - 1.6-3 +- Perl 5.26 rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Dec 08 2016 Petr Pisar - 1.6-1 +- 1.6 bump + +* Sun May 15 2016 Jitka Plesnikova - 1.5-2 +- Perl 5.24 rebuild + +* Wed Apr 27 2016 Petr Pisar - 1.5-1 +- 1.5 bump + +* Mon Feb 29 2016 Petr Pisar - 1.4.1-1 +- 1.41 bump + +* Tue Feb 09 2016 Petr Pisar - 1.4-1 +- 1.4 bump + +* Thu Feb 04 2016 Fedora Release Engineering - 1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Sep 29 2015 Petr Pisar 1.3-1 +- Specfile autogenerated by cpanspec 1.78.