Update the RPM support files.
authorDavid E. Wheeler <david@justatheory.com>
Wed, 24 Oct 2012 23:54:46 +0000 (16:54 -0700)
committerDavid E. Wheeler <david@justatheory.com>
Wed, 24 Oct 2012 23:54:46 +0000 (16:54 -0700)
Includes a patch that puts all the log files into /var/log/bucardo by default.

.gitignore
dist/bucardo-logfiles.patch [new file with mode: 0644]
dist/bucardo.init
dist/bucardo.spec

index 3a1d903f78b0ed023366a045d96d53e829f971cc..bceea330a43ef3e4ad9ceda568427a53afb2cd51 100644 (file)
@@ -15,7 +15,7 @@ MYMETA.*
 
 ## Git stuff
 *.blame
-*.patch
+/*.patch
 *.diff
 *.orig
 *.rej
diff --git a/dist/bucardo-logfiles.patch b/dist/bucardo-logfiles.patch
new file mode 100644 (file)
index 0000000..f126e60
--- /dev/null
@@ -0,0 +1,23 @@
+--- bucardo.schema.orig        2012-10-24 15:56:27.588314685 -0700
++++ bucardo.schema     2012-10-24 15:55:52.119313660 -0700
+@@ -135,9 +135,9 @@
+ log_showlevel|0|Show log level in the log output?
+ log_showline|0|Show line number in the log output?
+ log_showtime|3|Show timestamp in the log output?  0=off  1=seconds since epoch  2=scalar gmtime  3=scalar localtime
+-log_conflict_file|bucardo_conflict.log|Name of the conflict detail log file
++log_conflict_file|/var/log/bucardo/bucardo_conflict.log|Name of the conflict detail log file
+ log_level|NORMAL|How verbose to make the logging. Higher is more verbose.
+-warning_file|bucardo.warning.log|File containing all log lines starting with "Warning"
++warning_file|/var/log/bucardo/bucardo.warning.log|File containing all log lines starting with "Warning"
+ \.
+ -- Versioning
+@@ -161,7 +161,7 @@
+ flatfile_dir|.|Directory to store the flatfile output inside of
+ host_safety_check||Regex to make sure we don't accidentally run where we should not
+ piddir|/var/run/bucardo|Directory holding Bucardo PID files
+-reason_file|bucardo.restart.reason.log|File to hold reasons for stopping and starting
++reason_file|/var/log/bucardo/bucardo.restart.reason.log|File to hold reasons for stopping and starting
+ semaphore_table|bucardo_status|Table to let apps know a sync is ongoing
+ statement_chunk_size|10000|How many primary keys to shove into a single statement
+ stats_script_url|http://www.bucardo.org/|Location of the stats script
index 9c7e02e6ab495a66b54c869f88d5e0d37bcb0749..019f3788027376526bbb9fa9933853a9d6b1ff2a 100755 (executable)
@@ -30,7 +30,7 @@ SYSUSER=${SYSUSER-postgres}
 DBNAME=${DBNAME-bucardo}
 DBUSER=${DBUSER-bucardo}
 LOGDIR=${LOGDIR-/var/log/${NAME}}
-PIDDIR=${LOGDIR-/var/run/${NAME}}
+PIDDIR=${PIDDIR-/var/run/${NAME}}
 
 # Override defaults from /etc/sysconfig/bucardo, if file is present:
 [ -f /etc/sysconfig/${NAME} ] && . /etc/sysconfig/${NAME}
@@ -41,8 +41,6 @@ if [ -z "$DBPORT" ]; then portopt=""; else portopt="--dbport $DBPORT"; fi
 bucardo_flags="--quiet ${hostopt} ${portopt} --dbname ${DBNAME} --dbuser ${DBUSER} --debugdir ${LOGDIR} --piddir ${PIDDIR}"
 RETVAL=0
 
-cd $LOGDIR
-
 start() {
      # Make sure that bucardo is not already running:
      if [ -f "${PIDDIR}/bucardo.mc.pid" ]; then
index 78cea350faa9fe20034e5a5adae724219dd24617..3f61a3ac663cea6f6bda7302e6396e37f7e9c612 100644 (file)
@@ -2,7 +2,7 @@
 %define         sysuser postgres
 Name:           bucardo
 Version:        4.99.5
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Postgres replication system for both multi-master and multi-slave operations
 
 Group:          Applications/Databases
@@ -13,6 +13,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Source1: master-master-replication-example.txt
 Source2: bucardo.init
+Patch0:  bucardo-logfiles.patch
 
 BuildArch:     noarch
 
@@ -55,6 +56,7 @@ chown -R %{sysuser}:%{sysuser} /var/log/bucardo
 
 %prep
 %setup -q -n %{realname}-%{version}
+%patch0 -p0
 
 %build
 
@@ -99,6 +101,10 @@ rm -rf %{buildroot}
 %{_initrddir}/%{name}
 
 %changelog
+* Wed Oct 24 2012 David E. Wheeler <david@justatheory.com> - 4.99.5-3
+- Fixed the init script so that the `stop` command actually works.
+- Added a patch to point all of the log files to the log directory.
+
 * Tue Oct 2 2012 David E. Wheeler <david@justatheory.com> - 4.99.5-2
 - Require postgres.
 - Add start script running as postgres.