]> git.pld-linux.org Git - packages/bacula.git/blobdiff - bacula.spec
- fix duplicate bat install
[packages/bacula.git] / bacula.spec
index 2f21bcfab53756e1b545809196290b6487e53624..93f99e26aa6049ad3459394d98da8d559e8957e5 100644 (file)
@@ -6,6 +6,8 @@
 #make[1]: *** No rule to make target `../lib/libbac.la', needed by `bacula-dir'.  Stop.
 #make[1]: *** Waiting for unfinished jobs....
 #make[1]: Leaving directory `/home/users/glen/rpm/BUILD.x86_64-linux/bacula-5.0.2/src/dird'
+#warning: Installed (but unpackaged) file(s) found:
+#   /usr/lib64/bacula/btraceback.mdb
 #
 # Conditional build:
 %bcond_without console_wx              # wx-console program
@@ -15,7 +17,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
 
 Summary:       Bacula - The Network Backup Solution
 Summary(pl.UTF-8):     Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
 Name:          bacula
-Version:       5.0.2
-Release:       2
+Version:       5.0.3
+Release:       4
 License:       extended GPL v2
 Group:         Networking/Utilities
 Source0:       http://downloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
-# Source0-md5: e9204d2e772f12662de28da3327853de
+# Source0-md5: 9de254ae39cab0587fdb2f5d8d90b03b
 Source1:       http://downloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.bz2
-# Source1-md5: 7a6afbf592dde4fae0240d82ed3cb10d
-Source2:       http://downloads.sourceforge.net/bacula/%{name}-rescue-5.0.0.tar.gz
-# Source2-md5: 349623581cfe0bcd798dd137abac959a
+# Source1-md5: 7a00557dcf0dfa40de9e74176fefd1ae
+Source2:       http://downloads.sourceforge.net/bacula/%{name}-rescue-5.0.1.tar.gz
+# Source2-md5: bb194aed8e204f54bf2f61d7e721f257
 Source10:      %{name}-dir.init
 Source11:      %{name}-fd.init
 Source12:      %{name}-sd.init
@@ -52,6 +54,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
@@ -458,7 +461,7 @@ Nagios plugin to check bacula.
 %prep
 %setup -q -a 1
 %patch0 -p1
-%patch1 -p1
+%patch1 -p0
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
@@ -466,6 +469,7 @@ Nagios plugin to check bacula.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
 
 tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
 
@@ -554,7 +558,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 +573,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 +603,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 +617,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 +647,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}/*_bdb_*
 
 # rename to avoid possible conflicts
 mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
@@ -658,6 +664,7 @@ for f in create_bacula_database drop_bacula_database drop_bacula_tables \
 done
 
 %if %{with nagios}
+install -d $RPM_BUILD_ROOT%{nagiosplugindir}
 %{__make} -C examples/nagios/check_bacula install \
        sbindir=%{nagiosplugindir} \
        DESTDIR=$RPM_BUILD_ROOT
@@ -670,20 +677,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 +916,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 +946,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.097996 seconds and 4 git commands to generate.