--- bucardo-5.5.0.orig/debian/README.Debian +++ bucardo-5.5.0/debian/README.Debian @@ -0,0 +1,16 @@ +Bucardo for Debian +------------------ + +To use Bucardo, install PL/Perl on the database server (which is available in +the "postgresql-plperl-*" package on Debian systems) and, as a PostgreSQL +superuser, execute: + + psql --file /usr/share/bucardo/bucardo.schema + +This script creates a user named "bucardo" and a database also named "bucardo". + +You should then populate the tables in that database as required, configure +/etc/bucardorc to access that database, and enable the bucardo daemon in +/etc/default/bucardo. + + -- Nicholas Jefferson Wed, 08 Apr 2009 09:15:06 +1000 --- bucardo-5.5.0.orig/debian/README.source +++ bucardo-5.5.0/debian/README.source @@ -0,0 +1,8 @@ +Debian patch system +=================== + +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +See /usr/share/doc/quilt/README.source for a detailed explanation. --- bucardo-5.5.0.orig/debian/bucardo.default +++ bucardo-5.5.0/debian/bucardo.default @@ -0,0 +1,4 @@ +# Default settings for /etc/init.d/bucardo + +# Whether or not to run the bucardo daemon; set to 1 to enable. +ENABLED=0 --- bucardo-5.5.0.orig/debian/bucardo.init +++ bucardo-5.5.0/debian/bucardo.init @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: bucardo +# Required-Start: $local_fs $remote_fs $network $time +# Required-Stop: $local_fs $remote_fs $network $time +# Should-Start: $syslog postgresql +# Should-Stop: $syslog postgresql +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: PostgreSQL replication system +### END INIT INFO + +NAME=bucardo +DESC="PostgreSQL replication system" +DAEMON=/usr/bin/bucardo +PIDFILE=/var/run/bucardo/bucardo.mcp.pid + +test -x $DAEMON || exit 0 + +if [ -f /etc/default/bucardo ] ; then + . /etc/default/bucardo +fi + +test "$ENABLED" != "0" || exit 0 + +. /lib/lsb/init-functions + +case "$1" in +start) + if [ ! -d /var/run/bucardo ]; then + mkdir /var/run/bucardo + chown bucardo:bucardo /var/run/bucardo + fi + log_daemon_msg "Starting $DESC" $NAME + su bucardo --command "$DAEMON start" + log_end_msg $? + ;; +force-reload|reload) + log_daemon_msg "Reloading $DESC configuration files" $NAME + su bucardo --command "$DAEMON reload_config" + log_end_msg $? + ;; +restart) + $0 stop + $0 start + ;; +stop) + log_daemon_msg "Stopping $DESC" $NAME + su bucardo --command "$DAEMON stop" + log_end_msg $? + ;; +status) + status_of_proc -p "$PIDFILE" bucardo + ;; +*) + log_action_msg "Usage: $0 {start|force-reload|reload|restart|stop}" >&2 + exit 1 + ;; +esac + +exit 0 --- bucardo-5.5.0.orig/debian/bucardo.postinst +++ bucardo-5.5.0/debian/bucardo.postinst @@ -0,0 +1,46 @@ +#!/bin/sh + +set -e + +DAEMON=/usr/bin/bucardo + +if [ -f /etc/default/bucardo ] ; then + . /etc/default/bucardo +fi + +case "$1" in +configure) + # Create dedicated bucardo user + if ! getent passwd bucardo > /dev/null; then + adduser --system --group --gecos "bucardo" --home /var/lib/bucardo --no-create-home --shell /bin/bash bucardo + fi + # Unlock account, it may have been locked by an earlier package removal + usermod -U -e '' bucardo + for file in /etc/bucardorc /var/log/bucardo /var/lib/bucardo /var/run/bucardo; do + if [ -e $file ] && ! dpkg-statoverride --list $file >/dev/null ; then + chown bucardo:bucardo $file + chmod o-o $file + fi + done + if [ "$ENABLED" != "0" ] ; then + # Do not try crossing the 4/5 boundary. + if `su bucardo --command "psql -c 'select 1 from syncrun' bucardo" > /dev/null`; then + su bucardo --command "$DAEMON upgrade batch" || true + su bucardo --command "$DAEMON validate all" || true + else + echo "Sorry, but Bucardo version 4 cannot be upgraded to version 5"; + echo "You will have to recreate your information (dbs, syncs, etc.)"; + fi + fi + ;; +abort-upgrade|abort-remove|abort-deconfigure) + ;; +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- bucardo-5.5.0.orig/debian/bucardo.postrm +++ bucardo-5.5.0/debian/bucardo.postrm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +# Lock user account +if [ "$1" = "purge" ]; then + usermod -L -e 1 bucardo +fi + +#DEBHELPER# + --- bucardo-5.5.0.orig/debian/bucardorc +++ bucardo-5.5.0/debian/bucardorc @@ -0,0 +1,5 @@ +dbport = 5432 +dbhost = localhost +dbname = bucardo +dbuser = bucardo +dbpass = bucardo --- bucardo-5.5.0.orig/debian/changelog +++ bucardo-5.5.0/debian/changelog @@ -0,0 +1,176 @@ +bucardo (5.5.0-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add dependency on libpod-parser-perl (Closes: #961208) + + -- Dominic Hargreaves Sun, 08 Nov 2020 18:26:12 +0000 + +bucardo (5.5.0-1) unstable; urgency=medium + + [ Christoph Berg ] + * Move maintainer address to team+postgresql@tracker.debian.org. + + [ Michael Meskes ] + * New upstream version 5.5.0 + * Make sure bucardo uses /usr/bin/perl directly. + + -- Michael Meskes Tue, 13 Nov 2018 13:35:13 +0100 + +bucardo (5.4.1-2) unstable; urgency=medium + + * Updated watch file. + * Bumped Standards-Version to 4.1.3, no changes needed. + * Added lsb-base dependency. + + -- Michael Meskes Mon, 01 Jan 2018 11:01:09 +0100 + +bucardo (5.4.1-1) unstable; urgency=medium + + * Imported Upstream version 5.4.1 + * Bumped debhelper version, no changes needed. + + -- Michael Meskes Mon, 11 Jan 2016 14:59:47 +0100 + +bucardo (5.4.0-1) unstable; urgency=medium + + * Imported Upstream version 5.4.0 + * Added patch from git to place sequence into correct schema. + + -- Michael Meskes Sun, 30 Aug 2015 14:36:44 +0200 + +bucardo (5.3.1-1) unstable; urgency=medium + + * Imported Upstream version 5.3.1 + + -- Michael Meskes Thu, 18 Jun 2015 11:34:09 +0200 + +bucardo (5.1.2-1) unstable; urgency=medium + + * Imported Upstream version 5.1.2 + * Bumped Standards-Version to 3.9.6, no changes needed. + + -- Michael Meskes Mon, 20 Oct 2014 11:35:09 +0200 + +bucardo (5.1.1-1) unstable; urgency=medium + + * Imported Upstream version 5.1.1 + + -- Michael Meskes Mon, 11 Aug 2014 12:21:06 +0200 + +bucardo (5.1.0-1) unstable; urgency=medium + + * Imported Upstream version 5.1.0 + + -- Michael Meskes Wed, 16 Jul 2014 10:48:07 +0200 + +bucardo (5.0.0-1) unstable; urgency=medium + + * Imported Upstream version 5.0.0 + * Bumped Standards-Version to 3.9.5, no changes needed. + + -- Michael Meskes Sun, 06 Jul 2014 15:17:52 +0200 + +bucardo (4.99.10-1) unstable; urgency=low + + * Imported Upstream version 4.99.10 + + -- Michael Meskes Fri, 22 Nov 2013 16:02:27 +0100 + +bucardo (4.99.8-1) unstable; urgency=low + + * Imported Upstream version 4.99.8 + * Made init script report correct result. (Closes: #724878) + * Canonicalized VCS fields. + + -- Michael Meskes Wed, 06 Nov 2013 15:40:17 +0100 + +bucardo (4.99.7-1) unstable; urgency=low + + * Imported Upstream version 4.99.7 + * Bumped Standards-Version to 3.9.4, no changes needed. + + -- Michael Meskes Sun, 24 Feb 2013 10:57:08 +0100 + +bucardo (4.99.6-1) unstable; urgency=low + + [ Christoph Berg ] + * Change recommends to postgresql-plperl without an explicit postgresql + version. + + [ Michael Meskes ] + * Imported Upstream version 4.99.6 + + -- Michael Meskes Tue, 08 Jan 2013 13:19:39 +0100 + +bucardo (4.99.5-1) unstable; urgency=low + + * Imported Upstream version 4.99.5 + * Added VCS information + * Do not ship a bucardo directory in /var/run. It gets created by the init + script anyway. + * Removed recommendation of postgresql-plperl-9.0. + + -- Michael Meskes Mon, 04 Jun 2012 11:44:00 +0200 + +bucardo (4.99.3-1) unstable; urgency=low + + * Imported Upstream version 4.99.3 + * Bumped Standards-Version to 3.9.3, no changes needed. + * Do not try to upgrade bucardo when coming from version 4. + * Package now removes homedir (if empty) and locks user account on purge. + (Closes: #656465) + * Added 'status' option to init file. + * Added dependency on libboolean-perl. + + -- Michael Meskes Mon, 05 Mar 2012 15:28:36 +0100 + +bucardo (4.4.8-1) unstable; urgency=low + + * Imported Upstream version 4.4.8 + + -- Michael Meskes Fri, 23 Dec 2011 11:40:26 +0100 + +bucardo (4.4.6-1) unstable; urgency=low + + * Also support PostgreSQL 9.1 as dependency. + * Imported Upstream version 4.4.6 + * Converted patch system to quilt. + + -- Michael Meskes Thu, 25 Aug 2011 13:08:22 +0200 + +bucardo (4.4.5-1) unstable; urgency=low + + [ Nicholas Jefferson ] + * New version of Bucardo + + [ Michael Meskes ] + * Bumped Standards-Version to 3.9.2, no changes needed. + * Added source/format file. + + -- Michael Meskes Wed, 06 Jul 2011 09:46:56 +0200 + +bucardo (4.4.4-1) unstable; urgency=low + + * New version of Bucardo + * Added patch to set session authorization in bucardo.schema script (Closes: #630785) + * Improved instructions in README.Debian + + -- Nicholas Jefferson Tue, 21 Jun 2011 11:58:50 +1000 + +bucardo (4.4.3-1) unstable; urgency=low + + * New version of Bucardo + + -- Nicholas Jefferson Sun, 17 Apr 2011 18:24:41 +1000 + +bucardo (4.4.2-1) unstable; urgency=low + + * New version of Bucardo + + -- Nicholas Jefferson Sat, 26 Mar 2011 18:03:32 +1100 + +bucardo (4.4.0-1) unstable; urgency=low + + * Initial release (Closes: #497650) + + -- Nicholas Jefferson Sat, 26 Sep 2009 17:36:16 +1000 --- bucardo-5.5.0.orig/debian/compat +++ bucardo-5.5.0/debian/compat @@ -0,0 +1 @@ +9 --- bucardo-5.5.0.orig/debian/control +++ bucardo-5.5.0/debian/control @@ -0,0 +1,22 @@ +Source: bucardo +Priority: optional +Maintainer: Debian PostgreSQL Maintainers +Uploaders: Michael Meskes +Build-Depends: cdbs, debhelper (>= 9), perl (>= 5.10.0), quilt +Standards-Version: 4.1.3 +Section: database +Homepage: http://bucardo.org/ +Vcs-Git: https://salsa.debian.org/postgresql/bucardo.git +Vcs-Browser: https://salsa.debian.org/postgresql/bucardo + +Package: bucardo +Architecture: all +Depends: ${misc:Depends}, adduser, perl (>= 5.10.0), libdbix-safe-perl, libdbd-pg-perl, libboolean-perl, lsb-base (>= 3.0-3), libpod-parser-perl +Recommends: postgresql-plperl +Description: asynchronous replication system for PostgreSQL + Bucardo is an asynchronous PostgreSQL replication system, allowing for both + multi-master and multi-slave operations. + . + Bucardo uses PL/pgSQL and Pl/PerlU triggers to send notification events to a + daemon, which replicates the data modifications, and Bucardo provides both + standard and custom conflict resolution methods. --- bucardo-5.5.0.orig/debian/copyright +++ bucardo-5.5.0/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Nicholas Jefferson on +Wed, 3 Sep 2008 17:29:31 +1000. + +It was downloaded from http://bucardo.org/ + +Upstream Author: + Greg Sabino Mullane + +Copyright: + Copyright (c) 2005, 2006, 2007, 2008 Greg Sabino Mullane + +License: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The Debian packaging is in the public domain. --- bucardo-5.5.0.orig/debian/dirs +++ bucardo-5.5.0/debian/dirs @@ -0,0 +1,3 @@ +usr/share/man/man1 +var/log/bucardo +var/lib/bucardo --- bucardo-5.5.0.orig/debian/docs +++ bucardo-5.5.0/debian/docs @@ -0,0 +1,2 @@ +Bucardo.pm.html +bucardo.html --- bucardo-5.5.0.orig/debian/install +++ bucardo-5.5.0/debian/install @@ -0,0 +1 @@ +debian/bucardorc /etc --- bucardo-5.5.0.orig/debian/patches/01-pod2man-output.patch +++ bucardo-5.5.0/debian/patches/01-pod2man-output.patch @@ -0,0 +1,12 @@ +diff -Nur bucardo/Makefile.PL bucardo.new/Makefile.PL +--- bucardo/Makefile.PL 2011-03-17 11:27:22.000000000 +1100 ++++ bucardo.new/Makefile.PL 2011-03-27 16:16:05.569146631 +1100 +@@ -31,7 +31,7 @@ + NEEDS_LINKING => 0, + VERSION_FROM => 'Bucardo.pm', + EXE_FILES => ['bucardo'], +- MAN1PODS => { 'bucardo' => 'blib/man1/bucardo.1pm' }, ++ MAN1PODS => { 'bucardo' => 'blib/man1/bucardo.1p' }, + NORECURS => 1, + ); + --- bucardo-5.5.0.orig/debian/patches/02-schema-config.patch +++ bucardo-5.5.0/debian/patches/02-schema-config.patch @@ -0,0 +1,36 @@ +diff -Nur bucardo/bucardo.schema bucardo.new/bucardo.schema +--- bucardo/bucardo.schema 2013-11-22 16:04:06.508566734 +0100 ++++ bucardo.new/bucardo.schema 2013-11-22 16:06:37.542437659 +0100 +@@ -140,10 +140,10 @@ + 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/conflict.log|Name of the conflict detail log file + log_showsyncname|1|Show the name of the sync next to the 'KID' prefix + 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/warning.log|File containing all log lines starting with "Warning" + \. + + -- Versioning +@@ -159,8 +159,8 @@ + FROM STDIN + WITH DELIMITER '|'; + bucardo_vac|1|Do we want the automatic VAC daemon to run? +-default_email_from|nobody@example.com|Who the alert emails are sent as +-default_email_to|nobody@example.com|Who to send alert emails to ++default_email_from|root|Who the alert emails are sent as ++default_email_to|root|Who to send alert emails to + default_email_host|localhost|Which host to send email through + default_conflict_strategy|bucardo_latest|Default conflict strategy for all syncs + email_debug_file||File to save a copy of all outgoing emails to +@@ -169,7 +169,7 @@ + isolation_level|repeatable read|Default isolation level: can be serializable or repeatable read + piddir|/var/run/bucardo|Directory holding Bucardo PID files + quick_delta_check|1|Whether to do a quick scan of delta activity +-reason_file|bucardo.restart.reason.txt|File to hold reasons for stopping and starting ++reason_file|/var/log/bucardo/restart.reason|File to hold reasons for stopping and starting + semaphore_table|bucardo_status|Table to let apps know a sync is ongoing + statement_chunk_size|8000|How many primary keys to shove into a single statement + stats_script_url|http://www.bucardo.org/|Location of the stats script --- bucardo-5.5.0.orig/debian/patches/03-interpreter.patch +++ bucardo-5.5.0/debian/patches/03-interpreter.patch @@ -0,0 +1,8 @@ +--- bucardo/bucardo.orig 2018-11-13 13:38:02.980569811 +0100 ++++ bucardo/bucardo 2018-11-13 13:38:31.172651522 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # -*-mode:cperl; indent-tabs-mode: nil; cperl-indent-level: 4-*- + + ## Script to control Bucardo --- bucardo-5.5.0.orig/debian/patches/04-session-authorization.patch +++ bucardo-5.5.0/debian/patches/04-session-authorization.patch @@ -0,0 +1,13 @@ +diff -Nur bucardo/bucardo.schema bucardo.new/bucardo.schema +--- bucardo/bucardo.schema 2011-06-21 14:42:32.673483387 +1000 ++++ bucardo.new/bucardo.schema 2011-06-21 14:56:06.745509641 +1000 +@@ -12,7 +12,8 @@ + ALTER USER bucardo SET search_path = bucardo; + SET CLIENT_MIN_MESSAGES = 'WARNING'; + +-\c bucardo bucardo ++\c bucardo ++SET SESSION AUTHORIZATION bucardo; + + -- plpgsql and plperlu are loaded, but just in case: + SET client_min_messages = 'FATAL'; --- bucardo-5.5.0.orig/debian/patches/series +++ bucardo-5.5.0/debian/patches/series @@ -0,0 +1,4 @@ +01-pod2man-output.patch +02-schema-config.patch +03-interpreter.patch +04-session-authorization.patch --- bucardo-5.5.0.orig/debian/rules +++ bucardo-5.5.0/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +clean:: + perl Makefile.PL INSTALLDIRS=vendor + make clean + rm -f Makefile.old + +common-build-indep:: + perl Makefile.PL INSTALLDIRS=vendor + make + +common-install-indep:: + make install DESTDIR=$(CURDIR)/debian/bucardo INSTALL_BASE=$(CURDIR)/debian/bucardo --- bucardo-5.5.0.orig/debian/source/format +++ bucardo-5.5.0/debian/source/format @@ -0,0 +1 @@ +1.0 --- bucardo-5.5.0.orig/debian/watch +++ bucardo-5.5.0/debian/watch @@ -0,0 +1,2 @@ +version=4 +https://bucardo.org/Bucardo http://bucardo.org/downloads/Bucardo-(.*)\.tar\.gz