- Add support for clamav

- Fix ldap support

PR:		ports/115752, ports/115867
Submitted by:	Vladimir Korkodinov <viper@perm.raid.ru> (ports/115752),
		Thomas Vogt <thomas@bsdunix.ch> (ports/115867)
Approved by:	sat (mantor)
This commit is contained in:
Beech Rintoul 2007-08-30 18:33:30 +00:00
parent 29163244f1
commit 9b2631cba9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=198549
8 changed files with 170 additions and 44 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= proftpd
DISTVERSION= 1.3.1rc3
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
@ -15,7 +15,9 @@ MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://spirit.bentel.sk/mirrors/Proftpd/distrib/source/ \
ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
http://mirrors.ibiblio.org/pub/mirrors/proftpd/distrib/source/ \
http://www.mirrorservice.org/sites/ftp.proftpd.org/distrib/source/
http://www.mirrorservice.org/sites/ftp.proftpd.org/distrib/source/ \
CENKES:clam
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER?= beech@FreeBSD.org
COMMENT?= Highly configurable ftp daemon
@ -53,7 +55,7 @@ CONFIGURE_ARGS= --localstatedir=/var/run \
OPTIONS= IPV6 "Use IPv6" off \
LDAP "Use LDAP" off \
LDAP_TLS "Use LDAP TLS (Requires LDAP)" off\
LDAP_TLS "Use LDAP TLS (Requires LDAP, OPENSSL)" off\
MYSQL "Use MySQL" off \
PGSQL "Use Postgres" off \
OPENSSL "Include mod_tls" off \
@ -61,16 +63,17 @@ OPTIONS= IPV6 "Use IPv6" off \
IFSESSION "Include mod_ifsession" on \
README "Include mod_readme" on \
RATIO "Include mod_ratio" on \
CTRLS "include controls" off \
CTRLS "Include controls" off \
REWRITE "Include mod_rewrite" on \
WRAP "Include mod_wrap2" on \
WRAP_FILE "include mod_wrap2_file" off \
WRAP_SQL "include mod_wrap2_sql" off \
WRAP_FILE "Include mod_wrap2_file" off \
WRAP_SQL "Include mod_wrap2_sql" off \
RADIUS "Include mod_radius" off \
QUOTATAB_RADIUS "include mod_quotatab_radius" off \
BAN "include mod_ban (Requires CTRLS)" off \
BAN "Include mod_ban (Requires CTRLS)" off \
NLS "Use nls (builds mod_lang)" off \
CYRFIX "Use patch for fix cyrillic encoding" off
CYRFIX "Patch to fix cyrillic encoding" off \
CLAMAV "Include mod_clamav " off
MODULES?=
LIBDIRS?=
@ -160,6 +163,7 @@ USE_OPENLDAP= yes
MODULES:=${MODULES}:mod_ldap
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-contrib-mod_ldap.c
.endif
.if defined(WITH_MYSQL)
@ -186,9 +190,6 @@ CFLAGS+= -DHAVE_OPENSSL
.include <${PORTSDIR}/Mk/bsd.openssl.mk>
PROFTPD_LIBS+= -lssl -lcrypto -L${LOCALBASE}/lib
MODULES:=${MODULES}:mod_tls
.if defined(WITH_LDAP_TLS)
EXTRA_PATCHES+= ${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c
.endif
.endif
.if defined(WITH_CTRLS)
@ -210,6 +211,16 @@ MODULES:=${MODULES}:mod_quotatab_sql
.endif
.endif
.if defined(WITH_CLAMAV)
#http://www.uglyboxindustries.com/mod_clamav_new.c
DISTFILES+= mod_clamav-0.5.tar.bz2:clam
USE_CLAMAV= yes
MODULES:=${MODULES}:mod_clamav
LIB_DEPENDS+= clamav.2:${PORTSDIR}/security/clamav
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
.endif
# mod_ifsession should be the last item in the modules list
.if !defined(WITHOUT_IFSESSION)
MODULES:=${MODULES}:mod_ifsession
@ -232,9 +243,18 @@ CONFIGURE_ARGS+= --with-libraries=${LIBDIRS}
MODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,'
post-extract:
.if defined(WITH_CLAMAV)
@${MV} ${WRKDIR}/mod_clamav_new.c ${WRKSRC}/modules/mod_clamav.c
.endif
post-patch:
.if defined(WITH_NLS)
@${REINPLACE_CMD} -e 's|-lsupp|-lsupp -lintl|g' ${WRKSRC}/Makefile.in
.endif
.if defined(WITH_LDAP_TLS)
@${REINPLACE_CMD} -e 's:/\* #define USE_LDAP_TLS \*/:#define USE_LDAP_TLS:' \
${WRKSRC}/contrib/mod_ldap.c
.endif
@${REINPLACE_CMD} -e 's|proftpd\.conf|proftpd.conf.sample|g' ${WRKSRC}/Makefile.in

View File

@ -1,3 +1,6 @@
MD5 (proftpd-1.3.1rc3.tar.bz2) = 485af3aee9ecebfeae1ae2003250a3a9
SHA256 (proftpd-1.3.1rc3.tar.bz2) = 9bad65ea4ddca40547ca6bb1aa337c7d4ae54752bb9f5fc76124a8c4535daefd
SIZE (proftpd-1.3.1rc3.tar.bz2) = 1538700
MD5 (mod_clamav-0.5.tar.bz2) = a098b630db1aa4ce02d77be84c21e59d
SHA256 (mod_clamav-0.5.tar.bz2) = badab5d0577439e4de4a4d8fa6d1035da4884cc5b8e5569057816da4ced9667f
SIZE (mod_clamav-0.5.tar.bz2) = 3027

View File

@ -0,0 +1,51 @@
---contrib/mod_ldap.c.orig 2007-07-02 15:20:31.000000000 -0800
+++ contrib/mod_ldap.c 2007-08-27 13:48:11.000000000 -0800
@@ -22,7 +22,7 @@
*/
/*
- * mod_ldap v2.8.17-20070701
+ * mod_ldap v2.8.17
*
* Thanks for patches go to (in alphabetical order):
*
@@ -48,7 +48,7 @@
* LDAPDefaultAuthScheme
*
*
- * $Id: mod_ldap.c,v 1.54 2007/07/02 23:20:31 jwm Exp $
+ * $Id: mod_ldap.c,v 1.57 2007/08/22 02:00:06 jwm Exp $
* $Libraries: -lldap -llber$
*/
@@ -70,7 +70,7 @@
#include "conf.h"
#include "privs.h"
-#define MOD_LDAP_VERSION "mod_ldap/2.8.17-20070701"
+#define MOD_LDAP_VERSION "mod_ldap/2.8.17"
#if PROFTPD_VERSION_NUMBER < 0x0001021002
# error MOD_LDAP_VERSION " requires ProFTPD 1.2.10rc2 or later"
@@ -2245,8 +2245,8 @@
* ldap_init() will connect to the LDAP SDK's default.
*/
if ((c = find_config(main_server->conf, CONF_PARAM, "LDAPServer", FALSE)) != NULL) {
- if (strcmp(c->argv[1], "url") == 0) {
- url = c->argv[2];
+ if (strcmp(c->argv[0], "url") == 0) {
+ url = c->argv[1];
if (url) {
#ifdef LDAP_OPT_X_TLS_HARD
if (strcmp(url->lud_scheme, "ldaps") == 0) {
@@ -2269,8 +2269,8 @@
* by other/future callers.
*/
}
- } else if (strcmp(c->argv[1], "host") == 0) {
- ldap_server = c->argv[2];
+ } else if (strcmp(c->argv[0], "host") == 0) {
+ ldap_server = c->argv[1];
} else {
/* This should never happen, since the configuration handler for
* LDAPServer only passes url or host, but we'll be defensive.

View File

@ -1,11 +0,0 @@
--- contrib/mod_ldap.c.orig Thu Oct 19 18:18:07 2006
+++ contrib/mod_ldap.c Fri Dec 15 11:01:21 2006
@@ -60,7 +60,7 @@
* after connecting to the LDAP server. If TLS cannot be enabled, the LDAP
* connection will fail.
*/
-/* #define USE_LDAP_TLS */
+#define USE_LDAP_TLS */
/*
* If you have to edit anything below this line, it's a bug. Report it

View File

@ -7,7 +7,7 @@
PORTNAME= proftpd
DISTVERSION= 1.3.1rc3
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://ftp.fastorama.com/mirrors/ftp.proftpd.org/distrib/source/ \
@ -15,7 +15,9 @@ MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
ftp://spirit.bentel.sk/mirrors/Proftpd/distrib/source/ \
ftp://proftpd.networkedsystems.co.uk/distrib/source/ \
http://mirrors.ibiblio.org/pub/mirrors/proftpd/distrib/source/ \
http://www.mirrorservice.org/sites/ftp.proftpd.org/distrib/source/
http://www.mirrorservice.org/sites/ftp.proftpd.org/distrib/source/ \
CENKES:clam
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER?= beech@FreeBSD.org
COMMENT?= Highly configurable ftp daemon
@ -53,7 +55,7 @@ CONFIGURE_ARGS= --localstatedir=/var/run \
OPTIONS= IPV6 "Use IPv6" off \
LDAP "Use LDAP" off \
LDAP_TLS "Use LDAP TLS (Requires LDAP)" off\
LDAP_TLS "Use LDAP TLS (Requires LDAP, OPENSSL)" off\
MYSQL "Use MySQL" off \
PGSQL "Use Postgres" off \
OPENSSL "Include mod_tls" off \
@ -61,16 +63,17 @@ OPTIONS= IPV6 "Use IPv6" off \
IFSESSION "Include mod_ifsession" on \
README "Include mod_readme" on \
RATIO "Include mod_ratio" on \
CTRLS "include controls" off \
CTRLS "Include controls" off \
REWRITE "Include mod_rewrite" on \
WRAP "Include mod_wrap2" on \
WRAP_FILE "include mod_wrap2_file" off \
WRAP_SQL "include mod_wrap2_sql" off \
WRAP_FILE "Include mod_wrap2_file" off \
WRAP_SQL "Include mod_wrap2_sql" off \
RADIUS "Include mod_radius" off \
QUOTATAB_RADIUS "include mod_quotatab_radius" off \
BAN "include mod_ban (Requires CTRLS)" off \
BAN "Include mod_ban (Requires CTRLS)" off \
NLS "Use nls (builds mod_lang)" off \
CYRFIX "Use patch for fix cyrillic encoding" off
CYRFIX "Patch to fix cyrillic encoding" off \
CLAMAV "Include mod_clamav " off
MODULES?=
LIBDIRS?=
@ -160,6 +163,7 @@ USE_OPENLDAP= yes
MODULES:=${MODULES}:mod_ldap
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-contrib-mod_ldap.c
.endif
.if defined(WITH_MYSQL)
@ -186,9 +190,6 @@ CFLAGS+= -DHAVE_OPENSSL
.include <${PORTSDIR}/Mk/bsd.openssl.mk>
PROFTPD_LIBS+= -lssl -lcrypto -L${LOCALBASE}/lib
MODULES:=${MODULES}:mod_tls
.if defined(WITH_LDAP_TLS)
EXTRA_PATCHES+= ${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c
.endif
.endif
.if defined(WITH_CTRLS)
@ -210,6 +211,16 @@ MODULES:=${MODULES}:mod_quotatab_sql
.endif
.endif
.if defined(WITH_CLAMAV)
#http://www.uglyboxindustries.com/mod_clamav_new.c
DISTFILES+= mod_clamav-0.5.tar.bz2:clam
USE_CLAMAV= yes
MODULES:=${MODULES}:mod_clamav
LIB_DEPENDS+= clamav.2:${PORTSDIR}/security/clamav
INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
.endif
# mod_ifsession should be the last item in the modules list
.if !defined(WITHOUT_IFSESSION)
MODULES:=${MODULES}:mod_ifsession
@ -232,9 +243,18 @@ CONFIGURE_ARGS+= --with-libraries=${LIBDIRS}
MODULES!=${ECHO} ${MODULES} | ${SED} -e 's,^:,,' -e 's,:$$,,'
post-extract:
.if defined(WITH_CLAMAV)
@${MV} ${WRKDIR}/mod_clamav_new.c ${WRKSRC}/modules/mod_clamav.c
.endif
post-patch:
.if defined(WITH_NLS)
@${REINPLACE_CMD} -e 's|-lsupp|-lsupp -lintl|g' ${WRKSRC}/Makefile.in
.endif
.if defined(WITH_LDAP_TLS)
@${REINPLACE_CMD} -e 's:/\* #define USE_LDAP_TLS \*/:#define USE_LDAP_TLS:' \
${WRKSRC}/contrib/mod_ldap.c
.endif
@${REINPLACE_CMD} -e 's|proftpd\.conf|proftpd.conf.sample|g' ${WRKSRC}/Makefile.in

View File

@ -1,3 +1,6 @@
MD5 (proftpd-1.3.1rc3.tar.bz2) = 485af3aee9ecebfeae1ae2003250a3a9
SHA256 (proftpd-1.3.1rc3.tar.bz2) = 9bad65ea4ddca40547ca6bb1aa337c7d4ae54752bb9f5fc76124a8c4535daefd
SIZE (proftpd-1.3.1rc3.tar.bz2) = 1538700
MD5 (mod_clamav-0.5.tar.bz2) = a098b630db1aa4ce02d77be84c21e59d
SHA256 (mod_clamav-0.5.tar.bz2) = badab5d0577439e4de4a4d8fa6d1035da4884cc5b8e5569057816da4ced9667f
SIZE (mod_clamav-0.5.tar.bz2) = 3027

View File

@ -0,0 +1,51 @@
---contrib/mod_ldap.c.orig 2007-07-02 15:20:31.000000000 -0800
+++ contrib/mod_ldap.c 2007-08-27 13:48:11.000000000 -0800
@@ -22,7 +22,7 @@
*/
/*
- * mod_ldap v2.8.17-20070701
+ * mod_ldap v2.8.17
*
* Thanks for patches go to (in alphabetical order):
*
@@ -48,7 +48,7 @@
* LDAPDefaultAuthScheme
*
*
- * $Id: mod_ldap.c,v 1.54 2007/07/02 23:20:31 jwm Exp $
+ * $Id: mod_ldap.c,v 1.57 2007/08/22 02:00:06 jwm Exp $
* $Libraries: -lldap -llber$
*/
@@ -70,7 +70,7 @@
#include "conf.h"
#include "privs.h"
-#define MOD_LDAP_VERSION "mod_ldap/2.8.17-20070701"
+#define MOD_LDAP_VERSION "mod_ldap/2.8.17"
#if PROFTPD_VERSION_NUMBER < 0x0001021002
# error MOD_LDAP_VERSION " requires ProFTPD 1.2.10rc2 or later"
@@ -2245,8 +2245,8 @@
* ldap_init() will connect to the LDAP SDK's default.
*/
if ((c = find_config(main_server->conf, CONF_PARAM, "LDAPServer", FALSE)) != NULL) {
- if (strcmp(c->argv[1], "url") == 0) {
- url = c->argv[2];
+ if (strcmp(c->argv[0], "url") == 0) {
+ url = c->argv[1];
if (url) {
#ifdef LDAP_OPT_X_TLS_HARD
if (strcmp(url->lud_scheme, "ldaps") == 0) {
@@ -2269,8 +2269,8 @@
* by other/future callers.
*/
}
- } else if (strcmp(c->argv[1], "host") == 0) {
- ldap_server = c->argv[2];
+ } else if (strcmp(c->argv[0], "host") == 0) {
+ ldap_server = c->argv[1];
} else {
/* This should never happen, since the configuration handler for
* LDAPServer only passes url or host, but we'll be defensive.

View File

@ -1,11 +0,0 @@
--- contrib/mod_ldap.c.orig Thu Oct 19 18:18:07 2006
+++ contrib/mod_ldap.c Fri Dec 15 11:01:21 2006
@@ -60,7 +60,7 @@
* after connecting to the LDAP server. If TLS cannot be enabled, the LDAP
* connection will fail.
*/
-/* #define USE_LDAP_TLS */
+#define USE_LDAP_TLS */
/*
* If you have to edit anything below this line, it's a bug. Report it