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
|
|
|
#
|
2012-02-15 17:42:34 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products 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
|
|
|
|
2007-01-16 00:40:43 +01:00
|
|
|
Name: vsftpd
|
2012-02-15 17:42:34 +01:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pam-devel
|
2007-01-16 00:40:43 +01:00
|
|
|
%if 0%{?suse_version} < 1001
|
|
|
|
BuildRequires: libcap
|
|
|
|
%else
|
|
|
|
BuildRequires: libcap-devel
|
|
|
|
%endif
|
2012-02-21 11:52:18 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
BuildRequires: systemd
|
|
|
|
%endif
|
2012-04-11 14:03:42 +02:00
|
|
|
Version: 3.0.0
|
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
|
2011-12-25 23:14:07 +01:00
|
|
|
License: GPL-2.0+
|
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-02-15 17:42:34 +01:00
|
|
|
Source: %name-%version.tar.gz
|
2007-01-16 00:40:43 +01:00
|
|
|
Source1: %name.pam
|
|
|
|
Source2: %name.logrotate
|
|
|
|
Source3: %name.init
|
|
|
|
Source4: README.SUSE
|
|
|
|
Source5: %name.xml
|
2007-03-01 21:05:20 +01:00
|
|
|
Source6: %name.firewall
|
2011-11-27 21:24:40 +01:00
|
|
|
Source7: vsftpd.service
|
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-04-11 14:03:42 +02:00
|
|
|
#PATCH-FIX-OPENSUSE: turn the seccomp_sanbox feature off by default
|
|
|
|
# revert it when seccomp feature will be in suse/vanilla kernel
|
|
|
|
Patch10: vsftpd-3.0.0-turn-seccomp-sandbox-off.patch
|
2012-04-24 15:17:54 +02:00
|
|
|
Patch11: vsftpd-3.0.0_gnu_source_defines.patch
|
|
|
|
Patch12: vsftpd-3.0.0-optional-seccomp.patch
|
2007-01-16 00:40:43 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Provides: ftp-server
|
2008-04-30 12:01:41 +02:00
|
|
|
PreReq: %insserv_prereq /usr/sbin/useradd
|
2012-02-21 11:52:18 +01:00
|
|
|
%{?systemd_requires}
|
2010-08-13 02:40:10 +02:00
|
|
|
Requires: logrotate
|
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
|
|
|
|
%patch3
|
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
|
|
|
|
%patch12 -p1
|
2007-01-16 00:40:43 +01:00
|
|
|
|
|
|
|
%build
|
2012-04-24 15:17:54 +02:00
|
|
|
%define seccomp_opts %{nil}
|
|
|
|
%if 0%{?suse_version} > 1030
|
|
|
|
%define seccomp_opts -D_GNU_SOURCE -DUSE_SECCOMP
|
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
rm -f dummyinc/sys/capability.h
|
2012-04-24 15:17:54 +02:00
|
|
|
make CFLAGS="$RPM_OPT_FLAGS -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
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/empty
|
|
|
|
cp %SOURCE4 .
|
|
|
|
install -D -m 755 %name $RPM_BUILD_ROOT/usr/sbin/%name
|
|
|
|
install -D -m 600 %name.conf $RPM_BUILD_ROOT/etc/%name.conf
|
|
|
|
install -D -m 600 xinetd.d/%name $RPM_BUILD_ROOT/etc/xinetd.d/%name
|
|
|
|
install -D -m 644 $RPM_SOURCE_DIR/%name.pam $RPM_BUILD_ROOT/etc/pam.d/%name
|
|
|
|
install -D -m 644 $RPM_SOURCE_DIR/%name.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%name
|
|
|
|
install -D -m 644 %name.conf.5 $RPM_BUILD_ROOT/%_mandir/man5/%name.conf.5
|
|
|
|
install -D -m 644 %name.8 $RPM_BUILD_ROOT/%_mandir/man8/%name.8
|
|
|
|
install -D -m 755 %SOURCE3 $RPM_BUILD_ROOT/etc/init.d/%name
|
|
|
|
ln -sf ../../etc/init.d/%name $RPM_BUILD_ROOT/%_prefix/sbin/rc%name
|
|
|
|
install -d $RPM_BUILD_ROOT/%_datadir/omc/svcinfo.d/
|
|
|
|
install -D -m 644 %SOURCE5 $RPM_BUILD_ROOT/%_datadir/omc/svcinfo.d/
|
2007-03-28 02:25:33 +02:00
|
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
|
|
|
|
install -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
2012-02-21 11:52:18 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
2012-02-21 12:09:27 +01:00
|
|
|
install -D -m 0644 %SOURCE7 %{buildroot}/%{_unitdir}/%{name}.service
|
2012-02-21 11:52:18 +01:00
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
|
2008-04-30 12:01:41 +02:00
|
|
|
%pre
|
|
|
|
/usr/sbin/useradd -r -o -g nogroup -s /bin/false -c "Secure FTP User" -d /var/lib/empty ftpsecure 2> /dev/null || :
|
2012-02-21 11:52:18 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
2008-04-30 12:01:41 +02:00
|
|
|
|
2007-01-16 00:40:43 +01:00
|
|
|
%preun
|
|
|
|
%stop_on_removal %name
|
2012-02-21 11:52:18 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
|
2010-08-13 02:40:10 +02:00
|
|
|
%post
|
|
|
|
%{fillup_and_insserv -f %{name}}
|
2012-02-21 11:52:18 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
%endif
|
2010-08-13 02:40:10 +02:00
|
|
|
|
2007-01-16 00:40:43 +01:00
|
|
|
%postun
|
|
|
|
%insserv_cleanup
|
|
|
|
%restart_on_update %name
|
2012-02-21 11:52:18 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-02-21 12:09:27 +01:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%endif
|
2007-01-16 00:40:43 +01:00
|
|
|
/usr/sbin/%name
|
|
|
|
/usr/sbin/rc%name
|
2010-08-13 02:40:10 +02:00
|
|
|
%config /etc/init.d/%name
|
2007-01-16 00:40:43 +01:00
|
|
|
%_datadir/omc/svcinfo.d/vsftpd.xml
|
|
|
|
%dir /usr/share/empty
|
|
|
|
%config(noreplace) /etc/xinetd.d/%name
|
|
|
|
%config(noreplace) /etc/%name.conf
|
|
|
|
%config /etc/pam.d/%name
|
|
|
|
%config(noreplace) /etc/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
|