Skip to content

Commit

Permalink
ftp/wzdftpd: the port had been further improved (+)
Browse files Browse the repository at this point in the history
- Unbreak the build against OpenSSL (untested)
- Do not install useless static libraries
- Build with PAM support (and enable by default)
- Annotate installed sample configuration file as @sample
- Minor textual nits in rc script and port description
  • Loading branch information
Alexey Dokuchaev authored and Alexey Dokuchaev committed Jul 8, 2021
1 parent b9b86b8 commit 01dd3d3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 24 deletions.
11 changes: 6 additions & 5 deletions ftp/wzdftpd/Makefile
Expand Up @@ -2,7 +2,7 @@

PORTNAME= wzdftpd
PORTVERSION= 0.8.3
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= ftp
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-sources/${PORTNAME}-${PORTVERSION:R}

Expand All @@ -14,16 +14,16 @@ LICENSE_FILE= ${WRKSRC}/COPYING

USES= autoreconf gettext-tools libtool localbase pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${ETCDIR} --without-pam --disable-bonjour
CONFIGURE_ARGS= --sysconfdir=${ETCDIR} --disable-bonjour --disable-static
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes

USE_RC_SUBR= wzdftpd

OPTIONS_DEFINE= AVAHI ICONV IPV6 MYSQL PERL PGSQL SQLITE TCL DOCS
OPTIONS_DEFINE= AVAHI DOCS ICONV IPV6 MYSQL PAM PERL PGSQL SQLITE TCL
OPTIONS_RADIO= TLS
OPTIONS_RADIO_TLS= GNUTLS OPENSSL
OPTIONS_DEFAULT= AVAHI GNUTLS ICONV PERL SQLITE
OPTIONS_DEFAULT= AVAHI GNUTLS ICONV PAM PERL SQLITE
OPTIONS_SUB= yes

ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG}
Expand All @@ -36,7 +36,6 @@ 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
Expand All @@ -49,6 +48,8 @@ PERL_USES= perl5
MYSQL_CONFIGURE_ENABLE= mysql
MYSQL_USES= mysql

PAM_CONFIGURE_WITH= pam

PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE}
PGSQL_CONFIGURE_OFF= --disable-pgsql
PGSQL_USES= pgsql
Expand Down
11 changes: 10 additions & 1 deletion ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c
@@ -1,5 +1,14 @@
--- libwzd-core/wzd_tls.c.orig 2007-10-25 17:25:33 UTC
+++ libwzd-core/wzd_tls.c
@@ -297,7 +297,7 @@ int tls_init(void)
return 1;
}

- SSL_CTX_set_client_CA_list(tls_ctx, (STACK *)ca_list);
+ SSL_CTX_set_client_CA_list(tls_ctx, ca_list);
}

SSL_CTX_set_session_cache_mode(tls_ctx, SSL_SESS_CACHE_CLIENT);
@@ -946,19 +946,13 @@ int tls_exit(void)

static gnutls_session initialize_tls_session(gnutls_connection_end con_end)
Expand All @@ -22,7 +31,7 @@

gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);

@@ -1001,27 +995,6 @@ int tls_auth (const char *type, wzd_cont
@@ -1001,27 +995,6 @@ int tls_auth (const char *type, wzd_context_t * contex
}

/** \todo XXX parse TLS cipher names */
Expand Down
5 changes: 1 addition & 4 deletions ftp/wzdftpd/files/wzdftpd.in
@@ -1,14 +1,11 @@
#!/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
# Add the following lines to /etc/rc.conf to enable wzdftpd:
# wzdftpd_enable="YES"
# wzdftpd_flags="<set as needed>"

Expand Down
4 changes: 2 additions & 2 deletions ftp/wzdftpd/pkg-descr
@@ -1,5 +1,5 @@
wzdftpd is a ftp server designed to be modular and entirely configurable online
using SITE commands.
wzdftpd is an FTP server designed to be modular and entirely configurable
online using SITE commands.

wzdftpd offers the following features:
- Simple configuration file, supporting inclusions
Expand Down
14 changes: 2 additions & 12 deletions ftp/wzdftpd/pkg-plist
Expand Up @@ -18,7 +18,7 @@ man/man8/wzdftpd.8.gz
%%ETCDIR%%/file_vfs.txt
%%ETCDIR%%/file_who.txt
%%ETCDIR%%/users.sample
%%ETCDIR%%/wzd.cfg.sample
@sample %%ETCDIR%%/wzd.cfg.sample
%%ETCDIR%%/wzd.pem
include/wzdftpd/libwzd-auth/wzd_auth.h
include/wzdftpd/libwzd-auth/wzd_base64.h
Expand Down Expand Up @@ -89,34 +89,24 @@ 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
%%PAM%%lib/wzdftpd/backends/libwzdpam.so
%%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
Expand Down

0 comments on commit 01dd3d3

Please sign in to comment.