%bcond_without dbi # use Database Independent Abstraction Layer (libdbi)
%bcond_without mysql # use MySQL
%bcond_without pgsql # use PostgreSQL
-%bcond_with python
-%bcond_with rescue
%bcond_without sqlite3 # use SQLite3
+%bcond_without python
+%bcond_with rescue
%bcond_with sqlite3_sync_off # makes SQLite3 backend much faster, but less reliable
#
%if %{without sqlite3}
Summary(pl.UTF-8): Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
Name: bacula
Version: 5.0.1
-Release: 1
+Release: 3
Epoch: 0
License: extended GPL v2
Group: Networking/Utilities
Patch6: %{name}-64bitbuild_fix.patch
Patch7: %{name}-dbi_fixes.patch
Patch8: %{name}-dbi_dbcheck.patch
+Patch9: %{name}-openssl1.patch
URL: http://www.bacula.org/
BuildRequires: acl-devel
BuildRequires: autoconf
BuildRequires: openssl-devel
BuildRequires: pkgconfig
%if %{with python}
-BuildRequires: python-static
+BuildRequires: python-devel
%endif
%if %{with bat}
BuildRequires: QtCore-devel
#%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
tar -xf %{SOURCE2} && ln -s bacula-rescue-* rescue
# install libraries for all the database backends
# ldconfig will add the soname symlinks when one of the packages is installed
for database in %{databases} ; do
- for libfile in libbacsql/$database%{_libdir}/lib*-*.so ; do
- orig_name=`basename $libfile`
- file_prefix="${orig_name%%-*.so}"
- file_suffix="${orig_name#*-}"
- file_name="$file_prefix-$database-$file_suffix"
- install "$libfile" "$RPM_BUILD_ROOT/%{_libdir}/$file_name"
- ln -sf "$file_name" "$RPM_BUILD_ROOT/%{_libdir}/$orig_name"
+ for libfile in libbacsql/$database%{_libdir}/lib*-*.so; do
+ orig_name=${libfile##*/}
+ 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
done
done
-install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
-install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
-install %{SOURCE12} $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
-install %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
-install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
-install %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
-install %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
+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
+cp -a %{SOURCE13} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-dir
+cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
+cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
+cp -a %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
%if %{with console_wx}
# tray-monitor is for regular users
%endif
%if %{with bat}
-install src/qt-console/.libs/bat $RPM_BUILD_ROOT%{_sbindir}
+install src/qt-console/.libs/bat $RPM_BUILD_ROOT%{_bindir}
install scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
%endif
%post console-wx
%update_configs
+%triggerpostun common -- %{name}-common < 5.0.1-2
+find /etc/bacula/bat.conf* -perm /007 -print0 | xargs -0 -r chmod 600 || :
+
%post console-qt4
%update_configs
%doc LICENSE
%{_pixmapsdir}/%{name}.png
%{_desktopdir}/bacula-wx.desktop
-%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bwx-console.conf
+%attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bwx-console.conf
%attr(755,root,root) %{_sbindir}/bwx-console
%{_mandir}/man1/bacula-bwxconsole.1*
%endif
%doc LICENSE
%{_pixmapsdir}/%{name}.png
%{_desktopdir}/bat.desktop
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bat.conf
-%attr(755,root,root) %{_sbindir}/bat
+# Do not make this file world-readable or any user will get full access to the
+# backup system
+%attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bat.conf
+%attr(755,root,root) %{_bindir}/bat
%{_mandir}/man1/bat.1*
%{_docdir}/%{name}
%endif