]>
Commit | Line | Data |
---|---|---|
3407f537 PS |
1 | # |
2 | %define _ftpdir /home/services/ftp | |
3 | # | |
ba8b947d MM |
4 | %bcond_with clamav #ClamAV scanning support |
5 | ||
e4c107c6 | 6 | Summary: vsftpd - Very Secure FTP Daemon |
22cb6a9c ER |
7 | Summary(pl.UTF-8): Bardzo Bezpieczny Demon FTP |
8 | Summary(pt_BR.UTF-8): vsftpd - Daemon FTP Muito Seguro | |
e4c107c6 | 9 | Name: vsftpd |
6c42ad5f KK |
10 | Version: 2.3.0 |
11 | Release: 1 | |
e4c107c6 JB |
12 | License: GPL v2 |
13 | Group: Daemons | |
2cfdc4fa | 14 | Source0: ftp://vsftpd.beasts.org/users/cevans/%{name}-%{version}.tar.gz |
6c42ad5f | 15 | # Source0-md5: 90ea878fcfba32f764cce4dc264a3d68 |
e4c107c6 JB |
16 | Source1: %{name}.inetd |
17 | Source2: %{name}.pamd | |
18 | Source3: %{name}-ftpusers | |
f4fb5732 | 19 | Source4: ftpusers.tar.bz2 |
7d5d375b | 20 | # Source4-md5: 76c80b6ec9f4d079a1e27316edddbe16 |
6b1fc9c5 | 21 | Source5: %{name}.init |
a65fc8bc | 22 | Patch0: %{name}-builddefs.patch |
f62c9387 | 23 | Patch1: %{name}-amd64-findlibs.patch |
ba8b947d | 24 | Patch2: %{name}-clamav.patch |
e4c107c6 | 25 | URL: http://vsftpd.beasts.org/ |
4283234b | 26 | BuildRequires: libcap-devel |
a65fc8bc PS |
27 | BuildRequires: libwrap-devel |
28 | BuildRequires: openssl-devel >= 0.9.7d | |
be43983e ER |
29 | BuildRequires: rpmbuild(macros) >= 1.268 |
30 | Requires: %{name}-init = %{version}-%{release} | |
fe964f4b | 31 | Requires: filesystem >= 3.0-11 |
77ce80d1 | 32 | Requires: pam >= 0.77.3 |
e4c107c6 | 33 | Provides: ftpserver |
2418a325 | 34 | Conflicts: man-pages < 1.51 |
db24aa96 | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
e4c107c6 JB |
36 | |
37 | %description | |
38 | A Very Secure FTP Daemon - written from scratch - by Chris "One Man | |
39 | Security Audit Team" Evans. | |
40 | ||
7177ff83 | 41 | %description -l pl.UTF-8 |
e4c107c6 JB |
42 | Bardzo Bezpieczny Demon FTP - napisany od zera przez Chrisa "One Man |
43 | Security Audit Team" Evansa. | |
44 | ||
7177ff83 | 45 | %description -l pt_BR.UTF-8 |
d4759db0 | 46 | A Very Secure FTP Daemon (vsftpd) - escrito do zero - por Chris "One |
47 | Man Security Audit Team" Evans. | |
48 | ||
6b1fc9c5 AG |
49 | %package inetd |
50 | Summary: vsftpd - Very Secure FTP Daemon | |
22cb6a9c ER |
51 | Summary(pl.UTF-8): Bardzo Bezpieczny Demon FTP |
52 | Summary(pt_BR.UTF-8): vsftpd - Daemon FTP Muito Seguro | |
6b1fc9c5 AG |
53 | Group: Networking/Daemons |
54 | Requires: %{name} = %{version}-%{release} | |
55 | Requires: rc-inetd | |
56 | Provides: %{name}-init = %{version}-%{release} | |
be43983e | 57 | Obsoletes: vsftpd-standalone |
6b1fc9c5 AG |
58 | Conflicts: %{name} <= 2.0.3-1 |
59 | ||
60 | %description inetd | |
61 | This package allows to start vsftpd as inetd service. | |
62 | ||
7177ff83 JR |
63 | %description inetd -l pl.UTF-8 |
64 | Ten pakiet pozwala na wystartowanie vsftpd jako usługi inetd. | |
6b1fc9c5 AG |
65 | |
66 | %package standalone | |
67 | Summary: vsftpd - Very Secure FTP Daemon | |
22cb6a9c ER |
68 | Summary(pl.UTF-8): Bardzo Bezpieczny Demon FTP |
69 | Summary(pt_BR.UTF-8): vsftpd - Daemon FTP Muito Seguro | |
6b1fc9c5 AG |
70 | Group: Networking/Daemons |
71 | Requires(post,preun): /sbin/chkconfig | |
72 | Requires: %{name} = %{version}-%{release} | |
73 | Requires: rc-scripts | |
74 | Provides: %{name}-init = %{version}-%{release} | |
be43983e | 75 | Obsoletes: vsftpd-inetd |
6b1fc9c5 AG |
76 | Conflicts: %{name} <= 2.0.3-1 |
77 | ||
78 | %description standalone | |
79 | This package allows to start vsftpd as standalone daemon. | |
80 | ||
7177ff83 | 81 | %description standalone -l pl.UTF-8 |
6b1fc9c5 AG |
82 | Ten pakiet pozwala na wystartowanie vsftpd jako samodzielnego demona. |
83 | ||
e4c107c6 | 84 | %prep |
a1c13b88 | 85 | %setup -q |
a65fc8bc | 86 | %patch0 -p1 |
f62c9387 | 87 | %patch1 -p1 |
ba8b947d | 88 | %if %{with clamav} |
3fdda9c5 | 89 | %patch2 -p1 |
ba8b947d MM |
90 | %endif |
91 | ||
e4c107c6 JB |
92 | %build |
93 | %{__make} \ | |
94 | CC="%{__cc}" \ | |
95 | CFLAGS="%{rpmcflags}" \ | |
96 | LINK="%{rpmldflags}" | |
97 | ||
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
fe964f4b | 100 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8}} \ |
6b1fc9c5 | 101 | $RPM_BUILD_ROOT/etc/{pam.d,sysconfig/rc-inetd,logrotate.d,ftpd,rc.d/init.d} \ |
11883f94 | 102 | $RPM_BUILD_ROOT{%{_ftpdir}/pub/incoming,/var/log} |
e4c107c6 JB |
103 | |
104 | install vsftpd $RPM_BUILD_ROOT%{_sbindir}/vsftpd | |
105 | install vsftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/vsftpd.conf | |
42c194ac TP |
106 | install vsftpd.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/vsftpd.conf.5 |
107 | install vsftpd.8 $RPM_BUILD_ROOT%{_mandir}/man8/vsftpd.8 | |
e4c107c6 JB |
108 | install RedHat/vsftpd.log $RPM_BUILD_ROOT/etc/logrotate.d/vsftpd |
109 | ||
110 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/vsftpd | |
111 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/ftp | |
d4759db0 | 112 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/ftpusers |
6b1fc9c5 | 113 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/vsftpd |
e4c107c6 JB |
114 | |
115 | > $RPM_BUILD_ROOT/var/log/vsftpd.log | |
116 | ||
f4fb5732 | 117 | bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} |
b54a62e6 | 118 | rm -f $RPM_BUILD_ROOT/usr/share/man/ftpusers-path.diff |
f4fb5732 | 119 | |
e4c107c6 JB |
120 | %clean |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %post | |
124 | touch /var/log/vsftpd.log | |
125 | chmod 640 /var/log/vsftpd.log | |
6b1fc9c5 AG |
126 | |
127 | %post inetd | |
be43983e | 128 | %service -q rc-inetd reload |
e4c107c6 | 129 | |
6b1fc9c5 | 130 | %postun inetd |
be43983e ER |
131 | if [ "$1" = "0" ]; then |
132 | %service -q rc-inetd reload | |
e4c107c6 JB |
133 | fi |
134 | ||
6b1fc9c5 AG |
135 | %post standalone |
136 | /sbin/chkconfig --add %{name} | |
be43983e | 137 | %service vsftpd restart "vsftpd server" |
6b1fc9c5 AG |
138 | |
139 | %preun standalone | |
140 | if [ "$1" = "0" ]; then | |
be43983e | 141 | %service vsftpd stop |
6b1fc9c5 AG |
142 | /sbin/chkconfig --del %{name} |
143 | fi | |
144 | ||
e4c107c6 JB |
145 | %files |
146 | %defattr(644,root,root,755) | |
35a9c2e8 | 147 | %doc AUDIT BENCHMARKS BUGS Changelog FAQ README README.ssl REWARD SIZE SPEED TODO TUNING EXAMPLE SECURITY |
e4c107c6 | 148 | %attr(755,root,root) %{_sbindir}/vsftpd |
f9292778 | 149 | %dir %attr(750,root,ftp) %dir %{_sysconfdir}/ftpd |
681525da ER |
150 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vsftpd.conf |
151 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/ftpusers | |
681525da ER |
152 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/ftp |
153 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/vsftpd | |
e4c107c6 JB |
154 | %attr(640,root,root) %ghost /var/log/vsftpd.log |
155 | %{_mandir}/man5/vsftpd.conf.5* | |
156 | %{_mandir}/man8/vsftpd.8* | |
f4fb5732 | 157 | %{_mandir}/man5/ftpusers.5* |
158 | %lang(ja) %{_mandir}/ja/man5/ftpusers* | |
159 | %lang(pl) %{_mandir}/pl/man5/ftpusers* | |
160 | %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers* | |
161 | %lang(ru) %{_mandir}/ru/man5/ftpusers* | |
11883f94 | 162 | %dir %{_ftpdir} |
163 | %dir %{_ftpdir}/pub | |
e4c107c6 | 164 | # it's safe - by default anon_upload_enable=NO, anon_world_readable_only=YES |
11883f94 | 165 | %attr(775,root,ftp) %dir %{_ftpdir}/pub/incoming |
6b1fc9c5 AG |
166 | |
167 | %files inetd | |
168 | %defattr(644,root,root,755) | |
169 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/vsftpd | |
170 | ||
171 | %files standalone | |
172 | %defattr(644,root,root,755) | |
173 | %attr(754,root,root) /etc/rc.d/init.d/vsftpd |