From 5339e0d0e3e0952d2ba6c4d5390eb38019aee94d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 28 2020 09:32:07 +0000 Subject: import perl-Convert-ASN1-0.27-17.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3913cf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Convert-ASN1-0.27.tar.gz diff --git a/.perl-Convert-ASN1.metadata b/.perl-Convert-ASN1.metadata new file mode 100644 index 0000000..1c65f52 --- /dev/null +++ b/.perl-Convert-ASN1.metadata @@ -0,0 +1 @@ +ec10266c0737a2ba9fa42196ab9c13e28ae11bb4 SOURCES/Convert-ASN1-0.27.tar.gz diff --git a/SOURCES/Convert-ASN1-0.27-Correct-shebangs-in-tests.patch b/SOURCES/Convert-ASN1-0.27-Correct-shebangs-in-tests.patch new file mode 100644 index 0000000..607465f --- /dev/null +++ b/SOURCES/Convert-ASN1-0.27-Correct-shebangs-in-tests.patch @@ -0,0 +1,257 @@ +From f3ffdf1baa2a5400bdaadc44ef6015c3003a42bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 28 Aug 2019 09:56:10 +0200 +Subject: [PATCH] Correct shebangs in tests +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + t/00prim.t | 2 +- + t/01tag.t | 2 +- + t/02seq.t | 2 +- + t/03seqof.t | 2 +- + t/04opt.t | 2 +- + t/05time.t | 2 +- + t/06bigint.t | 2 +- + t/07io.t | 2 +- + t/08set.t | 2 +- + t/09contr.t | 2 +- + t/10choice.t | 2 +- + t/11explicit.t | 2 +- + t/11indef.t | 2 +- + t/12der.t | 2 +- + t/13utf8.t | 2 +- + t/14any.t | 2 +- + t/15extseq.t | 2 +- + t/16extset.t | 2 +- + t/17extchoice.t | 2 +- + t/18tagdefault.t | 2 +- + t/99misc.t | 2 +- + t/x509.t | 2 +- + 22 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/t/00prim.t b/t/00prim.t +index 904c9c6..cd18732 100644 +--- a/t/00prim.t ++++ b/t/00prim.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that the primitive operators are working +diff --git a/t/01tag.t b/t/01tag.t +index 40e28a0..dd375af 100644 +--- a/t/01tag.t ++++ b/t/01tag.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that the primitive operators are working +diff --git a/t/02seq.t b/t/02seq.t +index bc21712..531f2fe 100644 +--- a/t/02seq.t ++++ b/t/02seq.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of sequences +diff --git a/t/03seqof.t b/t/03seqof.t +index 66683b6..a5e699b 100644 +--- a/t/03seqof.t ++++ b/t/03seqof.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that the primitive operators are working +diff --git a/t/04opt.t b/t/04opt.t +index 7f23fca..33fba19 100644 +--- a/t/04opt.t ++++ b/t/04opt.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that the primitive operators are working +diff --git a/t/05time.t b/t/05time.t +index f444e7f..fe6a179 100644 +--- a/t/05time.t ++++ b/t/05time.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that the primitive operators are working +diff --git a/t/06bigint.t b/t/06bigint.t +index f9aeba3..ab1164f 100644 +--- a/t/06bigint.t ++++ b/t/06bigint.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test bigint INTEGER encoding/decoding +diff --git a/t/07io.t b/t/07io.t +index 706cf51..b4c0c58 100644 +--- a/t/07io.t ++++ b/t/07io.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + use Convert::ASN1 qw(:io); + use IO::Socket; +diff --git a/t/08set.t b/t/08set.t +index b35a7ba..7554157 100644 +--- a/t/08set.t ++++ b/t/08set.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of sets +diff --git a/t/09contr.t b/t/09contr.t +index 2213c7e..72d25fc 100644 +--- a/t/09contr.t ++++ b/t/09contr.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the decode on constructed values +diff --git a/t/10choice.t b/t/10choice.t +index 6ceeb6d..93d194f 100644 +--- a/t/10choice.t ++++ b/t/10choice.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of choices +diff --git a/t/11explicit.t b/t/11explicit.t +index 7e24506..195958c 100644 +--- a/t/11explicit.t ++++ b/t/11explicit.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + BEGIN { require 't/funcs.pl' } + +diff --git a/t/11indef.t b/t/11indef.t +index 7c3886d..b0581d7 100644 +--- a/t/11indef.t ++++ b/t/11indef.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that indefinite length encodings can be decoded +diff --git a/t/12der.t b/t/12der.t +index b7d1b79..4469bd1 100644 +--- a/t/12der.t ++++ b/t/12der.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of sets +diff --git a/t/13utf8.t b/t/13utf8.t +index 1f62042..c8bff82 100644 +--- a/t/13utf8.t ++++ b/t/13utf8.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of utf8 strings +diff --git a/t/14any.t b/t/14any.t +index 4147764..799e1dc 100644 +--- a/t/14any.t ++++ b/t/14any.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Check whether the ANY DEFINED BY syntax is working +diff --git a/t/15extseq.t b/t/15extseq.t +index 6060793..af934e2 100644 +--- a/t/15extseq.t ++++ b/t/15extseq.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of sequences +diff --git a/t/16extset.t b/t/16extset.t +index c57ac0c..f3fbea7 100644 +--- a/t/16extset.t ++++ b/t/16extset.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of sequences +diff --git a/t/17extchoice.t b/t/17extchoice.t +index 66bd9c5..a3ba5d9 100644 +--- a/t/17extchoice.t ++++ b/t/17extchoice.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test the use of sequences +diff --git a/t/18tagdefault.t b/t/18tagdefault.t +index 6a1fa3b..18fb1d8 100644 +--- a/t/18tagdefault.t ++++ b/t/18tagdefault.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Test that default EXPLICIT tagging works. +diff --git a/t/99misc.t b/t/99misc.t +index 4b67aba..da3044a 100644 +--- a/t/99misc.t ++++ b/t/99misc.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + # + # Misc tests from github reported issues +diff --git a/t/x509.t b/t/x509.t +index 3fd5ba0..f931385 100644 +--- a/t/x509.t ++++ b/t/x509.t +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + print "1..26\n"; + +-- +2.21.0 + diff --git a/SOURCES/Convert-ASN1-0.27-Use-temporary-output-files-for-tests.patch b/SOURCES/Convert-ASN1-0.27-Use-temporary-output-files-for-tests.patch new file mode 100644 index 0000000..c515694 --- /dev/null +++ b/SOURCES/Convert-ASN1-0.27-Use-temporary-output-files-for-tests.patch @@ -0,0 +1,62 @@ +From db01806c94b109117683aecf4b1934f8ce2a3137 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 28 Aug 2019 10:31:26 +0200 +Subject: [PATCH] Use temporary output files for tests +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +I need to run the tests from a read-only directory. The t/07io.t fails +because it creates a file in ./t directory. This patch uses File::Temp +for creating the writable file. + +Signed-off-by: Petr Písař +--- + dist.ini | 1 + + t/07io.t | 11 ++++++----- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/dist.ini b/dist.ini +index 167e3e2..6f2fb12 100644 +--- a/dist.ini ++++ b/dist.ini +@@ -23,6 +23,7 @@ directory = examples + [PodVersion] + + [Prereqs / TestRequires] ++File::Temp = 0 + Test::More = 0.90 + Math::BigInt = 1.997 + +diff --git a/t/07io.t b/t/07io.t +index 706cf51..cca31d7 100644 +--- a/t/07io.t ++++ b/t/07io.t +@@ -2,6 +2,7 @@ + + use Convert::ASN1 qw(:io); + use IO::Socket; ++use File::Temp (); + + print "1..11\n"; + +@@ -14,11 +15,11 @@ my $result = pack("C*", 0x30, 0x3D, 0x04, 0x04, 0x46, 0x72, 0x65, 0x64, + 0x73, 0x74, 0x04, 0x02, 0x6F, 0x66, 0x04, 0x07, + 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x73); + +-($file = $0) =~ s/t$/dat/; +-open(OUT,"> $file"); +-asn_write(*OUT, $result); +-asn_write(*OUT, $result); +-close(OUT); ++$fd = File::Temp->new('UNLINK' => 0); ++$file = $fd->filename; ++asn_write($fd, $result); ++asn_write($fd, $result); ++$fd->close; + + open(IN,"< $file"); + sysread(IN,$buffer,1024); +-- +2.21.0 + diff --git a/SPECS/perl-Convert-ASN1.spec b/SPECS/perl-Convert-ASN1.spec new file mode 100644 index 0000000..47bc29b --- /dev/null +++ b/SPECS/perl-Convert-ASN1.spec @@ -0,0 +1,246 @@ +# Perform optional tests +%bcond_without perl_Convert_ASN1_enables_optional_test + +Summary: ASN.1 encode/decode library +Name: perl-Convert-ASN1 +Version: 0.27 +Release: 17%{?dist} +License: GPL+ or Artistic +URL: https://metacpan.org/release/Convert-ASN1 +Source0: https://cpan.metacpan.org/authors/id/G/GB/GBARR/Convert-ASN1-%{version}.tar.gz +# Correct shebangs in the tests +Patch0: Convert-ASN1-0.27-Correct-shebangs-in-tests.patch +# Allow running tests from a read-only location, +# +Patch1: Convert-ASN1-0.27-Use-temporary-output-files-for-tests.patch +BuildArch: noarch +BuildRequires: coreutils +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Run-time: +BuildRequires: perl(:VERSION) >= 5.4 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(POSIX) +BuildRequires: perl(Socket) +BuildRequires: perl(Time::Local) +BuildRequires: perl(utf8) +BuildRequires: perl(vars) +# Optional run-time: +BuildRequires: perl(bytes) +# Tests: +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::Socket) +BuildRequires: perl(Math::BigInt) >= 1.997 +%if %{with perl_Convert_ASN1_enables_optional_test} +# Optional tests: +BuildRequires: perl(Data::Dumper) +%endif +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Suggests: perl(bytes) +Requires: perl(Carp) +Requires: perl(Encode) +Requires: perl(POSIX) +Requires: perl(Time::Local) +Requires: perl(utf8) + +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Math::BigInt\\)$ + +%description +Convert::ASN1 encodes and decodes ASN.1 data structures using BER/DER rules. + +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Math::BigInt) >= 1.997 +%if %{with perl_Convert_ASN1_enables_optional_test} +# Optional tests: +Requires: perl(Data::Dumper) +%endif + +%description tests +Tests from %{name}-%{version}. Execute them +with "%{_libexecdir}/%{name}/test". + +%prep +%setup -q -n Convert-ASN1-%{version} +%patch0 -p1 +%patch1 -p1 +chmod +x t/*.t + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} + +%install +%{make_install} +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 +%{_fixperms} %{buildroot}/* + +%check +unset YYDEBUG +make test + +%files +%license LICENSE +%doc ChangeLog OldChanges README.md examples/ +%{perl_vendorlib}/Convert/ +%{_mandir}/man3/*.3pm* + +%files tests +%{_libexecdir}/%{name} + +%changelog +* Tue Sep 17 2019 Petr Pisar - 0.27-17 +- Bump a release to replace the EPEL package (bug #1746898) + +* Wed Aug 28 2019 Petr Pisar - 0.27-16 +- Modernize spec file +- Package upstream tests + +* Fri Jul 26 2019 Fedora Release Engineering - 0.27-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu May 30 2019 Jitka Plesnikova - 0.27-14 +- Perl 5.30 rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.27-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.27-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 27 2018 Jitka Plesnikova - 0.27-11 +- Perl 5.28 rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 0.27-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.27-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Jun 04 2017 Jitka Plesnikova - 0.27-8 +- Perl 5.26 rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.27-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sun May 15 2016 Jitka Plesnikova - 0.27-6 +- Perl 5.24 rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 0.27-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 0.27-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 03 2015 Jitka Plesnikova - 0.27-3 +- Perl 5.22 rebuild + +* Wed Aug 27 2014 Jitka Plesnikova - 0.27-2 +- Perl 5.20 rebuild + +* Mon Jun 30 2014 Jitka Plesnikova - 0.27-1 +- 0.27 bump + +* Sat Jun 07 2014 Fedora Release Engineering - 0.26-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 0.26-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jul 18 2013 Petr Pisar - 0.26-5 +- Perl 5.18 rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.26-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 0.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jun 11 2012 Petr Pisar - 0.26-2 +- Perl 5.16 rebuild + +* Mon Jun 11 2012 Petr Pisar - 0.26-1 +- 0.26 bump + +* Mon May 07 2012 Petr Šabata - 0.23-1 +- 0.23 bump +- Modernize spec + +* Fri Jan 13 2012 Fedora Release Engineering - 0.22-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Jun 17 2011 Marcela Mašláňová - 0.22-6 +- Perl mass rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.22-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 15 2010 Marcela Maslanova - 0.22-4 +- 661697 rebuild for fixing problems with vendorach/lib + +* Fri Apr 30 2010 Marcela Maslanova - 0.22-3 +- Mass rebuild with perl-5.12.0 + +* Fri Dec 4 2009 Stepan Kasal - 0.22-2 +- rebuild against perl 5.10.1 + +* Mon Jul 27 2009 Marcela Mašláňová - 0.22-1 +- update to 0.22 + +* Sat Jul 25 2009 Fedora Release Engineering - 0.21-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 0.21-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 8 2008 Tom "spot" Callaway 0.21-3 +- rebuild for new perl + +* Mon Oct 15 2007 Tom "spot" Callaway 0.21-2.1 +- add BR: perl(ExtUtils::MakeMaker) + +* Fri Aug 24 2007 Robin Norwood - 0.21-2 +- Fix license tag. + +* Sat Feb 3 2007 Jose Pedro Oliveira - 0.21-1 +- Update to 0.21. +- Corrected several changelog entries. +- Removed an explicit perl(Convert::ASN1) provides. + +* Wed Jul 12 2006 Jesse Keating - 0.20-1.1 +- rebuild + +* Thu Mar 09 2006 Jason Vas Dias - 0.20-1 +- upgrade to upstream version 0.20 + +* Fri Feb 03 2006 Jason Vas Dias - 0.19-1.2 +- rebuild for new perl-5.8.8 + +* Fri Dec 16 2005 Jesse Keating +- rebuilt for new gcc + +* Wed Apr 20 2005 Jose Pedro Oliveira - 0.19-1 +- Update to 0.19. (#155458) +- Bring up to date with current Fedora.Extras perl spec template. + +* Wed Sep 22 2004 Chip Turner 0.18-3 +- rebuild + +* Wed Mar 10 2004 Chip Turner - 0.18-1 +- Specfile autogenerated.