Update pgpool-ha to 3.0 version.
authorTAKATSUKA Haruka <harukat@sraoss.co.jp>
Sun, 1 May 2016 17:03:32 +0000 (02:03 +0900)
committerTAKATSUKA Haruka <harukat@sraoss.co.jp>
Sun, 1 May 2016 17:03:32 +0000 (02:03 +0900)
- Abolish some files.
- Change the install method
- support pgpool-II 3.5.x
- rewrite REMADME

AUTHORS [deleted file]
INSTALL [deleted file]
Makefile.in [deleted file]
NEWS [deleted file]
README.md [moved from README with 100% similarity]
configure.sh [deleted file]
pgpool-ha.spec [deleted file]
test.sh [deleted file]

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644 (file)
index 7af07af..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-pgpool-ha was written by
- TANIDA Yutaka (tanida@sraoss.co.jp),
- TAKATSUKA Haruka (harukat@sraoss.co.jp)
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index 4bc67a1..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,27 +0,0 @@
-install
-=======
-
-# tar jxf pgpool-ha-2.x.tar.bz2
-
-# cd pgpool-ha-2.x
-
-# ./configure.sh --help
-options:
- --with-pgsql  PostgreSQL install path
- --with-pgpool pgpool install path
- --with-ocf    OCF RA files path
-
-# ./configure.sh --with-pgpool=/usr/local --with-pgsql=/usr/pgsql-9.1
-PGSQL_DIR: /usr/pgsql-9.1
-PGPOOL_DIR: /usr/local
-OCF_DIR: /usr/lib/ocf/resource.d/heartbeat
-Makefile generated
-
-# make
-sed -e 's#@_PGSQL_DIR_@#/usr/pgsql-9.1#g' < pgpool.in | \
-       sed -e 's#@_PGPOOL_DIR_@#/usr/local#g' | \
-       sed -e 's#@_OCF_DIR_@#/usr/lib/ocf/resource.d/heartbeat#g' > pgpool
-
-# make intall
-/usr/bin/install -c -m 755 pgpool /usr/lib/ocf/resource.d/heartbeat
-
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644 (file)
index 806b973..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-TARGET = pgpool
-SRCS = pgpool.in
-PGSQL_DIR=@PGSQL_DIR@
-PGPOOL_DIR=@PGPOOL_DIR@
-OCF_DIR=@OCF_DIR@
-INSTALL=@INSTALL@ -c -m 755
-INSTALL_PROGRAM=${INSTALL}
-
-all: pgpool
-
-pgpool: pgpool.in Makefile
-       sed -e 's#@_PGSQL_DIR_@#${PGSQL_DIR}#g' < pgpool.in | \
-       sed -e 's#@_PGPOOL_DIR_@#${PGPOOL_DIR}#g' | \
-       sed -e 's#@_OCF_DIR_@#${OCF_DIR}#g' > pgpool
-
-install: all
-       $(INSTALL_PROGRAM) pgpool ${OCF_DIR}
-
-clean:
-       rm -f pgpool
-
-distclean:
-       rm -f pgpool Makefile config.log
-
-dist:
-       cp -R . /tmp/pgpool-ha-@VERSION@
-       mv /tmp/pgpool-ha-@VERSION@ .
-       ( cd pgpool-ha-@VERSION@ ; make distclean ; cd .. )
-       tar cjf pgpool-ha-@VERSION@.tar.bz2 --exclude-vcs pgpool-ha-@VERSION@
-       rm -rf pgpool-ha-@VERSION@
-
diff --git a/NEWS b/NEWS
deleted file mode 100644 (file)
index 38a7ad0..0000000
--- a/NEWS
+++ /dev/null
@@ -1 +0,0 @@
-see ChangeLog
similarity index 100%
rename from README
rename to README.md
diff --git a/configure.sh b/configure.sh
deleted file mode 100755 (executable)
index 5452b0b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-PARAMS0=$*
-PARAMS=${PARAMS0//=/ }
-set -- $PARAMS
-
-VERSION=2.1
-WITH_PGSQL=
-WITH_PGPOOL=
-WITH_OCF=
-
-while true; do
-  case "$1" in
-   --help ) echo "options:"
-       echo " --with-pgsql  PostgreSQL install path"
-       echo " --with-pgpool pgpool install path"
-       echo " --with-ocf    OCF RA files path"
-       exit ;;
-   --with-pgsql )  WITH_PGSQL_DIR=$2  ; shift 2 ;;
-   --with-pgpool ) WITH_PGPOOL_DIR=$2 ; shift 2 ;;
-   --with-ocf    ) WITH_OCF_DIR=$2    ; shift 2 ;;
-   -- ) shift; break ;;
-   "" ) shift; break ;;
-   * ) echo "invalid parameter: $1" ; exit ;;
-  esac
-done
-
-if [ "x${WITH_PGSQL_DIR}" = "x" ]; then
-       WITH_PGSQL_DIR=/usr/local/pgsql
-fi
-if [ "x${WITH_PGPOOL_DIR}" = "x" ]; then
-       WITH_PGPOOL_DIR=/usr/local
-fi
-if [ "x${WITH_OCF_DIR}" = "x" ]; then
-       WITH_OCF_DIR=/usr/lib/ocf/resource.d/heartbeat
-fi
-INSTALL=`type -p install`
-
-if [ ! -d $WITH_PGSQL_DIR ]; then
-       echo "PostgreSQL directory ($WITH_PGSQL_DIR) not found."
-       # (warning only)
-fi
-if [ ! -f $WITH_PGPOOL_DIR/bin/pgpool ]; then
-       echo "Pgpool directory ($WITH_PGPOOL_DIR) not found."
-       # (warning only)
-fi
-if [ ! -d $WITH_OCF_DIR ]; then
-       echo "OCF RA directory ($WITH_OCF_DIR) not found."
-       exit 1
-fi
-if [ "x$INSTALL" = "x" ]; then
-       echo "no install command."
-       exit 1
-fi
-
-echo "PGSQL_DIR: $WITH_PGSQL_DIR"
-echo "PGPOOL_DIR: $WITH_PGPOOL_DIR"
-echo "OCF_DIR: $WITH_OCF_DIR"
-
-sed -e "s#@PGSQL_DIR@#${WITH_PGSQL_DIR}#g" < Makefile.in | \
-       sed -e "s#@PGPOOL_DIR@#${WITH_PGPOOL_DIR}#g" | \
-       sed -e "s#@OCF_DIR@#${WITH_OCF_DIR}#g" | \
-       sed -e "s#@INSTALL@#${INSTALL}#g" | \
-       sed -e "s#@VERSION@#${VERSION}#g" > Makefile
-
-echo "Makefile generated"
-echo $0 $PARAMS0 > config.log
-
diff --git a/pgpool-ha.spec b/pgpool-ha.spec
deleted file mode 100644 (file)
index 86550ab..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-%global pgmajorversion 91
-%global pginstdir /usr/pgsql-9.1
-%global pgpoolinstdir /usr/pgpool-9.1
-%global sname pgpool-ha
-
-Summary:       OCF style resource agent script for pgpool-II.
-Name:          pgpool-ha
-Version:       2.2
-Release:       1%{?dist}
-License:       BSD
-Vendor:                PgPool Global Development Group
-Group:         Applications/Databases
-URL:           http://www.pgpool.net
-Source0:       http://www.pgpool.net/download.php?f=%{name}-%{version}.tar.bz2
-BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch:     noarch
-
-%description
-OCF style resource agent script for pgpool-II.
-
-%prep
-%setup -q -n %{sname}-%{version}
-
-%build
-./configure.sh --with-pgsql=%{pginstdir} --with-pgpool=%{pgpoolinstdir}
-make
-
-%install
-make install
-
-%clean
-rm -rf %{buildroot}
-
-%files
-%defattr(-,root,root,-)
-/usr/lib/ocf/resource.d/heartbeat/pgpool
-$docdir /usr/share/doc/pgpool-ha
-%doc AUTHORS COPYING INSTALL README ChangeLog
-
-%changelog
-* Tue Apr  1 2014 TAKATSUKA Haruka <harukat@sraoss.co.jp> 2.2-1
-- change version
-
-* Mon Oct 15 2012 TAKATSUKA Haruka <harukat@sraoss.co.jp> 2.0-1
-- rewite for pgpool-ha 2.0
-
-* Tue Oct 10 2006 Devrim GUNDUZ <devrim@CommandPrompt.com> 1.0.0-2
-- Some fixes to spec file
-
-* Tue Oct 10 2006 David Fetter <david@fetter.org> 1.0.0-1
-- Initial build pgpool-HA 1.0.0 for PgPool Global Development Group
diff --git a/test.sh b/test.sh
deleted file mode 100755 (executable)
index 55397e1..0000000
--- a/test.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-export OCF_ROOT=/usr/lib/ocf
-export OCF_RESOURCE_INSTANCE=test_res
-
-export OCF_RESKEY_pgpoolconf="/usr/local/etc/pgpool.conf"
-export OCF_RESKEY_pcpconf="/usr/local/etc/pcp.conf"
-export OCF_RESKEY_hbaconf="/usr/local/etc/pool_hba.conf"
-export OCF_RESKEY_logfile=""
-export OCF_RESKEY_options="-D"
-export OCF_RESKEY_pgpooluser="postgres"
-# export OCF_RESKEY_checkmethod="pid"
-# export OCF_RESKEY_checkstring=""
-# export OCF_RESKEY_checkmethod="pcp"
-# export OCF_RESKEY_checkstring="10 localhost 9898 postgres pass"
-export OCF_RESKEY_checkmethod="psql"
-export OCF_RESKEY_checkstring="-h localhost -U postgres -p 5432 -c \\'SELECT 1\\'"
-
-sh pgpool $*
-