--- slony1-1.2.15.orig/debian/slony1-doc.docs
+++ slony1-1.2.15/debian/slony1-doc.docs
@@ -0,0 +1,8 @@
+README
+README.Unicode
+RELEASE
+UPGRADING
+doc/adminguide/
+doc/concept/*.ps
+doc/howto/
+doc/implementation/*.pdf
--- slony1-1.2.15.orig/debian/changelog
+++ slony1-1.2.15/debian/changelog
@@ -0,0 +1,204 @@
+slony1 (1.2.15-1~bpo40+2) etch-backports; urgency=low
+
+  * Add version to quilt Build-Dependency to make backports buildds pull the
+    version from the backports pool.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Tue, 18 Nov 2008 13:13:21 +0100
+
+slony1 (1.2.15-1~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+  * Removed version from Build-Depends on docbook2x which isn't satisfied in
+    etch, and the problem with the versioned dependency is a minor one.
+  * Switch ghostscript Build-Depends back to gs-gpl.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Thu, 13 Nov 2008 20:48:56 +0100
+
+slony1 (1.2.15-1) unstable; urgency=low
+
+  * New upstream release
+  * Replaced build dependency gs-gpl by ghostscript again
+  * Updated standards version
+  * Changed to debhelper level 7
+  * Added libdbd-pg-perl to Recommends (closes: #499548)
+
+ -- Peter Eisentraut <petere@debian.org>  Sat, 01 Nov 2008 14:28:08 +0200
+
+slony1 (1.2.14-1) unstable; urgency=low
+
+  * New upstream release
+    - Obsoletes slonik-share-path.patch
+  * Replaced build dependency ghostscript by gs-gpl, while ghostscript is
+    broken
+  * Fixed/updated doc-base section
+  * Added a few more scripts from the tools directory
+
+ -- Peter Eisentraut <petere@debian.org>  Tue, 20 May 2008 03:42:05 +0200
+
+slony1 (1.2.13-1) unstable; urgency=low
+
+  * New upstream release
+    - Obsolete patches: bindir.patch
+  * Built against PostgreSQL 8.3 (closes: #462503, #464374)
+  * Updated standards version
+  * Replaced build dependency gs-gpl by ghostscript (closes: #456900)
+
+ -- Peter Eisentraut <petere@debian.org>  Thu, 14 Feb 2008 01:42:56 +0100
+
+slony1 (1.2.12-1) unstable; urgency=low
+
+  * New upstream release
+    - Fixes execute script functionality (closes: #446992)
+  * Added Homepage control field
+  * Added openntpd and chrony as alternatives for ntp (closes: #448799)
+
+ -- Peter Eisentraut <petere@debian.org>  Tue, 13 Nov 2007 17:23:55 +0100
+
+slony1 (1.2.11-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Peter Eisentraut <petere@debian.org>  Wed, 05 Sep 2007 11:01:55 +0200
+
+slony1 (1.2.10-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Peter Eisentraut <petere@debian.org>  Mon, 02 Jul 2007 12:59:24 +0200
+
+slony1 (1.2.9-3) unstable; urgency=low
+
+  * Build-depend on docbook2x >= 0.8.8-4 so that the man pages are built
+    correctly
+  * Added docbook-xml as build dependency
+
+ -- Peter Eisentraut <petere@debian.org>  Fri, 04 May 2007 16:59:59 +0200
+
+slony1 (1.2.9-2) unstable; urgency=low
+
+  * Added slony1_extract_schema.sh script to examples (closes: #403889)
+  * Built against PostgreSQL 8.2 (closes: #419308, #419586, #419965)
+
+ -- Peter Eisentraut <petere@debian.org>  Fri, 20 Apr 2007 10:33:31 +0200
+
+slony1 (1.2.9-1) unstable; urgency=low
+
+  * New upstream release
+  * Updated watch file
+
+ -- Peter Eisentraut <petere@debian.org>  Tue, 27 Mar 2007 18:09:07 +0200
+
+slony1 (1.2.8-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Peter Eisentraut <petere@debian.org>  Mon, 19 Mar 2007 10:23:27 +0100
+
+slony1 (1.2.7-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Peter Eisentraut <petere@debian.org>  Mon, 12 Mar 2007 11:32:51 +0100
+
+slony1 (1.2.6-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Peter Eisentraut <petere@debian.org>  Wed, 17 Jan 2007 10:09:15 +0100
+
+slony1 (1.2.5-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Peter Eisentraut <petere@debian.org>  Mon,  8 Jan 2007 12:43:37 +0100
+
+slony1 (1.2.2-1) unstable; urgency=low
+
+  * New upstream release
+    - Updated 07_sample.patch, 10_perltools-start.patch
+    - Obsoleted patches: make-clean.patch
+  * Fixed slony_show_configuration
+
+ -- Peter Eisentraut <petere@debian.org>  Wed, 20 Dec 2006 10:51:28 +0100
+
+slony1 (1.2.1-1) unstable; urgency=low
+
+  * New upstream release
+    - Updated no-client-log.patch
+    - Obsoleted patches: hardcoded-paths.patch
+  * Updated watch file
+  * Reenabled Perl tools
+  * Added missing final newline to slon.conf-sample
+  * Updated test script
+
+ -- Peter Eisentraut <petere@debian.org>  Fri, 17 Nov 2006 17:19:48 +0100
+
+slony1 (1.2.0-1) unstable; urgency=low
+
+  * New upstream release
+    - Updated 05_includedir-order.patch
+    - Obsoleted patches: 01_configure.patch, 06_mansect.patch
+  * Don't build broken Slony-I-concept.pdf
+  * Specify pgpkglibdir manually, drop build dependency on postgresql
+    server package
+  * Use --with-perlsharedir option
+  * Removed creation of spurious directories under /var/log/slony1
+  * Disabled Perl tools because of massive security problems
+
+ -- Peter Eisentraut <petere@debian.org>  Thu, 19 Oct 2006 15:39:11 +0200
+
+slony1 (1.1.5-4) unstable; urgency=low
+
+  * Added Perl tools
+  * Added $local_fs to LSB init script headers
+
+ -- Peter Eisentraut <petere@debian.org>  Wed, 18 Oct 2006 11:43:35 +0200
+
+slony1 (1.1.5-3) unstable; urgency=medium
+
+  * Changed recommendation of ntp-server to ntp (closes: #380371)
+  * Fixed init script LSB dependency information
+
+ -- Peter Eisentraut <petere@debian.org>  Fri, 15 Sep 2006 14:25:26 +0200
+
+slony1 (1.1.5-2) unstable; urgency=medium
+
+  * Added -c to su invocation in init script to cope with new su behavior
+    (closes: #367700)
+  * Updated standards version
+  * Put the slonik command man pages in the right directory
+
+ -- Peter Eisentraut <petere@debian.org>  Wed, 24 May 2006 14:22:10 +0200
+
+slony1 (1.1.5-1) unstable; urgency=low
+
+  * New upstream release
+  * Built against PostgreSQL 8.1
+  * Fixed man page build
+  * Fixed include directories (closes: #359959)
+
+ -- Peter Eisentraut <petere@debian.org>  Tue,  4 Apr 2006 12:31:11 +0200
+
+slony1 (1.1.2-3) experimental; urgency=low
+
+  * Added build dependency on postgresql-8.0
+
+ -- Peter Eisentraut <petere@debian.org>  Sun, 15 Jan 2006 23:19:28 +0100
+
+slony1 (1.1.2-2) experimental; urgency=low
+
+  * Changed to quilt for patches
+  * Fixed include directory order to handle mixed-version
+    libpq-dev/postgresql-server-dev installations that can happen on
+    Debian
+  * Changed to debhelper level 5
+  * Create /var/run/slony1 in the init script rather than in the package
+
+ -- Peter Eisentraut <petere@debian.org>  Sat, 14 Jan 2006 18:13:08 +0100
+
+slony1 (1.1.2-1) experimental; urgency=low
+
+  * Initial release (closes: #278810)
+  * orig.tar.gz was rebuilt without broken upstream debian directory
+
+ -- Peter Eisentraut <petere@debian.org>  Fri, 25 Nov 2005 00:28:38 +0100
--- slony1-1.2.15.orig/debian/control
+++ slony1-1.2.15/debian/control
@@ -0,0 +1,52 @@
+Source: slony1
+Section: misc
+Priority: optional
+Maintainer: Peter Eisentraut <petere@debian.org>
+Uploaders: Gerfried Fuchs <rhonda@debian.at>
+Build-Depends: bison, cdbs, debhelper (>= 7), docbook (>= 4.2), docbook-xml (>= 4.2), docbook2x, docbook-dsssl, flex, gs-gpl, groff, libjpeg-progs, libpq-dev, netpbm, openjade, opensp, postgresql-server-dev-8.3, quilt (>= 0.46-5)
+Standards-Version: 3.8.0
+Homepage: http://slony.info/
+
+Package: slony1-bin
+Section: misc
+Architecture: any
+Depends: postgresql-common, ${perl:Depends}, ${shlibs:Depends}
+Recommends: postgresql-8.3-slony1, libdbd-pg-perl, ntp | openntpd | chrony
+Suggests: slony1-doc
+Description: replication system for PostgreSQL
+ Slony-I is an asynchronous master-to-multiple-slaves replication system
+ for PostgreSQL with cascading and slave promotion.
+ .
+ This package contains the slon daemon and the slonik administration tool.
+ It should be installed on those hosts where Slony-I daemons are to be run
+ or administered, which usually, but not necessarily, are the hosts where
+ the database server nodes are running.
+
+Package: postgresql-8.3-slony1
+Section: misc
+Architecture: any
+Depends: postgresql-8.3, ${shlibs:Depends}
+Suggests: slony1-bin
+Description: replication system for PostgreSQL
+ Slony-I is an asynchronous master-to-multiple-slaves replication system
+ for PostgreSQL with cascading and slave promotion.
+ .
+ This package contains the support functions that are loaded into the
+ PostgreSQL database server.  It needs to be installed on the hosts where
+ the database server nodes are running.  This package works with version
+ 8.3 of the PostgreSQL server; you need the package that corresponds to
+ the version of your database server.
+ .
+ The actual replication daemon and the administration tools are in the
+ package slony1-bin.  This package is useless without slony1-bin installed
+ somewhere in the network.
+
+Package: slony1-doc
+Section: doc
+Architecture: all
+Description: Slony-I documentation
+ Slony-I is an asynchronous master-to-multiple-slaves replication system
+ for PostgreSQL with cascading and slave promotion.
+ .
+ This package contains the documentation for the Slony-I system.  It is
+ not required for normal operation.
--- slony1-1.2.15.orig/debian/slony1-doc.doc-base
+++ slony1-1.2.15/debian/slony1-doc.doc-base
@@ -0,0 +1,10 @@
+Document: slony1-adminguide
+Title: Slony-I Documentation
+Author: Christopher Browne
+Abstract: Slony-I is a "master to multiple slaves" replication system for
+ PostgreSQL with cascading and slave promotion.
+Section: Data Management
+
+Format: HTML
+Index: /usr/share/doc/slony1-doc/adminguide/index.html
+Files: /usr/share/doc/slony1-doc/adminguide/*.html
--- slony1-1.2.15.orig/debian/slony1-bin.slony1.logrotate
+++ slony1-1.2.15/debian/slony1-bin.slony1.logrotate
@@ -0,0 +1,9 @@
+/var/log/slony1/*.log {
+	weekly
+	rotate 10
+	copytruncate
+	delaycompress
+	compress
+	notifempty
+	missingok
+}
--- slony1-1.2.15.orig/debian/slony1-bin.examples
+++ slony1-1.2.15/debian/slony1-bin.examples
@@ -0,0 +1,13 @@
+share/slon.conf-sample
+tools/altperl/slon_tools.conf-sample
+tools/check_slon.sh
+tools/check_slony_cluster.sh
+tools/configure-replication.sh
+tools/generate_syncs.sh
+tools/psql_replication_check.pl
+tools/slony-cluster-analysis.sh
+tools/slony1_dump.sh
+tools/slony1_extract_schema.sh
+tools/test_slony_replication.pl
+tools/test_slony_state-dbi.pl
+tools/test_slony_state.pl
--- slony1-1.2.15.orig/debian/slony1-bin.slony1.default
+++ slony1-1.2.15/debian/slony1-bin.slony1.default
@@ -0,0 +1,3 @@
+# Set to a space-separated list of node names configured in
+# /etc/slony1/slon_tools.conf that should be handled in the init script.
+SLON_TOOLS_START_NODES=""
--- slony1-1.2.15.orig/debian/postgresql-8.3-slony1.install
+++ slony1-1.2.15/debian/postgresql-8.3-slony1.install
@@ -0,0 +1 @@
+usr/lib/postgresql/8.3/lib/
--- slony1-1.2.15.orig/debian/slony1-bin.dirs
+++ slony1-1.2.15/debian/slony1-bin.dirs
@@ -0,0 +1,2 @@
+etc/slony1
+var/log/slony1
--- slony1-1.2.15.orig/debian/slony1-bin.slony1.init
+++ slony1-1.2.15/debian/slony1-bin.slony1.init
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          slony1
+# Required-Start:    $local_fs $remote_fs $network
+# Required-Stop:     $local_fs $remote_fs $network
+# Should-Start:      $time postgresql
+# Should-Stop:       $time postgresql
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: start Slony-I daemon
+# Description: Slony-I is a replication system for PostgreSQL.
+### END INIT INFO
+
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/slon
+
+test -x $DAEMON || exit 5
+
+if [ -r /etc/default/slony1 ]; then
+    . /etc/default/slony1
+fi
+
+. /lib/lsb/init-functions
+
+
+instances() {
+	ls /etc/slony1/*/slon.conf 2>/dev/null | sed -n 's,^/etc/slony1/\(.*\)/slon.conf$,\1,p'
+	echo $SLON_TOOLS_START_NODES
+}
+
+conffile() {
+	echo "/etc/slony1/$1/slon.conf"
+}
+
+logfile() {
+	echo "/var/log/slony1/slon-$1.log"
+}
+
+pidfile() {
+	echo "/var/run/slony1/$1.pid"
+}
+
+prepare_start() {
+	mkdir -p /var/run/slony1 \
+	&& chown postgres:postgres /var/run/slony1/ \
+	&& chmod 2775 /var/run/slony1/
+}
+
+d_start() {
+	if [ -e $(conffile $1) ]; then
+		su -c ". /lib/lsb/init-functions ; start_daemon -p $(pidfile $1) $DAEMON -f $(conffile $1) -p $(pidfile $1) >>$(logfile $1) 2>&1 </dev/null &" - postgres
+	else
+		is_running $x || su -c "slon_start --nowatchdog $x >/dev/null" - postgres
+	fi
+}
+
+d_stop() {
+	killproc -p $(pidfile $1) $DAEMON
+}
+
+is_running() {
+	pidofproc -p $(pidfile $1) $DAEMON >/dev/null
+}
+
+
+case $1 in
+    start)
+	status=0
+	log_daemon_msg "Starting Slony-I daemon"
+	prepare_start
+	for x in $(instances); do
+		log_progress_msg $x
+		d_start $x
+		status=$(($status || $?))
+	done
+	log_end_msg $status
+	;;
+    stop)
+	status=0
+	log_daemon_msg "Stopping Slony-I daemon"
+	for x in $(instances); do
+		log_progress_msg $x
+		d_stop $x
+		status=$(($status || $?))
+	done
+	log_end_msg $status
+	;;
+    status)
+	status=0
+	for x in $(instances); do
+		is_running $x
+		instancestatus=$?
+		if [ $instancestatus -eq 0 ]; then
+			log_success_msg "Slony-I daemon $x is running."
+		else
+			log_failure_msg "Slony-I daemon $x is not running."
+		fi
+                status=$(($status || $instancestatus))
+	done
+	exit $((3 * $status))
+	;;
+    restart|force-reload)
+	status=0
+	log_daemon_msg "Restarting Slony-I daemon"
+	for x in $(instances); do
+		log_progress_msg $x
+		d_stop $x && sleep 1 && d_start $x
+		status=$(($status || $?))
+	done
+	log_end_msg $status
+	;;
+    try-restart)
+	if $0 status >/dev/null; then
+		$0 restart
+	else
+		exit 0
+	fi
+	;;
+    reload)
+	exit 3
+	;;
+    *)
+	log_failure_msg "Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
+	exit 2
+	;;
+esac
--- slony1-1.2.15.orig/debian/slony1-test.sh
+++ slony1-1.2.15/debian/slony1-test.sh
@@ -0,0 +1,123 @@
+#!/bin/bash
+
+# This is a simple test to see if the slony1 package is working.  It
+# sets up two nodes and replicates a few rows.  If the data arrives on
+# the slave, it's OK.
+#
+# Written by Peter Eisentraut <petere@debian.org>
+
+set -ex
+
+PGVERSION=8.3
+
+MASTER_PORT=65432
+SLAVE_PORT=65433
+
+MASTER_DB=test1
+SLAVE_DB=test2
+
+MASTER_CONNINFO="dbname=$MASTER_DB port=$MASTER_PORT user=postgres"
+SLAVE_CONNINFO="dbname=$SLAVE_DB port=$SLAVE_PORT user=postgres"
+
+
+clean() {
+    /etc/init.d/slony1 stop
+    rm -rf /etc/slony1/{master,slave}/
+    pg_dropcluster --stop $PGVERSION master || :
+    pg_dropcluster --stop $PGVERSION slave || :
+}
+
+
+setup_slon() {
+    local name=$1
+    local conn=$2
+
+    mkdir -p /etc/slony1/$name
+
+    zcat /usr/share/doc/slony1-bin/examples/slon.conf-sample.gz \
+    | sed \
+	-e "s/^#cluster_name=.*\$/cluster_name='testcluster'/" \
+	-e "s/^#conn_info=.*\$/conn_info='$conn'/" \
+	>/etc/slony1/$name/slon.conf
+}
+
+
+if [ x"$1" = x"--clean" ]; then
+    clean
+    exit 0
+fi
+
+/etc/init.d/slony1 stop
+
+pg_dropcluster --stop $PGVERSION master || :
+pg_dropcluster --stop $PGVERSION slave || :
+
+pg_createcluster --port $MASTER_PORT --start $PGVERSION master
+pg_createcluster --port $SLAVE_PORT --start $PGVERSION slave
+
+su - postgres -c "createdb -p $MASTER_PORT $MASTER_DB"
+su - postgres -c "createdb -p $SLAVE_PORT $SLAVE_DB"
+
+su - postgres -c "createlang -p $MASTER_PORT plpgsql $MASTER_DB"
+
+su - postgres -c "psql -p $MASTER_PORT -d $MASTER_DB -c 'CREATE TABLE testtable (a int PRIMARY KEY, b text);'"
+su - postgres -c "pg_dump -s -p $MASTER_PORT $MASTER_DB | psql -p $SLAVE_PORT $SLAVE_DB"
+
+su - postgres -c slonik <<_EOF_
+    cluster name = testcluster;
+
+    node 1 admin conninfo = '$MASTER_CONNINFO';
+    node 2 admin conninfo = '$SLAVE_CONNINFO';
+
+    init cluster ( id = 1, comment = 'Node 1' );
+
+    create set ( id = 1, origin = 1, comment = 'All tables' );
+    set add table ( set id = 1, origin = 1, id = 1, fully qualified name = 'public.testtable', comment = 'Test table' );
+
+    store node ( id = 2, comment = 'Node 2' );
+    store path ( server = 1, client = 2, conninfo = '$MASTER_CONNINFO');
+    store path ( server = 2, client = 1, conninfo = '$SLAVE_CONNINFO');
+    store listen ( origin = 1, provider = 1, receiver = 2 );
+    store listen ( origin = 2, provider = 2, receiver = 1 );
+_EOF_
+
+
+setup_slon master "$MASTER_CONNINFO"
+setup_slon slave "$SLAVE_CONNINFO"
+
+/etc/init.d/slony1 start
+sleep 2
+/etc/init.d/slony1 status
+
+su - postgres -c "psql -p $MASTER_PORT -d $MASTER_DB -c \"INSERT INTO testtable VALUES (1, 'one');\""
+
+su - postgres -c slonik <<_EOF_
+    cluster name = testcluster;
+
+    node 1 admin conninfo = '$MASTER_CONNINFO';
+    node 2 admin conninfo = '$SLAVE_CONNINFO';
+
+    subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
+_EOF_
+
+su - postgres -c "psql -p $MASTER_PORT -d $MASTER_DB -c \"INSERT INTO testtable VALUES (2, 'zwei');\""
+
+sleep 12
+
+
+diff -u \
+    <(su - postgres -c "psql -p $MASTER_PORT -d $MASTER_DB -c 'SELECT * FROM testtable;'") \
+    <(su - postgres -c "psql -p $SLAVE_PORT -d $SLAVE_DB -c 'SELECT * FROM testtable;'")
+result=$?
+
+if [ x"$1" != x"--noclean" ]; then
+    clean
+fi
+
+if [ $result -eq 0 ]; then
+    echo "SUCCESS"
+else
+    echo "FAILED"
+fi
+
+exit $result
--- slony1-1.2.15.orig/debian/slony1-doc.manpages
+++ slony1-1.2.15/debian/slony1-doc.manpages
@@ -0,0 +1 @@
+doc/adminguide/*.7
--- slony1-1.2.15.orig/debian/slony1-bin.README.Debian
+++ slony1-1.2.15/debian/slony1-bin.README.Debian
@@ -0,0 +1,117 @@
+Slony-I for Debian
+==================
+
+To run Slony-I, you need this package (slony1-bin) and the
+postgresql-x.y-slony1 package for the PostgreSQL server version that
+you intend to use.
+
+Please read the documentation in the package slony1-doc.  Setting up a
+robust Slony-I system is not trivial.  An introductory example can be
+found in the file /usr/share/doc/slony1-doc/examples/SAMPLE.gz.
+
+In the context of a Debian system with the slony1 packages installed,
+the basic setup procedure is as follows.  Note that most of these
+commands need database superuser privileges.
+
+1. Create the master database and create the database schema.  (You can
+   optionally load data now or later.  Or you go with an existing
+   database that is already in use.)
+
+   $ createdb -h $MASTERHOST $MASTERDBNAME
+
+2. Load the procedural language PL/pgSQL into the master database.
+   
+   $ createlang -h $MASTERHOST plpgsql $MASTERDBNAME
+
+3. Create the slave database(s).
+
+   $ createdb -h $SLAVEHOST $SLAVEDBNAME
+
+4. Copy the database schema from the master to the slave(s).  (Slony-I
+   does not replicate schema changes.)
+
+   $ pg_dump -s -h $MASTERHOST $MASTERDBNAME | psql -h $SLAVEHOST $SLAVEDBNAME
+
+   This also copies the definition of PL/pgSQL, which you need on the
+   slaves as well.  You can also add PL/pgSQL to the slaves manually
+   if you forgot it.
+
+Interlude: There are two ways to run and interact with Slony-I.  One
+way is that you set up a separate configuration file for each node,
+start a slon daemon for each node, and write the slonik scripts for
+managing the nodes by hand.  Let's call this the "by hand" method.
+The other way is to use the so-called Perl tools.  You configure your
+nodes and sets in /etc/slony1/slon_tools.conf, start the nodes using
+the slon_start program, and manage the nodes using the slonik_*
+programs.  This is the "Perl tools" method, and while it was sort of
+born as a hack, it seems to establish itself as the more popular
+method.  The "by hand" method, however, is more flexible for the
+extreme cases.  Depending on what you choose, the next steps differ.
+
+5. [by hand] Configure the replication setup.  This is done by writing
+   elaborate scripts that are fed to the "slonik" tool.  Details are
+   not covered here, but see the aforementioned SAMPLE file.
+
+   [Perl tools] Edit /etc/slony1/slon_tools.conf to reflect your
+   setup.  A sample of this file is in /usr/share/doc/slony1-bin/examples/.
+   If you put passwords in that file, be sure to set up sensible
+   permissions.  Then initialize the cluster by running:
+
+   $ slonik_init_cluster | slonik
+
+   Then set up the sets on the master node, e.g.,
+
+   $ slonik_create_set set1 | slonik
+
+6. Start the Slony-I daemon process, the program "slon".  You need one
+   running daemon for each cluster node (master or slave), and you need
+   separate daemons for each replication cluster.
+
+   [by hand] The Debian packages support starting an arbitrary number
+   of "slon" daemons via the init script /etc/init.d/slony1.  To do
+   that, create a subdirectory under /etc/slony1/ for each instance
+   and place a slon configuration file with the name slon.conf into
+   each of these subdirectories (so it might be something like
+   /etc/slony1/acctdb-slave/slon.conf).  You can use the file
+   /usr/share/doc/slony1-bin/examples/slon.conf-sample as an example.
+   You need to change at least the parameters "cluster_name" and
+   "conn_info".
+
+   [Perl tools] Edit the file /etc/default/slony1 and set the variable
+   SLON_TOOLS_START_NODES to a space-separated list of node names to
+   start using the Perl tools method.
+
+   Then run
+
+   # /etc/init.d/slony1 start
+   
+   on each host.  This starts the slon daemons configured in either
+   method.
+
+6. Subscribe the slave node(s) to the master node.
+
+   [by hand] This is again done using the "slonik" tool.
+
+   [Perl tools] Use a command like this:
+
+   $ slonik_subscribe_set set1 node2 | slonik
+
+At this point, data changes made on the master should eventually (after
+about ten seconds at most) appear on the slaves.
+
+All slon instances configured either way share a name space (for the
+purpose of log file and PID file names, for instance), with ties going
+to the by hand method.  That is, if you have a node configured both
+ways, the init script will start it using the "by hand" method.
+
+Log files for each slon instance can be found in the directory
+/var/log/slony1/.
+
+Note that the slon processes need to be able to connect to the PostgreSQL
+servers through the ordinary authentication mechanism.  In the normal
+case of a slon process running locally under the user "postgres", this is
+taken care of by the default authentication configuration of PostgreSQL
+on Debian.  If you have a different setup, you need to adjust the
+authentication configuration.
+
+ -- Peter Eisentraut, November 2006
--- slony1-1.2.15.orig/debian/rules
+++ slony1-1.2.15/debian/rules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+DEB_CONFIGURE_EXTRA_FLAGS = \
+	--with-docs \
+	--with-pgconfigdir=/usr/lib/postgresql/8.3/bin \
+	--with-pgsharedir=/usr/share/slony1 \
+	--with-pgpkglibdir=/usr/lib/postgresql/8.3/lib \
+	--sysconfdir=/etc/slony1 \
+	--with-perlsharedir=/usr/share/slony1 \
+	--with-perltools
+
+DEB_DH_INSTALLINIT_ARGS = --name=slony1
+DEB_DH_INSTALLLOGROTATE_ARGS = --name=slony1
+DEB_INSTALL_DOCS_ALL = $(addprefix -X,[^1]\.1 [^7]\.7 \.dia \.dsl \.sgml \.sql \.xml \.xsl HTML\.index Makefile)
+DEB_COMPRESS_EXCLUDE = \.pl \.sh
+
+common-build-arch common-build-indep:: common-build-impl
+common-build-impl::
+	$(MAKE) -C doc/adminguide slony.xml
+	cd doc/adminguide && docbook2x-man slony.xml
+
+binary-post-install/slony1-bin::
+	rm debian/$(cdbs_curpkg)/usr/bin/show_configuration
+
+clean::
+	rm -f doc/adminguide/slony.xml
--- slony1-1.2.15.orig/debian/copyright
+++ slony1-1.2.15/debian/copyright
@@ -0,0 +1,35 @@
+This package was created by Peter Eisentraut <petere@debian.org> on
+22 Nov 2005.
+
+The source code was downloaded from <http://www.slony.info>.
+
+Upstream authors:
+
+Jan Wieck		janwieck@yahoo.com
+Christopher Browne	cbbrowne@ca.afilias.info
+Darcy Buskermolen	darcy@wavefire.com
+David Fetter		david@fetter.org
+Steve Simms		ssimms@steve.deefs.net
+
+License:
+
+Slony-I - A replication system for the PostgreSQL Database Management System
+
+Copyright (c) 2003-2006, PostgreSQL Global Development Group
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
--- slony1-1.2.15.orig/debian/svn-deblayout
+++ slony1-1.2.15/debian/svn-deblayout
@@ -0,0 +1 @@
+origDir=../../upstream
--- slony1-1.2.15.orig/debian/compat
+++ slony1-1.2.15/debian/compat
@@ -0,0 +1 @@
+7
--- slony1-1.2.15.orig/debian/slony1-bin.postinst
+++ slony1-1.2.15/debian/slony1-bin.postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+chown postgres:postgres /var/log/slony1/
+chmod 2770 /var/log/slony1/
+
+#DEBHELPER#
--- slony1-1.2.15.orig/debian/slony1-doc.examples
+++ slony1-1.2.15/debian/slony1-doc.examples
@@ -0,0 +1 @@
+SAMPLE
--- slony1-1.2.15.orig/debian/slony1-bin.docs
+++ slony1-1.2.15/debian/slony1-bin.docs
@@ -0,0 +1,2 @@
+tools/README.checks
+tools/configure-replication.txt
--- slony1-1.2.15.orig/debian/watch
+++ slony1-1.2.15/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.slony.info/downloads/1.2/source/slony1-([0-9.]+).tar.bz2  debian  uupdate
--- slony1-1.2.15.orig/debian/slony1-bin.manpages
+++ slony1-1.2.15/debian/slony1-bin.manpages
@@ -0,0 +1,2 @@
+doc/adminguide/slon.1
+doc/adminguide/slonik.1
--- slony1-1.2.15.orig/debian/slony1-bin.install
+++ slony1-1.2.15/debian/slony1-bin.install
@@ -0,0 +1,2 @@
+usr/bin/
+usr/share/slony1/
--- slony1-1.2.15.orig/debian/slony1-bin.postrm
+++ slony1-1.2.15/debian/slony1-bin.postrm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = purge ]; then
+	rm -rf /etc/slony1/ /var/log/slony1/ /var/run/slony1/
+fi
+
+#DEBHELPER#
--- slony1-1.2.15.orig/debian/patches/09_perltools-conf.patch
+++ slony1-1.2.15/debian/patches/09_perltools-conf.patch
@@ -0,0 +1,19 @@
+Index: slony1-1.1.5/tools/altperl/slon_tools.conf-sample
+===================================================================
+--- slony1-1.1.5.orig/tools/altperl/slon_tools.conf-sample	2006-10-18 12:49:05.000000000 +0200
++++ slony1-1.1.5/tools/altperl/slon_tools.conf-sample	2006-10-18 13:21:59.000000000 +0200
+@@ -23,13 +23,7 @@
+     # The directory where Slony should record log messages.  This
+     # directory will need to be writable by the user that invokes
+     # Slony.
+-    $LOGDIR = '/var/log/slony';
+-
+-    # (Optional) If you would like to use Apache's rotatelogs tool to
+-    # manage log output, uncomment the following line and ensure that
+-    # it points to the executable.
+-    #
+-    # $APACHE_ROTATOR = '/usr/local/apache/bin/rotatelogs';
++    $LOGDIR = '/var/log/slony1';
+ 
+     # SYNC check interval (slon -s option)
+     # $SYNC_CHECK_INTERVAL = 1000;
--- slony1-1.2.15.orig/debian/patches/02_doc-make.patch
+++ slony1-1.2.15/debian/patches/02_doc-make.patch
@@ -0,0 +1,15 @@
+Index: slony1-1.2.2/doc/adminguide/Makefile
+===================================================================
+--- slony1-1.2.2.orig/doc/adminguide/Makefile	2006-12-20 11:09:54.000000000 +0100
++++ slony1-1.2.2/doc/adminguide/Makefile	2006-12-20 11:13:07.000000000 +0100
+@@ -62,7 +62,9 @@
+ ## HTML
+ ##
+ 
+-all: html man
++all:
++	$(MAKE) html
++	$(MAKE) html
+ 
+ installdirs:
+ ifdef docdir
--- slony1-1.2.15.orig/debian/patches/04_no-rpath.patch
+++ slony1-1.2.15/debian/patches/04_no-rpath.patch
@@ -0,0 +1,10 @@
+--- slony1-1.1.2.orig/makefiles/Makefile.linux
++++ slony1-1.1.2/makefiles/Makefile.linux
+@@ -1,6 +1,6 @@
+ AROPT = crs
+ export_dynamic = -Wl,-E
+-rpath = -Wl,-rpath,$(pglibdir)
++#rpath = -Wl,-rpath,$(pglibdir)
+ shlib_symbolic = -Wl,-Bsymbolic
+ allow_nonpic_in_shlib = yes
+ DLSUFFIX = .so
--- slony1-1.2.15.orig/debian/patches/05_includedir-order.patch
+++ slony1-1.2.15/debian/patches/05_includedir-order.patch
@@ -0,0 +1,13 @@
+Index: slony1-1.2.2/Makefile.global.in
+===================================================================
+--- slony1-1.2.2.orig/Makefile.global.in	2006-12-20 11:09:53.000000000 +0100
++++ slony1-1.2.2/Makefile.global.in	2006-12-20 11:13:39.000000000 +0100
+@@ -78,7 +78,7 @@
+ SED=			@SED@
+ subdir=$(slony_subdir)
+ 
+-override CPPFLAGS := -I${pgincludedir} -I${pgincludeserverdir} $(CPPFLAGS)
++override CPPFLAGS := -I${pgincludeserverdir} -I${pgincludedir} $(CPPFLAGS)
+ LDFLAGS =   -L${pglibdir} -L${pgpkglibdir} -lpq @NLSLIB@
+ 
+ ifeq ($(GCC), yes)
--- slony1-1.2.15.orig/debian/patches/series
+++ slony1-1.2.15/debian/patches/series
@@ -0,0 +1,9 @@
+02_doc-make.patch
+04_no-rpath.patch
+05_includedir-order.patch
+07_sample.patch
+09_perltools-conf.patch
+10_perltools-start.patch
+broken-pdf.patch
+perlsharedir.patch
+no-client-log.patch
--- slony1-1.2.15.orig/debian/patches/broken-pdf.patch
+++ slony1-1.2.15/debian/patches/broken-pdf.patch
@@ -0,0 +1,22 @@
+Index: slony1-1.2.0/doc/concept/Makefile
+===================================================================
+--- slony1-1.2.0.orig/doc/concept/Makefile	2006-10-19 16:04:49.000000000 +0200
++++ slony1-1.2.0/doc/concept/Makefile	2006-10-19 16:05:09.000000000 +0200
+@@ -34,7 +34,7 @@
+ 
+ DISTFILES = Makefile $(wildcard *.pic) Slon_900x720.jpg Slony-I-concept.nr
+ 
+-all:		all-ps all-pdf all-txt
++all:		all-ps all-txt
+ 
+ all-ps:		Slon.eps $(PS)
+ 
+@@ -49,7 +49,7 @@
+ 
+ install: installdirs all
+ ifdef docdir
+-	for file in $(PS) $(PDF) $(TXT) Slon_$(IMG_WID)x$(IMG_HT).jpg ; do \
++	for file in $(PS) $(TXT) Slon_$(IMG_WID)x$(IMG_HT).jpg ; do \
+ 	  $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/concept || exit; \
+ 	done
+ endif
--- slony1-1.2.15.orig/debian/patches/07_sample.patch
+++ slony1-1.2.15/debian/patches/07_sample.patch
@@ -0,0 +1,13 @@
+Index: slony1-1.2.2/share/slon.conf-sample
+===================================================================
+--- slony1-1.2.2.orig/share/slon.conf-sample	2006-12-12 20:50:36.000000000 +0100
++++ slony1-1.2.2/share/slon.conf-sample	2006-12-20 11:15:12.000000000 +0100
+@@ -79,7 +79,7 @@
+ #cluster_name='sloncluster'
+ 
+ # Set slon's connection info, default is to read it off the command line
+-#conn_info='host=/tmp port=5432 user=slony'
++#conn_info='host=localhost port=5432 dbname=slony user=postgres'
+ 
+ # maximum time planned for grouped SYNCs
+ # If replication is behind, slon will try to increase numbers of
--- slony1-1.2.15.orig/debian/patches/no-client-log.patch
+++ slony1-1.2.15/debian/patches/no-client-log.patch
@@ -0,0 +1,27 @@
+Index: slony1-1.2.1/tools/altperl/slon-tools.pm
+===================================================================
+--- slony1-1.2.1.orig/tools/altperl/slon-tools.pm	2006-11-17 11:47:38.000000000 +0100
++++ slony1-1.2.1/tools/altperl/slon-tools.pm	2006-11-17 11:50:24.000000000 +0100
+@@ -83,14 +83,14 @@
+ # then invokes it and deletes it
+ sub run_slonik_script {
+   my ($script) = @_;
+-  open(OUT, ">>$LOGDIR/slonik_scripts.log");
+-  my $now = `date`;
+-  chomp $now;
+-  print OUT "# -------------------------------------------------------------\n";
+-  print OUT "# Script: $script submitted at $now \n";
+-  print OUT "# -------------------------------------------------------------\n";
+-  print OUT $script;
+-  close OUT;
++#  open(OUT, ">>$LOGDIR/slonik_scripts.log");
++#  my $now = `date`;
++#  chomp $now;
++#  print OUT "# -------------------------------------------------------------\n";
++#  print OUT "# Script: $script submitted at $now \n";
++#  print OUT "# -------------------------------------------------------------\n";
++#  print OUT $script;
++#  close OUT;
+   print $script;
+ }
+ 
--- slony1-1.2.15.orig/debian/patches/10_perltools-start.patch
+++ slony1-1.2.15/debian/patches/10_perltools-start.patch
@@ -0,0 +1,21 @@
+Index: slony1-1.2.9/tools/altperl/slon-tools.pm
+===================================================================
+--- slony1-1.2.9.orig/tools/altperl/slon-tools.pm	2007-03-21 16:11:34.000000000 +0100
++++ slony1-1.2.9/tools/altperl/slon-tools.pm	2007-03-27 18:14:43.000000000 +0200
+@@ -132,15 +132,7 @@
+   my ($nodenum) = @_;
+   my ($dsn, $dbname) = ($DSN[$nodenum], $DBNAME[$nodenum]);
+   $SYNC_CHECK_INTERVAL ||= 1000;
+-  system("mkdir -p $LOGDIR/slony1/node$nodenum");
+-  my $cmd = "@@SLONBINDIR@@/slon -s $SYNC_CHECK_INTERVAL -d2 $CLUSTER_NAME '$dsn' 2>&1 ";
+-  if ($APACHE_ROTATOR) {
+-    $cmd .= "| $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/" .  $dbname . "_%Y-%m-%d_%H:%M:%S.log\" 10M &";
+-  } else {
+-    my $now=`date '+%Y-%m-%d_%H:%M:%S'`;
+-    chomp $now;
+-    $cmd .= "> $LOGDIR/slony1/node$nodenum/$dbname-$now.log &";
+-  }
++  my $cmd = "@@SLONBINDIR@@/slon -p /var/run/slony1/node$nodenum.pid -s $SYNC_CHECK_INTERVAL -d2 $CLUSTER_NAME '$dsn' >>$LOGDIR/node$nodenum-$dbname.log 2>&1 </dev/null &";
+   print "Invoke slon for node $nodenum - $cmd\n";
+   system ($cmd);
+ }
--- slony1-1.2.15.orig/debian/patches/perlsharedir.patch
+++ slony1-1.2.15/debian/patches/perlsharedir.patch
@@ -0,0 +1,13 @@
+Index: slony1-1.2.2/tools/altperl/Makefile
+===================================================================
+--- slony1-1.2.2.orig/tools/altperl/Makefile	2006-12-20 11:09:52.000000000 +0100
++++ slony1-1.2.2/tools/altperl/Makefile	2006-12-20 11:16:47.000000000 +0100
+@@ -26,7 +26,7 @@
+ 		tmpname=`echo $$file | $(SED) "s#\.p[lm]##"` && \
+ 		$(SED) -e "s#@@PERL@@#$(PERL)#;" \
+                        -e "s#@@SYSCONFDIR@@#$(sysconfdir)#;" \
+-                       -e "s#@@PGLIBDIR@@#$(pglibdir)#;" \
++                       -e "s#@@PGLIBDIR@@#$(perlsharedir)#;" \
+                        -e "s#@@PGBINDIR@@#$(pgbindir)#;" \
+                        -e "s#@@SLONBINDIR@@#$(slonbindir)#;" \
+                        -e "s#@@TOOLSBIN@@#$(toolsbin)#;" \
