summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-08-13 17:59:18 -0400
committerMike Gilbert <floppym@gentoo.org>2021-08-13 18:07:35 -0400
commit637e209c6a230e156d51bc6ac6bdc4b99f05c70d (patch)
treee6360a39b444387478d41e351d6b6379f15a1e0c /net-ftp
parentgnome-extra/gnome-shell-extensions: Stabilize 40.3-r1 amd64, #806324 (diff)
downloadgentoo-637e209c6a230e156d51bc6ac6bdc4b99f05c70d.tar.gz
gentoo-637e209c6a230e156d51bc6ac6bdc4b99f05c70d.tar.bz2
gentoo-637e209c6a230e156d51bc6ac6bdc4b99f05c70d.zip
net-ftp/vsftpd: add 3.0.5
This version drops the large gentoo-specific patch. The default config file path now matches upstream (/etc/vsftpd.conf). The init script has been replaced with a simpler declarative file. The libcap package is now required unconditionally. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/vsftpd/Manifest1
-rw-r--r--net-ftp/vsftpd/files/vsftpd-3.0.5-fix-link-command.patch25
-rw-r--r--net-ftp/vsftpd/files/vsftpd.init-3.0.519
-rw-r--r--net-ftp/vsftpd/files/vsftpd.service-3.0.510
-rw-r--r--net-ftp/vsftpd/files/vsftpd.xinetd4
-rw-r--r--net-ftp/vsftpd/files/vsftpd_at.service-3.0.57
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.5.ebuild120
7 files changed, 184 insertions, 2 deletions
diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest
index 93494676a05b..9ebd3e6c3fa8 100644
--- a/net-ftp/vsftpd/Manifest
+++ b/net-ftp/vsftpd/Manifest
@@ -1,2 +1,3 @@
DIST vsftpd-3.0.3.tar.gz 196649 BLAKE2B dbf96e788494c29d78ca49fad6a03641c9725f9a5b01a4059ad009870fdc28520cd467cd8288a8a9a520c411c495a42c3fff57ee1069efc65840adb245792dca SHA512 5a4410a88e72ecf6f60a60a89771bcec300c9f63c2ea83b219bdf65fd9749b9853f9579f7257205b55659aefcd5dab243eba878dbbd4f0ff8532dd6e60884df7
DIST vsftpd-3.0.4.tar.gz 197637 BLAKE2B 3a2457bd74076de8ffba7ad2861009157c80dd9f38cdb63033804c72d7482666f7e1a400777e2cff4170f0999d79f9d384339ade3ad48f2a7567b2e684e48817 SHA512 a4c3b28ef7bd762dcfe53f5c9b68fc1bb371d2eb61dc88038959cc9f5efba8cc2c45a15956a7fddbac3b1ce03d8555df8fb7b86300e273a78e632f3dac15c2e3
+DIST vsftpd-3.0.5.tar.gz 197778 BLAKE2B c197a070f7eef8c97ef0adc1ebb883520e7613d67ba0eabb1380b3adaae272f4ef79110e79ce4aad5ddebd6100fb059308d905203249c5445d3ea64c29dc5ec2 SHA512 9e9f9bde8c460fbc6b1d29ca531327fb2e40e336358f1cc19e1da205ef81b553719a148ad4613ceead25499d1ac3f03301a0ecd3776e5c228acccb7f9461a7ee
diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.5-fix-link-command.patch b/net-ftp/vsftpd/files/vsftpd-3.0.5-fix-link-command.patch
new file mode 100644
index 000000000000..a4560a8ef6b9
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.5-fix-link-command.patch
@@ -0,0 +1,25 @@
+From 5c00346f72de5b966ebb0841c87a22c6b11c1b38 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 12 Aug 2021 16:51:55 -0400
+Subject: [PATCH] Fix link command
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index c63ed1b..c3454c3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -26,7 +26,7 @@ OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
+ $(CC) -c $*.c $(CFLAGS) $(IFLAGS)
+
+ vsftpd: $(OBJS)
+- $(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
++ $(CC) -o vsftpd $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
+ install:
+ if [ -x /usr/local/sbin ]; then \
+--
+2.32.0
+
diff --git a/net-ftp/vsftpd/files/vsftpd.init-3.0.5 b/net-ftp/vsftpd/files/vsftpd.init-3.0.5
new file mode 100644
index 000000000000..cc9ad7f4a803
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.init-3.0.5
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2
+
+instance=${RC_SVCNAME#*.}
+
+: ${command=/usr/sbin/vsftpd}
+command_background=true
+
+if [ "${instance}" = "${RC_SVCNAME}" ]; then
+ : ${pidfile=/run/vsftpd.pid}
+else
+ : ${command_args=/etc/vsftpd/${instance}.conf}
+ : ${pidfile=/run/vsftpd.${instance}.pid}
+fi
+
+depend() {
+ use dns logger net
+}
diff --git a/net-ftp/vsftpd/files/vsftpd.service-3.0.5 b/net-ftp/vsftpd/files/vsftpd.service-3.0.5
new file mode 100644
index 000000000000..209b36636d55
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.service-3.0.5
@@ -0,0 +1,10 @@
+[Unit]
+Description=Very Secure FTP Daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/vsftpd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-ftp/vsftpd/files/vsftpd.xinetd b/net-ftp/vsftpd/files/vsftpd.xinetd
index efa4ff2feee8..a4ac0211d212 100644
--- a/net-ftp/vsftpd/files/vsftpd.xinetd
+++ b/net-ftp/vsftpd/files/vsftpd.xinetd
@@ -1,5 +1,5 @@
# default: off
-# description: Vsftpd is an FTP server, designed to be secure.
+# description: Very Secure FTP Daemon
service ftp
{
@@ -7,7 +7,7 @@ service ftp
wait = no
user = root
server = /usr/sbin/vsftpd
- server_args = /etc/vsftpd/vsftpd.conf
+ server_args = -olisten=NO
log_on_success += DURATION
nice = 10
disable = yes
diff --git a/net-ftp/vsftpd/files/vsftpd_at.service-3.0.5 b/net-ftp/vsftpd/files/vsftpd_at.service-3.0.5
new file mode 100644
index 000000000000..d06c92f4e9fa
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd_at.service-3.0.5
@@ -0,0 +1,7 @@
+[Unit]
+Description=Very Secure FTP Daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/vsftpd -olisten=NO
+StandardInput=socket
diff --git a/net-ftp/vsftpd/vsftpd-3.0.5.ebuild b/net-ftp/vsftpd/vsftpd-3.0.5.ebuild
new file mode 100644
index 000000000000..c417498f044f
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.5.ebuild
@@ -0,0 +1,120 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon"
+HOMEPAGE="https://security.appspot.com/vsftpd.html"
+SRC_URI="https://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="pam ssl tcpd"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+
+DEPEND="
+ >=sys-libs/libcap-2
+ pam? ( sys-libs/pam )
+ !pam? ( virtual/libcrypt:= )
+ ssl? ( dev-libs/openssl:0= )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+"
+
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/vsftpd-2.3.2-kerberos.patch
+ "${FILESDIR}"/vsftpd-3.0.2-alpha.patch
+ "${FILESDIR}"/vsftpd-3.0.3-sparc.patch
+ "${FILESDIR}"/vsftpd-3.0.5-fix-link-command.patch
+ )
+ default
+}
+
+define() {
+ sed -i -e "/#undef $1/c#define $1" "${S}"/builddefs.h || die
+}
+
+undef() {
+ sed -i -e "/#define $1/c#undef $1" "${S}"/builddefs.h || die
+}
+
+src_configure() {
+ cflags=()
+ libs=()
+
+ local PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ cflags+=( $(${PKG_CONFIG} --cflags libcap) ) || die
+ libs+=( $(${PKG_CONFIG} --libs libcap) ) || die
+
+ if use pam; then
+ libs+=( -lpam )
+ else
+ undef VSF_BUILD_PAM
+ libs+=( -lcrypt )
+ fi
+
+ if use ssl; then
+ define VSF_BUILD_SSL
+ cflags+=( $(${PKG_CONFIG} --cflags libcrypto libssl) ) || die
+ libs+=( $(${PKG_CONFIG} --libs libcrypto libssl) ) || die
+ fi
+
+ if use tcpd; then
+ define VSF_BUILD_TCPWRAPPERS
+ libs+=( -lwrap )
+ fi
+}
+
+src_compile() {
+ local args=(
+ CC="$(tc-getCC)"
+ CFLAGS="${CFLAGS} ${cflags[*]}"
+ LDFLAGS="${CFLAGS} ${LDFLAGS}"
+ LIBS="${libs[*]}"
+ )
+ emake "${args[@]}"
+}
+
+src_install() {
+ into /usr
+ dosbin vsftpd
+
+ doman vsftpd.conf.5 vsftpd.8
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/vsftpd.logrotate vsftpd
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/vsftpd.xinetd vsftpd
+
+ newinitd "${FILESDIR}"/vsftpd.init-3.0.5 vsftpd
+
+ systemd_newunit "${FILESDIR}"/vsftpd.service-3.0.5 vsftpd.service
+ systemd_newunit "${FILESDIR}"/vsftpd_at.service-3.0.5 vsftpd@.service
+ systemd_dounit "${FILESDIR}"/vsftpd.socket
+
+ keepdir /usr/share/empty
+
+ dodoc vsftpd.conf
+ dodoc -r EXAMPLE SECURITY
+
+ einstalldocs
+}
+
+pkg_preinst() {
+ if [[ ! -e ${EROOT}/etc/vsftpd.conf && -e ${EROOT}/etc/vsftpd/vsftpd.conf ]]; then
+ elog "Moving ${EROOT}/etc/vsftpd/vsftpd.conf to ${EROOT}/etc/vsftpd.conf"
+ mv "${EROOT}"/etc/{vsftpd/,}vsftpd.conf || die
+ fi
+}