debian/patches
debian/python-pgq3/*
debian/python-skytools3/*
-debian/postgresql-8.4-pgq3/*
-debian/postgresql-9.0-pgq3/*
+debian/postgresql-*-pgq3/*
debian/skytools3*/*
debian/skytools-pgq*/*
debian/skytools-londiste*/*
skytools-3.0 for Debian
-----------------------
-<this file describes information about the source package, see Debian policy
-manual section 4.14. You WILL either need to modify or delete this file>
-
+This package is maintained in git and uses a submodule. To get a fresh
+checkout and build the packages, follow those steps:
+ ## fetch git tree, from dimitri who maintains the debian package
+ ## real upstream is at git://github.com/markokr/skytools-dev.git
+ $ git clone http://github.com/dimitri/skytools.git
+ ## fetch libusual submodule
+ $ git submodule update --init
+ ## now build
+ $ debuild ...
-skytools3 (3.0~rc1-1) unstable; urgency=low
+skytools3 (3.0~rc1-2) experimental; urgency=low
- * Packaging reorg
- * Fixes: #621115 (ITP)
+ * Add automake to the Build Depends (Closes: #632574)
+ * Merge with upstream
+
+ -- Dimitri Fontaine <dim@tapoueh.org> Wed, 06 Jul 2011 16:07:12 +0200
+
+skytools3 (3.0~rc1-1) experimental; urgency=low
+
+ * New upstream version of skytools (Closes: #621115)
-- Dimitri Fontaine <dim@tapoueh.org> Mon, 28 Mar 2011 14:28:13 +0200
Section: database
Priority: extra
Maintainer: Dimitri Fontaine <dim@tapoueh.org>
-Build-Depends: debhelper (>= 7.0.50~), autotools-dev, autoconf (>= 2.65), python-all-dev, python-support, xmlto, asciidoc, libpq-dev, postgresql-server-dev-8.4, postgresql-server-dev-9.0
+Build-Depends: debhelper (>= 7.0.50~), autotools-dev, autoconf (>= 2.65), automake, libevent-dev, python-all-dev, python-support, python-psycopg2, xmlto, asciidoc, libpq-dev, postgresql-server-dev-all
Standards-Version: 3.9.1
Homepage: http://wiki.postgresql.org/wiki/Skytools
Vcs-Git: http://github.com/markokr/skytools.git
Package: skytools3-walmgr
Architecture: any
-Depends: ${misc:Depends}, ${python:Depends}, python-skytools3, python-psycopg2
+Depends: ${misc:Depends}, ${python:Depends}, python-skytools3, postgresql-8.4 | postgresql-9.0
Enhances: postgresql-8.4, postgresql-9.0
Description: Skype tools for PostgreSQL replication and failover
This is a package of tools in use in Skype for replication and failover.
is based on snapshot based event handling ideas from Slony-I, written for
general usage.
-Package: postgresql-8.4-pgq3
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-8.4
-Description: Skype tools for PostgreSQL replication, londiste and PGQ
- This is the PGQ extension used by Skype replication, londiste. It consists
- of PL/pgsql, and C code in database.
-
-Package: postgresql-9.0-pgq3
+Package: postgresql-9.1-pgq3
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-9.0
+Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-9.1
+Provides: skytools-modules
+Conflicts: skytools-modules-9.1
+Replaces: skytools-modules-9.1
Description: Skype tools for PostgreSQL replication, londiste and PGQ
This is the PGQ extension used by Skype replication, londiste. It consists
of PL/pgsql, and C code in database.
--- /dev/null
+Source: skytools3
+Section: database
+Priority: extra
+Maintainer: Dimitri Fontaine <dim@tapoueh.org>
+Build-Depends: debhelper (>= 7.0.50~), autotools-dev, autoconf (>= 2.65), automake, libevent-dev, python-all-dev, python-support, python-psycopg2, xmlto, asciidoc, libpq-dev, postgresql-server-dev-all
+Standards-Version: 3.9.1
+Homepage: http://wiki.postgresql.org/wiki/Skytools
+Vcs-Git: http://github.com/markokr/skytools.git
+Vcs-Browser: https://github.com/markokr/skytools
+
+Package: skytools3
+Architecture: any
+Depends: ${misc:Depends}, ${python:Depends}, python-pgq3, adduser
+Description: Skype tools for PostgreSQL replication, londiste and PGQ
+ This is a package of tools in use in Skype for replication and failover. It
+ contains the Londiste and PGQ services and scripts to run.
+
+Package: python-pgq3
+Architecture: any
+Section: python
+Depends: ${misc:Depends}, ${python:Depends}, python-skytools3, python-psycopg2
+Description: python framework for Skype tools for PostgreSQL replication
+ This is a package of tools in use in Skype for replication and failover.
+ It includes a generic queuing mechanism PgQ and utility library for Python
+ scripts.
+
+Package: python-skytools3
+Architecture: any
+Section: python
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Suggests: python-psycopg2
+Description: python framework for Skype tools for PostgreSQL replication
+ This is a package of tools in use in Skype for replication and failover.
+ It contains the Skytools' python framework for scripting against a
+ PostgreSQL database, which is used by londiste, walmgr and PGQ.
+
+Package: skytools3-walmgr
+Architecture: any
+Depends: ${misc:Depends}, ${python:Depends}, python-skytools3, postgresql-8.4 | postgresql-9.0
+Enhances: postgresql-8.4, postgresql-9.0
+Description: Skype tools for PostgreSQL replication and failover
+ This is a package of tools in use in Skype for replication and failover.
+ It's the WAL Shipping part of it (binary cluster-wide replication).
+
+Package: skytools3-ticker
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Skype tools for PostgreSQL replication, londiste and PGQ
+ This is the PGQ ticker used by Skype replication, londiste. It consists of
+ PL/pgsql, and C code in database, with Python framework on top of it. It
+ is based on snapshot based event handling ideas from Slony-I, written for
+ general usage.
+
+Package: postgresql-9.1-pgq3
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-9.1
+Provides: skytools-modules
+Conflicts: skytools-modules-9.1
+Replaces: skytools-modules-9.1
+Description: Skype tools for PostgreSQL replication, londiste and PGQ
+ This is the PGQ extension used by Skype replication, londiste. It consists
+ of PL/pgsql, and C code in database.
+
+Package: postgresql-PGVERSION-pgq3
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-PGVERSION
+Provides: skytools-modules
+Conflicts: skytools-modules-PGVERSION
+Replaces: skytools-modules-PGVERSION
+Description: Skype tools for PostgreSQL replication, londiste and PGQ
+ This is the PGQ extension used by Skype replication, londiste. It consists
+ of PL/pgsql, and C code in database.
The Debian packaging is:
Copyright (C) 2011 Dimitri Fontaine <dim@tapoueh.org>
+
+The file lib/usual/lookup3.c is public domain
+
+The file lib/test/attregex/testregex.c has its own copyright, reproduced here:
+
+/*
+ * regex(3) test harness
+ *
+ * build: cc -o testregex testregex.c
+ * help: testregex --man
+ * note: REG_* features are detected by #ifdef; if REG_* are enums
+ * then supply #define REG_foo REG_foo for each enum REG_foo
+ *
+ * Glenn Fowler <gsf@research.att.com>
+ * AT&T Research
+ *
+ * PLEASE: publish your tests so everyone can benefit
+ *
+ * The following license covers testregex.c and all associated test data.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of THIS SOFTWARE FILE (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of the
+ * Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following disclaimer:
+ *
+ * THIS SOFTWARE IS PROVIDED BY AT&T ``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 AT&T 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 files lib/test/tinytest.[ch] has their own copyright, reproduced here:
+
+/* tinytest.c -- Copyright 2009 Nick Mathewson
+ *
+ * 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.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * 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.
+ */
--- /dev/null
+# don't list here 9.1, it's hard-coded in debian/rules (yes, I know)
+8.3
+8.4
+9.0
usr/share/postgresql/8.4/contrib/pgq_coop.sql
usr/share/postgresql/8.4/contrib/londiste.upgrade.sql
usr/share/postgresql/8.4/contrib/uninstall_pgq.sql
+pgq_core_upgrade_to_v3.0.sql usr/share/postgresql/8.4/contrib/
usr/share/postgresql/9.0/contrib/pgq_coop.sql
usr/share/postgresql/9.0/contrib/londiste.upgrade.sql
usr/share/postgresql/9.0/contrib/uninstall_pgq.sql
+pgq_core_upgrade_to_v3.0.sql usr/share/postgresql/9.0/contrib/
--- /dev/null
+usr/share/doc/postgresql-9.1
--- /dev/null
+sql/pgq/README.pgq
+sql/pgq_ext/README.pgq_ext
--- /dev/null
+usr/lib/postgresql/9.1/lib/pgq_triggers.so
+usr/lib/postgresql/9.1/lib/pgq_lowlevel.so
+usr/share/postgresql/9.1/contrib/pgq.upgrade.sql
+usr/share/postgresql/9.1/contrib/txid.sql
+usr/share/postgresql/9.1/contrib/pgq_triggers.sql
+usr/share/postgresql/9.1/contrib/pgq_lowlevel.sql
+usr/share/postgresql/9.1/contrib/pgq_node.sql
+usr/share/postgresql/9.1/contrib/pgq_coop.upgrade.sql
+usr/share/postgresql/9.1/contrib/pgq_ext.sql
+usr/share/postgresql/9.1/contrib/londiste.sql
+usr/share/postgresql/9.1/contrib/pgq_node.upgrade.sql
+usr/share/postgresql/9.1/contrib/pgq.sql
+usr/share/postgresql/9.1/contrib/pgq_coop.sql
+usr/share/postgresql/9.1/contrib/londiste.upgrade.sql
+usr/share/postgresql/9.1/contrib/uninstall_pgq.sql
+pgq_core_upgrade_to_v3.0.sql usr/share/postgresql/9.1/contrib/
# This has to be exported to make some magic below work.
export DH_OPTIONS
-# The build system is averse to VPATH building, so we can't use postgresql-server-dev-all
-PG_CONFIG_84=/usr/lib/postgresql/8.4/bin/pg_config
-PG_CONFIG_90=/usr/lib/postgresql/9.0/bin/pg_config
+# The build system is averse to VPATH building, so we can't properly use
+# postgresql-server-dev-all
+SRCDIR = $(CURDIR)
+PG_CONFIG_91=/usr/lib/postgresql/9.1/bin/pg_config
+PKGVERS = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Version:/ { print substr($$2, 2) }')
+ORIG_EXCLUDE=--exclude-vcs --exclude=debian
+
+include /usr/share/postgresql-common/pgxs_debian_control.mk
config.mak:
autoreconf -I lib/m4
override_dh_auto_configure:
-override_dh_auto_clean: config.mak
+override_dh_auto_clean: config.mak debian/control
make -C lib distclean
+ make -C doc realclean
dh_auto_clean -- distclean
- rm -rf $(SRCDIR)/debian
+ rm -f upgrade/final/v3.0_pgq_core.sql
+ for version in $$(pg_buildext supported-versions .) ; do \
+ rm -rf debian/postgresql-$$version-pgq3; \
+ done
override_dh_auto_build: config.mak lib/build
- dh_auto_build -- SQLDIR=/usr/share/skytools3 PG_CONFIG=$(PG_CONFIG_90)
+ dh_auto_build -- SQLDIR=/usr/share/skytools3 PG_CONFIG=$(PG_CONFIG_91)
+ make -C upgrade
# upstream build system will build fine for one given PostgreSQL version,
# then we build the PostgreSQL module and files for yet another version of
# it so that we have binary packages for postgresql-8.4-pgq3 and 9.0.
override_dh_auto_install:
- dh_auto_install
- for d in sql/pgq sql/pgq_node sql/pgq_ext sql/pgq_coop sql/txid sql/londiste; do \
- make PG_CONFIG=$(PG_CONFIG_84) \
- DESTDIR=$(CURDIR)/debian/tmp \
- -C $$d clean install \
- || exit 1 ;\
+ mkdir -p $(CURDIR)/debian/tmp
+ cp -a upgrade/final/v3.0_pgq_core.sql $(CURDIR)/debian/tmp/pgq_core_upgrade_to_v3.0.sql
+ dh_auto_install -- SQLDIR=/usr/share/skytools3 PG_CONFIG=$(PG_CONFIG_91)
+ # now care about any previous supported versions
+ for version in $$(pg_buildext supported-versions .) ; do \
+ echo "### Building for PostgreSQL $$version" && \
+ for d in sql/pgq sql/pgq_node sql/pgq_ext sql/pgq_coop sql/txid sql/londiste; do \
+ make PG_CONFIG=/usr/lib/postgresql/$$version/bin/pg_config \
+ DESTDIR=$(CURDIR)/debian/tmp \
+ -C $$d clean install \
+ || exit 1 ;\
+ done; \
done
lib/build:
chmod +x lib/find_modules.sh
+orig: clean
+ cd .. && tar czf skytools3_$(PKGVERS).orig.tar.gz $(ORIG_EXCLUDE) skytools
+
%:
dh $@
--- /dev/null
+#!/bin/sh
+# postinst script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ # scripts alternatives
+ bin=/usr/bin
+ man=/usr/share/man/man1
+ for f in walmgr
+ do
+ update-alternatives --install $bin/${f} $f $bin/${f}3 3 \
+ --slave $man/${f}.1.gz $f.1 $man/${f}3.1.gz || exit 1
+ done
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+case $1 in
+ configure)
+ for f in walmgr; do
+ update-alternatives --remove $f /usr/bin/${f}3 || exit 1 ;
+ done;;
+esac
+
+#DEBHELPER#
#!/bin/sh
### BEGIN INIT INFO
-# Provides: skytools-3.0
+# Provides: skytools3
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
if getent passwd skytools > /dev/null; then
echo user skytools already exists
else
- adduser --system --no-create-home --group --disabled-login skytools
+ adduser --system --no-create-home --home /var/lib/skytools --group --disabled-login skytools
fi
# care for transient data directories
install -o skytools -g skytools -d /var/log/skytools /var/run/skytools
# scripts alternatives
- for f in /usr/bin/londiste3 /usr/bin/scriptmgr3 \
- /usr/bin/queue_mover3 /usr/bin/queue_splitter3
+ bin=/usr/bin
+ man=/usr/share/man/man1
+ for f in londiste scriptmgr queue_mover queue_splitter
do
- link=`echo $f |cut -d3 -f1`
- name=`basename $f |cut -d3 -f1`
- update-alternatives --install $link $name $f 3
+ update-alternatives --install $bin/${f} $f $bin/${f}3 3 \
+ --slave $man/${f}.1.gz $f.1 $man/${f}3.1.gz || exit 1
done
-
- # man pages alternatives
- for m in /usr/share/man/man1/scriptmgr3.1.gz \
- /usr/share/man/man1/pgqadm3.1.gz /usr/share/man/man1/londiste3.1.gz \
- /usr/share/man/man1/queue_mover3.1.gz /usr/share/man/man1/queue_splitter3.1.gz
- do
- link=`echo $m |cut -d3 -f1`
- name=`basename $m 3.1.gz`
- update-alternatives --install $link "$name.1.gz" $m 3
- done
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
;;
esac
+++ /dev/null
-# Automatically added by dh_installinit
-if [ "$1" = "purge" ] ; then
- update-rc.d skytools3 remove >/dev/null
-fi
-# End automatically added section
-
-
-# scripts alternatives
-for f in /usr/bin/londiste3 /usr/bin/scriptmgr3 \
- /usr/bin/queue_mover3 /usr/bin/queue_splitter3
-do
- name=`basename $f |cut -d3 -f1`
- update-alternatives --remove $name $f
-done
-
-# man pages alternatives
-for m in /usr/share/man/man1/scriptmgr3.1.gz \
- /usr/share/man/man1/pgqadm3.1.gz /usr/share/man/man1/londiste3.1.gz \
- /usr/share/man/man1/queue_mover3.1.gz /usr/share/man/man1/queue_splitter3.1.gz
-do
- name=`basename $m 3.1.gz`
- update-alternatives --remove $link "$name.1.gz"
-done
--- /dev/null
+#!/bin/sh -e
+
+case $1 in
+ configure)
+ for f in londiste scriptmgr queue_mover queue_splitter; do
+ update-alternatives --remove $f /usr/bin/${f}3 || exit 1 ;
+ done;;
+esac
+
+#DEBHELPER#
lib/libusual.a
-lib/obj/cxextra.o
-lib/obj/time.o
-lib/obj/base.o
-lib/obj/regex.o
-lib/obj/strpool.o
-lib/obj/cbtree.o
-lib/obj/daemon.o
-lib/obj/netdb.o
-lib/obj/crc32.o
-lib/obj/logging.o
-lib/obj/aatree.o
-lib/obj/list.o
-lib/obj/mempool.o
-lib/obj/socket.o
-lib/obj/lookup3.o
-lib/obj/slab.o
-lib/obj/err.o
-lib/obj/heap.o
-lib/obj/cxalloc.o
-lib/obj/mdict.o
-lib/obj/utf8.o
-lib/obj/pthread.o
-lib/obj/cfparser.o
lib/obj/testcompile
-lib/obj/pgutil.o
-lib/obj/string.o
-lib/obj/event.o
-lib/obj/md5.o
-lib/obj/sha1.o
-lib/obj/signal.o
-lib/obj/fileutil.o
-lib/obj/mbuf.o
-lib/obj/safeio.o