rpms/postgresql/F-13 .cvsignore, 1.50, 1.51 postgresql-ac-version.patch, 1.10, 1.11 postgresql.init, 1.27, 1.28 postgresql.spec, 1.131, 1.132 rpm-pgsql.patch, 1.3, 1.4 sources, 1.51, 1.52 postgresql-dtrace.patch, 1.1, NONE

Tom Lane tgl at fedoraproject.org
Sun Mar 14 16:44:08 UTC 2010


Author: tgl

Update of /cvs/pkgs/rpms/postgresql/F-13
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9006

Modified Files:
	.cvsignore postgresql-ac-version.patch postgresql.init 
	postgresql.spec rpm-pgsql.patch sources 
Removed Files:
	postgresql-dtrace.patch 
Log Message:
Update to PostgreSQL 8.4.3


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-13/.cvsignore,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -p -r1.50 -r1.51
--- .cvsignore	9 Jan 2010 05:23:05 -0000	1.50
+++ .cvsignore	14 Mar 2010 16:44:07 -0000	1.51
@@ -1,2 +1,2 @@
-postgresql-8.4.2.tar.bz2
-postgresql-8.4.2-US.pdf
+postgresql-8.4.3.tar.bz2
+postgresql-8.4.3-US.pdf

postgresql-ac-version.patch:
 configure.in |    4 ----
 1 file changed, 4 deletions(-)

Index: postgresql-ac-version.patch
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-13/postgresql-ac-version.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- postgresql-ac-version.patch	16 Dec 2009 05:34:05 -0000	1.10
+++ postgresql-ac-version.patch	14 Mar 2010 16:44:07 -0000	1.11
@@ -4,12 +4,12 @@ for PostgreSQL, but it's not very tenabl
 Dike out the check.
 
 
-diff -Naur postgresql-8.4.2.orig/configure.in postgresql-8.4.2/configure.in
---- postgresql-8.4.2.orig/configure.in	2009-09-03 20:36:50.000000000 -0400
-+++ postgresql-8.4.2/configure.in	2009-09-04 13:03:07.000000000 -0400
+diff -Naur postgresql-8.4.3.orig/configure.in postgresql-8.4.3/configure.in
+--- postgresql-8.4.3.orig/configure.in	2009-09-03 20:36:50.000000000 -0400
++++ postgresql-8.4.3/configure.in	2009-09-04 13:03:07.000000000 -0400
 @@ -19,10 +19,6 @@
  
- AC_INIT([PostgreSQL], [8.4.2], [pgsql-bugs at postgresql.org])
+ AC_INIT([PostgreSQL], [8.4.3], [pgsql-bugs at postgresql.org])
  
 -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.61], [], [m4_fatal([Autoconf version 2.61 is required.
 -Untested combinations of 'autoconf' and PostgreSQL versions are not


Index: postgresql.init
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-13/postgresql.init,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -r1.27 -r1.28
--- postgresql.init	11 Jan 2010 18:11:25 -0000	1.27
+++ postgresql.init	14 Mar 2010 16:44:07 -0000	1.28
@@ -1,79 +1,18 @@
 #!/bin/sh
+#
 # postgresql	This is the init script for starting up the PostgreSQL
-#		server
+#		server.
 #
 # chkconfig: - 64 36
-# description: Starts and stops the PostgreSQL backend daemon that handles \
-#	       all database requests.
+# description: PostgreSQL database server.
 # processname: postmaster
-# pidfile: /var/run/postmaster.pid
-
-# Version 6.5.3-2 Lamar Owen
-# Added code to determine if PGDATA exists, whether it is current version
-#     or not, and initdb if no PGDATA (initdb will not overwrite a database).
-
-# Version 7.0 Lamar Owen
-# Added logging code
-# Changed PGDATA.
-
-# Version 7.0.2 Trond Eivind Glomsrd <teg at redhat.com>
-# use functions, add conditional restart
-          
-# Version 7.0.3 Lamar Owen <lamar at postgresql.org>
-# Check for the existence of functions before blindly using them 
-# in particular -- check for success () and failure () before using.
-# More Cross-distribution support -- PGVERSION variable, and docdir checks.
-
-# Version 7.1 Release Candidate Lamar Owen <lamar at postgresql.org>
-# initdb parameters have changed.
-
-# Version 7.1.2 Trond Eivind Glomsrd <teg at redhat.com>
-# Specify shell for su
-# Handle stop better - kill unwanted output, make it wait until the database is ready
-# Handle locales slightly differently - always using "C" isn't a valid option 
-# Kill output from database initialization 
-# Mark messages for translation
-
-# Version 7.1.2-2.PGDG Lamar Owen <lamar.owen at wgcr.org>
-# sync up.
-# Karl's fixes for some quoting issues.
-
-# Version 7.2b2 Lamar Owen <lamar.owen at wgcr.org>
-# version change.
-
-# Version 7.2 final.  Lamar Owen <lamar.owen at wgcr.org>
-# reload from Peter E.
-# Eliminate the pidof postmaster test in stop -- we're using pg_ctl so we don't need pidof.
-# Tested the $? return for the stop script -- it does in fact propagate.
-# TODO: multiple postmasters.
-
-# Version 7.3 Lamar Owen <lamar.owen at ramifordistat.net>
-# Multiple postmasters, courtesy Karl DeBisschop
-
-# Version 7.4 Lamar Owen.
-
-# Version 7.4.3 Tom Lane <tgl at sss.pgh.pa.us>
-# Support condstop for uninstall
-# Minor other changes suggested by Fernando Nasser.
-
-# Version 7.4.5 Tom Lane <tgl at sss.pgh.pa.us>
-# Rewrite to start postmaster directly, rather than via pg_ctl; this avoids
-# fooling the postmaster's stale-lockfile check by having too many
-# postgres-owned processes laying about.
-
-# Version 8.1 Devrim Gunduz <devrim at PostgreSQL.org>
-# Increased sleep time from 1 sec to 2 sec.
-
-# Version 8.2 Devrim Gunduz <devrim at CommandPrompt.com>
-# Set initdb as a seperate option.
+# pidfile: /var/run/postmaster.PORT.pid
 
-# Version 8.3 Devrim Gunduz <devrim at CommandPrompt.com>
-
-# Version 8.4 Devrim Gunduz <devrim at CommandPrompt.com>
-# Remove "sameuser" from initdb, to match the new hba conf file.
+# This script is slightly unusual in that the name of the daemon (postmaster)
+# is not the same as the name of the subsystem (postgresql)
 
 # PGVERSION is the full package version, e.g., 8.4.0
-# Note: the specfile ordinarily updates this during install
+# Note: the specfile inserts the correct value during package build
 PGVERSION=xxxx
 # PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
 PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
@@ -81,10 +20,7 @@ PGMAJORVERSION=`echo "$PGVERSION" | sed 
 # Source function library.
 . /etc/rc.d/init.d/functions
 
-# Get function listing for cross-distribution logic.
-TYPESET=`typeset -f|grep "declare"`
-
-# Get config.
+# Get network config.
 . /etc/sysconfig/network
 
 # Find the name of the script
@@ -117,21 +53,20 @@ PG_OOM_ADJ=-17
 export PGDATA
 export PGPORT
 
-# Check that networking is up.
-# Pretty much need it for postmaster.
-[ "${NETWORKING}" = "no" ] && exit 1
-
-[ -f "$PGENGINE/postmaster" ] || exit 1
+lockfile="/var/lock/subsys/${NAME}"
+pidfile="/var/run/postmaster.${PGPORT}.pid"
 
 script_result=0
 
 start(){
+	[ -x "$PGENGINE/postmaster" ] || exit 5
+
 	PSQL_START=$"Starting ${NAME} service: "
 
 	# Make sure startup-time log file is valid
 	if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]
 	then
-		touch "$PGLOG" || exit 1
+		touch "$PGLOG" || exit 4
 		chown postgres:postgres "$PGLOG"
 		chmod go-rwx "$PGLOG"
 		[ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG"
@@ -140,8 +75,7 @@ start(){
 	# Check for the PGDATA structure
 	if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]
 	then
-	# Check version of existing PGDATA
-
+		# Check version of existing PGDATA
 		if [ x`cat "$PGDATA/PG_VERSION"` != x"$PGMAJORVERSION" ]
 		then
 			SYSDOCDIR="(Your System's documentation directory)"
@@ -167,10 +101,8 @@ start(){
 			echo $"See $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information."
 			exit 1
 		fi
-
-	# No existing PGDATA! Warn the user to initdb it.
-
 	else
+		# No existing PGDATA! Warn the user to initdb it.
 		echo
                 echo "$PGDATA is missing. Use \"service postgresql initdb\" to initialize the cluster first."
 		echo_failure
@@ -182,12 +114,12 @@ start(){
 	test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_adj
 	$SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null
 	sleep 2
-	pid=`pidof -s "$PGENGINE/postmaster"`
-	if [ $pid ] && [ -f "$PGDATA/postmaster.pid" ]
+	pid=`head -n 1 "$PGDATA/postmaster.pid" 2>/dev/null`
+	if [ "x$pid" != x ]
 	then
 		success "$PSQL_START"
-		touch /var/lock/subsys/${NAME}
-		head -n 1 "$PGDATA/postmaster.pid" > "/var/run/postmaster.${PGPORT}.pid"
+		touch "$lockfile"
+		echo $pid > "$pidfile"
 		echo
 	else
 		failure "$PSQL_START"
@@ -198,18 +130,24 @@ start(){
 
 stop(){
 	echo -n $"Stopping ${NAME} service: "
-	$SU -l postgres -c "$PGENGINE/pg_ctl stop -D '$PGDATA' -s -m fast" > /dev/null 2>&1 < /dev/null
-	ret=$? 
-	if [ $ret -eq 0 ]
+	if [ -e "$lockfile" ]
 	then
+	    $SU -l postgres -c "$PGENGINE/pg_ctl stop -D '$PGDATA' -s -m fast" > /dev/null 2>&1 < /dev/null
+	    ret=$? 
+	    if [ $ret -eq 0 ]
+	    then
 		echo_success
-	else
+		rm -f "$pidfile"
+		rm -f "$lockfile"
+	    else
 		echo_failure
 		script_result=1
+	    fi
+	else
+	    # not running; per LSB standards this is "ok"
+	    echo_success
 	fi
 	echo
-	rm -f "/var/run/postmaster.${PGPORT}.pid"
-	rm -f "/var/lock/subsys/${NAME}"
 }
 
 restart(){
@@ -218,11 +156,7 @@ restart(){
 }
 
 condrestart(){
-    [ -e /var/lock/subsys/${NAME} ] && restart
-}
-
-condstop(){
-    [ -e /var/lock/subsys/${NAME} ] && stop
+    [ -e "$lockfile" ] && restart || :
 }
 
 reload(){
@@ -275,9 +209,6 @@ initdb(){
     fi
 }
 
-# This script is slightly unusual in that the name of the daemon (postmaster)
-# is not the same as the name of the subsystem (postgresql)
-
 # See how we were called.
 case "$1" in
   start)
@@ -293,21 +224,21 @@ case "$1" in
   restart)
 	restart
 	;;
-  condrestart)
+  condrestart|try-restart)
 	condrestart
 	;;
-  condstop)
-	condstop
-	;;
-  reload|force-reload)
+  reload)
 	reload
 	;;
+  force-reload)
+	restart
+	;;
   initdb)
 	initdb
 	;;
   *)
-	echo $"Usage: $0 {start|stop|status|restart|condrestart|condstop|reload|force-reload|initdb}"
-	exit 1
+	echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|initdb}"
+	exit 2
 esac
 
 exit $script_result


Index: postgresql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-13/postgresql.spec,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -p -r1.131 -r1.132
--- postgresql.spec	18 Feb 2010 15:25:30 -0000	1.131
+++ postgresql.spec	14 Mar 2010 16:44:08 -0000	1.132
@@ -52,8 +52,8 @@
 Summary: PostgreSQL client programs
 Name: postgresql
 %global majorversion 8.4
-Version: 8.4.2
-Release: 6%{?dist}
+Version: 8.4.3
+Release: 1%{?dist}
 # The PostgreSQL license is very similar to other MIT licenses, but the OSI
 # recognizes it as an independent license, so we do as well.
 License: PostgreSQL
@@ -74,12 +74,12 @@ Source14: postgresql.pam
 Source15: postgresql-bashprofile
 Source16: filter-requires-perl-Pg.sh
 
+# Comments for these patches are in the patch files.
 Patch1: rpm-pgsql.patch
 Patch2: postgresql-ac-version.patch
 Patch3: postgresql-logging.patch
 Patch4: postgresql-oom-adj.patch
 Patch6: postgresql-perl-rpath.patch
-Patch7: postgresql-dtrace.patch
 
 BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex autoconf gawk
 BuildRequires: perl(ExtUtils::Embed), perl-devel
@@ -170,10 +170,13 @@ PostgreSQL server.
 %package server
 Summary: The programs needed to create and run a PostgreSQL server
 Group: Applications/Databases
-Requires: postgresql = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
 Requires(pre): /usr/sbin/useradd
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
+Requires(post): chkconfig
+Requires(preun): chkconfig
+# This is for /sbin/service
+Requires(preun): initscripts
+Requires(postun): initscripts
 
 %description server
 The postgresql-server package includes the programs needed to create
@@ -279,7 +282,6 @@ system, including regression tests and b
 %patch3 -p1
 %patch4 -p1
 %patch6 -p1
-%patch7 -p1
 
 autoconf
 
@@ -492,18 +494,18 @@ cat psql-%{majorversion}.lang >>main.lst
 %postun libs -p /sbin/ldconfig 
 
 %pre server
-groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
-useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
+/usr/sbin/groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
+/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
 	-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
 
 %post server
-chkconfig --add postgresql
+/sbin/chkconfig --add postgresql
 /sbin/ldconfig
 
 %preun server
 if [ $1 = 0 ] ; then
-	/sbin/service postgresql condstop >/dev/null 2>&1
-	chkconfig --del postgresql
+	/sbin/service postgresql stop >/dev/null 2>&1
+	/sbin/chkconfig --del postgresql
 fi
 
 %postun server
@@ -711,6 +713,12 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Sun Mar 14 2010 Tom Lane <tgl at redhat.com> 8.4.3-1
+- Update to PostgreSQL 8.4.3, for various fixes described at
+  http://www.postgresql.org/docs/8.4/static/release-8-4-3.html
+- Bring init script into some modicum of compliance with Fedora/LSB standards
+Resolves: #201043
+
 * Thu Feb 18 2010 Tom "spot" Callaway <tcallawa at redhat.com>
 - adjust license tag to reflect OSI decision
 

rpm-pgsql.patch:
 Makefile.global.in |   31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)

Index: rpm-pgsql.patch
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-13/rpm-pgsql.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- rpm-pgsql.patch	18 Aug 2009 02:58:55 -0000	1.3
+++ rpm-pgsql.patch	14 Mar 2010 16:44:08 -0000	1.4
@@ -1,60 +1,72 @@
 For the RPMs, we want the custom installation directories to end in
 /pgsql not /postgresql.  This is historical but not worth changing.
 
+Notice that this patch also makes the appending of /pgsql unconditional.
+This is to avoid unexpected behavior if the RPM is built in a working
+directory whose path happens to include "postgres" or "pgsql" already.
+However, datadir and sysconfdir are already set up in the specfile's
+configure call, so we do not have to append anything to them.
 
-diff -Naur postgresql-8.4.0.orig/src/Makefile.global.in postgresql-8.4.0/src/Makefile.global.in
---- postgresql-8.4.0.orig/src/Makefile.global.in	2009-06-22 23:46:00.000000000 -0400
-+++ postgresql-8.4.0/src/Makefile.global.in	2009-08-12 23:14:53.000000000 -0400
-@@ -54,7 +54,7 @@
+
+diff -Naur postgresql-8.4.3.orig/src/Makefile.global.in postgresql-8.4.3/src/Makefile.global.in
+--- postgresql-8.4.3.orig/src/Makefile.global.in	2009-06-22 23:46:00.000000000 -0400
++++ postgresql-8.4.3/src/Makefile.global.in	2010-03-13 22:18:12.000000000 -0500
+@@ -54,8 +54,7 @@
  # Installation directories
  #
  # These are set by the equivalent --xxxdir configure options.  We
 -# append "postgresql" to some of them, if the string does not already
-+# append "pgsql" to some of them, if the string does not already
- # contain "pgsql" or "postgres", in order to avoid directory clutter.
+-# contain "pgsql" or "postgres", in order to avoid directory clutter.
++# append "pgsql" to some of them, in order to avoid directory clutter.
  #
  # In a PGXS build, we cannot use the values inserted into Makefile.global
-@@ -75,14 +75,14 @@
+ # by configure, since the installation tree may have been relocated.
+@@ -73,45 +72,23 @@
+ bindir := @bindir@
+ 
  datadir := @datadir@
- ifeq "$(findstring pgsql, $(datadir))" ""
- ifeq "$(findstring postgres, $(datadir))" ""
+-ifeq "$(findstring pgsql, $(datadir))" ""
+-ifeq "$(findstring postgres, $(datadir))" ""
 -override datadir := $(datadir)/postgresql
-+override datadir := $(datadir)/pgsql
- endif
- endif
+-endif
+-endif
  
  sysconfdir := @sysconfdir@
- ifeq "$(findstring pgsql, $(sysconfdir))" ""
- ifeq "$(findstring postgres, $(sysconfdir))" ""
+-ifeq "$(findstring pgsql, $(sysconfdir))" ""
+-ifeq "$(findstring postgres, $(sysconfdir))" ""
 -override sysconfdir := $(sysconfdir)/postgresql
-+override sysconfdir := $(sysconfdir)/pgsql
- endif
- endif
+-endif
+-endif
+ 
+ libdir := @libdir@
  
-@@ -91,7 +91,7 @@
  pkglibdir = $(libdir)
- ifeq "$(findstring pgsql, $(pkglibdir))" ""
- ifeq "$(findstring postgres, $(pkglibdir))" ""
+-ifeq "$(findstring pgsql, $(pkglibdir))" ""
+-ifeq "$(findstring postgres, $(pkglibdir))" ""
 -override pkglibdir := $(pkglibdir)/postgresql
+-endif
+-endif
 +override pkglibdir := $(pkglibdir)/pgsql
- endif
- endif
  
-@@ -100,7 +100,7 @@
+ includedir := @includedir@
+ 
  pkgincludedir = $(includedir)
- ifeq "$(findstring pgsql, $(pkgincludedir))" ""
- ifeq "$(findstring postgres, $(pkgincludedir))" ""
+-ifeq "$(findstring pgsql, $(pkgincludedir))" ""
+-ifeq "$(findstring postgres, $(pkgincludedir))" ""
 -override pkgincludedir := $(pkgincludedir)/postgresql
+-endif
+-endif
 +override pkgincludedir := $(pkgincludedir)/pgsql
- endif
- endif
  
-@@ -109,7 +109,7 @@
+ mandir := @mandir@
+ 
  docdir := @docdir@
- ifeq "$(findstring pgsql, $(docdir))" ""
- ifeq "$(findstring postgres, $(docdir))" ""
+-ifeq "$(findstring pgsql, $(docdir))" ""
+-ifeq "$(findstring postgres, $(docdir))" ""
 -override docdir := $(docdir)/postgresql
+-endif
+-endif
 +override docdir := $(docdir)/pgsql
- endif
- endif
+ 
+ htmldir := @htmldir@
  


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-13/sources,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- sources	9 Jan 2010 05:23:05 -0000	1.51
+++ sources	14 Mar 2010 16:44:08 -0000	1.52
@@ -1,2 +1,2 @@
-d738227e2f1f742d2f2d4ab56496c5c6  postgresql-8.4.2.tar.bz2
-f01eb7590a297e18a89005d74d693f21  postgresql-8.4.2-US.pdf
+7f70e7b140fb190f268837255582b07e  postgresql-8.4.3.tar.bz2
+fa50777e0964e86bd1bfbefda645aa82  postgresql-8.4.3-US.pdf


--- postgresql-dtrace.patch DELETED ---



More information about the scm-commits mailing list