1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

ftp/wzdftpd: resurrect^Wreadd previously deleted port

Despite that original author stopped working on the project, it has
its userbase and remains fairly popular and demanded, known for its
versatility and capabilities, so:

  - Bring back from the attic and fix the build with -fno-common
  - Mark OPENSSL option as BROKEN for the time being
  - Expand the default options a bit to get more useful package
  - Tighten one regex (escape the dot) and kill stray backslash
  - Fix a typo and adjust WWW line in the port description text
  - Submitter assumes maintainership of the port (thanks!)

PR:		256840
Submitted by:	Robert Clausecker
This commit is contained in:
Alexey Dokuchaev 2021-07-08 10:14:36 +00:00
parent c42ad02013
commit 08f9c9628a
9 changed files with 336 additions and 1 deletions

1
MOVED
View File

@ -16195,7 +16195,6 @@ textproc/elasticsearch5-search-guard||2021-04-06|Has expired: textproc/elasticse
multimedia/gnome-subtitles||2021-04-06|Has expired: outdated, depends on deprecated library www/gtkhtml3
net/libproxy-mozjs||2021-04-06|Has expired: Uses EOL Python 2.7 via lang/spidermonkey52
lang/spidermonkey52|lang/spidermonkey78|2021-04-06|Has expired: Uses Python 2.7 which is EOLed upstream
ftp/wzdftpd||2021-04-07|Has expired: Unmaintained and dead upstream, does not build with -fno-common (llvm 11)
astro/roadmap||2021-04-07|Has expired: Unmaintained and dead upstream, does not build with -fno-common (llvm 11)
games/cosmo||2021-04-07|Has expired: Unmaintained and dead upstream, does not build with -fno-common (llvm 11)
games/bomberinstinct||2021-04-07|Has expired: Unmaintained and dead upstream, does not build with -fno-common (llvm 11)

View File

@ -93,6 +93,7 @@
SUBDIR += wmget
SUBDIR += wput
SUBDIR += wxdfast
SUBDIR += wzdftpd
SUBDIR += yafc
.include <bsd.port.subdir.mk>

94
ftp/wzdftpd/Makefile Normal file
View File

@ -0,0 +1,94 @@
# Created by: Roman Bogorodskiy
PORTNAME= wzdftpd
PORTVERSION= 0.8.3
PORTREVISION= 7
CATEGORIES= ftp
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-sources/${PORTNAME}-${PORTVERSION:R}
MAINTAINER= fuz@fuz.su
COMMENT= Modular FTP server configurable online using SITE commands
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
USES= autoreconf gettext-tools libtool localbase pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${ETCDIR} --without-pam --disable-bonjour
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
USE_RC_SUBR= wzdftpd
OPTIONS_DEFINE= AVAHI ICONV IPV6 MYSQL PERL PGSQL SQLITE TCL DOCS
OPTIONS_RADIO= TLS
OPTIONS_RADIO_TLS= GNUTLS OPENSSL
OPTIONS_DEFAULT= AVAHI GNUTLS ICONV PERL SQLITE
OPTIONS_SUB= yes
ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG}
ICONV_CONFIGURE_OFF= --disable-utf8
ICONV_USES= iconv
TCL_CONFIGURE_ON= --with-tcl=${TCL_LIBDIR}
TCL_CONFIGURE_OFF= --without-tcl
TCL_USES= tcl
OPENSSL_CONFIGURE_ENABLE= openssl
OPENSSL_USES= ssl
OPENSSL_BROKEN= wzd_tls.c:300:42: error: use of undeclared identifier 'STACK'
GNUTLS_CONFIGURE_ENABLE= gnutls
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
IPV6_CONFIGURE_ENABLE= ipv6
PERL_CONFIGURE_ENABLE= perl
PERL_USES= perl5
MYSQL_CONFIGURE_ENABLE= mysql
MYSQL_USES= mysql
PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE}
PGSQL_CONFIGURE_OFF= --disable-pgsql
PGSQL_USES= pgsql
SQLITE_CONFIGURE_ENABLE= sqlite3
SQLITE_USES= sqlite:3
AVAHI_CONFIGURE_ON= --with-zeroconf --enable-avahi
AVAHI_LIB_DEPENDS= libdbus-1.so:devel/dbus \
libavahi-core.so:net/avahi-app
post-patch:
@${TOUCH} ${WRKSRC}/config.rpath
@${ECHO_CMD} "ACLOCAL_AMFLAGS= -I ac-helpers" >> ${WRKSRC}/Makefile.am
@${REINPLACE_CMD} -e \
'/LDFLAGS/s|@PTHREAD_CFLAGS@|@LTLIBICONV@|' \
${WRKSRC}/libwzd-core/Makefile.am
@${REINPLACE_CMD} -e \
's|INSTALLDIRS=vendor|INSTALLPRIVLIB=$${prefix}/lib| ; \
/MAKE/s| install| pure_install|' \
${WRKSRC}/libwzd-perl/Makefile.am
.for i in backends modules
@${FIND} ${WRKSRC}/${i} -name "Makefile.am" | ${XARGS} \
${REINPLACE_CMD} -e \
'/^libdir/s|$${pkgdatadir}|$${prefix}/lib/wzdftpd|'
.endfor
@${FIND} ${WRKSRC} -name "*_tls.c" | ${XARGS} ${REINPLACE_CMD} -e \
'/<gcrypt\.h>/d ; /gcry_control/d'
@${REINPLACE_CMD} -e \
's|^wzd_sfv_config SfvConfig|extern &|' \
${WRKSRC}/modules/sfv/libwzd_sfv_main.h
post-install:
${INSTALL_DATA} ${WRKSRC}/*.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in AUTHORS ChangeLog NEWS Permissions.ReadMeFirst README \
TLS.ReadMeFirst UPGRADING wzd_tls.cnf
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>

3
ftp/wzdftpd/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1193576054
SHA256 (wzdftpd-0.8.3.tar.gz) = 14b958739bfe8f2c9e665b036ea627f7830332a43a32000feb1b6e632c18ec5d
SIZE (wzdftpd-0.8.3.tar.gz) = 850981

View File

@ -0,0 +1,11 @@
--- ac-helpers/tls.m4.orig
+++ ac-helpers/tls.m4
@@ -22,7 +22,7 @@
)
if test "$gnutls" = "yes"; then
-AM_PATH_LIBGNUTLS(0.9.8,wzd_have_gnutls=yes)
+PKG_CHECK_MODULES(LIBGNUTLS, [gnutls], [wzd_have_gnutls=yes], [wzd_have_gnutls=no])
fi
# openssl is checked only if gnutls was not found or disabled

View File

@ -0,0 +1,52 @@
--- libwzd-core/wzd_tls.c.orig 2007-10-25 17:25:33 UTC
+++ libwzd-core/wzd_tls.c
@@ -946,19 +946,13 @@ int tls_exit(void)
static gnutls_session initialize_tls_session(gnutls_connection_end con_end)
{
- /* Allow connections to servers that have OpenPGP keys as well.
- */
- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
-
gnutls_session session;
gnutls_init(&session, con_end);
- /* avoid calling all the priority functions, since the defaults
- * are adequate.
+ /* Allow connections to servers that have OpenPGP keys as well.
*/
- gnutls_set_default_priority(session);
- gnutls_certificate_type_set_priority(session, cert_type_priority);
+ gnutls_priority_set_direct(session, "NORMAL:+CTYPE-OPENPGP", NULL);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);
@@ -1001,27 +995,6 @@ int tls_auth (const char *type, wzd_cont
}
/** \todo XXX parse TLS cipher names */
- {
- /** Note that the priority is set on the client. The server does not use
- * the algorithm's priority except for disabling algorithms that were not
- * specified.
- */
- const int cipherPriority[] =
- {
- GNUTLS_CIPHER_ARCFOUR_128,
- GNUTLS_CIPHER_3DES_CBC,
- GNUTLS_CIPHER_AES_128_CBC,
- GNUTLS_CIPHER_AES_256_CBC,
- GNUTLS_CIPHER_ARCFOUR_40,
-#if ( (LIBGNUTLS_VERSION_MAJOR > 1) || (LIBGNUTLS_VERSION_MINOR >= 3) )
- GNUTLS_CIPHER_RC2_40_CBC,
- GNUTLS_CIPHER_DES_CBC,
-#endif
- 0
- };
-
- gnutls_cipher_set_priority(session, cipherPriority);
- }
/* ensure socket is non-blocking */
#if defined(_MSC_VER) || (defined(__CYGWIN__) && defined(WINSOCK_SUPPORT))

View File

@ -0,0 +1,25 @@
#!/bin/sh
# Start or stop wzdftpd
# PROVIDE: wzdftpd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable wzdftpd
# wzdftpd_enable="YES"
# wzdftpd_flags="<set as needed>"
wzdftpd_enable=${wzdftpd_enable:-"NO"} # Enable wzdftpd
. /etc/rc.subr
name="wzdftpd"
rcvar=wzdftpd_enable
command="%%PREFIX%%/sbin/${name}"
required_files="%%PREFIX%%/etc/wzdftpd/wzd.cfg"
load_rc_config $name
run_rc_command "$1"

19
ftp/wzdftpd/pkg-descr Normal file
View File

@ -0,0 +1,19 @@
wzdftpd is a ftp server designed to be modular and entirely configurable online
using SITE commands.
wzdftpd offers the following features:
- Simple configuration file, supporting inclusions
- Online administration, using SITE commands
- Backends to store users/groups in different structures
- Modules: internal, using shared libraries, or external
(scripts/applications)
- Users are virtual: you do not need to create users in system
- SSL/TLS support
- Server is designed to run as a non-privileged user to enforce security
- Server can detect ip changes (dynamic ips) and set ip and passive ip
accordingly
- Cross devices operations (copy/move) (though can be slow)
- Logging support (compatible with the wu-ftpd standard)
- Designed for high performances: coded with C, multithreaded
WWW: https://sourceforge.net/projects/wzdftpd/

131
ftp/wzdftpd/pkg-plist Normal file
View File

@ -0,0 +1,131 @@
bin/siteconfig
bin/siteuptime
bin/sitewho
bin/wzd-config
man/man1/siteconfig.1.gz
man/man1/siteuptime.1.gz
man/man1/sitewho.1.gz
man/man1/wzd-config.1.gz
man/man8/wzdftpd.8.gz
%%ETCDIR%%/file_ginfo.txt
%%ETCDIR%%/file_group.txt
%%ETCDIR%%/file_groups.txt
%%ETCDIR%%/file_help.txt
%%ETCDIR%%/file_rules.txt
%%ETCDIR%%/file_swho.txt
%%ETCDIR%%/file_user.txt
%%ETCDIR%%/file_users.txt
%%ETCDIR%%/file_vfs.txt
%%ETCDIR%%/file_who.txt
%%ETCDIR%%/users.sample
%%ETCDIR%%/wzd.cfg.sample
%%ETCDIR%%/wzd.pem
include/wzdftpd/libwzd-auth/wzd_auth.h
include/wzdftpd/libwzd-auth/wzd_base64.h
include/wzdftpd/libwzd-auth/wzd_crypt.h
include/wzdftpd/libwzd-auth/wzd_krb5.h
include/wzdftpd/libwzd-auth/wzd_md5.h
include/wzdftpd/libwzd-auth/wzd_md5crypt.h
include/wzdftpd/libwzd-auth/wzd_pam.h
include/wzdftpd/libwzd-auth/wzd_sha1.h
include/wzdftpd/libwzd-auth/wzd_tls.h
include/wzdftpd/libwzd-base/dlist.h
include/wzdftpd/libwzd-base/hash.h
include/wzdftpd/libwzd-base/list.h
include/wzdftpd/libwzd-base/stack.h
include/wzdftpd/libwzd-base/strpcpy.h
include/wzdftpd/libwzd-base/wzd_strlcat.h
include/wzdftpd/libwzd-base/wzd_strtok_r.h
include/wzdftpd/libwzd-core/arch/bsd.h
include/wzdftpd/libwzd-core/arch/win32.h
include/wzdftpd/libwzd-core/wzd_ClientThread.h
include/wzdftpd/libwzd-core/wzd_action.h
include/wzdftpd/libwzd-core/wzd_all.h
include/wzdftpd/libwzd-core/wzd_backend.h
include/wzdftpd/libwzd-core/wzd_cache.h
include/wzdftpd/libwzd-core/wzd_commands.h
include/wzdftpd/libwzd-core/wzd_configfile.h
include/wzdftpd/libwzd-core/wzd_configloader.h
include/wzdftpd/libwzd-core/wzd_crc32.h
include/wzdftpd/libwzd-core/wzd_crontab.h
include/wzdftpd/libwzd-core/wzd_data.h
include/wzdftpd/libwzd-core/wzd_debug.h
include/wzdftpd/libwzd-core/wzd_dir.h
include/wzdftpd/libwzd-core/wzd_events.h
include/wzdftpd/libwzd-core/wzd_file.h
include/wzdftpd/libwzd-core/wzd_fs.h
include/wzdftpd/libwzd-core/wzd_group.h
include/wzdftpd/libwzd-core/wzd_hardlimits.h
include/wzdftpd/libwzd-core/wzd_ip.h
include/wzdftpd/libwzd-core/wzd_libmain.h
include/wzdftpd/libwzd-core/wzd_list.h
include/wzdftpd/libwzd-core/wzd_log.h
include/wzdftpd/libwzd-core/wzd_login.h
include/wzdftpd/libwzd-core/wzd_messages.h
include/wzdftpd/libwzd-core/wzd_misc.h
include/wzdftpd/libwzd-core/wzd_mod.h
include/wzdftpd/libwzd-core/wzd_mutex.h
include/wzdftpd/libwzd-core/wzd_perm.h
include/wzdftpd/libwzd-core/wzd_protocol.h
include/wzdftpd/libwzd-core/wzd_ratio.h
include/wzdftpd/libwzd-core/wzd_section.h
include/wzdftpd/libwzd-core/wzd_shm.h
include/wzdftpd/libwzd-core/wzd_site.h
include/wzdftpd/libwzd-core/wzd_site_group.h
include/wzdftpd/libwzd-core/wzd_site_user.h
include/wzdftpd/libwzd-core/wzd_socket.h
include/wzdftpd/libwzd-core/wzd_string.h
include/wzdftpd/libwzd-core/wzd_structs.h
include/wzdftpd/libwzd-core/wzd_threads.h
include/wzdftpd/libwzd-core/wzd_tls.h
include/wzdftpd/libwzd-core/wzd_types.h
include/wzdftpd/libwzd-core/wzd_user.h
include/wzdftpd/libwzd-core/wzd_utf8.h
include/wzdftpd/libwzd-core/wzd_vars.h
include/wzdftpd/libwzd-core/wzd_vfs.h
include/wzdftpd/libwzd.h
include/wzdftpd/libwzd_codes.h
include/wzdftpd/libwzd_err.h
include/wzdftpd/libwzd_pv.h
include/wzdftpd/libwzd_socket.h
include/wzdftpd/libwzd_tls.h
lib/libwzd.a
lib/libwzd.so
lib/libwzd.so.0
lib/libwzd.so.0.801.1
lib/libwzd_core.a
lib/libwzd_core.so
lib/libwzd_core.so.0
lib/libwzd_core.so.0.801.1
%%PERL%%%%SITE_ARCH%%/auto/wzdftpd/wzdftpd.so
%%PERL%%%%SITE_ARCH%%/wzdftpd.pm
%%MYSQL%%lib/wzdftpd/backends/libwzdmysql.a
%%MYSQL%%lib/wzdftpd/backends/libwzdmysql.so
%%PGSQL%%lib/wzdftpd/backends/libwzdpgsql.a
%%PGSQL%%lib/wzdftpd/backends/libwzdpgsql.so
lib/wzdftpd/backends/libwzdplaintext.a
lib/wzdftpd/backends/libwzdplaintext.so
%%SQLITE%%lib/wzdftpd/backends/libwzdsqlite.a
%%SQLITE%%lib/wzdftpd/backends/libwzdsqlite.so
lib/wzdftpd/modules/libwzd_debug.a
lib/wzdftpd/modules/libwzd_debug.so
%%PERL%%lib/wzdftpd/modules/libwzd_perl.a
%%PERL%%lib/wzdftpd/modules/libwzd_perl.so
%%PERL%%%%PERL5_MAN3%%/wzdftpd.3.gz
lib/wzdftpd/modules/libwzd_sfv.a
lib/wzdftpd/modules/libwzd_sfv.so
%%TCL%%lib/wzdftpd/modules/libwzd_tcl.a
%%TCL%%lib/wzdftpd/modules/libwzd_tcl.so
%%AVAHI%%lib/wzdftpd/modules/libwzd_zeroconf.a
%%AVAHI%%lib/wzdftpd/modules/libwzd_zeroconf.so
libdata/pkgconfig/wzdftpd.pc
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/Permissions.ReadMeFirst
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TLS.ReadMeFirst
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%PORTDOCS%%%%DOCSDIR%%/wzd_tls.cnf
sbin/wzdftpd
share/aclocal/wzd.m4