summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Felisberto <humpback@gentoo.org>2006-06-23 15:28:34 +0000
committerGustavo Felisberto <humpback@gentoo.org>2006-06-23 15:28:34 +0000
commit6bb7d2a90cef5f31b44935172b32d45e2ca704fc (patch)
tree87084631adb22798c2af97119fd3c1b735bd8321 /net-ftp
parentlocal use flags for proftpd 1.3 (diff)
downloadgentoo-2-6bb7d2a90cef5f31b44935172b32d45e2ca704fc.tar.gz
gentoo-2-6bb7d2a90cef5f31b44935172b32d45e2ca704fc.tar.bz2
gentoo-2-6bb7d2a90cef5f31b44935172b32d45e2ca704fc.zip
bumped to 1.3 and added modules
(Portage version: 2.1.1_pre1-r1)
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/proftpd/ChangeLog9
-rw-r--r--net-ftp/proftpd/files/digest-proftpd-1.3.012
-rw-r--r--net-ftp/proftpd/files/mod_sql_mysql.diff60
-rwxr-xr-xnet-ftp/proftpd/files/proftpd.rc6-r229
-rw-r--r--net-ftp/proftpd/proftpd-1.3.0.ebuild207
5 files changed, 316 insertions, 1 deletions
diff --git a/net-ftp/proftpd/ChangeLog b/net-ftp/proftpd/ChangeLog
index 9136e2081cf1..c39312a99ec1 100644
--- a/net-ftp/proftpd/ChangeLog
+++ b/net-ftp/proftpd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-ftp/proftpd
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.106 2006/05/27 14:24:49 humpback Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.107 2006/06/23 15:28:34 humpback Exp $
+
+*proftpd-1.3.0 (23 Jun 2006)
+
+ 23 Jun 2006; Gustavo Felisberto <humpback@gentoo.org>;
+ +files/mod_sql_mysql.diff, +files/proftpd.rc6-r2, +proftpd-1.3.0.ebuild:
+ Adding new version with extra modules. If any problems appear please report
+ them back in bug #111668.
27 May 2006; Gustavo Felisberto <humpback@gentoo.org>; metadata.xml,
-proftpd-1.2.9-r2.ebuild, -proftpd-1.2.10.ebuild,
diff --git a/net-ftp/proftpd/files/digest-proftpd-1.3.0 b/net-ftp/proftpd/files/digest-proftpd-1.3.0
new file mode 100644
index 000000000000..b54252a9e91e
--- /dev/null
+++ b/net-ftp/proftpd/files/digest-proftpd-1.3.0
@@ -0,0 +1,12 @@
+MD5 1786d61986bde69ef9c3d882cd90c7ae mod_clamav.c 6338
+RMD160 0a642be8149ee118426bf04d04eca5b2250ea2b2 mod_clamav.c 6338
+SHA256 d3b7da4b145b355fe4d05f453d6803a7c6b0bf99af2aedbd65431ae6b98a4db7 mod_clamav.c 6338
+MD5 90df329b43b29cea757efb6b11dcc87d mod_clamav.html 4151
+RMD160 8ada0d2126ff1977d9277e0f5a1464caaf5f7b62 mod_clamav.html 4151
+SHA256 4e6c3936ba307376561dd164c52964c14a83bcb23fd5801eaaab22be325370bc mod_clamav.html 4151
+MD5 fae47d01b52e035eb6b7190e74c17722 proftpd-1.3.0.tar.bz2 1386086
+RMD160 46cdd29a6c6ce4c3dd8f1a972df0a52b90a6d2ec proftpd-1.3.0.tar.bz2 1386086
+SHA256 83f220cba64455a2b1701b97ce9896f66a0020b179c50daf4860cdf362464ffe proftpd-1.3.0.tar.bz2 1386086
+MD5 a81c3ed2d45f7c938416a970fd559703 proftpd-mod-shaper-0.5.6.tar.gz 18099
+RMD160 3727e4407728727da4e6546e01b86c6b2cb68657 proftpd-mod-shaper-0.5.6.tar.gz 18099
+SHA256 b846b9f4d8601a7ce426afa049b26db4da4ee8226ff61af97b0ca86b2fb8c827 proftpd-mod-shaper-0.5.6.tar.gz 18099
diff --git a/net-ftp/proftpd/files/mod_sql_mysql.diff b/net-ftp/proftpd/files/mod_sql_mysql.diff
new file mode 100644
index 000000000000..decc24d47d73
--- /dev/null
+++ b/net-ftp/proftpd/files/mod_sql_mysql.diff
@@ -0,0 +1,60 @@
+--- /var/tmp/portage/proftpd-1.3.0_rc5/work/proftpd-1.3.0rc5/contrib/mod_sql_mysql.c 2005-06-27 22:41:14.000000000 +0200
++++ /contrib/mod_sql_mysql.c 2006-04-18 04:00:14.000000000 +0200
+@@ -158,7 +158,8 @@
+ char *pass;
+ char *db;
+ char *port;
+-
++ char *unix_socket;
++
+ MYSQL *mysql;
+
+ };
+@@ -431,7 +432,7 @@
+ mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client");
+
+ if (!mysql_real_connect(conn->mysql, conn->host, conn->user, conn->pass,
+- conn->db, (int) strtol(conn->port, (char **) NULL, 10), NULL,
++ conn->db, (int) strtol(conn->port, (char **) NULL, 10), conn->unix_socket,
+ CLIENT_INTERACTIVE)) {
+
+ /* If it didn't work, return an error. */
+@@ -575,6 +576,7 @@
+ char *db = NULL;
+ char *host = NULL;
+ char *port = NULL;
++ char *unix_socket = NULL;
+
+ char *havehost = NULL;
+ char *haveport = NULL;
+@@ -630,6 +632,20 @@
+ conn->db = pstrdup(conn_pool, db);
+ conn->port = pstrdup(conn_pool, port);
+
++ /* if host is a unix socket perse it, otherwise default it.
++ * from dovecot 1.0 beta 7 driver-mysql.c
++ */
++
++ if (*conn->host == '/') {
++ unix_socket = conn->host;
++ host = NULL;
++ conn->host = pstrdup(conn_pool, host);
++ } else {
++ unix_socket = NULL;
++ }
++
++ conn->unix_socket = pstrdup(conn_pool, unix_socket);
++
+ /* insert the new conn_info into the connection hash */
+ if (!(entry = _sql_add_connection(conn_pool, name, (void *) conn))) {
+ sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection");
+@@ -650,8 +666,8 @@
+ sql_log(DEBUG_INFO, " host: '%s'", conn->host);
+ sql_log(DEBUG_INFO, " db: '%s'", conn->db);
+ sql_log(DEBUG_INFO, " port: '%s'", conn->port);
++ sql_log(DEBUG_INFO, "unix_socket: '%s'", conn->unix_socket);
+ sql_log(DEBUG_INFO, " ttl: '%d'", entry->ttl);
+-
+ sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection");
+ return HANDLED(cmd);
+ }
diff --git a/net-ftp/proftpd/files/proftpd.rc6-r2 b/net-ftp/proftpd/files/proftpd.rc6-r2
new file mode 100755
index 000000000000..422e16e768ac
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.rc6-r2
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6-r2,v 1.1 2006/06/23 15:28:34 humpback Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/proftpd/proftpd.conf ] ; then
+ eerror "You need an /etc/proftpd/proftpd.conf file first"
+ eerror "There is a sample file in /etc/proftpd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting proftpd"
+ start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/proftpd.pid --exec /usr/sbin/proftpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping proftpd"
+ start-stop-daemon --stop --retry 20 --quiet --pidfile /var/run/proftpd.pid
+ eend $?
+}
diff --git a/net-ftp/proftpd/proftpd-1.3.0.ebuild b/net-ftp/proftpd/proftpd-1.3.0.ebuild
new file mode 100644
index 000000000000..4347ffc10d49
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.0.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.0.ebuild,v 1.1 2006/06/23 15:28:34 humpback Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+IUSE="hardened ipv6 ldap mysql pam postgres shaper softquota ssl tcpd
+ selinux sendfile noauthunix authfile ncurses xinetd acl sitemisc rewrite clamav opensslcrypt ifsession radius vroot"
+
+SHAPER_VER="0.5.6"
+S=${WORKDIR}/${P}
+
+DESCRIPTION="An advanced and very configurable FTP server"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P}.tar.bz2
+ shaper? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-shaper-${SHAPER_VER}.tar.gz )
+ clamav? ( http://www.uglyboxindustries.com/mod_clamav.c http://www.uglyboxindustries.com/mod_clamav.html )"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.uglyboxindustries.com/open-source.php"
+
+SLOT="0"
+LICENSE="GPL-2"
+#removed mips due to dep issue with clamav
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+
+DEPEND="pam? ( || ( virtual/pam sys-libs/pam ) )
+ mysql? ( >=dev-db/mysql-3.23.26 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ postgres? ( >=dev-db/postgresql-7.3 )
+ ssl? ( >=dev-libs/openssl-0.9.6f )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r3 )
+ ncurses? ( sys-libs/ncurses )
+ xinetd? ( sys-apps/xinetd )
+ acl? ( sys-apps/acl sys-apps/attr )
+ clamav? ( app-antivirus/clamav )
+ opensslcrypt? ( >=dev-libs/openssl-0.9.6f )"
+
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftpd )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ cd ${S}
+ epatch "${FILESDIR}"/mod_sql_mysql.diff
+ if use shaper; then
+ unpack ${PN}-mod-shaper-${SHAPER_VER}.tar.gz
+ mv mod_shaper/mod_shaper.c contrib/
+ fi
+ if use clamav; then
+ cp "${DISTDIR}"/mod_clamav.c contrib/
+ cp "${DISTDIR}"/mod_clamav.html doc/
+ fi
+}
+
+src_compile() {
+ addpredict /etc/krb5.conf
+ local modules myconf
+
+ modules="mod_ratio:mod_readme"
+ use pam && modules="${modules}:mod_auth_pam"
+ use tcpd && modules="${modules}:mod_wrap"
+ use shaper && modules="${modules}:mod_shaper"
+ use acl && modules="${modules}:mod_facl"
+ use sitemisc && modules="${modules}:mod_site_misc"
+ use rewrite && modules="${modules}:mod_rewrite"
+ use clamav && modules="${modules}:mod_clamav"
+
+ if use ldap; then
+ einfo ldap
+ modules="${modules}:mod_ldap"
+ append-ldflags "-lresolv"
+ fi
+
+ if use ssl; then
+ einfo ssl
+ # enable mod_tls
+ modules="${modules}:mod_tls"
+ fi
+
+ if use opensslcrypt; then
+ einfo OpenSSL crypt
+ # enable OpenSSL crypt
+ append-ldflags "-lcrypto"
+ myconf="${myconf} --with-includes=/usr/include/openssl"
+ CFLAGS="${CFLAGS} -DHAVE_OPENSSL"
+ fi
+
+ if use mysql && use postgres
+ then
+ ewarn "ProFTPD only supports either the MySQL or PostgreSQL modules."
+ ewarn "Presently this ebuild defaults to mysql. If you would like to"
+ ewarn "change the default behaviour, merge ProFTPD with;"
+ ewarn "USE=\"-mysql postgres\" emerge proftpd"
+ epause 5
+ fi
+
+ if use mysql; then
+ modules="${modules}:mod_sql:mod_sql_mysql"
+ myconf="${myconf} --with-includes=/usr/include/mysql"
+ elif use postgres; then
+ modules="${modules}:mod_sql:mod_sql_postgres"
+ myconf="${myconf} --with-includes=/usr/include/postgresql"
+ fi
+
+ if use softquota; then
+ modules="${modules}:mod_quotatab"
+ if use mysql || use postgres; then
+ modules="${modules}:mod_quotatab_sql"
+ fi
+ if use ldap; then
+ modules="${modules}:mod_quotatab_file:mod_quotatab_ldap"
+ else
+ modules="${modules}:mod_quotatab_file"
+ fi
+ fi
+
+ if use ifsession; then
+ einfo ifsession
+ modules="${modules}:mod_ifsession"
+ fi
+
+ if use radius; then
+ einfo radius
+ modules="${modules}:mod_radius"
+ fi
+
+ if use vroot; then
+ einfo radius
+ modules="${modules}:mod_vroot"
+ fi
+
+ # bug #30359
+ use hardened && echo > lib/libcap/cap_sys.c
+ gcc-specs-pie && echo > lib/libcap/cap_sys.c
+
+ if use noauthunix ; then
+ myconf="${myconf} --disable-auth-unix"
+ else
+ myconf="${myconf} --enable-auth-unix"
+ fi
+
+ econf \
+ --sbindir=/usr/sbin \
+ --localstatedir=/var/run \
+ --sysconfdir=/etc/proftpd \
+ --enable-shadow \
+ --enable-autoshadow \
+ --enable-ctrls \
+ --with-modules=${modules} \
+ $(use_enable authfile auth-file) \
+ $(use_enable ncurses) \
+ $(use_enable ipv6) \
+ $(use_with sendfile) \
+ $(use_enable acl facl ) \
+ ${myconf} || die "bad ./configure"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ # Note rundir needs to be specified to avoid sandbox violation
+ # on initial install. See Make.rules
+ make DESTDIR=${D} install || die
+
+ keepdir /var/run/proftpd
+
+ dodoc ${FILESDIR}/proftpd.conf \
+ COPYING CREDITS ChangeLog NEWS README* \
+ doc/license.txt
+ dohtml doc/*.html
+
+ use shaper && dohtml mod_shaper/mod_shaper.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ mv ${D}/etc/proftpd/proftpd.conf ${D}/etc/proftpd/proftpd.conf.distrib
+
+ insinto /etc/proftpd
+ newins ${FILESDIR}/proftpd.conf proftpd.conf.sample
+
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ newins ${FILESDIR}/proftpd.xinetd proftpd
+ fi
+
+ newinitd ${FILESDIR}/proftpd.rc6-r2 proftpd
+}
+
+pkg_postinst() {
+ if use sendfile; then
+ einfo
+ einfo 'Please note that ProFTPD now uses the sendfile() system calls when possible to'
+ einfo 'improve performance. The downside of this is that the scoreboard file cannot be'
+ einfo 'updated during a download, so tools like ftpwho and ftptop will not show the'
+ einfo 'transfer rates for them. Upload transfer rates will still be displayed.'
+ fi
+
+ einfo
+ einfo 'You can find the config files in /etc/proftpd'
+ einfo
+ ewarn 'With introduction of net-ftp/ftpbase the ftp user is now ftp.'
+ ewarn 'Remember to change that in the configuration file.'
+}
+