diff --git a/.gitignore b/.gitignore index e69de29..cd07d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Mail-Box-POP3-3.002.tar.gz diff --git a/Mail-Box-POP3-3.001-Use-IO-Socket-IP-to-support-IPv6.patch b/Mail-Box-POP3-3.001-Use-IO-Socket-IP-to-support-IPv6.patch new file mode 100644 index 0000000..6be609f --- /dev/null +++ b/Mail-Box-POP3-3.001-Use-IO-Socket-IP-to-support-IPv6.patch @@ -0,0 +1,42 @@ +diff -up Mail-Box-POP3-3.001/lib/Mail/Transport/POP3.pm.orig Mail-Box-POP3-3.001/lib/Mail/Transport/POP3.pm +--- Mail-Box-POP3-3.001/lib/Mail/Transport/POP3.pm.orig 2017-06-30 12:16:21.706412573 +0200 ++++ Mail-Box-POP3-3.001/lib/Mail/Transport/POP3.pm 2017-06-30 15:25:51.762535024 +0200 +@@ -12,7 +12,7 @@ $VERSION = '3.001'; + + use base 'Mail::Transport::Receive'; + +-use IO::Socket (); ++use IO::Socket::IP (); + use Socket qw/$CRLF/; + use Digest::MD5 (); + +@@ -257,7 +257,7 @@ sub login(;$) + return; + } + +- my $net = $self->{MTP_ssl} ? 'IO::Socket::SSL' : 'IO::Socket::INET'; ++ my $net = $self->{MTP_ssl} ? 'IO::Socket::SSL' : 'IO::Socket::IP'; + eval "require $net" or die $@; + + my $socket = eval {$net->new("$host:$port")}; +diff -up Mail-Box-POP3-3.001/t/server.orig Mail-Box-POP3-3.001/t/server +--- Mail-Box-POP3-3.001/t/server.orig 2017-06-30 12:17:40.145945703 +0200 ++++ Mail-Box-POP3-3.001/t/server 2017-06-30 12:21:19.785638413 +0200 +@@ -142,7 +142,7 @@ so a statistics list for one successful + # Make sure we can do digests + + use strict; +-use IO::Socket; ++use IO::Socket::IP; + use Digest::MD5 qw(md5_hex); + + # Obtain the directory to work on +@@ -181,7 +181,7 @@ while (my $keyword = shift) { + # Create a server that can only take one connection at a time + + $| = 1; +-my $server = IO::Socket::INET->new( ++my $server = IO::Socket::IP->new( + Type => SOCK_STREAM, + Listen => 1, + @port, diff --git a/perl-Mail-Box-POP3.spec b/perl-Mail-Box-POP3.spec new file mode 100644 index 0000000..bdfd1c0 --- /dev/null +++ b/perl-Mail-Box-POP3.spec @@ -0,0 +1,79 @@ +Name: perl-Mail-Box-POP3 +Version: 3.002 +Release: 1%{?dist} +Summary: Handle POP3 folders as client +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Mail-Box-POP3/ +Source0: http://www.cpan.org/authors/id/M/MA/MARKOV/Mail-Box-POP3-%{version}.tar.gz +Patch0: Mail-Box-POP3-3.001-Use-IO-Socket-IP-to-support-IPv6.patch +BuildArch: noarch +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-generators +BuildRequires: perl(:VERSION) >= 5.10 +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(IO::Handle) +# Run-time +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(Exporter) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Socket::IP) +BuildRequires: perl(List::Util) +BuildRequires: perl(Mail::Box::FastScalar) >= 3 +BuildRequires: perl(Mail::Box::Net) >= 3 +BuildRequires: perl(Mail::Box::Net::Message) +BuildRequires: perl(Mail::Box::Parser::Perl) >= 3 +BuildRequires: perl(Mail::Transport::Receive) >= 3 +BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) +# Tests +BuildRequires: perl(Mail::Box::Test) >= 3 +BuildRequires: perl(Test::More) +Requires: perl(Mail::Box::FastScalar) >= 3 +Requires: perl(Mail::Box::Net) >= 3 +Requires: perl(Mail::Box::Parser::Perl) >= 3 +Requires: perl(Mail::Transport::Receive) >= 3 +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Mail::Box::FastScalar\\)$ +%global __requires_exclude %__requires_exclude|^perl\\(Mail::Box::(Net|Parser::Perl)\\)$ +%global __requires_exclude %__requires_exclude|^perl\\(Mail::Transport::Receive\\)$ + +%description +Maintain a folder which has its messages stored on a remote server. The +communication between the client application and the server is implemented +using the POP3 protocol. This class uses Mail::Transport::POP3 to hide the +transport of information, and focuses solely on the correct handling of +messages within a POP3 folder. + +%prep +%setup -q -n Mail-Box-POP3-%{version} +%patch0 -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc ChangeLog README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Fri Jun 30 2017 Jitka Plesnikova - 3.002-1 +- 3.002 bump + +* Wed Jun 28 2017 Jitka Plesnikova - 3.001-1 +- Initial release diff --git a/sources b/sources index e69de29..f76451c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (Mail-Box-POP3-3.002.tar.gz) = 7493a076809e25c0c33f474b4de0cbaf3bb9ada00ebfa693d90c119dd202a403490584a571302ca6e17c5bd5ab6d3bf3c2132a22256582f55d1a6c45f68e6db0