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