#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
%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
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
%prep
%setup -q -a 1
%patch0 -p1
-%patch1 -p1
+%patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
%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}
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
%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
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}
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
done
%if %{with nagios}
+install -d $RPM_BUILD_ROOT%{nagiosplugindir}
%{__make} -C examples/nagios/check_bacula install \
sbindir=%{nagiosplugindir} \
DESTDIR=$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
%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
%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