From fc0a5ee5691a9e5744aade09286dc817a79dda6f Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Sat, 23 Sep 2006 18:17:38 +0000 Subject: Cleanup proftpd. (Portage version: 2.1.2_pre1) --- net-ftp/proftpd/ChangeLog | 20 ++- net-ftp/proftpd/files/proftpd-1.2.10-ftpshut.patch | 24 ++++ .../proftpd-1.2.10-gcc4_mod_quotatab_sql.patch | 12 ++ .../files/proftpd-1.2.10-openssl_0.9.8.patch | 21 +++ .../proftpd/files/proftpd-1.2.10-sqlshowinfo.patch | 38 ++++++ .../files/proftpd-1.3.0-mod_sql_mysql.patch | 128 ++++++++++++++++++ net-ftp/proftpd/files/proftpd.conf | 61 +++++---- net-ftp/proftpd/files/proftpd.rc6 | 8 +- net-ftp/proftpd/proftpd-1.2.10-r7.ebuild | 147 ++++++++++----------- net-ftp/proftpd/proftpd-1.3.0-r1.ebuild | 126 ++++++++++-------- 10 files changed, 419 insertions(+), 166 deletions(-) create mode 100644 net-ftp/proftpd/files/proftpd-1.2.10-ftpshut.patch create mode 100644 net-ftp/proftpd/files/proftpd-1.2.10-gcc4_mod_quotatab_sql.patch create mode 100644 net-ftp/proftpd/files/proftpd-1.2.10-openssl_0.9.8.patch create mode 100644 net-ftp/proftpd/files/proftpd-1.2.10-sqlshowinfo.patch create mode 100644 net-ftp/proftpd/files/proftpd-1.3.0-mod_sql_mysql.patch (limited to 'net-ftp') diff --git a/net-ftp/proftpd/ChangeLog b/net-ftp/proftpd/ChangeLog index 61003fbc549a..8aecea5c41e2 100644 --- a/net-ftp/proftpd/ChangeLog +++ b/net-ftp/proftpd/ChangeLog @@ -1,6 +1,24 @@ # 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.120 2006/09/23 15:37:41 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.121 2006/09/23 18:17:38 chtekk Exp $ + + 23 Sep 2006; Luca Longinotti + -files/openssl-0.9.8.patch, -files/proftpd-1.2.9-makefile.patch, + -files/proftpd-1.2.9-privescal-fix.patch, + -files/1.2.9_rc3-reversedns.diff, +files/proftpd-1.2.10-ftpshut.patch, + +files/proftpd-1.2.10-gcc4_mod_quotatab_sql.patch, + +files/proftpd-1.2.10-openssl_0.9.8.patch, + +files/proftpd-1.2.10-sqlshowinfo.patch, + +files/proftpd-1.3.0-mod_sql_mysql.patch, -files/ftp.pamd, + -files/ftp.pamd-include, -files/gcc4-mod_quotatab_sql.patch, + -files/mod_sql_mysql.diff, -files/mod_sql_postgres.c.patch, + files/proftpd.conf, files/proftpd.rc6, -files/proftpd.rc6-r2, + -files/proftpd-ftpshut.patch, -files/proftpd-sqlshowinfo.patch, + proftpd-1.2.10-r7.ebuild, proftpd-1.3.0-r1.ebuild: + General ebuild and filesdir cleanup, sync 1.2.10 and 1.3.0 ebuilds for + easier maintainance. No functional or changes in the result, so no revbump. + Fix stripping of files (QA notice). Fix default user not present, which + broke the default sample config. 23 Sep 2006; Tobias Scherbaum proftpd-1.3.0-r1.ebuild: diff --git a/net-ftp/proftpd/files/proftpd-1.2.10-ftpshut.patch b/net-ftp/proftpd/files/proftpd-1.2.10-ftpshut.patch new file mode 100644 index 000000000000..17a57f938eca --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.2.10-ftpshut.patch @@ -0,0 +1,24 @@ +Index: src/response.c +=================================================================== +RCS file: /cvsroot/proftp/proftpd/src/response.c,v +retrieving revision 1.4 +diff -u -r1.4 response.c +--- src/response.c 3 Jun 2003 16:25:23 -0000 1.4 ++++ src/response.c 27 Jun 2005 23:03:35 -0000 +@@ -1,6 +1,6 @@ + /* + * ProFTPD - FTP server daemon +- * Copyright (c) 2001, 2002, 2003 The ProFTPD Project team ++ * Copyright (c) 2001-2005 The ProFTPD Project team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -169,7 +169,7 @@ + buf[sizeof(buf) - 1] = '\0'; + sstrcat(buf, "\r\n", sizeof(buf)); + +- RESPONSE_WRITE_STR_ASYNC(session.c->outstrm, buf, strlen(buf)) ++ RESPONSE_WRITE_STR_ASYNC(session.c->outstrm, "%s", buf) + } + + void pr_response_send(const char *resp_numeric, const char *fmt, ...) { diff --git a/net-ftp/proftpd/files/proftpd-1.2.10-gcc4_mod_quotatab_sql.patch b/net-ftp/proftpd/files/proftpd-1.2.10-gcc4_mod_quotatab_sql.patch new file mode 100644 index 000000000000..8cfdd22a04ad --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.2.10-gcc4_mod_quotatab_sql.patch @@ -0,0 +1,12 @@ +--- proftpd-1.2.10/contrib/mod_quotatab_sql.c.orig 2006-09-04 11:21:09.000000000 +0000 ++++ proftpd-1.2.10/contrib/mod_quotatab_sql.c 2006-09-04 11:22:27.000000000 +0000 +@@ -684,8 +684,7 @@ + return NULL; + } + +- tab->tab_data = pcalloc(tab->tab_pool, sizeof(char)); +- ((char *) tab->tab_data) = pstrdup(tab->tab_pool, select_query); ++ tab->tab_data = (void *) pstrdup(tab->tab_pool, select_query); + } + + /* Set all the necessary function pointers. */ diff --git a/net-ftp/proftpd/files/proftpd-1.2.10-openssl_0.9.8.patch b/net-ftp/proftpd/files/proftpd-1.2.10-openssl_0.9.8.patch new file mode 100644 index 000000000000..7601d4b26a4d --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.2.10-openssl_0.9.8.patch @@ -0,0 +1,21 @@ +Index: contrib/mod_tls.c +=================================================================== +RCS file: /cvsroot/proftp/proftpd/contrib/mod_tls.c,v +retrieving revision 1.77 +retrieving revision 1.78 +diff -u -r1.77 -r1.78 +--- contrib/mod_tls.c 14 Jun 2005 01:23:44 -0000 1.77 ++++ contrib/mod_tls.c 18 Jun 2005 21:05:34 -0000 1.78 +@@ -568,7 +568,12 @@ + } + } + ++#if OPENSSL_VERSION_NUMBER < 0x00908001 + PEMerr(PEM_F_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); ++#else ++ PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD); ++#endif ++ + pr_memscrub(buf, buflen); + return -1; + } diff --git a/net-ftp/proftpd/files/proftpd-1.2.10-sqlshowinfo.patch b/net-ftp/proftpd/files/proftpd-1.2.10-sqlshowinfo.patch new file mode 100644 index 000000000000..9bf501a3d2da --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.2.10-sqlshowinfo.patch @@ -0,0 +1,38 @@ +--- /var/tmp/portage/proftpd-1.2.10-r7/work/proftpd-1.2.10/contrib/mod_sql.c 2004-08-03 01:44:31.000000000 +0100 ++++ contrib/mod_sql.c 2005-07-29 16:36:08.251407235 +0100 +@@ -2036,7 +2036,7 @@ + *outsp++ = 0; + + /* add the response */ +- pr_response_add( c->argv[0], outs); ++ pr_response_add(c->argv[0], "%s", outs); + + } while((c = find_config_next(c, c->next, CONF_PARAM, name, FALSE)) != NULL); + +@@ -2110,7 +2110,7 @@ + *outsp++ = 0; + + /* add the response */ +- pr_response_add( c->argv[0], outs); ++ pr_response_add(c->argv[0], "%s", outs); + + } while((c = find_config_next(c, c->next, CONF_PARAM, name, FALSE)) != NULL); + +@@ -2201,7 +2201,7 @@ + *outsp++ = 0; + + /* add the response */ +- pr_response_add_err( c->argv[0], outs); ++ pr_response_add_err(c->argv[0], "%s", outs); + + } while((c = find_config_next(c, c->next, CONF_PARAM, name, FALSE)) != NULL); + +@@ -2275,7 +2275,7 @@ + *outsp++ = 0; + + /* add the response */ +- pr_response_add( c->argv[0], outs); ++ pr_response_add(c->argv[0], "%s", outs); + + } while((c = find_config_next(c, c->next, CONF_PARAM, name, FALSE)) != NULL); + diff --git a/net-ftp/proftpd/files/proftpd-1.3.0-mod_sql_mysql.patch b/net-ftp/proftpd/files/proftpd-1.3.0-mod_sql_mysql.patch new file mode 100644 index 000000000000..be382c6835d2 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.0-mod_sql_mysql.patch @@ -0,0 +1,128 @@ +Index: contrib/mod_sql_mysql.c +=================================================================== +RCS file: /cvsroot/proftp/proftpd/contrib/mod_sql_mysql.c,v +retrieving revision 1.40 +diff -u -r1.40 mod_sql_mysql.c +--- contrib/mod_sql_mysql.c 21 Apr 2006 01:59:45 -0000 1.40 ++++ contrib/mod_sql_mysql.c 26 May 2006 18:37:14 -0000 +@@ -128,7 +128,7 @@ + * Internal define used for debug and logging. All backends are encouraged + * to use the same format. + */ +-#define MOD_SQL_MYSQL_VERSION "mod_sql_mysql/4.05" ++#define MOD_SQL_MYSQL_VERSION "mod_sql_mysql/4.0.7" + + #define _MYSQL_PORT "3306" + +@@ -158,6 +158,7 @@ + char *pass; + char *db; + char *port; ++ char *unix_sock; + + MYSQL *mysql; + +@@ -431,8 +432,8 @@ + 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, +- CLIENT_INTERACTIVE)) { ++ conn->db, (int) strtol(conn->port, (char **) NULL, 10), ++ conn->unix_sock, CLIENT_INTERACTIVE)) { + + /* If it didn't work, return an error. */ + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_open"); +@@ -567,8 +568,7 @@ + * a number or ttl is negative, the connection will be assumed to have no + * associated timer. + */ +-MODRET cmd_defineconnection(cmd_rec *cmd) +-{ ++MODRET cmd_defineconnection(cmd_rec *cmd) { + char *info = NULL; + char *name = NULL; + +@@ -586,12 +586,14 @@ + + _sql_check_cmd(cmd, "cmd_defineconnection"); + +- if ((cmd->argc < 4) || (cmd->argc > 5) || (!cmd->argv[0])) { ++ if (cmd->argc < 4 || ++ cmd->argc > 5 || ++ !cmd->argv[0]) { + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection"); + return ERROR_MSG(cmd, MOD_SQL_MYSQL_VERSION, "badly formed request"); + } + +- conn = (db_conn_t *) palloc(conn_pool, sizeof(db_conn_t)); ++ conn = (db_conn_t *) pcalloc(conn_pool, sizeof(db_conn_t)); + + name = pstrdup(conn_pool, cmd->argv[0]); + conn->user = pstrdup(conn_pool, cmd->argv[1]); +@@ -615,6 +617,7 @@ + if (haveport) { + port = haveport + 1; + *haveport = '\0'; ++ + } else { + port = _MYSQL_PORT; + } +@@ -622,16 +625,28 @@ + if (havehost) { + host = havehost + 1; + *havehost = '\0'; ++ + } else { + host = "localhost"; + } + +- conn->host = pstrdup(conn_pool, host); ++ /* Hack to support ability to configure path to Unix domain socket ++ * for MySQL: if the host string starts with a '/', assume it's ++ * a path to the Unix domain socket to use. ++ */ ++ if (*host == '/') { ++ conn->unix_sock = pstrdup(conn_pool, host); ++ ++ } else { ++ conn->host = pstrdup(conn_pool, host); ++ } ++ + conn->db = pstrdup(conn_pool, db); + conn->port = pstrdup(conn_pool, port); + +- /* insert the new conn_info into the connection hash */ +- if (!(entry = _sql_add_connection(conn_pool, name, (void *) conn))) { ++ /* Insert the new conn_info into the connection hash */ ++ entry = _sql_add_connection(conn_pool, name, (void *) conn); ++ if (!entry) { + sql_log(DEBUG_FUNC, "%s", "exiting \tmysql cmd_defineconnection"); + return ERROR_MSG(cmd, MOD_SQL_MYSQL_VERSION, + "named connection already exists"); +@@ -645,12 +660,19 @@ + entry->timer = 0; + entry->connections = 0; + +- sql_log(DEBUG_INFO, " name: '%s'", entry->name); +- sql_log(DEBUG_INFO, " user: '%s'", conn->user); +- 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, " ttl: '%d'", entry->ttl); ++ sql_log(DEBUG_INFO, " name: '%s'", entry->name); ++ sql_log(DEBUG_INFO, " user: '%s'", conn->user); ++ ++ if (conn->host) { ++ sql_log(DEBUG_INFO, " host: '%s'", conn->host); ++ ++ } else if (conn->unix_sock) { ++ sql_log(DEBUG_INFO, "socket: '%s'", conn->unix_sock); ++ } ++ ++ sql_log(DEBUG_INFO, " db: '%s'", conn->db); ++ sql_log(DEBUG_INFO, " port: '%s'", conn->port); ++ 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.conf b/net-ftp/proftpd/files/proftpd.conf index 44f78406e225..0d4eb3e6466b 100644 --- a/net-ftp/proftpd/files/proftpd.conf +++ b/net-ftp/proftpd/files/proftpd.conf @@ -1,14 +1,14 @@ # This is a basic ProFTPD configuration file (rename it to -# 'proftpd.conf' for actual use. It establishes a single server -# and a single anonymous login. It assumes that you have a user/group -# "nobody" and "ftp" for normal operation and anon. - -ServerName "ProFTPD Default Installation" -ServerType standalone -DefaultServer on -RequireValidShell off -AuthPAM off -AuthPAMConfig ftp +# 'proftpd.conf' for actual use. It establishes a single server +# and a single anonymous login. It assumes that you have a user/group +# "nobody" and "ftp" for normal operation and anonymous access. + +ServerName "ProFTPD Default Installation" +ServerType standalone +DefaultServer on +RequireValidShell off +AuthPAM off +AuthPAMConfig ftp # Port 21 is the standard FTP port. Port 21 @@ -17,12 +17,12 @@ Port 21 Umask 022 # To prevent DoS attacks, set the maximum number of child processes -# to 30. If you need to allow more than 30 concurrent connections -# at once, simply increase this value. Note that this ONLY works +# to 30. If you need to allow more than 30 concurrent connections +# at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server -# that allows you to limit maximum number of processes per service +# that allows you to limit the maximum number of processes per service # (such as xinetd). -MaxInstances 30 +MaxInstances 30 # Set the user and group under which the server will run. User proftpd @@ -30,28 +30,27 @@ Group proftpd # Normally, we want files to be overwriteable. - AllowOverwrite on + AllowOverwrite on -# A basic anonymous configuration, no upload directories. +# A basic anonymous configuration, with no upload directories. - User ftp - Group ftp + User ftp + Group ftp - # We want clients to be able to login with "anonymous" as well as "ftp" - UserAlias anonymous ftp + # We want clients to be able to login with "anonymous" as well as "ftp". + UserAlias anonymous ftp - # Limit the maximum number of anonymous logins - MaxClients 10 + # Limit the maximum number of anonymous logins. + MaxClients 10 - # We want 'welcome.msg' displayed at login, and '.message' displayed - # in each newly chdired directory. - DisplayLogin welcome.msg - DisplayFirstChdir .message - - # Limit WRITE everywhere in the anonymous chroot - - DenyAll - + # We want 'welcome.msg' displayed at login, and '.message' displayed + # in each newly chdired directory. + DisplayLogin welcome.msg + DisplayFirstChdir .message + # Limit WRITE everywhere in the anonymous chroot. + + DenyAll + diff --git a/net-ftp/proftpd/files/proftpd.rc6 b/net-ftp/proftpd/files/proftpd.rc6 index a86b2fdefad2..d543ded32bba 100644 --- a/net-ftp/proftpd/files/proftpd.rc6 +++ b/net-ftp/proftpd/files/proftpd.rc6 @@ -1,7 +1,7 @@ #!/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,v 1.9 2004/07/14 23:42:49 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6,v 1.10 2006/09/23 18:17:38 chtekk Exp $ depend() { need net @@ -9,8 +9,8 @@ depend() { 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" + eerror "You need an /etc/proftpd/proftpd.conf file first!" + eerror "There is a sample file in /etc/proftpd." return 1 fi } @@ -18,7 +18,7 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting proftpd" - start-stop-daemon --start --quiet --exec /usr/sbin/proftpd -- /var/run/proftpd.pid + start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/proftpd.pid --exec /usr/sbin/proftpd eend $? } diff --git a/net-ftp/proftpd/proftpd-1.2.10-r7.ebuild b/net-ftp/proftpd/proftpd-1.2.10-r7.ebuild index 3398dc2de699..9670b245466f 100644 --- a/net-ftp/proftpd/proftpd-1.2.10-r7.ebuild +++ b/net-ftp/proftpd/proftpd-1.2.10-r7.ebuild @@ -1,54 +1,68 @@ # 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.2.10-r7.ebuild,v 1.10 2006/09/06 14:35:22 humpback Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.2.10-r7.ebuild,v 1.11 2006/09/23 18:17:38 chtekk Exp $ -inherit flag-o-matic eutils +inherit eutils flag-o-matic toolchain-funcs -IUSE="hardened ipv6 ldap mysql pam postgres shaper softquota ssl tcpd - selinux sendfile noauthunix authfile ncurses xinetd" +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86" + +IUSE="authfile hardened ipv6 ldap mysql ncurses noauthunix pam postgres selinux sendfile shaper softquota ssl tcpd xinetd" + +SHAPER_VER="0.5.5" -MY_P=${P/_/} -S=${WORKDIR}/${MY_P} +S="${WORKDIR}/${P}" -DESCRIPTION="An advanced and very configurable FTP server" -SRC_URI="ftp://ftp.proftpd.org/distrib/source/${MY_P}.tar.bz2 - shaper? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-shaper-0.5.5.tar.gz )" -HOMEPAGE="http://www.proftpd.org/" +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 )" +HOMEPAGE="http://www.proftpd.org/ + http://www.castaglia.org/proftpd/" SLOT="0" LICENSE="GPL-2" -KEYWORDS="alpha amd64 hppa ~mips 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 )" +DEPEND="ldap? ( >=net-nds/openldap-1.2.11 ) + mysql? ( >=dev-db/mysql-3.23.26 ) + ncurses? ( sys-libs/ncurses ) + pam? ( virtual/pam ) + postgres? ( >=dev-db/postgresql-7.3 ) + ssl? ( >=dev-libs/openssl-0.9.6f ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6-r3 ) + xinetd? ( sys-apps/xinetd )" RDEPEND="${DEPEND} net-ftp/ftpbase selinux? ( sec-policy/selinux-ftpd )" +pkg_setup() { + # Add the proftpd user to make the default config + # work out-of-the-box + enewgroup proftpd + enewuser proftpd -1 -1 -1 proftpd +} + src_unpack() { - unpack ${MY_P}.tar.bz2 - cd ${S} - if use shaper; then - unpack ${PN}-mod-shaper-0.5.5.tar.gz - mv mod_shaper/mod_shaper.c contrib/ + unpack ${P}.tar.bz2 + + cd "${S}" + + # Fix stripping of files + sed -e "s| @INSTALL_STRIP@||g" -i Make* + + if use shaper ; then + unpack ${PN}-mod-shaper-${SHAPER_VER}.tar.gz + cp -f mod_shaper/mod_shaper.c contrib/ fi # Fix ftpshut and SqlShowInfo, bug #100364 - epatch "${FILESDIR}/proftpd-ftpshut.patch" - epatch "${FILESDIR}/proftpd-sqlshowinfo.patch" + epatch "${FILESDIR}/${P}-ftpshut.patch" + epatch "${FILESDIR}/${P}-sqlshowinfo.patch" - # Fix gcc4 compile error, bug #145940 - epatch "${FILESDIR}/gcc4-mod_quotatab_sql.patch" + # Fix gcc4 compile errors, bug #145940 + epatch "${FILESDIR}/${P}-gcc4_mod_quotatab_sql.patch" - #Fix openssl 0.9.8 compile error, bug #146534 - epatch "${FILESDIR}/openssl-0.9.8.patch" + # Fix OpenSSL 0.9.8 compile errors, bug #146534 + epatch "${FILESDIR}/${P}-openssl_0.9.8.patch" } src_compile() { @@ -57,62 +71,46 @@ src_compile() { 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 ssl && modules="${modules}:mod_tls" + use tcpd && modules="${modules}:mod_wrap" - if use ldap; then - einfo ldap + if use ldap ; then modules="${modules}:mod_ldap" append-ldflags "-lresolv" fi - if use ssl; then - einfo ssl - # enable mod_tls - modules="${modules}:mod_tls" - fi - - if use mysql && use postgres - then + 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" + ewarn "change the default behaviour, merge ProFTPD with:" + ewarn "USE='-mysql postgres' emerge proftpd" epause 5 fi - if use mysql; then + if use mysql ; then modules="${modules}:mod_sql:mod_sql_mysql" myconf="${myconf} --with-includes=/usr/include/mysql" - elif use postgres; then + elif use postgres ; then modules="${modules}:mod_sql:mod_sql_postgres" myconf="${myconf} --with-includes=/usr/include/postgresql" fi - if use softquota; then + if use softquota ; then modules="${modules}:mod_quotatab" - if use mysql || use postgres; then + if use mysql || use postgres ; then modules="${modules}:mod_quotatab_sql" fi - if use ldap; then + if use ldap ; then modules="${modules}:mod_quotatab_file:mod_quotatab_ldap" else modules="${modules}:mod_quotatab_file" fi fi - # New modules for 1.2.9 - # Not sure how these should be enabled yet as no use variables - # apply currently. Uncomment if you want to use them though. - # -raker 06/16/2003 - # - # modules="${modules}:mod_ifsession" - # modules="${modules}:mod_radius" - # modules="${modules}:mod_rewrite" - # bug #30359 use hardened && echo > lib/libcap/cap_sys.c - has_pic && echo > lib/libcap/cap_sys.c + gcc-specs-pie && echo > lib/libcap/cap_sys.c if use noauthunix ; then myconf="${myconf} --disable-auth-unix" @@ -129,50 +127,51 @@ src_compile() { --enable-ctrls \ --with-modules=${modules} \ $(use_enable authfile auth-file) \ - $(use_enable ncurses) \ $(use_enable ipv6) \ + $(use_enable ncurses) \ $(use_with sendfile) \ - ${myconf} || die "bad ./configure" + ${myconf} || die "econf failed" - emake || die "compile problem" + emake || die "emake failed" } src_install() { # Note rundir needs to be specified to avoid sandbox violation # on initial install. See Make.rules - make DESTDIR=${D} install || die + emake DESTDIR="${D}" install || die "emake install failed" keepdir /var/run/proftpd - dodoc contrib/UPGRADE.mod_sql ${FILESDIR}/proftpd.conf \ + dodoc contrib/UPGRADE.mod_sql "${FILESDIR}/proftpd.conf" \ COPYING CREDITS ChangeLog NEWS README* \ doc/{license.txt,GetConf} 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 + mv -f "${D}/etc/proftpd/proftpd.conf" "${D}/etc/proftpd/proftpd.conf.distrib" insinto /etc/proftpd - newins ${FILESDIR}/proftpd.conf proftpd.conf.sample - + newins "${FILESDIR}/proftpd.conf" proftpd.conf.sample - if use xinetd; then + if use xinetd ; then insinto /etc/xinetd.d - newins ${FILESDIR}/proftpd.xinetd proftpd + newins "${FILESDIR}/proftpd.xinetd" proftpd fi - newinitd ${FILESDIR}/proftpd.rc6 proftpd + newinitd "${FILESDIR}/proftpd.rc6" proftpd } pkg_postinst() { einfo - einfo 'You can find the config files in /etc/proftpd' + einfo "You can find the config files in /etc/proftpd" + einfo + einfo "mod_delay has been causing more bad than good and has been removed." + einfo + ewarn "With the introduction of net-ftp/ftpbase the ftp user is now ftp." + ewarn "Remember to change that in the configuration file." einfo - einfo 'mod_delay has been causing more bad than good and has been removed' - einfo 'see Changelog for more info' - ewarn 'With introduction of net-ftp/ftpbase the ftp user is now ftp.' - ewarn 'Remember to change that in the configuration file.' } diff --git a/net-ftp/proftpd/proftpd-1.3.0-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.0-r1.ebuild index 82bc0a54b4e0..17b7187e4186 100644 --- a/net-ftp/proftpd/proftpd-1.3.0-r1.ebuild +++ b/net-ftp/proftpd/proftpd-1.3.0-r1.ebuild @@ -1,63 +1,77 @@ # 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-r1.ebuild,v 1.9 2006/09/23 15:37:41 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.0-r1.ebuild,v 1.10 2006/09/23 18:17:38 chtekk Exp $ inherit eutils flag-o-matic toolchain-funcs -IUSE="acl authfile clamav hardened ifsession ipv6 ldap mysql ncurses noauthunix opensslcrypt pam postgres - radius rewrite selinux shaper sitemisc softquota ssl tcpd vroot xinetd" +KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86" + +IUSE="acl authfile clamav hardened ifsession ipv6 ldap mysql ncurses noauthunix opensslcrypt pam postgres radius rewrite selinux shaper sitemisc softquota ssl tcpd vroot xinetd" SHAPER_VER="0.5.6" VROOT_VER="0.7.1" -S=${WORKDIR}/${P} +S="${WORKDIR}/${P}" -DESCRIPTION="An advanced and very configurable FTP server" +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 ) - vroot? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-vroot-${VROOT_VER}.tar.gz )" + shaper? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-shaper-${SHAPER_VER}.tar.gz ) + vroot? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-vroot-${VROOT_VER}.tar.gz )" 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="acl? ( sys-apps/acl sys-apps/attr ) - clamav? ( app-antivirus/clamav ) - ldap? ( >=net-nds/openldap-1.2.11 ) - mysql? ( >=dev-db/mysql-3.23.26 ) - ncurses? ( sys-libs/ncurses ) - opensslcrypt? ( >=dev-libs/openssl-0.9.6f ) - pam? ( virtual/pam ) - postgres? ( >=dev-db/postgresql-7.3 ) - ssl? ( >=dev-libs/openssl-0.9.6f ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6-r3 ) - xinetd? ( sys-apps/xinetd )" + clamav? ( app-antivirus/clamav ) + ldap? ( >=net-nds/openldap-1.2.11 ) + mysql? ( >=dev-db/mysql-3.23.26 ) + ncurses? ( sys-libs/ncurses ) + opensslcrypt? ( >=dev-libs/openssl-0.9.6f ) + pam? ( virtual/pam ) + postgres? ( >=dev-db/postgresql-7.3 ) + ssl? ( >=dev-libs/openssl-0.9.6f ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6-r3 ) + xinetd? ( sys-apps/xinetd )" RDEPEND="${DEPEND} - net-ftp/ftpbase - selinux? ( sec-policy/selinux-ftpd )" + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftpd )" + +pkg_setup() { + # Add the proftpd user to make the default config + # work out-of-the-box + enewgroup proftpd + enewuser proftpd -1 -1 -1 proftpd +} src_unpack() { unpack ${P}.tar.bz2 - cd ${S} - epatch "${FILESDIR}"/mod_sql_mysql.diff - if use shaper; then + + cd "${S}" + + # Fix stripping of files + sed -e "s| @INSTALL_STRIP@||g" -i Make* + + epatch "${FILESDIR}/${P}-mod_sql_mysql.patch" + + if use shaper ; then unpack ${PN}-mod-shaper-${SHAPER_VER}.tar.gz - cp mod_shaper/mod_shaper.c contrib/ + cp -f mod_shaper/mod_shaper.c contrib/ fi - if use clamav; then - cp "${DISTDIR}"/mod_clamav.c contrib/ - cp "${DISTDIR}"/mod_clamav.html doc/ + + if use clamav ; then + cp -f "${DISTDIR}/mod_clamav.c" contrib/ + cp -f "${DISTDIR}/mod_clamav.html" doc/ fi - if use vroot; then + + if use vroot ; then unpack ${PN}-mod-vroot-${VROOT_VER}.tar.gz - cp mod_vroot/mod_vroot.c contrib/ - cp mod_vroot/mod_vroot.html doc/ + cp -f mod_vroot/mod_vroot.c contrib/ + cp -f mod_vroot/mod_vroot.html doc/ fi } @@ -77,40 +91,39 @@ src_compile() { use tcpd && modules="${modules}:mod_wrap" use vroot && modules="${modules}:mod_vroot" - if use ldap; then + if use ldap ; then modules="${modules}:mod_ldap" append-ldflags "-lresolv" fi - if use opensslcrypt; then + if use opensslcrypt ; then append-ldflags "-lcrypto" myconf="${myconf} --with-includes=/usr/include/openssl" CFLAGS="${CFLAGS} -DHAVE_OPENSSL" fi - if use mysql && use postgres - then + 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" + ewarn "change the default behaviour, merge ProFTPD with:" + ewarn "USE='-mysql postgres' emerge proftpd" epause 5 fi - if use mysql; then + if use mysql ; then modules="${modules}:mod_sql:mod_sql_mysql" myconf="${myconf} --with-includes=/usr/include/mysql" - elif use postgres; then + elif use postgres ; then modules="${modules}:mod_sql:mod_sql_postgres" myconf="${myconf} --with-includes=/usr/include/postgresql" fi - if use softquota; then + if use softquota ; then modules="${modules}:mod_quotatab" - if use mysql || use postgres; then + if use mysql || use postgres ; then modules="${modules}:mod_quotatab_sql" fi - if use ldap; then + if use ldap ; then modules="${modules}:mod_quotatab_file:mod_quotatab_ldap" else modules="${modules}:mod_quotatab_file" @@ -139,23 +152,23 @@ src_compile() { --enable-autoshadow \ --enable-ctrls \ --with-modules=${modules} \ + $(use_enable acl facl) \ $(use_enable authfile auth-file) \ - $(use_enable ncurses) \ $(use_enable ipv6) \ - $(use_enable acl facl ) \ - ${myconf} || die "bad ./configure" + $(use_enable ncurses) \ + ${myconf} || die "econf failed" - emake || die "compile problem" + emake || die "emake failed" } src_install() { # Note rundir needs to be specified to avoid sandbox violation # on initial install. See Make.rules - make DESTDIR=${D} install || die + emake DESTDIR="${D}" install || die "emake install failed" keepdir /var/run/proftpd - dodoc ${FILESDIR}/proftpd.conf \ + dodoc "${FILESDIR}/proftpd.conf" \ COPYING CREDITS ChangeLog NEWS README* \ doc/license.txt dohtml doc/*.html @@ -165,23 +178,24 @@ src_install() { docinto rfc dodoc doc/rfc/*.txt - mv ${D}/etc/proftpd/proftpd.conf ${D}/etc/proftpd/proftpd.conf.distrib + mv -f "${D}/etc/proftpd/proftpd.conf" "${D}/etc/proftpd/proftpd.conf.distrib" insinto /etc/proftpd - newins ${FILESDIR}/proftpd.conf proftpd.conf.sample + newins "${FILESDIR}/proftpd.conf" proftpd.conf.sample - if use xinetd; then + if use xinetd ; then insinto /etc/xinetd.d - newins ${FILESDIR}/proftpd.xinetd proftpd + newins "${FILESDIR}/proftpd.xinetd" proftpd fi - newinitd ${FILESDIR}/proftpd.rc6-r2 proftpd + newinitd "${FILESDIR}/proftpd.rc6" proftpd } pkg_postinst() { einfo - einfo 'You can find the config files in /etc/proftpd' + einfo "You can find the config files in /etc/proftpd" + einfo + ewarn "With the introduction of net-ftp/ftpbase the ftp user is now ftp." + ewarn "Remember to change that in the configuration file." einfo - ewarn 'With introduction of net-ftp/ftpbase the ftp user is now ftp.' - ewarn 'Remember to change that in the configuration file.' } -- cgit v1.2.3-65-gdbad