Update to Postgres 8.2.0, fix a couple of small packaging bugs.

This commit is contained in:
Tom Lane 2006-12-05 03:01:02 +00:00
parent a1b4e26b2e
commit 94058424b0
8 changed files with 112 additions and 128 deletions

View File

@ -1,5 +1,5 @@
postgresql-8.1.4.tar.bz2
PyGreSQL-3.8.tgz
postgresql-8.2.0.tar.bz2
PyGreSQL-3.8.1.tgz
pgtcl1.5.2.tar.gz
pgtcldocs-20041108.zip
postgresql-8.1-US.pdf

View File

@ -28,7 +28,7 @@ installcheck-parallel: cleandirs
cleandirs:
-rm -rf testtablespace results
mkdir testtablespace results
[ -x /usr/bin/chcon ] && /usr/bin/chcon -t postgresql_db_t testtablespace results
[ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u -r object_r -t postgresql_db_t testtablespace results
# old interfaces follow...

View File

@ -1,36 +1,37 @@
diff -Naur postgresql-8.1.0.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-8.1.0/src/backend/utils/misc/postgresql.conf.sample
--- postgresql-8.1.0.orig/src/backend/utils/misc/postgresql.conf.sample 2005-10-08 15:32:58.000000000 -0400
+++ postgresql-8.1.0/src/backend/utils/misc/postgresql.conf.sample 2005-11-07 15:04:13.000000000 -0500
@@ -211,15 +211,15 @@
diff -Naur postgresql-8.2.0.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-8.2.0/src/backend/utils/misc/postgresql.conf.sample
--- postgresql-8.2.0.orig/src/backend/utils/misc/postgresql.conf.sample 2006-11-20 20:23:37.000000000 -0500
+++ postgresql-8.2.0/src/backend/utils/misc/postgresql.conf.sample 2006-12-04 19:54:58.000000000 -0500
@@ -226,16 +226,16 @@
# depending on platform.
# This is used when logging to stderr:
-#redirect_stderr = off # Enable capturing of stderr into log
+redirect_stderr = on # Enable capturing of stderr into log
# files
# (change requires restart)
# These are only used if redirect_stderr is on:
-#log_directory = 'pg_log' # Directory where log files are written
+log_directory = 'pg_log' # Directory where log files are written
# Can be absolute or relative to PGDATA
-#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
+log_filename = 'postgresql-%a.log' # Log file name pattern.
+log_filename = 'postgresql-%a.log' # Log file name pattern.
# Can include strftime() escapes
-#log_truncate_on_rotation = off # If on, any existing log file of the same
+log_truncate_on_rotation = on # If on, any existing log file of the same
+log_truncate_on_rotation = on # If on, any existing log file of the same
# name as the new log file will be
# truncated rather than appended to. But
# such truncation only occurs on
@@ -227,10 +227,10 @@
@@ -243,10 +243,10 @@
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
-#log_rotation_age = 1440 # Automatic rotation of logfiles will
+log_rotation_age = 1440 # Automatic rotation of logfiles will
# happen after so many minutes. 0 to
-#log_rotation_age = 1d # Automatic rotation of logfiles will
+log_rotation_age = 1d # Automatic rotation of logfiles will
# happen after that time. 0 to
# disable.
-#log_rotation_size = 10240 # Automatic rotation of logfiles will
-#log_rotation_size = 10MB # Automatic rotation of logfiles will
+log_rotation_size = 0 # Automatic rotation of logfiles will
# happen after so many kilobytes of log
# happen after that much log
# output. 0 to disable.

View File

@ -7,9 +7,9 @@ So work around it by adding an rpath spec to plperl.so (only).
Per bug #162198.
diff -Naur postgresql-8.1.0.orig/src/pl/plperl/GNUmakefile postgresql-8.1.0/src/pl/plperl/GNUmakefile
--- postgresql-8.1.0.orig/src/pl/plperl/GNUmakefile 2005-07-13 13:12:56.000000000 -0400
+++ postgresql-8.1.0/src/pl/plperl/GNUmakefile 2005-11-07 15:10:33.000000000 -0500
diff -Naur postgresql-8.2.0.orig/src/pl/plperl/GNUmakefile postgresql-8.2.0/src/pl/plperl/GNUmakefile
--- postgresql-8.2.0.orig/src/pl/plperl/GNUmakefile 2006-07-20 20:24:04.000000000 -0400
+++ postgresql-8.2.0/src/pl/plperl/GNUmakefile 2006-12-04 20:00:56.000000000 -0500
@@ -36,6 +36,9 @@
SHLIB_LINK = $(perl_embed_ldflags) $(BE_DLLLIBS)
@ -19,4 +19,4 @@ diff -Naur postgresql-8.1.0.orig/src/pl/plperl/GNUmakefile postgresql-8.1.0/src/
+
REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
REGRESS = plperl plperl_trigger plperl_shared plperl_elog
# where to find psql for running the tests

View File

@ -1,7 +1,7 @@
diff -Naur postgresql-8.0.0rc5.orig/src/test/regress/GNUmakefile postgresql-8.0.0rc5/src/test/regress/GNUmakefile
--- postgresql-8.0.0rc5.orig/src/test/regress/GNUmakefile 2004-11-17 13:05:06.000000000 -0500
+++ postgresql-8.0.0rc5/src/test/regress/GNUmakefile 2005-01-12 14:48:45.618011257 -0500
@@ -84,12 +84,23 @@
diff -Naur postgresql-8.2.0.orig/src/test/regress/GNUmakefile postgresql-8.2.0/src/test/regress/GNUmakefile
--- postgresql-8.2.0.orig/src/test/regress/GNUmakefile 2006-07-20 20:24:04.000000000 -0400
+++ postgresql-8.2.0/src/test/regress/GNUmakefile 2006-12-04 19:56:54.000000000 -0500
@@ -102,12 +102,23 @@
testtablespace := $(abs_builddir)/testtablespace
@ -25,49 +25,49 @@ diff -Naur postgresql-8.0.0rc5.orig/src/test/regress/GNUmakefile postgresql-8.0.
$(input_files): sql/%.sql: input/%.source
$(sed-command)
diff -Naur postgresql-8.0.0rc5.orig/src/test/regress/input/create_function_1.source postgresql-8.0.0rc5/src/test/regress/input/create_function_1.source
--- postgresql-8.0.0rc5.orig/src/test/regress/input/create_function_1.source 2002-08-21 20:01:51.000000000 -0400
+++ postgresql-8.0.0rc5/src/test/regress/input/create_function_1.source 2005-01-12 14:50:50.679124338 -0500
diff -Naur postgresql-8.2.0.orig/src/test/regress/input/create_function_1.source postgresql-8.2.0/src/test/regress/input/create_function_1.source
--- postgresql-8.2.0.orig/src/test/regress/input/create_function_1.source 2006-02-27 11:09:50.000000000 -0500
+++ postgresql-8.2.0/src/test/regress/input/create_function_1.source 2006-12-04 19:58:24.000000000 -0500
@@ -24,17 +24,17 @@
CREATE FUNCTION check_primary_key ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
+ AS '@abs_spidir@/refint@DLSUFFIX@'
LANGUAGE 'C';
LANGUAGE C;
CREATE FUNCTION check_foreign_key ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
+ AS '@abs_spidir@/refint@DLSUFFIX@'
LANGUAGE 'C';
LANGUAGE C;
CREATE FUNCTION autoinc ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
+ AS '@abs_spidir@/autoinc@DLSUFFIX@'
LANGUAGE 'C';
LANGUAGE C;
CREATE FUNCTION funny_dup17 ()
diff -Naur postgresql-8.0.0rc5.orig/src/test/regress/output/create_function_1.source postgresql-8.0.0rc5/src/test/regress/output/create_function_1.source
--- postgresql-8.0.0rc5.orig/src/test/regress/output/create_function_1.source 2004-03-21 17:29:11.000000000 -0500
+++ postgresql-8.0.0rc5/src/test/regress/output/create_function_1.source 2005-01-12 14:51:08.149762180 -0500
diff -Naur postgresql-8.2.0.orig/src/test/regress/output/create_function_1.source postgresql-8.2.0/src/test/regress/output/create_function_1.source
--- postgresql-8.2.0.orig/src/test/regress/output/create_function_1.source 2006-03-14 17:48:25.000000000 -0500
+++ postgresql-8.2.0/src/test/regress/output/create_function_1.source 2006-12-04 19:58:54.000000000 -0500
@@ -25,15 +25,15 @@
NOTICE: argument type city_budget is only a shell
CREATE FUNCTION check_primary_key ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
+ AS '@abs_spidir@/refint@DLSUFFIX@'
LANGUAGE 'C';
LANGUAGE C;
CREATE FUNCTION check_foreign_key ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
+ AS '@abs_spidir@/refint@DLSUFFIX@'
LANGUAGE 'C';
LANGUAGE C;
CREATE FUNCTION autoinc ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
+ AS '@abs_spidir@/autoinc@DLSUFFIX@'
LANGUAGE 'C';
LANGUAGE C;
CREATE FUNCTION funny_dup17 ()
RETURNS trigger

View File

@ -61,16 +61,20 @@
# fooling the postmaster's stale-lockfile check by having too many
# postgres-owned processes laying about.
# Version 8.1 Devrim Gunduz <devrim@PostgreSQL.org>
# Increased sleep time from 1 sec to 2 sec.
# PGVERSION is the full package version, e.g., 7.4.7
# Version 8.2 Devrim Gunduz <devrim@CommandPrompt.com>
# Set initdb as a seperate option.
# PGVERSION is the full package version, e.g., 8.2.0
# Note: the specfile ordinarily updates this during install
PGVERSION=xxxx
# PGMAJORVERSION is major version, e.g., 7.4 (this should match PG_VERSION)
# PGMAJORVERSION is major version, e.g., 8.2 (this should match PG_VERSION)
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
# Source function library.
INITD=/etc/rc.d/init.d
. $INITD/functions
. /etc/rc.d/init.d/functions
# Get function listing for cross-distribution logic.
TYPESET=`typeset -f|grep "declare"`
@ -163,28 +167,14 @@ start(){
exit 1
fi
# No existing PGDATA! Initdb it.
# No existing PGDATA! Warn the user to initdb it.
else
echo -n $"Initializing database: "
if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]
then
mkdir -p "$PGDATA" || exit 1
chown postgres:postgres "$PGDATA"
chmod go-rwx "$PGDATA"
fi
# Clean up SELinux tagging for PGDATA
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
# Initialize the database
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
# Create directory for postmaster log
mkdir "$PGDATA/pg_log"
chown postgres:postgres "$PGDATA/pg_log"
chmod go-rwx "$PGDATA/pg_log"
[ -f "$PGDATA/PG_VERSION" ] && echo_success
[ ! -f "$PGDATA/PG_VERSION" ] && echo_failure
echo
echo "$PGDATA is missing. Use \"service postgresql initdb\" to initialize the cluster first."
echo_failure
echo
exit 1
fi
echo -n "$PSQL_START"
@ -237,6 +227,39 @@ reload(){
$SU -l postgres -c "$PGENGINE/pg_ctl reload -D '$PGDATA' -s" > /dev/null 2>&1 < /dev/null
}
initdb(){
if [ -f "$PGDATA/PG_VERSION" ]
then
echo "Data directory is not empty!"
echo_failure
script_result=1
else
echo -n $"Initializing database: "
if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]
then
mkdir -p "$PGDATA" || exit 1
chown postgres:postgres "$PGDATA"
chmod go-rwx "$PGDATA"
fi
# Clean up SELinux tagging for PGDATA
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
# Initialize the database
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
# Create directory for postmaster log
mkdir "$PGDATA/pg_log"
chown postgres:postgres "$PGDATA/pg_log"
chmod go-rwx "$PGDATA/pg_log"
if [ -f "$PGDATA/PG_VERSION" ]
then
echo_success
else
echo_failure
script_result=1
fi
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)
@ -264,8 +287,11 @@ case "$1" in
reload|force-reload)
reload
;;
initdb)
initdb
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|condstop|reload|force-reload}"
echo $"Usage: $0 {start|stop|status|restart|condrestart|condstop|reload|force-reload|initdb}"
exit 1
esac

View File

@ -60,7 +60,6 @@
%{!?aconfver:%define aconfver autoconf}
%{!?tcldevel:%define tcldevel 1}
%{!?jdbc:%define jdbc 0}
%{!?test:%define test 1}
%{!?python:%define python 1}
%{!?pltcl:%define pltcl 1}
@ -81,8 +80,8 @@
Summary: PostgreSQL client programs and libraries.
Name: postgresql
Version: 8.1.4
Release: 1.1
Version: 8.2.0
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
Url: http://www.postgresql.org/
@ -92,21 +91,15 @@ Source3: postgresql.init
Source4: Makefile.regress
Source5: pg_config.h
Source6: README.rpm-dist
%if %jdbc
Source8: http://jdbc.postgresql.org/download/postgresql-8.1-405.jdbc2.jar
Source9: http://jdbc.postgresql.org/download/postgresql-8.1-405.jdbc2ee.jar
Source10: http://jdbc.postgresql.org/download/postgresql-8.1-405.jdbc3.jar
%endif
Source14: postgresql.pam
Source15: postgresql-bashprofile
Source16: filter-requires-perl-Pg.sh
Source17: http://www.postgresql.org/docs/manuals/postgresql-8.1-US.pdf
Source18: ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-3.8.tgz
Source18: ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-3.8.1.tgz
Source19: ftp://gborg.postgresql.org/pub/pgtclng/stable/pgtcl1.5.2.tar.gz
Source20: ftp://gborg.postgresql.org/pub/pgtclng/stable/pgtcldocs-20041108.zip
Patch1: rpm-pgsql.patch
Patch2: postgresql-src-tutorial.patch
Patch3: postgresql-logging.patch
Patch4: postgresql-test.patch
Patch5: pgtcl-no-rpath.patch
@ -291,19 +284,6 @@ database.
%endif
#----------
%if %jdbc
%package jdbc
Summary: Files needed for Java programs to access a PostgreSQL database.
Group: Applications/Databases
Obsoletes: rh-postgresql-jdbc
%description jdbc
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-jdbc package includes the .jar files needed for
Java programs to access a PostgreSQL database.
%endif
#------------
%if %test
%package test
Summary: The test suite distributed with PostgreSQL.
@ -323,11 +303,7 @@ system, including regression tests and benchmarks.
%prep
%setup -q
pushd doc
tar zxf postgres.tar.gz
popd
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# patch5 is applied later
@ -337,11 +313,6 @@ popd
#call autoconf 2.53 or greater
%aconfver
pushd doc
tar -zcf postgres.tar.gz *.html stylesheet.css
rm -f *.html stylesheet.css
popd
cp -p %{SOURCE17} .
%if %python
@ -349,7 +320,6 @@ cp -p %{SOURCE17} .
PYGRESQLDIR=`basename %{SOURCE18} .tgz`
mv $PYGRESQLDIR PyGreSQL
# Some versions of PyGreSQL.tgz contain wrong file permissions
chmod 644 PyGreSQL/announce.txt PyGreSQL/changelog.txt PyGreSQL/README
chmod 755 PyGreSQL/tutorial
chmod 644 PyGreSQL/tutorial/*.py
chmod 755 PyGreSQL/tutorial/advanced.py PyGreSQL/tutorial/basics.py
@ -488,23 +458,6 @@ esac
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
cp src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
%if %jdbc
# Java/JDBC
# Red Hat's standard place to put jarfiles is /usr/share/java
# JDBC jars
install -d $RPM_BUILD_ROOT/usr/share/java
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT/usr/share/java
install -m 644 %{SOURCE9} $RPM_BUILD_ROOT/usr/share/java
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/usr/share/java
# Versionless symlinks to the versioned jars
pushd $RPM_BUILD_ROOT/usr/share/java
ln -s `basename %{SOURCE8}` postgresql-jdbc2.jar
ln -s `basename %{SOURCE9}` postgresql-jdbc2ee.jar
ln -s `basename %{SOURCE10}` postgresql-jdbc3.jar
popd
%endif
%if %tcl
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/Pgtcl
cp Pgtcl/pkgIndex.tcl $RPM_BUILD_ROOT%{_libdir}/Pgtcl
@ -681,39 +634,37 @@ rm -rf $RPM_BUILD_ROOT
%files contrib
%defattr(-,root,root)
%{_libdir}/pgsql/_int.so
%{_libdir}/pgsql/adminpack.so
%{_libdir}/pgsql/autoinc.so
%{_libdir}/pgsql/btree_gist.so
%{_libdir}/pgsql/chkpass.so
%{_libdir}/pgsql/cube.so
%{_libdir}/pgsql/dblink.so
%{_libdir}/pgsql/earthdistance.so
%{_libdir}/pgsql/fti.so
%{_libdir}/pgsql/fuzzystrmatch.so
%{_libdir}/pgsql/hstore.so
%{_libdir}/pgsql/insert_username.so
%{_libdir}/pgsql/int_aggregate.so
%{_libdir}/pgsql/isbn_issn.so
%{_libdir}/pgsql/isn.so
%{_libdir}/pgsql/lo.so
%{_libdir}/pgsql/ltree.so
%{_libdir}/pgsql/moddatetime.so
%{_libdir}/pgsql/pending.so
%{_libdir}/pgsql/pgcrypto.so
%{_libdir}/pgsql/pgstattuple.so
%{_libdir}/pgsql/pg_buffercache.so
%{_libdir}/pgsql/pg_freespacemap.so
%{_libdir}/pgsql/pg_trgm.so
%{_libdir}/pgsql/pgcrypto.so
%{_libdir}/pgsql/pgrowlocks.so
%{_libdir}/pgsql/pgstattuple.so
%{_libdir}/pgsql/refint.so
%{_libdir}/pgsql/seg.so
%{_libdir}/pgsql/sslinfo.so
%{_libdir}/pgsql/tablefunc.so
%{_libdir}/pgsql/timetravel.so
%{_libdir}/pgsql/tsearch2.so
%{_libdir}/pgsql/user_locks.so
%if %xml
%{_libdir}/pgsql/pgxml.so
%endif
%{_datadir}/pgsql/contrib/
%{_bindir}/DBMirror.pl
%{_bindir}/clean_pending.pl
%{_bindir}/dbf2pg
%{_bindir}/fti.pl
%{_bindir}/oid2name
%{_bindir}/pgbench
%{_bindir}/vacuumlo
@ -749,9 +700,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/postmaster.*
%{_datadir}/pgsql/postgres.bki
%{_datadir}/pgsql/postgres.description
%{_datadir}/pgsql/postgres.shdescription
%{_datadir}/pgsql/system_views.sql
%{_datadir}/pgsql/*.sample
%{_datadir}/pgsql/timezone/
%{_datadir}/pgsql/timezonesets/
%{_libdir}/pgsql/plpgsql.so
%dir %{_datadir}/pgsql
%attr(700,postgres,postgres) %dir /var/lib/pgsql
@ -809,18 +762,12 @@ rm -rf $RPM_BUILD_ROOT
%if %python
%files python
%defattr(-,root,root)
%doc PyGreSQL/announce.txt PyGreSQL/changelog.txt PyGreSQL/README
%doc PyGreSQL/docs/*.txt
%doc PyGreSQL/tutorial
%{_libdir}/python%{pyver}/site-packages/_pgmodule.so
%{_libdir}/python%{pyver}/site-packages/*.py
%endif
%if %jdbc
%files jdbc
%defattr(-,root,root)
%{_datadir}/java/*
%endif
%if %test
%files test
%defattr(-,postgres,postgres)
@ -829,6 +776,16 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Mon Dec 4 2006 Tom Lane <tgl@redhat.com> 8.2.0-1
- Update to PostgreSQL 8.2.0
- Update to PyGreSQL 3.8.1
- Fix chcon arguments in test/regress/Makefile
Related: #201035
- Adjust init script to not fool /etc/rc.d/rc
Resolves: #161470
- Change init script to not do initdb automatically, but require
manual "service postgresql initdb" for safety. Per upstream discussions.
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 8.1.4-1.1
- rebuild

View File

@ -1,5 +1,5 @@
a65bdc5d833169d28bf6fbaaa8d57fcf postgresql-8.1.4.tar.bz2
312f5e90a63ea17f8c65bc83b85a55f3 PyGreSQL-3.8.tgz
490cb3a614545cbd3ce9b1c75c1d2b2e postgresql-8.2.0.tar.bz2
5575979dac93c9c5795d7693a8f91c86 PyGreSQL-3.8.1.tgz
d19dfdcb54c334495d32456a043e0232 pgtcl1.5.2.tar.gz
3d504b46231914d61fd49175f67e8715 pgtcldocs-20041108.zip
66d80897840724917cb838c76393692b postgresql-8.1-US.pdf