2 # - --with-ssh=/usr/bin/ssh does has no effect, it still tries to find ssh from $PATH and fail
3 # (as of 1.4g, configure is older than configure.ac and probably somehow hacked)
4 Summary: Automatically restart SSH sessions and tunnels
5 Summary(pl.UTF-8): Automatyczny restart sesji i tuneli SSH
9 # autossh.c contains 0-clause BSD, daemon.h 4-clause BSD
11 Group: Applications/Networking
12 Source0: https://www.harding.motd.ca/autossh/%{name}-%{version}.tgz
13 # Source0-md5: 2b804bc1bf6d2f2afaa526d02df7c0a2
16 Source3: %{name}.tmpfiles
17 URL: https://www.harding.motd.ca/autossh/
18 BuildRequires: rpmbuild(macros) >= 1.647
19 Requires: openssh-clients
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Autossh is a program to start a copy of ssh and monitor it, restarting
24 it as necessary should it die or stop passing traffic. The idea and
25 the mechanism are from rstunnel (Reliable SSH Tunnel), but implemented
26 in C. The author's view is that it is not as fiddly as rstunnel to get
27 to work. Connection monitoring using a loop of port forwardings. Backs
28 off on rate of connection attempts when experiencing rapid failures
29 such as connection refused. Compiled and tested on OpenBSD, Linux, and
30 Solaris; should work fine on other BSDs (except Mac OS 10).
32 %description -l pl.UTF-8
33 autossh jest programem uruchamiającym kopię ssh i monitorującym ją,
34 restartując w miarę potrzeby, jeśli umrze lub przestanie przekazywać
35 ruch. Idea i mechanizm pochodzą z rstunnela (Reliable SSH Tunnel), ale
36 zaimplementowano je w C. Według autora nie trzeba się tak patyczkować,
37 jak z rstunnelem, aby go uruchomić. Monitorowanie połączenia używa
38 pętli przekazywania portów. Częstotliwość prób połączeń jest
39 zmniejszana w przypadku napotkania nagłych awarii, takich jak
40 odrzucenie połączenia. Program skompilowano i sprawdzono na OpenBSD,
41 Linuksie i Solarisie; powinien działać także na innych BSD (oprócz
45 Summary: autossh configuration as system service
46 Summary(pl.UTF-8): konfiguracja autossh jako usługi systemowej
47 Group: Networking/Daemons
48 Requires(post,preun): /sbin/chkconfig
49 Requires: %{name} = %{version}-%{release}
51 Requires: rc-scripts >= 0.4.0.20
54 this package contains init script and example configuration file, that
55 allows to run autossh as Unix system service.
57 %description init -l pl.UTF-8
58 Ten pakiet zawiera skrypt startowy oraz przykładowy plik
59 konfiguracyjny, które pozwalają uruchamić autossh jako uniksową usługę
67 ac_cv_lib_nsl_gethostbyname=no \
68 ac_cv_path_ssh=/usr/bin/ssh
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/%{name},%{_bindir},%{_mandir}/man1} \
74 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
76 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
77 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/autossh.tab
78 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
80 install -p autossh $RPM_BUILD_ROOT%{_bindir}
81 cp -p autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
84 rm -rf $RPM_BUILD_ROOT
87 /sbin/chkconfig --add autossh
88 %service autossh restart "autossh"
91 if [ "$1" = "0" ]; then
93 /sbin/chkconfig --del autossh
97 %defattr(644,root,root,755)
98 %doc README CHANGES autossh.host rscreen
99 %attr(755,root,root) %{_bindir}/autossh
100 %{_mandir}/man1/autossh.1*
103 %defattr(644,root,root,755)
104 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.tab
105 %attr(754,root,root) /etc/rc.d/init.d/%{name}
106 %{systemdtmpfilesdir}/%{name}.conf
107 %dir /var/run/autossh