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
This commit is contained in:
DistroBaker 2021-03-18 15:35:26 +00:00
parent 86f3014b76
commit 2a8660d662
6 changed files with 67 additions and 5 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

7
gating.yaml Normal file
View File

@ -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}

View File

@ -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 <jplesnik@redhat.com> - 5.09-1
- 5.09 bump
- Package tests
* Sun Feb 28 2021 Paul Howarth <paul@city-fan.org> - 5.08-1
- 5.08 bump
* Sun Jan 31 2021 Paul Howarth <paul@city-fan.org> - 5.07-1
- 5.07 bump

5
plans/sanity.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Sanity tests
discover:
how: fmf
execute:
how: tmt

View File

@ -1 +1 @@
SHA512 (URI-5.07.tar.gz) = dc7a754d28234ebdfa4d685f1a905e233aa99a3dc87598d1abbd06bf0b88a13308d95b3601a1db939a7221688228bd8707b960512a92283e7ec0963a61cd2f98
SHA512 (URI-5.09.tar.gz) = b9af77064abb8cb83900a02c18b3d5b8f840559f0f925be71b18bcdb4a24c40d654ccf9969d72b7d8930ea17ae4f4f4291fd327bb0b93c204c8f819a1776b8bb

4
tests/upstream-tests.fmf Normal file
View File

@ -0,0 +1,4 @@
summary: Upstream tests
component: perl-URI
require: perl-URI-tests
test: /usr/libexec/perl-URI/test