summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2013-04-20 16:51:04 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2013-04-20 16:51:04 +0000
commit40e427b09ef7c25f3af0d70fec95d6e55dde1415 (patch)
tree5b100336320154a90c6ad3d2a59d5059da14fc7e /net-ftp
parentnew rev for subslot dep operations (diff)
downloadhistorical-40e427b09ef7c25f3af0d70fec95d6e55dde1415.tar.gz
historical-40e427b09ef7c25f3af0d70fec95d6e55dde1415.tar.bz2
historical-40e427b09ef7c25f3af0d70fec95d6e55dde1415.zip
Revbump. Fixes #466340 and #450536
Package-Manager: portage-2.1.11.62/cvs/Linux x86_64 Manifest-Sign-Key: 0xC2BA7F3C!
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/vsftpd/ChangeLog11
-rw-r--r--net-ftp/vsftpd/Manifest37
-rw-r--r--net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch57
-rw-r--r--net-ftp/vsftpd/files/vsftpd-checkconfig.sh29
-rw-r--r--net-ftp/vsftpd/files/vsftpd.init32
-rw-r--r--net-ftp/vsftpd/files/vsftpd.service11
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild122
7 files changed, 255 insertions, 44 deletions
diff --git a/net-ftp/vsftpd/ChangeLog b/net-ftp/vsftpd/ChangeLog
index 3f588f6055f7..2d05d97d311d 100644
--- a/net-ftp/vsftpd/ChangeLog
+++ b/net-ftp/vsftpd/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-ftp/vsftpd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/ChangeLog,v 1.166 2013/03/17 15:44:15 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/ChangeLog,v 1.167 2013/04/20 16:51:02 hwoarang Exp $
+
+*vsftpd-3.0.2-r1 (20 Apr 2013)
+
+ 20 Apr 2013; Markos Chandras <hwoarang@gentoo.org> +vsftpd-3.0.2-r1.ebuild,
+ +files/vsftpd-3.0.2-remove-legacy-cap.patch, +files/vsftpd.service,
+ +files/vsftpd-checkconfig.sh, files/vsftpd.init:
+ Add systemd unit file. Bug #466340 thanks to Fabio Erculiani
+ <lxnay@gentoo.org>. Add patch to remove legacy capabilities by
+ Joakim Tjernlund <Joakim.Tjernlund@transmode.se>. Bug #450536
17 Mar 2013; Markos Chandras <hwoarang@gentoo.org> metadata.xml:
Add proxy-maintainers to metadata.xml
diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest
index 8b4347b56010..9c3aba98178c 100644
--- a/net-ftp/vsftpd/Manifest
+++ b/net-ftp/vsftpd/Manifest
@@ -9,9 +9,12 @@ AUX vsftpd-2.3.2-kerberos.patch 842 SHA256 d86bed62c0fd22372f4704a12d7f75ce42fc1
AUX vsftpd-2.3.5-gentoo.patch 8560 SHA256 227fc60234c002d756d6a4f0867b6f7cf63315cb53dda78a1ef62ea5ccc61bdd SHA512 dbe8a022b9dd4bfdf5c0138aa0ad13311d4a52e7671888fc2018992e7906c2aab53355d2ab24cc4e1f19c358a5202eb9965bf3ca9180d6b9d369d451c7c656b3 WHIRLPOOL 40aaeeab47b1775d3b035a91810bc8e67d573d2d51de886d80aa44c96ac92c21154a3e214faf6f7d890b8e18626cdd8e3b28df5b203df3817929c40aeb9400ec
AUX vsftpd-3.0.0-Makefile.patch 1093 SHA256 e654f707a4c1da2433b28e35a05e1dd92fee35f4582e458e64066f30b75db7de SHA512 66217e5be8e5a7b819c0a38ee8ac9e84ea5937c7285843d1de5b8361211ea86816551b440bf9d5c89c9f874e867c9f50590a2e8a50dbd313fcde1d5d4ea6ab4e WHIRLPOOL 1b031f17fd4176e1d42f2b955b7656d2d281db46fc768f52063e009028224e20dc50b82f93f8c21842cffad82cba3492dfd8ff740ec72d3ad07caad825be73b0
AUX vsftpd-3.0.2-alpha.patch 525 SHA256 e544547b4f665e40e5a55e411946e37c2493dfe0391ba9ef6760ba889f7a9c98 SHA512 5d9639bf7fa08bfce5cbbc79c59445e099c42adec6dc1a3e14e6a9586c53a082e0c712625a3de62418fd0f0bd253b6b673a700157be07ab114770707739a6c38 WHIRLPOOL c08ddd9fb7aa60c4e1a84a95c3f390cff279d060c6d63464b5defbf4aa9765bf35c717506cb404cc937d4b6b7307d63ed906c796e4409ff7d5494fc2c1ee3b85
+AUX vsftpd-3.0.2-remove-legacy-cap.patch 1739 SHA256 c18a5b1092d07c5ff5380553345d4cdf06e0b8968cf90499d3dd1751f889a438 SHA512 b0c2b91f0ba3b73706c352ac391e35b048b544fbab1ab3cd223be7f5ca33516143a775456871ded354a05bf74f0403436f4659d06ae9345e8d6a6d1b21addd42 WHIRLPOOL 253453c1696cfe1e5330055410d5e7e080f0c27ea8ba2158e5667f692067f73c070b8bd7ed56d7aa77c2dcadbe10f62442f31ceef4a7cfdcf8578895525c84d1
+AUX vsftpd-checkconfig.sh 785 SHA256 2de7c7c1edfe3ae0480e22d988a564db3bb873050929ebb6e8361d7a1288ddda SHA512 541702557231c79413ae77cf26c28398fea3cb332375f8d22e0c0a45706b04db954d268addd76fecbb8b0ab3109f1009c18b0599394ed33c4a6fc8dc647d889e WHIRLPOOL ac2d38c646a440edc093f8458cc2395c6da465d9719c10464ded9cba2c480b9398f8ece2d25920d10893dca0fc16ba8b3a583c55724f5a5b5de46eab671bab63
AUX vsftpd.conf 3842 SHA256 08b680a8531ecc8ccd9bf7cd91dc2de0a49105803a6d8fdcbe0f0dd47de8f6e0 SHA512 ab6c74a22eb30e504efca095ecb0675e058bd4290e4cd926433d011ec8423a33bc1da4d25d4de295e6ab8f001e1d4b3da03340b1b279fdc95461d393ab4f64d8 WHIRLPOOL 00ab13614d97e52c2b0e88587feb7276991090a0e94244695420dd87993fb25d30ea461bc4fc3770a38043cb09b3a714ddfc869c98d29033a61740018acbdf9a
-AUX vsftpd.init 1922 SHA256 78941ea7744d65d4674b4df8ecee6df91e6ed601c47d64ce1f489af56ea250e2 SHA512 c652b6fc4b56810b7163fefa5e9e00cdb935d14034ab59d7bddc825675ab9de618f7cc3020a12ceb2d5b9d4344edcfaa9ad51a94fcf61ce8d3906be159e083de WHIRLPOOL dfa9c7f9650f91abbc510301c5bfebf02e5bd4c54e95580f575cacf4ecba2fa2d6d39a050e86fd8247dc8586da8ef53039419b54d45f9f71cfe9a670b853127d
+AUX vsftpd.init 1261 SHA256 e6cf3df546aae57bb10e2b4282a9ccd79741473ef9dbdbd7628a16c84622da06 SHA512 5270ed8dc2f7a0063b122cb694a6d72c97dbdb2be95d568577666792d237edc193cb9511637eac422a5269100c05d9c4f91102107ceb0cadbf960ba7af4c57b1 WHIRLPOOL 9099e4d3bc20e51e6aa66bece73cc5373f7f083d173483b7872f49776d2d6204a334850434cd349570f76d57ec6c004b1db872820cd1a8d13f239ca423f24802
AUX vsftpd.logrotate 53 SHA256 b31f4db8e2f8640f83bc38d83444ab784f8fc9a6492f654bb4149e1f566da2f3 SHA512 6b0d718ffdc0b6a68d5092b36a03106d2c4e4fa6873a178c85345acfb3847ef839a475eadb56171d79ec243ae2bf8725cae0ae486b182afe065b181f87c831c5 WHIRLPOOL e155b30b59319cc5dac69c7446273ab20b4e56f696cce6ab8c83c3310529e0da70969edefaf94c912f121d3df526368ad9aafd291c6cf2f6a9b2d7b69d88b0aa
+AUX vsftpd.service 218 SHA256 5c93a836c0be34d785197ba01541b6cd9db6f8992c4ea081c07a6111cc98290d SHA512 f032f64ed5fab15b1c9543579090cdca007d0a759073e7c4aa0f0ef0f852f6787610f776ce63d0d922ccfbadd480df81ed9a62e6e0f399327d770f9b70c34df9 WHIRLPOOL c91aabb3b89dc3faa002cd998329d44677f756ee2901492324e37b3f7dbcc29b83c53032891ef1d802ea70d01b060f091970c20a06b36d2cae9358269df6f4e4
AUX vsftpd.xinetd 432 SHA256 4e68c12108509823c74cd66f833299def48f497a4d660624362d3b4990af828f SHA512 f5c232345c06a7f3a7b32ff0281c386e6956e1b91d0331436bf8eb39e479ad1e37335424c35f22f12fb70416caa1f6a317b03e701caa4e0499acd556db64e909 WHIRLPOOL 7ffd1ede197d387e38ffa6e584c86be2fc35c4938b75ebd793daff562f6e99e95aaf0c5e58ee0a74a76686115e5e32e19dd5b27d8a64dd255de1ad7aae74d5fc
DIST vsftpd-2.2.2.tar.gz 185562 SHA256 05665dfa43a268e6fe422b89f6c3cb1a63e4e989b456922508f3f89d4b276eab
DIST vsftpd-2.3.2.tar.gz 187229 SHA256 a4e04836d8e271f361030e6a679ad001046c3e37f59e9fee5114189f9e065336
@@ -25,25 +28,27 @@ EBUILD vsftpd-2.3.2.ebuild 3128 SHA256 c0241d0f25dff6ecfb4b4d47152a7ff62be23fad6
EBUILD vsftpd-2.3.4.ebuild 3282 SHA256 b2d6073e8a200c103d506018550f4b9e195b6468c0b1d9d7f49996c1ab75b8da SHA512 8551a76651898cfde32600e236807f51708c5bea7de7d84eb7ce8934a5671dc427d571cc0477071138bc2eb2ca0b998dc9a4f16c85058d918ae445ec9b085906 WHIRLPOOL 8cbf90f59e2311f3756188b0e0ec5b403459897262955ea36a5725956dd621119e2996e610b48a22521962859613248be589ae2924a12bcae651c2c8e8b825ca
EBUILD vsftpd-2.3.5.ebuild 3116 SHA256 3d93968516e12ca228f6138eed946d23f9e8890f2cf3750fcd3ea95bda35391b SHA512 792ed9806b4414435ab7082cc3cbab037e394e8dcc8119fe7b73e241babaf6d6f46129dcabc25d2cce97b74b89a1230f145dea0f2fc0909c9fcc0ba2a5610591 WHIRLPOOL 1730280995a9b9ea602803fc10f1f9326a7cecd52aa4eda9a8f63300d64ef25bbd9b085103afdaa4409f18fe02c1c9c58e6b7c8c7557ad2e181707284725080e
EBUILD vsftpd-3.0.0.ebuild 3102 SHA256 e82828dd9a0854cd2434101789997cdf46b6841c367c6cd789c893c77cef385c SHA512 fb26ef56475cb9ff8f0539fb4d7616e613961e7371b4e85cb9248718dd35b9cfd0eaf10a7ff864e54ffcab133d5b24c9798bb4934a985d832d6b5d8419c967ca WHIRLPOOL dff1207ff085fe21dfff30d7eca9ec50cdb65949e0f87de0d529dc592bd8b50002afb5b393ab64e09f92d6be472f84ee07fd1efca479c902775e32ee142c7f1a
+EBUILD vsftpd-3.0.2-r1.ebuild 3391 SHA256 67fe25e1d0627b84b5a47d859bee8ec323531b87e8b806d82eeffce58430f598 SHA512 ad0a9d06b2fbfc145f042d95c2af6cc84470e5616ca7b6dffe7d5ef41827f66c98630c56363b9768b5bc6522e91509b6058535481f35a5f5726cbbd48aa2b25b WHIRLPOOL 647418cf0f295e4bd2bf22556a6dae710bf8876d4f598b83e0a8b9be659f9ba39b595e523f76ec525b222ab677c33feb87facacad38a7d0d4421731d5124d62f
EBUILD vsftpd-3.0.2.ebuild 3193 SHA256 799536b5b4ed3d7c473f07e8e976074013b2aef0ef8a544770fff36ee52fe05c SHA512 3d00ef7f8f802746d5fa286517be852b4e533bb282c6d327f1989197c3e27fcfbccd87c30c3e57d3be36c1b0bb673660b019ada37d966c0c8a7b8bf0818e36af WHIRLPOOL cf7835f72a747b22e288e85d12fd147581d3f6efdd5b1a35424cdaa944d448531bf26058a3019dbd7c1c795babdde5d881057c1a81cc03ecbbb50298fc3d51a7
-MISC ChangeLog 23401 SHA256 9acf04bbd680ca1e90476b1932dede3d62df8c24d3edbaab4c3a01cb614f2135 SHA512 d3a996d801bf93898a1b6a4a4168f08116ab0dd84ea91cb347f74bcff92b75238f24e8b01dfba384d625b94853ae9ca2e2e136c14b26d81089bff8d0690beb2c WHIRLPOOL 0bb8ef8f7823f523669e2dbc1ed4df31f8307c3a7a1b24de71dae07208bc1c8b8e32a96748cbeb92e5e4d066a43eeb4838ef0c045ed8bc284ed07676fc862c59
+MISC ChangeLog 23825 SHA256 f0e77fa0fefe8c29f419164cb095622509c49db3c20f54d7fac8c6442e92a1b1 SHA512 aeb0d890d3498320c7ae0ee2e28b3ae8219cfb60eb920549704a1b9662cb259be7a6ec6a1c78676eaaad1b49112b6ea22a7e308250d2f7035b13fe297c78e179 WHIRLPOOL 67bf812702e5e9a6e5ba1277698c6b85a3443d52751e9f846df288e5cbea9ee83ccf3c8274bc6fb79962bb43398ab06d1758a8636ef231d8f1207befc1547321
MISC metadata.xml 664 SHA256 769529e78a4d3270ae5c627e09783ffd6e122e24c5e931317d0832b6273ee586 SHA512 84392c28c30904caba637a5f90fc73512f028f706f5a805c1181a9fc63b93e9794dc17ade2016d969796b32c6ab6b8530f549298b099ae67c65d03a62d64955b WHIRLPOOL a4690e0bf4b66e94d072b0f6d0297da7fd208277b3302862087f2d274438167c97f2a33a6ad43e76fea2f754190e2b40cfc6a7d7ee562538ef6c479d08f36d0c
+MISC vsftpd-3.0.2-r1.ebuild.orig 3259 SHA256 edd88cb238accb37281299b5e9fc9ec59122a8b0260afd12e2eeae3a84f69e28 SHA512 de14157a52a510da140c34be08c2aef56c30cd027ac50dd3420423e754dc30c1e5db7d70c12b9c752a593279d61c1112b590b7b469d19e2adcbd94b75f90b4aa WHIRLPOOL 050d3054a4ecd48e6e3308bc07bf8abefd6c07949f9c80a15c1d0a845f69e0965edb71bc32b2fd36e80ef324d682a739874c5f1e910543b7db2342464c3375c7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQJ8BAEBCABmBQJRReTQXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+iQJ8BAEBCABmBQJRcsd2XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNTVDNDczOUYzRjJEMTRGNDRGMzU2RkMw
-OUJGNEY1NEMyQkE3RjNDAAoJEAm/T1TCun88YCkP/0R3MlX/VeJBGN16xcYHYJQ4
-FqhkNPL4yeyy9MQmqyn3FqZ41yQq/h6rnABb25HTR0t+KfQqFZJNve91CHHGGbBI
-3DnWcQTIW2w3SrTg/wRrednREJ+hSZ6Jj9fxjICk66ARvE6Ab279lKU5J2stwWHu
-Y7xNmqPECewpqtX4LO+vcQopAqHTUsFoly/NRVf5Jagv3XGpaywPlxd29/U3nP33
-nxTIYg7n07+KtDfa12YwwGJ0kX6RSN/r9bco1m1vKknz7TkLC8/JBOhY01gca+QH
-tAHOlZ0VJSlfohPJR5ymOm9zTH9uN6xHdpNTvrkN+9lHPiMNetDbuZ+tXLklCI9G
-lYHU4ISvb9FLfutF4iXDbJFAOyzxLXmGYHSMN3GXO1WGldpWu06bvC3qcKPhdjyA
-B7MLmyorrTqn+c5PVCktFQ2RgAsWSpmYbBbIRF+1HSQ5/4koJdQ1eexor09G9F3p
-PVnwmb5ECz6P/j+8v/+cg81YDiJbSU8ATwgh6Dz6fFnVGAgSWC65aK/5/NdWz5WI
-JtBjFRbhI9cFoxJvJ6plKCtyFTu2dk7E8VOi2ywEYIl8vyrYWtG3h59U2eQl3UhN
-LUgWfieAzWi6TvRdIDox5li6zLKT2uYR8r96G8dYEXj51PcB2s5HdgoC8RV+x8+M
-LWcyyHDRJdLItJVcaaSk
-=UCGh
+OUJGNEY1NEMyQkE3RjNDAAoJEAm/T1TCun88f9YP/382cyLXi4OmBvyRp9IT4No8
+5TrQABKCkiekdqjcmzuy4XBNDtt2M21NznSRgnztnImxAF0TwMWtXRmWjnwObKV8
+3ine3YlupZS4yDxM23zyddF13faGIcUJGWBQGX7XvINHlf35j3UmgpW2PCyLOw6Y
+Ee38V1rqEqzDt1bRysmiHXCz8HGvJElkHDOk5uqEp1irvqweh6Cze06AxkETZMLP
+kdJefm3uLaxGdmfpZJ8neeUPvA215dY/u3/kwOXjnWZMo8ruO+EAXXLXdmZZDrOt
+QJ8vEOxV9Q8WfZnYrj2/MBVvoUOXewxu4hjY5jsjbPtt7P6Qo5ZFxVyQ+lCCiu7O
+eJnagX12w5Mfob4pXZssa0Xn8AxTyZiIWBxoXxA1FfXleeldkCemc4iBe++3D/OU
+UfZy/M6CyB3Z/KdiegHv+l0Cw/H/g0ZsAEyt05krx7vClLny1h3a1osNMvNDLknQ
+7TSKh5zI6oWW1QcNze94kEsyHR7RgW8lBZoWHcV4q6RIyD9nY5i6ckTrMFsGfYXZ
+kKNXYwVuChjkJ8h5oMoTG0Q7mjUNf/CToAe65SVavxKH2lhbHCK6JZM1fN/OZIJ1
+WdyyBa9L6quKEUjK9XLZTp1vazUoSWJWsINYrWcWehG8C5dvgRjDXsOHcSuMHMue
+u8GVk7AzOSEqmA0nKzYY
+=NkU0
-----END PGP SIGNATURE-----
diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch b/net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch
new file mode 100644
index 000000000000..2401f37c7e88
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/show_bug.cgi?id=450536
+Patch by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+
+Probe the preferred version
+--- vsftpd-3.0.2/sysdeputil.c.org 2013-01-05 18:32:13.241288839 +0100
++++ vsftpd-3.0.2/sysdeputil.c 2013-01-05 19:41:53.038148078 +0100
+@@ -561,11 +561,17 @@
+ }
+
+ #ifndef VSF_SYSDEP_HAVE_LIBCAP
++static struct __user_cap_header_struct sys_cap_head;
+ static int
+ do_checkcap(void)
+ {
++ int retval;
++
++ /* Store preferred version in sys_cap_head */
++ vsf_sysutil_memclr(&sys_cap_head, sizeof(sys_cap_head));
+ /* EFAULT (EINVAL if page 0 mapped) vs. ENOSYS */
+- int retval = capset(0, 0);
++ retval = capset(&sys_cap_head, 0);
++
+ if (!vsf_sysutil_retval_is_error(retval) ||
+ vsf_sysutil_get_error() != kVSFSysUtilErrNOSYS)
+ {
+@@ -579,17 +585,13 @@
+ {
+ /* n.b. yes I know I should be using libcap!! */
+ int retval;
+- struct __user_cap_header_struct cap_head;
+- struct __user_cap_data_struct cap_data;
++ struct __user_cap_data_struct cap_data[2];
+ __u32 cap_mask = 0;
+ if (!caps)
+ {
+ bug("asked to adopt no capabilities");
+ }
+- vsf_sysutil_memclr(&cap_head, sizeof(cap_head));
+ vsf_sysutil_memclr(&cap_data, sizeof(cap_data));
+- cap_head.version = _LINUX_CAPABILITY_VERSION;
+- cap_head.pid = 0;
+ if (caps & kCapabilityCAP_CHOWN)
+ {
+ cap_mask |= (1 << CAP_CHOWN);
+@@ -598,9 +600,9 @@
+ {
+ cap_mask |= (1 << CAP_NET_BIND_SERVICE);
+ }
+- cap_data.effective = cap_data.permitted = cap_mask;
+- cap_data.inheritable = 0;
+- retval = capset(&cap_head, &cap_data);
++ cap_data[0].effective = cap_data[0].permitted = cap_mask;
++ cap_data[0].inheritable = 0;
++ retval = capset(&sys_cap_head, &cap_data[0]);
+ if (retval != 0)
+ {
+ die("capset");
diff --git a/net-ftp/vsftpd/files/vsftpd-checkconfig.sh b/net-ftp/vsftpd/files/vsftpd-checkconfig.sh
new file mode 100644
index 000000000000..e1d1e5231b67
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-checkconfig.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+VSFTPD_CONF="${VSFTPD_CONF:-/etc/vsftpd/vsftpd.conf}"
+
+if [ ! -e ${VSFTPD_CONF} ] ; then
+ echo "Please setup ${VSFTPD_CONF} before starting vsftpd" >&2
+ echo "There are sample configurations in /usr/share/doc/vsftpd" >&2
+ exit 1
+fi
+
+if egrep -iq "^ *background *= *yes" "${VSFTPD_CONF}" ; then
+ echo "${VSFTPD_CONF} must not set background=YES" >&2
+ exit 1
+fi
+
+has_ip=false has_ipv6=false ip_error=true
+egrep -iq "^ *listen *= *yes" "${VSFTPD_CONF}" && has_ip=true
+egrep -iq "^ *listen_ipv6 *= *yes" "${VSFTPD_CONF}" && has_ipv6=true
+if ${has_ip} && ! ${has_ipv6} ; then
+ ip_error=false
+elif ! ${has_ip} && ${has_ipv6} ; then
+ ip_error=false
+fi
+if ${ip_error} ; then
+ echo "${VSFTPD_CONF} must contain listen=YES or listen_ipv6=YES" >&2
+ echo "but not both" >&2
+ exit 1
+fi
+
diff --git a/net-ftp/vsftpd/files/vsftpd.init b/net-ftp/vsftpd/files/vsftpd.init
index e486e1fc0863..1650da1b325c 100644
--- a/net-ftp/vsftpd/files/vsftpd.init
+++ b/net-ftp/vsftpd/files/vsftpd.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 2003-2004 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v 1.7 2008/12/26 16:50:15 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.init,v 1.8 2013/04/20 16:51:02 hwoarang Exp $
VSFTPD_NAME=${SVCNAME##*.}
if [ -n "${VSFTPD_NAME}" -a "${SVCNAME}" != "vsftpd" ]; then
@@ -20,30 +20,8 @@ depend() {
}
checkconfig() {
- if [ ! -e ${VSFTPD_CONF} ] ; then
- eerror "Please setup ${VSFTPD_CONF} before starting vsftpd"
- eerror "There are sample configurations in /usr/share/doc/vsftpd"
- return 1
- fi
-
- if egrep -iq "^ *background *= *yes" "${VSFTPD_CONF}" ; then
- eerror "${VSFTPD_CONF} must not set background=YES"
- return 1
- fi
-
- local has_ip=false has_ipv6=false ip_error=true
- egrep -iq "^ *listen *= *yes" "${VSFTPD_CONF}" && has_ip=true
- egrep -iq "^ *listen_ipv6 *= *yes" "${VSFTPD_CONF}" && has_ipv6=true
- if ${has_ip} && ! ${has_ipv6} ; then
- ip_error=false
- elif ! ${has_ip} && ${has_ipv6} ; then
- ip_error=false
- fi
- if ${ip_error} ; then
- eerror "${VSFTPD_CONF} must contain listen=YES or listen_ipv6=YES"
- eerror "but not both"
- return 1
- fi
+ VSFTPD_CONF="${VSFTPD_CONF}" \
+ /usr/libexec/vsftpd-checkconfig.sh || return 1
}
start() {
@@ -58,7 +36,7 @@ start() {
stop() {
ebegin "Stopping ${SVCNAME}"
if [ -f ${VSFTPD_PID} ]; then
- start-stop-daemon --stop --pidfile ${VSFTPD_PID}
+ start-stop-daemon --stop --pidfile ${VSFTPD_PID}
else
ewarn "Couldn't found ${VSFTPD_PID} trying to stop over the process name ${SVCNAME}"
start-stop-daemon --stop --name ${SVCNAME}
diff --git a/net-ftp/vsftpd/files/vsftpd.service b/net-ftp/vsftpd/files/vsftpd.service
new file mode 100644
index 000000000000..1445f2769861
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Vsftpd ftp daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/libexec/vsftpd-checkconfig.sh
+ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild b/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..102fccfab67d
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild,v 1.1 2013/04/20 16:51:02 hwoarang Exp $
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Fix building on alpha. Bug #405829
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+
+ #Bug #335977
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch
+
+ #Bug #450536
+ epatch "${FILESDIR}"/${P}-remove-legacy-cap.patch
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ emake
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}