autossh/autossh.spec
Stephan Kulow 4e6a2227b9 Accepting request 114494 from security
Updated the configuration options for the initscript. (forwarded request 114466 from tokoyami)

OBS-URL: https://build.opensuse.org/request/show/114494
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/autossh?expand=0&rev=2
2012-04-23 07:12:01 +00:00

84 lines
2.5 KiB
RPMSpec

#
# 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/
#
Summary: Automatically restart SSH sessions and tunnels
License: BSD-3-Clause
Group: Productivity/Networking/SSH
Name: autossh
Version: 1.4c
Release: 0
Url: http://www.harding.motd.ca/autossh/
Source: http://www.harding.motd.ca/autossh/autossh-1.4c.tgz
Source1: autossh.init
Source2: autossh.conf
Patch0: autossh-makefile-destdir.patch
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
it as necessary should it die or stop passing traffic. The idea and
the mechanism are from rstunnel (Reliable SSH Tunnel), but implemented
in C. The author's view is that it is not as fiddly as rstunnel to get
to work. Connection monitoring using a loop of port forwardings. Backs
off on rate of connection attempts when experiencing rapid failures
such as connection refused.
%prep
%setup
%patch0 -p1
%build
%configure
%__make %{?jobs:-j%jobs}
%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