summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2012-01-08 14:11:40 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2012-01-08 14:11:40 +0000
commit0fce35bacd95c355f712951b35def140ed761742 (patch)
tree4e5484d153c37dfccb5de5fc134dfc578153af05 /net-ftp
parentBump to 6.5.1.2 and remove 6.4.2 which had a critical problem (diff)
downloadhistorical-0fce35bacd95c355f712951b35def140ed761742.tar.gz
historical-0fce35bacd95c355f712951b35def140ed761742.tar.bz2
historical-0fce35bacd95c355f712951b35def140ed761742.zip
Version bump. EAPI4 patch thanks to Agostino Sarubbo (ago@gentoo.org). Bug #390183
Package-Manager: portage-2.2.0_alpha82/cvs/Linux x86_64
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/vsftpd/ChangeLog11
-rw-r--r--net-ftp/vsftpd/Manifest25
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch207
-rw-r--r--net-ftp/vsftpd/vsftpd-2.3.5.ebuild112
4 files changed, 347 insertions, 8 deletions
diff --git a/net-ftp/vsftpd/ChangeLog b/net-ftp/vsftpd/ChangeLog
index 90cc0dd07a19..0b76f865d0d3 100644
--- a/net-ftp/vsftpd/ChangeLog
+++ b/net-ftp/vsftpd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-ftp/vsftpd
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/ChangeLog,v 1.144 2011/05/18 15:25:43 jer Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/ChangeLog,v 1.145 2012/01/08 14:11:40 hwoarang Exp $
+
+*vsftpd-2.3.5 (08 Jan 2012)
+
+ 08 Jan 2012; Markos Chandras <hwoarang@gentoo.org>
+ +files/vsftpd-2.3.5-gentoo.patch, +vsftpd-2.3.5.ebuild:
+ Version bump. EAPI4 patch thanks to Agostino Sarubbo (ago@gentoo.org). Bug
+ #390183
18 May 2011; Jeroen Roovers <jer@gentoo.org> vsftpd-2.3.4.ebuild:
Marked ~hppa too.
diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest
index 4a0620c5acda..b99c27a023ca 100644
--- a/net-ftp/vsftpd/Manifest
+++ b/net-ftp/vsftpd/Manifest
@@ -1,11 +1,12 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA512
AUX vsftpd-2.1.0-caps.patch 575 RMD160 a7b27df472ccbb5068d5f9961fe6bb010063e98c SHA1 f98d3cfbc1eb68f6e852cf9cbf5ad80407be5557 SHA256 4888021a25625041746b91025af0c2a2cb1fde758eda1d6c94098d4de0c1e370
AUX vsftpd-2.2.0-dont-link-caps.patch 806 RMD160 670bfa8433ea5c9769d238aaebb9fce1d43e9e40 SHA1 d28260190d4613dae798d0f09d267be1ffcbc0a7 SHA256 fd164d4702ae866cb06ad245653b4f25c73d1d701a211b1f972b45b98ab55dd2
AUX vsftpd-2.2.0-gentoo.patch 11049 RMD160 ef4fafea61a4ecf37d771f2da75bb10570dec898 SHA1 8846603f85f9515a154cfd8c1823c3e2e4e7e0e9 SHA256 e1737c941837aaf8e060a649903934174528704feffd100f86180a7ec68f3760
AUX vsftpd-2.3.2-as-needed.patch 423 RMD160 36b79388cd7f7c6e7e9f8b4903622f4a1fa48762 SHA1 5e33ee6613715f84fa67e6bd09aec1be13aac95c SHA256 ad393655b30887294dfcf46fe63ea24e3339f027a84fe7de03364500829496d9
AUX vsftpd-2.3.2-kerberos.patch 842 RMD160 01a77e587615e4367f2740ea52631fd115c8ea0a SHA1 ff1ef2088b960a77051b4cf83491f1c4ce70c621 SHA256 d86bed62c0fd22372f4704a12d7f75ce42fc15765ceec802b4b0c5680bc9c200
+AUX vsftpd-2.3.5-gentoo.patch 8560 RMD160 07841f0be22c955dab0ebb884a589362ca5712c3 SHA1 86e2ac8e7a66e13e6934d9b43db71f1e959e471c SHA256 227fc60234c002d756d6a4f0867b6f7cf63315cb53dda78a1ef62ea5ccc61bdd
AUX vsftpd.conf 3842 RMD160 2b0971c60f2ae2f9d3136849dff4dcf8ce117d41 SHA1 ebd5847bb328d8df188d85ffc5ccd7fcd5983525 SHA256 08b680a8531ecc8ccd9bf7cd91dc2de0a49105803a6d8fdcbe0f0dd47de8f6e0
AUX vsftpd.init 1922 RMD160 50925ca15a4f94662790244546454c523b6e4f95 SHA1 ef453f4925e941e21075be678387076e57246b3d SHA256 78941ea7744d65d4674b4df8ecee6df91e6ed601c47d64ce1f489af56ea250e2
AUX vsftpd.logrotate 53 RMD160 0fba0639da0d827fc0decfcf9ccd34fc7ad23c68 SHA1 cf18de9f84ad9a44974a7ae0f29562e9a516d5f9 SHA256 b31f4db8e2f8640f83bc38d83444ab784f8fc9a6492f654bb4149e1f566da2f3
@@ -13,16 +14,28 @@ AUX vsftpd.xinetd 432 RMD160 6e2b2d0517d0bf8a2a9d7ce42ca2ea4ce73fbca2 SHA1 5325e
DIST vsftpd-2.2.2.tar.gz 185562 RMD160 2703291a9ce76f68cc8ef82f04cb28c471946f53 SHA1 43976c6dbffe8e4bdc5f4add73a0c1431662a6c6 SHA256 05665dfa43a268e6fe422b89f6c3cb1a63e4e989b456922508f3f89d4b276eab
DIST vsftpd-2.3.2.tar.gz 187229 RMD160 27bdc9d3065390a9dc85b3ef5926ad16d3544d2d SHA1 d525974514ecf61cbbf9cb51066aa68d5a52033b SHA256 a4e04836d8e271f361030e6a679ad001046c3e37f59e9fee5114189f9e065336
DIST vsftpd-2.3.4.tar.gz 187043 RMD160 4097b495b5b03833e18b1639931939c3176e498b SHA1 b774cc6b4c50e20f4fe9ca7f6aa74169ce7fe5ea SHA256 b466edf96437afa2b2bea6981d4ab8b0204b83ca0a2ac94bef6b62b42cc71a5a
+DIST vsftpd-2.3.5.tar.gz 187691 RMD160 bc5793f4a65a166b3f08cb7647a19abb391e8dce SHA1 f15b39ba6d68c953ab3c3e613e6ddc2a26493755 SHA256 d87ee2987df8f03e1dbe294905f7907b2798deb89c67ca965f6e2f60879e54f1
EBUILD vsftpd-2.2.2.ebuild 2900 RMD160 2eacd78fe47174ef7689485b097375ddf304953f SHA1 ebd0cc1cfd7c54564752005c623e6832b91953d2 SHA256 d1fe9acd8219e8284f4de9153f526e3c12cb91d73bdfe156c67d52fcf9ea9fc1
EBUILD vsftpd-2.3.2-r1.ebuild 3277 RMD160 d01c9267e92173719ba434809a74cdf1818c2e6a SHA1 2dda8f3428e2e8d6af664617b9477a51592ccf9c SHA256 e6ec48ecec6e99ef2689bd24b1b702813e510bdf32d651ff82211c6fedcfce99
EBUILD vsftpd-2.3.2.ebuild 3132 RMD160 f6788a86d59e82998f52d9b084693addac5b537e SHA1 b545a3ad50aa82f934e3d3f7111602d8debe6d99 SHA256 d4c2b375812e0c36887e05880fdfc5bce26518290312f47449cd1b96434a6d02
EBUILD vsftpd-2.3.4.ebuild 3287 RMD160 f151e69257e3df6314c21e53062b09524d9377ce SHA1 9d013c4693d4e6fbc8d776baa5e95efc9da531d0 SHA256 f154bbf24ecf8b4aca4c2c3c13b76dd6a0a89b581515be85687b6e85f24582ae
-MISC ChangeLog 20445 RMD160 e56f8fc308410f024d847d60d3ac44de9e54ec6d SHA1 7d6cd122ae4bdebc311090533fe4ad2faed32f8c SHA256 a4c3a00512ee138bf2111ce54ba2eee63de6244fb18fd73331fb42c92f286ac4
+EBUILD vsftpd-2.3.5.ebuild 3134 RMD160 bc19856961def689fc3e95652269179919227f6f SHA1 bc4d42e2ea4b1317403670c2d6b6cbe629e32660 SHA256 d6ccf8dd383c95e9591cbf17acb7c86f83cf9a90c250db1f0d3a694a631f5889
+MISC ChangeLog 20678 RMD160 f90290cd2287f078300c1a74a564bfc50deea742 SHA1 627baa749f9b41d4f087120f96804e14e2c0ba6a SHA256 8517bd620b0986c0d716825ce877802a5fd39b0cec3662d07ffe3b0f51da3162
MISC metadata.xml 724 RMD160 e0592272500a06dbd5bfa5d6f7e379a5390a2d02 SHA1 0292de42362025b58ea73c06513f35ff0a4eb56d SHA256 a718c41114032e6e27f6168b40e3ab324b9b17e3436e32a50caecb45ef7f59b4
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
-iEYEARECAAYFAk3T5P0ACgkQVWmRsqeSphNnhwCeMe7LBZXKFC5TgNQ2bGqsWwX0
-HMMAnil2fFvGdUMf75aWxIWd+cPhtqzA
-=XNnM
+iQIcBAEBCgAGBQJPCbHtAAoJEPqDWhW0r/LCqjIP/A9H5suyVliQFcBfosr8pHWW
+DvBiOjU0eMCoR6Ghl8ruBq2cH6hme/vaJTipOZz8G1NpgfjKhDxzNfSnEmrZNuK6
+JI8CrsEic0agLVx0TXXpbYYcJT2c6FtKQK4itXgpjO1T7CYixsDZBPIqw2v39Sd7
+M4UHNNAXClbj/0I0q11CnVaGSqZAK1M8QtT/On4wihob3uEX6QYfT4xhTi4rJLNo
+Eiq+qyZPtWWNekBZxUW3KxhiB2jOUW844yqPQh/V4kZYnF7z9TZqJxuSjrqqfZUG
+0ol0T0uklxcfq3zURzzJrb94q2qkWxrfkFLEZbykJbnQgDiQqDYHhNXRwdGIzszb
+OO6eqUTKQ9Q+UViQPfQpeyowsTU3HkDuOIt8ynLIENSViYdmcAyat9yVEIjs0YA0
+HBmTYPe8qAhfxB5UOgqg+cS509q/2lBq99Me5FDTk0NzNTHm0t/0sZYkMSCFtXFD
+Gw6VXH+Ih004gfdiuoVlnzaoMpJjeIT3fmE1bqBglmYZX0YaoNjKjUzdRWEhjks7
+rFCYjMxHMegZj42VKiZLkjzl1dIbsd/PcbMjJgG3vgYd6IynYPKmHXkK2q/Yga0H
+JF6lXUW9JxJ6wZP1RB91lZdY3+AfiV0zywu7ba1Gr8UbKYvkMFKXCoHrPfJBBFkS
++/WLvH3N2tpYZalVkz6v
+=6WQN
-----END PGP SIGNATURE-----
diff --git a/net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch b/net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch
new file mode 100644
index 000000000000..7f1af4beb8c7
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch
@@ -0,0 +1,207 @@
+Index: vsftpd-2.3.5/defs.h
+===================================================================
+--- vsftpd-2.3.5.orig/defs.h
++++ vsftpd-2.3.5/defs.h
+@@ -1,7 +1,7 @@
+ #ifndef VSF_DEFS_H
+ #define VSF_DEFS_H
+
+-#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf"
++#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf"
+
+ #define VSFTP_COMMAND_FD 0
+
+Index: vsftpd-2.3.5/tunables.c
+===================================================================
+--- vsftpd-2.3.5.orig/tunables.c
++++ vsftpd-2.3.5/tunables.c
+@@ -250,7 +250,7 @@ tunables_load_defaults()
+ /* -rw------- */
+ tunable_chown_upload_mode = 0600;
+
+- install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir);
++ install_str_setting("/usr/share/vsftpd/empty", &tunable_secure_chroot_dir);
+ install_str_setting("ftp", &tunable_ftp_username);
+ install_str_setting("root", &tunable_chown_username);
+ install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
+@@ -258,11 +258,11 @@ tunables_load_defaults()
+ install_str_setting(".message", &tunable_message_file);
+ install_str_setting("nobody", &tunable_nopriv_user);
+ install_str_setting(0, &tunable_ftpd_banner);
+- install_str_setting("/etc/vsftpd.banned_emails", &tunable_banned_email_file);
+- install_str_setting("/etc/vsftpd.chroot_list", &tunable_chroot_list_file);
++ install_str_setting("/etc/vsftpd/vsftpd.banned_emails", &tunable_banned_email_file);
++ install_str_setting("/etc/vsftpd/vsftpd.chroot_list", &tunable_chroot_list_file);
+ install_str_setting("ftp", &tunable_pam_service_name);
+ install_str_setting("ftp", &tunable_guest_username);
+- install_str_setting("/etc/vsftpd.user_list", &tunable_userlist_file);
++ install_str_setting("/etc/vsftpd/vsftpd.user_list", &tunable_userlist_file);
+ install_str_setting(0, &tunable_anon_root);
+ install_str_setting(0, &tunable_local_root);
+ install_str_setting(0, &tunable_banner_file);
+@@ -275,7 +275,7 @@ tunables_load_defaults()
+ install_str_setting(0, &tunable_hide_file);
+ install_str_setting(0, &tunable_deny_file);
+ install_str_setting(0, &tunable_user_sub_token);
+- install_str_setting("/etc/vsftpd.email_passwords",
++ install_str_setting("/etc/vsftpd/vsftpd.email_passwords",
+ &tunable_email_password_file);
+ install_str_setting("/usr/share/ssl/certs/vsftpd.pem",
+ &tunable_rsa_cert_file);
+Index: vsftpd-2.3.5/vsftpd.8
+===================================================================
+--- vsftpd-2.3.5.orig/vsftpd.8
++++ vsftpd-2.3.5/vsftpd.8
+@@ -21,7 +21,7 @@ itself will listen on the network. This
+ recommended. It is activated by setting
+ .Pa listen=YES
+ in
+-.Pa /etc/vsftpd.conf .
++.Pa /etc/vsftpd/vsftpd.conf .
+ Direct execution of the
+ .Nm vsftpd
+ binary will then launch the FTP service ready for immediate client connections.
+@@ -33,7 +33,7 @@ as root. Any command line option not sta
+ as a config file that will be loaded. Note that config files are loaded in the
+ strict order that they are encountered on the command line.
+ If no config files are specified, the default configuration file of
+-.Pa /etc/vsftpd.conf
++.Pa /etc/vsftpd/vsftpd.conf
+ will be loaded, after all other command line options are processed.
+ .Pp
+ Supported options are:
+@@ -47,14 +47,14 @@ their appearance on the command line, in
+ config files.
+ .El
+ .Sh EXAMPLES
+-vsftpd -olisten=NO /etc/vsftpd.conf -oftpd_banner=blah
++vsftpd -olisten=NO /etc/vsftpd/vsftpd.conf -oftpd_banner=blah
+ .Pp
+ That example overrides vsftpd's built-in default for the "listen" option to be
+-NO, but then loads /etc/vsftpd.conf which may override that setting. Finally,
++NO, but then loads /etc/vsftpd/vsftpd.conf which may override that setting. Finally,
+ the "ftpd_banner" setting is set to "blah", which overrides any default vsftpd
+ setting and any identical setting that was in the config file.
+ .Sh FILES
+-.Pa /etc/vsftpd.conf
++.Pa /etc/vsftpd/vsftpd.conf
+ .Sh SEE ALSO
+ .Xr vsftpd.conf 5
+ .end
+Index: vsftpd-2.3.5/vsftpd.conf
+===================================================================
+--- vsftpd-2.3.5.orig/vsftpd.conf
++++ vsftpd-2.3.5/vsftpd.conf
+@@ -1,4 +1,4 @@
+-# Example config file /etc/vsftpd.conf
++# Example config file /etc/vsftpd/vsftpd.conf
+ #
+ # The default compiled in settings are fairly paranoid. This sample file
+ # loosens things up a bit, to make the ftp daemon more usable.
+@@ -87,7 +87,7 @@ connect_from_port_20=YES
+ # useful for combatting certain DoS attacks.
+ #deny_email_enable=YES
+ # (default follows)
+-#banned_email_file=/etc/vsftpd.banned_emails
++#banned_email_file=/etc/vsftpd/vsftpd.banned_emails
+ #
+ # You may specify an explicit list of local users to chroot() to their home
+ # directory. If chroot_local_user is YES, then this list becomes a list of
+@@ -98,7 +98,7 @@ connect_from_port_20=YES
+ #chroot_local_user=YES
+ #chroot_list_enable=YES
+ # (default follows)
+-#chroot_list_file=/etc/vsftpd.chroot_list
++#chroot_list_file=/etc/vsftpd/vsftpd.chroot_list
+ #
+ # You may activate the "-R" option to the builtin ls. This is disabled by
+ # default to avoid remote users being able to cause excessive I/O on large
+Index: vsftpd-2.3.5/vsftpd.conf.5
+===================================================================
+--- vsftpd-2.3.5.orig/vsftpd.conf.5
++++ vsftpd-2.3.5/vsftpd.conf.5
+@@ -4,7 +4,7 @@ vsftpd.conf \- config file for vsftpd
+ .SH DESCRIPTION
+ vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By
+ default, vsftpd looks for this file at the location
+-.BR /etc/vsftpd.conf .
++.BR /etc/vsftpd/vsftpd.conf .
+ However, you may override this by specifying a command line argument to
+ vsftpd. The command line argument is the pathname of the configuration file
+ for vsftpd. This behaviour is useful because you may wish to use an advanced
+@@ -138,7 +138,7 @@ chroot() jail in their home directory up
+ different if chroot_local_user is set to YES. In this case, the list becomes
+ a list of users which are NOT to be placed in a chroot() jail.
+ By default, the file containing this list is
+-/etc/vsftpd.chroot_list, but you may override this with the
++/etc/vsftpd/vsftpd.chroot_list, but you may override this with the
+ .BR chroot_list_file
+ setting.
+
+@@ -177,7 +177,7 @@ Default: NO
+ .B deny_email_enable
+ If activated, you may provide a list of anonymous password e-mail responses
+ which cause login to be denied. By default, the file containing this list is
+-/etc/vsftpd.banned_emails, but you may override this with the
++/etc/vsftpd/vsftpd.banned_emails, but you may override this with the
+ .BR banned_email_file
+ setting.
+
+@@ -433,7 +433,7 @@ anonymous logins are prevented unless th
+ file specified by the
+ .BR email_password_file
+ setting. The file format is one password per line, no extra whitespace. The
+-default filename is /etc/vsftpd.email_passwords.
++default filename is /etc/vsftpd/vsftpd.email_passwords.
+
+ Default: NO
+ .TP
+@@ -764,7 +764,7 @@ passwords which are not permitted. This
+ .BR deny_email_enable
+ is enabled.
+
+-Default: /etc/vsftpd.banned_emails
++Default: /etc/vsftpd/vsftpd.banned_emails
+ .TP
+ .B banner_file
+ This option is the name of a file containing text to display when someone
+@@ -803,7 +803,7 @@ is enabled. If the option
+ is enabled, then the list file becomes a list of users to NOT place in a
+ chroot() jail.
+
+-Default: /etc/vsftpd.chroot_list
++Default: /etc/vsftpd/vsftpd.chroot_list
+ .TP
+ .B cmds_allowed
+ This options specifies a comma separated list of allowed FTP commands (post
+@@ -864,7 +864,7 @@ This option can be used to provide an al
+ .BR secure_email_list_enable
+ setting.
+
+-Default: /etc/vsftpd.email_passwords
++Default: /etc/vsftpd/vsftpd.email_passwords
+ .TP
+ .B ftp_username
+ This is the name of the user we use for handling anonymous FTP. The home
+@@ -987,10 +987,10 @@ the manual page, on a per-user basis. Us
+ with an example. If you set
+ .BR user_config_dir
+ to be
+-.BR /etc/vsftpd_user_conf
++.BR /etc/vsftpd/vsftpd_user_conf
+ and then log on as the user "chris", then vsftpd will apply the settings in
+ the file
+-.BR /etc/vsftpd_user_conf/chris
++.BR /etc/vsftpd/vsftpd_user_conf/chris
+ for the duration of the session. The format of this file is as detailed in
+ this manual page! PLEASE NOTE that not all settings are effective on a
+ per-user basis. For example, many settings only prior to the user's session
+@@ -1026,7 +1026,7 @@ This option is the name of the file load
+ .BR userlist_enable
+ option is active.
+
+-Default: /etc/vsftpd.user_list
++Default: /etc/vsftpd/vsftpd.user_list
+ .TP
+ .B vsftpd_log_file
+ This option is the name of the file to which we write the vsftpd style
diff --git a/net-ftp/vsftpd/vsftpd-2.3.5.ebuild b/net-ftp/vsftpd/vsftpd-2.3.5.ebuild
new file mode 100644
index 000000000000..1bc11a0b3588
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-2.3.5.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/vsftpd-2.3.5.ebuild,v 1.1 2012/01/08 14:11:40 hwoarang Exp $
+
+EAPI="4"
+
+inherit eutils 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-ftpd )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+
+ # as-needed patch. Bug #335977
+ epatch "${FILESDIR}/${PN}-2.3.2-as-needed.patch"
+
+ # 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}/${P}-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.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
+}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+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
+}
+
+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"
+}