public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/vsftpd/files/, net-ftp/vsftpd/
@ 2021-06-08  9:43 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-06-08  9:43 UTC (permalink / raw
  To: gentoo-commits

commit:     b1c84c1e2372d5f92e3794de46af966942a53620
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  8 09:42:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  8 09:42:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1c84c1e

net-ftp/vsftpd: refresh USE=-caps patch

Closes: https://bugs.gentoo.org/562426
Thanks-to: Joakim Tjernlund <joakim.tjernlund <AT> infinera.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-ftp/vsftpd/files/vsftpd-3.0.4-dont-link-caps.patch | 17 +++++++++++++++++
 net-ftp/vsftpd/vsftpd-3.0.4.ebuild                     |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.4-dont-link-caps.patch b/net-ftp/vsftpd/files/vsftpd-3.0.4-dont-link-caps.patch
new file mode 100644
index 00000000000..75e0e3e7cfd
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.4-dont-link-caps.patch
@@ -0,0 +1,17 @@
+--- a/vsf_findlibs.sh
++++ b/vsf_findlibs.sh
+@@ -47,14 +47,6 @@
+ # For older HP-UX...
+ locate_library /usr/lib/libsec.sl && echo "-lsec";
+ 
+-# Look for libcap (capabilities)
+-# Note that link may fail with:
+-# /usr/bin/ld: cannot find -lcap
+-# If the libcap-devel package isn't installed.
+-locate_library /usr/lib/libcap.so && echo "-lcap";
+-locate_library /lib/libcap.so && echo "-lcap";
+-locate_library /lib64/libcap.so && echo "-lcap";
+-
+ # Solaris needs this for nanosleep()..
+ locate_library /lib/libposix4.so && echo "-lposix4";
+ locate_library /usr/lib/libposix4.so && echo "-lposix4";

diff --git a/net-ftp/vsftpd/vsftpd-3.0.4.ebuild b/net-ftp/vsftpd/vsftpd-3.0.4.ebuild
index 5803985cfa0..e7be1199478 100644
--- a/net-ftp/vsftpd/vsftpd-3.0.4.ebuild
+++ b/net-ftp/vsftpd/vsftpd-3.0.4.ebuild
@@ -66,7 +66,7 @@ src_prepare() {
 	# 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
-		eapply "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+		eapply "${FILESDIR}"/${PN}-3.0.4-dont-link-caps.patch
 	fi
 
 	# Let portage control stripping


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-ftp/vsftpd/files/, net-ftp/vsftpd/
@ 2021-08-13 22:07 Mike Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2021-08-13 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     637e209c6a230e156d51bc6ac6bdc4b99f05c70d
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 13 21:59:18 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Aug 13 22:07:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=637e209c

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 <AT> gentoo.org>

 net-ftp/vsftpd/Manifest                            |   1 +
 .../files/vsftpd-3.0.5-fix-link-command.patch      |  25 +++++
 net-ftp/vsftpd/files/vsftpd.init-3.0.5             |  19 ++++
 net-ftp/vsftpd/files/vsftpd.service-3.0.5          |  10 ++
 net-ftp/vsftpd/files/vsftpd.xinetd                 |   4 +-
 net-ftp/vsftpd/files/vsftpd_at.service-3.0.5       |   7 ++
 net-ftp/vsftpd/vsftpd-3.0.5.ebuild                 | 120 +++++++++++++++++++++
 7 files changed, 184 insertions(+), 2 deletions(-)

diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest
index 93494676a05..9ebd3e6c3fa 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 00000000000..a4560a8ef6b
--- /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 00000000000..cc9ad7f4a80
--- /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 00000000000..209b36636d5
--- /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 efa4ff2feee..a4ac0211d21 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 00000000000..d06c92f4e9f
--- /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 00000000000..c417498f044
--- /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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-13 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-13 22:07 [gentoo-commits] repo/gentoo:master commit in: net-ftp/vsftpd/files/, net-ftp/vsftpd/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2021-06-08  9:43 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox