#5 6.14 bump and package tests
Merged 2 years ago by mspacek. Opened 2 years ago by mspacek.
rpms/ mspacek/perl-HTTP-Daemon rawhide  into  rawhide

file added
+1
@@ -0,0 +1,1 @@ 

+ 1

file modified
+1
@@ -6,3 +6,4 @@ 

  /HTTP-Daemon-6.10.tar.gz

  /HTTP-Daemon-6.12.tar.gz

  /HTTP-Daemon-6.13.tar.gz

+ /HTTP-Daemon-6.14.tar.gz

@@ -0,0 +1,2 @@ 

+ from Config import *

+ addFilter("-tests.noarch: W: no-documentation");

file modified
+41 -9
@@ -1,5 +1,5 @@ 

  Name:           perl-HTTP-Daemon

- Version:        6.13

+ Version:        6.14

  Release:        1%{?dist}

  Summary:        Simple HTTP server class

  License:        GPL+ or Artistic
@@ -8,11 +8,14 @@ 

  # Use Makefile.PL without unneeded dependencies

  Patch0:         HTTP-Daemon-6.04-EU-MM-is-not-deprecated.patch

  BuildArch:      noarch

+ BuildRequires:  coreutils

  BuildRequires:  make

+ BuildRequires:  findutils

  BuildRequires:  perl-generators

  BuildRequires:  perl-interpreter

  BuildRequires:  perl(:VERSION) >= 5.6

  BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76

+ BuildRequires:  perl(Module::Build::Tiny) >= 0.034

  BuildRequires:  perl(strict)

  # Run-time:

  BuildRequires:  perl(Carp)
@@ -28,17 +31,16 @@ 

  BuildRequires:  perl(Config)

  BuildRequires:  perl(File::Spec)

  BuildRequires:  perl(HTTP::Tiny) >= 0.042

- # LWP::UserAgent not used

+ BuildRequires:  perl(LWP::RobotUA)

+ BuildRequires:  perl(LWP::UserAgent)

  BuildRequires:  perl(Module::Metadata)

- # Test not used if LWP::UserAgent is not installed

+ BuildRequires:  perl(Test)

  BuildRequires:  perl(Test::More) >= 0.98

  BuildRequires:  perl(Test::Needs)

- # URI not used

+ BuildRequires:  perl(URI)

  # Optional tests:

  # CPAN::Meta not helpful

  # CPAN::Meta::Prereqs not helpful

- # LWP::RobotUA not used

- # LWP::UserAgent not used

  Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

  Requires:       perl(HTTP::Date) >= 6

  Requires:       perl(HTTP::Request) >= 6
@@ -56,9 +58,27 @@ 

  socket for incoming requests. The HTTP::Daemon is a subclass of

  IO::Socket::IP, so you can perform socket operations directly on it too.

  

+ %package tests

+ Summary:        Tests for %{name}

+ Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

+ Requires:       perl-Test-Harness

+ # perl-generators doesn't detect 'use Test::Needs 'LWP::RobotUA';'

+ Requires:       perl(LWP::RobotUA)

+ # perl-generators doesn't detect 'use Test::Needs 'LWP::UserAgent';'

+ Requires:       perl(LWP::UserAgent)

+ 

+ %description tests

+ Tests from %{name}. Execute them

+ with "%{_libexecdir}/%{name}/test".

+ 

  %prep

  %setup -q -n HTTP-Daemon-%{version}

  %patch0 -p1

+ # Help generators to recognize Perl scripts

+ for F in $(find t/ -name '*.t'); do

+     perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"

+     chmod +x "$F"

+ done

  

  %build

  perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -66,12 +86,17 @@ 

  

  %install

  %{make_install}

+ # Install tests

+ 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)" -r

+ EOF

+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test

  %{_fixperms} %{buildroot}/*

  

  %check

- # Some tests are skipped with "Can't talk to ourself (misconfigured system)".

- # These tests actually are never run becuse the required CAN_TALK_TO_OURSELF

- # file is never created. Those are author's tests.

  make test

  

  %files
@@ -80,7 +105,14 @@ 

  %{perl_vendorlib}/*

  %{_mandir}/man3/*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Fri Mar 04 2022 Michal Josef Špaček <mspacek@redhat.com> - 6.14-1

+ - 6.14 bump

+ - Package unit tests

+ 

  * Thu Feb 10 2022 Michal Josef Špaček <mspacek@redhat.com> - 6.13-1

  - 6.13 bump

  

file added
+5
@@ -0,0 +1,5 @@ 

+ summary: Sanity tests

+ discover:

+     how: fmf

+ execute:

+     how: tmt

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (HTTP-Daemon-6.13.tar.gz) = 8f13d2aab9d6372a7c9af78aa114de487b6f5b99892adf6cc4d47901dd2c31efdd0b68c34995d42b30de35a130be9babb44789ce7725402460926f964b59fc17

+ SHA512 (HTTP-Daemon-6.14.tar.gz) = baae522b24211d04bc53d0f89f9e7b6b98681772eb79e28a72aa2b57c023a92e1264923abc2fefc24e28be265e17530541fd9d3a559d5bcfca00a8f5b0e9d85e

@@ -0,0 +1,4 @@ 

+ summary: Upstream tests

+ component: perl-HTTP-Daemon

+ require: perl-HTTP-Daemon-tests

+ test: /usr/libexec/perl-HTTP-Daemon/test

Upstream changes:
6.14 2022-03-03 20:47:51Z
- Test using loopback rather than internet accessible address (GH#52)
(Michal Josef Špaček)
- Use GH Perl helpers for build and coverage jobs (GH#53) (Olaf Alders)

Pull-Request has been merged by mspacek

2 years ago