forked from pool/vsftpd
55a2a44d4c
OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=2007039d4c13dfac4779f954e34b8476
133 lines
4.2 KiB
RPMSpec
133 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package vsftpd (Version 2.3.0)
|
|
#
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: vsftpd
|
|
BuildRequires: openssl-devel pam-devel
|
|
%if 0%{?suse_version} < 1001
|
|
BuildRequires: libcap
|
|
%else
|
|
BuildRequires: libcap-devel
|
|
%endif
|
|
Version: 2.3.0
|
|
Release: 1
|
|
Summary: Very Secure FTP Daemon - Written from Scratch
|
|
License: GPLv2+
|
|
Group: Productivity/Networking/Ftp/Servers
|
|
Url: http://vsftpd.beasts.org
|
|
Source: %name-%version.tar.bz2
|
|
Source1: %name.pam
|
|
Source2: %name.logrotate
|
|
Source3: %name.init
|
|
Source4: README.SUSE
|
|
Source5: %name.xml
|
|
Source6: %name.firewall
|
|
Patch1: %name-2.0.4-lib64.diff
|
|
Patch3: %name-2.0.4-xinetd.diff
|
|
Patch4: %name-2.0.4-enable-ssl.patch
|
|
Patch5: %name-2.0.4-dmapi.patch
|
|
Patch6: %name-2.0.5-vuser.patch
|
|
Patch7: %name-2.0.5-enable-debuginfo.patch
|
|
Patch8: %name-2.0.5-utf8-log-names.patch
|
|
Patch9: %name-2.0.4-conf.diff
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Provides: ftp-server
|
|
PreReq: %insserv_prereq /usr/sbin/useradd
|
|
Requires: logrotate
|
|
|
|
%description
|
|
Vsftpd is an FTP server, or daemon. The "vs" stands for Very Secure.
|
|
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
|
|
%patch1
|
|
%patch3
|
|
%patch4
|
|
%patch5
|
|
%patch6
|
|
%patch7
|
|
%patch8
|
|
%patch9
|
|
|
|
%build
|
|
rm -f dummyinc/sys/capability.h
|
|
make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIE -fstack-protector" \
|
|
LDFLAGS="-pie" LINK=
|
|
|
|
%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/
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
|
|
install -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
|
|
|
%pre
|
|
/usr/sbin/useradd -r -o -g nogroup -s /bin/false -c "Secure FTP User" -d /var/lib/empty ftpsecure 2> /dev/null || :
|
|
|
|
%preun
|
|
%stop_on_removal %name
|
|
|
|
%post
|
|
%{fillup_and_insserv -f %{name}}
|
|
|
|
%postun
|
|
%insserv_cleanup
|
|
%restart_on_update %name
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
/usr/sbin/%name
|
|
/usr/sbin/rc%name
|
|
%config /etc/init.d/%name
|
|
%_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.*
|
|
%doc INSTALL BUGS AUDIT Changelog LICENSE README README.security
|
|
%doc REWARD SPEED TODO SECURITY TUNING SIZE FAQ EXAMPLE COPYING
|
|
%doc README.SUSE
|
|
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
|
|
|
%changelog
|