@@ -1,6 +1,14 @@
--- vsftpd.spec.orig
+++ vsftpd.spec
-@@ -56,11 +56,15 @@ Patch15: vsftpd-enable-dev-log-se
+@@ -26,6 +26,7 @@ Url: https://security.appspot
+ Source0: https://security.appspot.com/downloads/%{name}-%{version}.tar.gz
+ Source1: %{name}.pam
+ Source2: %{name}.logrotate
++Source3: %{name}.init
+ Source4: README.SUSE
+ Source5: %{name}.xml
+ Source6: %{name}.firewall
+@@ -56,11 +57,15 @@ Patch15: vsftpd-enable-dev-log-se
Patch16: vsftpd-root-squashed-chroot.patch
#PATCH-FIX-UPSTREAM: bnc#870122
Patch17: vsftpd-enable-gettimeofday-sec.patch
@@ -16,19 +24,61 @@
Requires: logrotate
Requires(pre): %{_sbindir}/useradd
Provides: ftp-server
-@@ -115,9 +119,11 @@ install -D -m 644 $RPM_SOURCE_DIR/%{name
+@@ -79,7 +84,9 @@ vsftpd was always faster, supporting ove
+ tests.
+
+ %prep
++%if 0%{?suse_version} >= 1230
+ %gpg_verify %{S:1000}
++%endif
+ %setup -q
+ %patch1
+ %patch3 -p1
+@@ -114,10 +121,15 @@ install -D -m 644 $RPM_SOURCE_DIR/%{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
- ln -sf service %{buildroot}/%{_sbindir}/rc%{name}
+%if 0%{?suse_version} >= 1210
+ 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
++%else
++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
+%endif
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/
-@@ -138,9 +144,11 @@ install -m 644 %{SOURCE6} %{buildroot}%{
+@@ -125,22 +137,41 @@ install -m 644 %{SOURCE6} %{buildroot}%{
+
+ %pre
+ %{_sbindir}/useradd -r -g nogroup -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty ftpsecure 2> /dev/null || :
++%if 0%{?suse_version} >= 1210
+ %service_add_pre %{name}.service
++%endif
+
+ %preun
++%if 0%{?suse_version} >= 1210
+ %service_del_preun %{name}.service
++%else
++%stop_on_removal %name
++%endif
+
+ %post
++%if 0%{?suse_version} >= 1210
+ %service_add_post %{name}.service
++%else
++%{fillup_and_insserv -f %{name}}
++%endif
+
+ %postun
++%if 0%{?suse_version} >= 1210
+ %service_del_postun %{name}.service
++%else
++%insserv_cleanup
++%restart_on_update %name
++%endif
%files
%defattr(-,root,root)
@@ -36,6 +86,8 @@
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%{_unitdir}/%{name}@.service
++%else
++/etc/init.d/%name
+%endif
%{_sbindir}/%{name}
%{_sbindir}/rc%{name}
|