security/autossh -> openSUSE:Factory:Contrib/autossh https://build.opensuse.org/request/show/113071 Description: Added SysV initscript and configuration file. (forwarded request 112832 from tokoyami) changes files: -------------- ++++++ new changes file: --- autossh.changes +++ autossh.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +Fri Apr 6 14:14:05 UTC 2012 - multyrealm@gmail.com + +- added insserv_cleanup macro + +------------------------------------------------------------------- +Fri Apr 6 13:44:24 UTC 2012 - multyrealm@gmail.com + +- added SysV-style initscript and configuration file fillup template + +------------------------------------------------------------------- +Thu Apr 5 16:59:11 UTC 2012 - meissner@suse.com + +- a ssh connection watch daemon + old: ---- autossh-1.4b.tar.bz2 new: ---- autossh-1.4c.tar.bz2 autossh.changes autossh.conf autossh.init spec files: ----------- --- autossh.spec +++ autossh.spec @@ -1,25 +1,42 @@ # -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. +# spec file for package autossh +# +# Copyright (c) 2012 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 + Summary: Automatically restart SSH sessions and tunnels + Name: autossh -Version: 1.4b +Version: 1.4c Release: 1 License: GNU General Public License version 2 (GPL v2) Group: Productivity/Networking/SSH -URL: http://www.harding.motd.ca/autossh/ +Url: http://www.harding.motd.ca/autossh/ # http://www.harding.motd.ca/autossh/autossh-%{version}.tgz -Source: autossh-1.4b.tar.bz2 +Source: http://www.harding.motd.ca/autossh/autossh-1.4c.tar.bz2 +Source1: autossh.init +Source2: autossh.conf Patch0: autossh-makefile-destdir.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-build # configure checks is the ssh client exists BuildRequires: openssh Requires: openssh +Requires(pre): %insserv_prereq %fillup_prereq %description Autossh is a program to start a copy of ssh and monitor it, restarting @@ -40,53 +57,30 @@ %install %makeinstall +%__install -D -m 755 %{S:1} %{buildroot}%{_initrddir}/autossh +%__mkdir_p %{buildroot}%{_sbindir} +%__ln_s -f %{_initrddir}/autossh %{buildroot}%{_sbindir}/rcautossh +%__install -D -m 644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.autossh %__rm "$RPM_BUILD_ROOT/usr/share/doc/autossh"/{CHANGES,README} %__rm -rf "%{buildroot}%{_datadir}/examples" %clean %__rm -rf "%{buildroot}" +%post +%fillup_only + +%postun +%insserv_cleanup + %files %defattr(-, root, root, 0755) %doc CHANGES README %doc autossh.host rscreen %{_bindir}/autossh +%{_initrddir}/autossh +%{_sbindir}/rcautossh +/var/adm/fillup-templates/sysconfig.autossh %doc %{_mandir}/man1/autossh.1* %changelog -* Sun Jun 7 2009 Pascal Bleser <pascal.bleser@opensuse.org> - 1.4b -- use bz2 source -- fix macro usage -- install autossh.host and rscreen as %%doc files, instead of /usr/share/examples/autossh - -* Tue Feb 17 2009 - mstopka@opensuse.org -- adopted for Contrib -- makefile-destdir patch -* Thu Jun 26 2008 Mike Veltman <mike.veltman@draconis-it.com>- 1.4b -- updated to release 1.4b - -* Sat Oct 20 2007 Mike Veltman <mike.veltman@draconis-it.com>- 1.4a-1 -- Prepare for repackage buildservice suse - -* Fri Jul 14 2006 Dag Wieers <dag@wieers.com> - 1.4a-1 -- Updated to release 1.4a. - -* Fri Jun 09 2006 Dag Wieers <dag@wieers.com> - 1.4-1 -- Updated to release 1.4. - -* Thu Mar 24 2005 Dag Wieers <dag@wieers.com> - 1.3-2 -- Added openssh-clients dependency. (Adrian Reber) -- Build with %%{optflags}. (Adrian Reber) - -* Wed Mar 23 2005 Dag Wieers <dag@wieers.com> - 1.3-1 -- Updated to release 1.3. - -* Fri Dec 10 2004 Dag Wieers <dag@wieers.com> - 1.2-2.g -- Fixed Group tag. - -* Thu Dec 09 2004 Dag Wieers <dag@wieers.com> - 1.2-1.g -- Updated to release 1.2g. - -* Fri Sep 24 2004 Dag Wieers <dag@wieers.com> - 1.2-1.f -- Initial package. (using DAR) - other changes: -------------- ++++++ autossh-1.4c.tar.bz2 (new) ++++++ autossh.conf (new) --- autossh.conf +++ autossh.conf @@ -0,0 +1,39 @@ +## Path: Network/Remote access/Autossh +## Description: Autossh service settings + +## Type: integer +## Default: 0 +# +# Time ssh must be up before it is considered a successful connection. +# If set to 0, then this behaviour is disabled, and as well, autossh +# will retry even on failure of first attempt to run ssh. +AUTOSSH_GATETIME="0" + +## Type: list(0,1,2,3,4,5,6,7) +## Default: 7 +# +# Specifies the log level, corresponding to the levels used by syslog. +AUTOSSH_LOGLEVEL="7" + +## Type: integer +## Default: 600 +# +# Poll time in seconds. If the poll time is less than twice the network +# timeouts (default 15 seconds) the network timeouts will be adjusted +# downward to 1/2 the poll time. +AUTOSSH_POLL="600" + +## Type: string +## Default: 0 +## Format: <port>[:echo_port] +# +# The base monitoring port to use, or alternatively, the monitoring +# port and the echo service port to use. Setting 0 will turn the +# monitoring off, and autossh will only restart ssh on ssh exit. +AUTOSSH_PORT="0" + +## Type: string +## Default: user@example.com -p 22 -nNT -R 30000:localhost:22 -o ExitOnForwardFailure=yes +# +# Options to be passed to ssh +AUTOSSH_OPTIONS="user@example.com -p 22 -nNT -R 30000:localhost:22 -o ExitOnForwardFailure=yes" ++++++ autossh.init (new) --- autossh.init +++ autossh.init @@ -0,0 +1,95 @@ +#!/bin/sh +# +# SUSE system startup script for autossh +# +# Author: Plamen Kolev <multyrealm@gmail.com> +# +# /etc/init.d/autossh +# and its symbolic link +# /usr/sbin/rcautossh +# +### BEGIN INIT INFO +# Provides: autossh +# Required-Start: $local_fs $remote_fs $syslog $network $named sshd +# Should-Start: +# Required-Stop: $local_fs $remote_fs $syslog $network $named sshd +# Should-Stop: +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Autossh service +# Description: Starts autossh as a service daemon +### END INIT INFO + +AUTOSSH_BIN=/usr/bin/autossh +test -x $AUTOSSH_BIN || { echo "$AUTOSSH_BIN not installed"; + if [ "$1" = "stop" ]; then exit 0; + else exit 5; fi; } + +AUTOSSH_CONFIG=/etc/sysconfig/autossh +test -r $AUTOSSH_CONFIG || { echo "$AUTOSSH_CONFIG not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + +. $AUTOSSH_CONFIG + +. /etc/rc.status + +rc_reset + +case "$1" in + start) + export AUTOSSH_FIRST_POLL="60" + export AUTOSSH_PIDFILE="/var/run/autossh.pid" + export AUTOSSH_GATETIME + export AUTOSSH_LOGLEVEL + export AUTOSSH_POLL + export AUTOSSH_PORT + + echo -n "Starting autossh " + /sbin/startproc $AUTOSSH_BIN $AUTOSSH_OPTIONS + + rc_status -v + ;; + stop) + echo -n "Shutting down autossh " + /sbin/killproc $AUTOSSH_BIN + + rc_status -v + ;; + try-restart|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 + fi + + rc_status + ;; + restart) + $0 stop + $0 start + + rc_status + ;; + force-reload) + echo -n "Reload service autossh " + $0 try-restart + + rc_status + ;; + status) + echo -n "Checking for service autossh " + /sbin/checkproc $AUTOSSH_BIN + + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload}" + exit 1 + ;; +esac +rc_exit ++++++ deleted files: --- autossh-1.4b.tar.bz2 To REVIEW against the previous version: osc request show --diff 113071 To ACCEPT the request: osc request accept 113071 --message="reviewed ok." To DECLINE the request: osc request decline 113071 --message="declined for reason xyz (see ... for background / policy / ...)." To REVOKE the request: osc request revoke 113071 --message="retracted because ..., sorry / thx / see better version ..." -- Hermes messaging (http://hermes.opensuse.org) openSUSE Build Service (https://build.opensuse.org/) Collaboration: http://en.opensuse.org/Build_Service/Collaboration -- To unsubscribe, e-mail: opensuse-contrib+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-contrib+owner@opensuse.org