]> git.pld-linux.org Git - packages/autossh.git/blob - autossh.spec
- updated to 1.4g, drop -lnsl from linking
[packages/autossh.git] / autossh.spec
1 # TODO:
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
6 Name:           autossh
7 Version:        1.4g
8 Release:        1
9 # autossh.c contains 0-clause BSD, daemon.h 4-clause BSD
10 License:        BSD
11 Group:          Applications/Networking
12 Source0:        https://www.harding.motd.ca/autossh/%{name}-%{version}.tgz
13 # Source0-md5:  2b804bc1bf6d2f2afaa526d02df7c0a2
14 Source1:        %{name}.init
15 Source2:        %{name}.tab
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)
21
22 %description
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).
31
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
42 MacOS 10).
43
44 %package init
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}
50 Requires:       awk
51 Requires:       rc-scripts >= 0.4.0.20
52
53 %description init
54 this package contains init script and example configuration file, that
55 allows to run autossh as Unix system service.
56
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ę
60 systemową.
61
62 %prep
63 %setup -q
64
65 %build
66 %configure \
67         ac_cv_lib_nsl_gethostbyname=no \
68         ac_cv_path_ssh=/usr/bin/ssh
69 %{__make}
70
71 %install
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}
75
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
79
80 install -p autossh $RPM_BUILD_ROOT%{_bindir}
81 cp -p autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post init
87 /sbin/chkconfig --add autossh
88 %service autossh restart "autossh"
89
90 %preun init
91 if [ "$1" = "0" ]; then
92         %service autossh stop
93         /sbin/chkconfig --del autossh
94 fi
95
96 %files
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*
101
102 %files init
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
This page took 0.076432 seconds and 4 git commands to generate.