# - fix log file permissions
#
# Conditional build:
-%bcond_without console_wx # wx-console program
-%bcond_without gnome # gnome-console program
-%bcond_with sqlite # use sqlite
-%bcond_without bat # bat Qt4 GUI
-%bcond_without mysql # use mysql
-%bcond_with pgsql # use PostgreSQL
+%bcond_without console_wx # wx-console program
+%bcond_without gnome # gnome-console program
+%bcond_with sqlite # use SQLite
+%bcond_without bat # bat Qt4 GUI
+%bcond_without mysql # use MySQL
+%bcond_with pgsql # use PostgreSQL
%bcond_with python
%bcond_with rescue
-%bcond_with sqlite3 # use sqlite3 insted sqlite
-%bcond_with sqlite3_sync_off # makes sqlite3 backend much faster, but less reliable
+%bcond_with sqlite3 # use SQLite3 instead of SQLite 2
+%bcond_with sqlite3_sync_off # makes SQLite3 backend much faster, but less reliable
%if %{with sqlite}
-%define _database sqlite
+%define database sqlite
+%undefine with_mysql
+%undefine with_pgsql
%endif
%if %{with sqlite3}
-%define _database sqlite3
+%define database sqlite3
%undefine with_sqlite
%undefine with_mysql
%undefine with_pgsql
%endif
%if %{with pgsql}
-%define _database postgresql
+%define database postgresql
%undefine with_sqlite
%undefine with_sqlite3
%undefine with_mysql
%endif
%if %{with mysql}
-%define _database mysql
+%define database mysql
%undefine with_sqlite
%undefine with_sqlite3
%undefine with_pgsql
Summary: Bacula - The Network Backup Solution
Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
Name: bacula
-Version: 2.2.6
-Release: 2
+Version: 2.4.4
+Release: 3
Epoch: 0
License: extended GPL v2
Group: Networking/Utilities
Source0: http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
-# Source0-md5: fe964931ab3fc538a8884204d23e8a5a
+# Source0-md5: 4eb6155b45611018af03002d37a2ffde
Source1: http://dl.sourceforge.net/bacula/%{name}-docs-%{version}.tar.bz2
-# Source1-md5: a251dc0b5a2c8250b43e2ae372526de2
+# Source1-md5: d9bb3e8ca8c9a4c741b83569c21a4806
Source2: http://dl.sourceforge.net/bacula/%{name}-rescue-%{version}.tar.gz
-# Source2-md5: 51bc4b1e5d60593cb9f9aa80d31ad8e4
+# Source2-md5: 320f95575591d285c3192e58912322c4
Source10: %{name}-dir.init
Source11: %{name}-fd.init
Source12: %{name}-sd.init
Patch2: %{name}-mysql.patch
Patch3: %{name}-tinfo-readline.patch
Patch4: %{name}-branding.patch
+Patch5: %{name}-conf.patch
+Patch6: %{name}-nostatic.patch
URL: http://www.bacula.org/
BuildRequires: acl-static
BuildRequires: automake
BuildRequires: python-static
%endif
%if %{with bat}
-BuildRequires: qt4-build
-BuildRequires: qt4-qmake
-BuildRequires: qwt-devel >= 5.0.2-2
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
%endif
+%{?with_mysql:BuildRequires: mysql-devel}
+%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: readline-devel
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
-%{?with_sqlite3:BuildRequires: sqlite3-devel}
-%{?with_sqlite:BuildRequires: sqlite-devel}
-%{?with_mysql:BuildRequires: mysql-devel}
-%{?with_pgsql:BuildRequires: postgresql-devel}
+%{?with_sqlite:BuildRequires: sqlite-devel}
+%{?with_sqlite3:BuildRequires: sqlite3-devel}
%if %{with console_wx}
BuildRequires: wxGTK2-unicode-devel >= 2.4.0
%endif
up. The Catalog services permit the System Administrator or user to
quickly locate and restore any desired file, since it maintains a
record of all Volumes used, all Jobs run, and all Files saved. This
-build requires sqlite%{?with_sqlite3:3} to be installed separately as the catalog
+build requires %{database} to be installed separately as the catalog
database.
%description dir -l pl.UTF-8
katalogowe umożliwiają administratorowi lub użytkownikowi szybko
zlokalizować i odtworzyć dowolny plik, ponieważ utrzymują rekord ze
wszystkimi używanymi wolumenami, uruchomionymi zadaniami i zapisanymi
-plikami. Pakiet wymaga %{_database} zainstalowanego oddzielnie jako bazy
-danych dla katalogu.
+plikami. Pakiet wymaga %{database} zainstalowanego oddzielnie jako
+bazy danych dla katalogu.
%package console
Summary: Bacula Console
interfejs graficzny oparty na GNOME.
%package console-qt4
-Summary: Bacula QT4 Console
-Summary(pl.UTF-8): Konsola Baculi oparta na QT4
+Summary: Bacula Qt4 Console
+Summary(pl.UTF-8): Konsola Baculi oparta na Qt4
Group: Networking/Utilities
Requires(post): sed >= 4.0
Requires: %{name}-common = %{epoch}:%{version}-%{release}
computers.
Bacula Console is the program that allows the administrator or user to
-communicate with the Bacula Director. This is the QT4 GUI interface.
+communicate with the Bacula Director. This is the Qt4 GUI interface.
%description console-qt4 -l pl.UTF-8
Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
Bacula Console to program umożliwiający administratorowi lub
użytkownikowi komunikowanie się z programem Bacula Director. To jest
-interfejs graficzny oparty na QT4.
+interfejs graficzny oparty na Qt4.
%package tray-monitor
Summary: Bacula Tray Monitor
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1
tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
--with-pid-dir=/var/run \
--with-subsys-dir=/var/lock/subsys \
--enable-batch-insert \
- --with-%{_database} \
+ --with-%{database} \
%{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
--with-dir-password="#FAKE-dir-password#" \
--with-fd-password="#FAKE-fd-password#" \
%if %{with bat}
cd src/qt-console
-qt4-qmake bat.pro
+qmake-qt4 bat.pro
cd ../..
%endif
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}}
+install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install rescue/linux/floppy/sfdisk.bz2 $RPM_BUILD_ROOT%{_sysconfdir}/rescue
%endif
+touch $RPM_BUILD_ROOT/var/log/bacula/log
+
# install the updatedb scripts
install updatedb/update_sqlite* $RPM_BUILD_ROOT%{_libexecdir}/%{name}
# XXX: Most of this upgrade procedure is safe for sqlite only. Other databases would require knowledge
# about currently used version so we can't easily support these :(
-if %{with sqlite} || %{with sqlite3}
+%if %{with sqlite} || %{with sqlite3}
[ -s %{_localstatedir}/bacula.db ] && \
DB_VER=`echo "select * from Version;" | \
%{_bindir}/sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | tail -n 1 2>/dev/null`
echo "Backing up bacula tables"
echo ".dump" | sqlite%{?with_sqlite3:3} %{_localstatedir}/bacula.db | bzip2 > %{_localstatedir}/bacula_backup.sql.bz2
- db_type="%{_database}"
+ db_type="%{database}"
next_ver=$(($DB_VER + 1))
# support up to version 30; increase this if needed
%{_libexecdir}/%{name}/btraceback.dbx
%{_libexecdir}/%{name}/btraceback.gdb
%attr(770,root,bacula) %dir %{_localstatedir}
+%attr(750,bacula,logs) %dir /var/log/bacula
+%attr(640,bacula,logs) %ghost /var/log/bacula/log
%files dir
%defattr(644,root,root,755)
%doc ChangeLog CheckList ReleaseNotes kernstodo LICENSE
#%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
-%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
+%attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
%ghost %{_sysconfdir}/.pw.sed
%attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
%attr(754,root,root) /etc/rc.d/init.d/bacula-dir
%files sd
%defattr(644,root,root,755)
%doc LICENSE
-%dir %{_sysconfdir}
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-sd.conf
%attr(754,root,root) /etc/rc.d/init.d/bacula-sd
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-sd