1 |
brianr |
1.5 |
# $Id: smeserver-BackupPC.spec,v 1.4 2021/01/26 12:37:28 brianr Exp $ |
2 |
brianr |
1.1 |
# Authority: vip-ire |
3 |
|
|
# Name: Daniel Berteaud |
4 |
|
|
|
5 |
|
|
Name: smeserver-BackupPC |
6 |
|
|
Version: 0.2 |
7 |
brianr |
1.5 |
Release: 7%{?dist} |
8 |
brianr |
1.1 |
Summary: BackupPC integration into SME server |
9 |
|
|
|
10 |
|
|
Group: Applications/System |
11 |
|
|
License: GPL |
12 |
|
|
URL: http://backuppc.sourceforge.net/ |
13 |
|
|
Source: %{name}-%{version}.tar.xz |
14 |
|
|
Patch0: smeserver-BackupPC-0.2.bz10266.updatetktauth.patch |
15 |
brianr |
1.3 |
Patch1: smeserver-BackupPC-0.2-Add-extra-loadmodules-in-httpd.conf.patch |
16 |
brianr |
1.4 |
Patch2: smeserver-BackupPC-0.2-Update-createlinks-for-systemd-for-SME10.patch |
17 |
brianr |
1.5 |
Patch3: smeserver-BackupPC-0.2-Get-httpd-bkpc-task-running.patch |
18 |
brianr |
1.1 |
|
19 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version} |
20 |
|
|
BuildArch: noarch |
21 |
|
|
|
22 |
|
|
BuildRequires: e-smith-devtools |
23 |
|
|
|
24 |
|
|
Requires: mod_auth_tkt |
25 |
brianr |
1.2 |
Requires: BackupPC >= 4.0.0 |
26 |
brianr |
1.1 |
Requires: smeserver-remoteuseraccess |
27 |
|
|
Requires: openssl |
28 |
brianr |
1.2 |
Requires: e-smith-manager >= 2.8.0 |
29 |
brianr |
1.1 |
|
30 |
|
|
#Conflicts: smeserver-backuppc.fws |
31 |
|
|
Obsoletes: smeserver-backuppc.fws |
32 |
|
|
|
33 |
|
|
|
34 |
|
|
%description |
35 |
|
|
BackupPC is a high-performance, enterprise-grade system for backing up Linux |
36 |
|
|
and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable |
37 |
|
|
and easy to install and maintain. |
38 |
|
|
This package contains specific configuration for SME server |
39 |
|
|
|
40 |
|
|
#---------------------------------------------------- |
41 |
|
|
|
42 |
brianr |
1.2 |
#%package -n smeserver-BackupPC4 |
43 |
|
|
#Summary: BackupPC 4 integration into SME server |
44 |
|
|
#Group: Email |
45 |
|
|
#Requires: BackupPC4 |
46 |
|
|
#Conflicts: smeserver-BackupPC |
47 |
|
|
|
48 |
|
|
#%description -n smeserver-BackupPC4 |
49 |
|
|
#BackupPC is a high-performance, enterprise-grade system for backing up Linux |
50 |
|
|
#and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable |
51 |
|
|
#and easy to install and maintain. |
52 |
|
|
#This package contains specific configuration for SME server |
53 |
brianr |
1.1 |
|
54 |
|
|
#---------------------------------------------------- |
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
%changelog |
59 |
brianr |
1.5 |
* Wed Jan 27 2021 Brian Read <brianr@bjsystems.co.uk> 0.2-7.sme |
60 |
|
|
- Get-httpd-bkpc-task-running [SME: 11055] |
61 |
|
|
|
62 |
brianr |
1.4 |
* Mon Jan 11 2021 Brian Read <brianr@bjsystems.co.uk> 0.2-6.sme |
63 |
|
|
- Update createlinks for systemd according to [SME: 10959][SME: 11055] |
64 |
|
|
|
65 |
brianr |
1.3 |
* Fri Nov 27 2020 Brian Read <brianr@bjsystems.co.uk> 0.2-5.sme |
66 |
|
|
- Add in extra Loadmodules to httpd.conf [SME: 11055] |
67 |
|
|
|
68 |
brianr |
1.2 |
* Tue Oct 27 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-4.sme |
69 |
|
|
- Initial build for SME v10 [SME:11055] |
70 |
|
|
- Hard work done by Brian Read |
71 |
|
|
- Remove v3 option and revert to just smeserver-BackupPC |
72 |
|
|
|
73 |
brianr |
1.1 |
* Mon Nov 25 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.2-3.sme |
74 |
|
|
- initial build to install BackupPC4fix [SME: 10514] |
75 |
|
|
|
76 |
|
|
* Wed May 03 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.2-2.sme |
77 |
|
|
- update TKT auth parameter for SME 9.2 update [SME: 10266] |
78 |
|
|
|
79 |
|
|
* Tue Nov 12 2013 Daniel B. <daniel@firewall-services.com> 0.2-1.sme |
80 |
|
|
- Rebuild for SME9 |
81 |
|
|
|
82 |
|
|
* Mon Nov 29 2010 Daniel B. <daniel@firewall-services.com> 0.1-12.sme |
83 |
|
|
- Support pbzip2 for archiving |
84 |
|
|
- Use nice to reduce the priority of compression |
85 |
|
|
|
86 |
|
|
* Tue Jun 16 2009 Daniel B. <daniel@firewall-services.com> [0.1-11] |
87 |
|
|
- Remove double quotes when calling signal-event with ssh [SME: 5302] |
88 |
|
|
|
89 |
|
|
* Fri May 29 2009 Daniel B. <daniel@firewall-services.com> [0.1-10] |
90 |
|
|
- Call signal-event with it full path in smeserver-template.pl [SME: 5302] |
91 |
|
|
|
92 |
|
|
* Tue May 12 2009 Daniel B. <daniel@firewall-services.com> [0.1-9] |
93 |
|
|
- Add optionnal encryption of archives generated with BackupPC_SME_localArchive |
94 |
|
|
BackupPC_SME_usbArchive and BackupPC_SME_remoteArchive using openssl |
95 |
|
|
- Generate a key and save it in /etc/BackupPC/archive.key |
96 |
|
|
- Fixe permission restriction on /etc/BackupPC/* |
97 |
|
|
|
98 |
|
|
* Thu May 07 2009 Daniel B. <daniel@firewall-services.com> [0.1-8] |
99 |
|
|
- Link backuppc-checkupgrade script in post-upgrade event |
100 |
|
|
so the contrib is correctly configured without running backuppc-update |
101 |
|
|
event [SME: 5221] |
102 |
|
|
|
103 |
|
|
* Tue May 05 2009 Daniel B. <daniel@firewall-services.com> [0.1-7] |
104 |
|
|
- Fixe permissions on /etc/BackupPC/pc |
105 |
|
|
|
106 |
|
|
* Mon Mar 23 2009 Daniel B. <daniel@firewall-services.com> [0.1-6] |
107 |
|
|
- modify default httpd conf (cleanup) to use the new paths |
108 |
|
|
- Add quotes in share names for *Archive.conf files |
109 |
|
|
- Enhance provided template |
110 |
|
|
|
111 |
|
|
* Wed Mar 18 2009 Daniel B. <daniel@firewall-services.com> [0.1-5] |
112 |
|
|
- Enhance sudoers templates |
113 |
|
|
|
114 |
|
|
* Mon Feb 23 2009 Daniel B. <daniel@firewall-services.com> [0.1-4] |
115 |
|
|
- Fix logrotate issue (send a sigusr1 signal to httpd-bkpc) |
116 |
|
|
|
117 |
|
|
* Tue Jan 20 2009 Daniel B. <daniel@firewall-services.com> [0.1-3] |
118 |
|
|
- Update Exclude path for smeserver config example |
119 |
|
|
|
120 |
|
|
* Thu Dec 11 2008 Daniel B. <daniel@firewall-services.com> [0.1-2] |
121 |
|
|
- Revert config and logs paths to their default location |
122 |
|
|
- Expand-templates during bootrape-console-save instead of post-upgrade |
123 |
|
|
- Remove sudoers templates.metadata to prevent conflict, added smeserver-remoteuseraccess |
124 |
|
|
as a dependency |
125 |
|
|
|
126 |
|
|
* Thu Nov 13 2008 Daniel B. <daniel@firewall-services.com> [0.1-1] |
127 |
|
|
- Fix logrotate issue |
128 |
|
|
|
129 |
|
|
* Thu Aug 14 2008 Daniel B. <daniel@firewall-services.com> [0.1-0] |
130 |
|
|
- Adapted to work with 3.1.0 |
131 |
|
|
- Split smeserver specific stuff in a separate srpm |
132 |
|
|
- Remove pre-compiled binaries from the srpm (par2cmdline must be downloaded separatly if needed) |
133 |
|
|
- A dedicated httpd instance is used (running under backuppc user). This increase security as |
134 |
|
|
user www no longer has access to backuppc data. |
135 |
|
|
- Authentication is integrated with the server-manager (no need to login two times now) |
136 |
|
|
- Added some config example (with backups disabled). These can be used as templates for other hosts |
137 |
|
|
- Some corrections in backup export scripts (*copyPool scipts still need to be re-written |
138 |
|
|
to be more reliable, maybe with dump/restore, or dd, and with built-in support for LVM snapshots) |
139 |
|
|
|
140 |
brianr |
1.2 |
* Thu May 10 2007 Daniel Berteaud <daniel@firewall-services.com> |
141 |
brianr |
1.1 |
- [3.0-1] |
142 |
|
|
- corrected default config for localhost (excluding by default /opt/backuppc and /selinux) |
143 |
|
|
- improvement of the rpm scriplets |
144 |
|
|
- start and stop script linked to e-smith-service |
145 |
|
|
- scripts for offline backups |
146 |
|
|
- par2 included |
147 |
|
|
|
148 |
|
|
* Tue Jan 30 2007 Daniel Berteaud <daniel@firewall-services.com> |
149 |
|
|
- [3.0-0] |
150 |
|
|
- rpm package |
151 |
|
|
- script BackupPC_SME_remoteBackup to remotly backup the pool (to another UNIX host) |
152 |
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
%prep |
156 |
|
|
%setup -q -n %{name}-%{version} |
157 |
|
|
%patch0 -p1 |
158 |
brianr |
1.3 |
%patch1 -p1 |
159 |
brianr |
1.4 |
%patch2 -p1 |
160 |
brianr |
1.5 |
%patch3 -p1 |
161 |
brianr |
1.1 |
|
162 |
|
|
%build |
163 |
|
|
perl createlinks |
164 |
|
|
|
165 |
|
|
%install |
166 |
|
|
|
167 |
|
|
%{__mkdir} -p $RPM_BUILD_ROOT/var/service/httpd-bkpc/supervise |
168 |
|
|
%{__mkdir} -p $RPM_BUILD_ROOT/var/service/httpd-bkpc/log/supervise |
169 |
|
|
%{__mkdir} -p $RPM_BUILD_ROOT/var/log/httpd-bkpc |
170 |
|
|
|
171 |
|
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
172 |
|
|
/bin/rm -f %{name}-%{version}-filelist |
173 |
brianr |
1.2 |
|
174 |
brianr |
1.1 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
175 |
brianr |
1.2 |
--file "/usr/share/BackupPC/bin/BackupPC_SME_pre-backup" "attr(0755,root,root) %config(noreplace)" \ |
176 |
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_usbArchive" "attr(0755,root,root)" \ |
177 |
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_usbCopyPool" "attr(0755,root,root)" \ |
178 |
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_localArchive" "attr(0755,root,root)" \ |
179 |
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_localCopyPool" "attr(0755,root,root)" \ |
180 |
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_remoteArchive" "attr(0755,root,root)" \ |
181 |
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_remoteCopyPool" "attr(0755,root,root)" \ |
182 |
|
|
--file "/etc/BackupPC/pc/localserver-template.pl2" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
183 |
|
|
--file "/etc/BackupPC/pc/smeserver-template.pl2" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
184 |
|
|
--file "/etc/BackupPC/pc/windows-template.pl" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
185 |
|
|
--file "/etc/BackupPC/usbArchive.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
186 |
|
|
--file "/etc/BackupPC/usbCopyPool.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
187 |
|
|
--file "/etc/BackupPC/localArchive.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
188 |
|
|
--file "/etc/BackupPC/localCopyPool.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
189 |
|
|
--file "/etc/BackupPC/remoteArchive.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
190 |
|
|
--file "/etc/BackupPC/remoteCopyPool.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \ |
191 |
|
|
--dir "/etc/BackupPC/pc" "attr(750,backuppc,backuppc)" \ |
192 |
|
|
--dir "/var/service/httpd-bkpc" "attr(01755,root,root)" \ |
193 |
|
|
--file "/var/service/httpd-bkpc/run" "attr(0700,root,root)" \ |
194 |
|
|
--dir "/var/service/httpd-bkpc/supervise" "attr(0700,root,root)" \ |
195 |
|
|
--dir "/var/service/httpd-bkpc/log" "attr(0755,root,root)" \ |
196 |
|
|
--file "/var/service/httpd-bkpc/log/run" "attr(0755,root,root)" \ |
197 |
|
|
--dir "/var/service/httpd-bkpc/log/supervise" "attr(0700,root,root)" \ |
198 |
|
|
--dir "/var/log/httpd-bkpc" "attr(0750,smelog,smelog)" \ |
199 |
|
|
--ignoredir "/root/var/" \ |
200 |
|
|
--ignoredir "/usr/share/BackupPC" \ |
201 |
|
|
--ignoredir "/usr/share/BackupPC/lib" \ |
202 |
|
|
--ignoredir "/usr/share/BackupPC/lib/BackupPC" \ |
203 |
|
|
--ignoredir "/etc/BackupPC" \ |
204 |
|
|
--ignoredir "/etc/httpd" \ |
205 |
|
|
> %{name}-%{version}-filelist |
206 |
brianr |
1.1 |
|
207 |
|
|
|
208 |
|
|
%clean |
209 |
|
|
rm -rf $RPM_BUILD_ROOT |
210 |
|
|
|
211 |
|
|
%files -f %{name}-%{version}-filelist |
212 |
brianr |
1.2 |
%defattr(-,root,root,-) |
213 |
brianr |
1.1 |
|
214 |
brianr |
1.2 |
#%files -n smeserver-BackupPC4 -f %{name}-%{version}-filelist |
215 |
|
|
#%defattr(-,root,root,-) |
216 |
brianr |
1.1 |
|
217 |
|
|
|
218 |
|
|
%pre |
219 |
|
|
#%{_sbindir}/useradd -c "BackupPC User" -m -d /home/e-smith/files/users/backuppc -r -s /sbin/nologin backuppc >& /dev/null || : |
220 |
|
|
%{_sbindir}/usermod -m -d /var/lib/BackupPC backuppc >& /dev/null || : |
221 |
|
|
|
222 |
brianr |
1.2 |
%post |
223 |
|
|
systemctl enable backuppc |
224 |
|
|
systemctl start backuppc |
225 |
|
|
|
226 |
brianr |
1.1 |
%preun |
227 |
|
|
|
228 |
|
|
# Disable services, and stop them |
229 |
|
|
if [ $1 = 0 ]; then # Uninstall only, not upgrade |
230 |
|
|
db configuration setprop backuppc status disabled >& /dev/null || : |
231 |
|
|
db configuration setprop httpd-bkpc status disabled >& /dev/null || : |
232 |
|
|
service backuppc stop >& /dev/null || : |
233 |
|
|
fi |
234 |
|
|
|
235 |
|
|
true |