The in-tree version of p5-Net-FTPServer fails at build time with
the pending Perl update.
Diff below:
- updates to 1.125 which fixes the build issue
- removes the old patches which are no longer needed
- 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)
- port tweak: more exact license, use the MODCPAN_EXAMPLES ports
infrastructure
One test still fails out-of-memory due to the limits but
most things work and going higher than 32MB per concurrent user
seems a bit much.
Any OKs? Anil, do you still want to be listed as maintainer?
Index: Makefile
===
RCS file: /cvs/ports/net/p5-Net-FTPServer/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile20 Mar 2016 19:56:52 - 1.13
+++ Makefile9 Feb 2019 16:57:59 -
@@ -4,8 +4,7 @@ COMMENT=secure, extensible and configur
MODULES= cpan
PKG_ARCH= *
-DISTNAME= Net-FTPServer-1.122
-REVISION= 2
+DISTNAME= Net-FTPServer-1.125
CATEGORIES=net
MAINTAINER=Anil Madhavapeddy
@@ -17,14 +16,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
Index: distinfo
===
RCS file: /cvs/ports/net/p5-Net-FTPServer/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo18 Jan 2015 03:14:45 - 1.5
+++ distinfo9 Feb 2019 16:57:59 -
@@ -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
Index: patches/patch-lib_Net_FTPServer_pm
===
RCS file: /cvs/ports/net/p5-Net-FTPServer/patches/patch-lib_Net_FTPServer_pm,v
retrieving revision 1.1
diff -u -p -r1.1 patch-lib_Net_FTPServer_pm
--- patches/patch-lib_Net_FTPServer_pm 8 Sep 2009 21:10:59 - 1.1
+++ patches/patch-lib_Net_FTPServer_pm 9 Feb 2019 16:57:59 -
@@ -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
-
-$zip->addMember ($memb);
-$memb->desiredCompressionMethod
-- (&{$ {Archive::Zip::}{COMPRESSION_DEFLATED}});
-+ (::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) == ::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)
+$OpenBSD$
+
+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.
+
+ Resource Default Unit
+- limit memory 16384 KBytes Amount of memory per child
++ limit memory 32768 KBytes Amount of memory per child
+ limit nr processes10 (none) Number of processes
+ limit nr files20 (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) == ::Zip::AZ_OK
- or die "failed to write to zip file: $!";
- $file->seek (0, 0);
- }
-@@