summaryrefslogtreecommitdiff
path: root/net-ftp/proftpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-ftp/proftpd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-ftp/proftpd')
-rw-r--r--net-ftp/proftpd/Manifest24
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch18
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch17
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch60
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch29
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch24
-rw-r--r--net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch23
-rw-r--r--net-ftp/proftpd/files/proftpd-tmpfiles.d.conf1
-rw-r--r--net-ftp/proftpd/files/proftpd.conf.sample53
-rw-r--r--net-ftp/proftpd/files/proftpd.initd51
-rw-r--r--net-ftp/proftpd/files/proftpd.service12
-rw-r--r--net-ftp/proftpd/files/proftpd.xinetd15
-rw-r--r--net-ftp/proftpd/metadata.xml50
-rw-r--r--net-ftp/proftpd/proftpd-1.3.5e.ebuild234
-rw-r--r--net-ftp/proftpd/proftpd-1.3.6.ebuild258
15 files changed, 869 insertions, 0 deletions
diff --git a/net-ftp/proftpd/Manifest b/net-ftp/proftpd/Manifest
new file mode 100644
index 000000000000..069920fe4e86
--- /dev/null
+++ b/net-ftp/proftpd/Manifest
@@ -0,0 +1,24 @@
+AUX proftpd-1.3.6-use-trace.patch 477 SHA256 5d4e5da19f3dfe8ca96996f0b1250d6a452dbbcfdd381d835d3bbd04b82f8172 SHA512 90164f799d1f6c3768a30161a40d5c369e576c3b1a875047ef65c1224d3e18cf1f4dd5145c5ff6f7aeda80135134df58a1d57046129b922514cb56d1de97f13e WHIRLPOOL 18956f666f54ebb503d8c2516288b4e04ebc04e05aac3c9612eefa4944b4d87d28a3efcda85d536395a9bf96e46a50889983e1be53176f6226c4252c18ece3a1
+AUX proftpd-1.3.6_rc4-diskuse-refresh-api.patch 576 SHA256 68b27e9d457f87a80f6c4a1f943352bb5b81c0316250117f4b9a3166e99e9e4b SHA512 08a0674600944ff5d13033651a1dea1647c9d22f18efe6505e051b36566bf357bc41439d2dd7c2900e873ef8d600ba7f16332680dda1abb2529808fbe5a4e573 WHIRLPOOL 0b2c283027eedd7d3a6a58b2e8b1be80da47f3ea2c5094a4eff7452be3ab2e29361777d4f1e8008af46d84c8a4c7a23ed5fc4014c267d899d57f3c724fe4f0f0
+AUX proftpd-1.3.6_rc4-gss-refresh-api.patch 1868 SHA256 1e6360fba78b2f5242fbcb428c581365e66ea39e639bf3aa03e68609cfbcda51 SHA512 4cc235bdb60ea4c84794d4347826b040057067d8283dcfcb795d5d25a156de480df7d897078ab8ab4faf12d4fc9e714a55f723ce27c9397bc2223550597df674 WHIRLPOOL ffc1a64355593db43d40cf822c9b65f311b75223e14e334edaef1b4b916e36f085e30d13203beecc8d900023c8f85315f6b44f04c6f9c69ce4c8c64c82e4878d
+AUX proftpd-1.3.6_rc4-msg-refresh-api.patch 903 SHA256 dd232a954737848c8077b604b0d3c7050b3eb6e720aefd4e70489331dd25937b SHA512 d0dcc467289b4107aecee66edf122667b2fbb9b1f1a6a6ecea517f286090d22682200b9d11f503465cb9b5387e8fb749cc09c3033825282450fe1d6c0a4bb11d WHIRLPOOL b620914736899842696737932858ba3fe50dc2f90bf2d95dc96bd6ab0cda44d9fb29a5292ba2e9e421e98e24e446accef58542efca6d2e711b0dd9347aae5c06
+AUX proftpd-1.3.6_rc4-open-tests.patch 1206 SHA256 20d19ba6a64e961925d811e1921682b5df73a56537d89e37c2f7127bb0a81c6b SHA512 d860eebfa05870866e0e523af34c25d3c7513d4a2f0b0a84963f86c58475d957013fbf503f9d0934146c566326f49784dbc4e7ba4ac089a9214558a677bb9266 WHIRLPOOL 11562795fe868e3ee25f78e4d3caaf0609dff8d3c00b46c23c7fa21a7d59ff733d0bd168570edd7c13a71f7c263515db77afd63ddc34c94fdb47ab76807d1817
+AUX proftpd-1.3.6_rc4-vroot-refresh-api.patch 736 SHA256 fcc15a6c5f8f8cd8ad50328897c5be9aab772ed2997c858ac1a0e09582b1b295 SHA512 9cd98e2fb8c17d2ca38f5f7a20f5c6ffb03da7f51e53542237992bd2b98b2ef5b5fc0634cd7f5eef24fba8a601703b70ff7d0404e1c5103394e9fda260b815cd WHIRLPOOL 75cf5fede0c02128acbd93f31dfc6a501ad2488c8084c6fbc8771532a3a1d58c79676dbbeeded3eaeaf8e00989167d77169128eb7fe0f952a940a4c10b821638
+AUX proftpd-tmpfiles.d.conf 34 SHA256 75288bb0c76392ae10e7ef3ff27e7b665742cdac8ce4c70dff9f29d645d0f0f3 SHA512 aa6ffbf15e4275941837306259fb426608e82e45a2da4b99c5d7778d11b8c9341e3a12ae9b751d0e173635239b6f1b20f0431be17296c005a83525a48327fa52 WHIRLPOOL d3ef47f4e2abc178c2d153599e7b13148345a470c76410b499e41912f9e90a48c1217e7fdee3d6777b1598dd09840f8bffbd208fa9addbeaaaf9c64058d8df93
+AUX proftpd.conf.sample 1275 SHA256 a214b3937f319c70976d29cfcd47c2cd937d1d70b7274c2b241b1e97606e89c0 SHA512 1c26f3e98ed07d89192c640f7823af168c045abee6ab076791aee9d50be5446be870a189979df4b828e7ae907dd40a346f1b92998fa39195195bfada4061c5df WHIRLPOOL a9f71cf50926ccdf5fe1116250c29a4048e7eb7fc7eb73732023b7c6e78c56b02356c001c203d9dc8c46f817471116977f76e961a6b2a60c03ae1d4722d9e3e1
+AUX proftpd.initd 1434 SHA256 70d20dc3e830c7bd68048d137948d3b921f2498e4b95c1c9a30d88b1c75c510d SHA512 24875a5034813a12f1d24e1fa2c7a71330ffded96112d50dbe4fea6ea127f735eae48134e2f4c3faad168706eb9ff4e15f93dbbe7d6cb6ed0e0768e47aa1100b WHIRLPOOL 3acdbbc4a6682b1ad63b4195da150d36c5603b0e96150c62d59ad021e459405d3d9d2bf925d77b0d40e4d34b3fbd4089efbb73f797ade41617e61d029a453323
+AUX proftpd.service 196 SHA256 165235565ca2029c6c33d9e4b73f6da2b0ee08a662fd368dc9260761997b7277 SHA512 12ee7893d37a9d06140b5b6492be74308fe1165a741d4c1b6b690ab4b973f074cad8517fd36af54f2aa452494759d1534c11e70f7212cd55a37cfa439b953062 WHIRLPOOL 3d8f01d1c22a99d2410d492364833a718a008143c76856145372fa15a0cfc5727b1e744ed45e2fcc8303d90b7e10641662342c1b7d0a50c3bdbc3bd5958d8969
+AUX proftpd.xinetd 295 SHA256 150a5701f5c2788ecdf2c6ec228ce674963c9dc7bc1c511ad1eba8dfe05e2d5d SHA512 a13d29ca2289f8bd58b4eb317683d57dfb7d608c53f163844349bbf0b896790f5e9f47a27eafda3b8fc78e60f4a0d6859da7c7ced7df852166cf0b8bcad876d4 WHIRLPOOL 8fa187fe6aff903952257013d06f8953159787f03e6a1b1cd105f55bc6ed8fb70f03e02d4600c593152f9fc418b96fd7ac92555cdd6b9a8c59392e7852b8c186
+DIST mod_clamav-0.11rc.tar.gz 5115 SHA256 87630eb1866066d6320ee711897d8998b8f4915c0498b2e78cc0464abd34855a SHA512 6d33ee7b1c9c8e3fb0a0014dde90cfb1d37daa0f4914f147bb800a8318bcf0e03c7c6748d84cda36c5e5c7cd11ee8114bad9978362f581f367db54d3563f4636 WHIRLPOOL b15024d1011a83a10ce52fb676f1f2162d67750dc137600b624cd04ebd498bb3c9242e4889fd7b73c18224eb483286cb543fc627b27e6a8ff4c9bf35468218b9
+DIST mod_gss-1.3.6.tar.gz 117294 SHA256 bd1cb3f8ba0668981beb54d8b4de10ab204199327a464debd9da19196bbb23c4 SHA512 a7e2f201bc7706f47f583317899bf4bc6a75d5e284b20a4cd9019020d3427334ada92fa3bbb4e153a2cd68e04f76185472b46ed3d3d168bf52a4c200e70ed8e4 WHIRLPOOL 96dce4cf8027961d0358a6f6f7ab33a606bfeb9bfe52702663e6c176e21d1ec357617e2d7f780247895f489700d129b03a62712ffc945c1104b53508ea1fca32
+DIST mod_vroot-0.9.4.tar.gz 29461 SHA256 80c82c18639909a3b5219cbb76363584c0eb311535de38adb5d9040a9b12bde8 SHA512 f5de392c9fe39f0a03b0783a7092bbfe17ea6db991f4b4e4a2d8f092f073d27ef2c64dd6484d5665b5abc808c0caba016d4fc3fab3da3810f5ebe5249bb4cbce WHIRLPOOL a3e086812e270d96dd659bbb1c3afb7e84adfe8db525adb08ecaabe02afb972032b413b8e16e2a26a8d99f2a599a3901010a6d1201c964164559aacf6105dc2a
+DIST proftpd-1.3.5e.tar.gz 29968142 SHA256 8307dc0103a8e716b99745919be7f09b54708c57c7d5aa70262f7593dc56bc9d SHA512 54a9700af803297697e4b7f2d7dc82139785f9f2cbeb40b226f94ff3e8690f2e3672aa80373005dfec4b53f3dd9ca7b0a658ea39bda63e71292c810ba994eac7 WHIRLPOOL 3747ddb69936b1631b937bed9bc9865a75abcb1ec55ebf796c733f4cb1323b947c34142332d0d6c1f289b21174b83fe995e492ac77cb1d942aabd6467aaed143
+DIST proftpd-1.3.6.tar.gz 20251898 SHA256 91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf SHA512 2a3ca76a0c35ba31e9d79f7f652f4f35768262f5039c5dc04ef83ac9218f624645ac6cee445af4ec6a8c59a9bdad1e7b48e0e90cd13934cbe7c3e77a2f6013c0 WHIRLPOOL 1b304015083a3e7a8aec15b306d802f6fe32cb0d8f0c5c260cfa0eb6e07d30ac2c5bb436d8cdaf1f379703fd73898a1d491a16d7c16150d87ca2349caff2f211
+DIST proftpd-mod-case-0.7.tar.gz 13184 SHA256 c3f65588250fea7771439933fa754927794f664e99b8d20f99b1e400fea62111 SHA512 c08d13ef82fec36ae75aa3213dd02e0ce4045904849f422e152f039a9da66a45e4423751074b8bcf8ce347a40ce0e7bde798a85cbadc962fd872aeaa898261fc WHIRLPOOL 27f49e9f34099c081add803aa679fd9abe7afa652dffe5d8e42889fef49aeaefd499e1009fc564d6c8f882b3c6dc31d4c6dd08cc06a42b770e7ef76a2ebfcf8a
+DIST proftpd-mod-diskuse-0.9.tar.gz 18596 SHA256 424f3fd49237245ec176d27ade0965fe21a0db1d645979d5ae3e55497e3da036 SHA512 d41976bf2810e4b783e775e8c767ca2030c3b5df116219fd31cbbac7feaf9922c315bf4ea092881b0d6cf43f2f4c5dbcae61be3c3a833058d12f962a3024b975 WHIRLPOOL aabd1dc23d6c38d308e859ff778beffd0dabfe70d3530c093cf2f95e80b5e9c94b97b6b5ae5109d031f76ff94dffc3822a7aa60fa30df04523d37ebed99730d6
+DIST proftpd-mod-msg-0.4.1.tar.gz 8082 SHA256 255b79d31dc509ffad5d0fbcd469f833a8481e880aa962910c2bc8aa608ca6da SHA512 38ea63b1d355e1e10a6a4477596bf3fa28529a871c9fb8dbf093b5317f0743ef9cb59b986d0b8c1c7ed932dad5d5d571883d596fad2d3b793431824db4487012 WHIRLPOOL ff907e26a354f53231fed94515eb60050dec77118be6f49147e0eb8b79e50c9d73354618bca19d98d32a3fb79d7ba87507cc6c8b269f259c5fcf23d44ad3a906
+EBUILD proftpd-1.3.5e.ebuild 7387 SHA256 5e1a75cb2d5baf6bde8a1a80f0b9e10a086806e4b1354b6c531b1cd25299fbd5 SHA512 3b753faff75ceb473663efbb1474c8f5b0e82e4c5960883d894e40cca1bfc174e10b8a4fb8fb3e6ff9d1493a4c33810e28063499e6b2d410f86ae457f9b2ff4d WHIRLPOOL fe82a2e1dad663c4048e40f2d85b0a392f6f9d3dc9f700c3a4a910a98fb268eae41f33ea0ce3e9019296a9416fa80af2132849096a071db2ce0b286d768e567f
+EBUILD proftpd-1.3.6.ebuild 8460 SHA256 d8758cce2c43956634b6cb388e53c9ad1d4424471571ae7edd70944fb120c18a SHA512 2f29943da024b2bde729377321c991feb3e11f8641ed9efbe872bf3b6d8dd9c64d4022367358ffa766e6ebf8cc7e888a2a11f08c3100c9434b3e84944cdae000 WHIRLPOOL 0bff142a56fe2b3f546f7663131fbc88da70daf0a35bb7395bc060c63bc1b6d69063a78ac1a04513447ff4c10245aa497416f0035a55a9160e700fd33b6e4717
+MISC ChangeLog 7780 SHA256 a33c7412885fc7653398a73f52945a061b7914c9159ab2e2fd89935cdd8cdb4c SHA512 d7462c20e92a1305e1c4355d6e5aa677f378e12c18bf80b8c1160f6d52ffd913d04d0b2f68b7719ed381043e7049acc72740f89b39c1af75d4736f1b0af65e2c WHIRLPOOL f7d6da3a7d11f8f4412d519810f262517d32cb22801fc8333fbbd9a1439809cee800baf397992ba5af52a799c55e5216064ca9659ac3da34e6536b234f17b2b3
+MISC ChangeLog-2015 58811 SHA256 f9097cb46f926a9b8651e9887c7e0183fc01a5f294068a953e8b417db4eecf52 SHA512 d2ffc47c806eac41920b570d8cbcc7e7770c36730a0ff121d5e4ec4262eae4bed726de1d41fcf95ba868bd550c51cb73c6fe43cab34873b254f426a065acb0bb WHIRLPOOL e066bcd5de25953acb23a857f403765c52c6601a14a58326dbf015e5aebe7a56b24e98ac3a3f2e52ba3496d0caac9d6fba82f0ceac51b38ed0daa413db9973f9
+MISC metadata.xml 3240 SHA256 e02ee7bbb8bcc0f4a43c25a6c15c653a7c555b6f5774668c9cf539b205525a37 SHA512 0709d672dd94e5a76928fa5945e45de6270b4aacf10e4669d2e9388bc2ec9745ecda646528d5f54cd1ea84e76d3ed366314c013fe20663f1a8d3e835738c1363 WHIRLPOOL 6bd2bcaf77ea210e150e42faa1c938aa6a3754ff42e80dbccaafa126297aa9dbff44dac47fcc46404f8223943531afc3cebb8cb0ffc241d89ff323e3f6249ece
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch b/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch
new file mode 100644
index 000000000000..c7d918425636
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch
@@ -0,0 +1,18 @@
+Make --disable-trace a build-time failure instead of link-time one.
+
+Reported-by: Toralf Förster
+Bug: https://bugs.gentoo.org/624570
+diff --git a/include/trace.h b/include/trace.h
+index f05dd0e..398e939 100644
+--- a/include/trace.h
++++ b/include/trace.h
+@@ -29,2 +29,4 @@
+
++#ifdef PR_USE_TRACE
++
+ #define PR_TRACE_DEFAULT_CHANNEL "DEFAULT"
+@@ -64,2 +66,4 @@ int pr_trace_vmsg(const char *, int, const char *, va_list);
+
++#endif /* PR_USE_TRACE */
++
+ #endif /* PR_TRACE_H */
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch
new file mode 100644
index 000000000000..34f1d95ebee0
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch
@@ -0,0 +1,17 @@
+diff --git a/mod_diskuse.c b/mod_diskuse.c
+index 0e0a0d0..7eb5edf 100644
+--- a/mod_diskuse.c
++++ b/mod_diskuse.c
+@@ -53,6 +53,12 @@
+
+ #define MOD_DISKUSE_VERSION "mod_diskuse/0.9"
+
++#define pr_parse_expression pr_expr_create
++#define pr_class_or_expression pr_expr_eval_class_or
++#define pr_group_and_expression pr_expr_eval_group_and
++#define pr_group_or_expression pr_expr_eval_group_or
++#define pr_user_or_expression pr_expr_eval_user_or
++
+ static unsigned char have_max_diskuse = FALSE;
+ static double min_diskfree = 0.0;
+ static double current_diskfree = 0.0;
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch
new file mode 100644
index 000000000000..43cc659e47dc
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch
@@ -0,0 +1,60 @@
+diff --git a/mod_auth_gss.c.in b/mod_auth_gss.c.in
+index 6228b4d..3569ebb 100644
+--- a/mod_auth_gss.c.in
++++ b/mod_auth_gss.c.in
+@@ -38,6 +38,10 @@
+ */
+
+ #include "mod_gss.h"
++
++#define DECLINED PR_DECLINED
++#define ERROR_INT PR_ERROR_INT
++
+ extern unsigned char gss_engine;
+ extern unsigned long gss_flags;
+ extern int gss_logfd;
+diff --git a/mod_gss.c.in b/mod_gss.c.in
+index 9d2d4c8..83a4019 100644
+--- a/mod_gss.c.in
++++ b/mod_gss.c.in
+@@ -57,6 +57,13 @@
+
+ #include "mod_gss.h"
+
++#define LOG_SYMLINK PR_LOG_SYMLINK
++#define LOG_WRITEABLE_DIR PR_LOG_WRITABLE_DIR
++#define HANDLED PR_HANDLED
++#define ERROR PR_ERROR
++#define DECLINED PR_DECLINED
++#define ERROR_INT PR_ERROR_INT
++
+ module gss_module;
+
+ /* Module variables maybe used externaly */
+@@ -1395,7 +1402,7 @@ MODRET gss_auth(cmd_rec *cmd) {
+
+ /* Convert the parameter to upper case */
+ for (i = 0; i < strlen(cmd->argv[1]); i++)
+- (cmd->argv[1])[i] = toupper((cmd->argv[1])[i]);
++ ((char*)cmd->argv[1])[i] = toupper(((char*)cmd->argv[1])[i]);
+
+ if (!strcmp(cmd->argv[1], "GSSAPI")) {
+ pr_response_send(R_334, "Using authentication type %s; ADAT must follow", cmd->argv[1]);
+@@ -2014,7 +2021,7 @@ MODRET gss_prot(cmd_rec *cmd) {
+
+ /* Convert the parameter to upper case */
+ for (i = 0; i < strlen(cmd->argv[1]); i++)
+- (cmd->argv[1])[i] = toupper((cmd->argv[1])[i]);
++ ((char*)cmd->argv[1])[i] = toupper(((char*)cmd->argv[1])[i]);
+
+ /* Only PROT S , PROT C or PROT P is valid with respect to GSS. */
+ if (!strcmp(cmd->argv[1], "C")) {
+@@ -2098,7 +2105,7 @@ MODRET set_gsskeytab(cmd_rec *cmd) {
+ if (!file_exists(cmd->argv[1]))
+ CONF_ERROR(cmd, "file does not exist");
+
+- if (*cmd->argv[1] != '/')
++ if (((char*)(*cmd->argv))[1] != '/')
+ CONF_ERROR(cmd, "parameter must be an absolute path");
+
+ add_config_param_str(cmd->argv[0], 1, cmd->argv[1]);
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch
new file mode 100644
index 000000000000..2e90be254cb6
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch
@@ -0,0 +1,29 @@
+diff --git a/mod_msg.c b/mod_msg.c
+index 70bce69..4ce6bd7 100644
+--- a/mod_msg.c
++++ b/mod_msg.c
+@@ -52,10 +52,14 @@ extern pid_t mpid;
+
+ module msg_module;
+
+-#ifndef USE_CTRLS
++#ifndef PR_USE_CTRLS
+ # error "mod_msg requires Controls support (--enable-ctrls)"
+ #endif /* USE_CTRLS */
+
++#define pr_scoreboard_read_entry pr_scoreboard_entry_read
++#define DECLINED PR_DECLINED
++#define HANDLED PR_HANDLED
++
+ static ctrls_acttab_t msg_acttab[];
+
+ static int msg_engine = FALSE;
+@@ -709,7 +713,7 @@ static int msg_handle_msg(pr_ctrls_t *ctrl, int reqargc, char **reqargv) {
+ if (msg_send_msg(score->sce_pid, msgstr) < 0) {
+ msg_errno = errno;
+ (void) pr_log_writefile(msg_logfd, MOD_MSG_VERSION,
+- "error sending message to all (pid %u): %s", reqargv[1],
++ "error sending message to all (pid %u): %s",
+ score->sce_pid, strerror(errno));
+
+ } else
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch
new file mode 100644
index 000000000000..f65a2cc3fbb4
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch
@@ -0,0 +1,24 @@
+gcc-6.3 + glibc-2.25 now can detect 2-argument open that is supposed to created new files.
+diff --git a/tests/api/fsio.c b/tests/api/fsio.c
+index 2041f43..18d173b 100644
+--- a/tests/api/fsio.c
++++ b/tests/api/fsio.c
+@@ -1058,3 +1058,3 @@ START_TEST (fsio_sys_access_file_test) {
+ /* Make the file to check; we want it to have perms 664.*/
+- fd = open(fsio_test_path, O_CREAT|O_EXCL|O_WRONLY);
++ fd = open(fsio_test_path, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR | S_IWUSR);
+ fail_if(fd < 0, "Unable to create file '%s': %s", fsio_test_path,
+diff --git a/tests/api/scoreboard.c b/tests/api/scoreboard.c
+index f0ffdbc..f26d833 100644
+--- a/tests/api/scoreboard.c
++++ b/tests/api/scoreboard.c
+@@ -267,3 +267,3 @@ START_TEST (scoreboard_lock_test) {
+
+- fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR);
++ fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR, S_IRUSR | S_IWUSR);
+ fail_unless(fd >= 0, "Failed to open '%s': %s", test_file2, strerror(errno));
+@@ -911,3 +911,3 @@ START_TEST (scoreboard_entry_lock_test) {
+
+- fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR);
++ fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR, S_IRUSR | S_IWUSR);
+ fail_unless(fd >= 0, "Failed to open '%s': %s", test_file2, strerror(errno));
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch
new file mode 100644
index 000000000000..59b96ce90027
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch
@@ -0,0 +1,23 @@
+diff --git a/mod_vroot.c b/mod_vroot.c
+index b0ce59a..db0df35 100644
+--- a/mod_vroot.c
++++ b/mod_vroot.c
+@@ -1515,7 +1515,7 @@ MODRET set_vrootserverroot(cmd_rec *cmd) {
+ */
+
+ pathlen = strlen(cmd->argv[1]);
+- if (cmd->argv[1][pathlen - 1] != '/') {
++ if (((char*)cmd->argv[1])[pathlen - 1] != '/') {
+ c->argv[0] = pstrcat(c->pool, cmd->argv[1], "/", NULL);
+
+ } else {
+@@ -1648,7 +1648,9 @@ MODRET vroot_pre_pass(cmd_rec *cmd) {
+ fs->rename = vroot_rename;
+ fs->unlink = vroot_unlink;
+ fs->open = vroot_open;
++#if ! PROFTPD_VERSION_NUMBER >= 0x0001030604
+ fs->creat = vroot_creat;
++#endif /* before ProFTPD 1.3.6_rc4 */
+ fs->link = vroot_link;
+ fs->readlink = vroot_readlink;
+ fs->symlink = vroot_symlink;
diff --git a/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf
new file mode 100644
index 000000000000..26ad04256b43
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf
@@ -0,0 +1 @@
+d /var/run/proftpd 0755 root root
diff --git a/net-ftp/proftpd/files/proftpd.conf.sample b/net-ftp/proftpd/files/proftpd.conf.sample
new file mode 100644
index 000000000000..7bbfa03f0bc1
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.conf.sample
@@ -0,0 +1,53 @@
+# This is a sample ProFTPD configuration file for Gentoo Linux (rename
+# it to 'proftpd.conf' for actual use). It establishes a single server
+# and a single anonymous login.
+
+ServerName "ProFTPD Default Server"
+ServerType standalone
+DefaultServer on
+RequireValidShell off
+AuthPAM off
+AuthPAMConfig ftp
+
+# Listen on the standard FTP port 21.
+Port 21
+
+# New directories and files should not be group or world writable.
+Umask 022
+
+# To prevent DoS attacks set the maximum number of child processes
+# to 30. If you need to allow more than 30 concurrent connections
+# at once simply increase this value.
+MaxInstances 30
+
+# The server will run under ftp/ftp.
+User ftp
+Group ftp
+
+# Every FTP sessions is "jailed" into the user's home directory.
+DefaultRoot ~
+
+# Generally files are overwritable.
+AllowOverwrite on
+
+# Disallow the use of the SITE CHMOD command.
+<Limit SITE_CHMOD>
+ DenyAll
+</Limit>
+
+# A basic anonymous FTP account without an upload directory.
+<Anonymous ~ftp>
+ User ftp
+ Group ftp
+
+ # Clients can login with the username "anonymous" and "ftp".
+ UserAlias anonymous ftp
+
+ # Limit the maximum number of parallel anonymous logins to 10.
+ MaxClients 10
+
+ # Prohibit the WRITE command for the anonymous users.
+ <Limit WRITE>
+ DenyAll
+ </Limit>
+</Anonymous>
diff --git a/net-ftp/proftpd/files/proftpd.initd b/net-ftp/proftpd/files/proftpd.initd
new file mode 100644
index 000000000000..a7ab650e1105
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.initd
@@ -0,0 +1,51 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use logger dns mysql postgresql antivirus
+}
+
+check_configuration() {
+ if [ ! -e /etc/proftpd/proftpd.conf ] ; then
+ eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration"
+ eerror "file. In /etc/proftpd you can find a sample configuration."
+ return 1
+ fi
+ /usr/sbin/proftpd -t &>/dev/null
+ if [ $? -ne 0 ] ; then
+ eerror "The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to"
+ eerror "fix your configuration in order to run the ProFTPD server. For more information"
+ eerror "you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'."
+ return 2
+ fi
+}
+
+start() {
+ checkpath -d /var/run/proftpd
+ [ "${RC_CMD}" = "restart" ] || check_configuration || return 1
+ ebegin "Starting ProFTPD"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/proftpd \
+ --pidfile /var/run/proftpd/proftpd.pid
+ eend $?
+}
+
+stop() {
+ [ "${RC_CMD}" != "restart" ] || check_configuration || return 1
+ ebegin "Stopping ProFTPD"
+ start-stop-daemon --stop --quiet --retry 20 \
+ --pidfile /var/run/proftpd/proftpd.pid
+ eend $?
+}
+
+reload() {
+ check_configuration || return 1
+ ebegin "Reloading ProFTPD"
+ start-stop-daemon --quiet --signal HUP \
+ --pidfile /var/run/proftpd/proftpd.pid
+ eend $?
+}
diff --git a/net-ftp/proftpd/files/proftpd.service b/net-ftp/proftpd/files/proftpd.service
new file mode 100644
index 000000000000..904c90f25714
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ProFTPd FTP daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/proftpd --nodaemon
+StandardOutput=syslog
+StandardError=syslog
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-ftp/proftpd/files/proftpd.xinetd b/net-ftp/proftpd/files/proftpd.xinetd
new file mode 100644
index 000000000000..ad75aefddb6c
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.xinetd
@@ -0,0 +1,15 @@
+#
+# ProFTPd FTP daemon - http://www.proftpd.org
+#
+service ftp
+{
+ flags = REUSE
+ socket_type = stream
+ instances = 30
+ wait = no
+ user = root
+ server = /usr/sbin/proftpd
+ log_on_success = HOST PID
+ log_on_failure = HOST
+ disable = yes
+}
diff --git a/net-ftp/proftpd/metadata.xml b/net-ftp/proftpd/metadata.xml
new file mode 100644
index 000000000000..4331411c0cb0
--- /dev/null
+++ b/net-ftp/proftpd/metadata.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ <description>Mostly user.</description>
+ </maintainer>
+ <longdescription>ProFTPD grew out of the desire to have a secure and
+configurable FTP server, and out of a significant admiration of the Apache web
+server.</longdescription>
+ <use>
+ <flag name="authfile">Enable support for the auth-file module</flag>
+ <flag name="ban">Enable support for the mod_ban module</flag>
+ <flag name="case">Enable support for the mod_case module</flag>
+ <flag name="ctrls">Enable support for the mod_ctrls and mod_ctrls_admin modules</flag>
+ <flag name="copy">Enable support for the mod_copy module</flag>
+ <flag name="deflate">Enable support for the mod_deflate module</flag>
+ <flag name="diskuse">Enable support for the mod_diskuse module</flag>
+ <flag name="dso">Enable support for the mod_dso module</flag>
+ <flag name="dynmasq">Enable support for the mod_dynmasq module, for dynamically updating MasqueradeAddress for dyndns-like scenarios)</flag>
+ <flag name="exec">Enable support for the mod_exec module. WARNING: this could be a security risk</flag>
+ <flag name="ident">Enable support for the mod_ident module</flag>
+ <flag name="ifsession">Enable support for the ifsession module</flag>
+ <flag name="ifversion">Enable support for the mod_ifversion module</flag>
+ <flag name="linguas_bg_BG">Language support for bg_BG</flag>
+ <flag name="linguas_fr_FR">Language support for fr_FR</flag>
+ <flag name="linguas_it_IT">Language support for it_IT</flag>
+ <flag name="linguas_ja_JP">Language support for ja_JP</flag>
+ <flag name="linguas_ru_RU">Language support for ru_RU</flag>
+ <flag name="log_forensic">Enable support for the mod_log_forensic module, log only suspicious actions.</flag>
+ <flag name="memcache">Enable support for the mod_memcache module, for using memcached servers</flag>
+ <flag name="msg">Enable support for the mod_msg module, allows system users to send messages to connected clients via the ftpdctl program.</flag>
+ <flag name="qos">Enable support for the mod_qos module</flag>
+ <flag name="ratio">Enable support for the mod_ratio module</flag>
+ <flag name="readme">Enable support for the mod_readme module</flag>
+ <flag name="rewrite">Enable support for the rewrite module</flag>
+ <flag name="shaper">Enable support for the mod_shaper module</flag>
+ <flag name="sftp">Enable support for the mod_sftp module and optionally mod_sftp_sql and mod_sftp_pam if matching USE flags are enabled</flag>
+ <flag name="sitemisc">Enable support for the sitemisc module</flag>
+ <flag name="softquota">Enable support for the quotatab module</flag>
+ <flag name="trace">Build with trace support. Should not be enabled on production servers</flag>
+ <flag name="unique_id">Enable support for the mod_unique_id module, every connection gets unique ID.</flag>
+ <flag name="vroot">Enable support for the virtual root module</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gssmod</remote-id>
+ <remote-id type="github">Castaglia/proftpd-mod_vroot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/proftpd/proftpd-1.3.5e.ebuild b/net-ftp/proftpd/proftpd-1.3.5e.ebuild
new file mode 100644
index 000000000000..ef4a85a80e16
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.5e.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib systemd
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.6"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
+ linguas_ru_RU linguas_zh_CN linguas_zh_TW log_forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp softquota sqlite ssl tcpd test trace unique_id vroot xinetd"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( virtual/mysql )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+ xinetd? ( virtual/inetd )"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+__prepare_module() {
+ local mod_name=$1
+ local mod_topdir=${WORKDIR}/${2:-${mod_name}}
+
+ mv "${mod_topdir}/${mod_name}.c" contrib || die
+ mv "${mod_topdir}/${mod_name}.html" doc/contrib || die
+ rm -r "${mod_topdir}" || die
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in
+
+ # Prepare external modules
+ use case && __prepare_module mod_case
+ if use clamav ; then
+ mv "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib
+ eapply "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ rm -r "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}
+ fi
+ use msg && __prepare_module mod_msg
+ use vroot && __prepare_module mod_vroot ${PN}-mod_vroot-${MOD_VROOT}
+
+ # Prepare external kerberos module
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" mod_auth_gss.c.in
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" configure{,.in}
+ fi
+ eapply_user
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ cd "${WORKDIR}"/mod_diskuse
+ econf
+ mv mod_diskuse.{c,h} "${S}"/contrib
+ mv mod_diskuse.html "${S}"/doc/contrib
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_diskuse
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+ econf
+ mv mod_{auth_gss,gss}.c "${S}"/contrib
+ mv mod_gss.h "${S}"/include
+ mv README.mod_{auth_gss,gss} "${S}"
+ mv mod_gss.html "${S}"/doc/contrib
+ mv rfc{1509,2228}.txt "${S}"/doc/rfc
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_gss-${MOD_GSS}
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log_forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique_id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable test tests) \
+ $(use_enable trace) \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+ fi
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+ if use doc ; then
+ dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+ docinto rfc
+ dodoc doc/rfc/*.txt
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
diff --git a/net-ftp/proftpd/proftpd-1.3.6.ebuild b/net-ftp/proftpd/proftpd-1.3.6.ebuild
new file mode 100644
index 000000000000..fffba1c6c266
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.6.ebuild
@@ -0,0 +1,258 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib systemd
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.6"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
+ linguas_ru_RU linguas_zh_CN linguas_zh_TW log_forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp softquota sqlite ssl tcpd test unique_id vroot xinetd"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( virtual/mysql )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+ xinetd? ( virtual/inetd )"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=("${FILESDIR}"/${PN}-1.3.6-use-trace.patch)
+
+RESTRICT=test # tests corrupt memory. need to be fixed upstream first
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.in} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log_forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique_id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable test tests) \
+ --enable-trace \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+ fi
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+ if use doc ; then
+ dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+ docinto rfc
+ dodoc doc/rfc/*.txt
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}