summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-08-17 15:09:02 +0000
committerRoy Marples <uberlord@gentoo.org>2007-08-17 15:09:02 +0000
commit856b80efa560efcd0e9c70d2f908540afa764377 (patch)
tree4c8a2c485db585456ee43686fdc76ebab0b137b1 /dev-db/postgresql
parentversion bump wrt bug 158633, thanks to Jakub Moc (diff)
downloadgentoo-2-856b80efa560efcd0e9c70d2f908540afa764377.tar.gz
gentoo-2-856b80efa560efcd0e9c70d2f908540afa764377.tar.bz2
gentoo-2-856b80efa560efcd0e9c70d2f908540afa764377.zip
Drop the default number of allowed connections from 512 to 40
so that we work on the default FreeBSD kernel as well, #189141 thanks to Jason. Add a patch that removes the check for a threaded python on *BSD as Gentoo/FreeBSD supplies a working threaded python, #189080. (Portage version: 2.1.3.6)
Diffstat (limited to 'dev-db/postgresql')
-rw-r--r--dev-db/postgresql/ChangeLog10
-rw-r--r--dev-db/postgresql/files/postgresql-8.2.4-python-threads.patch50
-rw-r--r--dev-db/postgresql/files/postgresql.conf-8.22
-rw-r--r--dev-db/postgresql/postgresql-8.2.4-r1.ebuild15
4 files changed, 69 insertions, 8 deletions
diff --git a/dev-db/postgresql/ChangeLog b/dev-db/postgresql/ChangeLog
index 606d2a53ca0d..d09becc24af7 100644
--- a/dev-db/postgresql/ChangeLog
+++ b/dev-db/postgresql/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-db/postgresql
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.351 2007/07/11 08:46:50 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.352 2007/08/17 15:09:02 uberlord Exp $
+
+ 17 Aug 2007; Roy Marples <uberlord@gentoo.org> files/postgresql.conf-8.2,
+ +files/postgresql-8.2.4-python-threads.patch, postgresql-8.2.4-r1.ebuild:
+ Drop the default number of allowed connections from 512 to 40
+ so that we work on the default FreeBSD kernel as well, #189141 thanks to Jason.
+
+ Add a patch that removes the check for a threaded python on *BSD as
+ Gentoo/FreeBSD supplies a working threaded python, #189080.
11 Jul 2007; Tiziano Müller <dev-zero@gentoo.org>
files/postgresql.conf-8.0, files/postgresql.init-8.0,
diff --git a/dev-db/postgresql/files/postgresql-8.2.4-python-threads.patch b/dev-db/postgresql/files/postgresql-8.2.4-python-threads.patch
new file mode 100644
index 000000000000..520ba13a6473
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-8.2.4-python-threads.patch
@@ -0,0 +1,50 @@
+diff -ur a/config/python.m4 b/config/python.m4
+--- a/config/python.m4 2006-10-16 18:24:54 +0100
++++ b/config/python.m4 2007-08-17 15:37:00 +0100
+@@ -78,18 +78,4 @@
+ AC_SUBST(python_libspec)[]dnl
+ AC_SUBST(python_additional_libs)[]dnl
+
+-# threaded python is not supported on bsd's
+-AC_MSG_CHECKING(whether Python is compiled with thread support)
+-pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
+-if test "$pythreads" = "1"; then
+- AC_MSG_RESULT(yes)
+- case $host_os in
+- openbsd*|freebsd*)
+- AC_MSG_ERROR([threaded Python not supported on this platform])
+- ;;
+- esac
+-else
+- AC_MSG_RESULT(no)
+-fi
+-
+ ])# PGAC_CHECK_PYTHON_EMBED_SETUP
+diff -ur a/configure b/configure
+--- a/configure 2007-04-20 04:20:41 +0100
++++ b/configure 2007-08-17 15:37:20 +0100
+@@ -5002,24 +5002,6 @@
+ echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
+
+
+-# threaded python is not supported on bsd's
+-echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
+-echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
+-pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
+-if test "$pythreads" = "1"; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+- case $host_os in
+- openbsd*|freebsd*)
+- { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
+-echo "$as_me: error: threaded Python not supported on this platform" >&2;}
+- { (exit 1); exit 1; }; }
+- ;;
+- esac
+-else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+
+
+ fi
diff --git a/dev-db/postgresql/files/postgresql.conf-8.2 b/dev-db/postgresql/files/postgresql.conf-8.2
index 6e439fc0f38b..af813ec3d8b3 100644
--- a/dev-db/postgresql/files/postgresql.conf-8.2
+++ b/dev-db/postgresql/files/postgresql.conf-8.2
@@ -12,7 +12,7 @@ PGGROUP="postgres"
# -B is the number of shared buffers and has to be at least 2x the value for -N
# Please read the man-page to postmaster for more options. Many of these options
# can be set directly in the configuration-file.
-PGOPTS="-N 512 -B 1024"
+PGOPTS="-N 40 -B 80"
# SERVER SHUTDOWN:
diff --git a/dev-db/postgresql/postgresql-8.2.4-r1.ebuild b/dev-db/postgresql/postgresql-8.2.4-r1.ebuild
index 72f258bb3686..264ae4c538a8 100644
--- a/dev-db/postgresql/postgresql-8.2.4-r1.ebuild
+++ b/dev-db/postgresql/postgresql-8.2.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.2.4-r1.ebuild,v 1.1 2007/05/02 08:50:01 voxus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.2.4-r1.ebuild,v 1.2 2007/08/17 15:09:02 uberlord Exp $
inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator
@@ -35,7 +35,7 @@ DEPEND="${RDEPEND}
xml? ( dev-util/pkgconfig )"
PG_DIR="/var/lib/postgresql"
-[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512"
+[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="40"
pkg_setup() {
if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
@@ -56,8 +56,11 @@ src_unpack() {
unpack ${A}
cd "${S}"
- epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch"
- epatch "${FILESDIR}/${PN}-${PV}-sh.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-sh.patch"
+
+ # Gentoo/FreeBSD's python is works fine with threading - unlike FreeBSD's
+ epatch "${FILESDIR}/${P}-python-threads.patch"
# Prepare package for future tests
if use test ; then
@@ -65,7 +68,7 @@ src_unpack() {
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source
# Fix broken tests
- epatch "${FILESDIR}/${PN}-${PV}-regress_fix.patch"
+ epatch "${FILESDIR}/${P}-regress_fix.patch"
# We need to run the tests as a non-root user, portage seems the most fitting here,
# so if userpriv is enabled, we use it directly. If userpriv is disabled, we need to
@@ -76,7 +79,7 @@ src_unpack() {
if ! hasq userpriv ${FEATURES} ; then
mkdir -p "${S}/src/test/regress/results"
chown portage "${S}/src/test/regress/results"
- epatch "${FILESDIR}/${PN}-${PV}-regress_su.patch"
+ epatch "${FILESDIR}/${P}-regress_su.patch"
fi
fi
}