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