Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Apr 2002 00:37:37 +0200 (CEST)
From:      Palle Girgensohn <girgen@partitur.se>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/36975: update postgresql -> 7.2.1
Message-ID:  <200204102237.g3AMbbv99050@elbas.partitur.se>

next in thread | raw e-mail | index | archive | help

>Number:         36975
>Category:       ports
>Synopsis:       update postgresql -> 7.2.1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 10 15:40:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Palle Girgensohn <girgen@partitur.se>
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
Partitur
>Environment:
System: FreeBSD palle.girgensohn.se 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #11: Fri Dec 28 17:22:10 CET 2001 root@palle.girgensohn.se:/usr/obj/usr/src/sys/STORDATAN i386


	
>Description:
This updates postgresql to 7.2.1, which is an important bugfix.

Also, the periodic script has been refurbished.

>How-To-Repeat:
	
>Fix:
REMOVE:
  files/patch-src::backend::utils::init::findbe.c
  pkg-plist.doc

and apply the patch below. Also, I'll send separate PRs about some
subports that need to be synchronized.

Index: Makefile
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/Makefile,v
retrieving revision 1.94
diff -u -r1.94 Makefile
--- Makefile	1 Apr 2002 23:04:21 -0000	1.94
+++ Makefile	10 Apr 2002 22:04:45 -0000
@@ -6,9 +6,11 @@
 #
 
 PORTNAME?=	postgresql
-PORTVERSION?=	7.2
+PORTVERSION?=	7.2.1
 CATEGORIES?=	databases
 MASTER_SITES=	ftp://ftp.postgresql.org/pub/%SUBDIR%/ \
+		ftp://ftp.se.postgresql.org/pub/database/relational/postgresql/%SUBDIR%/ \
+		ftp://ftp2.ch.postgresql.org/mirror/postgresql/%SUBDIR%/ \
 		ftp://ftp.de.postgresql.org/mirror/postgresql/%SUBDIR%/ \
 		ftp://ftp.chg.ru/pub/databases/postgresql/%SUBDIR%/ \
 		ftp://ftp.sunet.se/pub/unix/databases/relational/postgresql/%SUBDIR%/ \
@@ -39,8 +41,6 @@
 ## The rest of this file is for normal base installation
 INSTALLS_SHLIB=	YES
 
-USE_GMAKE=	YES
-GNU_CONFIGURE=	YES
 CONFIGURE_ARGS=	--enable-locale --enable-syslog --with-CXX \
 		--docdir=${PREFIX}/share/doc --with-libdir=${LOCALBASE}/lib \
 		--with-includes=${LOCALBASE}/include
@@ -64,13 +64,6 @@
 PLIST_SUB+=	GETTEXT="@comment "
 .endif
 
-.if defined(WITHOUT_SERVER)
-PKGMESSAGE=	${PKGDIR}/pkg-message.client
-PLIST_SUB+=	SERVER="@comment "
-.else
-PLIST_SUB+=	SERVER=""
-.endif
-
 .if !defined(WITHOUT_SSL)
 USE_OPENSSL=	yes
 CONFIGURE_ARGS+= "--with-openssl=${OPENSSLBASE}"
@@ -113,6 +106,13 @@
 .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
 .endif
 
+.if defined(WITHOUT_SERVER)
+PKGMESSAGE=	${PKGDIR}/pkg-message.client
+PLIST_SUB+=	SERVER="@comment "
+.else
+PLIST_SUB+=	SERVER=""
+.endif
+
 .if defined(WITHOUT_MULTIBYTE)
 PLIST_SUB+=	MULTIBYTE="@comment "
 .else
@@ -138,14 +138,15 @@
 		${SED} "s|/usr/local|${PREFIX}|g" |\
 		tee ${PREFIX}/share/postgresql/post-install-notes
 .if !defined(DEBUG_FLAGS)
-.for file in ecpg pg_dump pg_id pg_passwd pg_restore postgres psql
-	@ strip ${PREFIX}/${PG_PREFIX}bin/${file}
+.for file in ecpg pg_dump pg_id pg_passwd pg_restore psql
+	@ strip ${PREFIX}/bin/${file}
 .endfor
 .endif
 .if !defined(WITHOUT_SERVER)
 # install shell defaults for pgsql user
+	@ strip ${PREFIX}/bin/postgres
 .for i in profile cshrc
-	@ ${SED} "s|%%PREFIX%%|${PREFIX}|g; s|%%PG_PREFIX%%|${PG_PREFIX}|g" \
+	@ ${SED} "s|%%PREFIX%%|${PREFIX}|g" \
 		< ${FILESDIR}/dot.$i.in \
 		> ${PREFIX}/share/postgresql/dot.$i.dist; \
 	${CP} ${PREFIX}/share/postgresql/dot.$i.dist ~pgsql/; \
@@ -164,6 +165,16 @@
 			${WRKSRC}/src/interfaces/odbc/odbc.sql \
 			${WRKSRC}/src/interfaces/odbc/odbc-drop.sql \
 			${PREFIX}/share/postgresql
+.else
+do-install:
+	@ cd ${WRKSRC}; \
+	${GMAKE} -C src/bin install ;\
+	${GMAKE} -C src/include install ;\
+	${GMAKE} -C src/interfaces install
+.if !defined(NOPORTDOCS)
+	@ cd ${WRKSRC}; \
+	${GMAKE} -C doc install
+.endif
 .endif
 
 post-clean:
Index: distinfo
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/distinfo,v
retrieving revision 1.21
diff -u -r1.21 distinfo
--- distinfo	19 Feb 2002 08:23:21 -0000	1.21
+++ distinfo	10 Apr 2002 20:12:02 -0000
@@ -1,3 +1,3 @@
-MD5 (postgresql/postgresql-base-7.2.tar.gz) = e391631127e88dcd665b0f7aa09c764f
-MD5 (postgresql/postgresql-opt-7.2.tar.gz) = c3f5fa9045fc0cdebec64869e92bad59
-MD5 (postgresql/postgresql-docs-7.2.tar.gz) = dc229ee6a768814e0e2497ab002b2c9b
+MD5 (postgresql/postgresql-base-7.2.1.tar.gz) = e294084800e9470d582b57e3d38ec247
+MD5 (postgresql/postgresql-opt-7.2.1.tar.gz) = 5844486d9f3d449e9d1d02666315059f
+MD5 (postgresql/postgresql-docs-7.2.1.tar.gz) = eff48d40b0c1bde1854c77c0b2e1b565
Index: pkg-plist
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/pkg-plist,v
retrieving revision 1.33
diff -u -r1.33 pkg-plist
--- pkg-plist	19 Feb 2002 08:23:21 -0000	1.33
+++ pkg-plist	10 Apr 2002 20:12:02 -0000
@@ -1,5 +1,5 @@
-bin/postmaster
-bin/postgres
+%%SERVER%%bin/postmaster
+%%SERVER%%bin/postgres
 bin/ecpg
 bin/initdb
 bin/initlocation
@@ -61,16 +61,16 @@
 lib/libpq++.so
 lib/libpq++.a
 lib/libpq++.so.4
-lib/postgresql/plpgsql.so
+%%SERVER%%lib/postgresql/plpgsql.so
 @unexec rmdir %D/lib/postgresql 2>/dev/null || true
 %%SERVER%%share/postgresql/502.pgsql
 %%SERVER%%share/postgresql/odbc.sql
 %%SERVER%%share/postgresql/odbc-drop.sql
-share/postgresql/postgres.bki
-share/postgresql/postgres.description
-share/postgresql/pg_hba.conf.sample
-share/postgresql/pg_ident.conf.sample
-share/postgresql/postgresql.conf.sample
+%%SERVER%%share/postgresql/postgres.bki
+%%SERVER%%share/postgresql/postgres.description
+%%SERVER%%share/postgresql/pg_hba.conf.sample
+%%SERVER%%share/postgresql/pg_ident.conf.sample
+%%SERVER%%share/postgresql/postgresql.conf.sample
 share/postgresql/post-install-notes
 @unexec rmdir %D/share/postgresql 2>/dev/null || true
 %%PORTDOCS%%share/doc/postgresql/html/index.html
@@ -221,6 +221,7 @@
 %%PORTDOCS%%share/doc/postgresql/html/regress-evaluation.html
 %%PORTDOCS%%share/doc/postgresql/html/regress-platform.html
 %%PORTDOCS%%share/doc/postgresql/html/release.html
+%%PORTDOCS%%share/doc/postgresql/html/release-7-2.html
 %%PORTDOCS%%share/doc/postgresql/html/release-7-1-3.html
 %%PORTDOCS%%share/doc/postgresql/html/release-7-1-2.html
 %%PORTDOCS%%share/doc/postgresql/html/release-7-1-1.html
@@ -611,13 +612,12 @@
 %%PORTDOCS%%share/doc/postgresql/html/doc-build.html
 %%PORTDOCS%%share/doc/postgresql/html/doc-sources.html
 %%PORTDOCS%%share/doc/postgresql/html/setindex.html
-%%PORTDOCS%%share/doc/postgresql/html/ln8.html
 %%PORTDOCS%%share/doc/postgresql/html/ln25.html
 %%PORTDOCS%%share/doc/postgresql/html/ln650.html
-%%PORTDOCS%%share/doc/postgresql/html/ln13544.html
-%%PORTDOCS%%share/doc/postgresql/html/ln19341.html
-%%PORTDOCS%%share/doc/postgresql/html/ln31695.html
-%%PORTDOCS%%share/doc/postgresql/html/ln43726.html
+%%PORTDOCS%%share/doc/postgresql/html/ln13560.html
+%%PORTDOCS%%share/doc/postgresql/html/ln19374.html
+%%PORTDOCS%%share/doc/postgresql/html/ln31728.html
+%%PORTDOCS%%share/doc/postgresql/html/ln43811.html
 %%PORTDOCS%%share/doc/postgresql/html/catalogs.gif
 %%PORTDOCS%%share/doc/postgresql/html/connections.gif
 %%PORTDOCS%%share/doc/postgresql/html/stylesheet.css
Index: files/502.pgsql
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/files/502.pgsql,v
retrieving revision 1.1
diff -u -r1.1 502.pgsql
--- files/502.pgsql	19 Feb 2002 08:23:21 -0000	1.1
+++ files/502.pgsql	10 Apr 2002 22:00:47 -0000
@@ -11,6 +11,20 @@
 # In public domain, do what you like with it,
 # and use it at your own risk... :)
 #
+############################
+
+# arguments to pg_dump
+PGDUMP_ARGS="-b -F c"
+
+# the directory where the backups will reside
+# ${HOME} is pgsql's home directory
+PGBACKUPDIR=${HOME}/backups
+
+# some data is amazingly more compressed with bzip2, esp. blobs, it seems
+# if your're short on diskspace, give it a try and set USEBZIP=yes
+USEBZIP=no
+
+############################
 
 DIR=`dirname $0`
 progname=`basename $0`
@@ -19,58 +33,56 @@
 # Run as user pgsql
 if [ `id -un` != pgsql ]; then
     su -l pgsql -c ${PRG}
-    exit 0
+    exit $?
+fi
+
+if [ X${USEBZIP} = Xyes ]; then
+    BZIP=`which bzip2 || echo true`
+else
+    BZIP=true
 fi
 
 # PGBACKUPDIR must be writeable by user pgsql
 # ~pgsql is just that under normal circumstances,
 # but this might not be where you want the backups...
-PGBACKUPDIR=${HOME}/backups
 if [ ! -d ${PGBACKUPDIR} ] ; then 
     echo Creating ${PGBACKUPDIR}
     mkdir ${PGBACKUPDIR}
     chmod 700 ${PGBACKUPDIR}
 fi
 
-PGLOGDIR=/var/log/pgsql
-PGDIR=`cd ${PGDATA}/../ && pwd`
-
-GZIP=/usr/bin/bzip2
-GZIPEXT=bz2
-
 echo
-echo "PostgreSQL maintenance..."
+echo "PostgreSQL maintenance"
 
 # Protect the data
 umask 077
-
-dbname=`${PGBINDIR}/psql -q -t -A -d template1 -c "SELECT datname FROM pg_database WHERE datname != 'template0'"`
-
-rc=0
-
-echo -n "ALL"
-PGERRALL=/tmp/PGERRALL.$$
-
-${PGBINDIR}/pg_dumpall 2> $PGERRALL | ${GZIP} > ${PGBACKUPDIR}/pgdumpall_`date "+%Y%m%d"`.${GZIPEXT}
-
-for i in ${dbname}; do
-    echo -n " $i"
-    ${PGBINDIR}/pg_dump $i 2>> $PGERRALL | ${GZIP} > ${PGBACKUPDIR}/pgdump_${i}_`date "+%Y%m%d"`.${GZIPEXT}
-    ${PGBINDIR}/vacuumdb --quiet  --analyze $i || rc=3
+dbnames=`psql -q -t -A -d template1 -c "SELECT datname FROM pg_database WHERE datname != 'template0'"`
+rc=$?
+for db in ${dbnames}; do
+    echo -n " $db"
+    file=${PGBACKUPDIR}/pgdump_${db}_`date "+%Y%m%d"`
+    pg_dump ${PGDUMP_ARGS} -d $db -f ${file}
+    [ $? -gt 0 ] && rc=3
+    ${BZIP} ${file}
 done
 
-if [ -s "${PGERRALL}" ]
-then
-    echo
-    echo 'Something went wrong!'
+if [ $rc -gt 0 ]; then
     echo
-    echo `cat ${PGERRALL}`
-    rc=3
+    echo "Errors were reported during backup."
 fi
-rm ${PGERRALL}
 
 echo
+echo "vacuuming..."
+vacuumdb -a -z -q
+if [ $? -gt 0 ]
+then
+    echo
+    echo "Errors were reported vacuum."
+    rc=3
+fi
 
+# cleaning up old data
 find ${PGBACKUPDIR} \( -name 'pgdump_*'.${GZIPEXT} -o -name 'pgdumpall_*'.${GZIPEXT} \) \
 		    -a -atime +7 -delete
+
 exit $rc
Index: files/dot.cshrc.in
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/files/dot.cshrc.in,v
retrieving revision 1.1
diff -u -r1.1 dot.cshrc.in
--- files/dot.cshrc.in	21 Apr 2001 11:34:33 -0000	1.1
+++ files/dot.cshrc.in	10 Apr 2002 20:12:02 -0000
@@ -1,6 +1,6 @@
-set path = ( %%PREFIX%%/%%PG_PREFIX%%bin $path )
+set path = ( %%PREFIX%%/bin $path )
 
-setenv PGLIB %%PREFIX%%/%%PG_PREFIX%%lib
+setenv PGLIB %%PREFIX%%/lib
 
 # note: PGDATA can be overridden by the -D startup option
 setenv PGDATA $HOME/data
Index: files/dot.profile.in
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/files/dot.profile.in,v
retrieving revision 1.3
diff -u -r1.3 dot.profile.in
--- files/dot.profile.in	21 Apr 2001 11:34:33 -0000	1.3
+++ files/dot.profile.in	10 Apr 2002 20:12:02 -0000
@@ -1,7 +1,7 @@
 # both new and old layout's paths, but new path first...
-PATH=%%PREFIX%%/%%PG_PREFIX%%bin:${PATH}
+PATH=%%PREFIX%%/bin:${PATH}
 
-PGLIB=%%PREFIX%%/%%PG_PREFIX%%lib
+PGLIB=%%PREFIX%%/lib
 
 # note: PGDATA can be overridden by the -D startup option
 PGDATA=${HOME}/data
Index: files/pgsql.sh.tmpl
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/files/pgsql.sh.tmpl,v
retrieving revision 1.12
diff -u -r1.12 pgsql.sh.tmpl
--- files/pgsql.sh.tmpl	2 May 2001 11:44:38 -0000	1.12
+++ files/pgsql.sh.tmpl	10 Apr 2002 20:12:02 -0000
@@ -4,28 +4,32 @@
 #
 # For postmaster startup options, edit $PGDATA/postgresql.conf
 
-PGBIN=%%PREFIX%%/%%PG_PREFIX%%bin
+PREFIX=%%PREFIX%%
+PGBIN=${PREFIX}/bin
 
 case $1 in
 start)
-    [ -d %%PREFIX%%/%%PG_PREFIX%%lib ] && /sbin/ldconfig -m %%PREFIX%%/%%PG_PREFIX%%lib
+    [ -d ${PREFIX}/lib ] && /sbin/ldconfig -m ${PREFIX}/lib
+    touch /var/log/pgsql
+    chmod 600 /var/log/pgsql
+    chown pgsql:pgsql /var/log/pgsql
     [ -x ${PGBIN}/pg_ctl ] && {
 	su -l pgsql -c \
-	    '[ -d ${PGDATA} ] && exec %%PREFIX%%/%%PG_PREFIX%%bin/pg_ctl start -s -w -l ~pgsql/errlog'
+	    '[ -d ${PGDATA} ] && exec %%PREFIX%%/bin/pg_ctl start -s -w -l /var/log/pgsql'
 	echo -n ' pgsql'
     }
     ;;
 
 stop)
     [ -x ${PGBIN}/pg_ctl ] && {
-	su -l pgsql -c 'exec %%PREFIX%%/%%PG_PREFIX%%bin/pg_ctl stop -s -m fast'
+	su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl stop -s -m fast'
 	echo -n ' pgsql'
     }
     ;;
 
 status)
     [ -x ${PGBIN}/pg_ctl ] && {
-	exec su -l pgsql -c 'exec %%PREFIX%%/%%PG_PREFIX%%bin/pg_ctl status'
+	exec su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl status'
     }
     ;;
 
Index: files/post-install-notes
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/files/post-install-notes,v
retrieving revision 1.14
diff -u -r1.14 post-install-notes
--- files/post-install-notes	19 Feb 2002 08:23:21 -0000	1.14
+++ files/post-install-notes	10 Apr 2002 20:12:02 -0000
@@ -24,12 +24,17 @@
 
 etc etc...
 
+Note that many files have moved around compared to previous versions
+of PostgreSQL. For example, plpgsql.so and all other language modules
+are now in /usr/local/lib/postgresql.
+
 If you have many tables and many clients running, consider raising
-kern.maxfiles using sysctl(8).
+kern.maxfiles using sysctl(8), or reconfigure your kernel
+appropriately.
 
 You should vacuum and backup your database regularly. There is a
 periodic script, /usr/local/share/postgresql/502.pgsql, that you may
-use.
+find useful.
 
 To allow many simultaneous connections to your PostgreSQL server, you
 should raise the SystemV shared memory limits in your kernel. Here are
Index: scripts/configure.postgresql
===================================================================
RCS file: /net/elbas/opt/ncvs/ports/databases/postgresql7/scripts/configure.postgresql,v
retrieving revision 1.10
diff -u -r1.10 configure.postgresql
--- scripts/configure.postgresql	21 Feb 2002 17:55:48 -0000	1.10
+++ scripts/configure.postgresql	10 Apr 2002 21:26:38 -0000
@@ -25,9 +25,10 @@
 else
 	/usr/bin/dialog --title "configuration options" --clear \
 					--checklist "\n\
-Please select desired options:" -1 -1 7 \
+Please select desired options:" -1 -1 3 \
 MultiByte  "Multibyte for Multilingualism" ON \
-KRB5       "Kerberos 5" ON \
+KRB5       "Kerberos 5 (only if it exists)" ON \
+CLIENT     "PostgreSQL client only, no server" OFF \
 2> /tmp/checklist.tmp.$$
 
 	retval=$?
@@ -59,6 +60,9 @@
 		\"KRB5\")
 			KRB5=1
 			;;
+		\"CLIENT\")
+			CLIENT=1
+			;;
 		\"nothing\"|true)
 			;;
 		*)
@@ -162,4 +166,8 @@
 			echo "	########################################################"
 		fi
 	fi
+fi
+
+if [ ${CLIENT} ]; then
+	echo "WITHOUT_SERVER=yes" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
 fi
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204102237.g3AMbbv99050>