# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346172870 -7200 # Node ID 469942d27d86d7befd0032a5f028c358ee583ede # Parent 1cbb056650450251f17d1cce0d69ccb450fff17e Remove package as new vendor version corrected man page path problems. This was the only reason for continuing maintenance locally. diff -r 1cbb05665045 -r 469942d27d86 proftpd/proftpd.conf --- a/proftpd/proftpd.conf Wed Feb 08 20:18:30 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -## -## proftpd.conf -- ProFTPD Configuration -## - -ServerType standalone -DefaultServer off -SocketBindTight on -Port none - -MaxInstances 40 -User @l_nusr@ -Group @l_ngrp@ -Umask 022 022 - -UseReverseDNS off -MultilineRFC2228 on -ShowSymlinks on -AllowOverwrite on -MaxLoginAttempts 2 -RequireValidShell yes -ListOptions "-l" - -@l_pam@AuthPAM on -@l_pam@AuthPAMConfig proftpd -@l_pam@AuthPAMAuthoritative off -#PersistentPasswd off - -CommandBufferSize 1023 -TimeoutLogin 120 -TimeoutNoTransfer 600 -TimeoutStalled 600 -TimeoutIdle 1200 - -LogFormat default "%h %l %u %t \"%r\" %s %b" -LogFormat auth "%v [%P] %h %t \"%r\" %s" -LogFormat write "%h %l %u %t \"%r\" %s %b" -SystemLog @l_prefix@/var/proftpd/proftpd.system.log -ScoreboardFile @l_prefix@/var/proftpd/proftpd.scoreboard - - - ExtendedLog @l_prefix@/var/proftpd/proftpd.access.log WRITE,READ write - ExtendedLog @l_prefix@/var/proftpd/proftpd.auth.log AUTH auth - TransferLog @l_prefix@/var/proftpd/proftpd.xfer.log - IdentLookups off - DeferWelcome off - DisplayGoAway @l_prefix@/etc/proftpd/proftpd.msg.goaway - DisplayLogin @l_prefix@/etc/proftpd/proftpd.msg.login - DisplayChdir .message true - DisplayReadme README* - WTmpLog off - - - - AllowOverwrite on - - -# sample virtual Anonymous-FTP only server - - Port 21 - PassivePorts 49152 65535 - ServerIdent on "localhost FTP Server (ProFTPD) ready." - ServerAdmin root@localhost - MaxClients 20 - - # allow anonymous logins only - - DenyAll - - - # Anonymous-FTP - - User @l_nusr@ - Group @l_ngrp@ - UserAlias anonymous @l_nusr@ - UserAlias ftp @l_nusr@ - RootLogin off - UseFtpUsers off - MaxClients 10 "Sorry, max %m users allowed -- try again later, please." - RequireValidShell off - DisplayGoAway /.msg.goaway - DisplayLogin /.msg.login - - AllowAll - - - DenyAll - - - IgnoreHidden on - - # optionally allow uploads to a particular directory - # - # - # AllowAll - # - # - # DenyAll - # - # - # AllowAll - # - # - - - diff -r 1cbb05665045 -r 469942d27d86 proftpd/proftpd.msg.goaway --- a/proftpd/proftpd.msg.goaway Wed Feb 08 20:18:30 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -Sorry, access is denied because there are already the maximum -number of connections (%z) established in your access class. diff -r 1cbb05665045 -r 469942d27d86 proftpd/proftpd.msg.login --- a/proftpd/proftpd.msg.login Wed Feb 08 20:18:30 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -You are number %N of maximal %M users in your access class. -Our localtime is %T. -Contact <%E> in case of problems. diff -r 1cbb05665045 -r 469942d27d86 proftpd/proftpd.patch --- a/proftpd/proftpd.patch Wed Feb 08 20:18:30 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -Index: mod_otp/mod_otp.c ---- mod_otp/mod_otp.c.orig 2006-12-06 17:13:06 +0100 -+++ mod_otp/mod_otp.c 2009-01-27 08:33:56 +0100 -@@ -79,7 +79,7 @@ - CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); - - bool = get_boolean(cmd, 1); -- if ((bool == -1) -+ if (bool == -1) - CONF_ERROR(cmd, "expecting Boolean parameter"); - - c = add_config_param(cmd->argv[0], 1, NULL); -@@ -128,7 +128,7 @@ - ": error generating challenge for user '%s': %s", cmd->argv[1], str); - - } else -- pr_add_response_dup(R_DUP, "Challenge: [ %s ]", challenge); -+ pr_response_add(R_DUP, "Challenge: [ %s ]", challenge); - - return DECLINED(cmd); - } -Index: mod_sql_odbc/mod_sql_odbc.c ---- mod_sql_odbc/mod_sql_odbc.c.orig 2007-04-17 17:05:18 +0200 -+++ mod_sql_odbc/mod_sql_odbc.c 2009-01-27 19:16:56 +0100 -@@ -890,8 +890,8 @@ - - /* Set up our timer, if necessary. */ - if (entry->ttl > 0) { -- entry->timer = add_timer(entry->ttl, -1, &sql_odbc_module, -- sqlodbc_timer_cb); -+ entry->timer = pr_timer_add(entry->ttl, -1, &sql_odbc_module, -+ sqlodbc_timer_cb, "mod_sql_odbc TTL"); - - sql_log(DEBUG_INFO, "'%s' connection: %d second timer started", - entry->name, entry->ttl); -Index: mod_sql_sqlite/mod_sql_sqlite.c ---- mod_sql_sqlite/mod_sql_sqlite.c.orig 2007-05-21 17:37:11 +0200 -+++ mod_sql_sqlite/mod_sql_sqlite.c 2009-01-27 19:15:57 +0100 -@@ -236,8 +236,8 @@ - - /* Set up our timer, if necessary. */ - if (entry->ttl > 0) { -- entry->timer = add_timer(entry->ttl, -1, &sql_sqlite_module, -- sql_sqlite_timer_cb); -+ entry->timer = pr_timer_add(entry->ttl, -1, &sql_sqlite_module, -+ sql_sqlite_timer_cb, "mod_sql_sqlite TTL"); - - sql_log(DEBUG_INFO, "'%s' connection: %d second timer started", - entry->name, entry->ttl); -Index: mod_time/mod_time.c ---- mod_time/mod_time.c.orig 2004-05-12 20:57:06 +0200 -+++ mod_time/mod_time.c 2009-01-27 08:33:56 +0100 -@@ -146,7 +146,7 @@ - /* If we don't have a password file, we create an empty array and punt. - */ - if (!pw) { -- if (!name || !(pw = (struct passwd *) auth_getpwnam(p, name))) { -+ if (!name || !(pw = (struct passwd *) pr_auth_getpwnam(p, name))) { - *gids = make_array(p, 2, sizeof(gid_t)); - *groups = make_array(p, 2, sizeof(char *)); - return; -@@ -172,7 +172,7 @@ - /* Now populate the names of the groups. - */ - for (i = 0; i < total; i++) { -- if ((gr = (struct group *) auth_getgrgid(p, ((gid_t *) xgids->elts)[i]))) -+ if ((gr = (struct group *) pr_auth_getgrgid(p, ((gid_t *) xgids->elts)[i]))) - *((char **) push_array(xgroups)) = pstrdup(p, gr->gr_name); - } - -@@ -188,7 +188,7 @@ - /* Nothing there...punt. - */ - if (!pw) { -- if (!name || !(pw = (struct passwd *) auth_getpwnam(p, name))) { -+ if (!name || !(pw = (struct passwd *) pr_auth_getpwnam(p, name))) { - *gids = xgids; - *groups = xgroups; - return; -@@ -197,16 +197,16 @@ - - /* Populate the first group name. - */ -- if ((gr = auth_getgrgid(p, pw->pw_gid)) != NULL) -+ if ((gr = pr_auth_getgrgid(p, pw->pw_gid)) != NULL) - *((char **) push_array(xgroups)) = pstrdup(p, gr->gr_name); - -- auth_setgrent(p); -+ pr_auth_setgrent(p); - - /* This is where things get slow, expensive, and ugly. - * Loop through everything, checking to make sure we haven't already added - * it. This is why we have getgroups() and company. - */ -- while ((gr = auth_getgrent(p)) != NULL && gr->gr_mem) -+ while ((gr = pr_auth_getgrent(p)) != NULL && gr->gr_mem) - for (gr_mem = gr->gr_mem; *gr_mem; gr_mem++) { - if (strcmp(*gr_mem, pw->pw_name) == 0) { - *((int *) push_array(xgids)) = (int) gr->gr_gid; -@@ -634,7 +634,7 @@ - if (!session.user) { - /* Populate the pw struct, check for a NULL return value. */ - -- if ((pw = auth_getpwnam(cmd->tmp_pool, user)) == NULL) -+ if ((pw = pr_auth_getpwnam(cmd->tmp_pool, user)) == NULL) - return NULL; - - time_user = pstrdup(session.pool, pw->pw_name); -@@ -1603,7 +1603,7 @@ - "%R", (session.c && session.c->remote_name ? session.c->remote_name : "(unknown)"), - "%L", main_server->ServerFQDN, - "%U", user, -- "%u", session.ident_user, -+ "%u", session.user, - "%M", mesg_max, - "%N", mesg_cur, - "%E", main_server->ServerAdmin, diff -r 1cbb05665045 -r 469942d27d86 proftpd/proftpd.spec --- a/proftpd/proftpd.spec Wed Feb 08 20:18:30 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,520 +0,0 @@ -## -## proftpd.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2009 OpenPKG Foundation e.V. -## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. -## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -## SUCH DAMAGE. -## - -# package version -%define V_proftpd 1.3.2 -%define V_mod_exec 0.9.6 -%define V_mod_otp 0.9.1 -%define V_mod_shaper 0.6.5 -%define V_mod_sql_sqlite 0.2 -%define V_mod_sql_odbc 0.3.2 -%define V_mod_time 2.2.1 -%define V_mod_vroot 0.8.5 -%define V_mod_gss 1.3.2 -%define V_mod_sftp 0.9.6 -%define V_mod_sftp_sql 0.1 -%define V_mod_md5 0.3.3 - -# package information -Name: proftpd -Summary: Professional FTP Daemon -URL: http://www.proftpd.org/ -Vendor: The ProFTPD Project -Packager: OpenPKG Foundation e.V. -Distribution: OpenPKG Community -Class: BASE -Group: FTP -License: GPL -Version: %{V_proftpd} -Release: 20090418 - -# package options -%option with_ifsession no -%option with_ctrls no -%option with_radius no -%option with_pam no -%option with_mysql no -%option with_pgsql no -%option with_sqlite no -%option with_odbc no -%option with_ldap no -%option with_skey no -%option with_opie no -%option with_kerberos no -%option with_ssl no -%option with_sftp no -%option with_md5 no - -# checking option conflicts -%if "%{with_mysql}" == "yes" && "%{with_pgsql}" == "yes" - %{error:build-time options 'with_mysql' and 'with_pgsql' conflict} -%endif - -# list of sources -Source0: ftp://ftp.proftpd.org/distrib/source/proftpd-%{V_proftpd}.tar.bz2 -Source1: http://www.castaglia.net/proftpd/modules/proftpd-mod-exec-%{V_mod_exec}.tar.gz -Source2: http://www.castaglia.net/proftpd/modules/proftpd-mod-otp-%{V_mod_otp}.tar.gz -Source3: http://www.castaglia.net/proftpd/modules/proftpd-mod-shaper-%{V_mod_shaper}.tar.gz -Source4: http://www.castaglia.net/proftpd/modules/proftpd-mod-sql-sqlite-%{V_mod_sql_sqlite}.tar.gz -Source5: http://www.castaglia.net/proftpd/modules/proftpd-mod-sql-odbc-%{V_mod_sql_odbc}.tar.gz -Source6: http://www.castaglia.net/proftpd/modules/proftpd-mod-time-%{V_mod_time}.tar.gz -Source7: http://www.castaglia.net/proftpd/modules/proftpd-mod-vroot-%{V_mod_vroot}.tar.gz -Source8: http://switch.dl.sourceforge.net/gssmod/mod_gss-%{V_mod_gss}.tar.gz -Source9: http://www.castaglia.net/proftpd/modules/proftpd-mod-sftp-%{V_mod_sftp}.tar.gz -Source10: http://www.castaglia.net/proftpd/modules/proftpd-mod-sftp-sql-%{V_mod_sftp_sql}.tar.gz -Source11: http://www.castaglia.net/proftpd/modules/proftpd-mod-md5-%{V_mod_md5}.tar.gz -Source12: proftpd.conf -Source13: proftpd.msg.goaway -Source14: proftpd.msg.login -Source15: rc.proftpd -Patch0: proftpd.patch - -# build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, make -PreReq: OpenPKG, openpkg >= 20060823 -BuildPreReq: ncurses, getopt -PreReq: ncurses, getopt -%if "%{with_mysql}" == "yes" -BuildPreReq: mysql -PreReq: mysql -%endif -%if "%{with_pam}" == "yes" -BuildPreReq: PAM -PreReq: PAM -%endif -%if "%{with_pgsql}" == "yes" -BuildPreReq: postgresql, openssl -PreReq: postgresql, openssl -%endif -%if "%{with_sqlite}" == "yes" -BuildPreReq: sqlite -PreReq: sqlite -%endif -%if "%{with_odbc}" == "yes" -BuildPreReq: ODBC -PreReq: ODBC -%endif -%if "%{with_ldap}" == "yes" -BuildPreReq: openldap, openssl -PreReq: openldap, openssl -%endif -%if "%{with_skey}" == "yes" -BuildPreReq: skey -PreReq: skey -%endif -%if "%{with_opie}" == "yes" -BuildPreReq: opie -PreReq: opie -%endif -%if "%{with_kerberos}" == "yes" -BuildPreReq: KERBEROS -PreReq: KERBEROS -%endif -%if "%{with_ssl}" == "yes" || "%{with_sftp}" == "yes" -BuildPreReq: openssl -PreReq: openssl -%endif -AutoReq: no -AutoReqProv: no - -%description - ProFTPD grew out of the desire to have a secure and configurable - FTP server, and out of a significant admiration of the Apache web - server. There are currently a very limited number of FTP servers - running on unix (or unix-like) hosts. The most commonly used server - is probably wu-ftpd. While wu-ftpd provides excellent performance - and is generally a good product, it lacks numerous features found - in newer Win32 FTP servers, and has a poor security history. Many - people, including the developers who work on ProFTPD have spent a - great deal of time fixing bugs and hacking features into wu-ftpd. - Unfortunately, it quickly became clear that a complete redesign was - necessary in order to implement the configurability and features - desired. ProFTPD is not a hack based on any other server, it's an - independent source tree from the ground up. Click here for a small - list of some of the sites ProFTPD powers -- many of them handling - large volumes of traffic on a daily basis. - -%track - prog proftpd = { - version = %{V_proftpd} - url = ftp://ftp.proftpd.org/distrib/source/ - regex = proftpd-(\d+\.\d+\.\d+(?:rc\d+|[a-z]?))\.tar\.bz2 - } - prog proftpd:mod_exec = { - version = %{V_mod_exec} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-exec-(__VER__)\.tar\.gz - } - prog proftpd:mod_shaper = { - version = %{V_mod_shaper} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-shaper-(__VER__)\.tar\.gz - } - prog proftpd:mod_sql_sqlite = { - version = %{V_mod_sql_sqlite} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-sql-sqlite-(__VER__)\.tar\.gz - } - prog proftpd:mod_sql_odbc = { - version = %{V_mod_sql_odbc} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-sql-odbc-(__VER__)\.tar\.gz - } - prog proftpd:mod_time = { - version = %{V_mod_time} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-time-(__VER__)\.tar\.gz - } - prog proftpd:mod_vroot = { - version = %{V_mod_vroot} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-vroot-(__VER__)\.tar\.gz - } - prog proftpd:mod_gss = { - version = %{V_mod_gss} - url = http://prdownloads.sourceforge.net/gssmod/ - regex = mod_gss-(__VER__)\.tar\.gz - } - prog proftpd:mod_sftp = { - version = %{V_mod_sftp} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-sftp-(__VER__)\.tar\.gz - } - prog proftpd:mod_sftp_sql = { - version = %{V_mod_sftp_sql} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-sftp-sql-(__VER__)\.tar\.gz - } - prog proftpd:mod_md5 = { - version = %{V_mod_md5} - url = http://www.castaglia.net/proftpd/ - regex = proftpd-mod-md5-(__VER__)\.tar\.gz - } - -%prep - %setup -q - %setup -q -D -T -a 1 - %setup -q -D -T -a 2 - %setup -q -D -T -a 3 - %setup -q -D -T -a 4 - %setup -q -D -T -a 5 - %setup -q -D -T -a 6 - %setup -q -D -T -a 7 - %setup -q -D -T -a 8 - %setup -q -D -T -a 9 - %setup -q -D -T -a 10 - %setup -q -D -T -a 11 - %patch -p0 - - %{l_shtool} subst \ - -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ - configure - - # utils require to link with getopt - %{l_shtool} subst \ - -e 's;\(\$(BUILD_FTPCOUNT_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \ - -e 's;\(\$(BUILD_FTPSHUT_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \ - -e 's;\(\$(BUILD_FTPTOP_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \ - -e 's;\(\$(BUILD_FTPWHO_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \ - Makefile.in -%if "%{with_mysql}" == "yes" - libs=`mysql_config --libs` - # libmysqlclient may require more libraries - %{l_shtool} subst \ - -e "s;\(-lmysqlclient\);$libs;g" \ - contrib/mod_sql_mysql.c -%endif - - # libpq also requires openssl - # postgresql also doesn't provide its own include subdirectory - %{l_shtool} subst \ - -e 's;\(-lpq\);\1 -lssl -lcrypto;g' \ - -e 's;^\(#include <\)pgsql/\(libpq-fe.h>.*\)$;\1postgresql/\2;' \ - contrib/mod_sql_postgres.c - - # libldap also requires openssl - %{l_shtool} subst \ - -e 's;\(-llber\);\1 -lssl -lcrypto;g' \ - contrib/mod_ldap.c - - # prepare mod_otp module -%if "%{with_skey}" == "yes" || "%{with_opie}" == "yes" - ( cd mod_otp - CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - ./configure \ -%if "%{with_skey}" == "yes" - --with-skey \ -%endif -%if "%{with_opie}" == "yes" - --with-opie \ -%endif - %{l_nil} - cp mod_otp.[ch] ../contrib/ - ) || exit $? -%endif - - # prepare mod_sql_odbc module -%if "%{with_odbc}" == "yes" - ( cd mod_sql_odbc - if [ -f %{l_prefix}/etc/unixodbc/odbc.ini ]; then - ./configure --enable-unixodbc - else - ./configure --enable-iodbc - fi - ) || exit $? -%endif - - # prepare optional add-on modules - cp mod_exec/mod_exec.c contrib/ - cp mod_sql_sqlite/mod_sql_sqlite.c contrib/ - cp mod_sql_odbc/mod_sql_odbc.[ch] contrib/ - cp mod_time/mod_time.c contrib/ - cp mod_vroot/mod_vroot.c contrib/ -%if "%{with_ctrls}" == "yes" - cp mod_shaper/mod_shaper.c contrib/ -%endif -%if "%{with_sftp}" == "yes" - cp -r mod_sftp contrib/ -%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes" || "%{with_odbc}" == "yes" - cp mod_sftp_sql/mod_sftp_sql.c contrib/ -%endif -%endif -%if "%{with_md5}" == "yes" - cp mod_md5/mod_md5.c contrib/ -%endif - - # prepare mod_gss module -%if "%{with_kerberos}" == "yes" - ( cd mod_gss-* - CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - ./configure \ - --prefix=%{l_prefix} \ - `if [ -d %{l_prefix}/include/heimdal ]; then \ - echo "--enable-heimdal"; \ - else \ - echo "--enable-mit"; \ - fi` - cp mod_gss.h ../include/ - cp mod_gss.c ../contrib/ - ) || exit $? -%endif - -%build - # make non-standard "rundir" the same as standard "sysconfdir" - %{l_shtool} subst \ - -e 's;^\(rundir=@localstatedir@\)/proftpd;\1;' \ - Make.rules.in - %{l_shtool} subst \ - -e 's;^\(#define PR_RUN_DIR "`eval echo "${localstatedir}\)/proftpd;\1;' \ - configure - - # write shutdown message file to OpenPKG instance, not outside - %{l_shtool} subst \ - -e 's;\(#define PR_SHUTMSG_PATH.*"\)\(/etc/\)\(shutmsg\)";\1%{l_prefix}\2proftpd/\3";' \ - include/default_paths.h - - # configure the ProFTPd source tree - MOD="mod_ratio:mod_readme:mod_exec:mod_time:mod_vroot" - MOD_INC="%{l_prefix}/include" - MOD_LIB="%{l_prefix}/lib" -%if "%{with_ifsession}" == "yes" - MOD="$MOD:mod_ifsession" -%endif -%if "%{with_ctrls}" == "yes" - MOD="$MOD:mod_shaper" - MOD="$MOD:mod_ctrls_admin" -%endif -%if "%{with_radius}" == "yes" - MOD="$MOD:mod_radius" -%endif -%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes" || "%{with_odbc}" == "yes" - MOD="$MOD:mod_sql" -%if "%{with_mysql}" == "yes" - MOD="$MOD:mod_sql_mysql" - MOD_INC=":%{l_prefix}/include/mysql" -%endif -%if "%{with_pgsql}" == "yes" - MOD="$MOD:mod_sql_postgres" - MOD_INC=":%{l_prefix}/include/postgresql" -%endif -%if "%{with_sqlite}" == "yes" - MOD="$MOD:mod_sql_sqlite" -%endif -%if "%{with_odbc}" == "yes" - MOD="$MOD:mod_sql_odbc" -%endif -%endif -%if "%{with_ldap}" == "yes" - MOD="$MOD:mod_ldap" -%endif -%if "%{with_skey}" == "yes" || "%{with_opie}" == "yes" - MOD="$MOD:mod_otp" -%endif -%if "%{with_kerberos}" == "yes" - MOD="$MOD:mod_gss" -%endif -%if "%{with_ssl}" == "yes" - MOD="$MOD:mod_tls" -%endif -%if "%{with_sftp}" == "yes" - MOD="$MOD:mod_sftp" -%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes" || "%{with_odbc}" == "yes" - MOD="$MOD:mod_sftp_sql" -%endif -%endif -%if "%{with_md5}" == "yes" - MOD="$MOD:mod_md5" -%endif - export CC="%{l_cc}" - export CFLAGS="%{l_cflags -O}" - export CPPFLAGS="%{l_cppflags ncurses}" - export LDFLAGS="%{l_ldflags}" - export LIBS="-lgetopt" -%if "%{with_pam}" == "yes" - CPPFLAGS="$CPPFLAGS -I`%{l_rc} --query pam_incdir`" - LDFLAGS="$LDFLAGS -L`%{l_rc} --query pam_libdir`" -%endif -%if "%{with_kerberos}" == "yes" - CPPFLAGS="$CPPFLAGS `krb5-config --cflags gssapi`" - LIBS="$LIBS `krb5-config --libs gssapi`" -%endif - ./configure \ - --prefix=%{l_prefix} \ - --sysconfdir=%{l_prefix}/etc/proftpd \ - --localstatedir=%{l_prefix}/var/proftpd \ - --mandir=%{l_prefix}/man \ - --with-modules="$MOD" \ - --with-includes="$MOD_INC" \ - --with-libraries="$MOD_LIB" \ - --enable-buffer-size=1024 \ -%if "%{with_ctrls}" == "yes" - --enable-ctrls \ -%endif -%if "%{with_pam}" == "yes" - --enable-auth-pam -%else - --disable-auth-pam -%endif - - # build ProFTPd programs - %{l_make} %{l_mflags} - -%install - rm -rf $RPM_BUILD_ROOT - - # make sure the "install" procedure does not try - # to perform explicit ownership assignments - %{l_shtool} subst -v \ - -e 's;-o $(INSTALL_USER) -g $(INSTALL_GROUP);;g' \ - -e 's;chown;true;g' \ - Makefile Make.rules - - # perform the "install" procedure while redirecting - # it to the temporarily install area - %{l_make} %{l_mflags} \ - install-proftpd install-utils install-man \ - prefix=$RPM_BUILD_ROOT%{l_prefix} \ - bindir=$RPM_BUILD_ROOT%{l_prefix}/bin \ - sbindir=$RPM_BUILD_ROOT%{l_prefix}/sbin \ - sysconfdir=$RPM_BUILD_ROOT%{l_prefix}/etc/proftpd \ - localstatedir=$RPM_BUILD_ROOT%{l_prefix}/var/proftpd \ - mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ - rundir=$RPM_BUILD_ROOT%{l_prefix}/var/proftpd - - # strip installation - rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/in.proftpd - - # install more stuff manually - %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/proftpd - %{l_shtool} install -c -m 644 doc/faq.html \ - $RPM_BUILD_ROOT%{l_prefix}/share/proftpd/faq.html - %{l_shtool} install -c -m 644 doc/Configuration.html \ - $RPM_BUILD_ROOT%{l_prefix}/share/proftpd/cfg.html - - # extended installation with own stuff - l_pam="#" -%if "%{with_pam}" == "yes" - l_pam="" -%endif - %{l_shtool} install -c -m 644 %{l_value -s -a} \ - -e "s;@l_pam@;${l_pam};g" \ - %{SOURCE proftpd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/proftpd/ - %{l_shtool} install -c -m 644 \ - %{SOURCE proftpd.msg.goaway} \ - %{SOURCE proftpd.msg.login} \ - $RPM_BUILD_ROOT%{l_prefix}/etc/proftpd/ - %{l_shtool} install -c -m 644 \ - %{SOURCE proftpd.msg.login} \ - $RPM_BUILD_ROOT%{l_prefix}/share/proftpd/.msg.login - %{l_shtool} install -c -m 644 \ - %{SOURCE proftpd.msg.goaway} \ - $RPM_BUILD_ROOT%{l_prefix}/share/proftpd/.msg.goaway - %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d - %{l_shtool} install -c -m 755 %{l_value -s -a} \ - %{SOURCE rc.proftpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ - - # determine the package ingredients - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ - %{l_files_std} \ - '%config %attr(0600,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/proftpd/proftpd.conf' \ - '%config %{l_prefix}/etc/proftpd/proftpd.msg.*' - -%files -f files - -%clean - rm -rf $RPM_BUILD_ROOT - -%post -%if "%{with_pam}" == "yes" - # add PAM configuration entry - if [ $1 -eq 1 ]; then - $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=proftpd - fi -%endif - - # after upgrade, restart service - [ $1 -eq 2 ] || exit 0 - eval `%{l_rc} proftpd status 2>/dev/null` - [ ".$proftpd_active" = .yes ] && %{l_rc} proftpd restart - exit 0 - -%preun - # before erase, stop service and remove log files - [ $1 -eq 0 ] || exit 0 - %{l_rc} proftpd stop 2>/dev/null - rm -f $RPM_INSTALL_PREFIX/var/proftpd/*.log* >/dev/null 2>&1 || true - rm -f $RPM_INSTALL_PREFIX/var/proftpd/*.pid >/dev/null 2>&1 || true -%if "%{with_pam}" == "yes" - # remove PAM configuration entry - $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=proftpd -%endif - exit 0 - diff -r 1cbb05665045 -r 469942d27d86 proftpd/rc.proftpd --- a/proftpd/rc.proftpd Wed Feb 08 20:18:30 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -#!@l_prefix@/bin/openpkg rc -## -## rc.proftpd -- Run-Commands -## - -%config - proftpd_enable="$openpkg_rc_def" - proftpd_nice="0" - proftpd_acc_file="@l_prefix@/var/proftpd/proftpd.access.log" - proftpd_acc_prolog="true" - proftpd_acc_epilog="true" - proftpd_acc_numfiles="10" - proftpd_acc_minsize="1M" - proftpd_acc_complevel="9" - proftpd_auth_file="@l_prefix@/var/proftpd/proftpd.auth.log" - proftpd_auth_prolog="true" - proftpd_auth_epilog="true" - proftpd_auth_numfiles="10" - proftpd_auth_minsize="1M" - proftpd_auth_complevel="9" - proftpd_sys_file="@l_prefix@/var/proftpd/proftpd.system.log" - proftpd_sys_prolog="true" - proftpd_sys_epilog="true" - proftpd_sys_numfiles="10" - proftpd_sys_minsize="1M" - proftpd_sys_complevel="9" - proftpd_xfer_file="@l_prefix@/var/proftpd/proftpd.xfer.log" - proftpd_xfer_prolog="true" - proftpd_xfer_epilog="true" - proftpd_xfer_numfiles="10" - proftpd_xfer_minsize="1M" - proftpd_xfer_complevel="9" - -%common - proftpd_pidfile="@l_prefix@/var/proftpd/proftpd.pid" - proftpd_signal () { - [ -f $proftpd_pidfile ] && kill -$1 `cat $proftpd_pidfile` - } - -%status -u @l_susr@ -o - proftpd_usable="unknown" - proftpd_active="no" - rcService proftpd enable yes && \ - proftpd_signal 0 && proftpd_active="yes" - echo "proftpd_enable=\"$proftpd_enable\"" - echo "proftpd_usable=\"$proftpd_usable\"" - echo "proftpd_active=\"$proftpd_active\"" - -%start -u @l_susr@ - rcService proftpd enable yes || exit 0 - rcService proftpd active yes && exit 0 - nice -n $proftpd_nice @l_prefix@/sbin/proftpd - -%stop -u @l_susr@ - rcService proftpd enable yes || exit 0 - rcService proftpd active no && exit 0 - proftpd_signal TERM - sleep 2 - -%restart -u @l_susr@ - rcService proftpd enable yes || exit 0 - rcService proftpd active no && exit 0 - rc proftpd stop start - -%reload -u @l_susr@ - rcService proftpd enable yes || exit 0 - proftpd_signal HUP - -%daily -u @l_susr@ - rcService proftpd enable yes || exit 0 - rcTmp -i - hintfile=`rcTmp -f -n hint` - shtool rotate -f \ - -n ${proftpd_acc_numfiles} -s ${proftpd_acc_minsize} -d \ - -z ${proftpd_acc_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ - -P "${proftpd_acc_prolog}" \ - -E "${proftpd_acc_epilog}; echo 1 >$hintfile" \ - ${proftpd_acc_file} - shtool rotate -f \ - -n ${proftpd_auth_numfiles} -s ${proftpd_auth_minsize} -d \ - -z ${proftpd_auth_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ - -P "${proftpd_auth_prolog}" \ - -E "${proftpd_auth_epilog}; echo 1 >$hintfile" \ - ${proftpd_auth_file} - shtool rotate -f \ - -n ${proftpd_sys_numfiles} -s ${proftpd_sys_minsize} -d \ - -z ${proftpd_sys_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ - -P "${proftpd_sys_prolog}" \ - -E "${proftpd_sys_epilog}; echo 1 >$hintfile" \ - ${proftpd_sys_file} - shtool rotate -f \ - -n ${proftpd_xfer_numfiles} -s ${proftpd_xfer_minsize} -d \ - -z ${proftpd_xfer_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ - -P "${proftpd_xfer_prolog}" \ - -E "${proftpd_xfer_epilog}; echo 1 >$hintfile" \ - ${proftpd_xfer_file} - if [ -s $hintfile ]; then - rc proftpd restart - fi - rcTmp -k -