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