]> git.pld-linux.org Git - packages/bacula.git/blobdiff - bacula.spec
- nagios plugin is ELF binary
[packages/bacula.git] / bacula.spec
index a6652e9be138ccdbe4dd6cbae29d8c7d2e03a9fa..0512077d2723cbe3ea2c29f77df6f0dc3b77af8f 100644 (file)
@@ -15,7 +15,7 @@
 %bcond_without pgsql                   # use PostgreSQL
 %bcond_without sqlite3                 # use SQLite3
 %bcond_without python
-%bcond_with    nagios          # build nagios plugin
+%bcond_without nagios          # build nagios plugin
 %bcond_with    rescue
 %bcond_with    sqlite3_sync_off        # makes SQLite3 backend much faster, but less reliable
 
@@ -27,7 +27,7 @@ Summary:      Bacula - The Network Backup Solution
 Summary(pl.UTF-8):     Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
 Name:          bacula
 Version:       5.0.3
-Release:       1
+Release:       6
 License:       extended GPL v2
 Group:         Networking/Utilities
 Source0:       http://downloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
@@ -52,6 +52,7 @@ Patch5:               %{name}-desktop.patch
 Patch7:                %{name}-dbi_fixes.patch
 Patch8:                %{name}-dbi_dbcheck.patch
 Patch9:                %{name}-openssl1.patch
+Patch10:       %{name}-dvd_rewind.patch
 URL:           http://www.bacula.org/
 BuildRequires: acl-devel
 BuildRequires: autoconf
@@ -93,9 +94,9 @@ BuildRequires:        wxGTK2-unicode-devel >= 2.4.0
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/%{name}
+%define                _sysconfdir             /etc/%{name}
 %define                _localstatedir  /var/lib/%{name}
-%define                nagiosplugindir %{_prefix}/lib/nagios/plugins
+%define                nagiosplugindir %{_libdir}/nagios/plugins
 
 # from 'the worst' to 'the best'
 %define        databases %{?with_dbi:dbi} %{?with_sqlite3:sqlite3} %{?with_mysql:mysql} %{?with_pgsql:postgresql}
@@ -459,13 +460,14 @@ Nagios plugin to check bacula.
 %setup -q -a 1
 %patch0 -p1
 %patch1 -p0
-#%patch2 -p1
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
 
@@ -554,7 +556,6 @@ fakeroot %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rescue
 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula}
@@ -570,11 +571,15 @@ for database in %{databases}; do
                file_prefix=${orig_name%%-*.so}
                file_suffix=${orig_name#*-}
                file_name=$file_prefix-$database-$file_suffix
-               install -p $libfile $RPM_BUILD_ROOT/%{_libdir}/$file_name
-               touch $RPM_BUILD_ROOT/%{_libdir}/$orig_name
+               install -p $libfile $RPM_BUILD_ROOT%{_libdir}/$file_name
+               touch $RPM_BUILD_ROOT%{_libdir}/$orig_name
        done
 done
 
+# replace with empty file, replaced by ldconfig from each db-* package on intsall
+rm -f $RPM_BUILD_ROOT%{_libdir}/libbacsql-%{version}.so
+touch $RPM_BUILD_ROOT%{_libdir}/libbacsql-%{version}.so
+
 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
 install -p %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
@@ -596,9 +601,7 @@ sed -e 's/gnome-console/wx-console/g;s/Console/Wx Console/g' \
 %endif
 
 %if %{with bat}
-# TODO: libtool install
-#libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir}
-install src/qt-console/.libs/bat $RPM_BUILD_ROOT%{_bindir}
+mv $RPM_BUILD_ROOT{%{_sbindir},%{_bindir}}/bat
 cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
 %endif
 
@@ -612,8 +615,9 @@ install -p rescue/linux/floppy/getdiskinfo $RPM_BUILD_ROOT%{_sysconfdir}/rescue
 
 touch $RPM_BUILD_ROOT/var/log/bacula/log
 
-# install the updatedb scripts
-install -p updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+# install the updatedb scripts for older versions that last full release
+# 2.0 -> 3.0 : 10_to_11
+install -p updatedb/update_*_tables_10_to_11 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
 
 # place for site passwords
 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
@@ -641,7 +645,7 @@ rm $RPM_BUILD_ROOT%{_sbindir}/bacula
 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/bacula-ctl-*
 
 # unsupported
-#rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/*_bdb_*
+rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/btraceback.mdb
 
 # rename to avoid possible conflicts
 mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
@@ -654,12 +658,14 @@ rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,py,sql}.{so,la}
 for f in create_bacula_database drop_bacula_database drop_bacula_tables \
        grant_bacula_privileges make_bacula_tables update_bacula_tables ; do
 
-       ln -sf /dev/null $RPM_BUILD_ROOT%{_libexecdir}/%{name}/$f
+       touch $RPM_BUILD_ROOT%{_libexecdir}/%{name}/$f
 done
 
 %if %{with nagios}
+install -d $RPM_BUILD_ROOT%{nagiosplugindir}
 %{__make} -C examples/nagios/check_bacula install \
        sbindir=%{nagiosplugindir} \
+       INSTALL_PROGRAM="libtool --mode=install install -p" \
        DESTDIR=$RPM_BUILD_ROOT
 %endif
 
@@ -670,20 +676,19 @@ rm -rf $RPM_BUILD_ROOT
 %groupadd -P %{name}-common -g 136 -r -f bacula
 %useradd -P %{name}-common -u 136 -r -d /var/lib/bacula -s /bin/false -c "Bacula User" -g bacula bacula
 
-
 %define update_configs \
-echo "Updating bacula passwords and names..." | %banner \
+echo "Updating bacula passwords and names..." | %banner -a %{name} \
 cd /etc/bacula \
-for f in *-password ; do \
-       if [ ! -s $f ] ; then \
+for f in *-password; do \
+       if [ ! -s $f ]; then \
                openssl rand -base64 33 > $f \
        fi \
-       p=`cat $f` \
-       for cf in *.conf *.conf.rpmnew ; do \
+       p=$(cat $f) \
+       for cf in *.conf *.conf.rpmnew; do \
                [ -f $cf ] && sed -i -e"s:#FAKE-$f#:$p:" "$cf" || : \
        done \
 done \
-for cf in *.conf *.conf.rpmnew ; do \
+for cf in *.conf *.conf.rpmnew; do \
        [ -f $cf ] && sed -i -e"s:--hostname--:`hostname`:" "$cf" || : \
 done
 
@@ -910,7 +915,6 @@ fi
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
-%attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
 %attr(755,root,root) %{_libdir}/libbacsql-sqlite3-5*.so
 
 %ghost %attr(755,root,root) %{_libdir}/libbacsql-5*.so
@@ -941,7 +945,6 @@ fi
 %attr(755,root,root) %{_libexecdir}/%{name}/grant_sqlite3_privileges
 %attr(755,root,root) %{_libexecdir}/%{name}/make_sqlite3_tables
 %attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite3_*
-%attr(755,root,root) %{_libexecdir}/%{name}/update_sqlite_*
 %attr(755,root,root) %{_libdir}/libbacsql-dbi-5*.so
 
 %ghost %attr(755,root,root) %{_libdir}/libbacsql-5*.so
This page took 0.066457 seconds and 4 git commands to generate.