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