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