From 2a8660d662f57f541981a399449f24570174fbd5 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Thu, 18 Mar 2021 15:35:26 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/perl-URI.git#9bc4690b9831d954af45a0028e7f089aaa37b522 --- .fmf/version | 1 + gating.yaml | 7 ++++++ perl-URI.spec | 53 +++++++++++++++++++++++++++++++++++++--- plans/sanity.fmf | 5 ++++ sources | 2 +- tests/upstream-tests.fmf | 4 +++ 6 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/sanity.fmf create mode 100644 tests/upstream-tests.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..282e16b --- /dev/null +++ b/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/perl-URI.spec b/perl-URI.spec index aafbaa0..7bc865d 100644 --- a/perl-URI.spec +++ b/perl-URI.spec @@ -6,7 +6,7 @@ %endif Name: perl-URI -Version: 5.07 +Version: 5.09 Release: 1%{?dist} Summary: A Perl module implementing URI parsing and manipulation License: GPL+ or Artistic @@ -58,9 +58,9 @@ Requires: perl(utf8) # Business::ISBN pulls in gd and X libraries for barcode support, hence this soft dependency (#1380152) # Business::ISBN → Test::Pod → Pod::Simple → HTML::Entities (HTML::Parser) → URI %if 0%{!?perl_bootstrap:1} -BuildRequires: perl(Business::ISBN) +BuildRequires: perl(Business::ISBN) >= 3.005 %endif -Suggests: perl(Business::ISBN) +Suggests: perl(Business::ISBN) >= 3.005 %endif %description @@ -68,24 +68,59 @@ This module implements the URI class. Objects of this class represent "Uniform Resource Identifier references" as specified in RFC 2396 (and updated by RFC 2732). +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +%if %{with perl_URI_enables_Business_ISBN} +Requires: perl(Business::ISBN) >= 3.005 +%endif + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + %prep %setup -q -n URI-%{version} chmod -c 644 uri-test +for F in t/*.t t/*.pl; do + if head -1 "$F" | grep -q -e '^#!.*perl\b' ; then + perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' "$F" + else + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F" + fi + chmod +x "$F" +done + + %build perl Makefile.PL INSTALLDIRS=perl NO_PACKLIST=true NO_PERLLOCAL=true %{make_build} %install %{make_install} + +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +perl -i -pe 's{(urls.sto)}{/tmp/$1}' %{buildroot}%{_libexecdir}/%{name}/t/storable.t +perl -i -pe 's{(urls.sto)}{/tmp/$1}' %{buildroot}%{_libexecdir}/%{name}/t/storable-test.pl +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} -c %{buildroot} %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 LICENSE -%doc Changes CONTRIBUTING.md uri-test +%doc Changes CONTRIBUTING.md README uri-test %{perl_privlib}/URI.pm %{perl_privlib}/URI/ %{_mandir}/man3/URI.3* @@ -100,7 +135,17 @@ make test %{_mandir}/man3/URI::file.3* %{_mandir}/man3/URI::ldap.3* +%files tests +%{_libexecdir}/%{name} + %changelog +* Wed Mar 03 2021 Jitka Plesnikova - 5.09-1 +- 5.09 bump +- Package tests + +* Sun Feb 28 2021 Paul Howarth - 5.08-1 +- 5.08 bump + * Sun Jan 31 2021 Paul Howarth - 5.07-1 - 5.07 bump diff --git a/plans/sanity.fmf b/plans/sanity.fmf new file mode 100644 index 0000000..a72ded4 --- /dev/null +++ b/plans/sanity.fmf @@ -0,0 +1,5 @@ +summary: Sanity tests +discover: + how: fmf +execute: + how: tmt diff --git a/sources b/sources index 2c8fa89..dc88d25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (URI-5.07.tar.gz) = dc7a754d28234ebdfa4d685f1a905e233aa99a3dc87598d1abbd06bf0b88a13308d95b3601a1db939a7221688228bd8707b960512a92283e7ec0963a61cd2f98 +SHA512 (URI-5.09.tar.gz) = b9af77064abb8cb83900a02c18b3d5b8f840559f0f925be71b18bcdb4a24c40d654ccf9969d72b7d8930ea17ae4f4f4291fd327bb0b93c204c8f819a1776b8bb diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf new file mode 100644 index 0000000..78d3a2c --- /dev/null +++ b/tests/upstream-tests.fmf @@ -0,0 +1,4 @@ +summary: Upstream tests +component: perl-URI +require: perl-URI-tests +test: /usr/libexec/perl-URI/test