mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-09 00:07:57 +03:00
net-ftp/vsftpd: fix build with gcc15
Closes: https://bugs.gentoo.org/880399 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/42022 Closes: https://github.com/gentoo/gentoo/pull/42022 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
e9afa70b6c
commit
3950715ee5
13
net-ftp/vsftpd/files/vsftpd-3.0.5-gcc15.patch
Normal file
13
net-ftp/vsftpd/files/vsftpd-3.0.5-gcc15.patch
Normal file
@ -0,0 +1,13 @@
|
||||
https://bugs.gentoo.org/880399
|
||||
|
||||
--- a/ssl.c
|
||||
+++ b/ssl.c
|
||||
@@ -34,7 +34,7 @@
|
||||
static char* get_ssl_error();
|
||||
static SSL* get_ssl(struct vsf_session* p_sess, int fd);
|
||||
static int ssl_session_init(struct vsf_session* p_sess);
|
||||
-static void setup_bio_callbacks();
|
||||
+static void setup_bio_callbacks(SSL* p_ssl);
|
||||
static long bio_callback(
|
||||
BIO* p_bio, int oper, const char* p_arg, int argi, long argl, long retval);
|
||||
static int ssl_verify_callback(int verify_ok, X509_STORE_CTX* p_ctx);
|
||||
117
net-ftp/vsftpd/vsftpd-3.0.5-r2.ebuild
Normal file
117
net-ftp/vsftpd/vsftpd-3.0.5-r2.ebuild
Normal file
@ -0,0 +1,117 @@
|
||||
# Copyright 2022-2025 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 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="pam ssl tcpd"
|
||||
|
||||
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-seccomp.patch
|
||||
"${FILESDIR}"/vsftpd-3.0.5-gcc15.patch
|
||||
)
|
||||
default
|
||||
}
|
||||
|
||||
define() {
|
||||
sed -i -e "/#undef $2/c#define $2${3:+ }$3" "$1" || die
|
||||
}
|
||||
|
||||
undef() {
|
||||
sed -i -e "/#define $2/c#undef $2" "$1" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
libs=( -lcap )
|
||||
|
||||
if use pam; then
|
||||
libs+=( -lpam )
|
||||
else
|
||||
undef builddefs.h VSF_BUILD_PAM
|
||||
libs+=( -lcrypt )
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
define builddefs.h VSF_BUILD_SSL
|
||||
libs+=( -lcrypto -lssl )
|
||||
fi
|
||||
|
||||
if use tcpd; then
|
||||
define builddefs.h VSF_BUILD_TCPWRAPPERS
|
||||
libs+=( -lwrap )
|
||||
fi
|
||||
|
||||
if use elibc_musl; then
|
||||
# musl does not support utmp/wtmp
|
||||
# https://bugs.gentoo.org/713952
|
||||
undef sysdeputil.c VSF_SYSDEP_HAVE_UTMPX
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local args=(
|
||||
CC="$(tc-getCC)"
|
||||
CFLAGS="${CFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}"
|
||||
LIBS="${libs[*]}"
|
||||
LINK=
|
||||
)
|
||||
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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user