diff options
author | Palle Girgensohn <girgen@FreeBSD.org> | 2011-04-18 23:34:27 +0000 |
---|---|---|
committer | Palle Girgensohn <girgen@FreeBSD.org> | 2011-04-18 23:34:27 +0000 |
commit | 73c856222edb8c22377bf9a1c81a724065e3a31c (patch) | |
tree | 2a77e52eec6ad4963a7f80ea0b338e506c5e9a85 /databases | |
parent | 0953b320a922e578d792b56c3fedf8c37e6776aa (diff) | |
download | ports-73c856222edb8c22377bf9a1c81a724065e3a31c.tar.gz ports-73c856222edb8c22377bf9a1c81a724065e3a31c.zip |
Notes
Diffstat (limited to 'databases')
37 files changed, 193 insertions, 124 deletions
diff --git a/databases/postgresql82-server/Makefile b/databases/postgresql82-server/Makefile index 221934ae63c5..ab69ca9e7555 100644 --- a/databases/postgresql82-server/Makefile +++ b/databases/postgresql82-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= postgresql -PORTVERSION?= 8.2.20 +PORTVERSION?= 8.2.21 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= source/v${PORTVERSION} @@ -16,8 +16,8 @@ DISTFILES?= postgresql-${PORTVERSION}${EXTRACT_SUFX} MAINTAINER?= girgen@FreeBSD.org COMMENT?= The most advanced open-source database available anywhere -CONFLICTS?= ${PORTNAME}-client-7.* \ - ${PORTNAME}${PKGNAMESUFFIX}-7.* \ +CONFLICTS?= ${PORTNAME}-client-[79].* \ + ${PORTNAME}${PKGNAMESUFFIX}-[79].* \ ${PORTNAME}-client-8.[0-13-9]* \ ${PORTNAME}${PKGNAMESUFFIX}-8.[0-13-9]* diff --git a/databases/postgresql82-server/distinfo b/databases/postgresql82-server/distinfo index e2a274b1a5ea..2d5cb196d2c1 100644 --- a/databases/postgresql82-server/distinfo +++ b/databases/postgresql82-server/distinfo @@ -1,2 +1,2 @@ -SHA256 (postgresql/postgresql-8.2.20.tar.bz2) = 77674a5804fb96ae28966c3950e38455720b23d9acfd87a092a6f2f3d7520a57 -SIZE (postgresql/postgresql-8.2.20.tar.bz2) = 12756288 +SHA256 (postgresql/postgresql-8.2.21.tar.bz2) = b3fd5345b751557a1153f98e104fb58d1519c10dac81dc013ff1eb46c7826faa +SIZE (postgresql/postgresql-8.2.21.tar.bz2) = 12768593 diff --git a/databases/postgresql82-server/files/pkg-message-client.in b/databases/postgresql82-server/files/pkg-message-client.in index 722d50cb4244..6ea9564c156d 100644 --- a/databases/postgresql82-server/files/pkg-message-client.in +++ b/databases/postgresql82-server/files/pkg-message-client.in @@ -1,6 +1,6 @@ The PostgreSQL port has a collection of "side orders": -postgresql-doc +postgresql-docs For all of the html documentation p5-Pg diff --git a/databases/postgresql82-server/pkg-plist-server b/databases/postgresql82-server/pkg-plist-server index e9755aade602..4f2c1fcdcf32 100644 --- a/databases/postgresql82-server/pkg-plist-server +++ b/databases/postgresql82-server/pkg-plist-server @@ -283,6 +283,7 @@ share/postgresql/timezone/America/Mazatlan share/postgresql/timezone/America/Mendoza share/postgresql/timezone/America/Menominee share/postgresql/timezone/America/Merida +share/postgresql/timezone/America/Metlakatla share/postgresql/timezone/America/Mexico_City share/postgresql/timezone/America/Miquelon share/postgresql/timezone/America/Moncton @@ -295,6 +296,7 @@ share/postgresql/timezone/America/New_York share/postgresql/timezone/America/Nipigon share/postgresql/timezone/America/Nome share/postgresql/timezone/America/Noronha +share/postgresql/timezone/America/North_Dakota/Beulah share/postgresql/timezone/America/North_Dakota/Center share/postgresql/timezone/America/North_Dakota/New_Salem share/postgresql/timezone/America/Ojinaga @@ -321,6 +323,7 @@ share/postgresql/timezone/America/Santo_Domingo share/postgresql/timezone/America/Sao_Paulo share/postgresql/timezone/America/Scoresbysund share/postgresql/timezone/America/Shiprock +share/postgresql/timezone/America/Sitka share/postgresql/timezone/America/St_Barthelemy share/postgresql/timezone/America/St_Johns share/postgresql/timezone/America/St_Kitts diff --git a/databases/postgresql83-server/Makefile b/databases/postgresql83-server/Makefile index 5f09e8aa7a82..99e01933a334 100644 --- a/databases/postgresql83-server/Makefile +++ b/databases/postgresql83-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= postgresql -DISTVERSION?= 8.3.14 +DISTVERSION?= 8.3.15 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= source/v${DISTVERSION} @@ -15,8 +15,8 @@ PKGNAMESUFFIX?= -server MAINTAINER?= girgen@FreeBSD.org COMMENT?= The most advanced open-source database available anywhere -CONFLICTS?= ${PORTNAME}-client-7.* \ - ${PORTNAME}${PKGNAMESUFFIX}-7.* \ +CONFLICTS?= ${PORTNAME}-client-[79].* \ + ${PORTNAME}${PKGNAMESUFFIX}-[79].* \ ${PORTNAME}-client-8.[0-24-9]* \ ${PORTNAME}${PKGNAMESUFFIX}-8.[0-24-9]* diff --git a/databases/postgresql83-server/distinfo b/databases/postgresql83-server/distinfo index 6dd407529c0d..c064be0cd87a 100644 --- a/databases/postgresql83-server/distinfo +++ b/databases/postgresql83-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (postgresql/postgresql-8.3.14.tar.bz2) = 5673e0191f623a2f6607808e63c5290d5f33de6da7d9c2b15cb9e8817fa93c99 -SIZE (postgresql/postgresql-8.3.14.tar.bz2) = 14345092 +SHA256 (postgresql/postgresql-8.3.15.tar.bz2) = 433bfad5c9ccca38029be193d3c4ff47d394f4c678be41ef709063255c97cf16 +SIZE (postgresql/postgresql-8.3.15.tar.bz2) = 14344586 SHA256 (postgresql/pg-8311-icu-xx-2010-05-14.diff.gz) = 44146bdb29a5a7d51c70911096ed6d265bdf09f74f0084ee7ad1883bea2f852a SIZE (postgresql/pg-8311-icu-xx-2010-05-14.diff.gz) = 5064 diff --git a/databases/postgresql83-server/files/pkg-message-client.in b/databases/postgresql83-server/files/pkg-message-client.in index 3183bc136aa6..ff486a635645 100644 --- a/databases/postgresql83-server/files/pkg-message-client.in +++ b/databases/postgresql83-server/files/pkg-message-client.in @@ -1,6 +1,6 @@ The PostgreSQL port has a collection of "side orders": -postgresql-doc +postgresql-docs For all of the html documentation p5-Pg diff --git a/databases/postgresql83-server/pkg-plist-server b/databases/postgresql83-server/pkg-plist-server index d1fe2532b92e..8abc4498a995 100644 --- a/databases/postgresql83-server/pkg-plist-server +++ b/databases/postgresql83-server/pkg-plist-server @@ -294,6 +294,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Mendoza %%TZDATA%%share/postgresql/timezone/America/Menominee %%TZDATA%%share/postgresql/timezone/America/Merida +%%TZDATA%%share/postgresql/timezone/America/Metlakatla %%TZDATA%%share/postgresql/timezone/America/Mexico_City %%TZDATA%%share/postgresql/timezone/America/Miquelon %%TZDATA%%share/postgresql/timezone/America/Moncton @@ -306,6 +307,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Nipigon %%TZDATA%%share/postgresql/timezone/America/Nome %%TZDATA%%share/postgresql/timezone/America/Noronha +%%TZDATA%%share/postgresql/timezone/America/North_Dakota/Beulah %%TZDATA%%share/postgresql/timezone/America/North_Dakota/Center %%TZDATA%%share/postgresql/timezone/America/North_Dakota/New_Salem %%TZDATA%%share/postgresql/timezone/America/Ojinaga @@ -332,6 +334,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Sao_Paulo %%TZDATA%%share/postgresql/timezone/America/Scoresbysund %%TZDATA%%share/postgresql/timezone/America/Shiprock +%%TZDATA%%share/postgresql/timezone/America/Sitka %%TZDATA%%share/postgresql/timezone/America/St_Barthelemy %%TZDATA%%share/postgresql/timezone/America/St_Johns %%TZDATA%%share/postgresql/timezone/America/St_Kitts diff --git a/databases/postgresql84-server/Makefile b/databases/postgresql84-server/Makefile index 8a6581f83390..d9800aa8e6c7 100644 --- a/databases/postgresql84-server/Makefile +++ b/databases/postgresql84-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= postgresql -DISTVERSION?= 8.4.7 +DISTVERSION?= 8.4.8 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= source/v${DISTVERSION} @@ -15,8 +15,8 @@ PKGNAMESUFFIX?= -server MAINTAINER?= girgen@FreeBSD.org COMMENT?= The most advanced open-source database available anywhere -CONFLICTS?= ${PORTNAME}-client-7.* \ - ${PORTNAME}${PKGNAMESUFFIX}-7.* \ +CONFLICTS?= ${PORTNAME}-client-[79].* \ + ${PORTNAME}${PKGNAMESUFFIX}-[79].* \ ${PORTNAME}-client-8.[0-35-9]* \ ${PORTNAME}${PKGNAMESUFFIX}-8.[0-35-9]* @@ -26,7 +26,6 @@ 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 @@ -35,8 +34,9 @@ GNU_CONFIGURE= YES .undef GNU_CONFIGURE .endif -PGUSER= pgsql -PGGROUP= pgsql +PG_USER?= pgsql +PG_GROUP?= pgsql +PG_UID?= 70 LDFLAGS+= -L${LOCALBASE}/lib INCLUDES+= -I${LOCALBASE}/include @@ -61,6 +61,7 @@ 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} +SUB_FILES+= 502.pgsql .endif .if !defined(SLAVE_ONLY) @@ -93,7 +94,7 @@ OPTIONS+= OPTIMIZED_CFLAGS "Builds with compiler optimizations (-O3)" off OPTIONS+= XML "Build with XML data type (server)" on OPTIONS+= TZDATA "Use internal timezone database (server)" on OPTIONS+= DEBUG "Builds with debugging symbols" off -OPTIONS+= GSSAPI "BUild with GSSAPI support" on +OPTIONS+= GSSAPI "BUild with GSSAPI support" off # See http://people.freebsd.org/~girgen/postgresql-icu/README.html for more info OPTIONS+= ICU "Use ICU for unicode collation (server)" off @@ -252,7 +253,7 @@ MAN7= abort.7 alter_aggregate.7 alter_conversion.7 alter_database.7 \ .if defined(SERVER_ONLY) pre-everything:: - @${SH} ${PKGINSTALL} ${PORTNAME} BACKUPWARNING + @${SH} ${FILESDIR}/pkg-install${PKGNAMESUFFIX}.in ${PORTNAME} BACKUPWARNING .endif .if !defined(NO_BUILD) @@ -274,11 +275,21 @@ 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_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} PGUSER=${PGUSER} PGGROUP=${PGGROUP} \ + @ ${SETENV} PKG_PREFIX=${PREFIX} PG_USER=$(PG_USER) PG_GROUP=$(PG_GROUP) \ ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL .endif @@ -299,7 +310,7 @@ do-install: . if defined(SERVER_ONLY) @ ${MKDIR} ${PREFIX}/share/postgresql ;\ ${MKDIR} ${PREFIX}/etc/periodic/daily ;\ - ${INSTALL_SCRIPT} ${FILESDIR}/502.pgsql \ + ${INSTALL_SCRIPT} ${WRKDIR}/502.pgsql \ ${PREFIX}/etc/periodic/daily . endif # SERVER_ONLY . if defined(CLIENT_ONLY) diff --git a/databases/postgresql84-server/distinfo b/databases/postgresql84-server/distinfo index 9055ecd8fdbc..3e969fbbef77 100644 --- a/databases/postgresql84-server/distinfo +++ b/databases/postgresql84-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (postgresql/postgresql-8.4.7.tar.bz2) = 08032849da121e67e318f7ff4e68d3ac88f29050e242641f717c4270839b597b -SIZE (postgresql/postgresql-8.4.7.tar.bz2) = 14133535 +SHA256 (postgresql/postgresql-8.4.8.tar.bz2) = 3e90ef2a86a9f4831e21ff4a574fbfb8e1b8c097af637c93ec43c64c684a0938 +SIZE (postgresql/postgresql-8.4.8.tar.bz2) = 14136376 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 b/databases/postgresql84-server/files/502.pgsql.in index 281189a59c46..9fcd98cce81a 100644 --- a/databases/postgresql84-server/files/502.pgsql +++ b/databases/postgresql84-server/files/502.pgsql.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD$ +# $FreeBSD: /tmp/pcvs/ports/databases/postgresql84-server/files/502.pgsql.in,v 1.1 2011-04-18 23:34:27 girgen Exp $ # # Maintenance shell script to vacuum and backup database # Put this in /usr/local/etc/periodic/daily, and it will be run @@ -22,7 +22,7 @@ daily_pgsql_vacuum_args="-z" daily_pgsql_pgdump_args="-b -F c" # backupdir is relative to ~pgsql home directory unless it begins with a slash: -daily_pgsql_backupdir="~pgsql/backups" +daily_pgsql_backupdir="~%%PG_USER%%/backups" daily_pgsql_savedays="7" # If there is a global system configuration file, suck it in. @@ -39,12 +39,12 @@ eval backupdir=${daily_pgsql_backupdir} rc=0 pgsql_backup() { - # daily_pgsql_backupdir must be writeable by user pgsql - # ~pgsql is just that under normal circumstances, + # daily_pgsql_backupdir must be writeable by user %%PG_USER%% + # ~%%PG_USER%% is just that under normal circumstances, # but this might not be where you want the backups... if [ ! -d ${backupdir} ] ; then echo Creating ${backupdir} - mkdir -m 700 ${backupdir}; chown pgsql ${backupdir} + mkdir -m 700 ${backupdir}; chown %%PG_USER%% ${backupdir} fi echo @@ -55,13 +55,13 @@ pgsql_backup() { rc=$? now=`date "+%Y-%m-%dT%H:%M:%S"` file=${daily_pgsql_backupdir}/pgglobals_${now} - su -l pgsql -c "umask 077; pg_dumpall -g | gzip -9 > ${file}.gz" + su -l %%PG_USER%% -c "umask 077; pg_dumpall -g -U %%PG_USER%% | gzip -9 > ${file}.gz" db=$1 while shift; do echo -n " $db" file=${backupdir}/pgdump_${db}_${now} - su -l pgsql -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}" + su -l %%PG_USER%% -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -U %%PG_USER%% -f ${file} ${db}" [ $? -gt 0 ] && rc=3 db=$1 done @@ -79,7 +79,7 @@ pgsql_backup() { case "$daily_pgsql_backup_enable" in [Yy][Ee][Ss]) - dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` + dbnames=`su -l %%PG_USER%% -c "umask 077; psql -q -t -A -d template1 -U %%PG_USER%% -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` pgsql_backup $dbnames ;; @@ -99,7 +99,7 @@ case "$daily_pgsql_vacuum_enable" in echo echo "PostgreSQL vacuum" - su -l pgsql -c "vacuumdb -a -q ${daily_pgsql_vacuum_args}" + su -l %%PG_USER%% -c "vacuumdb -a -q -U %%PG_USER%% ${daily_pgsql_vacuum_args}" if [ $? -gt 0 ] then echo diff --git a/databases/postgresql84-server/pkg-install-server b/databases/postgresql84-server/files/pkg-install-server.in index 6dc3b6fdbd67..a9651cfa6156 100644 --- a/databases/postgresql84-server/pkg-install-server +++ b/databases/postgresql84-server/files/pkg-install-server.in @@ -3,6 +3,9 @@ # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin +PG_USER=%%PG_USER%% +PG_GROUP=%%PG_GROUP%% +PG_UID=%%PG_UID%% backupwarning() { echo " @@ -22,11 +25,11 @@ backupwarning() { echo " case $2 in PRE-INSTALL) backupwarning - PGUSER=${PGUSER:-pgsql} - PGGROUP=${PGGROUP:-pgsql} - DB_DIR=${PKG_PREFIX}/${PGUSER} - UID=70 - GID=70 + PGUSER=${PGUSER:-${PG_USER}} + PGGROUP=${PGGROUP:-${PG_GROUP}} + DB_DIR=${PKG_PREFIX}/${PG_USER} + UID=${PG_UID} + GID=${PG_UID} if pw group show "${PGGROUP}" 2>/dev/null; then echo "You already have a group \"${PGGROUP}\", so I will use it." diff --git a/databases/postgresql84-server/files/pkg-message-client.in b/databases/postgresql84-server/files/pkg-message-client.in index 3183bc136aa6..ff486a635645 100644 --- a/databases/postgresql84-server/files/pkg-message-client.in +++ b/databases/postgresql84-server/files/pkg-message-client.in @@ -1,6 +1,6 @@ The PostgreSQL port has a collection of "side orders": -postgresql-doc +postgresql-docs For all of the html documentation p5-Pg diff --git a/databases/postgresql84-server/files/postgresql.in b/databases/postgresql84-server/files/postgresql.in index 405d2efaa4d3..d1e3c763f8da 100644 --- a/databases/postgresql84-server/files/postgresql.in +++ b/databases/postgresql84-server/files/postgresql.in @@ -32,7 +32,7 @@ load_rc_config postgresql # set defaults postgresql_enable=${postgresql_enable:-"NO"} postgresql_flags=${postgresql_flags:-"-w -s -m fast"} -postgresql_user=pgsql +postgresql_user=${postgresql_user:-"%%PG_USER%%"} eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} postgresql_class=${postgresql_class:-"default"} postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} diff --git a/databases/postgresql84-server/pkg-plist-client b/databases/postgresql84-server/pkg-plist-client index 702575d6b8fa..715b496896bb 100644 --- a/databases/postgresql84-server/pkg-plist-client +++ b/databases/postgresql84-server/pkg-plist-client @@ -40,6 +40,7 @@ include/postgresql/server/access/slru.h include/postgresql/server/access/subtrans.h include/postgresql/server/access/sysattr.h include/postgresql/server/access/transam.h +include/postgresql/server/access/tupconvert.h include/postgresql/server/access/tupdesc.h include/postgresql/server/access/tupmacs.h include/postgresql/server/access/tuptoaster.h diff --git a/databases/postgresql84-server/pkg-plist-server b/databases/postgresql84-server/pkg-plist-server index d539274d1363..9134bcce6f4e 100644 --- a/databases/postgresql84-server/pkg-plist-server +++ b/databases/postgresql84-server/pkg-plist-server @@ -273,6 +273,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Mendoza %%TZDATA%%share/postgresql/timezone/America/Menominee %%TZDATA%%share/postgresql/timezone/America/Merida +%%TZDATA%%share/postgresql/timezone/America/Metlakatla %%TZDATA%%share/postgresql/timezone/America/Mexico_City %%TZDATA%%share/postgresql/timezone/America/Miquelon %%TZDATA%%share/postgresql/timezone/America/Moncton @@ -285,6 +286,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Nipigon %%TZDATA%%share/postgresql/timezone/America/Nome %%TZDATA%%share/postgresql/timezone/America/Noronha +%%TZDATA%%share/postgresql/timezone/America/North_Dakota/Beulah %%TZDATA%%share/postgresql/timezone/America/North_Dakota/Center %%TZDATA%%share/postgresql/timezone/America/North_Dakota/New_Salem %%TZDATA%%share/postgresql/timezone/America/Ojinaga @@ -311,6 +313,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Sao_Paulo %%TZDATA%%share/postgresql/timezone/America/Scoresbysund %%TZDATA%%share/postgresql/timezone/America/Shiprock +%%TZDATA%%share/postgresql/timezone/America/Sitka %%TZDATA%%share/postgresql/timezone/America/St_Barthelemy %%TZDATA%%share/postgresql/timezone/America/St_Johns %%TZDATA%%share/postgresql/timezone/America/St_Kitts @@ -755,4 +758,4 @@ share/postgresql/tsearch_data/thesaurus_sample.ths @dirrmtry etc/periodic/daily @dirrmtry etc/periodic @dirrmtry lib/postgresql -@dirrmtry pgsql +@dirrmtry %%PG_USER%% diff --git a/databases/postgresql90-server/Makefile b/databases/postgresql90-server/Makefile index 52fcd0eb0bc0..21b88acbf291 100644 --- a/databases/postgresql90-server/Makefile +++ b/databases/postgresql90-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= postgresql -DISTVERSION?= 9.0.3 +DISTVERSION?= 9.0.4 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= source/v${DISTVERSION} @@ -24,7 +24,6 @@ DIST_SUBDIR= postgresql UNIQUENAME?= ${PORTNAME}90 LATEST_LINK?= ${PKGNAMEPREFIX}${UNIQUENAME}${PKGNAMESUFFIX} -PKGINSTALL?= ${PKGDIR}/pkg-install${PKGNAMESUFFIX} USE_BZIP2= YES USE_GMAKE= YES GNU_CONFIGURE= YES @@ -33,8 +32,9 @@ GNU_CONFIGURE= YES .undef GNU_CONFIGURE .endif -PGUSER= pgsql -PGGROUP= pgsql +PG_USER?= pgsql +PG_GROUP?= pgsql +PG_UID?= 70 LDFLAGS+= -L${LOCALBASE}/lib INCLUDES+= -I${LOCALBASE}/include @@ -60,6 +60,7 @@ 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} +SUB_FILES+= 502.pgsql .endif .if !defined(SLAVE_ONLY) @@ -93,7 +94,7 @@ OPTIONS+= OPTIMIZED_CFLAGS "Builds with compiler optimizations (-O3)" off OPTIONS+= XML "Build with XML data type (server)" on OPTIONS+= TZDATA "Use internal timezone database (server)" on OPTIONS+= DEBUG "Builds with debugging symbols" off -OPTIONS+= GSSAPI "BUild with GSSAPI support" on +OPTIONS+= GSSAPI "BUild with GSSAPI support" off # See http://people.freebsd.org/~girgen/postgresql-icu/README.html for more info OPTIONS+= ICU "Use ICU for unicode collation (server)" off @@ -283,7 +284,7 @@ MAN7= ABORT.7 ALTER_AGGREGATE.7 ALTER_CONVERSION.7 ALTER_DATABASE.7 \ .if defined(SERVER_ONLY) pre-everything:: - @${SH} ${PKGINSTALL} ${PORTNAME} BACKUPWARNING + @${SH} ${FILESDIR}/pkg-install${PKGNAMESUFFIX}.in ${PORTNAME} BACKUPWARNING .endif .if !defined(NO_BUILD) @@ -305,11 +306,19 @@ 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_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} PGUSER=${PGUSER} PGGROUP=${PGGROUP} \ + @ ${SETENV} PKG_PREFIX=${PREFIX} PG_USER=$(PG_USER) PG_GROUP=$(PG_GROUP) \ ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL .endif @@ -330,7 +339,7 @@ do-install: . if defined(SERVER_ONLY) @ ${MKDIR} ${PREFIX}/share/postgresql ;\ ${MKDIR} ${PREFIX}/etc/periodic/daily ;\ - ${INSTALL_SCRIPT} ${FILESDIR}/502.pgsql \ + ${INSTALL_SCRIPT} ${WRKDIR}/502.pgsql \ ${PREFIX}/etc/periodic/daily . endif # SERVER_ONLY . if defined(CLIENT_ONLY) diff --git a/databases/postgresql90-server/distinfo b/databases/postgresql90-server/distinfo index 82c15fd2e1b9..fab2290611db 100644 --- a/databases/postgresql90-server/distinfo +++ b/databases/postgresql90-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (postgresql/postgresql-9.0.3.tar.bz2) = cf429421dea73a7bd5ef9fbdd1212a0d01c0f63c2059e0218a0e350891867b35 -SIZE (postgresql/postgresql-9.0.3.tar.bz2) = 14040705 +SHA256 (postgresql/postgresql-9.0.4.tar.bz2) = 30572706e3176228415991895e63a8b77343a5abad11407961cfd08790be9e84 +SIZE (postgresql/postgresql-9.0.4.tar.bz2) = 14040871 SHA256 (postgresql/pg-900-icu-2010-09-19.diff.gz) = 27cea46241ec814965c278330cd96f67ee03422b7758a210713a63b4b5bb77e9 SIZE (postgresql/pg-900-icu-2010-09-19.diff.gz) = 4349 diff --git a/databases/postgresql91-server/files/502.pgsql b/databases/postgresql90-server/files/502.pgsql.in index 281189a59c46..50129aff7764 100644 --- a/databases/postgresql91-server/files/502.pgsql +++ b/databases/postgresql90-server/files/502.pgsql.in @@ -1,6 +1,6 @@ -#!/bin/sh +%%PG_USER%%#!/bin/sh # -# $FreeBSD$ +# $FreeBSD: /tmp/pcvs/ports/databases/postgresql90-server/files/502.pgsql.in,v 1.1 2011-04-18 23:34:27 girgen Exp $ # # Maintenance shell script to vacuum and backup database # Put this in /usr/local/etc/periodic/daily, and it will be run @@ -22,7 +22,7 @@ daily_pgsql_vacuum_args="-z" daily_pgsql_pgdump_args="-b -F c" # backupdir is relative to ~pgsql home directory unless it begins with a slash: -daily_pgsql_backupdir="~pgsql/backups" +daily_pgsql_backupdir="~%%PG_USER%%/backups" daily_pgsql_savedays="7" # If there is a global system configuration file, suck it in. @@ -39,12 +39,12 @@ eval backupdir=${daily_pgsql_backupdir} rc=0 pgsql_backup() { - # daily_pgsql_backupdir must be writeable by user pgsql - # ~pgsql is just that under normal circumstances, + # daily_pgsql_backupdir must be writeable by user %%PG_USER%% + # ~%%PG_USER%% is just that under normal circumstances, # but this might not be where you want the backups... if [ ! -d ${backupdir} ] ; then echo Creating ${backupdir} - mkdir -m 700 ${backupdir}; chown pgsql ${backupdir} + mkdir -m 700 ${backupdir}; chown %%PG_USER%% ${backupdir} fi echo @@ -55,13 +55,13 @@ pgsql_backup() { rc=$? now=`date "+%Y-%m-%dT%H:%M:%S"` file=${daily_pgsql_backupdir}/pgglobals_${now} - su -l pgsql -c "umask 077; pg_dumpall -g | gzip -9 > ${file}.gz" + su -l %%PG_USER%% -c "umask 077; pg_dumpall -g -U %%PG_USER%% | gzip -9 > ${file}.gz" db=$1 while shift; do echo -n " $db" file=${backupdir}/pgdump_${db}_${now} - su -l pgsql -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}" + su -l %%PG_USER%% -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -U %%PG_USER%% -f ${file} ${db}" [ $? -gt 0 ] && rc=3 db=$1 done @@ -79,7 +79,7 @@ pgsql_backup() { case "$daily_pgsql_backup_enable" in [Yy][Ee][Ss]) - dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` + dbnames=`su -l %%PG_USER%% -c "umask 077; psql -q -t -A -d template1 -U %%PG_USER%% -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` pgsql_backup $dbnames ;; @@ -99,7 +99,7 @@ case "$daily_pgsql_vacuum_enable" in echo echo "PostgreSQL vacuum" - su -l pgsql -c "vacuumdb -a -q ${daily_pgsql_vacuum_args}" + su -l %%PG_USER%% -c "vacuumdb -a -q -U %%PG_USER%% ${daily_pgsql_vacuum_args}" if [ $? -gt 0 ] then echo diff --git a/databases/postgresql91-server/pkg-install-server b/databases/postgresql90-server/files/pkg-install-server.in index 6dc3b6fdbd67..a225290b6a67 100644 --- a/databases/postgresql91-server/pkg-install-server +++ b/databases/postgresql90-server/files/pkg-install-server.in @@ -3,6 +3,9 @@ # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin +PG_USER=%%PG_USER%% +PG_GROUP=%%PG_GROUP%% +PG_UID=%%PG_UID%% backupwarning() { echo " @@ -22,11 +25,11 @@ backupwarning() { echo " case $2 in PRE-INSTALL) backupwarning - PGUSER=${PGUSER:-pgsql} - PGGROUP=${PGGROUP:-pgsql} + PGUSER=${PGUSER:-${PG_USER}} + PGGROUP=${PGGROUP:-${PG_GROUP}} DB_DIR=${PKG_PREFIX}/${PGUSER} - UID=70 - GID=70 + UID=${PG_UID} + GID=${PG_UID} if pw group show "${PGGROUP}" 2>/dev/null; then echo "You already have a group \"${PGGROUP}\", so I will use it." diff --git a/databases/postgresql90-server/files/pkg-message-client.in b/databases/postgresql90-server/files/pkg-message-client.in index 3183bc136aa6..ff486a635645 100644 --- a/databases/postgresql90-server/files/pkg-message-client.in +++ b/databases/postgresql90-server/files/pkg-message-client.in @@ -1,6 +1,6 @@ The PostgreSQL port has a collection of "side orders": -postgresql-doc +postgresql-docs For all of the html documentation p5-Pg diff --git a/databases/postgresql90-server/files/postgresql.in b/databases/postgresql90-server/files/postgresql.in index 405d2efaa4d3..d1e3c763f8da 100644 --- a/databases/postgresql90-server/files/postgresql.in +++ b/databases/postgresql90-server/files/postgresql.in @@ -32,7 +32,7 @@ load_rc_config postgresql # set defaults postgresql_enable=${postgresql_enable:-"NO"} postgresql_flags=${postgresql_flags:-"-w -s -m fast"} -postgresql_user=pgsql +postgresql_user=${postgresql_user:-"%%PG_USER%%"} eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} postgresql_class=${postgresql_class:-"default"} postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} diff --git a/databases/postgresql90-server/pkg-plist-server b/databases/postgresql90-server/pkg-plist-server index 457bffe0ccbc..ffd6dfc752d2 100644 --- a/databases/postgresql90-server/pkg-plist-server +++ b/databases/postgresql90-server/pkg-plist-server @@ -276,6 +276,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Mendoza %%TZDATA%%share/postgresql/timezone/America/Menominee %%TZDATA%%share/postgresql/timezone/America/Merida +%%TZDATA%%share/postgresql/timezone/America/Metlakatla %%TZDATA%%share/postgresql/timezone/America/Mexico_City %%TZDATA%%share/postgresql/timezone/America/Miquelon %%TZDATA%%share/postgresql/timezone/America/Moncton @@ -288,6 +289,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Nipigon %%TZDATA%%share/postgresql/timezone/America/Nome %%TZDATA%%share/postgresql/timezone/America/Noronha +%%TZDATA%%share/postgresql/timezone/America/North_Dakota/Beulah %%TZDATA%%share/postgresql/timezone/America/North_Dakota/Center %%TZDATA%%share/postgresql/timezone/America/North_Dakota/New_Salem %%TZDATA%%share/postgresql/timezone/America/Ojinaga @@ -314,6 +316,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Sao_Paulo %%TZDATA%%share/postgresql/timezone/America/Scoresbysund %%TZDATA%%share/postgresql/timezone/America/Shiprock +%%TZDATA%%share/postgresql/timezone/America/Sitka %%TZDATA%%share/postgresql/timezone/America/St_Barthelemy %%TZDATA%%share/postgresql/timezone/America/St_Johns %%TZDATA%%share/postgresql/timezone/America/St_Kitts @@ -758,4 +761,4 @@ share/postgresql/tsearch_data/thesaurus_sample.ths @dirrmtry etc/periodic/daily @dirrmtry etc/periodic @dirrmtry lib/postgresql -@dirrmtry pgsql +@dirrmtry %%PG_USER%% diff --git a/databases/postgresql91-server/Makefile b/databases/postgresql91-server/Makefile index 52fcd0eb0bc0..21b88acbf291 100644 --- a/databases/postgresql91-server/Makefile +++ b/databases/postgresql91-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= postgresql -DISTVERSION?= 9.0.3 +DISTVERSION?= 9.0.4 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= source/v${DISTVERSION} @@ -24,7 +24,6 @@ DIST_SUBDIR= postgresql UNIQUENAME?= ${PORTNAME}90 LATEST_LINK?= ${PKGNAMEPREFIX}${UNIQUENAME}${PKGNAMESUFFIX} -PKGINSTALL?= ${PKGDIR}/pkg-install${PKGNAMESUFFIX} USE_BZIP2= YES USE_GMAKE= YES GNU_CONFIGURE= YES @@ -33,8 +32,9 @@ GNU_CONFIGURE= YES .undef GNU_CONFIGURE .endif -PGUSER= pgsql -PGGROUP= pgsql +PG_USER?= pgsql +PG_GROUP?= pgsql +PG_UID?= 70 LDFLAGS+= -L${LOCALBASE}/lib INCLUDES+= -I${LOCALBASE}/include @@ -60,6 +60,7 @@ 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} +SUB_FILES+= 502.pgsql .endif .if !defined(SLAVE_ONLY) @@ -93,7 +94,7 @@ OPTIONS+= OPTIMIZED_CFLAGS "Builds with compiler optimizations (-O3)" off OPTIONS+= XML "Build with XML data type (server)" on OPTIONS+= TZDATA "Use internal timezone database (server)" on OPTIONS+= DEBUG "Builds with debugging symbols" off -OPTIONS+= GSSAPI "BUild with GSSAPI support" on +OPTIONS+= GSSAPI "BUild with GSSAPI support" off # See http://people.freebsd.org/~girgen/postgresql-icu/README.html for more info OPTIONS+= ICU "Use ICU for unicode collation (server)" off @@ -283,7 +284,7 @@ MAN7= ABORT.7 ALTER_AGGREGATE.7 ALTER_CONVERSION.7 ALTER_DATABASE.7 \ .if defined(SERVER_ONLY) pre-everything:: - @${SH} ${PKGINSTALL} ${PORTNAME} BACKUPWARNING + @${SH} ${FILESDIR}/pkg-install${PKGNAMESUFFIX}.in ${PORTNAME} BACKUPWARNING .endif .if !defined(NO_BUILD) @@ -305,11 +306,19 @@ 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_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} PGUSER=${PGUSER} PGGROUP=${PGGROUP} \ + @ ${SETENV} PKG_PREFIX=${PREFIX} PG_USER=$(PG_USER) PG_GROUP=$(PG_GROUP) \ ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL .endif @@ -330,7 +339,7 @@ do-install: . if defined(SERVER_ONLY) @ ${MKDIR} ${PREFIX}/share/postgresql ;\ ${MKDIR} ${PREFIX}/etc/periodic/daily ;\ - ${INSTALL_SCRIPT} ${FILESDIR}/502.pgsql \ + ${INSTALL_SCRIPT} ${WRKDIR}/502.pgsql \ ${PREFIX}/etc/periodic/daily . endif # SERVER_ONLY . if defined(CLIENT_ONLY) diff --git a/databases/postgresql91-server/distinfo b/databases/postgresql91-server/distinfo index 82c15fd2e1b9..fab2290611db 100644 --- a/databases/postgresql91-server/distinfo +++ b/databases/postgresql91-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (postgresql/postgresql-9.0.3.tar.bz2) = cf429421dea73a7bd5ef9fbdd1212a0d01c0f63c2059e0218a0e350891867b35 -SIZE (postgresql/postgresql-9.0.3.tar.bz2) = 14040705 +SHA256 (postgresql/postgresql-9.0.4.tar.bz2) = 30572706e3176228415991895e63a8b77343a5abad11407961cfd08790be9e84 +SIZE (postgresql/postgresql-9.0.4.tar.bz2) = 14040871 SHA256 (postgresql/pg-900-icu-2010-09-19.diff.gz) = 27cea46241ec814965c278330cd96f67ee03422b7758a210713a63b4b5bb77e9 SIZE (postgresql/pg-900-icu-2010-09-19.diff.gz) = 4349 diff --git a/databases/postgresql90-server/files/502.pgsql b/databases/postgresql91-server/files/502.pgsql.in index 281189a59c46..266a822efb61 100644 --- a/databases/postgresql90-server/files/502.pgsql +++ b/databases/postgresql91-server/files/502.pgsql.in @@ -1,6 +1,6 @@ -#!/bin/sh +%%PG_USER%%#!/bin/sh # -# $FreeBSD$ +# $FreeBSD: /tmp/pcvs/ports/databases/postgresql91-server/files/502.pgsql.in,v 1.1 2011-04-18 23:34:27 girgen Exp $ # # Maintenance shell script to vacuum and backup database # Put this in /usr/local/etc/periodic/daily, and it will be run @@ -22,7 +22,7 @@ daily_pgsql_vacuum_args="-z" daily_pgsql_pgdump_args="-b -F c" # backupdir is relative to ~pgsql home directory unless it begins with a slash: -daily_pgsql_backupdir="~pgsql/backups" +daily_pgsql_backupdir="~%%PG_USER%%/backups" daily_pgsql_savedays="7" # If there is a global system configuration file, suck it in. @@ -39,12 +39,12 @@ eval backupdir=${daily_pgsql_backupdir} rc=0 pgsql_backup() { - # daily_pgsql_backupdir must be writeable by user pgsql - # ~pgsql is just that under normal circumstances, + # daily_pgsql_backupdir must be writeable by user %%PG_USER%% + # ~%%PG_USER%% is just that under normal circumstances, # but this might not be where you want the backups... if [ ! -d ${backupdir} ] ; then echo Creating ${backupdir} - mkdir -m 700 ${backupdir}; chown pgsql ${backupdir} + mkdir -m 700 ${backupdir}; chown %%PG_USER%% ${backupdir} fi echo @@ -55,13 +55,13 @@ pgsql_backup() { rc=$? now=`date "+%Y-%m-%dT%H:%M:%S"` file=${daily_pgsql_backupdir}/pgglobals_${now} - su -l pgsql -c "umask 077; pg_dumpall -g | gzip -9 > ${file}.gz" + su -l %%PG_USER%% -c "umask 077; pg_dumpall -g -U %%PG_USER%% | gzip -9 > ${file}.gz" db=$1 while shift; do echo -n " $db" file=${backupdir}/pgdump_${db}_${now} - su -l pgsql -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}" + su -l %%PG_USER%% -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -U %%PG_USER%% -f ${file} ${db}" [ $? -gt 0 ] && rc=3 db=$1 done @@ -79,7 +79,7 @@ pgsql_backup() { case "$daily_pgsql_backup_enable" in [Yy][Ee][Ss]) - dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` + dbnames=`su -l %%PG_USER%% -c "umask 077; psql -q -t -A -d template1 -U %%PG_USER%% -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` pgsql_backup $dbnames ;; @@ -99,7 +99,7 @@ case "$daily_pgsql_vacuum_enable" in echo echo "PostgreSQL vacuum" - su -l pgsql -c "vacuumdb -a -q ${daily_pgsql_vacuum_args}" + su -l %%PG_USER%% -c "vacuumdb -a -q -U %%PG_USER%% ${daily_pgsql_vacuum_args}" if [ $? -gt 0 ] then echo diff --git a/databases/postgresql92-server/pkg-install-server b/databases/postgresql91-server/files/pkg-install-server.in index 6dc3b6fdbd67..efa9b14c2788 100644 --- a/databases/postgresql92-server/pkg-install-server +++ b/databases/postgresql91-server/files/pkg-install-server.in @@ -1,8 +1,11 @@ #! /bin/sh -# $FreeBSD$ +# $FreeBSD: /tmp/pcvs/ports/databases/postgresql91-server/files/Attic/pkg-install-server.in,v 1.1 2011-04-18 23:34:27 girgen Exp $ PATH=/bin:/usr/bin:/usr/sbin +PG_USER=%%PG_USER%% +PG_GROUP=%%PG_GROUP%% +PG_UID=%%PG_UID%% backupwarning() { echo " @@ -22,11 +25,11 @@ backupwarning() { echo " case $2 in PRE-INSTALL) backupwarning - PGUSER=${PGUSER:-pgsql} - PGGROUP=${PGGROUP:-pgsql} + PGUSER=${PGUSER:-${PG_USER}} + PGGROUP=${PGGROUP:-${PG_GROUP}} DB_DIR=${PKG_PREFIX}/${PGUSER} - UID=70 - GID=70 + UID=${PG_UID} + GID=${PG_UID} if pw group show "${PGGROUP}" 2>/dev/null; then echo "You already have a group \"${PGGROUP}\", so I will use it." diff --git a/databases/postgresql91-server/files/pkg-message-client.in b/databases/postgresql91-server/files/pkg-message-client.in index 3183bc136aa6..ff486a635645 100644 --- a/databases/postgresql91-server/files/pkg-message-client.in +++ b/databases/postgresql91-server/files/pkg-message-client.in @@ -1,6 +1,6 @@ The PostgreSQL port has a collection of "side orders": -postgresql-doc +postgresql-docs For all of the html documentation p5-Pg diff --git a/databases/postgresql91-server/files/postgresql.in b/databases/postgresql91-server/files/postgresql.in index 405d2efaa4d3..d1e3c763f8da 100644 --- a/databases/postgresql91-server/files/postgresql.in +++ b/databases/postgresql91-server/files/postgresql.in @@ -32,7 +32,7 @@ load_rc_config postgresql # set defaults postgresql_enable=${postgresql_enable:-"NO"} postgresql_flags=${postgresql_flags:-"-w -s -m fast"} -postgresql_user=pgsql +postgresql_user=${postgresql_user:-"%%PG_USER%%"} eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} postgresql_class=${postgresql_class:-"default"} postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} diff --git a/databases/postgresql91-server/pkg-plist-server b/databases/postgresql91-server/pkg-plist-server index 457bffe0ccbc..ffd6dfc752d2 100644 --- a/databases/postgresql91-server/pkg-plist-server +++ b/databases/postgresql91-server/pkg-plist-server @@ -276,6 +276,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Mendoza %%TZDATA%%share/postgresql/timezone/America/Menominee %%TZDATA%%share/postgresql/timezone/America/Merida +%%TZDATA%%share/postgresql/timezone/America/Metlakatla %%TZDATA%%share/postgresql/timezone/America/Mexico_City %%TZDATA%%share/postgresql/timezone/America/Miquelon %%TZDATA%%share/postgresql/timezone/America/Moncton @@ -288,6 +289,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Nipigon %%TZDATA%%share/postgresql/timezone/America/Nome %%TZDATA%%share/postgresql/timezone/America/Noronha +%%TZDATA%%share/postgresql/timezone/America/North_Dakota/Beulah %%TZDATA%%share/postgresql/timezone/America/North_Dakota/Center %%TZDATA%%share/postgresql/timezone/America/North_Dakota/New_Salem %%TZDATA%%share/postgresql/timezone/America/Ojinaga @@ -314,6 +316,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Sao_Paulo %%TZDATA%%share/postgresql/timezone/America/Scoresbysund %%TZDATA%%share/postgresql/timezone/America/Shiprock +%%TZDATA%%share/postgresql/timezone/America/Sitka %%TZDATA%%share/postgresql/timezone/America/St_Barthelemy %%TZDATA%%share/postgresql/timezone/America/St_Johns %%TZDATA%%share/postgresql/timezone/America/St_Kitts @@ -758,4 +761,4 @@ share/postgresql/tsearch_data/thesaurus_sample.ths @dirrmtry etc/periodic/daily @dirrmtry etc/periodic @dirrmtry lib/postgresql -@dirrmtry pgsql +@dirrmtry %%PG_USER%% diff --git a/databases/postgresql92-server/Makefile b/databases/postgresql92-server/Makefile index 52fcd0eb0bc0..21b88acbf291 100644 --- a/databases/postgresql92-server/Makefile +++ b/databases/postgresql92-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= postgresql -DISTVERSION?= 9.0.3 +DISTVERSION?= 9.0.4 CATEGORIES?= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= source/v${DISTVERSION} @@ -24,7 +24,6 @@ DIST_SUBDIR= postgresql UNIQUENAME?= ${PORTNAME}90 LATEST_LINK?= ${PKGNAMEPREFIX}${UNIQUENAME}${PKGNAMESUFFIX} -PKGINSTALL?= ${PKGDIR}/pkg-install${PKGNAMESUFFIX} USE_BZIP2= YES USE_GMAKE= YES GNU_CONFIGURE= YES @@ -33,8 +32,9 @@ GNU_CONFIGURE= YES .undef GNU_CONFIGURE .endif -PGUSER= pgsql -PGGROUP= pgsql +PG_USER?= pgsql +PG_GROUP?= pgsql +PG_UID?= 70 LDFLAGS+= -L${LOCALBASE}/lib INCLUDES+= -I${LOCALBASE}/include @@ -60,6 +60,7 @@ 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} +SUB_FILES+= 502.pgsql .endif .if !defined(SLAVE_ONLY) @@ -93,7 +94,7 @@ OPTIONS+= OPTIMIZED_CFLAGS "Builds with compiler optimizations (-O3)" off OPTIONS+= XML "Build with XML data type (server)" on OPTIONS+= TZDATA "Use internal timezone database (server)" on OPTIONS+= DEBUG "Builds with debugging symbols" off -OPTIONS+= GSSAPI "BUild with GSSAPI support" on +OPTIONS+= GSSAPI "BUild with GSSAPI support" off # See http://people.freebsd.org/~girgen/postgresql-icu/README.html for more info OPTIONS+= ICU "Use ICU for unicode collation (server)" off @@ -283,7 +284,7 @@ MAN7= ABORT.7 ALTER_AGGREGATE.7 ALTER_CONVERSION.7 ALTER_DATABASE.7 \ .if defined(SERVER_ONLY) pre-everything:: - @${SH} ${PKGINSTALL} ${PORTNAME} BACKUPWARNING + @${SH} ${FILESDIR}/pkg-install${PKGNAMESUFFIX}.in ${PORTNAME} BACKUPWARNING .endif .if !defined(NO_BUILD) @@ -305,11 +306,19 @@ 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_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} PGUSER=${PGUSER} PGGROUP=${PGGROUP} \ + @ ${SETENV} PKG_PREFIX=${PREFIX} PG_USER=$(PG_USER) PG_GROUP=$(PG_GROUP) \ ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL .endif @@ -330,7 +339,7 @@ do-install: . if defined(SERVER_ONLY) @ ${MKDIR} ${PREFIX}/share/postgresql ;\ ${MKDIR} ${PREFIX}/etc/periodic/daily ;\ - ${INSTALL_SCRIPT} ${FILESDIR}/502.pgsql \ + ${INSTALL_SCRIPT} ${WRKDIR}/502.pgsql \ ${PREFIX}/etc/periodic/daily . endif # SERVER_ONLY . if defined(CLIENT_ONLY) diff --git a/databases/postgresql92-server/distinfo b/databases/postgresql92-server/distinfo index 82c15fd2e1b9..fab2290611db 100644 --- a/databases/postgresql92-server/distinfo +++ b/databases/postgresql92-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (postgresql/postgresql-9.0.3.tar.bz2) = cf429421dea73a7bd5ef9fbdd1212a0d01c0f63c2059e0218a0e350891867b35 -SIZE (postgresql/postgresql-9.0.3.tar.bz2) = 14040705 +SHA256 (postgresql/postgresql-9.0.4.tar.bz2) = 30572706e3176228415991895e63a8b77343a5abad11407961cfd08790be9e84 +SIZE (postgresql/postgresql-9.0.4.tar.bz2) = 14040871 SHA256 (postgresql/pg-900-icu-2010-09-19.diff.gz) = 27cea46241ec814965c278330cd96f67ee03422b7758a210713a63b4b5bb77e9 SIZE (postgresql/pg-900-icu-2010-09-19.diff.gz) = 4349 diff --git a/databases/postgresql92-server/files/502.pgsql b/databases/postgresql92-server/files/502.pgsql.in index 281189a59c46..c4be1e087eac 100644 --- a/databases/postgresql92-server/files/502.pgsql +++ b/databases/postgresql92-server/files/502.pgsql.in @@ -1,6 +1,6 @@ -#!/bin/sh +%%PG_USER%%#!/bin/sh # -# $FreeBSD$ +# $FreeBSD: /tmp/pcvs/ports/databases/postgresql92-server/files/502.pgsql.in,v 1.1 2011-04-18 23:34:27 girgen Exp $ # # Maintenance shell script to vacuum and backup database # Put this in /usr/local/etc/periodic/daily, and it will be run @@ -22,7 +22,7 @@ daily_pgsql_vacuum_args="-z" daily_pgsql_pgdump_args="-b -F c" # backupdir is relative to ~pgsql home directory unless it begins with a slash: -daily_pgsql_backupdir="~pgsql/backups" +daily_pgsql_backupdir="~%%PG_USER%%/backups" daily_pgsql_savedays="7" # If there is a global system configuration file, suck it in. @@ -39,12 +39,12 @@ eval backupdir=${daily_pgsql_backupdir} rc=0 pgsql_backup() { - # daily_pgsql_backupdir must be writeable by user pgsql - # ~pgsql is just that under normal circumstances, + # daily_pgsql_backupdir must be writeable by user %%PG_USER%% + # ~%%PG_USER%% is just that under normal circumstances, # but this might not be where you want the backups... if [ ! -d ${backupdir} ] ; then echo Creating ${backupdir} - mkdir -m 700 ${backupdir}; chown pgsql ${backupdir} + mkdir -m 700 ${backupdir}; chown %%PG_USER%% ${backupdir} fi echo @@ -55,13 +55,13 @@ pgsql_backup() { rc=$? now=`date "+%Y-%m-%dT%H:%M:%S"` file=${daily_pgsql_backupdir}/pgglobals_${now} - su -l pgsql -c "umask 077; pg_dumpall -g | gzip -9 > ${file}.gz" + su -l %%PG_USER%% -c "umask 077; pg_dumpall -g -U %%PG_USER%% | gzip -9 > ${file}.gz" db=$1 while shift; do echo -n " $db" file=${backupdir}/pgdump_${db}_${now} - su -l pgsql -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}" + su -l %%PG_USER%% -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -U %%PG_USER%% -f ${file} ${db}" [ $? -gt 0 ] && rc=3 db=$1 done @@ -79,7 +79,7 @@ pgsql_backup() { case "$daily_pgsql_backup_enable" in [Yy][Ee][Ss]) - dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` + dbnames=`su -l %%PG_USER%% -c "umask 077; psql -q -t -A -d template1 -U %%PG_USER%% -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` pgsql_backup $dbnames ;; @@ -99,7 +99,7 @@ case "$daily_pgsql_vacuum_enable" in echo echo "PostgreSQL vacuum" - su -l pgsql -c "vacuumdb -a -q ${daily_pgsql_vacuum_args}" + su -l %%PG_USER%% -c "vacuumdb -a -q -U %%PG_USER%% ${daily_pgsql_vacuum_args}" if [ $? -gt 0 ] then echo diff --git a/databases/postgresql90-server/pkg-install-server b/databases/postgresql92-server/files/pkg-install-server.in index 6dc3b6fdbd67..d85d62931474 100644 --- a/databases/postgresql90-server/pkg-install-server +++ b/databases/postgresql92-server/files/pkg-install-server.in @@ -1,8 +1,11 @@ #! /bin/sh -# $FreeBSD$ +# $FreeBSD: /tmp/pcvs/ports/databases/postgresql92-server/files/Attic/pkg-install-server.in,v 1.1 2011-04-18 23:34:27 girgen Exp $ PATH=/bin:/usr/bin:/usr/sbin +PG_USER=%%PG_USER%% +PG_GROUP=%%PG_GROUP%% +PG_UID=%%PG_UID%% backupwarning() { echo " @@ -22,11 +25,11 @@ backupwarning() { echo " case $2 in PRE-INSTALL) backupwarning - PGUSER=${PGUSER:-pgsql} - PGGROUP=${PGGROUP:-pgsql} + PGUSER=${PGUSER:-${PG_USER}} + PGGROUP=${PGGROUP:-${PG_GROUP}} DB_DIR=${PKG_PREFIX}/${PGUSER} - UID=70 - GID=70 + UID=${PG_UID} + GID=${PG_UID} if pw group show "${PGGROUP}" 2>/dev/null; then echo "You already have a group \"${PGGROUP}\", so I will use it." diff --git a/databases/postgresql92-server/files/pkg-message-client.in b/databases/postgresql92-server/files/pkg-message-client.in index 3183bc136aa6..ff486a635645 100644 --- a/databases/postgresql92-server/files/pkg-message-client.in +++ b/databases/postgresql92-server/files/pkg-message-client.in @@ -1,6 +1,6 @@ The PostgreSQL port has a collection of "side orders": -postgresql-doc +postgresql-docs For all of the html documentation p5-Pg diff --git a/databases/postgresql92-server/files/postgresql.in b/databases/postgresql92-server/files/postgresql.in index 405d2efaa4d3..d1e3c763f8da 100644 --- a/databases/postgresql92-server/files/postgresql.in +++ b/databases/postgresql92-server/files/postgresql.in @@ -32,7 +32,7 @@ load_rc_config postgresql # set defaults postgresql_enable=${postgresql_enable:-"NO"} postgresql_flags=${postgresql_flags:-"-w -s -m fast"} -postgresql_user=pgsql +postgresql_user=${postgresql_user:-"%%PG_USER%%"} eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} postgresql_class=${postgresql_class:-"default"} postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} diff --git a/databases/postgresql92-server/pkg-plist-server b/databases/postgresql92-server/pkg-plist-server index 457bffe0ccbc..ffd6dfc752d2 100644 --- a/databases/postgresql92-server/pkg-plist-server +++ b/databases/postgresql92-server/pkg-plist-server @@ -276,6 +276,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Mendoza %%TZDATA%%share/postgresql/timezone/America/Menominee %%TZDATA%%share/postgresql/timezone/America/Merida +%%TZDATA%%share/postgresql/timezone/America/Metlakatla %%TZDATA%%share/postgresql/timezone/America/Mexico_City %%TZDATA%%share/postgresql/timezone/America/Miquelon %%TZDATA%%share/postgresql/timezone/America/Moncton @@ -288,6 +289,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Nipigon %%TZDATA%%share/postgresql/timezone/America/Nome %%TZDATA%%share/postgresql/timezone/America/Noronha +%%TZDATA%%share/postgresql/timezone/America/North_Dakota/Beulah %%TZDATA%%share/postgresql/timezone/America/North_Dakota/Center %%TZDATA%%share/postgresql/timezone/America/North_Dakota/New_Salem %%TZDATA%%share/postgresql/timezone/America/Ojinaga @@ -314,6 +316,7 @@ share/postgresql/snowball_create.sql %%TZDATA%%share/postgresql/timezone/America/Sao_Paulo %%TZDATA%%share/postgresql/timezone/America/Scoresbysund %%TZDATA%%share/postgresql/timezone/America/Shiprock +%%TZDATA%%share/postgresql/timezone/America/Sitka %%TZDATA%%share/postgresql/timezone/America/St_Barthelemy %%TZDATA%%share/postgresql/timezone/America/St_Johns %%TZDATA%%share/postgresql/timezone/America/St_Kitts @@ -758,4 +761,4 @@ share/postgresql/tsearch_data/thesaurus_sample.ths @dirrmtry etc/periodic/daily @dirrmtry etc/periodic @dirrmtry lib/postgresql -@dirrmtry pgsql +@dirrmtry %%PG_USER%% |