mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
Update to 1.1.0
PR: ports/82589 Submitted by: Vivek Khera <vivek@khera.org> (maintainer)
This commit is contained in:
parent
cc2c701842
commit
be10df55cf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=137974
@ -6,73 +6,61 @@
|
||||
#
|
||||
|
||||
PORTNAME= slony1
|
||||
PORTVERSION= 1.0.5
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 1.1.0
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= http://developer.postgresql.org/~wieck/slony1/download/
|
||||
|
||||
MAINTAINER= vivek@khera.org
|
||||
COMMENT= PostgreSQL master to multiple slaves replication system
|
||||
COMMENT= PostgreSQL master to multiple replicas replication system
|
||||
|
||||
PGSQL_PORT= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
|
||||
BUILD_DEPENDS= ${NONEXISTENT}:${PGSQL_PORT}:configure
|
||||
.if ! defined(NOPORTDOCS)
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/pnmtops:${PORTSDIR}/graphics/netpbm \
|
||||
${LOCALBASE}/bin/djpeg:${PORTSDIR}/graphics/jpeg \
|
||||
${LOCALBASE}/bin/ps2pdf:${PORTSDIR}/print/ghostscript-gnu
|
||||
.else
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-GNUmakefile.in
|
||||
.endif
|
||||
RUN_DEPENDS= ${LOCALBASE}/bin/postmaster:${PGSQL_PORT}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_BISON= yes
|
||||
USE_GETTEXT= yes
|
||||
USE_GMAKE= yes
|
||||
PGSQL_SRC= `cd ${PGSQL_PORT}; make -V WRKSRC`
|
||||
CONFIGURE_ARGS= --with-pgsourcetree=${PGSQL_SRC}
|
||||
USE_BZIP2= yes
|
||||
USE_RC_SUBR= slon.sh
|
||||
|
||||
PLIST_FILES= bin/slon bin/slonik bin/slony_setup.pl \
|
||||
lib/postgresql/slony1_funcs.so lib/postgresql/xxid.so \
|
||||
share/postgresql/slony1_base.sql \
|
||||
share/postgresql/slony1_funcs.sql \
|
||||
share/postgresql/slony1_base.v73.sql \
|
||||
share/postgresql/slony1_base.v74.sql \
|
||||
share/postgresql/slony1_funcs.v73.sql \
|
||||
share/postgresql/slony1_funcs.v74.sql \
|
||||
share/postgresql/xxid.v73.sql \
|
||||
share/postgresql/xxid.v74.sql
|
||||
PORTDOCS= *.pdf howto COPYRIGHT README slonik_commands.html
|
||||
SUB_FILES= pkg-message slon-mkservice.sh
|
||||
SUB_LIST+= NAME=slon
|
||||
|
||||
DEFAULT_PGSQL_VER?=74
|
||||
OPTIONS= PERLTOOLS "Install perl configuration tools" Off
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_PERLTOOLS)
|
||||
USE_PERL5_RUN= yes
|
||||
CONFIGURE_ARGS+= --with-perltools=${LOCALBASE}/sbin
|
||||
PLIST_SUB+= PERLTOOLS=""
|
||||
SUB_LIST+= PERLTOOLS=""
|
||||
.else
|
||||
PLIST_SUB+= PERLTOOLS="@comment "
|
||||
SUB_LIST+= PERLTOOLS="@comment "
|
||||
.endif
|
||||
|
||||
DEFAULT_PGSQL_VER?=80
|
||||
|
||||
# Setting/finding PostgreSQL version we want.
|
||||
.if exists(${LOCALBASE}/bin/postmaster)
|
||||
PGSQL_VER!= ${LOCALBASE}/bin/postmaster -V | \
|
||||
${SED} -n 's/postmaster.*PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
|
||||
${SED} -En 's/postmaster.*PostgreSQL[^0-9]*([0-9]+)\.([0-9]+)\..*/\1\2/p'
|
||||
.elif exists(${LOCALBASE}/bin/pg_config)
|
||||
PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
|
||||
PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | \
|
||||
${SED} -En 's/PostgreSQL[^0-9]*([0-9]*)\.([0-9]+)\..*/\1\2/p'
|
||||
.else
|
||||
PGSQL_VER= ${DEFAULT_PGSQL_VER}
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
cd ${PGSQL_SRC}/src/interfaces/libpq && ${GMAKE} all
|
||||
cd ${PGSQL_SRC}/src/port && ${GMAKE} all
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC} && ${GMAKE} install
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/tools/slony_setup.pl ${PREFIX}/bin
|
||||
post-install:
|
||||
.if ! defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${WRKSRC}/README ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/concept/Slony-I-concept.pdf ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/implementation/Slony-I-implementation.pdf ${DOCSDIR}
|
||||
${MKDIR} ${DOCSDIR}/howto
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/howto/*.txt ${DOCSDIR}/howto
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/howto/slonik_commands.html ${DOCSDIR}
|
||||
${MKDIR} ${DOCSDIR}/adminguide
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${WRKSRC}/INSTALL ${WRKSRC}/SAMPLE ${WRKSRC}/README ${WRKSRC}/UPGRADING ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*/*.pdf ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/adminguide/prebuilt/*.html ${DOCSDIR}/adminguide/
|
||||
.endif
|
||||
${CAT} ${PKGMESSAGE}
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/slon-mkservice.sh ${PREFIX}/sbin/slon-mkservice
|
||||
@${INSTALL_DATA} ${FILESDIR}/slon.conf-sample ${PREFIX}/etc/
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (slony1-1.0.5.tar.gz) = 66fcc0f53028101e4e0f969e5f47fe43
|
||||
SIZE (slony1-1.0.5.tar.gz) = 374903
|
||||
MD5 (slony1-1.1.0.tar.bz2) = a2d738840dc2ce5fc3f7fa27c5a434dc
|
||||
SIZE (slony1-1.1.0.tar.bz2) = 1183776
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- GNUmakefile.in.orig Thu Jun 10 11:09:18 2004
|
||||
+++ GNUmakefile.in Mon Jun 28 02:16:04 2004
|
||||
@@ -25,7 +25,7 @@
|
||||
$(wildcard makefiles/*)
|
||||
|
||||
|
||||
-SUBDIRS = src doc
|
||||
+SUBDIRS = src
|
||||
|
||||
all:
|
||||
for subdir in $(SUBDIRS) ; do \
|
@ -1,14 +0,0 @@
|
||||
--- doc/Makefile.orig Thu Mar 18 20:32:21 2004
|
||||
+++ doc/Makefile Wed Jun 23 17:30:53 2004
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
DISTFILES = Makefile
|
||||
|
||||
-all install installdirs:
|
||||
+install installdirs:
|
||||
|
||||
-clean distclean maintainer-clean:
|
||||
+all clean distclean maintainer-clean:
|
||||
for subdir in $(SUBDIRS) ; do \
|
||||
$(MAKE) -C $$subdir $@ ; \
|
||||
done
|
@ -1,17 +0,0 @@
|
||||
Index: src/slon/cleanup_thread.c
|
||||
===================================================================
|
||||
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/cleanup_thread.c,v
|
||||
retrieving revision 1.13.2.4
|
||||
retrieving revision 1.13.2.5
|
||||
diff -u -r1.13.2.4 -r1.13.2.5
|
||||
--- cleanup_thread.c 30 Sep 2004 17:45:06 -0000 1.13.2.4
|
||||
+++ cleanup_thread.c 12 Jan 2005 03:15:36 -0000 1.13.2.5
|
||||
@@ -145,7 +145,7 @@
|
||||
"delete from %s.sl_log_1 "
|
||||
"where log_origin = '%s' "
|
||||
"and log_xid < '%s'; "
|
||||
- "delete from %s.sl_log_1 "
|
||||
+ "delete from %s.sl_log_2 "
|
||||
"where log_origin = '%s' "
|
||||
"and log_xid < '%s'; "
|
||||
"delete from %s.sl_seqlog "
|
26
databases/slony1/files/pkg-message.in
Normal file
26
databases/slony1/files/pkg-message.in
Normal file
@ -0,0 +1,26 @@
|
||||
**********************************************************************
|
||||
|
||||
|
||||
Please read the docs on configuring and runing slony-1. Unless you specified
|
||||
NOPORTDOCS, they are in the %%LOCALBASE%%/share/doc/slony1 directory.
|
||||
|
||||
If you are upgrading from a prior version of slony, please read the UPGRADING
|
||||
file in the above docs directory.
|
||||
|
||||
The script %%LOCALBASE%%/sbin/slon-mkservice can be used to create a control
|
||||
directory to run and monitor the slon daemon under svscan from daemontools.
|
||||
If you use this, be sure not to set slon_enable="YES" in /etc/rc.conf.
|
||||
|
||||
If you prefer to use the standard startup script in %%LOCALBASE%%/etc/rc.d then
|
||||
set slon_enable="YES" in /etc/rc.conf to enable the slon.sh script.
|
||||
|
||||
To use either of the above startup configurations, you will need to set up a
|
||||
%%LOCALBASE%%/etc/slon.conf file to tell slon what to replicate. This file
|
||||
is documented in %%LOCALBASE%%/share/doc/slony1/adminguide/runtime-config.html
|
||||
|
||||
%%PERLTOOLS%%To use the perl slony configuration and monitoring tools, you must
|
||||
%%PERLTOOLS%%create %%LOCALBASE%%/etc/slon_tools.conf based on the sample file.
|
||||
|
||||
|
||||
|
||||
**********************************************************************
|
38
databases/slony1/files/slon-mkservice.sh.in
Normal file
38
databases/slony1/files/slon-mkservice.sh.in
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create a slon service directory for use with svscan from deamontools
|
||||
|
||||
echo -n 'specify directory for "slon" service like "/var/slon-master": '
|
||||
read DIR
|
||||
if [ -z "$DIR" ]; then
|
||||
echo "Directory must be non-empty"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo -n 'System user name for programs to run under (default pgsql): '
|
||||
read sysuser
|
||||
if [ -z "$sysuser" ]; then
|
||||
echo "User name pgsql being used."
|
||||
sysuser='pgsql'
|
||||
fi
|
||||
|
||||
mkdir -p ${DIR}/env ${DIR}/supervise || exit 1
|
||||
mkdir -p ${DIR}/log/main ${DIR}/log/supervise || exit 1
|
||||
|
||||
cat > ${DIR}/run <<EOF
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
|
||||
exec envdir ./env sh -c 'exec envuidgid ${sysuser} slon -f \${CONFIGFILE}'
|
||||
EOF
|
||||
chmod +x ${DIR}/run
|
||||
|
||||
cat >${DIR}/log/run <<EOF
|
||||
#!/bin/sh
|
||||
exec setuidgid ${sysuser} multilog t ./main
|
||||
EOF
|
||||
chmod +x ${DIR}/log/run
|
||||
|
||||
echo "%%PREFIX%%/etc/slon.conf" > ${DIR}/env/CONFIGFILE
|
||||
|
||||
chown -R ${sysuser} ${DIR}
|
16
databases/slony1/files/slon.conf-sample
Normal file
16
databases/slony1/files/slon.conf-sample
Normal file
@ -0,0 +1,16 @@
|
||||
# sample config file. see share/doc/slony1/runtime-config.html
|
||||
# values are overridden by command line options.
|
||||
# not all settings are shown here.
|
||||
|
||||
syslog 0
|
||||
log_level 4
|
||||
log_timestamp 1
|
||||
|
||||
cluster_name sample
|
||||
conn_info 'dbname=pgbench user=postgres host=localhost port=5432'
|
||||
|
||||
#sync_interval 100
|
||||
#sync_interval_timeout 1000
|
||||
#sync_group_maxsize 6
|
||||
#vac_frequency 3
|
||||
#desired_sync_time 60000
|
30
databases/slony1/files/slon.sh.in
Normal file
30
databases/slony1/files/slon.sh.in
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: %%NAME%%
|
||||
# REQUIRE: postgresql
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
|
||||
# Add the following line to /etc/rc.conf to enable `%%NAME%%':
|
||||
#
|
||||
#%%NAME%%_enable="YES"
|
||||
#
|
||||
# and be sure to configure %%PREFIX%%/etc/%%NAME%%.conf
|
||||
|
||||
. "%%RC_SUBR%%"
|
||||
|
||||
name="%%NAME%%"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
pidfile="/var/run/$name.pid"
|
||||
command="%%PREFIX%%/bin/slon"
|
||||
command_args="-f %%PREFIX%%/etc/$name.conf -p $pidfile"
|
||||
required_files="%%PREFIX%%/etc/$name.conf"
|
||||
|
||||
# read configuration and set defaults
|
||||
load_rc_config "$name"
|
||||
: ${%%NAME%%_enable="NO"}
|
||||
|
||||
run_rc_command "$1"
|
@ -10,4 +10,4 @@ Slony-I is developed as a system for data centers and backup
|
||||
sites, where the normal mode of operation is that all nodes
|
||||
are available.
|
||||
|
||||
WWW: http://www.slony.org/
|
||||
WWW: http://www.slony.info/
|
||||
|
@ -1,8 +0,0 @@
|
||||
For running slony1 you need:
|
||||
slony postgresql superuser with password set
|
||||
slony system user (makes auth. of slony db user easier)
|
||||
TCP/IP enabled in postgresql (for replication of non local db)
|
||||
|
||||
There is a perl script slony_setup.pl which helps you to create initial
|
||||
configuration. Installing this package do not makes any needed system
|
||||
changes.
|
@ -6,73 +6,61 @@
|
||||
#
|
||||
|
||||
PORTNAME= slony1
|
||||
PORTVERSION= 1.0.5
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 1.1.0
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= http://developer.postgresql.org/~wieck/slony1/download/
|
||||
|
||||
MAINTAINER= vivek@khera.org
|
||||
COMMENT= PostgreSQL master to multiple slaves replication system
|
||||
COMMENT= PostgreSQL master to multiple replicas replication system
|
||||
|
||||
PGSQL_PORT= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
|
||||
BUILD_DEPENDS= ${NONEXISTENT}:${PGSQL_PORT}:configure
|
||||
.if ! defined(NOPORTDOCS)
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/pnmtops:${PORTSDIR}/graphics/netpbm \
|
||||
${LOCALBASE}/bin/djpeg:${PORTSDIR}/graphics/jpeg \
|
||||
${LOCALBASE}/bin/ps2pdf:${PORTSDIR}/print/ghostscript-gnu
|
||||
.else
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-GNUmakefile.in
|
||||
.endif
|
||||
RUN_DEPENDS= ${LOCALBASE}/bin/postmaster:${PGSQL_PORT}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_BISON= yes
|
||||
USE_GETTEXT= yes
|
||||
USE_GMAKE= yes
|
||||
PGSQL_SRC= `cd ${PGSQL_PORT}; make -V WRKSRC`
|
||||
CONFIGURE_ARGS= --with-pgsourcetree=${PGSQL_SRC}
|
||||
USE_BZIP2= yes
|
||||
USE_RC_SUBR= slon.sh
|
||||
|
||||
PLIST_FILES= bin/slon bin/slonik bin/slony_setup.pl \
|
||||
lib/postgresql/slony1_funcs.so lib/postgresql/xxid.so \
|
||||
share/postgresql/slony1_base.sql \
|
||||
share/postgresql/slony1_funcs.sql \
|
||||
share/postgresql/slony1_base.v73.sql \
|
||||
share/postgresql/slony1_base.v74.sql \
|
||||
share/postgresql/slony1_funcs.v73.sql \
|
||||
share/postgresql/slony1_funcs.v74.sql \
|
||||
share/postgresql/xxid.v73.sql \
|
||||
share/postgresql/xxid.v74.sql
|
||||
PORTDOCS= *.pdf howto COPYRIGHT README slonik_commands.html
|
||||
SUB_FILES= pkg-message slon-mkservice.sh
|
||||
SUB_LIST+= NAME=slon
|
||||
|
||||
DEFAULT_PGSQL_VER?=74
|
||||
OPTIONS= PERLTOOLS "Install perl configuration tools" Off
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_PERLTOOLS)
|
||||
USE_PERL5_RUN= yes
|
||||
CONFIGURE_ARGS+= --with-perltools=${LOCALBASE}/sbin
|
||||
PLIST_SUB+= PERLTOOLS=""
|
||||
SUB_LIST+= PERLTOOLS=""
|
||||
.else
|
||||
PLIST_SUB+= PERLTOOLS="@comment "
|
||||
SUB_LIST+= PERLTOOLS="@comment "
|
||||
.endif
|
||||
|
||||
DEFAULT_PGSQL_VER?=80
|
||||
|
||||
# Setting/finding PostgreSQL version we want.
|
||||
.if exists(${LOCALBASE}/bin/postmaster)
|
||||
PGSQL_VER!= ${LOCALBASE}/bin/postmaster -V | \
|
||||
${SED} -n 's/postmaster.*PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
|
||||
${SED} -En 's/postmaster.*PostgreSQL[^0-9]*([0-9]+)\.([0-9]+)\..*/\1\2/p'
|
||||
.elif exists(${LOCALBASE}/bin/pg_config)
|
||||
PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
|
||||
PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | \
|
||||
${SED} -En 's/PostgreSQL[^0-9]*([0-9]*)\.([0-9]+)\..*/\1\2/p'
|
||||
.else
|
||||
PGSQL_VER= ${DEFAULT_PGSQL_VER}
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
cd ${PGSQL_SRC}/src/interfaces/libpq && ${GMAKE} all
|
||||
cd ${PGSQL_SRC}/src/port && ${GMAKE} all
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC} && ${GMAKE} install
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/tools/slony_setup.pl ${PREFIX}/bin
|
||||
post-install:
|
||||
.if ! defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${WRKSRC}/README ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/concept/Slony-I-concept.pdf ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/implementation/Slony-I-implementation.pdf ${DOCSDIR}
|
||||
${MKDIR} ${DOCSDIR}/howto
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/howto/*.txt ${DOCSDIR}/howto
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/howto/slonik_commands.html ${DOCSDIR}
|
||||
${MKDIR} ${DOCSDIR}/adminguide
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${WRKSRC}/INSTALL ${WRKSRC}/SAMPLE ${WRKSRC}/README ${WRKSRC}/UPGRADING ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/*/*.pdf ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/adminguide/prebuilt/*.html ${DOCSDIR}/adminguide/
|
||||
.endif
|
||||
${CAT} ${PKGMESSAGE}
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/slon-mkservice.sh ${PREFIX}/sbin/slon-mkservice
|
||||
@${INSTALL_DATA} ${FILESDIR}/slon.conf-sample ${PREFIX}/etc/
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (slony1-1.0.5.tar.gz) = 66fcc0f53028101e4e0f969e5f47fe43
|
||||
SIZE (slony1-1.0.5.tar.gz) = 374903
|
||||
MD5 (slony1-1.1.0.tar.bz2) = a2d738840dc2ce5fc3f7fa27c5a434dc
|
||||
SIZE (slony1-1.1.0.tar.bz2) = 1183776
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- GNUmakefile.in.orig Thu Jun 10 11:09:18 2004
|
||||
+++ GNUmakefile.in Mon Jun 28 02:16:04 2004
|
||||
@@ -25,7 +25,7 @@
|
||||
$(wildcard makefiles/*)
|
||||
|
||||
|
||||
-SUBDIRS = src doc
|
||||
+SUBDIRS = src
|
||||
|
||||
all:
|
||||
for subdir in $(SUBDIRS) ; do \
|
@ -1,14 +0,0 @@
|
||||
--- doc/Makefile.orig Thu Mar 18 20:32:21 2004
|
||||
+++ doc/Makefile Wed Jun 23 17:30:53 2004
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
DISTFILES = Makefile
|
||||
|
||||
-all install installdirs:
|
||||
+install installdirs:
|
||||
|
||||
-clean distclean maintainer-clean:
|
||||
+all clean distclean maintainer-clean:
|
||||
for subdir in $(SUBDIRS) ; do \
|
||||
$(MAKE) -C $$subdir $@ ; \
|
||||
done
|
@ -1,17 +0,0 @@
|
||||
Index: src/slon/cleanup_thread.c
|
||||
===================================================================
|
||||
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/cleanup_thread.c,v
|
||||
retrieving revision 1.13.2.4
|
||||
retrieving revision 1.13.2.5
|
||||
diff -u -r1.13.2.4 -r1.13.2.5
|
||||
--- cleanup_thread.c 30 Sep 2004 17:45:06 -0000 1.13.2.4
|
||||
+++ cleanup_thread.c 12 Jan 2005 03:15:36 -0000 1.13.2.5
|
||||
@@ -145,7 +145,7 @@
|
||||
"delete from %s.sl_log_1 "
|
||||
"where log_origin = '%s' "
|
||||
"and log_xid < '%s'; "
|
||||
- "delete from %s.sl_log_1 "
|
||||
+ "delete from %s.sl_log_2 "
|
||||
"where log_origin = '%s' "
|
||||
"and log_xid < '%s'; "
|
||||
"delete from %s.sl_seqlog "
|
26
databases/slony1v2/files/pkg-message.in
Normal file
26
databases/slony1v2/files/pkg-message.in
Normal file
@ -0,0 +1,26 @@
|
||||
**********************************************************************
|
||||
|
||||
|
||||
Please read the docs on configuring and runing slony-1. Unless you specified
|
||||
NOPORTDOCS, they are in the %%LOCALBASE%%/share/doc/slony1 directory.
|
||||
|
||||
If you are upgrading from a prior version of slony, please read the UPGRADING
|
||||
file in the above docs directory.
|
||||
|
||||
The script %%LOCALBASE%%/sbin/slon-mkservice can be used to create a control
|
||||
directory to run and monitor the slon daemon under svscan from daemontools.
|
||||
If you use this, be sure not to set slon_enable="YES" in /etc/rc.conf.
|
||||
|
||||
If you prefer to use the standard startup script in %%LOCALBASE%%/etc/rc.d then
|
||||
set slon_enable="YES" in /etc/rc.conf to enable the slon.sh script.
|
||||
|
||||
To use either of the above startup configurations, you will need to set up a
|
||||
%%LOCALBASE%%/etc/slon.conf file to tell slon what to replicate. This file
|
||||
is documented in %%LOCALBASE%%/share/doc/slony1/adminguide/runtime-config.html
|
||||
|
||||
%%PERLTOOLS%%To use the perl slony configuration and monitoring tools, you must
|
||||
%%PERLTOOLS%%create %%LOCALBASE%%/etc/slon_tools.conf based on the sample file.
|
||||
|
||||
|
||||
|
||||
**********************************************************************
|
38
databases/slony1v2/files/slon-mkservice.sh.in
Normal file
38
databases/slony1v2/files/slon-mkservice.sh.in
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create a slon service directory for use with svscan from deamontools
|
||||
|
||||
echo -n 'specify directory for "slon" service like "/var/slon-master": '
|
||||
read DIR
|
||||
if [ -z "$DIR" ]; then
|
||||
echo "Directory must be non-empty"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo -n 'System user name for programs to run under (default pgsql): '
|
||||
read sysuser
|
||||
if [ -z "$sysuser" ]; then
|
||||
echo "User name pgsql being used."
|
||||
sysuser='pgsql'
|
||||
fi
|
||||
|
||||
mkdir -p ${DIR}/env ${DIR}/supervise || exit 1
|
||||
mkdir -p ${DIR}/log/main ${DIR}/log/supervise || exit 1
|
||||
|
||||
cat > ${DIR}/run <<EOF
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
|
||||
exec envdir ./env sh -c 'exec envuidgid ${sysuser} slon -f \${CONFIGFILE}'
|
||||
EOF
|
||||
chmod +x ${DIR}/run
|
||||
|
||||
cat >${DIR}/log/run <<EOF
|
||||
#!/bin/sh
|
||||
exec setuidgid ${sysuser} multilog t ./main
|
||||
EOF
|
||||
chmod +x ${DIR}/log/run
|
||||
|
||||
echo "%%PREFIX%%/etc/slon.conf" > ${DIR}/env/CONFIGFILE
|
||||
|
||||
chown -R ${sysuser} ${DIR}
|
16
databases/slony1v2/files/slon.conf-sample
Normal file
16
databases/slony1v2/files/slon.conf-sample
Normal file
@ -0,0 +1,16 @@
|
||||
# sample config file. see share/doc/slony1/runtime-config.html
|
||||
# values are overridden by command line options.
|
||||
# not all settings are shown here.
|
||||
|
||||
syslog 0
|
||||
log_level 4
|
||||
log_timestamp 1
|
||||
|
||||
cluster_name sample
|
||||
conn_info 'dbname=pgbench user=postgres host=localhost port=5432'
|
||||
|
||||
#sync_interval 100
|
||||
#sync_interval_timeout 1000
|
||||
#sync_group_maxsize 6
|
||||
#vac_frequency 3
|
||||
#desired_sync_time 60000
|
30
databases/slony1v2/files/slon.sh.in
Normal file
30
databases/slony1v2/files/slon.sh.in
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: %%NAME%%
|
||||
# REQUIRE: postgresql
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
|
||||
# Add the following line to /etc/rc.conf to enable `%%NAME%%':
|
||||
#
|
||||
#%%NAME%%_enable="YES"
|
||||
#
|
||||
# and be sure to configure %%PREFIX%%/etc/%%NAME%%.conf
|
||||
|
||||
. "%%RC_SUBR%%"
|
||||
|
||||
name="%%NAME%%"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
pidfile="/var/run/$name.pid"
|
||||
command="%%PREFIX%%/bin/slon"
|
||||
command_args="-f %%PREFIX%%/etc/$name.conf -p $pidfile"
|
||||
required_files="%%PREFIX%%/etc/$name.conf"
|
||||
|
||||
# read configuration and set defaults
|
||||
load_rc_config "$name"
|
||||
: ${%%NAME%%_enable="NO"}
|
||||
|
||||
run_rc_command "$1"
|
@ -10,4 +10,4 @@ Slony-I is developed as a system for data centers and backup
|
||||
sites, where the normal mode of operation is that all nodes
|
||||
are available.
|
||||
|
||||
WWW: http://www.slony.org/
|
||||
WWW: http://www.slony.info/
|
||||
|
@ -1,8 +0,0 @@
|
||||
For running slony1 you need:
|
||||
slony postgresql superuser with password set
|
||||
slony system user (makes auth. of slony db user easier)
|
||||
TCP/IP enabled in postgresql (for replication of non local db)
|
||||
|
||||
There is a perl script slony_setup.pl which helps you to create initial
|
||||
configuration. Installing this package do not makes any needed system
|
||||
changes.
|
Loading…
Reference in New Issue
Block a user