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