cvsextras 1b55c37
#$Id: proftpd.spec,v 1.11 2003/09/24 10:51:11 dude Exp $
cvsextras 1b55c37
cvsextras 1b55c37
Summary: A flexible, stable and highly-configurable FTP Server.
cvsextras 1b55c37
Name: proftpd
cvsextras 1b55c37
Version: 1.2.8
cvsextras 1b55c37
Release: 4p%{?_with_ldap:_ldap}%{?_with_mysql:_mysql}%{?_with_postgres:_postgres}.fr
cvsextras 1b55c37
Group: System Environment/Daemons
cvsextras 1b55c37
License: GPL
cvsextras 1b55c37
URL: http://www.proftpd.org/
cvsextras 1b55c37
Source: ftp://proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
cvsextras 1b55c37
Source1: proftpd.conf
cvsextras 1b55c37
Source2: proftpd.init
cvsextras 1b55c37
Source3: proftpd-xinetd
cvsextras 1b55c37
Source4: proftpd.logrotate
cvsextras 1b55c37
Source5: welcome.msg
cvsextras 1b55c37
Buildroot: %{_tmppath}/%{name}-root
cvsextras 1b55c37
Requires: pam >= 0.59, /sbin/service, /sbin/chkconfig, /etc/init.d
cvsextras 1b55c37
%{!?_without_tls:Requires: openssl}
cvsextras 1b55c37
%{!?_without_tls:BuildRequires: openssl-devel, krb5-devel}
cvsextras 1b55c37
%{?_with_ldap:Requires: openldap}
cvsextras 1b55c37
%{?_with_ldap:BuildRequires: openldap-devel}
cvsextras 1b55c37
%{?_with_mysql:Requires: mysql}
cvsextras 1b55c37
%{?_with_mysql:BuildRequires: mysql-devel}
cvsextras 1b55c37
%{?_with_postgres:Requires: postgresql}
cvsextras 1b55c37
%{?_with_postgres:BuildRequires: postgresql-devel}
cvsextras 1b55c37
BuildRequires: pam-devel, perl, pkgconfig
cvsextras 1b55c37
Provides: ftpserver
cvsextras 1b55c37
Conflicts: wu-ftpd, anonftp, vsftpd
cvsextras 1b55c37
cvsextras 1b55c37
%description
cvsextras 1b55c37
ProFTPD is an enhanced FTP server with a focus toward simplicity, security,
cvsextras 1b55c37
and ease of configuration. It features a very Apache-like configuration
cvsextras 1b55c37
syntax, and a highly customizable server infrastructure, including support for
cvsextras 1b55c37
multiple 'virtual' FTP servers, anonymous FTP, and permission-based directory
cvsextras 1b55c37
visibility.
cvsextras 1b55c37
cvsextras 1b55c37
This package defaults to the standalone behaviour of ProFTPD, but all the
cvsextras 1b55c37
needed scripts to have it run by xinetd instead are included.
cvsextras 1b55c37
cvsextras 1b55c37
Available rpmbuild rebuild options :
cvsextras 1b55c37
--without : tls
cvsextras 1b55c37
--with : ldap mysql postgres
cvsextras 1b55c37
cvsextras 1b55c37
%prep
cvsextras 1b55c37
%setup -q
cvsextras 1b55c37
cvsextras 1b55c37
%build
cvsextras 1b55c37
# Workaround for the PostgreSQL include file
cvsextras 1b55c37
perl -pi -e 's|pgsql/libpq-fe.h|libpq-fe.h|g' contrib/mod_sql_postgres.c
cvsextras 1b55c37
cvsextras 1b55c37
# TLS includes
cvsextras 1b55c37
OPENSSL_INC=""
cvsextras 1b55c37
if OPENSSL_CFLAGS=`pkg-config --cflags openssl`; then
cvsextras 1b55c37
    for i in ${OPENSSL_CFLAGS}; do
cvsextras 1b55c37
        INCPATH=`echo $i | perl -pi -e 's|-I([a-z/]*)|$1|g'`
cvsextras 1b55c37
        test ! -z ${INCPATH} && OPENSSL_INC="${OPENSSL_INC}:${INCPATH}"
cvsextras 1b55c37
    done
cvsextras 1b55c37
fi
cvsextras 1b55c37
cvsextras 1b55c37
%configure \
cvsextras 1b55c37
	--with-includes=%{_includedir}%{!?_without_tls:${OPENSSL_INC}} \
cvsextras 1b55c37
	%{?_with_mysql:--with-libraries=%{_libdir}/mysql} \
cvsextras 1b55c37
	%{?_with_postgres:--with-libraries=%{_libdir}} \
cvsextras 1b55c37
	--with-modules=mod_readme:mod_auth_pam%{?_with_ldap::mod_ldap}%{?_with_mysql::mod_sql:mod_sql_mysql}%{?_with_postgres::mod_sql:mod_sql_postgres}%{!?_without_tls::mod_tls}
cvsextras 1b55c37
make %{?_smp_mflags}
cvsextras 1b55c37
cvsextras 1b55c37
%install
cvsextras 1b55c37
rm -rf %{buildroot}
cvsextras 1b55c37
%makeinstall rundir=%{buildroot}%{_localstatedir}/run/proftpd \
cvsextras 1b55c37
	INSTALL_USER=`id -un` \
cvsextras 1b55c37
	INSTALL_GROUP=`id -gn`
cvsextras 1b55c37
install -D -m 644 contrib/dist/rpm/ftp.pamd %{buildroot}%{_sysconfdir}/pam.d/ftp
cvsextras 1b55c37
install -D -m 640 %{SOURCE1} %{buildroot}%{_sysconfdir}/proftpd.conf
cvsextras 1b55c37
install -D -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd
cvsextras 1b55c37
install -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/xinetd.d/proftpd
cvsextras 1b55c37
install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/proftpd
cvsextras 1b55c37
install -D -m 644 %{SOURCE5} %{buildroot}/var/ftp/welcome.msg
cvsextras 1b55c37
mkdir -p %{buildroot}/var/ftp/uploads
cvsextras 1b55c37
mkdir -p %{buildroot}/var/ftp/pub
cvsextras 1b55c37
mkdir -p %{buildroot}/var/log/proftpd
cvsextras 1b55c37
touch %{buildroot}%{_sysconfdir}/ftpusers
cvsextras 1b55c37
cvsextras 1b55c37
%post
cvsextras 1b55c37
if [ $1 = 1 ]; then
cvsextras 1b55c37
	/sbin/chkconfig --add proftpd
cvsextras 1b55c37
	IFS=":"; cat /etc/passwd | \
cvsextras 1b55c37
	while { read username nu nu gid nu nu nu nu; }; do \
cvsextras 1b55c37
		if [ $gid -lt 100 -a "$username" != "ftp" ]; then
cvsextras 1b55c37
			echo $username >> %{_sysconfdir}/ftpusers
cvsextras 1b55c37
		fi
cvsextras 1b55c37
	done
cvsextras 1b55c37
fi
cvsextras 1b55c37
cvsextras 1b55c37
%preun
cvsextras 1b55c37
if [ $1 = 0 ]; then
cvsextras 1b55c37
	/sbin/service proftpd stop >/dev/null 2>&1 || :
cvsextras 1b55c37
	/sbin/chkconfig --del proftpd
cvsextras 1b55c37
	/sbin/service xinetd reload >/dev/null 2>&1 || :
cvsextras 1b55c37
	if [ -d /var/run/proftpd ]; then
cvsextras 1b55c37
		rm -rf /var/run/proftpd/*
cvsextras 1b55c37
	fi
cvsextras 1b55c37
fi
cvsextras 1b55c37
cvsextras 1b55c37
%postun
cvsextras 1b55c37
if [ $1 -ge 1 ]; then
cvsextras 1b55c37
	/sbin/service proftpd condrestart >/dev/null 2>&1
cvsextras 1b55c37
fi
cvsextras 1b55c37
cvsextras 1b55c37
%clean
cvsextras 1b55c37
rm -rf %{buildroot}
cvsextras 1b55c37
cvsextras 1b55c37
%files
cvsextras 1b55c37
%defattr(-, root, root)
cvsextras 1b55c37
%doc COPYING CREDITS ChangeLog NEWS README README.LDAP README.mod_sql
cvsextras 1b55c37
%doc README.modules README.PAM doc/* sample-configurations
cvsextras 1b55c37
%dir %{_localstatedir}/run/proftpd
cvsextras 1b55c37
%config(noreplace) %{_sysconfdir}/proftpd.conf
cvsextras 1b55c37
%config(noreplace) %{_sysconfdir}/xinetd.d/proftpd
cvsextras 1b55c37
%config %{_sysconfdir}/ftpusers
cvsextras 1b55c37
%config %{_sysconfdir}/pam.d/ftp
cvsextras 1b55c37
%config %{_sysconfdir}/logrotate.d/proftpd
cvsextras 1b55c37
%{_sysconfdir}/rc.d/init.d/proftpd
cvsextras 1b55c37
%{_mandir}/*/*
cvsextras 1b55c37
%{_bindir}/*
cvsextras 1b55c37
%{_sbindir}/*
cvsextras 1b55c37
%dir /var/ftp
cvsextras 1b55c37
%attr(331, ftp, ftp) %dir /var/ftp/uploads
cvsextras 1b55c37
%dir /var/ftp/pub
cvsextras 1b55c37
%config(noreplace) /var/ftp/welcome.msg
cvsextras 1b55c37
%attr(750, root, root) %dir /var/log/proftpd
cvsextras 1b55c37
cvsextras 1b55c37
%changelog
cvsextras 1b55c37
* Wed Sep 24 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.8p to fix secutiry vulnerability.
cvsextras 1b55c37
- Fix the TLS build option at last, enable it by default.
cvsextras 1b55c37
cvsextras 1b55c37
* Mon Aug  4 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Minor fixes in included README files.
cvsextras 1b55c37
cvsextras 1b55c37
* Mon Mar 31 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Rebuilt for Red Hat Linux 9.
cvsextras 1b55c37
cvsextras 1b55c37
* Thu Mar 13 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.8.
cvsextras 1b55c37
- Remove the renamed linuxprivs module.
cvsextras 1b55c37
- Added TLS module build option.
cvsextras 1b55c37
cvsextras 1b55c37
* Fri Dec 13 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Fix change for ScoreboardFile in the default conf, thanks to Sven Hoexter.
cvsextras 1b55c37
cvsextras 1b55c37
* Mon Dec  9 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.7.
cvsextras 1b55c37
cvsextras 1b55c37
* Thu Sep 26 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Rebuilt for Red Hat Linux 8.0.
cvsextras 1b55c37
cvsextras 1b55c37
* Tue Sep 17 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.6.
cvsextras 1b55c37
- Fixed typo in the config for "AllowForeignAddress" thanks to Michel Kraus.
cvsextras 1b55c37
- Removed obsolete user install patch.
cvsextras 1b55c37
- Added "modular" ldap, mysql and postgresql support.
cvsextras 1b55c37
cvsextras 1b55c37
* Mon Jun 10 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.5.
cvsextras 1b55c37
- Changed the welcome.msg to config so that it doesn't get replaced.
cvsextras 1b55c37
cvsextras 1b55c37
* Fri May  3 2002 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Rebuilt against Red Hat Linux 7.3.
cvsextras 1b55c37
- Added the %%{?_smp_mflags} expansion.
cvsextras 1b55c37
cvsextras 1b55c37
* Tue Oct 23 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Changed the default config file : Where the pid file is stored, addedd
cvsextras 1b55c37
  an upload authorization in anon server, and separate anon logfiles.
cvsextras 1b55c37
- Updated welcome.msg to something nicer.
cvsextras 1b55c37
cvsextras 1b55c37
* Fri Oct 19 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.4, since 1.2.3 had a nasty umask bug.
cvsextras 1b55c37
cvsextras 1b55c37
* Sat Aug 18 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.2 final.
cvsextras 1b55c37
- Changed the default config file a lot.
cvsextras 1b55c37
cvsextras 1b55c37
* Wed Apr 25 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.2rc2.
cvsextras 1b55c37
cvsextras 1b55c37
* Mon Apr  1 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Update to 1.2.2rc1.
cvsextras 1b55c37
cvsextras 1b55c37
* Tue Mar 20 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Added a DenyFilter to prevent a recently discovered DOS attack.
cvsextras 1b55c37
  This is only useful for fresh installs since the config file is not
cvsextras 1b55c37
  overwritten.
cvsextras 1b55c37
cvsextras 1b55c37
* Fri Mar  2 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Upgraded to 1.2.1.
cvsextras 1b55c37
- New init script (added condrestart).
cvsextras 1b55c37
cvsextras 1b55c37
* Tue Feb 27 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Upgraded to 1.2.0 final.
cvsextras 1b55c37
cvsextras 1b55c37
* Tue Feb  6 2001 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Upgraded to 1.2.0rc3 (at last a new version!)
cvsextras 1b55c37
- Modified the spec file to support transparent upgrades
cvsextras 1b55c37
cvsextras 1b55c37
* Wed Nov  8 2000 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
- Upgraded to the latest CVS to fix the "no PORT command" bug
cvsextras 1b55c37
- Fixed the ftpuser creation script
cvsextras 1b55c37
- Modified the default config file to easily change to an anonymous
cvsextras 1b55c37
  server
cvsextras 1b55c37
cvsextras 1b55c37
* Sun Oct 15 2000 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
  [proftpd-1.2.0rc2-2]
cvsextras 1b55c37
- Updated the spec file and build process for RedHat 7.0
cvsextras 1b55c37
- Added xinetd support
cvsextras 1b55c37
- Added logrotate.d support
cvsextras 1b55c37
cvsextras 1b55c37
* Fri Jul 28 2000 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
  [proftpd-1.2.0rc2-1]
cvsextras 1b55c37
- Upgraded to 1.2.0rc2
cvsextras 1b55c37
cvsextras 1b55c37
- Upgraded to 1.2.0rc1
cvsextras 1b55c37
* Sat Jul 22 2000 Matthias Saou <matthias.saou@est.une.marmotte.net>
cvsextras 1b55c37
  [proftpd-1.2.0rc1-1]
cvsextras 1b55c37
- Upgraded to 1.2.0rc1
cvsextras 1b55c37
- Re-did the whole spec file (it's hopefully cleaner now)
cvsextras 1b55c37
- Made a patch to be able to build the RPM as an other user than root
cvsextras 1b55c37
- Added default pam support (but without /etc/shells check)
cvsextras 1b55c37
- Rewrote the rc.d script (mostly exit levels and ftpshut stuff)
cvsextras 1b55c37
- Modified the default configuration file to not display a version number
cvsextras 1b55c37
- Changed the package to standalone in one single RPM easily changeable
cvsextras 1b55c37
  to inetd (for not-so-newbie users)
cvsextras 1b55c37
- Fixed the ftpusers generating shell script (missing "nu"s for me...)
cvsextras 1b55c37
- Removed mod_ratio (usually used with databases modules anyway)
cvsextras 1b55c37
- Removed the prefix (relocations a rarely used on non-X packages)
cvsextras 1b55c37
- Gzipped the man pages
cvsextras 1b55c37
cvsextras 1b55c37
* Thu Oct 03 1999 O.Elliyasa <osman@Cable.EU.org>
cvsextras 1b55c37
- Multi package creation.
cvsextras 1b55c37
  Created core, standalone, inetd (&doc) package creations.
cvsextras 1b55c37
  Added startup script for init.d
cvsextras 1b55c37
  Need to make the "standalone & inetd" packages being created as "noarch"
cvsextras 1b55c37
- Added URL.
cvsextras 1b55c37
- Added prefix to make the package relocatable.
cvsextras 1b55c37
cvsextras 1b55c37
* Wed Sep 08 1999 O.Elliyasa <osman@Cable.EU.org>
cvsextras 1b55c37
- Corrected inetd.conf line addition/change logic.
cvsextras 1b55c37
cvsextras 1b55c37
* Sat Jul 24 1999 MacGyver <macgyver@tos.net>
cvsextras 1b55c37
- Initial import of spec.
cvsextras 1b55c37