Hello community, here is the log from the commit of package vsftpd for openSUSE:Factory checked in at 2015-10-14 16:38:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vsftpd (Old) and /work/SRC/openSUSE:Factory/.vsftpd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vsftpd" Changes: -------- --- /work/SRC/openSUSE:Factory/vsftpd/vsftpd.changes 2015-09-19 06:53:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.vsftpd.new/vsftpd.changes 2015-10-14 16:38:05.000000000 +0200 @@ -1,0 +2,10 @@ +Mon Sep 21 11:34:46 UTC 2015 - [email protected] + +- Clean-up the init.d support to be bit more readable and add missing dep + +------------------------------------------------------------------- +Mon Sep 21 11:14:59 UTC 2015 - [email protected] + +- Brought back additional systemv support so it also builds for SLES 10 and 11 + +------------------------------------------------------------------- New: ---- vsftpd.init ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vsftpd.spec ++++++ --- /var/tmp/diff_new_pack.WYONwR/_old 2015-10-14 16:38:06.000000000 +0200 +++ /var/tmp/diff_new_pack.WYONwR/_new 2015-10-14 16:38:06.000000000 +0200 @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1210 +%global with_systemd 1 +%else +%global with_systemd 0 +%endif Name: vsftpd Version: 3.0.3 Release: 0 @@ -26,6 +31,7 @@ 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 @@ -64,12 +70,16 @@ BuildRequires: libcap-devel BuildRequires: openssl-devel BuildRequires: pam-devel -BuildRequires: systemd Requires: logrotate Requires(pre): %{_sbindir}/useradd Provides: ftp-server BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %{with_systemd} +BuildRequires: systemd %{?systemd_requires} +%else +Requires(post): %insserv_prereq +%endif %description Vsftpd is an FTP server, or daemon. The "vs" stands for Very Secure. @@ -121,10 +131,15 @@ 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 +%if %{with_systemd} 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} %{buildroot}%{_initddir}/%{name} +ln -sf %{_initddir}/%{name} %{buildroot}/%{_sbindir}/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/ @@ -132,22 +147,42 @@ %pre %{_sbindir}/useradd -r -g nogroup -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty ftpsecure 2> /dev/null || : +%if %{with_systemd} %service_add_pre %{name}.service %{name}@.service %{name}.socket +%endif %preun +%if %{with_systemd} %service_del_preun %{name}.service %{name}@.service %{name}.socket +%else +%stop_on_removal %{name} +%endif %post +%if %{with_systemd} %service_add_post %{name}.service %{name}@.service %{name}.socket +%else +%insserv_cleanup +%restart_on_update %{name} +%endif %postun +%if %{with_systemd} %service_del_postun %{name}.service %{name}@.service %{name}.socket +%else +%insserv_cleanup +%restart_on_update %{name} +%endif %files %defattr(-,root,root) +%if %{with_systemd} %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket %{_unitdir}/%{name}@.service +%else +%{_initddir}/%{name} +%endif %{_sbindir}/%{name} %{_sbindir}/rc%{name} %{_datadir}/omc/svcinfo.d/vsftpd.xml ++++++ vsftpd.init ++++++ #! /bin/sh # Copyright (c) 1995-2005 SUSE Linux GmbH, Nuernberg, Germany. # All rights reserved. # # Author: Mads Martin Joergensen # # /etc/init.d/vsftpd # and its symbolic link # /usr/sbin/rcvsftpd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ### BEGIN INIT INFO # Provides: ftpd # Required-Start: $local_fs $remote_fs $syslog network-remotefs # Required-Stop: $local_fs $remote_fs $syslog network-remotefs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: very secure ftp daemon # Short-Description: very secure ftp daemon ### END INIT INFO # Note on runlevels: # 0 - halt/poweroff 6 - reboot # 1 - single user 2 - multiuser without network exported # 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm) # # Note on script names: # http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html # A registry has been set up to manage the init script namespace. # http://www.lanana.org/ # Please use the names already registered or register one or use a # vendor prefix. VSFTPD_BIN=/usr/sbin/vsftpd test -x $VSFTPD_BIN || { echo "$VSFTPD_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } . /etc/rc.status rc_reset case "$1" in start) echo -n "Starting vsftpd " /sbin/startproc -l /var/log/rcvsftp.log $VSFTPD_BIN rc_status -v ;; stop) echo -n "Shutting down vsftpd " /sbin/killproc -TERM $VSFTPD_BIN rc_status -v ;; try-restart|condrestart) ## Do a restart only if the service was active before. ## Note: try-restart is now part of LSB (as of 1.9). ## RH has a similar command named condrestart. if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi rc_status ;; restart) $0 stop $0 start rc_status ;; force-reload) echo -n "Reload service vsftpd " /sbin/killproc -HUP $VSFTPD_BIN rc_status -v ;; reload) echo -n "Reload service vsftpd " /sbin/killproc -HUP $VSFTPD_BIN rc_status -v ;; status) echo -n "Checking for service vsftpd " /sbin/checkproc $VSFTPD_BIN rc_status -v ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac rc_exit
