2 %bcond_without pam # disable PAM support
3 %bcond_without ipv6 # disable IPv6 and TCPD support
4 %bcond_without ssl # disbale TLS/SSL support
5 %bcond_with ldap # enable LDAP support
6 %bcond_with mysql # enable MySQL support
7 %bcond_with pgsql # enable PostgreSQL support
8 %bcond_with quotafile # enable quota file support
9 %bcond_with quotaldap # enable quota ldap support
10 %bcond_with quotamysql # enable quota mysql support
11 %bcond_with quotapgsql # enable quota pgsql support
12 %bcond_with linuxprivs # enable libcap support
14 Summary: PROfessional FTP Daemon with apache-like configuration syntax
15 Summary(es): Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
16 Summary(pl): PROfesionalny serwer FTP
17 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
18 Summary(zh_CN): Ò×ÓÚ¹ÜÀíµÄ,°²È«µÄ FTP ·þÎñÆ÷
25 Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
26 # Source0-md5: 5feb4a7348e12faefc25e34fd92efdd6
29 Source4: %{name}.inetd
30 Source5: %{name}.sysconfig
32 Source7: ftpusers.tar.bz2
33 # Source7-md5: 76c80b6ec9f4d079a1e27316edddbe16
34 Source8: http://www.castaglia.org/proftpd/modules/%{name}-mod-shaper-0.5.5.tar.gz
35 # Source8-md5: ca3d63ffbc6ad5b6a9063f79b36d1b55
36 Patch0: %{name}-umode_t.patch
37 Patch1: %{name}-glibc.patch
38 Patch2: %{name}-paths.patch
39 Patch3: %{name}-noautopriv.patch
40 Patch4: %{name}-wtmp.patch
41 Patch5: %{name}-sendfile64.patch
42 Patch6: %{name}-CAN-2005-2390.patch
43 URL: http://www.proftpd.org/
44 BuildRequires: autoconf
45 BuildRequires: automake
46 BuildRequires: libwrap-devel
47 %{?with_quotamysql:BuildRequires: mysql-devel}
48 %{?with_quotamysql:BuildRequires: mysql-devel}
49 BuildRequires: ncurses-devel
50 %{?with_quotaldap:BuildRequires: openldap-devel}
51 %{?with_quotaldap:BuildRequires: openldap-devel}
52 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
53 %{?with_pam:BuildRequires: pam-devel}
54 %{?with_quotapgsql:BuildRequires: postgresql-devel}
55 %{?with_quotapgsql:BuildRequires: postgresql-devel}
56 BuildRequires: rpmbuild(macros) >= 1.268
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 %define _sysconfdir /etc/ftpd
60 %define _localstatedir /var/run
63 ProFTPD is a highly configurable FTP daemon for unix and unix-like
64 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
65 replacement for wu-ftpd. Full online documentation is available at
66 <http://www.proftpd.org/>, including a server configuration directive
70 ProFTPD es un servidor FTP altamente configurable para sistemas
71 operativos unix. Está proyectado para ser un substituto directo al
72 wu-ftpd. La documentación completa está disponible en
73 <http://www.proftpd.org/>, incluido el manual de referencia para las
74 directivas de configuración del servidor.
77 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
78 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
79 dokumentacja jest dostêpna on-line pod <http://www.proftpd.org/>
80 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
83 O ProFTPD é um servidor FTP altamente configurável para sistemas
86 É projetado para ser um substituto direto para o wu-ftpd. A
87 documentação completa está disponível em <http://www.proftpd.org/>,
88 incluindo o manual de referência para as diretivas de configuração do
92 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
93 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
96 Requires(post): fileutils
97 %{?with_pam:Requires: pam >= 0.79.0}
98 Obsoletes: proftpd < 0:1.2.2rc1-3
101 ProFTPD is a highly configurable FTP daemon for unix and unix-like
102 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
103 replacement for wu-ftpd. Full online documentation is available at
104 <http://www.proftpd.org/>, including a server configuration directive
107 This package also includes mod_shaper module from
108 <http://www.castaglia.org/proftpd/>
110 %description common -l pl
111 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
112 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
113 dokunentacja jest dostêpna on-line pod <http://www.proftpd.org/>
114 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
116 This package also includes mod_shaper module from
117 <http://www.castaglia.org/proftpd/>
120 Summary: inetd configs for proftpd
121 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
123 Requires(post): fileutils
125 Requires(post): sed >= 4.0
126 Requires(triggerpostun): sed >= 4.0
127 Requires: %{name}-common = %{epoch}:%{version}-%{release}
130 Provides: proftpd = %{epoch}:%{version}-%{release}
136 Obsoletes: heimdal-ftpd
137 Obsoletes: linux-ftpd
138 Obsoletes: muddleftpd
139 Obsoletes: proftpd-standalone
141 Obsoletes: troll-ftpd
144 Conflicts: man-pages < 1.51
147 ProFTPD configs for running from inetd.
149 %description inetd -l pl
150 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
153 Summary: Standalone daemon configs for proftpd
154 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
156 Requires(post): fileutils
158 Requires(post): sed >= 4.0
159 Requires(post,preun): /sbin/chkconfig
160 Requires(triggerpostun): sed >= 4.0
161 Requires: %{name}-common = %{epoch}:%{version}-%{release}
164 Provides: proftpd = %{epoch}:%{version}-%{release}
170 Obsoletes: heimdal-ftpd
171 Obsoletes: linux-ftpd
172 Obsoletes: muddleftpd
173 Obsoletes: proftpd-inetd
175 Obsoletes: troll-ftpd
178 Conflicts: man-pages < 1.51
180 %description standalone
181 ProFTPD configs for running as a standalone daemon.
183 %description standalone -l pl
184 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
188 %if %{with mysql} && %{with pgsql}
189 echo "Error: You can't build at once --with mysql and --with pgsql"
201 # move mod_shaper code on to the source tree
202 mv mod_shaper/mod_shaper.c contrib/
205 cp -f /usr/share/automake/config.sub .
207 RUN_DIR=%{_localstatedir} ; export RUN_DIR
208 CFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I%{_includedir}/mysql}"
209 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I%{_includedir}/mysql}"
216 %{?with_ipv6:mod_wrap}
217 %{?with_pam:mod_auth_pam}
218 %{?with_ldap:mod_ldap}
219 %{?with_quotafile:mod_quotatab mod_quotatab_file}
220 %{?with_quotaldap:mod_quotatab mod_quotatab_ldap}
221 %{?with_quotamysql:mod_quotatab mod_quotatab_sql}
222 %{?with_quotapgsql:mod_quotatab mod_quotatab_sql}
223 %{?with_linuxprivs:mod_linuxprivs}
224 %{?with_mysql:mod_sql mod_sql_mysql}
225 %{?with_pgsql:mod_sql mod_sql_postgres}
229 --enable-autoshadow \
230 --with-modules=$(echo $MODULES | tr ' ' ':') \
231 %{?with_ipv6:--enable-ipv6} \
232 %{!?with_ssl:--disable-tls} \
239 rm -rf $RPM_BUILD_ROOT
240 install -d $RPM_BUILD_ROOT/etc/{pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
241 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
244 DESTDIR=$RPM_BUILD_ROOT \
245 INSTALL_USER=%(id -u) \
246 INSTALL_GROUP=%(id -g)
248 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
250 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
251 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
252 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
253 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
254 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
255 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
257 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
259 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
260 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
261 :> $RPM_BUILD_ROOT/var/log/xferlog
263 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
265 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
267 rm -f $RPM_BUILD_ROOT%{_mandir}/ftpusers-path.diff*
270 rm -rf $RPM_BUILD_ROOT
274 touch /var/log/xferlog
275 awk -F: '{ if (($3 < 500) && ($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
276 if [ ! -f %{_sysconfdir}/ftpusers ]; then
277 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
281 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
282 cp -f %{_sysconfdir}/proftpd.conf{,.rpmorig}
283 sed -i -e 's/^ServerType[[:space:]]\+standalone/ServerType inetd/g' %{_sysconfdir}/proftpd.conf
285 %service -q rc-inetd reload
288 if [ "$1" = "0" ]; then
289 %service -q rc-inetd reload
293 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
294 cp -f %{_sysconfdir}/proftpd.conf{,.rpmorig}
295 sed -i -e 's/^ServerType[[:space:]]\+inetd/ServerType standalone/g' %{_sysconfdir}/proftpd.conf
297 /sbin/chkconfig --add proftpd
298 %service proftpd restart "ProFTPD daemon"
301 if [ "$1" = "0" ]; then
302 %service proftpd stop
303 /sbin/chkconfig --del proftpd
306 %triggerpostun inetd -- %{name}-inetd <= 1:1.2.10
307 echo "Changing deprecated config options"
308 cp -f %{_sysconfdir}/proftpd.conf{,.rpmorig}
310 s/AuthPAMAuthoritative\b/AuthPAM/
311 s/TCPDServiceName/TCPServiceName/
312 s/TlsRsaCertFile/TLSRSACertificateFile/
313 s/TlsRsaKeyFile/TLSRSACertificateKeyFile/
314 s/TlsDsaCertFile/TLSDSACertificateFile/
315 s/TlsDsaKeyFile/TLSDSACertificateKeyFile/
316 s/TlsCrlFile/TLSCARevocationFile/
317 s/TlsDhParamFile/TLSDHParamFile/
318 s/TlsCipherList/TLSCipherSuite/
319 s/TlsCertsOk/TLSVerifyClient/
321 ' %{_sysconfdir}/proftpd.conf
323 %triggerpostun standalone -- %{name}-standalone <= 1:1.2.10
324 echo "Changing deprecated config options"
325 cp -f %{_sysconfdir}/proftpd.conf{,.rpmorig}
327 s/AuthPAMAuthoritative\b/AuthPAM/
328 s/TCPDServiceName/TCPServiceName/
329 s/TlsRsaCertFile/TLSRSACertificateFile/
330 s/TlsRsaKeyFile/TLSRSACertificateKeyFile/
331 s/TlsDsaCertFile/TLSDSACertificateFile/
332 s/TlsDsaKeyFile/TLSDSACertificateKeyFile/
333 s/TlsCrlFile/TLSCARevocationFile/
334 s/TlsDhParamFile/TLSDHParamFile/
335 s/TlsCipherList/TLSCipherSuite/
336 s/TlsCertsOk/TLSVerifyClient/
338 ' %{_sysconfdir}/proftpd.conf
341 %defattr(644,root,root,755)
342 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS RELEASE_NOTES
343 %doc README README.LDAP README.PAM README.capabilities README.classes README.controls README.IPv6
345 %doc doc/*html contrib/*.html
347 %attr(750,root,ftp) %dir %{_sysconfdir}
348 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
349 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
350 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
351 %attr(640,root,root) %ghost /var/log/*
352 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
354 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
356 %attr(755,root,root) %{_bindir}/*
357 %attr(755,root,root) %{_sbindir}/*
362 %dir /var/lib/ftp/pub
363 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
366 %defattr(644,root,root,755)
367 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
369 %lang(ja) %{_mandir}/ja/man5/ftpusers*
370 %lang(pl) %{_mandir}/pl/man5/ftpusers*
371 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
372 %lang(ru) %{_mandir}/ru/man5/ftpusers*
375 %defattr(644,root,root,755)
376 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/proftpd
377 %attr(754,root,root) /etc/rc.d/init.d/proftpd
379 %lang(ja) %{_mandir}/ja/man5/ftpusers*
380 %lang(pl) %{_mandir}/pl/man5/ftpusers*
381 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
382 %lang(ru) %{_mandir}/ru/man5/ftpusers*