diff --git a/.gitignore b/.gitignore index a5cf276..f997050 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/Mail-SPF-v2.9.0.tar.gz +SOURCES/Mail-SPF-3.20240923.tar.gz diff --git a/.perl-Mail-SPF.metadata b/.perl-Mail-SPF.metadata index 633e089..c3fd530 100644 --- a/.perl-Mail-SPF.metadata +++ b/.perl-Mail-SPF.metadata @@ -1 +1 @@ -3bda4d67a94465eec3e569b56004de968cad3982 SOURCES/Mail-SPF-v2.9.0.tar.gz +c822de2647882fc880d3ba3945a6cf423ee96397 SOURCES/Mail-SPF-3.20240923.tar.gz diff --git a/SOURCES/Mail-SPF-v2.8.0-POD.patch b/SOURCES/Mail-SPF-v2.8.0-POD.patch deleted file mode 100644 index e477bf0..0000000 --- a/SOURCES/Mail-SPF-v2.8.0-POD.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://rt.cpan.org/Public/Bug/Display.html?id=86060 - ---- lib/Mail/SPF/Util.pm -+++ lib/Mail/SPF/Util.pm -@@ -155,9 +155,9 @@ sub ipv6_address_is_ipv4_mapped { - throws I - - Returns the given I IPv4 or IPv6 address compactly formatted as a --I. For IPv4 addresses, this is equivalent to calling L< NetAddr::IP's --C |NetAddr::IP/addr> method. For IPv6 addresses, this is equivalent to --calling L< NetAddr::IP's C |NedAddr::IP/short> method. Throws a -+I. For IPv4 addresses, this is equivalent to calling L|NetAddr::IP/addr> method. For IPv6 addresses, this is equivalent to -+calling L|NetAddr::IP/short> method. Throws a - I exception if the specified object is not a - I IPv4 or IPv6 address object. - diff --git a/SOURCES/Mail-SPF-v2.8.0-testsuite.patch b/SOURCES/Mail-SPF-v2.8.0-testsuite.patch deleted file mode 100644 index 811851d..0000000 --- a/SOURCES/Mail-SPF-v2.8.0-testsuite.patch +++ /dev/null @@ -1,62 +0,0 @@ -Drop tests that fail with Net::DNS ≥ 0.68 due to that module's -sanitization of domain names - -https://rt.cpan.org/Ticket/Display.html?id=78214 - ---- t/rfc4408-tests.yml -+++ t/rfc4408-tests.yml -@@ -20,16 +20,6 @@ - --- - description: Initial processing - tests: -- toolonglabel: -- description: >- -- DNS labels limited to 63 chars. -- comment: >- -- For initial processing, a long label results in None, not TempError -- spec: 4.3/1 -- helo: mail.example.net -- host: 1.2.3.5 -- mailfrom: lyme.eater@A123456789012345678901234567890123456789012345678901234567890123.example.com -- result: none - longlabel: - description: >- - DNS labels limited to 63 chars. -@@ -360,21 +350,6 @@ tests: - host: 1.2.3.4 - mailfrom: foo@t9.example.com - result: permerror -- invalid-domain-empty-label: -- description: >- -- target-name that is a valid domain-spec per RFC 4408 but an invalid -- domain name per RFC 1035 (empty label) must be treated as non-existent. -- comment: >- -- An empty domain label, i.e. two successive dots, in a mechanism -- target-name is valid domain-spec syntax, even though a DNS query cannot -- be composed from it. The spec being unclear about it, this could either -- be considered a syntax error, or, by analogy to 4.3/1 and 5/10/3, the -- mechanism chould be treated as a no-match. -- spec: [4.3/1, 5/10/3] -- helo: mail.example.com -- host: 1.2.3.4 -- mailfrom: foo@t10.example.com -- result: [permerror, fail] - invalid-domain-long: - description: >- - target-name that is a valid domain-spec per RFC 4408 but an invalid -@@ -1776,15 +1751,6 @@ tests: - host: 192.168.218.40 - mailfrom: test@e1.example.com - result: permerror -- macro-mania-in-domain: -- description: >- -- macro-encoded percents (%%), spaces (%_), and URL-percent-encoded -- spaces (%-) -- spec: 8.1/3, 8.1/4 -- helo: mail.example.com -- host: 1.2.3.4 -- mailfrom: test@e1a.example.com -- result: pass - exp-txt-macro-char: - spec: 8.1/20 - description: >- diff --git a/SPECS/perl-Mail-SPF.spec b/SPECS/perl-Mail-SPF.spec index 76a47e3..b7c27a3 100644 --- a/SPECS/perl-Mail-SPF.spec +++ b/SPECS/perl-Mail-SPF.spec @@ -1,19 +1,20 @@ Name: perl-Mail-SPF -Version: 2.9.0 -Release: 26%{?dist} +Version: 3.20240923 +Release: 1%{?dist} Summary: Object-oriented implementation of Sender Policy Framework -License: BSD +License: BSD-3-Clause URL: https://metacpan.org/release/Mail-SPF -Source0: https://cpan.metacpan.org/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v%{version}.tar.gz -Patch0: Mail-SPF-v2.8.0-POD.patch -Patch1: Mail-SPF-v2.8.0-testsuite.patch +Source0: https://cpan.metacpan.org/modules/by-module/Mail/Mail-SPF-%{version}.tar.gz BuildArch: noarch # Build BuildRequires: coreutils -BuildRequires: perl-interpreter +BuildRequires: make BuildRequires: perl-generators -BuildRequires: perl(Module::Build) -BuildRequires: perl(version) +BuildRequires: perl-interpreter +BuildRequires: perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) # Runtime BuildRequires: perl(base) BuildRequires: perl(constant) @@ -22,20 +23,14 @@ BuildRequires: perl(Net::DNS) >= 0.62 BuildRequires: perl(Net::DNS::Resolver) BuildRequires: perl(NetAddr::IP) >= 4 BuildRequires: perl(overload) -BuildRequires: perl(strict) BuildRequires: perl(Sys::Hostname) -BuildRequires: perl(URI) >= 1.13 -BuildRequires: perl(URI::Escape) +BuildRequires: perl(URI::Escape) >= 1.13 BuildRequires: perl(utf8) -BuildRequires: perl(warnings) # Tests only BuildRequires: perl(blib) BuildRequires: perl(Net::DNS::Resolver::Programmable) >= 0.003 BuildRequires: perl(Net::DNS::RR) BuildRequires: perl(Test::More) -# Optional tests only -BuildRequires: perl(Test::Pod) >= 1.00 -Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) Requires: perl(Net::DNS) >= 0.62 Requires: perl(URI) >= 1.13 @@ -46,59 +41,132 @@ Requires(postun): %{_sbindir}/update-alternatives Mail::SPF is an object-oriented implementation of Sender Policy Framework (SPF). See http://www.openspf.org for more information about SPF. +%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 Mail-SPF-v%{version} -# Fix broken POD (CPAN RT#86060) -%patch0 -# Work around test suite failures with Net::DNS ≥ 0.68 (CPAN RT#78214) -%patch1 -chmod -x bin/* sbin/* +%setup -q -n Mail-SPF-%{version} +chmod -x bin/* + +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build -perl Build.PL installdirs=vendor -./Build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} %install -./Build install destdir=%{buildroot} create_packlist=0 +%{make_install} %{_fixperms} %{buildroot}/* # The spfquery and spfd will use alternatives %{__mv} -f %{buildroot}%{_bindir}/spfquery %{buildroot}%{_bindir}/spfquery.%{name} -%{__mv} -f %{buildroot}%{_sbindir}/spfd %{buildroot}%{_bindir}/spfd.%{name} +%{__mv} -f %{buildroot}%{_bindir}/spfd %{buildroot}%{_bindir}/spfd.%{name} %{__mv} -f %{buildroot}%{_mandir}/man1/spfquery.1 %{buildroot}%{_mandir}/man1/spfquery-%{name}.1 touch %{buildroot}%{_bindir}/spfquery %{buildroot}%{_bindir}/spfd %{buildroot}%{_mandir}/man1/spfquery.1.gz +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +rm %{buildroot}%{_libexecdir}/%{name}/t/90-author* +for F in `ls %{buildroot}%{_libexecdir}/%{name}/t/*`; do + perl -i -ne 'print $_ unless m{^use blib}' $F +done +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 -./Build test +make test %post %{_sbindir}/update-alternatives --install %{_bindir}/spfquery spf %{_bindir}/spfquery.%{name} 10 \ - --slave %{_bindir}/spfd spf-daemon %{_bindir}/spfd.%{name} \ - --slave %{_mandir}/man1/spfquery.1.gz spfquery-man-page %{_mandir}/man1/spfquery-%{name}.1.gz + --slave %{_bindir}/spfd spf-daemon %{_bindir}/spfd.%{name} \ + --slave %{_mandir}/man1/spfquery.1.gz spfquery-man-page %{_mandir}/man1/spfquery-%{name}.1.gz %postun if [ $1 -eq 0 ] ; then - %{_sbindir}/update-alternatives --remove spf %{_bindir}/spfquery.%{name} + %{_sbindir}/update-alternatives --remove spf %{_bindir}/spfquery.%{name} fi %files %license LICENSE -%doc CHANGES README TODO bin/ sbin/ -%{perl_vendorlib}/* -%{_mandir}/man1/* -%{_mandir}/man3/* +%doc Changes README TODO bin/ +%{perl_vendorlib}/Mail/SPF* +%{_mandir}/man1/spf* +%{_mandir}/man3/Mail::SPF* %ghost %{_bindir}/spfquery %ghost %{_bindir}/spfd %ghost %{_mandir}/man1/spfquery.1.gz %{_bindir}/spfquery.%{name} %{_bindir}/spfd.%{name} +%files tests +%{_libexecdir}/%{name} + %changelog -* Mon Aug 09 2021 Mohan Boddu - 2.9.0-26 -- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Related: rhbz#1991688 +* Sat Jan 04 2025 Arkady L. Shane - 3.20240923-1 +- Rebuilt for MSVSphere 10 + +* Mon Sep 23 2024 Jitka Plesnikova - 3.20240923-1 +- 3.20240923 bump (rhbz#2314156) + +* Wed Aug 28 2024 Jitka Plesnikova - 3.20240827-1 +- 3.20240827 bump (rhbz#2308077) + +* Fri Jul 19 2024 Fedora Release Engineering - 3.20240617-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 21 2024 Jitka Plesnikova - 3.20240617-1 +- 3.20240617 bump (rhbz#2292629) + +* Tue Feb 06 2024 Jitka Plesnikova - 3.20240206-1 +- 3.20240206 bump (rhbz#2262902) + +* Mon Feb 05 2024 Jitka Plesnikova - 3.20240205-1 +- 3.20240205 bump (rhbz#2262786) +- Package tests + +* Thu Jan 25 2024 Fedora Release Engineering - 2.9.0-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.9.0-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 2.9.0-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 07 2023 Michal Josef Špaček - 2.9.0-31 +- Fix %patch macro +- Update license to SPDX format + +* Fri Jan 20 2023 Fedora Release Engineering - 2.9.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 2.9.0-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jun 01 2022 Jitka Plesnikova - 2.9.0-28 +- Perl 5.36 rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 2.9.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 2.9.0-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Fri Apr 16 2021 Mohan Boddu - 2.9.0-25 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 +* Sun May 23 2021 Jitka Plesnikova - 2.9.0-25 +- Perl 5.34 rebuild * Wed Jan 27 2021 Fedora Release Engineering - 2.9.0-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild