summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2009-04-09 22:48:17 +0000
committerCaleb Tennis <caleb@gentoo.org>2009-04-09 22:48:17 +0000
commitb59332e8bb3c71575c96ffd5565660199cec3f3e (patch)
tree2e5657b6ae1f39c3ef1acbed7f92fba1e40c555b /dev-db
parentVersion bump (diff)
downloadgentoo-2-b59332e8bb3c71575c96ffd5565660199cec3f3e.tar.gz
gentoo-2-b59332e8bb3c71575c96ffd5565660199cec3f3e.tar.bz2
gentoo-2-b59332e8bb3c71575c96ffd5565660199cec3f3e.zip
remove 8.3, use postgresql-{base,server} instead
(Portage version: 2.1.6.11/cvs/Linux i686)
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/postgresql/ChangeLog10
-rw-r--r--dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch59
-rw-r--r--dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch13
-rw-r--r--dev-db/postgresql/files/postgresql-8.3.1-sh.patch35
-rw-r--r--dev-db/postgresql/files/postgresql.conf-8.339
-rw-r--r--dev-db/postgresql/files/postgresql.init-8.357
-rw-r--r--dev-db/postgresql/postgresql-8.3.1.ebuild226
7 files changed, 8 insertions, 431 deletions
diff --git a/dev-db/postgresql/ChangeLog b/dev-db/postgresql/ChangeLog
index 76d62e3f7b94..c9d6b4129f2e 100644
--- a/dev-db/postgresql/ChangeLog
+++ b/dev-db/postgresql/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/postgresql
-# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.377 2008/08/05 16:43:37 ulm Exp $
+# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.378 2009/04/09 22:48:16 caleb Exp $
+
+ 09 Apr 2009; Caleb Tennis <caleb@gentoo.org> -files/postgresql.conf-8.3,
+ -files/postgresql.init-8.3, -files/postgresql-8.3.1-gentoo.patch,
+ -files/postgresql-8.3.1-regress_su.patch,
+ -files/postgresql-8.3.1-sh.patch, -postgresql-8.3.1.ebuild:
+ remove 8.3, use postgresql-{base,server} if you want it instead
05 Aug 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
Add USE flag description to metadata wrt GLEP 56.
diff --git a/dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch b/dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch
deleted file mode 100644
index 0d32b4bf6c9c..000000000000
--- a/dev-db/postgresql/files/postgresql-8.3.1-gentoo.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- postgresql-8.3RC1.orig/src/bin/Makefile 2006-03-05 16:58:50.000000000 +0100
-+++ postgresql-8.3RC1/src/bin/Makefile 2007-03-29 12:12:26.000000000 +0200
-@@ -14,7 +14,7 @@
- include $(top_builddir)/src/Makefile.global
-
- DIRS = initdb ipcclean pg_ctl pg_dump \
-- psql scripts pg_config pg_controldata pg_resetxlog
-+ psql scripts pg_controldata pg_resetxlog
- ifeq ($(PORTNAME), win32)
- DIRS+=pgevent
- endif
---- postgresql-8.3RC1.orig/src/interfaces/Makefile 2004-04-20 02:33:51.000000000 +0200
-+++ postgresql-8.3RC1/src/interfaces/Makefile 2007-03-29 12:14:01.000000000 +0200
-@@ -12,7 +12,7 @@
- top_builddir = ../..
- include $(top_builddir)/src/Makefile.global
-
--DIRS = libpq ecpg
-+DIRS = ecpg
-
- ALLDIRS = $(DIRS)
-
---- postgresql-8.3RC1.orig/src/Makefile 2006-06-23 01:50:35.000000000 +0200
-+++ postgresql-8.3RC1/src/Makefile 2007-03-29 12:54:59.000000000 +0200
-@@ -19,12 +19,10 @@
- $(MAKE) -C backend $@
- $(MAKE) -C backend/utils/mb/conversion_procs $@
- $(MAKE) -C backend/snowball $@
-- $(MAKE) -C include $@
- $(MAKE) -C interfaces $@
- $(MAKE) -C bin $@
- $(MAKE) -C pl $@
- $(MAKE) -C makefiles $@
-- $(MAKE) -C test/regress $@
-
- install: install-local
-
-@@ -49,7 +47,6 @@
- $(MAKE) -C timezone $@
- $(MAKE) -C backend $@
- $(MAKE) -C backend/snowball $@
-- $(MAKE) -C include $@
- $(MAKE) -C interfaces $@
- $(MAKE) -C bin $@
- $(MAKE) -C pl $@
-@@ -63,12 +60,10 @@
- -$(MAKE) -C timezone $@
- -$(MAKE) -C backend $@
- -$(MAKE) -C backend/snowball $@
-- -$(MAKE) -C include $@
- -$(MAKE) -C interfaces $@
- -$(MAKE) -C bin $@
- -$(MAKE) -C pl $@
- -$(MAKE) -C makefiles $@
-- -$(MAKE) -C test $@
- -$(MAKE) -C tutorial NO_PGXS=1 $@
- -$(MAKE) -C test/thread $@
- rm -f Makefile.port Makefile.global
-
diff --git a/dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch b/dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch
deleted file mode 100644
index 49331d809236..000000000000
--- a/dev-db/postgresql/files/postgresql-8.3.1-regress_su.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- postgresql-8.3RC1.orig/src/test/regress/GNUmakefile 2008-01-20 00:22:49.000000000 +0200
-+++ postgresql-8.3RC1/src/test/regress/GNUmakefile 2008-01-20 00:26:27.000000000 +0200
-@@ -141,7 +141,8 @@
- ##
-
- check: all
-- ./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)
-+ chown portage testtablespace .
-+ su -s /bin/sh portage -c "./pg_regress --psqldir=`pwd`/../../bin/psql --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)"
-
- installcheck: all
- ./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
-
diff --git a/dev-db/postgresql/files/postgresql-8.3.1-sh.patch b/dev-db/postgresql/files/postgresql-8.3.1-sh.patch
deleted file mode 100644
index a6d96bf1dc57..000000000000
--- a/dev-db/postgresql/files/postgresql-8.3.1-sh.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- postgresql-8.3RC1.orig/src/include/storage/s_lock.h 2006-06-08 00:24:45.000000000 +0200
-+++ postgresql-8.3RC1/src/include/storage/s_lock.h 2007-03-29 12:25:56.000000000 +0200
-@@ -299,6 +299,31 @@
- #endif /* __s390__ || __s390x__ */
-
-
-+#if defined(__sh__)
-+#define HAS_TEST_AND_SET
-+
-+typedef unsigned char slock_t;
-+
-+#define TAS(lock) tas(lock)
-+
-+static __inline__ int
-+tas(volatile slock_t *lock)
-+{
-+ register int _res = 1;
-+
-+ __asm__ __volatile__(
-+ "tas.b @%1\n\t"
-+ "movt %0\n\t"
-+ "xor #1,%0"
-+: "=z"(_res)
-+: "r"(lock)
-+: "t","memory");
-+ return _res;
-+}
-+
-+#endif /* __sh__ */
-+
-+
- #if defined(__sparc__) /* Sparc */
- #define HAS_TEST_AND_SET
-
-
diff --git a/dev-db/postgresql/files/postgresql.conf-8.3 b/dev-db/postgresql/files/postgresql.conf-8.3
deleted file mode 100644
index 7ceb3077f31c..000000000000
--- a/dev-db/postgresql/files/postgresql.conf-8.3
+++ /dev/null
@@ -1,39 +0,0 @@
-# PostgreSQL's Database Directory
-PGDATA="/var/lib/postgresql/data"
-
-# PostgreSQL User
-PGUSER="postgres"
-
-# PostgreSQL Group
-PGGROUP="postgres"
-
-# Extra options to run postmaster with
-PGOPTS=""
-
-
-# SERVER SHUTDOWN:
-# The server will receive 3 signals in the worst case:
-# 1. SIGTERM
-# This signals the server to ignore new connections and to
-# wait for all clients to end their transactions before shutting down.
-# Use WAIT_FOR_DISCONNECT to control how much time the clients
-# should have until the next signal is being sent.
-# 2. SIGINT
-# Tell the server to forcefully disconnect all clients.
-# Terminating a client results in a rollback of the open transactions for this client.
-# Use WAIT_FOR_CLEANUP to determine how much time the server has
-# for cleanup. (Set it to "forever" if you want to wait forever.)
-# 3. SIGQUIT
-# This will terminate the server immediately and results in a recovery run for the next start.
-
-# Wait for clients to disconnect (seconds or "forever")
-WAIT_FOR_DISCONNECT=10
-
-# Time the server has to clean up (seconds or "forever")
-WAIT_FOR_CLEANUP=10
-
-# If you have to export environment variables for the database process,
-# this can be done here.
-# Example:
-# export R_HOME="/usr/lib/R"
-
diff --git a/dev-db/postgresql/files/postgresql.init-8.3 b/dev-db/postgresql/files/postgresql.init-8.3
deleted file mode 100644
index c7a4221b0b15..000000000000
--- a/dev-db/postgresql/files/postgresql.init-8.3
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/files/postgresql.init-8.3,v 1.1 2008/03/26 14:01:25 caleb Exp $
-
-opts="${opts} reload"
-
-depend() {
- use net
-}
-
-checkconfig() {
- if [ ! -d "$PGDATA" ] ; then
- eerror "Directory not found: $PGDATA"
- eerror "Please make sure that PGDATA points to the right path."
- eerror "You can run 'emerge postgresql --config' to setup a new database cluster."
- return 1
- fi
-}
-
-start() {
- checkconfig || return 1
-
- ebegin "Starting PostgreSQL"
-
- if [ -f "$PGDATA/postmaster.pid" ] ; then
- rm -f "$PGDATA/postmaster.pid"
- fi
-
- start-stop-daemon --start \
- --pidfile "${PGDATA}/postmaster.pid" \
- --chuid ${PGUSER}:${PGGROUP} \
- --exec /usr/bin/postmaster \
- -- \
- -D "${PGDATA}" \
- --silent-mode=true \
- ${PGOPTS}
-
- eend $?
-}
-
-stop() {
- ebegin "Stopping PostgreSQL"
- # Note: we have to do --oknodo here, otherwise it will always fail
- # when there are open transactions. This bug has been corrected
- # in baselayout-1.13.0_alpha8.
- start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \
- --retry -TERM/${WAIT_FOR_DISCONNECT}/-INT/${WAIT_FOR_CLEANUP}/-QUIT --oknodo
- eend $?
-}
-
-reload() {
- ebegin "Reloading PostgreSQL configuration"
- start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" --signal HUP --oknodo
- eend $?
-}
-
diff --git a/dev-db/postgresql/postgresql-8.3.1.ebuild b/dev-db/postgresql/postgresql-8.3.1.ebuild
deleted file mode 100644
index e0351293e351..000000000000
--- a/dev-db/postgresql/postgresql-8.3.1.ebuild
+++ /dev/null
@@ -1,226 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.3.1.ebuild,v 1.3 2008/05/19 19:22:40 dev-zero Exp $
-
-inherit eutils flag-o-matic multilib toolchain-funcs versionator
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
-
-MY_PV="${PV/_rc/RC}"
-DESCRIPTION="Sophisticated and powerful Object-Relational DBMS."
-HOMEPAGE="http://www.postgresql.org/"
-SRC_URI="mirror://postgresql/source/v${MY_PV}/${PN}-${MY_PV}.tar.bz2"
-LICENSE="POSTGRESQL"
-SLOT="0"
-IUSE="debug doc kerberos kernel_linux nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib"
-RESTRICT="mirror"
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-RDEPEND="~dev-db/libpq-${PV}
- >=sys-libs/ncurses-5.2
- kerberos? ( virtual/krb5 )
- pam? ( virtual/pam )
- perl? ( >=dev-lang/perl-5.6.1-r2 )
- python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base )
- readline? ( >=sys-libs/readline-4.1 )
- selinux? ( sec-policy/selinux-postgresql )
- ssl? ( >=dev-libs/openssl-0.9.6-r1 )
- tcl? ( >=dev-lang/tcl-8 )
- xml? ( dev-libs/libxml2 dev-libs/libxslt )
- zlib? ( >=sys-libs/zlib-1.1.3 )
- !dev-db/postgresql-server"
-DEPEND="${RDEPEND}
- sys-devel/autoconf
- >=sys-devel/bison-1.875
- nls? ( sys-devel/gettext )
- xml? ( dev-util/pkgconfig )"
-
-PG_DIR="/var/lib/postgresql"
-[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512"
-
-pkg_setup() {
- if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
- if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then
- eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must"
- eerror "use pg_dump to export your existing databases to a file, and then"
- eerror "pg_restore to import them when you have upgraded completely."
- eerror "You must remove your entire database directory to continue."
- eerror "(database directory = ${PG_DIR})."
- die "Remove your database directory to continue"
- fi
- fi
- enewgroup postgres 70
- enewuser postgres 70 /bin/bash /var/lib postgres
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch"
- epatch "${FILESDIR}/${PN}-${PV}-sh.patch"
-
- # Prepare package for future tests
- if use test ; then
- # Fix sandbox violation; note that we're stripping redundant slashes
- # from ${S}, because otherwise the test would fail.
- sed -e "s|/no/such/location|${S/\/\//\/}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source
-
- # 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
- # su - to a valid user, portage again, so we patch the test-scripts to do that.
- mkdir -p "${S}/src/test/regress/tmp_check"
- chown portage "${S}/src/test/regress/tmp_check"
- einfo "Tests will be run as user portage."
- 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"
- fi
- fi
-}
-
-src_compile() {
- filter-flags -ffast-math -feliminate-dwarf2-dups
-
- econf --prefix=/usr \
- --includedir=/usr/include/postgresql/pgsql \
- --sysconfdir=/etc/postgresql \
- --mandir=/usr/share/man \
- --host=${CHOST} \
- --with-docdir=/usr/share/doc/${PF} \
- --libdir=/usr/$(get_libdir) \
- --enable-depend \
- $(use_enable debug ) \
- $(use_with kerberos krb5) \
- $(use_enable nls ) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_enable pg-intdatetime integer-datetimes ) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- $(use_with xml libxml) \
- $(use_with zlib) \
- --with-system-tzdata=/usr/share/zoneinfo \
- || die "configure failed"
-
- emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake failed"
- emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" -C contrib all || die "contrib emake failed"
-}
-
-src_install() {
- if use perl ; then
- mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
- sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
- "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
- fi
-
- cd "${S}"
- emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "main emake install failed"
- emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" -C contrib install || die "contrib emake install failed"
-
- cd "${S}"
- dodoc README HISTORY
-
- cd "${S}/doc"
- dodoc FAQ* README.* TODO bug.template
-
- if use doc ; then
- cd "${S}/doc"
- docinto FAQ_html
- dodoc src/FAQ/*
- docinto sgml
- dodoc src/sgml/*.{sgml,dsl}
- docinto sgml/ref
- dodoc src/sgml/ref/*.sgml
- docinto TODO.detail
- dodoc TODO.detail/*
- fi
-
- newinitd "${FILESDIR}/postgresql.init-${PV%[._]*}" postgresql || die "Inserting init.d-file failed"
- newconfd "${FILESDIR}/postgresql.conf-${PV%[._]*}" postgresql || die "Inserting conf.d-file failed"
-}
-
-pkg_postinst() {
- elog "Execute the following command to setup the initial database environment:"
- elog
- elog "emerge --config =${PF}"
- elog
- elog "The autovacuum function, which was in contrib, has been moved to the main"
- elog "PostgreSQL functions starting with 8.1."
- elog "You can enable it in ${ROOT}/etc/postgresql/postgresql.conf."
- elog
- elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql/'."
-}
-
-pkg_config() {
- einfo "Creating the data directory ..."
- mkdir -p "${PG_DIR}/data"
- chown -Rf postgres:postgres "${PG_DIR}"
- chmod 0700 "${PG_DIR}/data"
-
- einfo "Initializing the database ..."
- if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
- eerror "PostgreSQL ${PV} cannot upgrade your existing databases."
- eerror "You must remove your entire database directory to continue."
- eerror "(database directory = ${PG_DIR})."
- die "Remove your database directory to continue"
- else
- if use kernel_linux ; then
- local SEM=`sysctl -n kernel.sem | cut -f-3`
- local SEMMNI=`sysctl -n kernel.sem | cut -f4`
- local SEMMNI_MIN=`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16`
- local SHMMAX=`sysctl -n kernel.shmmax`
- local SHMMAX_MIN=`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}`
-
- if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then
- eerror "The current value of SEMMNI is too low"
- eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!"
- eerror "Temporary setting this value to ${SEMMNI_MIN} while creating the initial database."
- echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem
- fi
-
- su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data"
-
- if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then
- echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem
- ewarn "Restoring the SEMMNI value to the previous value."
- ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf"
- ewarn "and set it to at least ${SEMMNI_MIN}:"
- ewarn
- ewarn " kernel.sem = ${SEM} ${SEMMNI_MIN}"
- ewarn
- fi
-
- if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then
- eerror "The current value of SHMMAX is too low for postgresql to run."
- eerror "Please edit /etc/sysctl.conf and set this value to at least ${SHMMAX_MIN}:"
- eerror
- eerror " kernel.shmmax = ${SHMMAX_MIN}"
- eerror
- fi
- else
- su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data"
- fi
-
- einfo
- einfo "You can use the '${ROOT}/etc/init.d/postgresql' script to run PostgreSQL instead of 'pg_ctl'."
- einfo
- fi
-}
-
-src_test() {
- einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
- if ! emake -j1 check ; then
- hasq test ${FEATURES} && die "Make check failed. See above for details."
- hasq test ${FEATURES} || eerror "Make check failed. See above for details."
- fi
-
- einfo "Yes, there are other tests which could be run."
- einfo "... and no, we don't plan to add/support them."
- einfo "For now, the main regressions tests will suffice."
- einfo "If you think other tests are necessary, please submit a"
- einfo "bug including a patch for this ebuild to enable them."
-}