]>
Commit | Line | Data |
---|---|---|
bb6e7dc5 | 1 | # TODO: |
bb6e7dc5 | 2 | # - files section |
d907cd57 | 3 | # - rpm scripts |
bb6e7dc5 AM |
4 | # |
5 | Summary: Bacula - The Network Backup Solution | |
6 | Name: bacula | |
7 | Version: 1.34.6 | |
8 | Release: 0.1 | |
5ce18635 | 9 | Epoch: 0 |
bb6e7dc5 AM |
10 | Group: Networking/Utilities |
11 | License: GPL v2 | |
12 | Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz | |
9e525e0e | 13 | # Source0-md5: 9de593cb206df126a8e27774281c5bf6 |
bb6e7dc5 AM |
14 | Source1: http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/tomsrtbt-2.0.103.tar.gz |
15 | # Source1-md5: d5ee50efb28986d564547d5da5de2483 | |
5ce18635 AM |
16 | Source2: %{name}-manpages.tar.bz2 |
17 | # Source2-md5: e4dae86d6574b360e831efd3913e7f4c | |
18 | Source10: %{name}-dir.init | |
19 | Source11: %{name}-fd.init | |
20 | Source12: %{name}-sd.init | |
21 | Source13: %{name}.logrotate | |
1a72afd2 | 22 | Patch0: %{name}-pidfile.patch |
bb6e7dc5 | 23 | URL: http://www.bacula.org/ |
d907cd57 | 24 | BuildRequires: mtx |
bb6e7dc5 AM |
25 | BuildRequires: wxGTK2-devel |
26 | BuildRequires: openssl-devel | |
27 | BuildRequires: pkgconfig | |
28 | BuildRequires: ncurses-devel | |
29 | BuildRequires: readline-devel | |
30 | BuildRequires: sqlite2-devel | |
31 | BuildRequires: libwrap-devel | |
32 | BuildRequires: zlib-devel | |
33 | BuildRequires: acl-devel | |
34 | BuildRequires: libstdc++-devel | |
d907cd57 AM |
35 | BuildRequires: glibc-static |
36 | BuildRequires: acl-static | |
37 | BuildRequires: libwrap-static | |
38 | BuildRequires: libstdc++-static | |
9aa69d51 | 39 | BuildRequires: sed >= 4.0 |
bb6e7dc5 AM |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %define _sysconfdir /etc/%{name} | |
1a72afd2 | 43 | %define _localstatedir /var/lib/%{name} |
bb6e7dc5 AM |
44 | |
45 | %description | |
46 | Bacula - It comes by night and sucks the vital essence from your | |
47 | computers. | |
48 | ||
49 | Bacula is a set of computer programs that permit you (or the system | |
50 | administrator) to manage backup, recovery, and verification of | |
51 | computer data across a network of computers of different kinds. In | |
52 | technical terms, it is a network client/server based backup program. | |
53 | Bacula is relatively easy to use and efficient, while offering many | |
54 | advanced storage management features that make it easy to find and | |
5ce18635 | 55 | recover lost or damaged files. |
bb6e7dc5 | 56 | |
5ce18635 AM |
57 | %package common |
58 | Summary: Common files for bacula package | |
bb6e7dc5 | 59 | Group: Networking/Utilities |
5ce18635 AM |
60 | Conflicts: bacula-dir < %{epoch}:%{version}-%{release} |
61 | Conflicts: bacula-fd < %{epoch}:%{version}-%{release} | |
62 | Conflicts: bacula-sd < %{epoch}:%{version}-%{release} | |
63 | Conflicts: bacula-console < %{epoch}:%{version}-%{release} | |
bb6e7dc5 | 64 | |
5ce18635 | 65 | %description common |
bb6e7dc5 AM |
66 | Bacula - It comes by night and sucks the vital essence from your |
67 | computers. | |
68 | ||
69 | Bacula is a set of computer programs that permit you (or the system | |
70 | administrator) to manage backup, recovery, and verification of | |
71 | computer data across a network of computers of different kinds. In | |
72 | technical terms, it is a network client/server based backup program. | |
73 | Bacula is relatively easy to use and efficient, while offering many | |
74 | advanced storage management features that make it easy to find and | |
5ce18635 | 75 | recover lost or damaged files. |
bb6e7dc5 | 76 | |
5ce18635 AM |
77 | %package dir |
78 | Summary: Bacula Director and Catalog services | |
79 | Group: Networking/Utilities | |
80 | Prereq: bacula-common = %{epoch}:%{version}-%{release} | |
bb6e7dc5 | 81 | |
5ce18635 AM |
82 | %description dir |
83 | Bacula - It comes by night and sucks the vital essence from your | |
84 | computers. | |
85 | ||
86 | Bacula Director is the program that supervises all the backup, | |
87 | restore, verify and archive operations. The system administrator uses | |
88 | the Bacula Director to schedule backups and to recover files. Catalog | |
89 | services are comprised of the software programs responsible for | |
90 | maintaining the file indexes and volume databases for all files backed | |
91 | up. The Catalog services permit the System Administrator or user to | |
92 | quickly locate and restore any desired file, since it maintains a | |
93 | record of all Volumes used, all Jobs run, and all Files saved. This | |
94 | build requires sqlite to be installed separately as the catalog | |
95 | database. | |
96 | ||
97 | %package console | |
98 | Summary: Bacula Console | |
99 | Group: Networking/Utilities | |
100 | Prereq: bacula-common = %{epoch}:%{version}-%{release} | |
101 | ||
102 | %description console | |
103 | Bacula - It comes by night and sucks the vital essence from your | |
104 | computers. | |
105 | ||
106 | Bacula Console is the program that allows the administrator or user to | |
107 | communicate with the Bacula Director. This is the text only console | |
108 | interface. | |
109 | ||
110 | %package console-wx | |
111 | Summary: Bacula wxWindows Console | |
112 | Group: Networking/Utilities | |
113 | Prereq: bacula-common = %{epoch}:%{version}-%{release} | |
114 | ||
115 | %description console-wx | |
116 | Bacula - It comes by night and sucks the vital essence from your | |
117 | computers. | |
118 | ||
119 | Bacula Console is the program that allows the administrator or user to | |
120 | communicate with the Bacula Director. This is the wxWindows GUI | |
121 | interface. | |
122 | ||
123 | %package fd | |
124 | Summary: Bacula File services (Client) | |
125 | Group: Networking/Utilities | |
126 | Prereq: bacula-common = %{epoch}:%{version}-%{release} | |
127 | ||
128 | %description fd | |
129 | Bacula - It comes by night and sucks the vital essence from your | |
130 | computers. | |
131 | ||
132 | Bacula File services (or Client program) is the software program that | |
133 | is installed on the machine to be backed up. It is specific to the | |
134 | operating system on which it runs and is responsible for providing the | |
135 | file attributes and data when requested by the Director. The File | |
136 | services are also responsible for the file system dependent part of | |
137 | restoring the file attributes and data during a recovery operation. | |
138 | This program runs as a daemon on the machine to be backed up, and in | |
139 | some of the documentation, the File daemon is referred to as the | |
140 | Client (for example in Bacula configuration file). | |
141 | ||
142 | %package sd | |
143 | Summary: Bacula Storage services | |
144 | Group: Networking/Utilities | |
145 | Prereq: bacula-common = %{epoch}:%{version}-%{release} | |
146 | ||
147 | %description sd | |
148 | Bacula - It comes by night and sucks the vital essence from your | |
149 | computers. | |
150 | ||
151 | Bacula Storage services consist of the software programs that perform | |
152 | the storage and recovery of the file attributes and data to the | |
153 | physical backup media or volumes. In other words, the Storage daemon | |
154 | is responsible for reading and writing your tapes (or other storage | |
155 | media, e.g. files). The Storage services runs as a daemon on the | |
156 | machine that has the backup device (usually a tape drive). | |
bb6e7dc5 | 157 | |
5ce18635 | 158 | %package rescue |
bb6e7dc5 AM |
159 | Summary: Bacula - The Network Backup Solution |
160 | Group: Networking/Utilities | |
161 | Requires: coreutils | |
162 | Requires: util-linux | |
bb6e7dc5 AM |
163 | Requires: bacula-fd |
164 | ||
165 | %description rescue | |
166 | Bacula - It comes by night and sucks the vital essence from your | |
167 | computers. | |
168 | ||
169 | Bacula is a set of computer programs that permit you (or the system | |
170 | administrator) to manage backup, recovery, and verification of | |
171 | computer data across a network of computers of different kinds. In | |
172 | technical terms, it is a network client/server based backup program. | |
173 | Bacula is relatively easy to use and efficient, while offering many | |
174 | advanced storage management features that make it easy to find and | |
175 | recover lost or damaged files. Bacula source code has been released | |
176 | under the GPL version 2 license. | |
177 | ||
178 | This package installs scripts for disaster recovery and builds rescue | |
179 | floppy disks for bare metal recovery. This package includes tomsrtbt | |
180 | (http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a | |
181 | tool to build a boot floppy disk. | |
182 | ||
d907cd57 AM |
183 | To create a boot disk run "./getdiskinfo" from the |
184 | %{_sysconfdir}/rescue directory (this is done when the package is | |
185 | first installed), then run "./install.s" from the | |
186 | %{_sysconfdir}/rescue/tomsrtbt/ directory. To make the bacula rescue | |
187 | disk run "./make_rescue_disk --copy-static-bacula | |
188 | - --copy-etc-files" from the %{_sysconfdir}/rescue directory. To | |
189 | recreate the rescue information for this system run ./getdiskinfo | |
190 | again. | |
bb6e7dc5 AM |
191 | |
192 | %package updatedb | |
193 | Summary: Bacula - The Network Backup Solution | |
194 | Group: Networking/Utilities | |
195 | ||
196 | %description updatedb | |
197 | Bacula - It comes by night and sucks the vital essence from your | |
198 | computers. | |
199 | ||
200 | Bacula is a set of computer programs that permit you (or the system | |
201 | administrator) to manage backup, recovery, and verification of | |
202 | computer data across a network of computers of different kinds. In | |
203 | technical terms, it is a network client/server based backup program. | |
204 | Bacula is relatively easy to use and efficient, while offering many | |
205 | advanced storage management features that make it easy to find and | |
206 | recover lost or damaged files. Bacula source code has been released | |
207 | under the GPL version 2 license. | |
208 | ||
209 | This package installs scripts for updating older versions of the | |
210 | bacula database. | |
211 | ||
bb6e7dc5 | 212 | %prep |
5ce18635 | 213 | %setup -q -a 1 -a 2 |
1a72afd2 | 214 | %patch0 -p1 |
bb6e7dc5 AM |
215 | sed -i -e 's#wx-config#wxgtk2-2.4-config#g' configure* |
216 | sed -i -e 's#-lreadline -ltermcap#-lreadline#g' configure* | |
10650249 AM |
217 | sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \ |
218 | src/cats/create_* src/cats/delete_* src/cats/drop_* \ | |
219 | src/cats/grant_* src/cats/make_* src/cats/update_* | |
bb6e7dc5 AM |
220 | |
221 | %build | |
bb6e7dc5 AM |
222 | CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/readline" |
223 | %configure \ | |
5ce18635 | 224 | --with-scriptdir=%{_libexecdir}/%{name} \ |
bb6e7dc5 AM |
225 | --disable-gnome \ |
226 | --disable-conio \ | |
5ce18635 | 227 | --enable-smartalloc \ |
bb6e7dc5 AM |
228 | --enable-wx-console \ |
229 | --with-readline \ | |
230 | --with-tcp-wrappers \ | |
231 | --with-working-dir=%{_var}/lib/%{name} \ | |
232 | --with-dump-email="root@localhost" \ | |
233 | --with-job-email="root@localhost" \ | |
234 | --with-smtp-host=localhost \ | |
235 | --with-pid-dir=/var/run \ | |
236 | --with-subsys-dir=/var/lock/subsys \ | |
d907cd57 | 237 | --with-sqlite \ |
5ce18635 | 238 | --enable-static-fd \ |
1a72afd2 | 239 | --with-dir-password="#FAKE#DIR#PASSWORD#PLD#" \ |
9aa69d51 | 240 | --with-fd-password="#FAKE#FD#PASSWORD#PLD#" \ |
241 | --with-sd-password="#FAKE#SD#PASSWORD#PLD#" | |
5ce18635 | 242 | |
bb6e7dc5 AM |
243 | %{__make} |
244 | ||
245 | %install | |
246 | rm -rf $RPM_BUILD_ROOT | |
247 | ||
d907cd57 AM |
248 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,security/console.apps} |
249 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rescue/tomsrtbt,updatedb} | |
1a72afd2 | 250 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_mandir},%{_bindir}} |
bb6e7dc5 AM |
251 | |
252 | %{__make} install \ | |
253 | DESTDIR=$RPM_BUILD_ROOT | |
254 | ||
d907cd57 AM |
255 | # static daemon |
256 | strip src/filed/static-bacula-fd | |
257 | install src/filed/static-bacula-fd $RPM_BUILD_ROOT%{_sysconfdir}/rescue/bacula-fd | |
258 | ||
5ce18635 AM |
259 | install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir |
260 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd | |
261 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd | |
1a72afd2 | 262 | install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir |
d907cd57 AM |
263 | |
264 | install scripts/bacula.png $RPM_BUILD_ROOT%{_pixmapsdir}/bacula.png | |
265 | ||
266 | # install the rescue stuff, these are the rescue scripts | |
267 | install rescue/linux/backup.etc.list $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
268 | install rescue/linux/format_floppy $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
269 | install rescue/linux/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
270 | install rescue/linux/make_rescue_disk $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
271 | install rescue/linux/restore_bacula $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
272 | install rescue/linux/restore_etc $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
273 | install rescue/linux/run_grub $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
274 | install rescue/linux/run_lilo $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
275 | install rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue/ | |
bb6e7dc5 AM |
276 | |
277 | # this is the tom's root boot disk | |
d907cd57 | 278 | install tomsrtbt-*/* $RPM_BUILD_ROOT%{_sysconfdir}/rescue/tomsrtbt/ |
bb6e7dc5 AM |
279 | |
280 | # install the updatedb scripts | |
d907cd57 AM |
281 | install updatedb/* $RPM_BUILD_ROOT%{_sysconfdir}/updatedb/ |
282 | ||
283 | # manual | |
1a72afd2 AM |
284 | cp -a man1 man8 $RPM_BUILD_ROOT%{_mandir} |
285 | ||
d907cd57 AM |
286 | install -d html-manual |
287 | cp -a doc/html-manual/*.{html,jpg,gif,css} html-manual/ | |
bb6e7dc5 | 288 | |
1a72afd2 AM |
289 | # some file changes |
290 | rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd} | |
291 | rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd | |
292 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gnome* | |
293 | touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed | |
294 | ||
295 | cat << EOF > $RPM_BUILD_ROOT/etc/security/console.apps/bconsole | |
296 | USER=root | |
297 | PROGRAM=%{_sbindir}/bconsole | |
298 | SESSION=true | |
299 | EOF | |
300 | install scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bconsole | |
301 | ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/bconsole | |
302 | ||
303 | cat << EOF > $RPM_BUILD_ROOT/etc/security/console.apps/wx-console | |
304 | USER=root | |
305 | PROGRAM=%{_sbindir}/wx-console | |
306 | SESSION=true | |
307 | EOF | |
308 | cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/wx-console | |
309 | ln -s consolehelper $RPM_BUILD_ROOT%{_bindir}/wx-console | |
bb6e7dc5 | 310 | |
5ce18635 | 311 | %pre common |
28c9f5d0 | 312 | if [ -n "`getgid bacula`" ]; then |
9aa69d51 | 313 | if [ "`getgid bacula`" != "136" ]; then |
314 | echo "Error: group bacula doesn't have gid=136. Correct this before installing bacula." 1>&2 | |
315 | exit 1 | |
316 | fi | |
28c9f5d0 | 317 | else |
9aa69d51 | 318 | /usr/sbin/groupadd -g 136 -r -f bacula |
28c9f5d0 AM |
319 | fi |
320 | if [ -n "`id -u bacula 2>/dev/null`" ]; then | |
9aa69d51 | 321 | if [ "`id -u bacula`" != "136" ]; then |
322 | echo "Error: user bacula doesn't have uid=136. Correct this before installing bacula." 1>&2 | |
323 | exit 1 | |
324 | fi | |
28c9f5d0 | 325 | else |
9aa69d51 | 326 | /usr/sbin/useradd -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula 1>&2 |
28c9f5d0 | 327 | fi |
5ce18635 AM |
328 | |
329 | %postun common | |
28c9f5d0 AM |
330 | if [ "$1" = "0" ]; then |
331 | %userremove bacula | |
332 | %groupremove bacula | |
333 | fi | |
5ce18635 AM |
334 | |
335 | %post dir | |
336 | umask 077 | |
1a72afd2 | 337 | [ -s %{_localstatedir}/bacula.db ] && \ |
9aa69d51 | 338 | DB_VER=`echo "select * from Version;" | \ |
339 | %{_bindir}/sqlite %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null` | |
5ce18635 AM |
340 | if [ -z "$DB_VER" ]; then |
341 | # grant privileges and create tables | |
9aa69d51 | 342 | %{_libexecdir}/%{name}/grant_bacula_privileges > dev/null |
343 | %{_libexecdir}/%{name}/create_bacula_database > dev/null | |
344 | %{_libexecdir}/%{name}/make_bacula_tables > dev/null | |
5ce18635 | 345 | elif [ "$DB_VER" -lt "7" ]; then |
9aa69d51 | 346 | echo "Backing up bacula tables" |
347 | echo ".dump" | sqlite %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2 | |
348 | type=sqlite | |
349 | echo "Upgrading bacula tables" | |
350 | if [ "$DB_VER" -lt "6" ]; then | |
351 | if [ "$DB_VER" -lt "5" ]; then | |
352 | %{_libexecdir}/%{name}/update_${type}_tables_4_to_5 | |
353 | fi | |
354 | %{_libexecdir}/%{name}/update_${type}_tables_5_to_6 | |
355 | fi | |
356 | %{_libexecdir}/%{name}/update_bacula_tables | |
357 | echo "If bacula works correctly you can remove the backup file %{_localstatedir}/bacula_backup.sql.bz2" | |
bb6e7dc5 | 358 | fi |
28c9f5d0 AM |
359 | chown -R bacula:bacula %{_localstatedir} |
360 | chmod -R u+rX,go-rwx %{_localstatedir}/* | |
bb6e7dc5 | 361 | |
1a72afd2 AM |
362 | /sbin/chkconfig --add bacula-dir |
363 | if [ -f /var/lock/subsys/bacula-dir ]; then | |
9aa69d51 | 364 | /etc/rc.d/init.d/bacula-dir restart 1>&2 |
1a72afd2 | 365 | else |
9aa69d51 | 366 | echo "Run \"/etc/rc.d/init.d/bacula-dir start\" to start Bacula Director daemon." |
1a72afd2 | 367 | fi |
bb6e7dc5 | 368 | |
5ce18635 | 369 | %preun dir |
1a72afd2 | 370 | if [ "$1" = "0" ]; then |
9aa69d51 | 371 | if [ -f /var/lock/subsys/bacula-dir ]; then |
372 | /etc/rc.d/init.d/bacula-dir stop 1>&2 | |
373 | fi | |
374 | /sbin/chkconfig --del bacula-dir | |
1a72afd2 | 375 | fi |
bb6e7dc5 | 376 | |
5ce18635 | 377 | %post fd |
1a72afd2 AM |
378 | /sbin/chkconfig --add bacula-fd |
379 | if [ -f /var/lock/subsys/bacula-fd ]; then | |
9aa69d51 | 380 | /etc/rc.d/init.d/bacula-fd restart 1>&2 |
1a72afd2 | 381 | else |
9aa69d51 | 382 | echo "Run \"/etc/rc.d/init.d/bacula-fd start\" to start Bacula File daemon." |
1a72afd2 | 383 | fi |
bb6e7dc5 | 384 | |
5ce18635 | 385 | %preun fd |
1a72afd2 | 386 | if [ "$1" = "0" ]; then |
9aa69d51 | 387 | if [ -f /var/lock/subsys/bacula-fd ]; then |
388 | /etc/rc.d/init.d/bacula-fd stop 1>&2 | |
389 | fi | |
390 | /sbin/chkconfig --del bacula-fd | |
1a72afd2 | 391 | fi |
5ce18635 AM |
392 | |
393 | %post sd | |
1a72afd2 AM |
394 | /sbin/chkconfig --add bacula-sd |
395 | if [ -f /var/lock/subsys/bacula-sd ]; then | |
9aa69d51 | 396 | /etc/rc.d/init.d/bacula-sd restart 1>&2 |
1a72afd2 | 397 | else |
9aa69d51 | 398 | echo "Run \"/etc/rc.d/init.d/bacula-sd start\" to start Bacula Storage daemon." |
1a72afd2 | 399 | fi |
bb6e7dc5 | 400 | |
5ce18635 | 401 | %preun sd |
1a72afd2 | 402 | if [ "$1" = "0" ]; then |
9aa69d51 | 403 | if [ -f /var/lock/subsys/bacula-sd ]; then |
404 | /etc/rc.d/init.d/bacula-sd stop 1>&2 | |
405 | fi | |
406 | /sbin/chkconfig --del bacula-sd | |
1a72afd2 | 407 | fi |
5ce18635 AM |
408 | |
409 | %pre console | |
410 | if [ -e %{_sysconfdir}/console.conf -a ! -e %{_sysconfdir}/bconsole.conf ]; then | |
9aa69d51 | 411 | mv %{_sysconfdir}/console.conf %{_sysconfdir}/bconsole.conf |
bb6e7dc5 AM |
412 | fi |
413 | ||
414 | %post updatedb | |
d907cd57 | 415 | echo "The database update scripts were installed to %{_sysconfdir}/updatedb" |
bb6e7dc5 AM |
416 | |
417 | %clean | |
418 | rm -rf $RPM_BUILD_ROOT | |
419 | ||
420 | %post rescue | |
421 | # link our current installed conf file to the rescue directory | |
d907cd57 | 422 | ln -s %{_sysconfdir}/bacula-fd.conf %{_sysconfdir}/rescue/bacula-fd.conf |
bb6e7dc5 AM |
423 | |
424 | # run getdiskinfo | |
425 | echo "Creating rescue files for this system..." | |
d907cd57 | 426 | cd %{_sysconfdir}/rescue |
bb6e7dc5 AM |
427 | ./getdiskinfo |
428 | ||
429 | %preun rescue | |
430 | # remove the files created after the initial rpm installation | |
d907cd57 AM |
431 | rm -f %{_sysconfdir}/rescue/bacula-fd.conf |
432 | rm -f %{_sysconfdir}/rescue/partition.* | |
433 | rm -f %{_sysconfdir}/rescue/format.* | |
434 | rm -f %{_sysconfdir}/rescue/mount_drives | |
435 | rm -f %{_sysconfdir}/rescue/start_network | |
436 | rm -f %{_sysconfdir}/rescue/sfdisk | |
437 | rm -rf %{_sysconfdir}/rescue/diskinfo/* | |
bb6e7dc5 | 438 | |
5ce18635 AM |
439 | %files common |
440 | %defattr(644,root,root,755) | |
1a72afd2 | 441 | %dir %{_sysconfdir} |
5ce18635 AM |
442 | %attr(755, root, root) %{_sbindir}/btraceback |
443 | %attr(755, root, root) %{_sbindir}/bsmtp | |
444 | %dir %{_libexecdir}/%{name} | |
445 | %{_libexecdir}/%{name}/btraceback.gdb | |
1a72afd2 | 446 | %attr(700, bacula, bacula) %dir %{_localstatedir} |
5ce18635 AM |
447 | |
448 | %files dir | |
bb6e7dc5 | 449 | %defattr(644,root,root,755) |
5ce18635 | 450 | %doc ChangeLog CheckList ReleaseNotes kernstodo |
1a72afd2 | 451 | %doc doc/*.pdf html-manual examples |
28c9f5d0 | 452 | %attr(600, root, root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-dir.conf |
1a72afd2 | 453 | %ghost %{_sysconfdir}/.pw.sed |
28c9f5d0 | 454 | %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir |
5ce18635 AM |
455 | %{_mandir}/man8/bacula-dir.8* |
456 | %{_mandir}/man1/dbcheck.1* | |
457 | %defattr (755, root, root) | |
1a72afd2 | 458 | %attr(754,root,root) /etc/rc.d/init.d/bacula-dir |
5ff0b6a3 | 459 | %attr(755,root,root) %{_sbindir}/bacula-dir |
5ce18635 AM |
460 | %attr(755,root,root) %{_sbindir}/dbcheck |
461 | %{_libexecdir}/%{name}/create_sqlite_database | |
462 | %{_libexecdir}/%{name}/drop_sqlite_database | |
463 | %{_libexecdir}/%{name}/drop_sqlite_tables | |
464 | %{_libexecdir}/%{name}/grant_sqlite_privileges | |
465 | %{_libexecdir}/%{name}/make_sqlite_tables | |
466 | %{_libexecdir}/%{name}/update_sqlite_tables* | |
467 | %{_libexecdir}/%{name}/create_bacula_database | |
468 | %{_libexecdir}/%{name}/drop_bacula_database | |
469 | %{_libexecdir}/%{name}/drop_bacula_tables | |
470 | %{_libexecdir}/%{name}/grant_bacula_privileges | |
471 | %{_libexecdir}/%{name}/make_bacula_tables | |
472 | %{_libexecdir}/%{name}/update_bacula_tables | |
473 | %{_libexecdir}/%{name}/make_catalog_backup | |
474 | %{_libexecdir}/%{name}/delete_catalog_backup | |
475 | %attr(644, root, root) %{_libexecdir}/%{name}/query.sql | |
476 | ||
477 | %files fd | |
478 | %defattr(644,root,root,755) | |
28c9f5d0 | 479 | %attr(600, root, root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-fd.conf |
1a72afd2 | 480 | %attr(754,root,root) /etc/rc.d/init.d/bacula-fd |
5ff0b6a3 | 481 | %attr(755,root,root) %{_sbindir}/bacula-fd |
5ce18635 AM |
482 | %attr(644, root, root) %{_mandir}/man8/bacula-fd.8* |
483 | ||
484 | %files sd | |
485 | %defattr(644,root,root,755) | |
1a72afd2 | 486 | %dir %{_sysconfdir} |
28c9f5d0 | 487 | %attr(600, root, root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bacula-sd.conf |
1a72afd2 | 488 | %attr(754,root,root) /etc/rc.d/init.d/bacula-sd |
5ff0b6a3 AM |
489 | %attr(755,root,root) %{_sbindir}/bacula-sd |
490 | %attr(755,root,root) %{_sbindir}/bcopy | |
491 | %attr(755,root,root) %{_sbindir}/bextract | |
492 | %attr(755,root,root) %{_sbindir}/bls | |
493 | %attr(755,root,root) %{_sbindir}/bscan | |
494 | %attr(755,root,root) %{_sbindir}/btape | |
5ce18635 AM |
495 | %{_libexecdir}/%{name}/mtx-changer |
496 | %defattr(644, root,root, 755) | |
497 | %{_mandir}/man8/bacula-sd.8* | |
498 | %{_mandir}/man1/bcopy.1* | |
499 | %{_mandir}/man1/bextract.1* | |
500 | %{_mandir}/man1/bls.1* | |
501 | %{_mandir}/man1/bscan.1* | |
502 | %{_mandir}/man1/btape.1* | |
503 | ||
504 | %files console | |
bb6e7dc5 | 505 | %defattr(644,root,root,755) |
28c9f5d0 | 506 | %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/bconsole.conf |
1a72afd2 AM |
507 | %attr(755,root,root) %{_sbindir}/bconsole |
508 | %config(noreplace) /etc/security/console.apps/bconsole | |
509 | %config(noreplace) /etc/pam.d/bconsole | |
5ce18635 AM |
510 | %verify(link) %{_bindir}/bconsole |
511 | %{_mandir}/man1/bconsole.1* | |
512 | ||
5ce18635 AM |
513 | %files console-wx |
514 | %defattr(644,root,root,755) | |
1a72afd2 | 515 | %{_pixmapsdir}/%{name}.png |
28c9f5d0 | 516 | %attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/wx-console.conf |
1a72afd2 AM |
517 | %attr(755,root,root) %{_sbindir}/wx-console |
518 | %config(noreplace) /etc/security/console.apps/wx-console | |
28c9f5d0 | 519 | %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/wx-console |
5ce18635 AM |
520 | %verify(link) %{_bindir}/wx-console |
521 | %{_mandir}/man1/wx-console.1* | |
bb6e7dc5 AM |
522 | |
523 | %files rescue | |
524 | %defattr(644,root,root,755) | |
d907cd57 | 525 | %{_sysconfdir}/rescue |
bb6e7dc5 AM |
526 | |
527 | %files updatedb | |
528 | %defattr(644,root,root,755) | |
d907cd57 | 529 | %{_sysconfdir}/updatedb |