From b3e38b09b25d9c0cad4227b7b687a7a3ae5dd34c Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Apr 21 2006 17:05:11 +0000 Subject: Update to 1.3.0 final and add ldap, mysql and postgresql sub-packages. --- diff --git a/.cvsignore b/.cvsignore index a99463a..28b8e01 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -proftpd-1.3.0rc4.tar.bz2 +proftpd-1.3.0.tar.bz2 diff --git a/proftpd.init b/proftpd.init index d0fa2ce..287f2db 100755 --- a/proftpd.init +++ b/proftpd.init @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: proftpd.init,v 1.4 2004/11/16 18:34:32 thias Exp $ +# $Id: proftpd.init,v 1.5 2006/04/21 17:05:11 thias Exp $ # # proftpd This shell script takes care of starting and stopping # proftpd. @@ -32,7 +32,7 @@ prog="proftpd" start() { echo -n $"Starting $prog: " - daemon proftpd + daemon proftpd 2>/dev/null RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd diff --git a/proftpd.spec b/proftpd.spec index 65168bb..4c3939f 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -1,11 +1,11 @@ Summary: Flexible, stable and highly-configurable FTP server Name: proftpd Version: 1.3.0 -Release: 0.2.rc4%{?dist} +Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://www.proftpd.org/ -Source0: ftp://ftp.proftpd.org/distrib/source/proftpd-%{version}rc4.tar.bz2 +Source0: ftp://ftp.proftpd.org/distrib/source/proftpd-%{version}.tar.bz2 Source1: proftpd.conf Source2: proftpd.init Source3: proftpd-xinetd @@ -13,18 +13,14 @@ Source4: proftpd.logrotate Source5: welcome.msg Source6: proftpd.pam BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires: pam >= 0.59, /sbin/service, /sbin/chkconfig -BuildRequires: pam-devel, perl, ncurses-devel, pkgconfig -%{!?_without_tls:Requires: openssl} -%{!?_without_tls:BuildRequires: openssl-devel, krb5-devel} -%{?_with_ldap:Requires: openldap} -%{?_with_ldap:BuildRequires: openldap-devel} -%{?_with_mysql:Requires: mysql} -%{?_with_mysql:BuildRequires: mysql-devel, zlib-devel} -%{?_with_postgresql:Requires: postgresql-libs} -%{?_with_postgresql:BuildRequires: postgresql-devel} +Requires: pam >= 0.59 +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/service, /sbin/chkconfig +Requires(postun): /sbin/service +BuildRequires: pam-devel, ncurses-devel, pkgconfig +BuildRequires: openssl-devel, krb5-devel, libacl-devel +BuildRequires: openldap-devel, mysql-devel, zlib-devel, postgresql-devel Provides: ftpserver -Conflicts: wu-ftpd, anonftp, vsftpd %description ProFTPD is an enhanced FTP server with a focus toward simplicity, security, @@ -36,56 +32,73 @@ visibility. This package defaults to the standalone behaviour of ProFTPD, but all the needed scripts to have it run by xinetd instead are included. -Available rpmbuild rebuild options : ---without : tls ---with : ldap mysql postgresql ipv6 + +%package ldap +Summary: Module to add LDAP support to the ProFTPD FTP server +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} + +%description ldap +Module to add LDAP support to the ProFTPD FTP server. + + +%package mysql +Summary: Module to add MySQL support to the ProFTPD FTP server +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} + +%description mysql +Module to add MySQL support to the ProFTPD FTP server. + + +%package postgresql +Summary: Module to add PostgreSQL support to the ProFTPD FTP server +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} + +%description postgresql +Module to add PostgreSQL support to the ProFTPD FTP server. %prep -%setup -n %{name}-%{version}rc4 +%setup %build -# Workaround for the PostgreSQL include file -%{__perl} -pi -e 's|pgsql/libpq-fe.h|libpq-fe.h|g' contrib/mod_sql_postgres.c - # Disable stripping in order to get useful debuginfo packages %{__perl} -pi -e 's|"-s"|""|g' configure -# TLS includes -OPENSSL_INC="" -if OPENSSL_CFLAGS=`pkg-config --cflags openssl`; then - for i in ${OPENSSL_CFLAGS}; do - INCPATH=`echo $i | perl -pi -e 's|-I([a-z/]*)|$1|g'` - test ! -z ${INCPATH} && OPENSSL_INC="${OPENSSL_INC}:${INCPATH}" - done -fi - %configure \ - --localstatedir="/var/run" \ - --with-includes="%{_includedir}%{!?_without_tls:${OPENSSL_INC}}%{?_with_mysql::%{_includedir}/mysql}" \ - %{?_with_ipv6:--enable-ipv6} \ - %{?_with_mysql:--with-libraries="%{_libdir}/mysql"} \ - %{?_with_postgresql:--with-libraries="%{_libdir}"} \ - --with-modules=mod_readme:mod_auth_pam%{?_with_ldap::mod_ldap}%{?_with_mysql::mod_sql:mod_sql_mysql}%{?_with_postgresql::mod_sql:mod_sql_postgres}%{!?_without_tls::mod_tls} + --libexecdir="%{_libexecdir}/proftpd" \ + --localstatedir="%{_var}/run" \ + --enable-ctrls \ + --enable-facl \ + --enable-dso \ + --enable-ipv6 \ + --with-libraries="%{_libdir}/mysql" \ + --with-includes="%{_includedir}/mysql" \ + --with-modules=mod_readme:mod_auth_pam:mod_tls \ + --with-shared=mod_ldap:mod_sql:mod_sql_mysql:mod_sql_postgres + %{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot} -%makeinstall rundir="%{buildroot}%{_localstatedir}/run/proftpd" \ +%{__make} install DESTDIR=%{buildroot} \ + rundir="%{_var}/run/proftpd" \ INSTALL_USER=`id -un` \ INSTALL_GROUP=`id -gn` -%{__install} -D -p -m 640 %{SOURCE1} \ +%{__install} -D -p -m 0640 %{SOURCE1} \ %{buildroot}%{_sysconfdir}/proftpd.conf -%{__install} -D -p -m 755 %{SOURCE2} \ +%{__install} -D -p -m 0755 %{SOURCE2} \ %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd -%{__install} -D -p -m 640 %{SOURCE3} \ +%{__install} -D -p -m 0640 %{SOURCE3} \ %{buildroot}%{_sysconfdir}/xinetd.d/xproftpd -%{__install} -D -p -m 644 %{SOURCE4} \ +%{__install} -D -p -m 0644 %{SOURCE4} \ %{buildroot}%{_sysconfdir}/logrotate.d/proftpd -%{__install} -D -p -m 644 %{SOURCE5} %{buildroot}/var/ftp/welcome.msg -%{__install} -D -p -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/proftpd +%{__install} -D -p -m 0644 %{SOURCE5} %{buildroot}/var/ftp/welcome.msg +%{__install} -D -p -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/proftpd %{__mkdir_p} %{buildroot}/var/ftp/uploads %{__mkdir_p} %{buildroot}/var/ftp/pub %{__mkdir_p} %{buildroot}/var/log/proftpd @@ -97,7 +110,7 @@ touch %{buildroot}%{_sysconfdir}/ftpusers %post -if [ $1 = 1 ]; then +if [ $1 -eq 1 ]; then /sbin/chkconfig --add proftpd IFS=":"; cat /etc/passwd | \ while { read username nu nu gid nu nu nu nu; }; do \ @@ -108,12 +121,12 @@ if [ $1 = 1 ]; then fi %preun -if [ $1 = 0 ]; then +if [ $1 -eq 0 ]; then /sbin/service proftpd stop &>/dev/null || : /sbin/chkconfig --del proftpd /sbin/service xinetd reload &>/dev/null || : - if [ -d /var/run/proftpd ]; then - rm -rf /var/run/proftpd/* + if [ -d %{_var}/run/proftpd ]; then + rm -rf %{_var}/run/proftpd/* fi fi @@ -136,6 +149,10 @@ fi %{_sysconfdir}/rc.d/init.d/proftpd %{_mandir}/*/* %{_bindir}/* +%dir %{_libexecdir}/proftpd/ +%{_libexecdir}/proftpd/mod_sql.so +%exclude %{_libexecdir}/proftpd/*.a +%exclude %{_libexecdir}/proftpd/*.la %{_sbindir}/* %dir /var/ftp/ %attr(331, ftp, ftp) %dir /var/ftp/uploads/ @@ -143,8 +160,37 @@ fi %config(noreplace) /var/ftp/welcome.msg %attr(750, root, root) %dir /var/log/proftpd/ +%files ldap +%defattr(-, root, root, 0755) +%dir %{_libexecdir}/proftpd/ +%{_libexecdir}/proftpd/mod_ldap.so + +%files mysql +%defattr(-, root, root, 0755) +%dir %{_libexecdir}/proftpd/ +%{_libexecdir}/proftpd/mod_sql_mysql.so + +%files postgresql +%defattr(-, root, root, 0755) +%dir %{_libexecdir}/proftpd/ +%{_libexecdir}/proftpd/mod_sql_postgres.so + %changelog +* Fri Apr 21 2006 Matthias Saou 1.3.0-1 +- Update to 1.3.0 final. +- Remove no longer needed PostgreSQL and OpenSSL detection workarounds. +- Remove explicit conflicts on wu-ftpd, anonftp and vsftpd to let people + install more than one ftp daemon (what for? hmm...) (#189023). +- Enable LDAP, MySQL and PostgreSQL as DSOs by default, and stuff them in + new sub-packages. This won't introduce any regression since they weren't + enabled by default. +- Remove useless explicit requirements. +- Rearrange scriplets requirements. +- Enable ctrls (controls via ftpdctl) and facl (POSIX ACLs). +- Using --disable-static makes the build fail, so exclude .a files in %%files. +- Silence harmless IPv6 failure message at startup when IPv6 isn't available. + * Tue Mar 7 2006 Matthias Saou 1.3.0-0.2.rc4 - Update to 1.3.0rc4 (bugfix release). diff --git a/sources b/sources index d8119fd..20582e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -175da3e672d9f441b852259c7baee21e proftpd-1.3.0rc4.tar.bz2 +fae47d01b52e035eb6b7190e74c17722 proftpd-1.3.0.tar.bz2