#2 Remove obsolete dependency to Net::DNS::SEC and package tests
Merged 2 years ago by pwouters. Opened 2 years ago by mspacek.
rpms/ mspacek/perl-Net-DNS rawhide  into  rawhide

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

+ 1

file added
+7
@@ -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}

file modified
+1
@@ -1,2 +1,3 @@ 

  from Config import *

  addFilter("spelling-error .* (gethostbyaddr|gethostbyname)");

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

file modified
+38 -6
@@ -1,6 +1,6 @@ 

  Name:          perl-Net-DNS

  Version:       1.33

- Release:       1%{?dist}

+ Release:       2%{?dist}

  Summary:       DNS resolver modules for Perl

  # Other files:          MIT

  # demo/mresolv:         GPL+ or Artistic
@@ -63,11 +63,6 @@ 

  BuildRequires: perl(Test::More)

  # Optional tests:

  BuildRequires: perl(Test::Pod) >= 1.45

- %if !%{defined perl_bootstrap}

- # Build cycle: perl-Net-DNS-SEC → perl-Net-DNS

- BuildRequires: perl(Net::DNS::SEC) >= 1.01

- BuildRequires: perl(Net::DNS::SEC::RSA)

- %endif

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

  Suggests:      perl(Config)

  Requires:      perl(Data::Dumper)
@@ -120,10 +115,31 @@ 

  %description Nameserver

  Instances of the "Net::DNS::Nameserver" class represent DNS server objects.

  

+ %package tests

+ Summary:        Tests for %{name}

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

+ Requires:       perl-Test-Harness

+ 

+ %description tests

+ Tests from %{name}. Execute them

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

+ 

  %prep

  %setup -q -n Net-DNS-%{version} 

  chmod -x demo/*

  perl -MConfig -i -pe 's{^#!/usr/local/bin/perl}{$Config{startperl}}' demo/*

+ # Remove author tests

+ for F in \

+     t/00-install.t \

+     t/00-pod.t \

+     ; do

+     rm "$F"

+     perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E}' MANIFEST

+ done

+ # Help generators to recognize Perl scripts

+ for F in t/*.t; do

+     chmod +x "$F"

+ done

  

  %build

  export PERL_MM_USE_DEFAULT=yes
@@ -134,6 +150,14 @@ 

  %{make_install}

  find %{buildroot} -type f -name '*.bs' -a -size 0 -delete

  %{_fixperms} %{buildroot}/*

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

+ EOF

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

  

  %check

  make test
@@ -154,7 +178,15 @@ 

  %{perl_vendorlib}/Net/DNS/Nameserver.pm

  %{_mandir}/man3/Net::DNS::Nameserver*

  

+ %files tests

+ %{_libexecdir}/%{name}

+ 

  %changelog

+ * Tue Feb 22 2022 Michal Josef Špaček <mspacek@redhat.com> - 1.33-2

+ - Package tests

+ - Remove obsolete dependency to Net::DNS::SEC

+   There was dependency until 1.29 version and it was used for tests.

+ 

  * Tue Feb 15 2022 Paul Wouters <paul.wouters@aiven.io> - 1.33-1

  - 1.33 bump

  

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

+ summary: Sanity tests

+ discover:

+     how: fmf

+ execute:

+     how: tmt

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

+ summary: Upstream tests

+ component: perl-Net-DNS

+ require: perl-Net-DNS-tests

+ test: /usr/libexec/perl-Net-DNS/test

Changes:
- Package tests
- Remove obsolete dependency to Net::DNS::SEC
There was dependency until 1.29 version and it was used for tests.

Pull-Request has been merged by pwouters

2 years ago