aboutsummaryrefslogtreecommitdiffstats
path: root/databases/postgresql84-server
diff options
context:
space:
mode:
authorgirgen <girgen@FreeBSD.org>2011-10-18 17:03:33 +0800
committergirgen <girgen@FreeBSD.org>2011-10-18 17:03:33 +0800
commit965bd7183fad301cd7e971bcd34bb2f480af4b3e (patch)
tree8848844ced97f7e24a13d730205bcecdf9efb44e /databases/postgresql84-server
parent89cfa76ae6fb7892d55d5dca1f667a9c47ad5a07 (diff)
downloadfreebsd-ports-gnome-965bd7183fad301cd7e971bcd34bb2f480af4b3e.tar.gz
freebsd-ports-gnome-965bd7183fad301cd7e971bcd34bb2f480af4b3e.tar.zst
freebsd-ports-gnome-965bd7183fad301cd7e971bcd34bb2f480af4b3e.zip
The PostgreSQL Global Development Group today released minor version updates
for all active branches of the PostgreSQL object-relational database system, including versions 9.1.1, 9.0.5, 8.4.9, 8.3.16 and 8.2.22. All users are strongly urged to update their installations at the next scheduled downtime. URL: http://www.postgresql.org/about/news.1355 Cleanup ports. Better handling of the knob PG_USER. Also add uuid to 9.0 and 9.1 contrib ports.
Diffstat (limited to 'databases/postgresql84-server')
-rw-r--r--databases/postgresql84-server/Makefile27
-rw-r--r--databases/postgresql84-server/distinfo4
-rw-r--r--databases/postgresql84-server/files/502.pgsql.in19
-rw-r--r--databases/postgresql84-server/files/patch-src-plperl-plperl28
-rw-r--r--databases/postgresql84-server/files/pkg-install-server.in63
-rw-r--r--databases/postgresql84-server/pkg-install-server27
-rw-r--r--databases/postgresql84-server/pkg-plist-client6
-rw-r--r--databases/postgresql84-server/pkg-plist-server11
8 files changed, 68 insertions, 117 deletions
diff --git a/databases/postgresql84-server/Makefile b/databases/postgresql84-server/Makefile
index e21f03015290..769240c9feb7 100644
--- a/databases/postgresql84-server/Makefile
+++ b/databases/postgresql84-server/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME?= postgresql
-DISTVERSION?= 8.4.8
-PORTREVISION?= 1
+DISTVERSION?= 8.4.9
+PORTREVISION?= 0
CATEGORIES?= databases
MASTER_SITES= ${MASTER_SITE_PGSQL}
MASTER_SITE_SUBDIR= source/v${DISTVERSION}
@@ -27,6 +27,7 @@ DIST_SUBDIR= postgresql
UNIQUENAME?= ${PORTNAME}84
LATEST_LINK?= ${PKGNAMEPREFIX}${UNIQUENAME}${PKGNAMESUFFIX}
+PKGINSTALL?= ${PKGDIR}/pkg-install${PKGNAMESUFFIX}
USE_BZIP2= YES
USE_GMAKE= YES
GNU_CONFIGURE= YES
@@ -36,7 +37,7 @@ GNU_CONFIGURE= YES
.endif
PG_USER?= pgsql
-PG_GROUP?= pgsql
+PG_GROUP?= ${PG_USER}
PG_UID?= 70
LDFLAGS+= -L${LOCALBASE}/lib
@@ -60,7 +61,7 @@ INSTALL_DIRS?= ${BUILD_DIRS}
SERVER_ONLY= yes
USE_RC_SUBR= postgresql
USE_PGSQL= yes
-WANT_PGSQL_VER= ${PORTVERSION:C/([0-9][0-9]*)\.([0-9][0-9]*).*/\1\2/g}
+WANT_PGSQL_VER= ${DISTVERSION:C/([0-9][0-9]*)\.([0-9][0-9]*).*/\1\2/g}
SUB_FILES+= 502.pgsql
.endif
@@ -264,7 +265,7 @@ MAN7= abort.7 alter_aggregate.7 alter_conversion.7 alter_database.7 \
.if defined(SERVER_ONLY)
pre-everything::
- @${SH} ${FILESDIR}/pkg-install${PKGNAMESUFFIX}.in ${PORTNAME} BACKUPWARNING
+ @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
.endif
.if !defined(NO_BUILD)
@@ -286,21 +287,13 @@ do-build:
SUB_FILES+= pkg-message${PKGNAMESUFFIX}
PKGMESSAGE= ${WRKSRC}/pkg-message${PKGNAMESUFFIX}
. endif
-
. if exists(${FILESDIR}/pkg-install${PKGNAMESUFFIX}.in)
-SUB_FILES+= pkg-install${PKGNAMESUFFIX}
+SUB_FILES+= pkg-install${PKGNAMESUFFIX}
SUB_LIST= PG_GROUP=$(PG_GROUP) \
PG_USER=$(PG_USER) \
PG_UID=$(PG_UID)
PLIST_SUB+= PG_USER=$(PG_USER)
-PKGINSTALL= ${WRKDIR}/pkg-install${PKGNAMESUFFIX}
. endif
-
-.endif
-
-.if defined(SERVER_ONLY)
-pre-su-install:
- @ ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
.endif
.if !defined(NO_BUILD)
@@ -312,6 +305,12 @@ post-patch:
${WRKSRC}/configure.in
. endif
+. if defined(SERVER_ONLY) && (${PG_USER} != "pgsql")
+pre-install:
+ @${SED} -n s,pgsql,${PG_USER},gp ${PORTSDIR}/UIDs > ${WRKDIR}/pguid
+ @${SED} -n s,pgsql,${PG_GROUP},gp ${PORTSDIR}/GIDs > ${WRKDIR}/pggid
+. endif
+
do-install:
@for dir in ${INSTALL_DIRS}; do \
cd ${WRKSRC}/$${dir} && \
diff --git a/databases/postgresql84-server/distinfo b/databases/postgresql84-server/distinfo
index 3e969fbbef77..e527bfdc7039 100644
--- a/databases/postgresql84-server/distinfo
+++ b/databases/postgresql84-server/distinfo
@@ -1,4 +1,4 @@
-SHA256 (postgresql/postgresql-8.4.8.tar.bz2) = 3e90ef2a86a9f4831e21ff4a574fbfb8e1b8c097af637c93ec43c64c684a0938
-SIZE (postgresql/postgresql-8.4.8.tar.bz2) = 14136376
+SHA256 (postgresql/postgresql-8.4.9.tar.bz2) = 1d58cb8d0cb8ae8f61042b2d5aa54135a2d2a0f324d06593870e1242b0e8c38a
+SIZE (postgresql/postgresql-8.4.9.tar.bz2) = 14275979
SHA256 (postgresql/pg-840-icu-2009-09-15.diff.gz) = c09d3b59340a3bb6ea754e985739d4fbb47f730d1e48a357c5585825034fc72e
SIZE (postgresql/pg-840-icu-2009-09-15.diff.gz) = 4321
diff --git a/databases/postgresql84-server/files/502.pgsql.in b/databases/postgresql84-server/files/502.pgsql.in
index 9fcd98cce81a..95a67a68e457 100644
--- a/databases/postgresql84-server/files/502.pgsql.in
+++ b/databases/postgresql84-server/files/502.pgsql.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/databases/postgresql84-server/files/502.pgsql.in,v 1.1 2011-04-18 23:34:27 girgen Exp $
+# $FreeBSD: /tmp/pcvs/ports/databases/postgresql84-server/files/502.pgsql.in,v 1.2 2011-10-18 09:03:32 girgen Exp $
#
# Maintenance shell script to vacuum and backup database
# Put this in /usr/local/etc/periodic/daily, and it will be run
@@ -19,10 +19,12 @@
# daily_pgsql_backup_enable="foo bar db1 db2" # only do backup of a limited selection of databases
# daily_pgsql_vacuum_enable="YES" # do vacuum
-daily_pgsql_vacuum_args="-z"
-daily_pgsql_pgdump_args="-b -F c"
+daily_pgsql_user=%%PG_USER%%
+daily_pgsql_vacuum_args="-U ${daily_pgsql_user} -qaz"
+daily_pgsql_pgdump_args="-U ${daily_pgsql_user} -bF c"
+daily_pgsql_pgdumpall_globals_args="-U ${daily_pgsql_user}"
# backupdir is relative to ~pgsql home directory unless it begins with a slash:
-daily_pgsql_backupdir="~%%PG_USER%%/backups"
+daily_pgsql_backupdir="~${daily_pgsql_user}/backups"
daily_pgsql_savedays="7"
# If there is a global system configuration file, suck it in.
@@ -44,7 +46,7 @@ pgsql_backup() {
# but this might not be where you want the backups...
if [ ! -d ${backupdir} ] ; then
echo Creating ${backupdir}
- mkdir -m 700 ${backupdir}; chown %%PG_USER%% ${backupdir}
+ mkdir -m 700 ${backupdir}; chown ${daily_pgsql_user} ${backupdir}
fi
echo
@@ -55,13 +57,14 @@ pgsql_backup() {
rc=$?
now=`date "+%Y-%m-%dT%H:%M:%S"`
file=${daily_pgsql_backupdir}/pgglobals_${now}
- su -l %%PG_USER%% -c "umask 077; pg_dumpall -g -U %%PG_USER%% | gzip -9 > ${file}.gz"
+ su -l ${daily_pgsql_user} -c \
+ "umask 077; pg_dumpall -g ${daily_pgsql_pgdumpall_globals_args} | gzip -9 > ${file}.gz"
db=$1
while shift; do
echo -n " $db"
file=${backupdir}/pgdump_${db}_${now}
- su -l %%PG_USER%% -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -U %%PG_USER%% -f ${file} ${db}"
+ su -l ${daily_pgsql_user} -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}"
[ $? -gt 0 ] && rc=3
db=$1
done
@@ -99,7 +102,7 @@ case "$daily_pgsql_vacuum_enable" in
echo
echo "PostgreSQL vacuum"
- su -l %%PG_USER%% -c "vacuumdb -a -q -U %%PG_USER%% ${daily_pgsql_vacuum_args}"
+ su -l ${daily_pgsql_user} -c "vacuumdb ${daily_pgsql_vacuum_args}"
if [ $? -gt 0 ]
then
echo
diff --git a/databases/postgresql84-server/files/patch-src-plperl-plperl b/databases/postgresql84-server/files/patch-src-plperl-plperl
deleted file mode 100644
index ea959506353a..000000000000
--- a/databases/postgresql84-server/files/patch-src-plperl-plperl
+++ /dev/null
@@ -1,28 +0,0 @@
-Obtained from: http://archives.postgresql.org/pgsql-hackers/2011-04/msg01283.php
-Reference: http://search.cpan.org/~jesse/perl-5.14.0/pod/perldelta.pod#GvCV()_and_GvGP()_are_no_longer_lvalues
-
---- src/pl/plperl/plperl.c.orig 2011-04-15 11:15:53.000000000 +0800
-+++ src/pl/plperl/plperl.c 2011-05-19 20:39:34.126713700 +0800
-@@ -700,7 +700,7 @@
- if (!isGV_with_GP(sv) || !GvCV(sv))
- continue;
- SvREFCNT_dec(GvCV(sv)); /* free the CV */
-- GvCV(sv) = NULL; /* prevent call via GV */
-+ GvCV_set(sv, NULL); /* prevent call via GV */
- }
- hv_clear(stash);
-
---- src/pl/plperl/plperl.h.orig 2011-04-15 11:15:53.000000000 +0800
-+++ src/pl/plperl/plperl.h 2011-05-19 20:39:34.127713548 +0800
-@@ -43,6 +43,11 @@
- #undef bool
- #endif
-
-+/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */
-+#ifndef GvCV_set
-+#define GvCV_set(gv, cv) (GvCV(gv) = cv)
-+#endif
-+
- /* routines from spi_internal.c */
- int spi_DEBUG(void);
- int spi_LOG(void);
diff --git a/databases/postgresql84-server/files/pkg-install-server.in b/databases/postgresql84-server/files/pkg-install-server.in
deleted file mode 100644
index da85c73b7e4c..000000000000
--- a/databases/postgresql84-server/files/pkg-install-server.in
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-
-# $FreeBSD$
-
-PATH=/bin:/usr/bin:/usr/sbin
-
-PG_USER=%%PG_USER%%
-PG_GROUP=%%PG_GROUP%%
-PG_UID=%%PG_UID%%
-
-backupwarning() { echo "
-
- =========== BACKUP YOUR DATA! =============
- As always, backup your data before
- upgrading. If the upgrade leads to a higher
- minor revision (e.g. 7.3.x -> 7.4), a dump
- and restore of all databases is
- required. This is *NOT* done by the port!
-
- Press ctrl-C *now* if you need to pg_dump.
- ===========================================
-"
- sleep 5
-}
-
-case $2 in
-PRE-INSTALL)
- backupwarning
- DB_DIR=${PKG_PREFIX}/${PG_USER}
-
- if pw group show "${PG_GROUP}" 2>/dev/null; then
- echo "You already have a group \"${PG_GROUP}\", so I will use it."
- else
- if pw groupadd ${PG_GROUP} -g ${PG_UID}; then
- echo "Added group \"${PG_GROUP}\"."
- else
- echo "Adding group \"${PG_GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${PG_USER}" 2>/dev/null; then
- echo "You already have a user \"${PG_USER}\", so I will use it."
- else
- if pw useradd ${PG_USER} -u ${PG_UID} -g ${PG_GROUP} -h - \
- -d ${DB_DIR} -c "PostgreSQL Daemon"
- then
- echo "Added user \"${PG_USER}\"."
- else
- echo "Adding user \"${PG_USER}\" failed..."
- exit 1
- fi
- fi
-
- if ! [ -x ~${PG_USER} ] ; then
- install -m 755 -o ${PG_USER} -g ${PG_GROUP} -d ${DB_DIR}
- fi
- ;;
-
-BACKUPWARNING)
- backupwarning
- ;;
-esac
diff --git a/databases/postgresql84-server/pkg-install-server b/databases/postgresql84-server/pkg-install-server
new file mode 100644
index 000000000000..6f41226305d7
--- /dev/null
+++ b/databases/postgresql84-server/pkg-install-server
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+# $FreeBSD$
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+backupwarning() {
+cat <<EOF
+
+ =========== BACKUP YOUR DATA! =============
+ As always, backup your data before
+ upgrading. If the upgrade leads to a higher
+ minor revision (e.g. 7.3.x -> 7.4), a dump
+ and restore of all databases is
+ required. This is *NOT* done by the port!
+
+ Press ctrl-C *now* if you need to pg_dump.
+ ===========================================
+EOF
+ sleep 5
+}
+
+case $2 in
+PRE-INSTALL)
+ backupwarning
+ ;;
+esac
diff --git a/databases/postgresql84-server/pkg-plist-client b/databases/postgresql84-server/pkg-plist-client
index 715b496896bb..92d1fdccad68 100644
--- a/databases/postgresql84-server/pkg-plist-client
+++ b/databases/postgresql84-server/pkg-plist-client
@@ -598,6 +598,12 @@ share/postgresql/psqlrc.sample
%%GETTEXT%%share/locale/ko/LC_MESSAGES/pgscripts-8.4.mo
%%GETTEXT%%share/locale/ko/LC_MESSAGES/psql-8.4.mo
%%GETTEXT%%share/locale/nb/LC_MESSAGES/pg_config-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/ecpg-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/ecpglib6-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/libpq5-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/pg_config-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/pg_dump-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/pgscripts-8.4.mo
%%GETTEXT%%share/locale/pt_BR/LC_MESSAGES/ecpg-8.4.mo
%%GETTEXT%%share/locale/pt_BR/LC_MESSAGES/ecpglib6-8.4.mo
%%GETTEXT%%share/locale/pt_BR/LC_MESSAGES/libpq5-8.4.mo
diff --git a/databases/postgresql84-server/pkg-plist-server b/databases/postgresql84-server/pkg-plist-server
index 9134bcce6f4e..1577d8bc5bdf 100644
--- a/databases/postgresql84-server/pkg-plist-server
+++ b/databases/postgresql84-server/pkg-plist-server
@@ -81,6 +81,12 @@ share/postgresql/system_views.sql
%%GETTEXT%%share/locale/ko/LC_MESSAGES/pg_resetxlog-8.4.mo
%%GETTEXT%%share/locale/ko/LC_MESSAGES/plpgsql-8.4.mo
%%GETTEXT%%share/locale/ko/LC_MESSAGES/postgres-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/initdb-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/pg_controldata-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/pg_ctl-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/pg_resetxlog-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/plpgsql-8.4.mo
+%%GETTEXT%%share/locale/pl/LC_MESSAGES/postgres-8.4.mo
%%GETTEXT%%share/locale/pt_BR/LC_MESSAGES/initdb-8.4.mo
%%GETTEXT%%share/locale/pt_BR/LC_MESSAGES/pg_controldata-8.4.mo
%%GETTEXT%%share/locale/pt_BR/LC_MESSAGES/pg_ctl-8.4.mo
@@ -145,6 +151,7 @@ share/postgresql/snowball_create.sql
%%TZDATA%%share/postgresql/timezone/Africa/Gaborone
%%TZDATA%%share/postgresql/timezone/Africa/Harare
%%TZDATA%%share/postgresql/timezone/Africa/Johannesburg
+%%TZDATA%%share/postgresql/timezone/Africa/Juba
%%TZDATA%%share/postgresql/timezone/Africa/Kampala
%%TZDATA%%share/postgresql/timezone/Africa/Khartoum
%%TZDATA%%share/postgresql/timezone/Africa/Kigali
@@ -259,10 +266,12 @@ share/postgresql/snowball_create.sql
%%TZDATA%%share/postgresql/timezone/America/Kentucky/Louisville
%%TZDATA%%share/postgresql/timezone/America/Kentucky/Monticello
%%TZDATA%%share/postgresql/timezone/America/Knox_IN
+%%TZDATA%%share/postgresql/timezone/America/Kralendijk
%%TZDATA%%share/postgresql/timezone/America/La_Paz
%%TZDATA%%share/postgresql/timezone/America/Lima
%%TZDATA%%share/postgresql/timezone/America/Los_Angeles
%%TZDATA%%share/postgresql/timezone/America/Louisville
+%%TZDATA%%share/postgresql/timezone/America/Lower_Princes
%%TZDATA%%share/postgresql/timezone/America/Maceio
%%TZDATA%%share/postgresql/timezone/America/Managua
%%TZDATA%%share/postgresql/timezone/America/Manaus
@@ -753,9 +762,7 @@ share/postgresql/tsearch_data/ispell_sample.dict
share/postgresql/tsearch_data/synonym_sample.syn
share/postgresql/tsearch_data/thesaurus_sample.ths
@dirrmtry share/postgresql/tsearch_data
-@unexec echo "Warning: If you will *NOT* use this package anymore, please remove the pgsql user manually."
@dirrmtry share/postgresql
@dirrmtry etc/periodic/daily
@dirrmtry etc/periodic
@dirrmtry lib/postgresql
-@dirrmtry %%PG_USER%%