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-libwww-perl.git#b9b8a39aea2a31d7c11b9dcda86e633e2ebd6d6b
This commit is contained in:
DistroBaker 2021-03-15 13:35:32 +00:00
parent 8e1d9dd8ca
commit 66ab2c0512
8 changed files with 79 additions and 7 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

1
.gitignore vendored
View File

@ -45,3 +45,4 @@ libwww-perl-5.834.tar.gz
/libwww-perl-6.50.tar.gz
/libwww-perl-6.51.tar.gz
/libwww-perl-6.52.tar.gz
/libwww-perl-6.53.tar.gz

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

@ -0,0 +1,2 @@
from Config import *
addFilter("-tests.noarch: W: no-documentation");

View File

@ -4,7 +4,7 @@
%bcond_with perl_libwww_perl_enables_internet_test
Name: perl-libwww-perl
Version: 6.52
Version: 6.53
Release: 2%{?dist}
Summary: A Perl interface to the World-Wide Web
License: GPL+ or Artistic
@ -14,6 +14,7 @@ Source0: https://cpan.metacpan.org/authors/id/O/OA/OALDERS/libwww-perl-%{
Patch0: libwww-perl-6.39-Normalize-shebangs-in-examples.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
@ -77,7 +78,7 @@ BuildRequires: perl(Config)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Temp)
BuildRequires: perl(FindBin)
BuildRequires: perl(HTTP::Daemon) >= 6
BuildRequires: perl(HTTP::Daemon) >= 6.01
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::More) >= 0.96
%if %{with perl_libwww_perl_enables_internet_test}
@ -128,6 +129,9 @@ Provides: perl(LWP::Debug::TraceHTTP::Socket) = %{version}
Provides: perl(LWP::Protocol::http::Socket) = %{version}
Provides: perl(LWP::Protocol::http::SocketMethods) = %{version}
# Remove underspecified dependencies
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Authen::NTLM|Encode|File::Listing|HTTP::Cookies|HTTP::Daemon|HTTP::Date|HTTP::Negotiate|HTTP::Request|HTTP::Response|HTTP::Status|LWP::MediaTypes|MIME::Base64|Net::FTP|Net::HTTP|Test::More|URI|WWW::RobotRules)\\)$
%description
The libwww-perl collection is a set of Perl modules which provides a simple and
consistent application programming interface to the World-Wide Web. The main
@ -135,16 +139,38 @@ focus of the library is to provide classes and functions that allow you to
write WWW clients. The library also contain modules that are of more general
use and even classes that help you implement simple HTTP servers.
# Remove underspecified dependencies
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Authen::NTLM|Encode|File::Listing|HTTP::Date|HTTP::Negotiate|HTTP::Request|HTTP::Response|HTTP::Status|LWP::MediaTypes|MIME::Base64|Net::FTP|Net::HTTP|URI|WWW::RobotRules)\\)$
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: coreutils
Requires: perl-Test-Harness
Requires: perl(HTTP::Cookies) >= 6
Requires: perl(HTTP::Daemon) >= 6.01
Requires: perl(HTTP::Request) >= 6
Requires: perl(HTTP::Response) >= 6
Requires: perl(Net::HTTP) >= 6.18
Requires: perl(Test::More) >= 0.96
%if %{with perl_libwww_perl_enables_internet_test} && %{with perl_libwww_perl_enables_optional_test}
Requires: perl(Test::LeakTrace)
%endif
Requires: perl(URI) >= 1.10
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n libwww-perl-%{version}
%patch0 -p1
%if !%{with perl_libwww_perl_enables_internet_test}
rm t/leak/no_leak.t t/redirect.t
perl -i -ne 'print $_ unless m{^(?:t/leak/no_leak\.t|t/redirect\.t)}' MANIFEST
rm t/base/protocols/nntp.t t/leak/no_leak.t t/redirect.t
perl -i -ne 'print $_ unless m{^(?:t/base/protocols/nntp\.t|t/leak/no_leak\.t|t/redirect\.t)}' MANIFEST
%endif
# Help generators to recognize a Perl code
for F in $(find t -name '*.t') talk-to-ourself; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*\bperl}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
# Install the aliases by default
@ -154,6 +180,22 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 --aliases < /de
%install
%{make_install}
%{_fixperms} $RPM_BUILD_ROOT/*
# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t talk-to-ourself %{buildroot}%{_libexecdir}/%{name}
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/bash
set -e
# t/local/http.t writes to CWD
DIR=$(mktemp -d)
cp -a %{_libexecdir}/%{name}/* "$DIR"
pushd "$DIR"
unset COVERAGE PERL_LWP_ENV_HTTP_TEST_SERVER_TIMEOUT PERL_LWP_ENV_HTTP_TEST_URL
prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r
popd
rm -r "$DIR"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%check
unset COVERAGE PERL_LWP_ENV_HTTP_TEST_SERVER_TIMEOUT PERL_LWP_ENV_HTTP_TEST_URL
@ -169,7 +211,17 @@ make test
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%files tests
%{_libexecdir}/%{name}
%changelog
* Tue Mar 09 2021 Petr Pisar <ppisar@redhat.com> - 6.53-2
- Package talk-to-ourself script with the tests
* Mon Mar 08 2021 Petr Pisar <ppisar@redhat.com> - 6.53-1
- 6.53 bump
- Package tests
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.52-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

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 (libwww-perl-6.52.tar.gz) = e4b62a6b816d0231c69a83cf5243b3f3551200f10fb0e319ab062b17f3373576c75d4950588b1374f463a8e956f84220737b5187bfe056b2b194077023e9e7b9
SHA512 (libwww-perl-6.53.tar.gz) = d45bba79bf2f3d49cf6b14591a58d04f551e0f6666e6bac32ec31018091590d5efe4313781605287dab22693bafa547dc916b010aafcc677a35a7c3a1154c8ff

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

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