0.0.4-alt1
[autosshd_ALT.git] / autosshd.spec
blobd3835ed3e897c6bf2bfd30f0bf80d1dce8f07f24
1 # vim: set ft=spec : -*- rpm-spec -*-
2 %define autossh_user _autossh
3 %define autossh_group _autossh
4 %define autossh_dir /var/lib/autosshd
6 Name: autosshd
7 Version: 0.0.4
8 Release: alt1
10 Summary: System administration - AutoSSH system level service
12 Group: System/Servers
13 License: GPL
14 Url: http://wiki.etersoft.ru/Autosshd
16 Packager: Danil Mikhailov <danil@altlinux.org>
18 #Source-git: https://github.com/vitlav/autosshd
19 Source: %name-%version.tar
21 BuildArch: noarch
23 BuildPreReq: rpm-build-intro
25 Requires: shadow-utils openssh-common
26 Requires: autossh
28 %description
29 Run autossh as system service at startup.
31 %prep
32 %setup
34 %install
35 mkdir -p %buildroot%_sysconfdir/autossh.d/
37 mkdir -p %buildroot%_runtimedir/%name/
38 mkdir -p %buildroot%_locksubsysdir/autossh.d/
39 mkdir -p %buildroot/%_tmpfilesdir/
41 cat <<EOF >%buildroot/%_tmpfilesdir/%name.conf
42 d %_runtimedir/%name 0755 %autossh_user %autossh_group
43 d %_locksubsysdir/autossh.d/ 0755 root root
44 EOF
46 mkdir -p %buildroot/%autossh_dir/.ssh/
47 #echo "StrictHostKeyChecking no" > %buildroot%autossh_dir/.ssh/config
49 install -D -m754 etc/rc.d/init.d/autosshd %buildroot%_initdir/%name
50 # TODO: we need automate filling of this config
51 install -D -m644 etc/sysconfig/autosshd %buildroot%_sysconfigdir/%name
53 install -m644 etc/autossh.d/*.conf.template %buildroot%_sysconfdir/autossh.d/
55 mkdir -p %buildroot%_datadir/%name/
56 mkdir -p %buildroot%_bindir/
57 mkdir -p %buildroot/lib/systemd/system/
58 cp usr/bin/autosshd-ssh %buildroot%_bindir/
59 cp share/autossh-conf %buildroot%_datadir/%name/
60 cp share/autosshd.setup* %buildroot%_datadir/%name/
61 cp lib/systemd/system/autosshd.service %buildroot/lib/systemd/system/autosshd.service
63 %pre
64 # Add the "_autossh" user
65 %_sbindir/groupadd -r -f %autossh_group 2>/dev/null ||:
66 %_sbindir/useradd -M -r -g %autossh_group -c 'Autossh daemon' \
67 -s /dev/null -d %autossh_dir %autossh_user 2>/dev/null ||:
69 %post
70 %post_service %name
72 %preun
73 %preun_service %name
75 %files
76 %doc doc/README.md
77 %attr(750,%autossh_user,%autossh_group) %dir %autossh_dir/
78 %config(noreplace) %attr(750,%autossh_user,%autossh_group) %autossh_dir/.ssh/
79 %config(noreplace) %_sysconfigdir/%name
80 %_sysconfdir/autossh.d/
81 %_initdir/%name
82 %_tmpfilesdir/%name.conf
83 %attr(750,%autossh_user,%autossh_group) %dir %_runtimedir/%name/
84 %dir %_locksubsysdir/autossh.d/
85 %dir %_datadir/%name/
86 %_datadir/%name/autossh-conf
87 %_datadir/%name/autosshd.setup
88 %_datadir/%name/autosshd.setup.user
89 %_bindir/autosshd-ssh
90 /lib/systemd/system/autosshd.service
92 %changelog
93 * Wed Sep 05 2018 Vitaly Lipatov <lav@altlinux.ru> 0.0.4-alt1
94 - remove obsoleted anyssh.ru.conf, fix template for it
95 - example.conf.template: example config (ALT bug #35349)
97 * Mon Oct 12 2015 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt11
98 - Fix inheritance error
100 * Tue Oct 06 2015 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt10
101 - fixed bug with not stop properly by adding mainlockfile
102 - fixed /var/lock/subsys/autossh.d/ dir name
103 - change home dir var, fix var name permission
104 - fixed /var/lock/subsys/autossh.d/ dir name in spec
105 - change systemd service type to forking [work]
107 * Wed Sep 30 2015 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt9
108 - Added initial realisation of systemd init service
109 - Change runlevel to 60
110 - Added 400 permission as allowed
112 * Mon Dec 29 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt8
113 - fixed test sudo autosshd-ssh anyssh.ru
115 * Wed Dec 17 2014 Vitaly Lipatov <lav@altlinux.ru> 0.0.3-alt7
116 - small fixes
118 * Thu Nov 27 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt6
119 - Cleanup git log
121 * Thu Sep 18 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt5
122 - Correct manual in config files
124 * Wed Sep 17 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt4
125 - added cheking for existing config
127 * Wed Sep 17 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt3
128 - move files in right directory
129 - fix start when already running
131 * Thu Sep 11 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt2
132 - rewrite doc
133 - rewrite init script
134 - added new scripts:
135 - autosshd-conf for export variables to _anyssh user
136 - autosshd-ssh for test connection over ssh
138 * Mon Jul 07 2014 Vitaly Lipatov <lav@altlinux.ru> 0.0.3-alt1
139 - development release
140 - rewrite init script
141 - add anyssh.ru.conf.example
142 - add unused generate key script
143 - cleanup spec, move initialize code to a separate script
145 * Sat Jan 11 2014 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt8
146 - doc: Added links to some guides (how to make use of autosshd).
148 * Fri Jan 10 2014 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt7
149 - Declare lav@ as the maintainer
151 * Sat Dec 28 2013 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt6
152 - Handle /var/lock/subsys/* and /var/run/* in tmpfiles.d
153 (otherwise they used to be gone from the tmpfs after a reboot)
155 * Sat Dec 28 2013 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt5
156 - Fix user deletion after an upgrade according to http://www.altlinux.org/PseudoUserPolicy
158 * Sat Dec 28 2013 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt4
159 - Correct wrong paths in scripts, configs, and examples.
161 * Tue Nov 19 2013 Vitaly Lipatov <lav@altlinux.ru> 0.0.2-alt3
162 - initial build to ALT Linux Sisyphus
164 * Tue Oct 08 2013 Vitaly Lipatov <lav@altlinux.ru> 0.0.2-alt2
165 - cleanup spec
167 * Mon Apr 09 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.2-alt1
168 - Code rewritten to work with multiple connections
170 * Thu Apr 05 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt4
171 - Fixed bugs in postinstall and postuninstal scripts
173 * Tue Apr 03 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt3
174 - Fixes
176 * Tue Apr 03 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt2
177 - Ready for testing
179 * Mon Apr 02 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt1
180 - Initial draft