commit 061a02b5b35975deb7cd1c6abfb1ac8d46d53c47 Author: Marcela Mašláňová <mmaslano@xxxxxxxxxx> Date: Mon Aug 6 14:00:52 2012 +0200 Applied patch from RT#35698. Tests were fixed by this change. Net-FTPServer.patch | 111 +++++++++++++++++++++++++++++++++++++++++++++++ perl-Net-FTPServer.spec | 10 +++- 2 files changed, 119 insertions(+), 2 deletions(-) --- diff --git a/Net-FTPServer.patch b/Net-FTPServer.patch new file mode 100644 index 0000000..d983937 --- /dev/null +++ b/Net-FTPServer.patch @@ -0,0 +1,111 @@ +--- Net-FTPServer-1.122/lib/Net/FTPServer.pm.orig Fri Jul 15 12:10:22 2005 ++++ Net-FTPServer-1.122/lib/Net/FTPServer.pm Thu Aug 27 17:13:15 2009 +@@ -4228,7 +4228,7 @@ sub _archive_generator_zip + + $zip->addMember ($memb); + $memb->desiredCompressionMethod +- (&{$ {Archive::Zip::}{COMPRESSION_DEFLATED}}); ++ (&Archive::Zip::COMPRESSION_DEFLATED); + $memb->desiredCompressionLevel (9); + } + }, +@@ -4260,7 +4260,7 @@ sub _archive_generator_zip + if ($file) + { + unlink $tmpname; +- $zip->writeToFileHandle ($file, 1) == &{$ {Archive::Zip::}{AZ_OK}} ++ $zip->writeToFileHandle ($file, 1) == &Archive::Zip::AZ_OK + or die "failed to write to zip file: $!"; + $file->seek (0, 0); + } +@@ -4269,7 +4269,7 @@ sub _archive_generator_zip + unless ($file) + { + $file = new IO::Scalar; +- $zip->writeToFileHandle ($file, 1) == &{$ {Archive::Zip::}{AZ_OK}} ++ $zip->writeToFileHandle ($file, 1) == &Archive::Zip::AZ_OK + or die "failed to write to zip file: $!"; + $file->seek (0, 0); + } +@@ -8109,16 +8109,16 @@ sub _newFromFileHandle + $self->fileName ($filename); + $self->{externalFileName} = $filename; + +- $self->{compressionMethod} = &{$ {Archive::Zip::}{COMPRESSION_STORED}}; ++ $self->{compressionMethod} = &Archive::Zip::COMPRESSION_STORED; + + my ($mode, $perms, $nlink, $user, $group, $size, $time) = $fileh->status; + $self->{compressedSize} = $self->{uncompressedSize} = $size; + $self->desiredCompressionMethod + ($self->compressedSize > 0 +- ? &{$ {Archive::Zip::}{COMPRESSION_DEFLATED}} +- : &{$ {Archive::Zip::}{COMPRESSION_STORED}}); ++ ? &Archive::Zip::COMPRESSION_DEFLATED ++ : &Archive::Zip::COMPRESSION_STORED); + $self->unixFileAttributes ($perms); +- $self->setLastModFileDateTimeFromUnix ($time); ++ $self->setLastModFileDateTimeFromUnix ($time) if $time; + $self->isTextFile (0); + + $self; +@@ -8136,7 +8136,7 @@ sub fh + return $self->{fh} if $self->{fh}; + + $self->{fh} = $self->{fileh}->open ("r") +- or return &{$ {Archive::Zip::}{AZ_IO_ERROR}}; ++ or return &Archive::Zip::AZ_IO_ERROR; + + $self->{fh}; + } +@@ -8146,17 +8146,17 @@ sub rewindData + my $self = shift; + + my $status = $self->SUPER::rewindData (@_); +- return $status if $status != &{$ {Archive::Zip::}{AZ_OK}}; ++ return $status if $status != &Archive::Zip::AZ_OK; + +- return &{$ {Archive::Zip::}{AZ_IO_ERROR}} unless $self->fh; ++ return &Archive::Zip::AZ_IO_ERROR unless $self->fh; + + # Not all personalities can seek backwards in the stream. Close + # the file and reopen it instead. +- $self->endRead == &{$ {Archive::Zip::}{AZ_OK}} +- or return &{$ {Archive::Zip::}{AZ_IO_ERROR}}; ++ $self->endRead == &Archive::Zip::AZ_OK ++ or return &Archive::Zip::AZ_IO_ERROR; + $self->fh; + +- return &{$ {Archive::Zip::}{AZ_OK}}; ++ return &Archive::Zip::AZ_OK; + } + + sub _readRawChunk +@@ -8165,12 +8165,12 @@ sub _readRawChunk + my $dataref = shift; + my $chunksize = shift; + +- return (0, &{$ {Archive::Zip::}{AZ_OK}}) unless $chunksize; ++ return (0, &Archive::Zip::AZ_OK) unless $chunksize; + + my $bytesread = $self->fh->sysread ($$dataref, $chunksize) +- or return (0, &{$ {Archive::Zip::}{AZ_IO_ERROR}}); ++ or return (0, &Archive::Zip::AZ_IO_ERROR); + +- return ($bytesread, &{$ {Archive::Zip::}{AZ_OK}}); ++ return ($bytesread, &Archive::Zip::AZ_OK); + } + + sub endRead +@@ -8180,10 +8180,10 @@ sub endRead + if ($self->{fh}) + { + $self->{fh}->close +- or return &{$ {Archive::Zip::}{AZ_IO_ERROR}}; ++ or return &Archive::Zip::AZ_IO_ERROR; + delete $self->{fh}; + } +- return &{$ {Archive::Zip::}{AZ_OK}}; ++ return &Archive::Zip::AZ_OK; + } + + 1 # So that the require or use succeeds. diff --git a/perl-Net-FTPServer.spec b/perl-Net-FTPServer.spec index d61bfec..6ca7227 100644 --- a/perl-Net-FTPServer.spec +++ b/perl-Net-FTPServer.spec @@ -1,11 +1,14 @@ Name: perl-Net-FTPServer Version: 1.122 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Secure, extensible and configurable Perl FTP server License: GPLv2+ Group: Development/Libraries URL: http://search.cpan.org/dist/Net-FTPServer/ Source0: http://www.cpan.org/authors/id/R/RW/RWMJ/Net-FTPServer-%{version}.tar.gz +# fix build failures in tests +# https://rt.cpan.org/Public/Bug/Display.html?id=35698 +Patch0: Net-FTPServer.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Archive::Zip) @@ -47,7 +50,7 @@ This package contains server executables. %prep %setup -q -n Net-FTPServer-%{version} - +%patch0 -p1 iconv -f iso-8859-1 -t utf-8 README > README.tmp mv -f README.tmp README @@ -93,6 +96,9 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/* %changelog +* Tue Dec 21 2010 Marcela Maslanova <mmaslano@xxxxxxxxxx> - 1.122-18 +- applied patch from RT#35698. Tests were fixed by this change. + * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.122-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel