2007-01-16 00:40:43 +01:00
|
|
|
#
|
2011-02-25 11:57:21 +01:00
|
|
|
# spec file for package vsftpd
|
2007-01-16 00:40:43 +01:00
|
|
|
#
|
2016-03-10 19:20:17 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:40:43 +01:00
|
|
|
#
|
2008-09-13 12:26:56 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:40:43 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-02-21 12:17:29 +01:00
|
|
|
|
2015-09-21 13:35:52 +02:00
|
|
|
%if 0%{?suse_version} > 1210
|
2015-09-21 13:27:21 +02:00
|
|
|
%global with_systemd 1
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
|
|
|
%global with_systemd 0
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
Name: vsftpd
|
2015-09-08 13:05:12 +02:00
|
|
|
Version: 3.0.3
|
2012-02-15 17:42:34 +01:00
|
|
|
Release: 0
|
2007-01-16 00:40:43 +01:00
|
|
|
Summary: Very Secure FTP Daemon - Written from Scratch
|
2014-04-10 15:24:27 +02:00
|
|
|
License: SUSE-GPL-2.0-with-openssl-exception
|
2007-01-16 00:40:43 +01:00
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
2011-09-22 13:33:04 +02:00
|
|
|
Url: https://security.appspot.com/vsftpd.html
|
2012-10-22 15:40:00 +02:00
|
|
|
Source0: https://security.appspot.com/downloads/%{name}-%{version}.tar.gz
|
2014-05-26 15:22:17 +02:00
|
|
|
Source1: %{name}.pam
|
|
|
|
Source2: %{name}.logrotate
|
2015-09-21 13:27:21 +02:00
|
|
|
Source3: %{name}.init
|
2007-01-16 00:40:43 +01:00
|
|
|
Source4: README.SUSE
|
2014-05-26 15:22:17 +02:00
|
|
|
Source5: %{name}.xml
|
|
|
|
Source6: %{name}.firewall
|
2011-11-27 21:24:40 +01:00
|
|
|
Source7: vsftpd.service
|
2014-05-26 15:00:04 +02:00
|
|
|
Source8: vsftpd@.service
|
2014-05-26 15:22:17 +02:00
|
|
|
Source9: %{name}.keyring
|
2014-05-26 15:00:04 +02:00
|
|
|
Source10: vsftpd.socket
|
2012-10-22 15:40:00 +02:00
|
|
|
Source1000: https://security.appspot.com/downloads/%{name}-%{version}.tar.gz.asc
|
2011-12-25 23:14:07 +01:00
|
|
|
Patch1: vsftpd-2.0.4-lib64.diff
|
|
|
|
Patch3: vsftpd-2.0.4-xinetd.diff
|
|
|
|
Patch4: vsftpd-2.0.4-enable-ssl.patch
|
|
|
|
Patch5: vsftpd-2.0.4-dmapi.patch
|
|
|
|
Patch6: vsftpd-2.0.5-vuser.patch
|
|
|
|
Patch7: vsftpd-2.0.5-enable-debuginfo.patch
|
|
|
|
Patch8: vsftpd-2.0.5-utf8-log-names.patch
|
|
|
|
Patch9: vsftpd-2.3.5-conf.patch
|
2012-08-24 09:10:05 +02:00
|
|
|
Patch10: vsftpd-3.0.0_gnu_source_defines.patch
|
|
|
|
Patch11: vsftpd-3.0.0-optional-seccomp.patch
|
2013-04-04 12:09:44 +02:00
|
|
|
#PATCH-FIX-OPENSUSE: bnc#786024, second issue with pam_login_acct
|
|
|
|
Patch13: vsftpd-drop-newpid-from-clone.patch
|
|
|
|
#PATCH-FIX-OPENSUSE: bnc#812406
|
|
|
|
Patch14: vsftpd-enable-fcntl-f_setfl.patch
|
|
|
|
#PATCH-FIX-OPENSUSE: bnc#812406
|
|
|
|
Patch15: vsftpd-enable-dev-log-sendto.patch
|
2014-04-10 15:24:27 +02:00
|
|
|
#PATCH-FEATURE-SUSE: FATE#311051, call chroot with user credentials to enable nsf with squash_root option
|
|
|
|
Patch16: vsftpd-root-squashed-chroot.patch
|
|
|
|
#PATCH-FIX-UPSTREAM: bnc#870122
|
|
|
|
Patch17: vsftpd-enable-gettimeofday-sec.patch
|
2014-09-01 17:38:56 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: bnc#890469 fix broken syscall on s390
|
|
|
|
Patch18: vsftpd-3.0.2-s390.patch
|
2015-03-23 21:22:32 +01:00
|
|
|
#PATCH-FIX-UPSTREAM: bnc#900326 deny_file filtering acts weirdly (19-22)
|
2015-01-02 11:33:48 +01:00
|
|
|
Patch19: vsftpd-2.1.0-filter.patch
|
2015-03-23 21:10:51 +01:00
|
|
|
Patch20: vsftpd-2.2.0-wildchar.patch
|
|
|
|
Patch21: vsftpd-2.3.4-sqb.patch
|
2015-03-23 21:22:32 +01:00
|
|
|
Patch22: vsftpd-path-normalize.patch
|
2016-03-10 19:20:17 +01:00
|
|
|
Patch23: vsftpd-ls-memleak.patch
|
2016-03-21 13:54:56 +01:00
|
|
|
#PATCH-FIX-UPSTREAM: bnc#970982
|
|
|
|
Patch24: vsftpd-3.0.2-wnohang.patch
|
2014-05-26 15:22:17 +02:00
|
|
|
BuildRequires: libcap-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
Requires: logrotate
|
2016-03-23 11:08:13 +01:00
|
|
|
Requires(pre): shadow
|
2007-01-16 00:40:43 +01:00
|
|
|
Provides: ftp-server
|
2014-05-26 15:22:17 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2015-09-21 13:35:52 +02:00
|
|
|
BuildRequires: systemd
|
2012-02-21 11:52:18 +01:00
|
|
|
%{?systemd_requires}
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
|
|
|
Requires(post): %insserv_prereq
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2010-08-13 02:40:09 +02:00
|
|
|
|
2007-01-16 00:40:43 +01:00
|
|
|
%description
|
2010-01-25 16:41:53 +01:00
|
|
|
Vsftpd is an FTP server, or daemon. The "vs" stands for Very Secure.
|
2007-01-16 00:40:43 +01:00
|
|
|
Obviously this is not a guarantee, but the entire codebase was written
|
|
|
|
with security in mind, and carefully designed to be resilient to
|
|
|
|
attack.
|
|
|
|
|
|
|
|
Recent evidence suggests that vsftpd is also extremely fast (and this
|
|
|
|
is before any explicit performance tuning!). In tests against wu-ftpd,
|
|
|
|
vsftpd was always faster, supporting over twice as many users in some
|
|
|
|
tests.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2010-08-13 02:40:10 +02:00
|
|
|
%patch1
|
2014-05-26 14:48:36 +02:00
|
|
|
%patch3 -p1
|
2007-01-16 00:40:43 +01:00
|
|
|
%patch4
|
|
|
|
%patch5
|
|
|
|
%patch6
|
|
|
|
%patch7
|
2010-08-13 02:40:10 +02:00
|
|
|
%patch8
|
2008-05-05 01:14:37 +02:00
|
|
|
%patch9
|
2012-04-11 14:03:42 +02:00
|
|
|
%patch10 -p1
|
2012-04-24 15:17:54 +02:00
|
|
|
%patch11 -p1
|
2013-04-04 12:09:44 +02:00
|
|
|
%patch13 -p1
|
|
|
|
%patch14 -p1
|
|
|
|
%patch15 -p1
|
2014-04-10 15:24:27 +02:00
|
|
|
%patch16 -p1
|
|
|
|
%patch17 -p1
|
2014-09-01 17:38:56 +02:00
|
|
|
%patch18 -p1
|
2015-01-02 11:33:48 +01:00
|
|
|
%patch19 -p1
|
2015-03-23 21:10:51 +01:00
|
|
|
%patch20 -p1
|
|
|
|
%patch21 -p1
|
2015-03-23 21:22:32 +01:00
|
|
|
%patch22 -p1
|
2016-03-10 19:20:17 +01:00
|
|
|
%patch23 -p1
|
2016-03-21 13:54:56 +01:00
|
|
|
%patch24 -p1
|
2007-01-16 00:40:43 +01:00
|
|
|
|
|
|
|
%build
|
2012-04-24 15:17:54 +02:00
|
|
|
%define seccomp_opts -D_GNU_SOURCE -DUSE_SECCOMP
|
2007-01-16 00:40:43 +01:00
|
|
|
rm -f dummyinc/sys/capability.h
|
2014-05-26 15:22:17 +02:00
|
|
|
make CFLAGS="%{optflags} -DOPENSSL_NO_SSL_INTERN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIE -fstack-protector --param=ssp-buffer-size=4 %{seccomp_opts}" \
|
2012-04-11 14:03:42 +02:00
|
|
|
LDFLAGS="-fPIE -pie -Wl,-z,relro -Wl,-z,now" LINK=
|
2007-01-16 00:40:43 +01:00
|
|
|
|
|
|
|
%install
|
2014-05-26 15:22:17 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/empty
|
|
|
|
cp %{SOURCE4} .
|
|
|
|
install -D -m 755 %{name} %{buildroot}%{_sbindir}/%{name}
|
|
|
|
install -D -m 600 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
|
|
|
|
install -D -m 600 xinetd.d/%{name} %{buildroot}%{_sysconfdir}/xinetd.d/%{name}
|
|
|
|
install -D -m 644 $RPM_SOURCE_DIR/%{name}.pam %{buildroot}%{_sysconfdir}/pam.d/%{name}
|
|
|
|
install -D -m 644 $RPM_SOURCE_DIR/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
install -D -m 644 %{name}.conf.5 %{buildroot}/%{_mandir}/man5/%{name}.conf.5
|
|
|
|
install -D -m 644 %{name}.8 %{buildroot}/%{_mandir}/man8/%{name}.8
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2014-05-26 15:22:17 +02:00
|
|
|
ln -sf service %{buildroot}/%{_sbindir}/rc%{name}
|
|
|
|
install -D -m 0644 %{SOURCE7} %{buildroot}/%{_unitdir}/%{name}.service
|
|
|
|
install -D -m 0644 %{SOURCE8} %{buildroot}/%{_unitdir}/%{name}@.service
|
|
|
|
install -D -m 0644 %{SOURCE10} %{buildroot}/%{_unitdir}/%{name}.socket
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
|
|
|
install -D -m 755 %{SOURCE3} %{buildroot}%{_initddir}/%{name}
|
|
|
|
ln -sf %{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2014-05-26 15:22:17 +02:00
|
|
|
install -d %{buildroot}/%{_datadir}/omc/svcinfo.d/
|
|
|
|
install -D -m 644 %{SOURCE5} %{buildroot}/%{_datadir}/omc/svcinfo.d/
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
|
|
|
|
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
2007-01-16 00:40:43 +01:00
|
|
|
|
2008-04-30 12:01:41 +02:00
|
|
|
%pre
|
2016-03-23 11:08:13 +01:00
|
|
|
getent passwd ftpsecure >/dev/null || useradd -r -g nogroup -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2015-02-20 13:14:28 +01:00
|
|
|
%service_add_pre %{name}.service %{name}@.service %{name}.socket
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2008-04-30 12:01:41 +02:00
|
|
|
|
2007-01-16 00:40:43 +01:00
|
|
|
%preun
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2015-02-20 13:14:28 +01:00
|
|
|
%service_del_preun %{name}.service %{name}@.service %{name}.socket
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
|
|
|
%stop_on_removal %{name}
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
|
2010-08-13 02:40:10 +02:00
|
|
|
%post
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2015-02-20 13:14:28 +01:00
|
|
|
%service_add_post %{name}.service %{name}@.service %{name}.socket
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
2015-09-21 13:27:21 +02:00
|
|
|
%insserv_cleanup
|
|
|
|
%restart_on_update %{name}
|
|
|
|
%endif
|
|
|
|
|
2015-09-21 13:35:52 +02:00
|
|
|
%postun
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2015-02-20 13:14:28 +01:00
|
|
|
%service_del_postun %{name}.service %{name}@.service %{name}.socket
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
|
|
|
%insserv_cleanup
|
|
|
|
%restart_on_update %{name}
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2015-09-21 13:27:21 +02:00
|
|
|
%if %{with_systemd}
|
2012-02-21 12:09:27 +01:00
|
|
|
%{_unitdir}/%{name}.service
|
2014-05-26 15:00:04 +02:00
|
|
|
%{_unitdir}/%{name}.socket
|
|
|
|
%{_unitdir}/%{name}@.service
|
2015-09-21 13:35:52 +02:00
|
|
|
%else
|
|
|
|
%{_initddir}/%{name}
|
2015-09-21 13:27:21 +02:00
|
|
|
%endif
|
2014-05-26 15:22:17 +02:00
|
|
|
%{_sbindir}/%{name}
|
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
%{_datadir}/omc/svcinfo.d/vsftpd.xml
|
|
|
|
%dir %{_datadir}/empty
|
|
|
|
%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
|
|
|
%config %{_sysconfdir}/pam.d/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%{_mandir}/man5/%{name}.conf.*
|
|
|
|
%{_mandir}/man8/%{name}.*
|
2011-12-25 23:14:07 +01:00
|
|
|
%doc BUGS AUDIT Changelog LICENSE README README.security
|
2007-01-16 00:40:43 +01:00
|
|
|
%doc REWARD SPEED TODO SECURITY TUNING SIZE FAQ EXAMPLE COPYING
|
|
|
|
%doc README.SUSE
|
2011-12-25 23:14:07 +01:00
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
2007-01-16 00:40:43 +01:00
|
|
|
|
2007-03-01 21:05:20 +01:00
|
|
|
%changelog
|