update to p5-Net-FTPServer-1.125
- fixes build with newer perl - adds new patch to fix a faulty regex - adds new patch to raise the default memory limit (fixes some tests and probably some runtime issues) - more exact license, use the MODCPAN_EXAMPLES ports infrastructure - drop avsm@ as maintainer, he hasn't used this in a while ;) ok cwen@
This commit is contained in:
parent
21d1dcfd04
commit
05f19a50e7
@ -1,15 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.13 2016/03/20 19:56:52 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.14 2019/02/10 12:58:02 sthen Exp $
|
||||
|
||||
COMMENT= secure, extensible and configurable Perl FTPd
|
||||
|
||||
MODULES= cpan
|
||||
PKG_ARCH= *
|
||||
DISTNAME= Net-FTPServer-1.122
|
||||
REVISION= 2
|
||||
DISTNAME= Net-FTPServer-1.125
|
||||
CATEGORIES= net
|
||||
|
||||
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
|
||||
|
||||
BUILD_DEPENDS= ${RUN_DEPENDS}
|
||||
RUN_DEPENDS= archivers/p5-Archive-Zip \
|
||||
databases/p5-DBI \
|
||||
@ -17,14 +14,11 @@ RUN_DEPENDS= archivers/p5-Archive-Zip \
|
||||
devel/p5-File-Sync \
|
||||
devel/p5-IO-stringy
|
||||
|
||||
# GPL
|
||||
# GPLv2+
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
||||
FAKE_FLAGS= NOCONF=1
|
||||
CONFIG_DIR= ${PREFIX}/share/examples/p5-Net-FTPServer
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${CONFIG_DIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/ftpd.conf ${CONFIG_DIR}/ftpd.conf
|
||||
FAKE_FLAGS= NOCONF=1
|
||||
MODCPAN_EXAMPLES= Yes
|
||||
MODCPAN_EXAMPLES_DIST= etc
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (Net-FTPServer-1.122.tar.gz) = 16UlfJgu2qg7LNXBy7MZCie4+ZlrOCy6pp0sXWFx11w=
|
||||
SIZE (Net-FTPServer-1.122.tar.gz) = 127256
|
||||
SHA256 (Net-FTPServer-1.125.tar.gz) = FoPXF+ddec1mMwjVHO8o4S0sUklstu9Q9XCRkqyQ4MU=
|
||||
SIZE (Net-FTPServer-1.125.tar.gz) = 128458
|
||||
|
@ -1,112 +1,49 @@
|
||||
$OpenBSD: patch-lib_Net_FTPServer_pm,v 1.1 2009/09/08 21:10:59 bluhm Exp $
|
||||
--- lib/Net/FTPServer.pm.orig Fri Jul 15 12:10:22 2005
|
||||
+++ lib/Net/FTPServer.pm Thu Aug 27 17:13:15 2009
|
||||
@@ -4228,7 +4228,7 @@ sub _archive_generator_zip
|
||||
$OpenBSD: patch-lib_Net_FTPServer_pm,v 1.2 2019/02/10 12:58:02 sthen Exp $
|
||||
|
||||
Hunk #1/2 - Default memory limit is too low, various tests fail with
|
||||
16MB. 32MB still has a failure in t/240abort.t but most things work
|
||||
ok and 240abort.t represents an unusual situation. (It can be made
|
||||
to work with 64MB in perl 5.28 - earlier perl needs even more).
|
||||
|
||||
Hunk #3 - Typo found by newer perl's "Unescaped left brace in regex"
|
||||
deprecation warning.
|
||||
|
||||
Index: lib/Net/FTPServer.pm
|
||||
--- lib/Net/FTPServer.pm.orig
|
||||
+++ lib/Net/FTPServer.pm
|
||||
@@ -358,7 +358,7 @@ process and are important in avoiding denial of servic
|
||||
attacks against the FTP server.
|
||||
|
||||
$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)
|
||||
Resource Default Unit
|
||||
- limit memory 16384 KBytes Amount of memory per child
|
||||
+ limit memory 32768 KBytes Amount of memory per child
|
||||
limit nr processes 10 (none) Number of processes
|
||||
limit nr files 20 (none) Number of open files
|
||||
|
||||
@@ -367,7 +367,7 @@ limit to C<-1>.
|
||||
|
||||
Example:
|
||||
|
||||
- limit memory: 32768
|
||||
+ limit memory: 65536
|
||||
limit nr processes: 20
|
||||
limit nr files: 40
|
||||
|
||||
@@ -2680,7 +2680,7 @@ sub run
|
||||
# Perform normal per-process limits.
|
||||
if ($r == 0)
|
||||
{
|
||||
$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;
|
||||
- my $limit = 1024 * ($self->config ("limit memory") || 16384);
|
||||
+ my $limit = 1024 * ($self->config ("limit memory") || 32768);
|
||||
$self->_set_rlimit ("RLIMIT_DATA", $limit) if $limit >= 0;
|
||||
|
||||
- $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})
|
||||
$limit = $self->config ("limit nr processes") || 10;
|
||||
@@ -6688,7 +6688,7 @@ sub _LANG_command
|
||||
# (b) there are all sorts of possible libc exploits available if
|
||||
# the user is allowed to set this to arbitrary values.
|
||||
unless (length ($rest) <= 8 &&
|
||||
- $rest =~ /^[A-Z]{1,8}(-[A-Z]{1-8})*$/i)
|
||||
+ $rest =~ /^[A-Z]{1,8}(-[A-Z]{1,8})*$/i)
|
||||
{
|
||||
$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.
|
||||
$self->reply (504, "Incorrect language.");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user