forked from subuk/bakapy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbakapy.spec.in
110 lines (90 loc) · 3.5 KB
/
bakapy.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Summary: Bakapy backup framework
Name: bakapy
Version: @@_VERSION_@@
Release: @@_RELEASE_@@%{dist}
Source0: http://bakapy.org/download/bakapy-%{version}.tar.gz
License: GPLv3
Group: Backup
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Vendor: Subuk
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd /usr/bin/getent
%description
Bakapy backup framework
%package front
Summary: Bakapy web interface
%description front
Bakapy web interface files
%prep
%setup -q
%build
./build.sh
%install
install -m 755 -d %{buildroot}/usr/bin
install -m 755 -d %{buildroot}/etc
install -m 755 -d %{buildroot}/etc/init
install -m 755 -d %{buildroot}/etc/bakapy
install -m 755 -d %{buildroot}/etc/bakapy/jobs
install -m 755 -d %{buildroot}/usr/share/bakapy
install -m 750 -d %{buildroot}/var/lib/bakapy
install -m 750 -d %{buildroot}/var/lib/bakapy/data
install -m 750 -d %{buildroot}/var/lib/bakapy/meta
cp -r bin/ %{buildroot}/usr/
cp -r commands/ %{buildroot}/etc/bakapy/
cp -f debian/bakapy.upstart %{buildroot}/etc/init/bakapy.conf
cp -f bakapy.conf %{buildroot}/etc/bakapy/bakapy.conf
cp -r front/ %{buildroot}/usr/share/bakapy/
ln -s /usr/share/bakapy/front/scripts/config.js %{buildroot}/etc/bakapy/front-config.js
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/usr/bin/getent group bakapy || /usr/sbin/groupadd --system bakapy
/usr/bin/getent passwd bakapy || /usr/sbin/useradd --system --home-dir /var/lib/bakapy --shell /bin/false --gid bakapy bakapy
%postun
test -f /sbin/initctl && /sbin/initctl stop bakapy &>/dev/null
%files
%attr(755,root,root) /usr/bin/bakapy-scheduler
%attr(755,root,root) /usr/bin/bakapy-run-job
%attr(755,root,root) /usr/bin/bakapy-show-meta
%attr(644,root,root) /etc/init/bakapy.conf
%config(noreplace) /etc/bakapy/jobs
%config(noreplace) /etc/bakapy/commands
%config(noreplace) /etc/bakapy/bakapy.conf
%attr(750,bakapy,bakapy) /var/lib/bakapy/data
%attr(750,bakapy,bakapy) /var/lib/bakapy/meta
%doc LICENSE
%doc bakapy.conf.ex.yaml
%doc jobs.conf.ex.yaml
%files front
/usr/share/bakapy/front
%config(noreplace) /etc/bakapy/front-config.js
%doc front.nginx-vhost.conf.ex
%changelog
* Sat Dec 20 2014 19:09:19 +0300 Matvey Kruglov <[email protected]> 0.8.0-1
- Added web interface
- Add MYSQLDUMP_EXTRA_ARGS option for backup-mysql-databases.sh
- Stability improvements
* Tue Oct 21 2014 13:58:37 +0400 Matvey Kruglov <[email protected]> 0.7.2-1
- Add backup-deb-package-list.sh backup command
- Add Content-Type header to email messages
- Fix metadata total size calculation
* Mon Oct 20 2014 14:52:36 +0400 Matvey Kruglov <[email protected]> 0.7.1-1
- Fix bug with zero expire time for jobs defined in the main config file
* Mon Oct 13 2014 23:31:41 +0400 Matvey Kruglov <[email protected]> 0.7-1
- Packaging improvements
- Notifications by email about failed jobs
- Add date to scheduler log format
- Syslog logging
* Thu Oct 02 2014 00:09:34 +0400 Matvey Kruglov <[email protected]> 0.6-1
- Exit with correct exit code if configuration error occured
- Allow job max age lower than 1 day
- Improve packaging
* Wed Oct 01 2014 01:42:42 +0400 Matvey Kruglov <[email protected]> 0.5-1
- Commands should not send magic word on stop anymore
- Add ability to run jobs locally
- Fix panic on cleanup old tasks if storage metadata folder does not exist yet
- Ubuntu 14.04 package builds
- Many stability improvements
* Tue Sep 30 2014 11:24:59 +0400 Matvey Kruglov <[email protected]> 0.2.1-1
- Gzip databases backups on client and fix job start_time var
- Fix typo in backup-mysql script
- Always use bufio for backup files writing