[svn] r6498 - in trunk/rpms: . pure-ftpd

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Mon Oct 6 04:10:51 CEST 2008


Author: dag
Date: 2008-10-06 03:10:50 +0100 (Mon, 06 Oct 2008)
New Revision: 6498

Added:
   trunk/rpms/pure-ftpd/
   trunk/rpms/pure-ftpd/pure-ftpd-1.0.16-dag.spec
   trunk/rpms/pure-ftpd/pure-ftpd-1.0.20-libdir.patch
   trunk/rpms/pure-ftpd/pure-ftpd-1.0.21-config.patch
   trunk/rpms/pure-ftpd/pure-ftpd-paminclude.patch
   trunk/rpms/pure-ftpd/pure-ftpd.README.SELinux
   trunk/rpms/pure-ftpd/pure-ftpd.init
   trunk/rpms/pure-ftpd/pure-ftpd.pureftpd.te
   trunk/rpms/pure-ftpd/pure-ftpd.spec
Log:
Updates

Added: trunk/rpms/pure-ftpd/pure-ftpd-1.0.16-dag.spec
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd-1.0.16-dag.spec	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd-1.0.16-dag.spec	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,101 @@
+# DarAuthority: newrpms
+Summary: Lightweight, fast and secure FTP server
+Name: pure-ftpd
+Version: 1.0.16
+Release: 0.dag
+License: GPL
+Group: System Environment/Daemons
+URL: http://www.pureftpd.org/
+
+Packager: Dag Wieers <dag at wieers.com>
+Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
+
+Source: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/root-%{name}-%{version}
+Prefix: %{_prefix}
+
+BuildRequires: pam-devel, openldap-devel, zlib-devel, mysql-devel, postgresql-devel
+BuildRequires: scrollkeeper
+
+Requires(post): scrollkeeper
+
+Provides: ftp-server
+Conflicts: wu-ftpd proftpd ftpd in.ftpd anonftp publicfile wuftpd ftpd-BSD
+
+%description
+Pure-FTPd is a fast, production-quality, standard-comformant FTP server,
+based upon Troll-FTPd. Unlike other popular FTP servers, it has no known
+security flaw, it is really trivial to set up and it is especially designed
+for modern Linux and FreeBSD kernels (setfsuid, sendfile, capabilities) .
+Features include chroot()ed and/or virtual chroot()ed home directories,
+virtual domains, built-in 'ls', anti-warez system, bounded ports for passive
+downloads, FXP protocol, bandwidth throttling, ratios, LDAP / MySQL /
+PostgreSQL-based authentication, fortune files, Apache-like log files, fast
+standalone mode, text / HTML / XML real-time status report, virtual users,
+virtual quotas, privilege separation and more.
+
+%prep
+%setup -n %{name}-%{version}a
+
+%build
+%configure \
+	--with-everything
+#  --with-pam --with-pgsql --with-mysql --with-ldap --with-extauth --with-capabilities --with-ascii --with-sendfile \
+#  --with-puredb --with-quotas --with-uploadscript --with-virtualhosts --with-virtualchroot --with-altlog --with-cookie \
+#  --with-throttling --with-ratios --with-ftpwho --with-diraliases --with-peruserlimits --with-largefile --with-boring \
+#  --with-privsep --with-sysquotas --with-paranoidmsg
+%{__make} %{?_smp_mflags}
+
+%install
+%{__rm} -rf %{buildroot}
+%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/pure-ftpd/ \
+			%{buildroot}%{_sysconfdir}/pam.d/ \
+			%{buildroot}%{_sbindir} \
+			%{buildroot}%{_initrddir}
+%makeinstall
+%{__install} -m0755 configuration-file/pure-config.pl %{buildroot}%{_sbindir}
+%{__install} -m0644 configuration-file/pure-ftpd.conf %{buildroot}%{_sysconfdir}
+
+sed -e "s|/usr/local|%{_prefix}|g; s|/etc/sysconfig|%{_sysconfdir}/sysconfig|g" contrib/redhat.init >redhat.init_replaced
+%{__install} -m0755 redhat.init_replaced %{buildroot}%{_initrddir}/pure-ftpd
+
+sed -e "s|\(\$prefix *= *['\"]\)/usr/local|\1%{_prefix}|g" configuration-file/pure-config.pl >pure-config.pl_replaced
+%{__install} -m0755 pure-config.pl_replaced %{buildroot}%{_sbindir}/pure-config.pl
+
+%{__install} -m0644 pam/pure-ftpd %{buildroot}%{_sysconfdir}/pam.d/
+
+%post
+/sbin/chkconfig --add pure-ftpd
+
+%preun
+if [ $1 -eq 0 ]; then
+	/sbin/service pure-ftpd stop >/dev/null 2>&1 || :
+	/sbin/chkconfig --del pure-ftpd
+fi
+
+%postun
+/sbin/service pure-ftpd condrestart >/dev/null 2>&1 || :
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-, root, root, 0755)
+%doc AUTHORS CONTACT FAQ HISTORY NEWS pureftpd.schema pureftpd-*.conf README* THANKS
+%doc %{_mandir}/man8/*
+%config %{_sysconfdir}/pure-ftpd.conf
+%config %{_sysconfdir}/pure-ftpd/
+%config(noreplace) %{_initrddir}/pure-ftpd/
+%config(noreplace) %{_sysconfdir}/pam.d/*
+%{_sbindir}/*
+%{_bindir}/*
+
+%changelog
+* Sun Aug 31 2003 Dag Wieers <dag at wieers.com> - 1.0.16-0
+- Updated to release 1.0.16.
+
+* Tue Feb 25 2003 Dag Wieers <dag at wieers.com> - 1.0.14-1
+- Added sysv scripts with chkconfig.
+
+* Tue Feb 25 2003 Dag Wieers <dag at wieers.com> - 1.0.14-0
+- Initial package. (using DAR)

Added: trunk/rpms/pure-ftpd/pure-ftpd-1.0.20-libdir.patch
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd-1.0.20-libdir.patch	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd-1.0.20-libdir.patch	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,13 @@
+--- ./configure.libdir	2004-06-20 19:41:54.000000000 +0200
++++ ./configure	2005-01-31 12:33:03.901660331 +0100
+@@ -19781,8 +19781,8 @@
+       LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib"
+       CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include"
+     else
+-      LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:/usr/lib/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}"
+-      LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql"
++      LD_RUN_PATH="/usr/local/mysql/lib:/usr/local/mysql/lib/mysql:${libdir}/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/local/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}"
++      LDFLAGS="$LDFLAGS -L/usr/local/mysql/lib -L${libdir}/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql"
+       CPPFLAGS="$CPPFLAGS -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql"
+     fi
+ 

Added: trunk/rpms/pure-ftpd/pure-ftpd-1.0.21-config.patch
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd-1.0.21-config.patch	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd-1.0.21-config.patch	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,102 @@
+--- ./configuration-file/pure-ftpd.conf.in.config	2006-02-15 14:15:47.000000000 +0100
++++ ./configuration-file/pure-ftpd.conf.in	2006-04-09 17:31:03.000000000 +0200
+@@ -9,7 +9,7 @@
+ # instead of command-line options, please run the
+ # following command :
+ #
+-# @prefix@/sbin/pure-config.pl @prefix@/etc/pure-ftpd.conf
++# @sbindir@/pure-config.pl @sysconfdir@/pure-ftpd.conf
+ #
+ # Please don't forget to have a look at documentation at
+ # http://www.pureftpd.org/documentation.shtml for a complete list of
+@@ -107,23 +107,23 @@
+ 
+ # LDAP configuration file (see README.LDAP)
+ 
+-# LDAPConfigFile                /etc/pureftpd-ldap.conf
++# LDAPConfigFile                @sysconfdir@/pureftpd-ldap.conf
+ 
+ 
+ 
+ # MySQL configuration file (see README.MySQL)
+ 
+-# MySQLConfigFile               /etc/pureftpd-mysql.conf
++# MySQLConfigFile               @sysconfdir@/pureftpd-mysql.conf
+ 
+ 
+ # Postgres configuration file (see README.PGSQL)
+ 
+-# PGSQLConfigFile               /etc/pureftpd-pgsql.conf
++# PGSQLConfigFile               @sysconfdir@/pureftpd-pgsql.conf
+ 
+ 
+ # PureDB user database (see README.Virtual-Users)
+ 
+-# PureDB                        /etc/pureftpd.pdb
++# PureDB                        @sysconfdir@/pureftpd.pdb
+ 
+ 
+ # Path to pure-authd socket (see README.Authentication-Modules)
+@@ -134,7 +134,7 @@
+ 
+ # If you want to enable PAM authentication, uncomment the following line
+ 
+-# PAMAuthentication             yes
++PAMAuthentication             yes
+ 
+ 
+ 
+@@ -158,7 +158,7 @@
+ # 'ls' recursion limits. The first argument is the maximum number of
+ # files to be displayed. The second one is the max subdirectories depth
+ 
+-LimitRecursion              2000 8
++LimitRecursion              7500 8
+ 
+ 
+ 
+@@ -237,7 +237,14 @@
+ 
+ # Minimum UID for an authenticated user to log in.
+ 
+-MinUID                      100
++MinUID                      500
++
++
++
++# Do not use the /etc/ftpusers file to disable accounts. We're already
++# using MinUID to block users with uid < 500
++
++UseFtpUsers no
+ 
+ 
+ 
+@@ -276,7 +283,7 @@
+ 
+ # Disallow anonymous users to upload new files (no = upload is allowed)
+ 
+-AnonymousCantUpload         no
++AnonymousCantUpload         yes
+ 
+ 
+ 
+@@ -301,7 +308,7 @@
+ # fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338
+ # This log file can then be processed by www traffic analyzers.
+ 
+-# AltLog                     clf:/var/log/pureftpd.log
++AltLog                     clf:@localstatedir@/log/pureftpd.log
+ 
+ 
+ 
+--- ./pureftpd-mysql.conf.config	2006-04-09 17:33:04.000000000 +0200
++++ ./pureftpd-mysql.conf	2006-04-09 17:33:27.000000000 +0200
+@@ -19,7 +19,7 @@
+ 
+ # Optional : define the location of mysql.sock if the server runs on this host.
+ 
+-MYSQLSocket     /tmp/mysql.sock
++MYSQLSocket     /var/lib/mysql/mysql.sock
+ 
+ 
+ # Mandatory : user to bind the server as.

Added: trunk/rpms/pure-ftpd/pure-ftpd-paminclude.patch
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd-paminclude.patch	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd-paminclude.patch	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,20 @@
+--- ./pam/pure-ftpd.paminclude	2006-10-27 09:28:40.000000000 +0200
++++ ./pam/pure-ftpd	2006-10-27 09:37:22.000000000 +0200
+@@ -4,13 +4,13 @@
+ # Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf
+ 
+ auth       required     pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+-auth       required     pam_stack.so service=system-auth
++auth       include      system-auth
+ auth       required     pam_shells.so
+ auth       required     pam_nologin.so
+ 
+-account    required     pam_stack.so service=system-auth
++account    include      system-auth
+ 
+-password   required     pam_stack.so service=system-auth
++password   include      system-auth
+ 
+-session    required     pam_stack.so service=system-auth
++session    include      system-auth
+ 

Added: trunk/rpms/pure-ftpd/pure-ftpd.README.SELinux
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd.README.SELinux	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd.README.SELinux	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,30 @@
+=============================
+SELinux support for Pure-FTPd
+=============================
+
+With this package, Pure-FTPd is now protected in the same way VSFTPd and
+ProFTPd are in Fedora.
+
+Read Access
+-----------
+To allow files to be accessed by Pure-FTPd, you need either :
+- to place them in /var/ftp
+- to label them with the public_content_t. To do that, you can use::
+    chcon -t public_content_t file_to_publish
+
+Write Access
+------------
+If you wish to grant write access, you have to use the public_content_rw_t
+type, for example with this command::
+    chcon -t public_content_rw_t file_to_publish
+and you have to turn on the allow_ftpd_anon_write boolean using 
+system-config-securitylevel, or using the following command::
+    setsebool -P allow_ftpd_anon_write 1
+
+Access to home directories
+--------------------------
+If you want to publish files in a user's home directory, you have to turn
+on the ftp_home_dir boolean, using system-config-securitylevel, or using
+the following command::
+    setsebool -P ftp_home_dir 1
+

Added: trunk/rpms/pure-ftpd/pure-ftpd.init
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd.init	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd.init	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,83 @@
+#!/bin/bash
+#
+# Startup script for the pure-ftpd FTP Server  $Revision: 1.1 $
+#
+# chkconfig: - 85 15
+# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
+# processname: pure-ftpd
+# pidfile: /var/run/pure-ftpd.pid
+# config: /etc/pure-ftpd/pure-ftpd.conf
+
+# Source function library.
+source /etc/init.d/functions
+
+# Source networking configuration.
+source /etc/sysconfig/network
+
+# Check that networking is configured.
+[ "$NETWORKING" == "no" ] && exit 0
+
+RETVAL=0
+
+prog="pure-ftpd"
+
+# Path to the pure-ftp binaries.
+fullpath=/usr/sbin/pure-ftpd
+pureftpwho=/usr/sbin/pure-ftpwho
+pure_config=/etc/pure-ftpd/pure-ftpd.conf
+pure_launch_script=/usr/sbin/pure-config.pl
+
+start() {
+	echo -n $"Starting $prog: "
+	daemon "$pure_launch_script $pure_config --daemonize > /dev/null"
+	RETVAL=$?
+	[ $RETVAL = 0 ] && touch /var/lock/subsys/pure-ftpd
+	echo
+}
+
+stop() {
+	echo -n $"Stopping $prog: "
+	killproc pure-ftpd
+	RETVAL=$?
+	[ $RETVAL = 0 ] && rm -f /var/lock/subsys/pure-ftpd
+	echo
+}
+
+# See how we were called.
+case "$1" in
+	start)
+		start
+		;;
+	stop)
+		stop
+		;;
+	restart)
+		stop
+		start
+		;;
+	reload)
+        echo -n $"Reloading $prog: "
+		killproc pure-ftpd -HUP
+		RETVAL=$?
+		echo
+		;;
+	condrestart)
+		if [ -f /var/lock/subsys/pure-ftpd ] ; then
+			stop
+			# avoid race
+			sleep 3
+			start
+		fi
+		;;
+	status)
+		status pure-ftpd
+		RETVAL=$?
+		if [ -f $pureftpwho ] && [ $RETVAL -eq 0 ] ; then
+			$pureftpwho
+		fi
+		;;
+	*)
+		echo $"Usage: pure-ftpd {start|stop|restart|reload|condrestart|status}"
+		RETVAL=1
+esac
+exit $RETVAL

Added: trunk/rpms/pure-ftpd/pure-ftpd.pureftpd.te
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd.pureftpd.te	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd.pureftpd.te	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,25 @@
+policy_module(pureftpd, 1.0)
+
+require {
+	type ftpd_t;
+};
+
+# Read /var/run/utmp
+init_read_utmp(ftpd_t)
+init_dontaudit_write_utmp(ftpd_t)
+
+### Allow connect to mysql
+# Network connect
+corenet_tcp_connect_mysqld_port(ftpd_t)
+# Socket file connect
+mysql_stream_connect(ftpd_t);
+mysql_rw_db_sockets(ftpd_t)
+
+### Allow connect to postgresql
+# Network connect
+corenet_tcp_connect_postgresql_port(ftpd_t)
+# Socket file connect
+postgresql_stream_connect(ftpd_t)
+
+# Allow connect to ldap
+sysnet_use_ldap(ftpd_t)

Added: trunk/rpms/pure-ftpd/pure-ftpd.spec
===================================================================
--- trunk/rpms/pure-ftpd/pure-ftpd.spec	                        (rev 0)
+++ trunk/rpms/pure-ftpd/pure-ftpd.spec	2008-10-06 02:10:50 UTC (rev 6498)
@@ -0,0 +1,273 @@
+# $Id$
+# Authority: dag
+
+%{?dtag: %{expand: %%define %dtag 1}}
+
+%{?el4:%define _without_selinux 1}
+%{?el3:%define _without_selinux 1}
+%{?rh9:%define _without_selinux 1}
+%{?rh7:%define _without_selinux 1}
+%{?el2:%define _without_ldap 1}
+%{?el2:%define _without_pgsql 1}
+%{?el2:%define _without_selinux 1}
+%{?el2:%define _without_tls 1}
+
+Summary: Lightweight, fast and secure FTP server
+Name: pure-ftpd
+Version: 1.0.21
+Release: 1
+License: BSD
+Group: System Environment/Daemons
+URL: http://www.pureftpd.org/
+
+Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-%{version}.tar.bz2
+Source1: pure-ftpd.init
+Source6: pure-ftpd.README.SELinux
+Source7: pure-ftpd.pureftpd.te
+Patch0: pure-ftpd-1.0.21-config.patch
+Patch1: pure-ftpd-1.0.20-libdir.patch
+Patch2: pure-ftpd-paminclude.patch
+Provides: ftpserver
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+BuildRequires: libcap-devel
+BuildRequires: pam-devel
+BuildRequires: perl
+BuildRequires: python
+%{!?_without_ldap:BuildRequires: openldap-devel}
+%{!?_without_mysql:BuildRequires: mysql-devel}
+%{!?_without_pgsql:BuildRequires: postgresql-devel}
+%{!?_without_selinux:BuildRequires: checkpolicy, selinux-policy-devel}
+%{!?_without_tls:BuildRequires: openssl-devel}
+Requires: chkconfig
+Requires: initscripts
+Requires: logrotate
+Requires: usermode
+
+%description
+Pure-FTPd is a fast, production-quality, standard-comformant FTP server,
+based upon Troll-FTPd. Unlike other popular FTP servers, it has no known
+security flaw, it is really trivial to set up and it is especially designed
+for modern Linux and FreeBSD kernels (setfsuid, sendfile, capabilities) .
+Features include PAM support, IPv6, chroot()ed home directories, virtual
+domains, built-in LS, anti-warez system, bandwidth throttling, FXP, bounded
+ports for passive downloads, UL/DL ratios, native LDAP and SQL support,
+Apache log files and more.
+Rebuild switches:
+--without extauth  disable external authentication
+--without ldap     disable ldap support
+--without mysql    disable mysql support
+--without pgsql    disable postgresql support
+--without tls      disable SSL/TLS
+
+%package selinux
+Summary: SELinux support for Pure-FTPD
+Group: System Environment/Daemons
+Requires: %{name} = %{version}-%{release}
+Requires: policycoreutils
+Requires: initscripts
+
+%description selinux
+This package adds SELinux enforcement to Pure-FTPD. Install it if you want
+Pure-FTPd to be protected in the same way other FTP servers are in Fedora
+(e.g. VSFTPd and ProFTPd)
+
+%prep
+%setup
+%patch0 -p0 -b .config
+%patch1 -p0 -b .libdir
+%patch2 -p0 -b .paminclude
+
+%{__cat} <<EOF >pure-ftpd.logrotate
+/var/log/pureftpd.log {
+    weekly
+    notifempty
+    missingok
+}
+EOF
+
+%{__cat} <<EOF >pure-ftpd.xinetd
+# default: off
+# description: pure-ftpd server, xinetd version. \
+# Don't run the standalone version if you run \
+# this and remember do set "Daemonize" to "no" \
+# in /etc/pure-ftpd/pure-ftpd.conf
+service ftp
+{
+	disable	= yes
+	socket_type		= stream
+	wait			= no
+	user			= root
+	server			= /usr/sbin/pure-config.pl
+	server_args		= /etc/pure-ftpd/pure-ftpd.conf
+	log_on_success		+= DURATION USERID
+	log_on_failure		+= USERID
+	nice			= 10
+}
+EOF
+
+%{__cat} <<EOF >pure-ftpwho.pam
+#%PAM-1.0
+auth       sufficient   pam_rootok.so
+auth       required     pam_localuser.so
+account    required     pam_permit.so
+EOF
+
+%{__cat} <<EOF >pure-ftpwho.consoleapps
+USER=root
+PROGRAM=%{_sbindir}/pure-ftpwho
+GUI=no
+EOF
+
+%{__install} -Dp -m0644 %{SOURCE6} README.SELinux
+%{__install} -Dp -m0644 %{SOURCE7} selinux/pureftpd.te
+%{__cat} <<EOF >selinux/pureftpd.fc
+%{_sbindir}/pure-ftpd    system_u:object_r:ftpd_exec_t:s0
+%{_localstatedir}/log/pureftpd.log    system_u:object_r:xferlog_t:s0
+EOF
+touch selinux/pureftpd.if
+
+%build
+%configure \
+    --sysconfdir="%{_sysconfdir}/pure-ftpd" \
+    --without-bonjour \
+    --with-altlog \
+    --with-capabilities \
+    --with-cookie \
+    --with-cork \
+    --with-diraliases \
+%{!?_without_extauth:--with-extauth} \
+    --with-ftpwho \
+    --with-largefile \
+%{!?_without_ldap:--with-ldap} \
+%{!?_without_mysql:--with-mysql} \
+    --with-pam \
+    --with-paranoidmsg \
+    --with-peruserlimits \
+%{!?_without_pgsql:--with-pgsql} \
+    --with-privsep \
+    --with-puredb \
+    --with-quotas \
+    --with-ratios \
+    --with-rfc2640 \
+    --with-sendfile \
+    --with-throttling \
+%{!?_without_tls:--with-tls --with-certfile="%{_sysconfdir}/pki/pure-ftpd/pure-ftpd.pem"} \
+    --with-uploadscript \
+    --with-virtualchroot \
+    --with-virtualhosts \
+    --with-welcomemsg
+%{__make} %{?_smp_mflags}
+
+%{!?_without_selinux:%{__make} -C selinux -f %{_datadir}/selinux/devel/Makefile}
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} install DESTDIR="%{buildroot}"
+
+%{__install} -Dp -m0755 configuration-file/pure-config.pl %{buildroot}%{_sbindir}/pure-config.pl
+%{__install} -Dp -m0644 configuration-file/pure-ftpd.conf %{buildroot}%{_sysconfdir}/pure-ftpd/pure-ftpd.conf
+%{__install} -Dp -m0755 configuration-file/pure-config.py %{buildroot}%{_sbindir}/pure-config.py
+%{__install} -Dp -m0644 pureftpd-ldap.conf %{buildroot}%{_sysconfdir}/pure-ftpd/pureftpd-ldap.conf
+%{__install} -Dp -m0644 pureftpd-mysql.conf %{buildroot}%{_sysconfdir}/pure-ftpd/pureftpd-mysql.conf
+%{__install} -Dp -m0644 pureftpd-pgsql.conf %{buildroot}%{_sysconfdir}/pure-ftpd/pureftpd-pgsql.conf
+
+%{__install} -Dp -m0644 man/pure-ftpd.8 %{buildroot}%{_mandir}/man8/pure-ftpd.8
+%{__install} -Dp -m0644 man/pure-ftpwho.8 %{buildroot}%{_mandir}/man8/pure-ftpwho.8
+%{__install} -Dp -m0644 man/pure-mrtginfo.8 %{buildroot}%{_mandir}/man8/pure-mrtginfo.8
+%{__install} -Dp -m0644 man/pure-uploadscript.8 %{buildroot}%{_mandir}/man8/pure-uploadscript.8
+%{__install} -Dp -m0644 man/pure-pw.8 %{buildroot}%{_mandir}/man8/pure-pw.8
+%{__install} -Dp -m0644 man/pure-pwconvert.8 %{buildroot}%{_mandir}/man8/pure-pwconvert.8
+%{__install} -Dp -m0644 man/pure-statsdecode.8 %{buildroot}%{_mandir}/man8/pure-statsdecode.8
+%{__install} -Dp -m0644 man/pure-quotacheck.8 %{buildroot}%{_mandir}/man8/pure-quotacheck.8
+%{__install} -Dp -m0644 man/pure-authd.8 %{buildroot}%{_mandir}/man8/pure-authd.8
+
+%{__install} -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/pure-ftpd
+%{__install} -Dp -m0644 pam/pure-ftpd %{buildroot}%{_sysconfdir}/pam.d/pure-ftpd
+%{__install} -Dp -m0644 pure-ftpd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/pure-ftpd
+%{__install} -Dp -m0644 pure-ftpd.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/pure-ftpd
+%{__install} -Dp -m0644 pure-ftpwho.pam %{buildroot}%{_sysconfdir}/pam.d/pure-ftpwho
+%{__install} -Dp -m0644 pure-ftpwho.consoleapps %{buildroot}%{_sysconfdir}/security/console.apps/pure-ftpwho
+%{__ln_s} -f consolehelper %{buildroot}%{_bindir}/pure-ftpwho
+
+%{__install} -d -m0755 %{buildroot}%{_localstatedir}/ftp/
+%{!?_without_tls:%{__install} -d -m0700 %{buildroot}%{_sysconfdir}/pki/pure-ftpd/}
+%{!?_without_selinux:%{__install} -Dp -m0644 selinux/pureftpd.pp %{buildroot}%{_datadir}/selinux/packages/pure-ftpd/pureftpd.pp}
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%post
+if [ $1 -le 1 ]; then
+    /sbin/chkconfig --add pure-ftpd
+fi
+if [ -d %{_sysconfdir}/pki/pure-ftpd/ -a ! -f %{_sysconfdir}/pki/pure-ftpd/pure-ftpd.pem ]; then
+    %{_sysconfdir}/pki/tls/certs/make-dummy-cert %{_sysconfdir}/pki/pure-ftpd/pure-ftpd.pem
+fi
+
+%preun
+if [ $1 -eq 0 ]; then
+    /sbin/service pure-ftpd stop &>/dev/null || :
+    /sbin/chkconfig --del pure-ftpd
+fi
+
+%postun
+if [ $1 -gt 0 ]; then
+    /sbin/service pure-ftpd condrestart &>/dev/null || :
+fi
+
+%post selinux
+if [ $1 -le 1 ]; then
+    semodule -i %{_datadir}/selinux/packages/pure-ftpd/pureftpd.pp 2>/dev/null || :
+    fixfiles -R pure-ftpd restore
+    /sbin/service pure-ftpd condrestart &>/dev/null || :
+fi
+
+%preun selinux
+if [ $1 -eq 0 ]; then
+    semodule -r pureftpd 2>/dev/null || :
+    fixfiles -R pure-ftpd restore
+    /sbin/service pure-ftpd condrestart &>/dev/null
+fi
+
+%postun selinux
+if [ $1 -gt 0 ]; then
+    semodule -i %{_datadir}/selinux/packages/pure-ftpd/pureftpd.pp 2>/dev/null || :
+fi
+
+%files
+%defattr(-, root, root, 0755)
+%doc AUTHORS CONTACT FAQ HISTORY NEWS README* THANKS
+%doc contrib/pure-vpopauth.pl pureftpd.schema contrib/pure-stat.pl
+%doc %{_mandir}/man8/pure-*.8*
+%config %{_initrddir}/pure-ftpd
+%config(noreplace) %{_sysconfdir}/logrotate.d/pure-ftpd
+%config(noreplace) %{_sysconfdir}/pam.d/pure-ftpd
+%config(noreplace) %{_sysconfdir}/pure-ftpd/
+%config(noreplace) %{_sysconfdir}/xinetd.d/pure-ftpd
+%config %{_sysconfdir}/pam.d/pure-ftpwho
+%config %{_sysconfdir}/security/console.apps/pure-ftpwho
+%{!?_without_tls:%{_sysconfdir}/pki/pure-ftpd/}
+%{_bindir}/pure-*
+%dir %{_localstatedir}/ftp/
+%{_sbindir}/pure-*
+
+%if %{!?_without_selinux:1}0
+%files selinux
+%defattr(-, root, root, 0755)
+%doc README.SELinux
+%{_datadir}/selinux/packages/pure-ftpd/pureftpd.pp
+%endif
+
+%changelog
+* Mon Oct 06 2008 Dag Wieers <dag at wieers.com> - 1.0.21-1
+- Updated to release 1.0.21. (rebased on Fedora)
+
+* Sun Aug 31 2003 Dag Wieers <dag at wieers.com> - 1.0.16-0
+- Updated to release 1.0.16.
+
+* Tue Feb 25 2003 Dag Wieers <dag at wieers.com> - 1.0.14-1
+- Added sysv scripts with chkconfig.
+
+* Tue Feb 25 2003 Dag Wieers <dag at wieers.com> - 1.0.14-0
+- Initial package. (using DAR)




More information about the commits mailing list