%bcond_without tls # disable SSL/TLS support
%bcond_without cap # disable capabilities
-%define rel 2
+%define rel 4
Summary: Small, fast and secure FTP server
Summary(pl.UTF-8): Mały, szybki i bezpieczny serwer FTP
Name: pure-ftpd
-Version: 1.0.46
+Version: 1.0.48
Release: %{rel}%{?with_extra:extra}
License: BSD-like%{?with_extra:, GLPv2 for pure-config due to libcfg+ license}
Group: Daemons
Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: efce5529c1f0a39dafdd532c619503f1
+# Source0-md5: 4538d563fb4cbe755767c91b14ed2fd2
Source1: %{name}.pamd
Source2: %{name}.init
Source3: %{name}.sysconfig
Patch3: %{name}-mysql_config.patch
# from Fedora
Patch4: 0003-Allow-having-both-options-and-config-file-on-command.patch
-
-Patch7: audit_cap.patch
-Patch8: %{name}-apparmor.patch
-Patch9: %{name}-mysql-utf8.patch
+Patch5: audit_cap.patch
+Patch6: %{name}-apparmor.patch
+Patch7: %{name}-mysql-utf8.patch
+# ressurect minimal RFC2640 support, assumes fs handles utf8
+Patch8: utf8.patch
URL: http://www.pureftpd.org/
%{?with_extra:BuildRequires: autoconf}
%{?with_extra:BuildRequires: automake}
Provides: ftpserver
Provides: user(ftpauth)
Provides: group(ftpauth)
+Provides: user(ftpcert)
+Provides: group(ftpcert)
Conflicts: man-pages < 1.51
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%patch1 -p1
%patch3 -p1
%patch4 -p1
-
+%patch5 -p1
+%patch6 -p1
%patch7 -p1
%patch8 -p1
-%patch9 -p1
%{?with_extra:%patch2 -p1}
%{__aclocal} -Im4
%{__autoconf}
%{__autoheader}
+%{__automake}
%configure \
CFLAGS="%{rpmcflags} %{rpmcppflags} -DALLOW_DELETION_OF_TEMPORARY_FILES=1 -DALWAYS_SHOW_RESOLVED_SYMLINKS=1" \
+ --disable-silent-rules \
--with-boring \
--with-altlog \
--with-cookie \
%{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
--with-pam \
--with-peruserlimits \
- --with-rfc2640 \
%{?with_pgsql:--with-pgsql} \
--with-privsep \
%{?with_puredb:--with-puredb} \
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
+install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d,%{name}/{certd,authd,conf}} \
$RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir},%{schemadir}}
%{__make} install \
%pre
%groupadd -g 326 ftpauth
%useradd -u 326 -d %{_ftpdir} -s /bin/false -c "FTP Auth daemon" -g ftpauth ftpauth
+%groupadd -g 335 ftpcert
+%useradd -u 335 -d %{_ftpdir} -s /bin/false -c "FTP Cert daemon" -g ftpcert ftpcert
%preun
if [ "$1" = "0" ]; then
if [ "$1" = "0" ]; then
%userremove ftpauth
%groupremove ftpauth
+ %userremove ftpcert
+ %groupremove ftpcert
fi
%post -n openldap-schema-pureftpd
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
+%doc AUTHORS ChangeLog COPYING FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/*
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
+%attr(751,root,root) %config(noreplace) %verify(not md5 mtime size) %dir /etc/%{name}
+%attr(750,root,ftpauth) %config(noreplace) %verify(not md5 mtime size) %dir /etc/%{name}/authd
+%attr(750,root,ftpcert) %config(noreplace) %verify(not md5 mtime size) %dir /etc/%{name}/certd
+# for future /etc/ftpd -> /etc/pure-ftpd/conf migration
+#%attr(750,root,ftpcert) %config(noreplace) %verify(not md5 mtime size) %dir /etc/%{name}/conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpusers
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-dir-aliases
%{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}