new build 0.0.3-alt4 (with rpmlog script)
[autosshd_ALT.git] / autosshd.spec
blob3a8a55526467dd8ff117705804ffd9297166771f
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.3
8 Release: alt4
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 PreReq: shadow-utils openssh-common
25 BuildPreReq: rpm-build-intro
27 Requires: autossh
29 %description
30 Run autossh as system service at startup.
32 %prep
33 %setup
35 %install
36 mkdir -p %buildroot%_sysconfdir/autossh.d/
38 mkdir -p %buildroot%_runtimedir/%name/
39 mkdir -p %buildroot%_locksubsysdir/%name/
40 mkdir -p %buildroot/%_tmpfilesdir/
42 cat <<EOF >%buildroot/%_tmpfilesdir/%name.conf
43 d %_runtimedir/%name 0755 %autossh_user %autossh_group
44 d %_locksubsysdir/%name 0755 root root
45 EOF
47 mkdir -p %buildroot/%autossh_dir/.ssh/
48 #echo "StrictHostKeyChecking no" > %buildroot%autossh_dir/.ssh/config
50 mkdir -p %buildroot%_docdir/%name/
52 install -D -m754 etc/rc.d/init.d/autosshd %buildroot%_initdir/%name
53 # TODO: we need automate filling of this config
54 install -D -m644 etc/sysconfig/autosshd %buildroot%_sysconfigdir/%name
56 install -m644 etc/autossh.d/*.conf.template %buildroot%_sysconfdir/autossh.d/
58 mkdir -p %buildroot%_datadir/%name/
59 mkdir -p %buildroot%_bindir/
60 cp usr/bin/autosshd-ssh %buildroot%_bindir/
61 cp share/autossh-conf %buildroot%_datadir/%name/
62 cp share/autosshd.setup* %buildroot%_datadir/%name/
64 %pre
65 # Add the "_autossh" user
66 %_sbindir/groupadd -r -f %autossh_group 2>/dev/null ||:
67 %_sbindir/useradd -M -r -g %autossh_group -c 'Autossh daemon' \
68 -s /dev/null -d %autossh_dir %autossh_user 2>/dev/null ||:
70 %post
71 %post_service %name
73 %preun
74 %preun_service %name
76 %files
77 %doc doc/*
78 %attr(750,%autossh_user,%autossh_group) %dir %autossh_dir/
79 %config(noreplace) %attr(750,%autossh_user,%autossh_group) %autossh_dir/.ssh/
80 %config(noreplace) %_sysconfigdir/%name
81 %_sysconfdir/autossh.d/
82 %_initdir/%name
83 %_tmpfilesdir/%name.conf
84 %attr(750,%autossh_user,%autossh_group) %dir %_runtimedir/%name/
85 %dir %_locksubsysdir/%name/
86 %dir %_datadir/%name/
87 %_datadir/%name/autossh-conf
88 %_datadir/%name/autosshd.setup
89 %_datadir/%name/autosshd.setup.user
90 %_bindir/autosshd-ssh
92 %changelog
93 * Wed Sep 17 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt4
96 * Wed Sep 17 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt3
97 - move files in right directory
98 - fix start when already running
100 * Thu Sep 11 2014 Danil Mikhailov <danil@altlinux.org> 0.0.3-alt2
101 - rewrite doc
102 - rewrite init script
103 - added new scripts:
104 - autosshd-conf for export variables to _anyssh user
105 - autosshd-ssh for test connection over ssh
107 * Mon Jul 07 2014 Vitaly Lipatov <lav@altlinux.ru> 0.0.3-alt1
108 - development release
109 - rewrite init script
110 - add anyssh.ru.conf.example
111 - add unused generate key script
112 - cleanup spec, move initialize code to a separate script
114 * Sat Jan 11 2014 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt8
115 - doc: Added links to some guides (how to make use of autosshd).
117 * Fri Jan 10 2014 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt7
118 - Declare lav@ as the maintainer
120 * Sat Dec 28 2013 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt6
121 - Handle /var/lock/subsys/* and /var/run/* in tmpfiles.d
122 (otherwise they used to be gone from the tmpfs after a reboot)
124 * Sat Dec 28 2013 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt5
125 - Fix user deletion after an upgrade according to http://www.altlinux.org/PseudoUserPolicy
127 * Sat Dec 28 2013 Ivan Zakharyaschev <imz@altlinux.org> 0.0.2-alt4
128 - Correct wrong paths in scripts, configs, and examples.
130 * Tue Nov 19 2013 Vitaly Lipatov <lav@altlinux.ru> 0.0.2-alt3
131 - initial build to ALT Linux Sisyphus
133 * Tue Oct 08 2013 Vitaly Lipatov <lav@altlinux.ru> 0.0.2-alt2
134 - cleanup spec
136 * Mon Apr 09 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.2-alt1
137 - Code rewritten to work with multiple connections
139 * Thu Apr 05 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt4
140 - Fixed bugs in postinstall and postuninstal scripts
142 * Tue Apr 03 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt3
143 - Fixes
145 * Tue Apr 03 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt2
146 - Ready for testing
148 * Mon Apr 02 2012 Dmitriy Kruglikov <dkr@altlinux.org> 0.0.1-alt1
149 - Initial draft