summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2018-08-03 09:26:51 -0400
committerAaron W. Swenson <titanofold@gentoo.org>2018-08-03 09:26:51 -0400
commit079ff486c23fdb326e5d58df1433b854ca900e94 (patch)
tree88822d2600ba82cabcc0918c4696dc908fd7d8e2
parentmedia-sound/apulse: version bump (diff)
downloadgentoo-079ff486.tar.gz
gentoo-079ff486.tar.bz2
gentoo-079ff486.zip
dev-db/pgpool2: Bump to 3.7.5
Add a couple patches to fix a few options in configure.ac. --without-pam no longer acts as if --with-pam was given. Now uses pkg-config to get any special settings for libmemcached rather than using fixed sub-directories (${user_provided_path}/{include,lib,…}). Lastly, introduced AX_PTHREAD to link in the appropriate threading library to fix bug 616302. If libmemcached was built with USE=sasl which builds against cyrus-sasl. cyrus-sasl builds against a threading library which necessitates including the same threading in pgpool2 despite pgpool2 not being a threaded program. pgpool2 is now able to build against LibreSSL as well as OpenSSL. The ebuild now reflects this fact Bug: https://bugs.gentoo.org/616302 Bug: https://bugs.gentoo.org/646888 Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r--dev-db/pgpool2/Manifest1
-rw-r--r--dev-db/pgpool2/files/pgpool-configure-memcached.patch64
-rw-r--r--dev-db/pgpool2/files/pgpool-configure-pam.patch25
-rw-r--r--dev-db/pgpool2/files/pgpool-configure-pthread.patch13
-rw-r--r--dev-db/pgpool2/files/pgpool2.initd14
-rw-r--r--dev-db/pgpool2/pgpool2-3.7.5.ebuild104
-rw-r--r--dev-db/pgpool2/pgpool2-9999.ebuild42
-rw-r--r--dev-db/pgpool2/pgpool2-9999.ebuild.orig104
8 files changed, 343 insertions, 24 deletions
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
index e81a23c8628c..120a39ebe5bd 100644
--- a/dev-db/pgpool2/Manifest
+++ b/dev-db/pgpool2/Manifest
@@ -1,3 +1,4 @@
DIST pgpool-II-3.7.0.tar.gz 3269076 BLAKE2B f7a396e82022a35e5f46fb644ca4a9007db3abaf97f8249d88bca00abf5d33abe7d47f705e959f7fb910885bf49f68bd5f965aae3085d12076d3100cca2f25f8 SHA512 cf8eef3a2ec761b51f9e6a72b5211810de57ad9b40b1738067616478b6486a813782588bfc92f6f351334d9514b1394551230c486fa0ac2f6c18a0490f22bbe2
DIST pgpool-II-3.7.1.tar.gz 3237755 BLAKE2B ec196e384c9c4c03a28081fbb74b820c7480e2a98427441572142bd80bff6d2adbbda9bc19df1c70f4699af28fcac5f09161a5938df633bb9eba52c0d9dc24ac SHA512 2a83f573ca2a720ee7beb75d8d1380747e29b2bb3c809f51bd0f8e4423d67f882ce2acb7d9ea118c55313e969aba3bf94a0d5b190eb905123d43c09df25e00ef
DIST pgpool-II-3.7.3.tar.gz 3259752 BLAKE2B 398257b2a647039a634d52b0e23ab1584aaa67f58d6f234f03bf2e99380b346b4ff51647f876d0789c484e88fc149a2af5a5b1b8fd3aa48323aada064ea3421d SHA512 c7fea570f11dfc348b0099fde074f61a15e6979b6f16526d24d73b26d723edfdbadbcf10e90c2111aeb72599970718d3cda4abed3e99e8a711cf03b715c29624
+DIST pgpool-II-3.7.5.tar.gz 3276279 BLAKE2B d9c52684985e0a74ef115792f79a71305fbcc5f44663971e5fee41d543c7c290999091c387f5da6c73c88466880a24b21d469046de7981983d9984a606ae357e SHA512 4840047f11b5e176803c03073d1ef6ef54f9d0be3d9bd622fedc9fd0ad4f835090fbf671bfd71cda0d994af6ea9a1658b0d5e5d09ec317b345c41fb0fa4b7b70
diff --git a/dev-db/pgpool2/files/pgpool-configure-memcached.patch b/dev-db/pgpool2/files/pgpool-configure-memcached.patch
new file mode 100644
index 000000000000..7b983dba02e2
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool-configure-memcached.patch
@@ -0,0 +1,64 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -338,37 +338,24 @@
+ [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])])
+ fi
+
+-AC_ARG_WITH(memcached,
+- [ --with-memcached=DIR site header files for libmemcached in DIR],
+- [
+- case "$withval" in
+- "" | y | ye | yes | n | no)
+- AC_MSG_ERROR([*** You must supply an argument to the --with-memcached option.])
+- ;;
+- *)
+-
+- MEMCACHED_INCLUDE_DIR="$withval"/include
+- MEMCACHED_LIB_DIR="$withval"/lib
+- OLD_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I$MEMCACHED_INCLUDE_DIR"
+- AC_CHECK_HEADERS(
+- [libmemcached/memcached.h],
+- [AC_DEFINE([USE_MEMCACHED], 1, [Define to 1 to build with memcached support])],
+- [AC_MSG_ERROR([header file <libmemcached/memcached.h> is required for memcached support])])
+- CFLAGS=$OLD_CFLAGS
+- AC_CHECK_LIB(memcached, memcached_create, [], [AC_MSG_ERROR(libmemcached is not installed)])
+- MEMCACHED_INCLUDE_OPT="-I $MEMCACHED_INCLUDE_DIR"
+- MEMCACHED_LINK_OPT="-L$MEMCACHED_LIB_DIR"
+- MEMCACHED_RPATH_OPT="-rpath $MEMCACHED_LIB_DIR"
+- ;;
+- esac
+- ])
++AC_ARG_WITH([memcached],
++ AS_HELP_STRING([--with-memcached], [Build with memcached support]))
+
+-CFLAGS="$CFLAGS -fno-strict-aliasing"
++AS_IF([test "x$with_memcached" = "xyes"], [
++ PKG_CHECK_MODULES([MEMCACHED], [libmemcached])
++ CFLAGS="$CFLAGS $MEMCACHED_CFLAGS"
++ LIBS="$LIBS $MEMCACHED_LIBS"
++
++ AC_CHECK_HEADERS(
++ [libmemcached/memcached.h],
++ [AC_DEFINE([USE_MEMCACHED], 1, [Define to 1 to build with memcached support])],
++ [AC_MSG_ERROR([Couldn't find <libmemcached/memcached.h>])])
++
++ AC_SEARCH_LIBS(memcached_create, [], [],
++ [AC_MSG_ERROR(libmemcached is not installed)])
++])
+
+-AC_SUBST(MEMCACHED_INCLUDE_OPT)
+-AC_SUBST(MEMCACHED_LINK_OPT)
+-AC_SUBST(MEMCACHED_RPATH_OPT)
++CFLAGS="$CFLAGS -fno-strict-aliasing"
+
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L$PGSQL_LIB_DIR"
+@@ -380,7 +367,6 @@
+
+ AC_SUBST(PGSQL_INCLUDE_DIR)
+ AC_SUBST(PGSQL_LIB_DIR)
+-AC_SUBST(MEMCACHED_DIR)
+
+ # --enable(disable)-rpath option
+ AC_ARG_ENABLE(rpath,
diff --git a/dev-db/pgpool2/files/pgpool-configure-pam.patch b/dev-db/pgpool2/files/pgpool-configure-pam.patch
new file mode 100644
index 000000000000..3a8e89dde307
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool-configure-pam.patch
@@ -0,0 +1,25 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -330,11 +330,13 @@
+
+-AC_ARG_WITH(pam,
+- [ --with-pam build with PAM support],
+- [AC_DEFINE([USE_PAM], 1, [Define to 1 to build with PAM support. (--with-pam)])])
+-if test "$with_pam" = yes ; then
+- AC_CHECK_LIB(pam, pam_start, [], [AC_MSG_ERROR([library 'pam' is required for PAM])])
+- AC_CHECK_HEADERS(security/pam_appl.h, [],
+- [AC_CHECK_HEADERS(pam/pam_appl.h, [],
+- [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])])
+-fi
++AC_ARG_WITH([pam], AS_HELP_STRING([--with-pam], [Build with PAM support]))
++
++AS_IF([test "x$with_pam" = "xyes"], [
++ AC_DEFINE([USE_PAM], 1, [Define to 1 to build with PAM support])
++ AC_CHECK_LIB(pam, pam_start, [], [AC_MSG_ERROR([library 'pam' is required for PAM])])
++ AC_CHECK_HEADERS(security/pam_appl.h,
++ [],
++ [AC_CHECK_HEADERS(pam/pam_appl.h, [],
++ [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])])
++
++])
+
diff --git a/dev-db/pgpool2/files/pgpool-configure-pthread.patch b/dev-db/pgpool2/files/pgpool-configure-pthread.patch
new file mode 100644
index 000000000000..50b18fab6fc4
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool-configure-pthread.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,6 +3,10 @@
+
+ dnl Checks for programs.
+ AC_PROG_CC
++AX_PTHREAD
++LIBS="$PTHREAD_LIBS $LIBS"
++CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++CC="$PTHREAD_CC"
+
+ AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects])
+
diff --git a/dev-db/pgpool2/files/pgpool2.initd b/dev-db/pgpool2/files/pgpool2.initd
index c9ffb0cf1611..73db4dd8b3c8 100644
--- a/dev-db/pgpool2/files/pgpool2.initd
+++ b/dev-db/pgpool2/files/pgpool2.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
extra_started_commands="reload"
@@ -23,24 +23,22 @@ get_config() {
PIDFILE="$(get_config pid_file_name)"
: ${PIDFILE:='/run/pgpool/pgpool.pid'}
-prep() {
+start_pre() {
# $logdir contains status file(s), not log files.
local logdir=$(get_config logdir)
local socket_dir=$(get_config socket_dir)
local pcp_socket_dir=$(get_config pcp_socket_dir)
checkpath -o pgpool:postgres -m 0770 -d $(dirname ${PIDFILE}) || return 1
- checkpath -o pgpool:postgres -m 0770 -d ${logdir:-'/run/pgpool'} || return 1
+ checkpath -o pgpool:postgres -m 0770 -d ${logdir:-'/var/lib/pgpool'} || return 1
checkpath -o pgpool:postgres -m 0660 -f ${LOGFILE} || return 1
- checkpath -o postgres:postgres -m 0770 \
+ checkpath -o root:postgres -m 1775 \
-d ${socket_dir:-'/run/postgresql'} || return 1
- checkpath -o postgres:postgres -m 0770 \
- -d ${pcp_socket_dir:-'/run/postgresql'} || return 1
+ checkpath -o pgpool:postgres -m 0770 \
+ -d ${pcp_socket_dir:-'/run/postgresql/pgpool'} || return 1
}
start() {
- prep || return 1
-
ebegin "Starting pgpool2"
start-stop-daemon --start \
diff --git a/dev-db/pgpool2/pgpool2-3.7.5.ebuild b/dev-db/pgpool2/pgpool2-3.7.5.ebuild
new file mode 100644
index 000000000000..adab103e02fd
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-3.7.5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} {10..11} )
+
+inherit autotools 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 libressl memcached pam ssl static-libs"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ net-libs/libnsl:0=
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? (
+ !libressl? ( dev-libs/openssl:* )
+ libressl? ( dev-libs/libressl:= )
+ )
+"
+DEPEND="${RDEPEND}
+ !!dev-db/pgpool
+ sys-devel/bison
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ postgres_new_user pgpool
+
+ postgres-multi_pkg_setup
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}/pgpool-configure-memcached.patch" \
+ "${FILESDIR}/pgpool-configure-pam.patch" \
+ "${FILESDIR}/pgpool-configure-pthread.patch" \
+ "${FILESDIR}/pgpool_run_paths-3.6.5.patch"
+
+ eautoreconf
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ 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_enable static-libs static) \
+ $(use_with memcached) \
+ $(use_with pam) \
+ $(use_with ssl openssl)
+}
+
+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
+ doman doc/src/sgml/man{1,8}/*
+ use doc && dodoc -r doc/src/sgml/html
+
+ # 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 b0b43a07e37c..b565c24cfbee 100644
--- a/dev-db/pgpool2/pgpool2-9999.ebuild
+++ b/dev-db/pgpool2/pgpool2-9999.ebuild
@@ -5,9 +5,9 @@ EAPI=6
EGIT_REPO_URI="https://git.postgresql.org/git/pgpool2.git"
-POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_COMPAT=( 9.{3..6} {10..11} )
-inherit git-r3 postgres-multi
+inherit autotools git-r3 postgres-multi
DESCRIPTION="Connection pool server for PostgreSQL"
HOMEPAGE="http://www.pgpool.net/"
@@ -17,18 +17,27 @@ SLOT="0"
KEYWORDS=""
-IUSE="doc memcached pam ssl static-libs"
+IUSE="doc libressl memcached pam ssl static-libs"
RDEPEND="
${POSTGRES_DEP}
net-libs/libnsl:0=
memcached? ( dev-libs/libmemcached )
pam? ( sys-auth/pambase )
- ssl? ( dev-libs/openssl:* )
+ ssl? (
+ !libressl? ( dev-libs/openssl:* )
+ libressl? ( dev-libs/libressl:= )
+ )
"
DEPEND="${RDEPEND}
- sys-devel/bison
!!dev-db/pgpool
+ sys-devel/bison
+ virtual/pkgconfig
+ doc? (
+ app-text/openjade
+ dev-libs/libxml2
+ dev-libs/libxslt
+ )
"
pkg_setup() {
@@ -38,25 +47,27 @@ pkg_setup() {
}
src_prepare() {
- eapply "${FILESDIR}/pgpool_run_paths-9999.patch"
+ eapply \
+ "${FILESDIR}/pgpool-configure-memcached.patch" \
+ "${FILESDIR}/pgpool-configure-pam.patch" \
+ "${FILESDIR}/pgpool-configure-pthread.patch" \
+ "${FILESDIR}/pgpool_run_paths-9999.patch"
+
+ eautoreconf
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}
+ $(use_with memcached) \
+ $(use_with pam) \
+ $(use_with ssl openssl)
}
src_compile() {
@@ -65,6 +76,7 @@ src_compile() {
# of that directory built, too.
postgres-multi_foreach emake
postgres-multi_foreach emake -C src/sql
+ use doc && postgres-multi_forbest emake DESTDIR="${D}" -C doc
}
src_install() {
@@ -79,9 +91,7 @@ src_install() {
# Documentation!
dodoc NEWS TODO
- if use doc ; then
- postgres-multi_forbest emake DESTDIR="${D}" -C doc install
- fi
+ use doc && postgres-multi_forbest emake DESTDIR="${D}" -C doc install
# Examples and extras
# mv some files that get installed to /usr/share/pgpool-II so that
diff --git a/dev-db/pgpool2/pgpool2-9999.ebuild.orig b/dev-db/pgpool2/pgpool2-9999.ebuild.orig
new file mode 100644
index 000000000000..5881c059c512
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-9999.ebuild.orig
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://git.postgresql.org/git/pgpool2.git"
+
+POSTGRES_COMPAT=( 9.{3..6} {10..11} )
+
+inherit autotools git-r3 postgres-multi
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://www.pgpool.net/"
+SRC_URI=""
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS=""
+
+IUSE="doc memcached pam ssl static-libs"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ net-libs/libnsl:0=
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? ( dev-libs/openssl:* )
+"
+DEPEND="${RDEPEND}
+ !!dev-db/pgpool
+ sys-devel/bison
+ virtual/pkgconfig
+ doc? (
+ app-text/openjade
+ dev-libs/libxml2
+ dev-libs/libxslt
+ )
+"
+
+pkg_setup() {
+ postgres_new_user pgpool
+
+ postgres-multi_pkg_setup
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}/pgpool-configure-memcached.patch" \
+ "${FILESDIR}/pgpool-configure-pam.patch" \
+ "${FILESDIR}/pgpool-configure-pthread.patch" \
+ "${FILESDIR}/pgpool_run_paths-9999.patch"
+
+ eautoreconf
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ 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_enable static-libs static) \
+ $(use_with memcached) \
+ $(use_with pam) \
+ $(use_with ssl openssl)
+}
+
+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
+ use doc && postgres-multi_forbest emake DESTDIR="${D}" -C doc
+}
+
+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
+ use doc && postgres-multi_forbest emake DESTDIR="${D}" -C doc install
+
+ # 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 {} +
+}