aboutsummaryrefslogtreecommitdiff
path: root/ftp
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2021-07-08 10:14:36 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2021-07-08 10:14:37 +0000
commit08f9c9628a8bb915eebda553dde944d3dd01c465 (patch)
treed160cf521ecc1323133e4aefe75ed5c3e46fa1f6 /ftp
parentc42ad02013751c4ef30207ce85541261216e064a (diff)
downloadports-08f9c9628a8bb915eebda553dde944d3dd01c465.tar.gz
ports-08f9c9628a8bb915eebda553dde944d3dd01c465.zip
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
Diffstat (limited to 'ftp')
-rw-r--r--ftp/Makefile1
-rw-r--r--ftp/wzdftpd/Makefile94
-rw-r--r--ftp/wzdftpd/distinfo3
-rw-r--r--ftp/wzdftpd/files/patch-ac-helpers__tls.m411
-rw-r--r--ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c52
-rw-r--r--ftp/wzdftpd/files/wzdftpd.in25
-rw-r--r--ftp/wzdftpd/pkg-descr19
-rw-r--r--ftp/wzdftpd/pkg-plist131
8 files changed, 336 insertions, 0 deletions
diff --git a/ftp/Makefile b/ftp/Makefile
index 984e2b57e3bc..73d4bf20066d 100644
--- a/ftp/Makefile
+++ b/ftp/Makefile
@@ -93,6 +93,7 @@
SUBDIR += wmget
SUBDIR += wput
SUBDIR += wxdfast
+ SUBDIR += wzdftpd
SUBDIR += yafc
.include <bsd.port.subdir.mk>
diff --git a/ftp/wzdftpd/Makefile b/ftp/wzdftpd/Makefile
new file mode 100644
index 000000000000..63eec6fcd56b
--- /dev/null
+++ b/ftp/wzdftpd/Makefile
@@ -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>
diff --git a/ftp/wzdftpd/distinfo b/ftp/wzdftpd/distinfo
new file mode 100644
index 000000000000..e3e1b7dbc01c
--- /dev/null
+++ b/ftp/wzdftpd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1193576054
+SHA256 (wzdftpd-0.8.3.tar.gz) = 14b958739bfe8f2c9e665b036ea627f7830332a43a32000feb1b6e632c18ec5d
+SIZE (wzdftpd-0.8.3.tar.gz) = 850981
diff --git a/ftp/wzdftpd/files/patch-ac-helpers__tls.m4 b/ftp/wzdftpd/files/patch-ac-helpers__tls.m4
new file mode 100644
index 000000000000..86f9dd704ec5
--- /dev/null
+++ b/ftp/wzdftpd/files/patch-ac-helpers__tls.m4
@@ -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
diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c
new file mode 100644
index 000000000000..6c755286c6e3
--- /dev/null
+++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c
@@ -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))
diff --git a/ftp/wzdftpd/files/wzdftpd.in b/ftp/wzdftpd/files/wzdftpd.in
new file mode 100644
index 000000000000..2be8e0ee1fca
--- /dev/null
+++ b/ftp/wzdftpd/files/wzdftpd.in
@@ -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"
diff --git a/ftp/wzdftpd/pkg-descr b/ftp/wzdftpd/pkg-descr
new file mode 100644
index 000000000000..cb2eab5245a2
--- /dev/null
+++ b/ftp/wzdftpd/pkg-descr
@@ -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/
diff --git a/ftp/wzdftpd/pkg-plist b/ftp/wzdftpd/pkg-plist
new file mode 100644
index 000000000000..58b8bb9b5802
--- /dev/null
+++ b/ftp/wzdftpd/pkg-plist
@@ -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