~ubuntu-branches/ubuntu/maverick/bacula/maverick

« back to all changes in this revision

Viewing changes to platforms/mandrake/bacula.spec.in

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2008-11-26 13:53:30 UTC
  • mfrom: (3.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20081126135330-gvzmmbbeyiz9y1ar
Tags: 2.4.3-1ubuntu1
* Store sd|fd|director passwords in debconf (LP: #222558)
  - added debian/bacula-common.templates
  - modified debian/bacula-common.postinst:
    + generate random passwords and store them in debconf
  - modified debian/bacula-[sd|fd|director-mysql|director-pgsql].postinst
    + read and set passwords from debconf
* Daemons listen on all interfaces (LP: #286643)
* Start daemons on installation
* Build with generic XXX_*_XXX username, password and database name
  and replace it with dbconfig's settings in postinstall scripts
* Merge from debian unstable, remaining changes:
  - Drop mt-st to suggests. So that bacula goes back to main. (LP: #286528)
  - debian/rules: Disable fortify source since it was causing
    bacula-director to segfault.
  - debian/control:
    + Added libdbi-perl and libdb-mysql-perl to depends for
      bacula-director-mysql
      due to new postinst configuration.
    + Cleaned up bacula-director-pgsql dependenices and recommends.
    + Made mysql the default director to install bacula-director-{mysql|pgsql}
      added database handling to postinstall scripts and templates, modifiied
      postinstall script's sed expressions.
    + Removed libwgtk-2.6-dev as a build dependency; as a result
      bacula-console-wx isn't built anymore.
    + Install gawk if not installed. (LP: #207527)
  - debian/make_catalog_backup_awk.[mysql|pgsql|sqlite3|sqlite]:
    + New scripts for catalog backup. (CVE-2007-5626)
  - debian/bacula-console-wx:
    + Dropped since we are not building them anymore.
  - debian/bacula-director-common.bacula-director.init,
    debian/bacula-fd.init, debian/bacula-sd.init
    + Made more LSB specific.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Bacula RPM spec file
2
 
# Copyright (C) 2000-2006 Kern Sibbald
 
2
# Copyright (C) 2000-2008 Kern Sibbald
3
3
 
4
4
# Platform Build Configuration
5
5
 
18
18
# except for patch macros in the setup section
19
19
#--------------------------------------------------------------------------
20
20
 
 
21
%define single_dir 0
 
22
%{?single_dir_install:%define single_dir 1}
 
23
%if %{single_dir}
 
24
%define _prefix /opt/bacula
 
25
%else
 
26
%define _prefix /usr
 
27
%endif
 
28
 
21
29
# third party packagers
22
30
%define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
23
31
%{?contrib_packager:%define _packager %{contrib_packager}}
38
46
URL: http://www.bacula.org/
39
47
Vendor: The Bacula Team
40
48
Packager: %{_packager}
 
49
Prefix: %{_prefix}
41
50
 
42
51
# define the basic package description
43
52
%define blurb Bacula - It comes by night and sucks the vital essence from your computers.
49
58
%define blurb7 features that make it easy to find and recover lost or damaged files.
50
59
%define blurb8 Bacula source code has been released under the GPL version 2 license.
51
60
 
52
 
# directory locations
53
 
%define sqlite_bindir %_libdir/bacula/sqlite
 
61
# source directory locations
54
62
%define _docsrc ../%{name}-docs-%{docs_version}
55
63
%define _rescuesrc ../%{name}-rescue-%{_rescuever}
56
64
%define depkgs ../depkgs
 
65
 
 
66
# directory locations
 
67
%if %{single_dir}
 
68
%define _sbindir /opt/bacula
 
69
%define _subsysdir /opt/bacula/working
 
70
%define sqlite_bindir /opt/bacula/sqlite
57
71
%define _mandir /usr/share/man
58
 
 
59
 
# directory locations for FHS-compatibility
 
72
%define sysconf_dir /opt/bacula
 
73
%define script_dir /opt/bacula/scripts
 
74
%define working_dir /opt/bacula/working
 
75
%define pid_dir /opt/bacula/working
 
76
%else
 
77
%define _sbindir %_prefix/sbin
 
78
%define _subsysdir /var/lock/subsys
 
79
%define sqlite_bindir %_libdir/bacula/sqlite
 
80
%define _mandir %_prefix/share/man
60
81
%define sysconf_dir /etc/bacula
61
82
%define script_dir %_libdir/bacula
62
83
%define working_dir /var/lib/bacula
63
84
%define pid_dir /var/run
 
85
%endif
64
86
 
65
87
# NOTE these defines are used in some rather complex useradd and groupadd
66
88
# commands. If you change them examine the post scripts for consequences.
249
271
# specifically disallow gconsole if desired
250
272
%{?nobuild_gconsole:%define gconsole 0}
251
273
 
 
274
# specifically disallow rescue files if desired
 
275
%define rescue 1
 
276
%{?nobuild_rescue:%define rescue 0}
 
277
 
252
278
# Should we build wxconsole, only wxWidgets >=2.6 is supported
253
279
# SuSE 10 and FC4 and newer
254
280
%define wxconsole 0
534
560
BuildRequires: freetype-devel
535
561
%endif
536
562
%if %{fc9}
537
 
BuildRequires: libtermcap-devel
538
563
BuildRequires: glibc-devel >= 2.8
539
564
BuildRequires: zlib-static
540
565
%endif
660
685
%endif
661
686
%if %{fc9}
662
687
Requires: glibc >= 2.8
663
 
Requires: libtermcap
664
688
%endif
665
689
 
666
690
%if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
824
848
%endif
825
849
%if %{fc9}
826
850
Requires: glibc >= 2.8
827
 
Requires: libtermcap
828
851
%endif
829
852
 
830
853
%if %{python}
1276
1299
Requires: zlib
1277
1300
%endif
1278
1301
 
1279
 
%if %{bat} && %{fc8}
 
1302
%if %{bat} && %{fc9}
1280
1303
Requires: openssl
1281
1304
Requires: glibc >= 2.8
1282
1305
Requires: fontconfig
1401
1424
export QTLIB=/usr/lib64/qt4/
1402
1425
%endif
1403
1426
 
 
1427
%if %{rescue}
1404
1428
%configure \
1405
 
        --prefix=/usr \
1406
 
        --sbindir=/usr/sbin \
 
1429
        --prefix=%{_prefix} \
 
1430
        --sbindir=%{_sbindir} \
1407
1431
        --sysconfdir=%{sysconf_dir} \
1408
1432
        --with-scriptdir=%{script_dir} \
1409
1433
        --with-working-dir=%{working_dir} \
1416
1440
        --enable-static-fd
1417
1441
 
1418
1442
make
 
1443
%endif
1419
1444
 
1420
1445
%configure \
1421
 
        --prefix=/usr \
1422
 
        --sbindir=/usr/sbin \
 
1446
        --prefix=%{_prefix} \
 
1447
        --sbindir=%{_sbindir} \
1423
1448
        --sysconfdir=%{sysconf_dir} \
1424
1449
        --with-scriptdir=%{script_dir} \
1425
1450
        --with-working-dir=%{working_dir} \
1457
1482
        --disable-batch-insert \
1458
1483
%endif
1459
1484
        --mandir=%{_mandir} \
1460
 
        --with-subsys-dir=/var/lock/subsys \
 
1485
        --with-subsys-dir=%{_subsysdir} \
1461
1486
        --with-dir-user=%{director_daemon_user} \
1462
1487
        --with-dir-group=%{daemon_group} \
1463
1488
        --with-sd-user=%{storage_daemon_user} \
1507
1532
%endif
1508
1533
 
1509
1534
make \
1510
 
        prefix=$RPM_BUILD_ROOT/usr \
1511
 
        sbindir=$RPM_BUILD_ROOT/usr/sbin \
 
1535
        prefix=$RPM_BUILD_ROOT%{_prefix} \
 
1536
        sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1512
1537
        sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1513
1538
        scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1514
1539
        working_dir=$RPM_BUILD_ROOT%{working_dir} \
1519
1544
%if ! %{client_only} && %{mtx}
1520
1545
cd %{depkgs}
1521
1546
make \
1522
 
        prefix=$RPM_BUILD_ROOT/usr \
1523
 
        sbindir=$RPM_BUILD_ROOT/usr/sbin \
 
1547
        prefix=$RPM_BUILD_ROOT%{_prefix} \
 
1548
        sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1524
1549
        sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1525
1550
        scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1526
1551
        working_dir=$RPM_BUILD_ROOT%{working_dir} \
1572
1597
rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1573
1598
%endif
1574
1599
 
1575
 
rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
 
1600
rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
1576
1601
 
1577
1602
# install the init scripts
1578
1603
%if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
1710
1735
%endif
1711
1736
 
1712
1737
# install the rescue files
 
1738
%if %{rescue}
1713
1739
mkdir $RPM_BUILD_ROOT%{script_dir}/rescue
1714
1740
mkdir $RPM_BUILD_ROOT%{script_dir}/rescue/freebsd
1715
1741
mkdir $RPM_BUILD_ROOT%{script_dir}/rescue/solaris
1725
1751
touch $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/rpm_release
1726
1752
cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1727
1753
rm -f src/filed/static-bacula-fd
 
1754
%endif
1728
1755
 
1729
1756
# install bat since make doesn't at the moment
1730
1757
%if %{bat}
1731
 
cp -p src/qt-console/bat $RPM_BUILD_ROOT/usr/sbin/bat
 
1758
cp -p src/qt-console/bat $RPM_BUILD_ROOT%{_sbindir}/bat
1732
1759
cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1733
1760
%endif
1734
1761
 
 
1762
# install docs for single dir installation
 
1763
%if %{single_dir}
 
1764
mkdir $RPM_BUILD_ROOT%{_prefix}/doc
 
1765
cp COPYING $RPM_BUILD_ROOT%{_prefix}/doc/
 
1766
cp ChangeLog $RPM_BUILD_ROOT%{_prefix}/doc/
 
1767
cp ReleaseNotes $RPM_BUILD_ROOT%{_prefix}/doc/
 
1768
cp VERIFYING $RPM_BUILD_ROOT%{_prefix}/doc/
 
1769
cp kernstodo $RPM_BUILD_ROOT%{_prefix}/doc/
 
1770
cp %{_docsrc}/manual/bacula.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
 
1771
cp %{_docsrc}/developers/developers.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
 
1772
cp -r %{_docsrc}/manual/bacula $RPM_BUILD_ROOT%{_prefix}/doc/
 
1773
cp ../Release_Notes-%{version}-%{release}.txt $RPM_BUILD_ROOT%{_prefix}/doc/
 
1774
%endif
 
1775
 
1735
1776
# now clean up permissions that are left broken by the install
1736
1777
chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1737
1778
%if %{gconsole} && ! %{rh8}
1738
 
chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
 
1779
chmod 755 $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor
1739
1780
chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1740
1781
%endif
1741
1782
 
1813
1854
%attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1814
1855
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1815
1856
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1816
 
%attr(-, root, %{daemon_group}) %{script_dir}/rescue
1817
1857
%attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1818
1858
%attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1819
1859
%attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1824
1864
%attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1825
1865
%attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1826
1866
 
1827
 
%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
1828
 
%doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1829
 
 
1830
1867
/etc/logrotate.d/bacula
1831
1868
/etc/log.d/scripts/services/bacula
1832
1869
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1839
1876
 
1840
1877
%attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1841
1878
 
1842
 
/usr/sbin/bacula-dir
1843
 
/usr/sbin/bacula-fd
1844
 
/usr/sbin/bacula-sd
1845
 
/usr/sbin/bcopy
1846
 
/usr/sbin/bextract
1847
 
/usr/sbin/bls
1848
 
/usr/sbin/bscan
1849
 
/usr/sbin/btape
1850
 
/usr/sbin/btraceback
1851
 
/usr/sbin/bconsole
1852
 
/usr/sbin/dbcheck
1853
 
/usr/sbin/bsmtp
1854
 
/usr/sbin/bregex
1855
 
/usr/sbin/bwild
 
1879
%{_sbindir}/bacula-dir
 
1880
%{_sbindir}/bacula-fd
 
1881
%{_sbindir}/bacula-sd
 
1882
%{_sbindir}/bcopy
 
1883
%{_sbindir}/bextract
 
1884
%{_sbindir}/bls
 
1885
%{_sbindir}/bscan
 
1886
%{_sbindir}/btape
 
1887
%{_sbindir}/btraceback
 
1888
%{_sbindir}/bconsole
 
1889
%{_sbindir}/dbcheck
 
1890
%{_sbindir}/bsmtp
 
1891
%{_sbindir}/bregex
 
1892
%{_sbindir}/bwild
1856
1893
%{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1857
1894
%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1858
1895
%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1868
1905
%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1869
1906
%endif
1870
1907
 
 
1908
%if ! %{client_only} && %{rescue}
 
1909
%attr(-, root, %{daemon_group}) %{script_dir}/rescue
 
1910
%endif
 
1911
 
 
1912
%if ! %{client_only} && ! %{single_dir}
 
1913
%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
 
1914
%doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
 
1915
%endif
 
1916
 
 
1917
%if ! %{client_only} && %{single_dir}
 
1918
%{_prefix}/doc
 
1919
%endif
 
1920
 
1871
1921
%if %{mysql}
1872
1922
%pre mysql
1873
1923
# test for bacula database older than version 9
2119
2169
%if ! %{client_only} && %{mtx}
2120
2170
%files mtx
2121
2171
%defattr(-,root,root)
2122
 
%attr(-, root, %{storage_daemon_group}) /usr/sbin/loaderinfo
2123
 
%attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
2124
 
%attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
2125
 
%attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
2126
 
%attr(-, root, %{storage_daemon_group}) /usr/sbin/nsmhack
2127
 
%attr(-, root, %{storage_daemon_group}) /usr/sbin/scsieject
 
2172
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/loaderinfo
 
2173
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/mtx
 
2174
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsitape
 
2175
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/tapeinfo
 
2176
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/nsmhack
 
2177
%attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsieject
2128
2178
%{_mandir}/man1/loaderinfo.1.%{manpage_ext}
2129
2179
%{_mandir}/man1/mtx.1.%{manpage_ext}
2130
2180
%{_mandir}/man1/scsitape.1.%{manpage_ext}
2135
2185
%files client
2136
2186
%defattr(-,root,root)
2137
2187
%attr(-, root, %{daemon_group}) %dir %{script_dir}
2138
 
%attr(-, root, %{daemon_group}) %{script_dir}/bconsole
2139
2188
%{script_dir}/bacula-ctl-fd
2140
2189
/etc/init.d/bacula-fd
 
2190
%if %{rescue}
2141
2191
%attr(-, root, %{daemon_group}) %{script_dir}/rescue
 
2192
%endif
2142
2193
 
 
2194
%if ! %{single_dir}
2143
2195
%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
2144
2196
%doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
 
2197
%else
 
2198
%{_prefix}/doc
 
2199
%endif
2145
2200
 
2146
2201
/etc/logrotate.d/bacula
2147
2202
 
2150
2205
 
2151
2206
%attr(-, root, %{daemon_group}) %dir %{working_dir}
2152
2207
 
2153
 
/usr/sbin/bacula-fd
2154
 
/usr/sbin/btraceback
 
2208
%{_sbindir}/bacula-fd
 
2209
%{_sbindir}/btraceback
2155
2210
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
2156
2211
%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
2157
 
/usr/sbin/bconsole
 
2212
%{_sbindir}/bconsole
2158
2213
%{_mandir}/man8/bacula-fd.8.%{manpage_ext}
2159
2214
%{_mandir}/man8/bacula.8.%{manpage_ext}
2160
2215
%{_mandir}/man8/bconsole.8.%{manpage_ext}
2232
2287
%if %{gconsole}
2233
2288
%files gconsole
2234
2289
%defattr(-,root,root)
2235
 
/usr/sbin/bgnome-console
 
2290
%{_sbindir}/bgnome-console
2236
2291
%attr(-, root, %{daemon_group}) %dir %{script_dir}
2237
2292
%attr(-, root, %{daemon_group}) %{script_dir}/gconsole
2238
2293
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
2242
2297
%endif
2243
2298
 
2244
2299
%if %{gconsole} && ! %{rh8}
2245
 
/usr/sbin/bacula-tray-monitor
 
2300
%{_sbindir}/bacula-tray-monitor
2246
2301
%config(noreplace) %{sysconf_dir}/tray-monitor.conf
2247
2302
/usr/share/pixmaps/bacula-tray-monitor.xpm
2248
2303
/usr/share/applications/bacula-tray-monitor.desktop
2286
2341
%if %{wxconsole}
2287
2342
%files wxconsole
2288
2343
%defattr(-,root,root)
2289
 
/usr/sbin/bwx-console
 
2344
%{_sbindir}/bwx-console
2290
2345
%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2291
2346
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
2292
2347
/usr/share/pixmaps/wxwin16x16.xpm
2331
2386
%if %{bat}
2332
2387
%files bat
2333
2388
%defattr(-,root,root)
2334
 
/usr/sbin/bat
 
2389
%{_sbindir}/bat
2335
2390
%attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2336
2391
%attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
2337
2392
/usr/share/pixmaps/bat_icon.png
2374
2429
%endif
2375
2430
 
2376
2431
%changelog
 
2432
* Sun Sep 07 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
 
2433
- adjust /opt/bacula install
 
2434
- add build switch to supress rescue package
 
2435
* Sun Aug 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
 
2436
- add support for install to /opt/bacula
 
2437
* Sun Aug 17 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
 
2438
- remove libtermcap dependancy for FC9
 
2439
* Mon Aug 04 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
 
2440
- fix bat dependencies
2377
2441
* Sat Jun 28 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2378
2442
- add su110 target
2379
2443
* Sat May 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>