diff options
Diffstat (limited to 'dev-db/pgpool2')
-rw-r--r-- | dev-db/pgpool2/Manifest | 1 | ||||
-rw-r--r-- | dev-db/pgpool2/files/pgpool_run_paths-3.6.4.patch | 255 | ||||
-rw-r--r-- | dev-db/pgpool2/files/pgpool_run_paths-9999.patch | 274 | ||||
-rw-r--r-- | dev-db/pgpool2/pgpool2-3.6.4.ebuild | 98 | ||||
-rw-r--r-- | dev-db/pgpool2/pgpool2-9999.ebuild | 98 |
5 files changed, 667 insertions, 59 deletions
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest index f3281d182e8a..88999227ef23 100644 --- a/dev-db/pgpool2/Manifest +++ b/dev-db/pgpool2/Manifest @@ -1,3 +1,4 @@ DIST pgpool-II-3.5.2.tar.gz 2227075 SHA256 5d29fd9c30141bfdaf15b51c7878766178e5df42fa5e160d0f7df2824d26104f SHA512 dd7268bce0019de30dfad01a8600af798127a4c2cc818e6f85ba30289e97c253d6faa392734d85ccbc97be3f04458c12af1bba541e5b8f3d2ee8268432e01d1a WHIRLPOOL 22939c855919b8399c1129ff4622eae159141e9bf05cc36aca456bfd582c7ab0dc7ec87df5ea96d7101f438e89bf4e06f46a5f63cfde22e505d0a3965c0496fc DIST pgpool-II-3.5.5.tar.gz 2243184 SHA256 8fa1ccf13ff4f7c1ab0f6d523090444f65d78923de11061b5027eb5d58318491 SHA512 f77888cbc5e2c15ae1035ee3a1965d4fd3d02cdfd5810c6c656456eaa0d73dae7471906bdf0848607723633da5b8d02145559b767735bcc9b7e4023b1d59efed WHIRLPOOL 5f4d4d9c3f6478b9b3ecda311c571e1f54805a07aa505acd32fbfb8fb2790183b732d6f86843a2b6614c74565efad7f9b3d962281cd2b1d23b54515448a1c84a DIST pgpool-II-3.6.1.tar.gz 2539510 SHA256 244f99a70198b5861a63b2fe3e44ac39d2819f6aa6497f62958c6afa2750d94c SHA512 9d4f0ecec3cf7478c7c4cd5cb1aa75614edca204d11b145f145d752c24bed7f7f4ea2880f6a3f9833aee0b5f428e8cf36e2f91bdef2f6065fb98019df546469a WHIRLPOOL 9a307a63e9179ecfc7a52d1f056d47f09543bf4e378fa0090cdaf90d141c70e89323b4cfcbc9bbd9fa2422ff76bea592f189bea78915445fb1779ce9089ef6e1 +DIST pgpool-II-3.6.4.tar.gz 2623625 SHA256 6ad78b9878d126e8da1e03e8edf3c8d56bb0754fe6432f633e81f6faaf8e6dbf SHA512 a44724b77faca12bc2b46a88e307c10f8099574b5a27720c98f2939fbfa61f41b4c3dc03565412972c351c10d57da4324a483c310b52f624f5ba87c2bd4d006f WHIRLPOOL 410136d359baa369f3d19136da54ba202c8b250bf364fc2f9b91a66190266ae523647cc89313211b63effbedd97168d026a2574be059dd0da7c8768b2d9714e7 diff --git a/dev-db/pgpool2/files/pgpool_run_paths-3.6.4.patch b/dev-db/pgpool2/files/pgpool_run_paths-3.6.4.patch new file mode 100644 index 000000000000..d6943d7502e2 --- /dev/null +++ b/dev-db/pgpool2/files/pgpool_run_paths-3.6.4.patch @@ -0,0 +1,255 @@ +diff -ru a/src/include/parser/pg_config_manual.h b/src/include/parser/pg_config_manual.h +--- a/src/include/parser/pg_config_manual.h 2017-05-11 05:53:04.000000000 -0400 ++++ b/src/include/parser/pg_config_manual.h 2017-07-08 20:28:47.733745889 -0400 +@@ -184,7 +184,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + + /* + * This is the default event source for Windows event log. +diff -ru a/src/include/pcp/pcp_stream.h b/src/include/pcp/pcp_stream.h +--- a/src/include/pcp/pcp_stream.h 2017-05-11 05:36:01.000000000 -0400 ++++ b/src/include/pcp/pcp_stream.h 2017-07-08 20:29:28.613506800 -0400 +@@ -48,6 +48,6 @@ + extern int pcp_write(PCP_CONNECTION *pc, void *buf, int len); + extern int pcp_flush(PCP_CONNECTION *pc); + +-#define UNIX_DOMAIN_PATH "/tmp" ++#define UNIX_DOMAIN_PATH "/run/pgpool" + + #endif /* PCP_STREAM_H */ +diff -ru a/src/include/pool.h b/src/include/pool.h +--- a/src/include/pool.h 2017-05-11 05:53:04.000000000 -0400 ++++ b/src/include/pool.h 2017-07-08 20:27:09.330984074 -0400 +@@ -73,16 +73,16 @@ + #define HBA_CONF_FILE_NAME "pool_hba.conf" + + /* pid file directory */ +-#define DEFAULT_LOGDIR "/tmp" ++#define DEFAULT_LOGDIR "/run/pgpool" + + /* Unix domain socket directory */ +-#define DEFAULT_SOCKET_DIR "/tmp" ++#define DEFAULT_SOCKET_DIR "/run/postgresql" + + /* Unix domain socket directory for watchdog IPC */ +-#define DEFAULT_WD_IPC_SOCKET_DIR "/tmp" ++#define DEFAULT_WD_IPC_SOCKET_DIR "/run/pgpool" + + /* pid file name */ +-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid" ++#define DEFAULT_PID_FILE_NAME "/run/pgpool/pgpool.pid" + + /* status file name */ + #define STATUS_FILE_NAME "pgpool_status" +diff -ru a/src/sample/pgpool.conf.sample b/src/sample/pgpool.conf.sample +--- a/src/sample/pgpool.conf.sample 2017-05-11 05:53:04.000000000 -0400 ++++ b/src/sample/pgpool.conf.sample 2017-07-08 20:36:28.477717849 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -53,10 +51,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -210,10 +206,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/var/log/pgpool' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -490,10 +486,8 @@ + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +diff -ru a/src/sample/pgpool.conf.sample-master-slave b/src/sample/pgpool.conf.sample-master-slave +--- a/src/sample/pgpool.conf.sample-master-slave 2017-05-11 05:53:04.000000000 -0400 ++++ b/src/sample/pgpool.conf.sample-master-slave 2017-07-08 20:37:17.914095382 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -53,10 +51,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -210,10 +206,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -489,10 +485,8 @@ + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Virtual IP control Setting - +diff -ru a/src/sample/pgpool.conf.sample-replication b/src/sample/pgpool.conf.sample-replication +--- a/src/sample/pgpool.conf.sample-replication 2017-05-11 05:53:04.000000000 -0400 ++++ b/src/sample/pgpool.conf.sample-replication 2017-07-08 20:37:30.384022450 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -53,10 +51,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -210,10 +206,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -489,10 +485,8 @@ + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +diff -ru a/src/sample/pgpool.conf.sample-stream b/src/sample/pgpool.conf.sample-stream +--- a/src/sample/pgpool.conf.sample-stream 2017-05-11 05:53:04.000000000 -0400 ++++ b/src/sample/pgpool.conf.sample-stream 2017-07-08 20:37:44.060609128 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -47,10 +45,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -211,10 +207,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -489,10 +485,8 @@ + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + diff --git a/dev-db/pgpool2/files/pgpool_run_paths-9999.patch b/dev-db/pgpool2/files/pgpool_run_paths-9999.patch new file mode 100644 index 000000000000..691d6e867ef5 --- /dev/null +++ b/dev-db/pgpool2/files/pgpool_run_paths-9999.patch @@ -0,0 +1,274 @@ +diff --git a/src/include/parser/pg_config_manual.h b/src/include/parser/pg_config_manual.h +index d7e153b2..a4c9e87a 100644 +--- a/src/include/parser/pg_config_manual.h ++++ b/src/include/parser/pg_config_manual.h +@@ -193,7 +193,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + + /* + * This is the default event source for Windows event log. +diff --git a/src/include/pcp/pcp_stream.h b/src/include/pcp/pcp_stream.h +index 254b98cb..5883ad31 100644 +--- a/src/include/pcp/pcp_stream.h ++++ b/src/include/pcp/pcp_stream.h +@@ -48,6 +48,6 @@ extern int pcp_read(PCP_CONNECTION *pc, void *buf, int len); + extern int pcp_write(PCP_CONNECTION *pc, void *buf, int len); + extern int pcp_flush(PCP_CONNECTION *pc); + +-#define UNIX_DOMAIN_PATH "/tmp" ++#define UNIX_DOMAIN_PATH "/run/pgpool" + + #endif /* PCP_STREAM_H */ +diff --git a/src/include/pool.h b/src/include/pool.h +index d5dd63aa..a3ae197f 100644 +--- a/src/include/pool.h ++++ b/src/include/pool.h +@@ -73,16 +73,16 @@ + #define HBA_CONF_FILE_NAME "pool_hba.conf" + + /* pid file directory */ +-#define DEFAULT_LOGDIR "/tmp" ++#define DEFAULT_LOGDIR "/run/pgpool" + + /* Unix domain socket directory */ +-#define DEFAULT_SOCKET_DIR "/tmp" ++#define DEFAULT_SOCKET_DIR "/run/postgresql" + + /* Unix domain socket directory for watchdog IPC */ +-#define DEFAULT_WD_IPC_SOCKET_DIR "/tmp" ++#define DEFAULT_WD_IPC_SOCKET_DIR "/run/pgpool" + + /* pid file name */ +-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid" ++#define DEFAULT_PID_FILE_NAME "/run/pgpool/pgpool.pid" + + /* status file name */ + #define STATUS_FILE_NAME "pgpool_status" +diff --git a/src/sample/pgpool.conf.sample b/src/sample/pgpool.conf.sample +index d73c9bca..e95815ba 100644 +--- a/src/sample/pgpool.conf.sample ++++ b/src/sample/pgpool.conf.sample +@@ -31,10 +31,8 @@ listen_addresses = 'localhost' + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -53,10 +51,8 @@ pcp_listen_addresses = '*' + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -210,13 +206,13 @@ syslog_ident = 'pgpool' + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # Can be specified as relative to the" + # location of pgpool.conf file or + # as an absolute path + # (change requires restart) +-logdir = '/var/log/pgpool' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -505,10 +501,8 @@ wd_authkey = '' + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +diff --git a/src/sample/pgpool.conf.sample-master-slave b/src/sample/pgpool.conf.sample-master-slave +index 612c10a7..ad385ba6 100644 +--- a/src/sample/pgpool.conf.sample-master-slave ++++ b/src/sample/pgpool.conf.sample-master-slave +@@ -31,10 +31,8 @@ listen_addresses = 'localhost' + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -53,10 +51,8 @@ pcp_listen_addresses = '*' + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -210,13 +206,13 @@ syslog_ident = 'pgpool' + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # Can be specified as relative to the" + # location of pgpool.conf file or + # as an absolute path + # (change requires restart) +-logdir = '/tmp' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -504,10 +500,8 @@ wd_authkey = '' + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Virtual IP control Setting - +diff --git a/src/sample/pgpool.conf.sample-replication b/src/sample/pgpool.conf.sample-replication +index f47a7957..bd7ce73e 100644 +--- a/src/sample/pgpool.conf.sample-replication ++++ b/src/sample/pgpool.conf.sample-replication +@@ -31,10 +31,8 @@ listen_addresses = 'localhost' + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -53,10 +51,8 @@ pcp_listen_addresses = '*' + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -210,13 +206,13 @@ syslog_ident = 'pgpool' + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # Can be specified as relative to the" + # location of pgpool.conf file or + # as an absolute path + # (change requires restart) +-logdir = '/tmp' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -504,10 +500,8 @@ wd_authkey = '' + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +diff --git a/src/sample/pgpool.conf.sample-stream b/src/sample/pgpool.conf.sample-stream +index d57226b0..669a31d4 100644 +--- a/src/sample/pgpool.conf.sample-stream ++++ b/src/sample/pgpool.conf.sample-stream +@@ -31,10 +31,8 @@ listen_addresses = 'localhost' + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '/run/postgresql' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -47,10 +45,8 @@ pcp_listen_addresses = '*' + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/run/pgpool' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + listen_backlog_multiplier = 2 + # Set the backlog parameter of listen(2) to +@@ -211,13 +207,13 @@ syslog_ident = 'pgpool' + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '/run/pgpool/pgpool.pid' + # PID file name + # Can be specified as relative to the" + # location of pgpool.conf file or + # as an absolute path + # (change requires restart) +-logdir = '/tmp' ++logdir = '/run/pgpool' + # Directory of pgPool status file + # (change requires restart) + +@@ -504,10 +500,8 @@ wd_authkey = '' + # Authentication key for watchdog communication + # (change requires restart) + +-wd_ipc_socket_dir = '/tmp' ++wd_ipc_socket_dir = '/run/pgpool' + # Unix domain socket path for watchdog IPC socket +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + diff --git a/dev-db/pgpool2/pgpool2-3.6.4.ebuild b/dev-db/pgpool2/pgpool2-3.6.4.ebuild new file mode 100644 index 000000000000..cf9cd0abf25d --- /dev/null +++ b/dev-db/pgpool2/pgpool2-3.6.4.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +POSTGRES_COMPAT=( 9.{2..6} ) + +inherit postgres-multi + +MY_P="${PN/2/-II}-${PV}" + +DESCRIPTION="Connection pool server for PostgreSQL" +HOMEPAGE="http://www.pgpool.net/" +SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" + +KEYWORDS="~amd64 ~x86" + +IUSE="doc memcached pam ssl static-libs" + +RDEPEND=" + ${POSTGRES_DEP} + memcached? ( dev-libs/libmemcached ) + pam? ( sys-auth/pambase ) + ssl? ( dev-libs/openssl:* ) +" +DEPEND="${RDEPEND} + sys-devel/bison + !!dev-db/pgpool +" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + postgres_new_user pgpool + + postgres-multi_pkg_setup +} + +src_prepare() { + eapply "${FILESDIR}/pgpool_run_paths-3.6.4.patch" + + postgres-multi_src_prepare +} + +src_configure() { + local myconf + use memcached && \ + myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\"" + use pam && myconf+=' --with-pam' + + postgres-multi_foreach econf \ + --disable-rpath \ + --sysconfdir="${EROOT%/}/etc/${PN}" \ + --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \ + --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \ + $(use_with ssl openssl) \ + $(use_enable static-libs static) \ + ${myconf} +} + +src_compile() { + # Even though we're only going to do an install for the best slot + # available, the extension bits in src/sql need some things outside + # of that directory built, too. + postgres-multi_foreach emake + postgres-multi_foreach emake -C src/sql +} + +src_install() { + # We only need the best stuff installed + postgres-multi_forbest emake DESTDIR="${D}" install + + # Except for the extension and .so files that each PostgreSQL slot needs + postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + # Documentation! + dodoc NEWS TODO + if use doc ; then + postgres-multi_forbest emake DESTDIR="${D}" -C doc install + fi + + # Examples and extras + # mv some files that get installed to /usr/share/pgpool-II so that + # they all wind up in the same place + mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die + into "/usr/share/${PN}" + dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start} + insinto "/usr/share/${PN}" + doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam} + + # One more thing: Evil la files! + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/pgpool2/pgpool2-9999.ebuild b/dev-db/pgpool2/pgpool2-9999.ebuild index b351db267e36..031166c54b9d 100644 --- a/dev-db/pgpool2/pgpool2-9999.ebuild +++ b/dev-db/pgpool2/pgpool2-9999.ebuild @@ -1,66 +1,45 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=4 +EAPI=6 -[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}" +EGIT_REPO_URI="https://git.postgresql.org/git/pgpool2.git" -ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool" -ECVS_MODULE="pgpool-II" -[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs" -inherit base user ${SCM_ECLASS} -unset SCM_ECLASS +POSTGRES_COMPAT=( 9.{2..6} ) + +inherit git-r3 postgres-multi DESCRIPTION="Connection pool server for PostgreSQL" HOMEPAGE="http://www.pgpool.net/" -[[ ${PV} == 9999 ]] || SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +SRC_URI="" LICENSE="BSD" SLOT="0" -# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061 -[[ ${PV} == 9999 ]] || \ -KEYWORDS="~amd64 ~x86" +KEYWORDS="" -IUSE="memcached pam ssl static-libs" +IUSE="doc memcached pam ssl static-libs" RDEPEND=" - dev-db/postgresql + ${POSTGRES_DEP} memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) - ssl? ( dev-libs/openssl ) + ssl? ( dev-libs/openssl:* ) " DEPEND="${RDEPEND} sys-devel/bison !!dev-db/pgpool " -AUTOTOOLS_IN_SOURCE_BUILD="1" - -S=${WORKDIR}/${MY_P} - pkg_setup() { - enewgroup postgres 70 - enewuser pgpool -1 -1 -1 postgres + postgres_new_user pgpool - # We need the postgres user as well so we can set the proper - # permissions on the sockets without getting into fights with - # PostgreSQL's initialization scripts. - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + postgres-multi_pkg_setup } src_prepare() { - epatch "${FILESDIR}/pgpool_run_paths.patch" + eapply "${FILESDIR}/pgpool_run_paths-9999.patch" - local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h" - local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \ - sed 's|.*\"\(.*\)\"|\1|g') - local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool" - - sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \ - -i *.conf.sample* pool.h || die - - sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \ - -i *.conf.sample* pool.h || die + postgres-multi_src_prepare } src_configure() { @@ -69,47 +48,48 @@ src_configure() { myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\"" use pam && myconf+=' --with-pam' - econf \ + postgres-multi_foreach econf \ --disable-rpath \ --sysconfdir="${EROOT%/}/etc/${PN}" \ + --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \ + --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \ $(use_with ssl openssl) \ $(use_enable static-libs static) \ ${myconf} } src_compile() { - emake - - cd sql - emake + # Even though we're only going to do an install for the best slot + # available, the extension bits in src/sql need some things outside + # of that directory built, too. + postgres-multi_foreach emake + postgres-multi_foreach emake -C src/sql } src_install() { - emake DESTDIR="${D}" install - - cd sql - emake DESTDIR="${D}" install - cd "${S}" - - # `contrib' moved to `extension' with PostgreSQL 9.1 - local pgslot=$(postgresql-config show) - if [[ ${pgslot//.} > 90 ]] ; then - cd "${ED%/}$(pg_config --sharedir)" - mv contrib extension || die - cd "${S}" - fi + # We only need the best stuff installed + postgres-multi_forbest emake DESTDIR="${D}" install + + # Except for the extension and .so files that each PostgreSQL slot needs + postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install newinitd "${FILESDIR}/${PN}.initd" ${PN} newconfd "${FILESDIR}/${PN}.confd" ${PN} - # Documentation - dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg} - dohtml -r doc + # Documentation! + dodoc NEWS TODO + if use doc ; then + postgres-multi_forbest emake DESTDIR="${D}" -C doc install + fi # Examples and extras - insinto "/usr/share/${PN}" - doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample} + # mv some files that get installed to /usr/share/pgpool-II so that + # they all wind up in the same place mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die + into "/usr/share/${PN}" + dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start} + insinto "/usr/share/${PN}" + doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam} # One more thing: Evil la files! find "${ED}" -name '*.la' -exec rm -f {} + |