summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostyaSha (integer) <gentoo.integer@gmail.com>2009-03-11 01:26:43 +0000
committerKostyaSha (integer) <gentoo.integer@gmail.com>2009-03-11 01:26:43 +0000
commite6885ea60e2b033cc53040e9fc04889eb31e1fde (patch)
tree002185b435af17cdac7e5e2a9332dad30083aa5a /net-ftp/vsftpd-devnet
parentdev-python/pythonnurbs: fixed HOMEPAGE (diff)
downloadsunrise-e6885ea60e2b033cc53040e9fc04889eb31e1fde.tar.gz
sunrise-e6885ea60e2b033cc53040e9fc04889eb31e1fde.tar.bz2
sunrise-e6885ea60e2b033cc53040e9fc04889eb31e1fde.zip
net-ftp/vsftpd-devnet: New ebuild for bug 261730 thanks to pva
svn path=/sunrise/; revision=8049
Diffstat (limited to 'net-ftp/vsftpd-devnet')
-rw-r--r--net-ftp/vsftpd-devnet/ChangeLog12
-rw-r--r--net-ftp/vsftpd-devnet/Manifest10
-rw-r--r--net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-dont-link-caps.patch31
-rw-r--r--net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-gentoo.patch70
-rw-r--r--net-ftp/vsftpd-devnet/files/vsftpd.conf105
-rw-r--r--net-ftp/vsftpd-devnet/files/vsftpd.init63
-rw-r--r--net-ftp/vsftpd-devnet/files/vsftpd.logrotate4
-rw-r--r--net-ftp/vsftpd-devnet/files/vsftpd.xinetd15
-rw-r--r--net-ftp/vsftpd-devnet/metadata.xml5
-rw-r--r--net-ftp/vsftpd-devnet/vsftpd-devnet-2.1.0_p1.ebuild101
10 files changed, 416 insertions, 0 deletions
diff --git a/net-ftp/vsftpd-devnet/ChangeLog b/net-ftp/vsftpd-devnet/ChangeLog
new file mode 100644
index 000000000..8183049f9
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-ftp/vsftpd-devnet
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 11 Mar 2009; KostyaSha (integer) <gentoo.integer@gmail.com>
+ +vsftpd-devnet-2.1.0_p1.ebuild,
+ +files/vsftpd-devnet-2.1.0-dont-link-caps.patch,
+ +files/vsftpd-devnet-2.1.0-gentoo.patch, +files/vsftpd.conf,
+ +files/vsftpd.init, +files/vsftpd.logrotate, +files/vsftpd.xinetd,
+ +metadata.xml:
+ New ebuild for bug 261730 thanks to pva
+
diff --git a/net-ftp/vsftpd-devnet/Manifest b/net-ftp/vsftpd-devnet/Manifest
new file mode 100644
index 000000000..3a62068cd
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/Manifest
@@ -0,0 +1,10 @@
+AUX vsftpd-devnet-2.1.0-dont-link-caps.patch 1087 RMD160 28fa4a1404132fddc01d7ff639966832a1d47848 SHA1 a36b97670b319b80b0bb25ec4e8aec2775b1c1ce SHA256 c104226c9cdf1c7aaa2beeafff1aca0f3433ffee6961f6d1ecbd76880640c300
+AUX vsftpd-devnet-2.1.0-gentoo.patch 2923 RMD160 e7d5c267b9ca7f2e5ba9b8ca06cbf319d0cd08e5 SHA1 63f50dce2ea37b0498f856ed5270a781b5357fcd SHA256 023a7e8dc4054d8d9deb3d9fdacfdd910382e17db58b835812a9ff9c443e10ed
+AUX vsftpd.conf 3842 RMD160 2b0971c60f2ae2f9d3136849dff4dcf8ce117d41 SHA1 ebd5847bb328d8df188d85ffc5ccd7fcd5983525 SHA256 08b680a8531ecc8ccd9bf7cd91dc2de0a49105803a6d8fdcbe0f0dd47de8f6e0
+AUX vsftpd.init 1697 RMD160 e47c619663a6163ee2468993b31e73596cc52d72 SHA1 e14c50d615f7590e775456231faf08310201cee7 SHA256 24b98ee227b0ae9b7c52ab6136fd39681baac157fef5ec637c0733c4aba8c880
+AUX vsftpd.logrotate 53 RMD160 0fba0639da0d827fc0decfcf9ccd34fc7ad23c68 SHA1 cf18de9f84ad9a44974a7ae0f29562e9a516d5f9 SHA256 b31f4db8e2f8640f83bc38d83444ab784f8fc9a6492f654bb4149e1f566da2f3
+AUX vsftpd.xinetd 432 RMD160 6e2b2d0517d0bf8a2a9d7ce42ca2ea4ce73fbca2 SHA1 5325ecbf0755ebd5778d69039393af075c1a9b40 SHA256 4e68c12108509823c74cd66f833299def48f497a4d660624362d3b4990af828f
+DIST vsftpd-2.1.0-ext1.tar.gz 199926 RMD160 840d955cc4234c1b28ce300d3f018c47143a999b SHA1 0c67a2c696905da393e0412f85aee4d9e4623182 SHA256 fd137f98a67705c6cdce733c23bc7ebab14664b904b9b0f8b13669739c1d8a88
+EBUILD vsftpd-devnet-2.1.0_p1.ebuild 2792 RMD160 0f6fbd0bfaed869d3f4921da1d364fa6d77522c0 SHA1 9e24a900c36c50b1cc84c55dbe22f96d730f0e6b SHA256 02f201818f58db83cd269b8435b06c37e936ebd16b9376662d8a672128715642
+MISC ChangeLog 461 RMD160 cd537628abee4931097564c14a93e87b2f3b5e95 SHA1 6178687b0969ec17b30250e75fb17990481f9216 SHA256 50a395f538ff3b0480dad01a9810a09fdb02b31a7cf6ce9130cbd05a33fdaf51
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-dont-link-caps.patch b/net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-dont-link-caps.patch
new file mode 100644
index 000000000..2d046dbf3
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-dont-link-caps.patch
@@ -0,0 +1,31 @@
+diff -ur vsf_findlibs.sh.orig vsf_findlibs.sh
+--- vsf_findlibs.sh.orig 2009-03-02 23:29:22.417771616 +0200
++++ vsf_findlibs.sh 2009-03-02 23:29:36.893762969 +0200
+@@ -48,14 +48,6 @@
+ # For older HP-UX...
+ locate_library "/usr/$lib/libsec.sl" && echo "-lsec";
+
+-# Look for libcap (capabilities)
+-if locate_library "/$lib/libcap.so.1"; then
+- echo "/$lib/libcap.so.1";
+-else
+- locate_library "/usr/$lib/libcap.so" && echo "-lcap";
+- locate_library "/$lib/libcap.so" && echo "-lcap";
+-fi
+-
+ # Solaris needs this for nanosleep()..
+ locate_library "/$lib/libposix4.so" && echo "-lposix4";
+ locate_library "/usr/$lib/libposix4.so" && echo "-lposix4";
+diff -ur sysdeputil.c.orig sysdeputil.c
+--- sysdeputil.c.orig 2009-03-03 01:59:22.726752967 +0200
++++ sysdeputil.c 2009-03-03 01:59:34.383753897 +0200
+@@ -160,9 +160,6 @@
+ #include <crypt.h>
+ #endif
+
+-/* Prefer libcap based capabilities over raw syscall capabilities */
+-#include <sys/capability.h>
+-
+ #if defined(VSF_SYSDEP_HAVE_CAPABILITIES) && !defined(VSF_SYSDEP_HAVE_LIBCAP)
+ #include <linux/capability.h>
+ #include <sys/syscall.h>
diff --git a/net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-gentoo.patch b/net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-gentoo.patch
new file mode 100644
index 000000000..70aa7cd23
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/files/vsftpd-devnet-2.1.0-gentoo.patch
@@ -0,0 +1,70 @@
+diff -ur vsftpd-2.1.0.orig/tunables.c vsftpd-2.1.0/tunables.c
+--- tunables.c.orig 2009-02-28 23:57:49.223001571 +0200
++++ tunables.c 2009-02-28 23:58:05.659003616 +0200
+@@ -278,7 +278,7 @@
+ /* -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);
+diff -ur vsftpd-2.1.0.orig/vsftpd.conf vsftpd-2.1.0/vsftpd.conf
+--- vsftpd.conf.orig 2009-02-28 22:10:34.000000000 +0200
++++ vsftpd.conf 2009-02-28 22:21:27.000000000 +0200
+@@ -8,6 +8,10 @@
+ # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
+ # capabilities.
+ #
++# Listen on IPv4. xinet users must set NO or comment out
++# otherwise it must be set YES
++listen=YES
++#
+ # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
+ anonymous_enable=YES
+ #
+@@ -87,14 +91,14 @@
+ # useful for combatting certain DoS attacks.
+ #deny_email_enable=YES
+ # (default follows)
+-#banned_email_file=/etc/vsftpd.banned_emails
++#banned_email_file=/etc/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
+ # users to NOT chroot().
+ #chroot_list_enable=YES
+ # (default follows)
+-#chroot_list_file=/etc/vsftpd.chroot_list
++#chroot_list_file=/etc/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
+@@ -102,10 +106,6 @@
+ # the presence of the "-R" option, so there is a strong case for enabling it.
+ #ls_recurse_enable=YES
+ #
+-# When "listen" directive is enabled, vsftpd runs in standalone mode and
+-# listens on IPv4 sockets. This directive cannot be used in conjunction
+-# with the listen_ipv6 directive.
+-listen=YES
+ #
+ # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
+ # sockets, you must run two copies of vsftpd whith two configuration files.
+diff -ur vsftpd-2.1.0.orig/vsftpd.conf.5 vsftpd-2.1.0/vsftpd.conf.5
+--- vsftpd.conf.5.orig 2009-02-28 22:36:14.000000000 +0200
++++ vsftpd.conf.5 2009-02-28 22:40:00.000000000 +0200
+@@ -1141,10 +1141,10 @@
+ with an example. If you set
+ .BR user_config_dir
+ to be
+-.BR /etc/vsftpd_user_conf
++.BR /etc/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/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
diff --git a/net-ftp/vsftpd-devnet/files/vsftpd.conf b/net-ftp/vsftpd-devnet/files/vsftpd.conf
new file mode 100644
index 000000000..2ed700855
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/files/vsftpd.conf
@@ -0,0 +1,105 @@
+#
+# Example vsftpd config file
+#
+# See man 5 vsftpd.conf for more information.
+#
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.conf,v 1.6 2005/08/03 09:38:31 uberlord Exp $
+
+# Enable vsftpd to run as a standalone daemon
+# Comment these two out to run under inetd or xinetd
+background=YES
+listen=YES
+
+# Allow anonymous FTP?
+anonymous_enable=YES
+
+# Uncomment this to allow local users to log in.
+#local_enable=YES
+
+# Uncomment this to enable any form of FTP write command.
+#write_enable=YES
+
+# Default umask for local users is 077. You may wish to change this to 022,
+# if your users expect that (022 is used by most other ftpd's)
+#local_umask=022
+
+# Uncomment this to allow the anonymous FTP user to upload files. This only
+# has an effect if the above global write enable is activated. Also, you will
+# obviously need to create a directory writable by the FTP user.
+#anon_upload_enable=YES
+
+# Uncomment this if you want the anonymous FTP user to be able to create
+# new directories.
+#anon_mkdir_write_enable=YES
+
+# Activate directory messages - messages given to remote users when they
+# go into a certain directory.
+dirmessage_enable=YES
+
+# Make sure PORT transfer connections originate from port 20 (ftp-data).
+connect_from_port_20=YES
+
+# If you want, you can arrange for uploaded anonymous files to be owned by
+# a different user. Note! Using "root" for uploaded files is not
+# recommended!
+#chown_uploads=YES
+#chown_username=whoever
+
+# Activate logging of uploads/downloads.
+xferlog_enable=YES
+
+# If you want, you can have your log file in standard ftpd xferlog format
+#xferlog_std_format=YES
+
+# You may override where the log file goes if you like.
+xferlog_file=/var/log/vsftpd.log
+
+# You may change the default value for timing out an idle session.
+#idle_session_timeout=600
+
+# You may change the default value for timing out a data connection.
+#data_connection_timeout=120
+
+# It is recommended that you define on your system a unique user which the
+# ftp server can use as a totally isolated and unprivileged user.
+nopriv_user=nobody
+
+# Enable this and the server will recognise asynchronous ABOR requests. Not
+# recommended for security (the code is non-trivial). Not enabling it,
+# however, may confuse older FTP clients.
+#async_abor_enable=YES
+
+# By default the server will pretend to allow ASCII mode but in fact ignore
+# the request. Turn on the below options to have the server actually do ASCII
+# mangling on files when in ASCII mode.
+# Beware that turning on ascii_download_enable enables malicious remote parties
+# to consume your I/O resources, by issuing the command "SIZE /big/file" in
+# ASCII mode.
+# These ASCII options are split into upload and download because you may wish
+# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
+# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
+# on the client anyway..
+#ascii_upload_enable=YES
+#ascii_download_enable=YES
+
+# You may fully customise the login banner string:
+#ftpd_banner=Welcome to blah FTP service.
+
+# You may specify a file of disallowed anonymous e-mail addresses. Apparently
+# useful for combatting certain DoS attacks.
+#deny_email_enable=YES
+# (default follows)
+#banned_email_file=/etc/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
+# users to NOT chroot().
+#chroot_list_enable=YES
+# (default follows)
+#chroot_list_file=/etc/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
+# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
+# the presence of the "-R" option, so there is a strong case for enabling it.
+#ls_recurse_enable=YES
diff --git a/net-ftp/vsftpd-devnet/files/vsftpd.init b/net-ftp/vsftpd-devnet/files/vsftpd.init
new file mode 100644
index 000000000..58b7dc434
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/files/vsftpd.init
@@ -0,0 +1,63 @@
+#!/sbin/runscript
+# Copyright 2003-2004 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 $
+
+VSFTPD_NAME=${SVCNAME##*.}
+if [ -n "${VSFTPD_NAME}" -a "${SVCNAME}" != "vsftpd" ]; then
+ VSFTPD_PID="/var/run/vsftpd.${VSFTPD_NAME}.pid"
+ VSFTPD_CONF_DEFAULT="/etc/vsftpd/${VSFTPD_NAME}.conf"
+else
+ VSFTPD_PID="/var/run/vsftpd.pid"
+ VSFTPD_CONF_DEFAULT="/etc/vsftpd/vsftpd.conf"
+fi
+VSFTPD_CONF=${VSFTPD_CONF:-${VSFTPD_CONF_DEFAULT}}
+VSFTPD_EXEC=${VSFTPD_EXEC:-/usr/sbin/vsftpd}
+
+depend() {
+ need net
+ use dns logger
+}
+
+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
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${VSFTPD_EXEC} \
+ --background -- "${VSFTPD_CONF}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --name ${SVCNAME}
+ eend $?
+}
+
+# vim: ts=4
diff --git a/net-ftp/vsftpd-devnet/files/vsftpd.logrotate b/net-ftp/vsftpd-devnet/files/vsftpd.logrotate
new file mode 100644
index 000000000..f443e2eb8
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/files/vsftpd.logrotate
@@ -0,0 +1,4 @@
+/var/log/vsftpd.log {
+ missingok
+ notifempty
+}
diff --git a/net-ftp/vsftpd-devnet/files/vsftpd.xinetd b/net-ftp/vsftpd-devnet/files/vsftpd.xinetd
new file mode 100644
index 000000000..d1d88e93d
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/files/vsftpd.xinetd
@@ -0,0 +1,15 @@
+# default: off
+# description: Vsftpd is an FTP server, designed to be secure.
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.xinetd,v 1.4 2005/06/07 18:34:17 uberlord Exp $
+
+service ftp
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/vsftpd
+ server_args = /etc/vsftpd/vsftpd.conf
+ log_on_success += DURATION
+ nice = 10
+ disable = yes
+}
diff --git a/net-ftp/vsftpd-devnet/metadata.xml b/net-ftp/vsftpd-devnet/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>
diff --git a/net-ftp/vsftpd-devnet/vsftpd-devnet-2.1.0_p1.ebuild b/net-ftp/vsftpd-devnet/vsftpd-devnet-2.1.0_p1.ebuild
new file mode 100644
index 000000000..2469e73f8
--- /dev/null
+++ b/net-ftp/vsftpd-devnet/vsftpd-devnet-2.1.0_p1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon with devnet patchset"
+HOMEPAGE="http://vsftpd.devnet.ru/"
+SRC_URI="http://vsftpd.devnet.ru/files/${PV%_p*}/ext.${PV#*_p}/${PN%-*}-${PV%_p*}-ext${PV#*_p}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( sys-libs/libcap )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ !net-ftp/vsftpd
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftpd )
+ xinetd? ( sys-apps/xinetd )"
+
+S=${WORKDIR}/${PN%-*}-${PV%_p*}-ext.${PV#*_p}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.1.0-gentoo.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
+ epatch "${FILESDIR}"/${PN}-2.1.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ doman vsftpd.conf.5 vsftpd.8 || die
+ dosbin vsftpd || die
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die
+ newdoc vsftpd.conf vsftpd.conf.example || die
+
+ docinto security
+ dodoc SECURITY/* || die
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die
+
+ insinto /etc/vsftpd
+ newins vsftpd.conf vsftpd.conf.example || die
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/vsftpd.logrotate" vsftpd || die
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/vsftpd.xinetd" vsftpd || die
+ fi
+
+ newinitd "${FILESDIR}/vsftpd.init" vsftpd || die
+
+ keepdir /usr/share/vsftpd/empty
+}
+
+pkg_postinst() {
+ # If we use xinetd, then we comment out listen=YES
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i '/\listen=YES/s/^/#/g' "${D}"/etc/vsftpd/vsftpd.conf.example
+ fi
+
+ 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"
+}