[bacula] - Fixed alternatives for dbcheck (#650224) - Moved director log file to /var/log/bacula/ - Changed p

Jan Görig jgorig at fedoraproject.org
Tue Nov 23 16:45:51 UTC 2010


commit 38c1d437b6cabb3d240b1caedd6876bc8840d58f
Author: Jan Görig <jgorig at redhat.com>
Date:   Tue Nov 23 17:42:06 2010 +0100

    - Fixed alternatives for dbcheck (#650224)
    - Moved director log file to /var/log/bacula/
    - Changed permission of bacula-dir.conf (RHEL #651786)
    - SQLite database is created as bacula user

 bacula-5.0.3-log-path.patch         |   13 +++++++++++++
 bacula-5.0.3-sqlite-priv.patch      |    9 +++++++++
 bacula-director-configuration.patch |    5 -----
 bacula.logrotate                    |    2 +-
 bacula.spec                         |   24 +++++++++++++++++-------
 5 files changed, 40 insertions(+), 13 deletions(-)
---
diff --git a/bacula-5.0.3-log-path.patch b/bacula-5.0.3-log-path.patch
new file mode 100644
index 0000000..6cf1f30
--- /dev/null
+++ b/bacula-5.0.3-log-path.patch
@@ -0,0 +1,13 @@
+diff --git a/bacula-5.0.3/src/dird/bacula-dir.conf.in b/bacula-5.0.3/src/dird/bacula-dir.conf.in
+index 922be44..54cca3f 100644
+--- a/bacula-5.0.3/src/dird/bacula-dir.conf.in
++++ b/bacula-5.0.3/src/dird/bacula-dir.conf.in
+@@ -273,7 +273,7 @@ Messages {
+   mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
+   mail = @job_email@ = all, !skipped            
+   console = all, !skipped, !saved
+-  append = "@working_dir@/log" = all, !skipped
++  append = "/var/log/bacula/bacula.log" = all, !skipped
+ }
+ 
+ # Default pool definition
diff --git a/bacula-5.0.3-sqlite-priv.patch b/bacula-5.0.3-sqlite-priv.patch
new file mode 100644
index 0000000..8f8ede4
--- /dev/null
+++ b/bacula-5.0.3-sqlite-priv.patch
@@ -0,0 +1,9 @@
+diff -up src/cats/make_sqlite3_tables.in~ src/cats/make_sqlite3_tables.in
+--- src/cats/make_sqlite3_tables.in~   2010-11-16 17:57:12.705837000 +0100
++++ src/cats/make_sqlite3_tables.in    2010-11-16 17:57:12.715837000 +0100
+@@ -426,4 +426,5 @@ PRAGMA synchronous = NORMAL;
+ END-OF-DATA
+ 
+ chmod 640 ${db_name}.db
++chown bacula:bacula ${db_name}.db
+ exit 0
diff --git a/bacula.logrotate b/bacula.logrotate
index ec2ab65..5f425af 100644
--- a/bacula.logrotate
+++ b/bacula.logrotate
@@ -1,6 +1,6 @@
 # Bacula logrotate script
 
-/var/log/bacula/*.log /var/spool/bacula/log /var/log/bacula.log {
+/var/log/bacula/*.log /var/spool/bacula/log /var/log/bacula/bacula.log {
     monthly
     rotate 4
     notifempty
diff --git a/bacula.spec b/bacula.spec
index f1a3c8f..abffd0f 100644
--- a/bacula.spec
+++ b/bacula.spec
@@ -8,7 +8,7 @@
 Summary: Cross platform network backup for Linux, Unix, Mac and Windows
 Name: bacula
 Version: 5.0.3
-Release: 4%{?dist}
+Release: 5%{?dist}
 # See LICENSE for details
 License: GPLv2 with exceptions
 Group: System Environment/Daemons
@@ -30,7 +30,7 @@ Source14: bacula-wxconsole.console_apps
 Source15: bacula-fd.sysconfig
 Source16: bacula-dir.sysconfig
 Source17: bacula-sd.sysconfig
-Patch0: bacula-director-configuration.patch
+#Patch0: bacula-director-configuration.patch
 Patch1: bacula-config.patch
 #Patch2: bacula-wxconsole.patch
 Patch3: bacula-pamd.patch
@@ -49,6 +49,8 @@ Patch15: bacula-5.0.2-openssl.patch
 Patch16: bacula-5.0.2-config.patch
 Patch17: bacula-5.0.2-python27.patch
 Patch18: bacula-5.0.3-dsolink.patch
+Patch19: bacula-5.0.3-log-path.patch
+Patch20: bacula-5.0.3-sqlite-priv.patch
 
 URL: http://www.bacula.org
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -346,7 +348,7 @@ This package contains the documentation for most of the bacula-packages.
 
 # Patching and other source preparation
 pushd bacula-%{version}
-%patch0 -p1
+#%patch0 -p1
 %patch1 -p1
 #%patch2 -p1
 %patch3 -p1
@@ -364,6 +366,8 @@ pushd bacula-%{version}
 %patch16 -p2 -b .config
 %patch17 -p0 -b .python27
 %patch18 -p2
+%patch19 -p2 -b .log-path
+%patch20 -p0 -b .priv
 
 # Remove execution permissions from files we're packaging as docs later on
 find examples -type f | xargs chmod -x
@@ -712,17 +716,17 @@ fi
 
 %post storage-mysql
 /usr/sbin/alternatives --install /usr/sbin/bcopy bacula-sd /usr/sbin/bcopy.mysql 50 \
-	--slave /usr/sbin/dbcheck bacula-bscan /usr/sbin/bscan.mysql 
+	--slave /usr/sbin/dbcheck bacula-dbcheck /usr/sbin/dbcheck.mysql 
 
 
 %post storage-sqlite
 /usr/sbin/alternatives --install /usr/sbin/bcopy bacula-sd /usr/sbin/bcopy.sqlite 40 \
-	--slave /usr/sbin/dbcheck bacula-bscan /usr/sbin/bscan.sqlite
+	--slave /usr/sbin/dbcheck bacula-dbcheck /usr/sbin/dbcheck.sqlite
 
 
 %post storage-postgresql
 /usr/sbin/alternatives --install /usr/sbin/bcopy bacula-sd /usr/sbin/bcopy.postgresql 60 \
-	--slave /usr/sbin/dbcheck bacula-bscan /usr/sbin/bscan.postgresql
+	--slave /usr/sbin/dbcheck bacula-dbcheck /usr/sbin/dbcheck.postgresql
 
 
 %preun storage-mysql
@@ -870,7 +874,7 @@ fi
 %files director-common
 %defattr(-,root,root,-)
 %doc bacula-%{version}/updatedb/
-%config(noreplace) %{_sysconfdir}/bacula/bacula-dir.conf
+%attr(640,root,bacula) %config(noreplace) %{_sysconfdir}/bacula/bacula-dir.conf
 %config(noreplace) %{_sysconfdir}/bacula/query.sql
 %config %{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
 %config %{_sysconfdir}/logwatch/conf/services/bacula.conf
@@ -1018,6 +1022,12 @@ fi
 
 
 %changelog
+* Tue Nov 23 2010 Jan Görig <jgorig at redhat.com> - 5.0.3-5
+- Fixed alternatives for dbcheck (#650224)
+- Moved director log file to /var/log/bacula/
+- Changed permission of bacula-dir.conf (RHEL #651786)
+- SQLite database is created as bacula user
+
 * Tue Oct 19 2010 Jan Görig <jgorig at redhat.com> - 5.0.3-4
 - Fixed initscripts and changed default group of bacula-sd (#629697)
 - Better warning for non-configured password (#556669)


More information about the scm-commits mailing list