%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: 0.1
+Version: 5.0.3
+Release: 5
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
Patch3: %{name}-branding.patch
Patch4: %{name}-conf.patch
Patch5: %{name}-desktop.patch
-Patch6: %{name}-64bitbuild_fix.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
BuildRequires: automake
BuildRequires: gettext-devel
+BuildRequires: gtk+2-devel
BuildRequires: libcap-devel
%{?with_dbi:BuildRequires: libdbi-devel >= 0.8.4}
-BuildRequires: libtool
+BuildRequires: libtool >= 2:2.2
%if %{with rescue}
BuildRequires: fakeroot
%endif
BuildRequires: libwrap-devel
-BuildRequires: mtx
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
%if %{with python}
BuildRequires: python-devel
+BuildRequires: python-modules
%endif
%if %{with bat}
BuildRequires: QtCore-devel
BuildRequires: QtGui-devel
BuildRequires: qt4-build >= 4.3.3-3
BuildRequires: qt4-qmake >= 4.3.3-3
-BuildRequires: qwt-devel >= 5.0.2-2
+#BuildRequires: qwt-devel >= 5.0.2-2
%endif
%{?with_mysql:BuildRequires: mysql-devel}
%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: readline-devel
+BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
%{?with_sqlite3:BuildRequires: sqlite3-devel}
+BuildRequires: which
%if %{with console_wx}
BuildRequires: wxGTK2-unicode-devel >= 2.4.0
%endif
%prep
%setup -q -a 1
%patch0 -p1
-%patch1 -p1
-#%patch2 -p1 CHECKME
+%patch1 -p0
+%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
-#%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
# to make sure it is full-featured
for database in %{databases}; do
WXCONFIG=%{_bindir}/wx-gtk2-unicode-config \
+ QMAKE=%{_bindir}/qt4-qmake \
%configure \
--with-scriptdir=%{_libexecdir}/%{name} \
%{?with_bat:--enable-bat} \
%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}/btraceback.mdb
# rename to avoid possible conflicts
mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
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
%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