Update to PostgreSQL 8.0.

This commit is contained in:
Tom Lane 2005-01-19 05:02:11 +00:00
parent cc192f6092
commit 6e96691327
10 changed files with 543 additions and 322 deletions

View File

@ -1,2 +1,8 @@
postgresql-7.4.6.tar.bz2
PyGreSQL-3.6.tgz
postgresql-8.0.0.tar.bz2
PyGreSQL-3.6.1.tgz
pgtcl1.5.2.tar.gz
pgtcldocs-20041108.zip
postgresql-8.0.309.jdbc2.jar
postgresql-8.0.309.jdbc2ee.jar
postgresql-8.0.309.jdbc3.jar
postgresql-8.0-US.pdf

53
Makefile.regress Normal file
View File

@ -0,0 +1,53 @@
#
# Simplified makefile for running the PostgreSQL regression tests
# in an RPM installation
#
# database encoding
MULTIBYTE := SQL_ASCII
# maximum simultaneous connections for parallel tests
MAXCONNOPT :=
ifdef MAX_CONNECTIONS
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
endif
srcdir := .
check: installcheck-parallel
installcheck: cleandirs
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE)
installcheck-parallel: cleandirs
$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) $(MAXCONNOPT)
# The tests command the server to write into testtablespace and results.
# On a SELinux-enabled system this will fail unless we mark those directories
# as writable by the server.
cleandirs:
-rm -rf testtablespace results
mkdir testtablespace results
[ -x /usr/bin/chcon ] && /usr/bin/chcon -t postgresql_db_t testtablespace results
# old interfaces follow...
runcheck: check
runtest: installcheck
runtest-parallel: installcheck-parallel
bigtest: cleandirs
$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) numeric_big
bigcheck: cleandirs
$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) $(MAXCONNOPT) numeric_big
##
## Clean up
##
clean distclean maintainer-clean:
rm -rf testtablespace
rm -rf results tmp_check log
rm -f regression.diffs regression.out regress.out run_check.out

View File

@ -1,42 +1,44 @@
README.rpm-dist
-----------------------------------------------------------------------------
Version 6.0, for the PostgreSQL 7.4-0.1PGDG RPMset.
Version 8.0, for the PostgreSQL 8.0.0-1PGDG RPMset.
Lamar Owen <lamar.owen@wgcr.org>
-----------------------------------------------------------------------------
Contents:
0.) Quick -i note.
0.) Quick note about '-i'
1.) Introduction, QuickStart, and credits
2.) PostgreSQL RPM packages and rationale
3.) Starting multiple postmasters
4.) Regression Testing
5.) Starting postmaster automatically on startup
6.) Grand Unified Configuration(GUC) File.
7.) Rebuilding the source RPM.
8.) Contrib files.
9.) Logging set up
6.) Grand Unified Configuration(GUC) File
7.) Logging set up
8.) Rebuilding from the source RPM
9.) Contrib files
10.) Further Information Resource
QUICK '-i' NOTE
QUICK NOTE ABOUT '-i'
-----------------------------------------------------------------------------
The postmaster '-i' option is NOT used by default in the initscript shipped
with these RPMs. Please do NOT modify the initscript to add the '-i' back
in -- it will get overwritten on the next package upgrade. Rather, see the
section below on the Grand Unified Configuration file, which includes the
recommended way to get '-i' functionality back.
recommended way to get '-i' functionality. Note that as of PostgreSQL 8.0,
you don't need '-i' anyway if all you want to allow is local TCP/IP
connections.
INTRODUCTION
-----------------------------------------------------------------------------
This document exists to explain the layout of the RPM's for PostgreSQL,to
This document exists to explain the layout of the RPMs for PostgreSQL, to
describe various RPM specifics, and to document special features found
in the RPMset.
This document is written to be applicable to version 7.4 of PostgreSQL,
which is the current version of the RPM's as of this writing. More to the
point, versions prior to 7.3 are not documented here.
This document is written to be applicable to version 8.0 of PostgreSQL,
which is the current version of the RPMs as of this writing. More to the
point, versions prior to 8.0 are not documented here.
Official PostgreSQL Global Development Group RPM's have from version 7.1.2
on carried a 'PGDG' after the release number. Other RPMset's as distributed
Official PostgreSQL Global Development Group RPMs have from version 7.1.2
on carried a 'PGDG' after the release number. Other RPMsets distributed
with Linux distributions may have a different release number and initials.
It is preferable for the distribution-specific set to be the one used, as
@ -45,32 +47,25 @@ use them in preference. If you want to stay up-to-date on the PostgreSQL
core itself, use the PGDG generic set -- but understand that it is a
GENERIC set.
These RPMs are designed to be LSB-compliant -- if you find this not to be the
case, please let me know by way of the pgsql-ports@postgresql.org mailing
list.
These RPMs no longer support any sort of upgrading process other than that
documented in the regular documentation. That is, you must dump, upgrade,
initdb, and restore your data. The 7.2 to 7.3 migration can be quite
difficult, even to the point of requiring hand-editing of the dumpfile.
initdb, and restore your data. Dump first, then remove the old server
subpackage, install the new package, and restore the data from dump. (A new
method of running multiple versions of PostgreSQL, along with the capability
to run multiple postmasters, is in development, but was not ready for this
release.)
Thus, the 7.3 postgresql-server RPM specifically conflicted with prior
versions. The old server subpackage must be removed first, the new package
installed, and the data restored from dump. However, RPM itself did not
honor this. A new method of running multiple versions of PostgreSQL, along
with the capability to run multiple postmasters, is in development, but was
not ready for this release.
A new section on running multiple postmasters has replaced the old upgrade
instructions.
SuSE has maintained their own RPMset for some time -- their documentation
supercedes any found in this file.
QUICKSTART
-----------------------------------------------------------------------------
For a fresh installation on a recent Red Hat or similar system, a simple
service postgresql start
service postgresql start
as root will prepare a new database (initdb), and start a postmaster that
will listen on Unix socket 5432 only. Edit /var/lib/pgsql/data/postgresql.conf
to enable TCP/IP -- see the section on '-i.'
will listen on localhost and Unix socket 5432 only. Edit
/var/lib/pgsql/data/postgresql.conf and pg_hba.conf if you want to allow
remote access -- see the section on Grand Unified Configuration.
The file /var/lib/pgsql/.bash_profile is now packaged to help with the
setting of environment variables. You may edit this file, and it won't be
@ -80,12 +75,9 @@ to this file, so be sure to check .bash_profile.rpmnew after upgrading.
The user 'postgres' is created during installation of the server subpackage.
This user by default is UID and GID 26. The user has the default shell set to
bash, and the home directory set to /var/lib/pgsql. This user also has no
default password -- in order to be able to su to from a non-root account
default password -- in order to be able to su to it from a non-root account
or login as 'postgres' you will need to set a password using passwd.
While PygreSQL was split out from the main tarball, thanks to Kaj's work it
is still included as the python subpackage.
CREDITS
-----------------------------------------------------------------------------
Thomas Lockhart
@ -107,62 +99,72 @@ Kaj J. Niemi
POSTGRESQL RPM PACKAGES AND RATIONALE.
-----------------------------------------------------------------------------
The RPMset is packaged in the following subpackages:
postgresql: Some clients and libraries, and documentation
postgresql-server: Server executables and data files
postgresql-devel: Client-side development libraries
postgresql-tcl: TCL/TK client libraries and docs
postgresql-python: The PygreSQL client library
postgresql-jdbc: JAR of the JDBC client
postgresql-test: The regression tests and associated files.
postgresql-tcl: Tcl client and PL ONLY.
postgresql-libs: client shared libraries.
postgresql-docs: extra documentation,such as the SGML doc sources.
postgresql-contrib: The contrib source tree, as well as selected binaries.
postgresql-pl: PL/Perl (if possible on this dist), PL/Python, and PL/Tcl
Note that there is no postgresql-perl, postgresql-odbc, postgresql-tk, or
postgresql-plperl package any longer. This is due to these portions being
removed from the PostgreSQL source tarball. The TK client package 'pgaccess'
was the core of the -tk subpackage -- so the pgtksh client was rolled back
into the -tcl package.
PostgreSQL is split up into multiple packages so that users can 'pick and
choose' what pieces are needed, and what dependencies are required.
The RPMset is packaged in the following subpackages:
postgresql: Key clients and libraries, and documentation
postgresql-libs: Client shared libraries
postgresql-server: Server executables and data files
postgresql-devel: Development libraries and include files
postgresql-jdbc: JARs for the JDBC client library
postgresql-python: The PygreSQL client library
postgresql-tcl: Tcl client library (Pgtcl)
postgresql-test: The regression tests and associated files
postgresql-docs: Extra documentation, such as the tutorial files
postgresql-contrib: The contrib source tree, as well as selected binaries
postgresql-pl: PL/Perl (if possible on this dist), PL/Python, and PL/Tcl
You have to install postgresql and postgresql-libs to do anything.
postgresql-server is needed unless you only plan to use the clients to work
with a remote PostgreSQL server. The others are optional.
Note that there is no postgresql-perl, postgresql-odbc, postgresql-tk, or
postgresql-plperl package any longer. This is due to these portions being
removed from the PostgreSQL source tarball.
While PygreSQL was split out from the core PostgreSQL distribution, thanks to
Kaj's work it is still included as the python subpackage. Also, Pgtcl is
still included as the tcl subpackage, although it is not part of the core
distribution anymore.
RPM FILE LOCATIONS.
-----------------------------------------------------------------------------
In compliance with the Linux FHS, the PostgreSQL RPM's install files in a manner
not consistent with most of the PostgreSQL documentation. According to the
standard PostgreSQL documentation, PostgreSQL is installed under the directory
/usr/local/pgsql, with executables, source, and data existing in various
subdirectories.
To be in compliance with the Linux FHS, the PostgreSQL RPMs install files in
a manner not consistent with most of the PostgreSQL documentation. According
to the standard PostgreSQL documentation, PostgreSQL is installed under the
directory /usr/local/pgsql, with executables, source, and data existing in
various subdirectories.
Different distributions have different ideas of some of these file locations.
In particular, the documentation directory can be /usr/doc, /usr/doc/packages,
/usr/share/doc, /usr/share/doc/packages, or some other similar path. The
RedHat 7 locations are listed below. On SuSE <7.1, substitute 'postgres' for
'postgresql' below, and 'pg_tk' for 'postgresql-tk' below.
Red Hat/Fedora locations are listed below. On SuSE <7.1, substitute 'postgres'
for 'postgresql' below.
However, the RPM's install the files like this:
However, the RPMs install the files like this:
Executables: /usr/bin
Libaries: /usr/lib
Libraries: /usr/lib
Documentation: /usr/share/doc/postgresql-x.y.z
Contrib: /usr/share/doc/postgresql-x.y.z/contrib
Contrib documentation: /usr/share/doc/postgresql-contrib-x.y.z
Source: not installed
Data: /var/lib/pgsql/data
Backup area: /var/lib/pgsql/backup
Templates: /usr/share/pgsql
Procedural Languages: /usr/lib/pgsql
Development Headers: /usr/include/pgsql
Localization data: /usr/share/locale
Other shared data: /usr/share/pgsql
Regression tests: /usr/lib/pgsql/test/regress (in the -test package)
Documentation SGML: /usr/share/doc/postgresql-docs-x.y.z
Tutorial: /usr/lib/pgsql/tutorial (in the -docs package)
Extra documentation: /usr/share/doc/postgresql-docs-x.y.z
The above list references the Red Hat 7.x structure. These locations may
On some 64-bit architectures, /usr/lib64 is used instead of /usr/lib.
The above list describes the Red Hat/Fedora layout. These locations may
change for other distributions. Use of 'rpm -ql' for each package is
recommended as the 'Official' location source.
recommended as the 'official' information source.
While it may seem gratuitous to place these files in different locations, the
FHS requires it -- distributions should not ever touch /usr/local. It may
@ -170,8 +172,9 @@ also seem like more work to keep track of where everything is -- but, that's
the beauty of RPM -- you don't have to keep track of the files, RPM does it
for you.
These RPM's are meant to be LSB-compliant. If you find errors in them that
cause thembe be non-compliant, please let me know.
These RPMs are designed to be LSB-compliant -- if you find this not to be the
case, please let me know by way of the pgsql-ports@postgresql.org mailing
list.
MULTIPLE POSTMASTERS
-------------------------------------------------------------------------------
@ -201,59 +204,46 @@ support experimental at this point in time.
REGRESSION TESTING
-------------------------------------------------------------------------------
One of the features of the newer RPM sets is the capability to perform the
If you install the postgresql-test RPM then you can run the PostgreSQL
regression tests. These tests stress your database installation and produce
results that give you assurances that the installation is complete, and that
your database machine is up to the task.
To run the regression tests under the RPM installation, make sure that
postmaster has been started (if not, su to root and execute the
'/etc/rc.d/init.d/postgresql start' init script), cd to
/usr/lib/pgsql/test/regress, su to postgres, and execute the command line:
time ./pg_regress.sh --schedule=parallel_schedule
This command line will start the regression tests and will both show the
"/etc/rc.d/init.d/postgresql start" init script), cd to
/usr/lib/pgsql/test/regress, su to postgres, and execute "make check".
This command will start the regression tests and will both show the
results to the screen and store the results in the file regress.out.
It will also give you a crude benchmark of how fast your machine performs.
If tests fail, please see the file regression.diffs in that directory. If
you need help interpreting that file, contact the pgsql-ports list on
postgresql.org.
If any tests fail, see the file regression.diffs in that directory for details,
and read the "Regression Tests" section of the PostgreSQL documentation to
find out whether the differences are actually significant. If you need help
interpreting the results, contact the pgsql-ports list at postgresql.org.
There are some tests that will almost always fail with RedHat Linux 5.x and 6.x
installations. The geometry, float8, and on occassion the random test will
fail. These failures are normal for RedHat 5.2 and 6.1. For RedHat 6.1 with
certain i18n settings, there will be other tests fail.
For 7.1RC1, all 76 tests passed on RedHat 6.2 and RedHat 7.0. This
was accomplished by fiddling with the locale settings. In version 7.1.2 this
capability was removed -- you need to set your locale to 'C' before executing
the first postmaster startup, or many more regression tests will fail.
For interpretation of the regression tests, see the PostgreSQL documentation.
After testing, say "make clean" to remove the files generated by the test
script.
STARTING POSTMASTER AUTOMATICALLY AT SYSTEM STARTUP
-------------------------------------------------------------------------------
RedHat Linux uses the System V Init package. A startup script for PostgreSQL
Red Hat Linux uses the System V Init package. A startup script for PostgreSQL
is provided in the server package, as /etc/rc.d/init.d/postgresql. To start
the postmaster, with sanity checking, as root, run
service postgresql start
to shut postmaster down,
service postgresql stop
There are other parameters to this script -- execute 'service postgresql' for a
listing.
service postgresql start
To shut the postmaster down,
service postgresql stop
There are other possible commands to this script -- execute
'service postgresql' for a listing.
To get this script to run at system startup or any time the system switches into
runlevels 3, 4, or 5, run:
chkconfig --add postgresql
chkconfig --level 345 postgresql on
and the proper symlinks will be created. Check the chkconfig man page for more
To get this script to run at system startup or any time the system switches
into runlevels 3, 4, or 5, run:
chkconfig --add postgresql
chkconfig --level 345 postgresql on
and the proper symlinks will be created. See the chkconfig man page for more
information. Note that this is manual -- while the startup script can include
tags to allow chkconfig to automatically perform the symlinking, this is not
done at this time.
SuSE has maintained their own RPMset for some time -- their documentation
supercedes any found in this file.
GRAND UNIFIED CONFIGURATION (GUC) FILE
-------------------------------------------------------------------------------
The PostgreSQL server has many tunable parameters -- the file
@ -262,19 +252,22 @@ whole system.
The RPM ships with the default file -- you will need to tune the
parameters for your installation. In particular, you might want to allow
TCP/IP socket connections -- in order to allow these, you will need to edit
the postgresql.conf file. The line in question contains the string
'tcpip_socket' --want to both uncomment the line and set the parameter to true
in order to get the TCP/IP socket to open.
nonlocal TCP/IP socket connections -- in order to allow these, you will need
to edit the postgresql.conf file. The line in question contains the string
'listen_addresses' -- you need to both uncomment the line and set the value
to '*' to get the postmaster to accept nonlocal connections. You'll also need
to adjust pg_hba.conf appropriately.
This is the same behavior the -i command line switch provides. It is
preferable to use the postgresql.conf file, however, as future versions
of the RPMset will allow multiple postmaster instances -- and that will only
be possible thanks to the decoupling of settings out to each datadir.
LOGGING SET UP
-------------------------------------------------------------------------------
By default, the postmaster's stderr log is directed into files placed in a
pg_log subdirectory of the data directory (ie, /var/lib/pgsql/data/pg_log).
The out-of-the-box configuration rotates among seven files, one for each
day of the week. You can adjust this by changing postgresql.conf settings.
REBUILDING FROM SOURCE RPM
-------------------------------------------------------------------------------
If your distribution is not supported by the binary RPM's from PostgreSQL.org,
If your distribution is not supported by the binary RPMs from PostgreSQL.org,
you will need to rebuild from the source RPM. Download the .src.rpm for this
release. You will need to be root to rebuild, unless you have already set up
a non-root build environment.
@ -291,7 +284,6 @@ build6x undef #don't build for Red Hat 6.x. Define it to cause
beta 0 #build with cassert and do not strip the binaries
perl 1 #build the postgresql-perl package.
tcl 1 #build the postgresql-tcl package.
tkpkg 1 #build the postgresql-tk package.
jdbc 1 #build the postgresql-jdbc package.
pls 1 #build the postgresql-pl package.
test 1 #build the postgresql-test package.
@ -302,13 +294,20 @@ ssl 1 #use OpenSSL support.
kerberos 1 #use Kerberos 5 support.
nls 1 #build with national language support.
pam 1 #build with PAM support.
runselftest 1 #do "make check" during the build.
To use these defines, invoke a rebuild like this:
rpm --rebuild --define 'perl 0' --define 'tcl 0' --define 'tkpkg 0'\
--define 'test 0' --define 'newintarray 1' --define 'kerberos 0' \
postgresql-7.1.3-1PGDG.src.rpm
This line would disable the perl, tcl, tk, and test subpackages, enable the
newer intarray code, and disable kerberos support.
rpm --rebuild --define 'perl 0' --define 'tcl 0' \
--define 'test 0' --define 'runselftest 1' --define 'kerberos 0' \
postgresql-8.0.0-1PGDG.src.rpm
This line would disable the perl, tcl, and test subpackages, enable the
regression test run during build, and disable kerberos support.
You might need to disable runselftest if there is an installed version of
PostgreSQL that is a different major version from what you are trying to
build. The self test tends to pick up the installed libpq.so shared library
in place of the one being built :-(, so if that isn't compatible the test will
fail. Also, you can't use runselftest when doing the build as root.
More of these conditionals will be added in the future.
@ -321,23 +320,6 @@ modules are in /usr/lib/pgsql for loadable modules, and binaries are in
/usr/bin. In the future these files may be split out, depending upon function
and dependencies.
LOGGING SET UP
-------------------------------------------------------------------------------
To get rollable syslog set up, see the documentation for the file
postgresql.conf, by default in the directory /var/lib/pgsql/data, as relates to
the syslog options. Then, add a line to /etc/syslog.conf, using the man page
for syslog.conf as a source. Example:
If postgresql.conf has the following lines for the syslog settings:
syslog = 1 # range 0-2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
Then you need to add the line to /etc/syslog.conf:
local0.* /var/log/postgresql
Then set up an entry in /etc/logrotate.d to roll postgresql the way you want it
rolled.
MORE INFORMATION
-------------------------------------------------------------------------------
You can get more information at http://www.postgresql.org
@ -351,4 +333,3 @@ SuSE information is available at SuSE's website and information contacts.
A 7.4 SuSE RPM is available on ftp.postgresql.org. It is different from this
RPM due to SuSE's different needs.
-----------------------------------------------------------------------------

View File

@ -1,5 +1,4 @@
[ -f /etc/profile ] && source /etc/profile
PGDATA=/var/lib/pgsql/data
[ -f $PGDATA/../initdb.i18n ] && source $PGDATA/../initdb.i18n
export PGDATA

32
postgresql-logging.patch Normal file
View File

@ -0,0 +1,32 @@
diff -Naur postgresql-8.0.0rc5.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-8.0.0rc5/src/backend/utils/misc/postgresql.conf.sample
--- postgresql-8.0.0rc5.orig/src/backend/utils/misc/postgresql.conf.sample 2004-11-05 14:16:16.000000000 -0500
+++ postgresql-8.0.0rc5/src/backend/utils/misc/postgresql.conf.sample 2005-01-11 19:18:21.282906899 -0500
@@ -177,22 +177,22 @@
# platform.
# This is relevant when logging to stderr:
-#redirect_stderr = false # Enable capturing of stderr into log files.
+redirect_stderr = true # Enable capturing of stderr into log files.
# These are only relevant if redirect_stderr is true:
-#log_directory = 'pg_log' # Directory where log files are written.
+log_directory = 'pg_log' # Directory where log files are written.
# May be specified 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.
# May include strftime() escapes
-#log_truncate_on_rotation = false # If true, any existing log file of the
+log_truncate_on_rotation = true # If true, 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 time-driven rotation,
# not on restarts or size-driven rotation.
# Default is false, meaning append to existing
# files in all cases.
-#log_rotation_age = 1440 # Automatic rotation of logfiles will happen after
+log_rotation_age = 1440 # Automatic rotation of logfiles will happen after
# so many minutes. 0 to disable.
-#log_rotation_size = 10240 # Automatic rotation of logfiles will happen after
+log_rotation_size = 0 # Automatic rotation of logfiles will happen after
# so many kilobytes of log output. 0 to disable.
# These are relevant when logging to syslog:

73
postgresql-test.patch Normal file
View File

@ -0,0 +1,73 @@
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 @@
testtablespace := $(abs_builddir)/testtablespace
+ifdef RPMTESTING
+define sed-command
+sed -e 's,@abs_srcdir@,$(libdir)/pgsql/test/regress,g' \
+ -e 's,@abs_builddir@,$(libdir)/pgsql/test/regress,g' \
+ -e 's,@abs_spidir@,$(libdir)/pgsql/test/regress,g' \
+ -e 's,@testtablespace@,$(libdir)/pgsql/test/regress/testtablespace,g' \
+ -e 's/@DLSUFFIX@/$(DLSUFFIX)/g' $< >$@
+endef
+else
define sed-command
sed -e 's,@abs_srcdir@,$(abs_srcdir),g' \
-e 's,@abs_builddir@,$(abs_builddir),g' \
+ -e 's,@abs_spidir@,$(abs_builddir)/../../../contrib/spi,g' \
-e 's,@testtablespace@,$(testtablespace),g' \
-e 's/@DLSUFFIX@/$(DLSUFFIX)/g' $< >$@
endef
+endif
$(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
@@ -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';
CREATE FUNCTION check_foreign_key ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
+ AS '@abs_spidir@/refint@DLSUFFIX@'
LANGUAGE 'C';
CREATE FUNCTION autoinc ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
+ AS '@abs_spidir@/autoinc@DLSUFFIX@'
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
@@ -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';
CREATE FUNCTION check_foreign_key ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
+ AS '@abs_spidir@/refint@DLSUFFIX@'
LANGUAGE 'C';
CREATE FUNCTION autoinc ()
RETURNS trigger
- AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
+ AS '@abs_spidir@/autoinc@DLSUFFIX@'
LANGUAGE 'C';
CREATE FUNCTION funny_dup17 ()
RETURNS trigger

View File

@ -63,7 +63,7 @@
# PGVERSION is:
PGVERSION=7.4
PGVERSION=8.0
# Source function library.
INITD=/etc/rc.d/init.d
@ -94,121 +94,125 @@ fi
# Set defaults for configuration variables
PGENGINE=/usr/bin
PGPORT=5432
export PGDATA=/var/lib/pgsql
if [ -f $PGDATA/PG_VERSION ] && [ -d $PGDATA/base/template1 ]
PGDATA=/var/lib/pgsql
if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base/template1" ]
then
echo "Using old-style directory structure"
else
export PGDATA=/var/lib/pgsql/data
PGDATA=/var/lib/pgsql/data
fi
PGLOG=/dev/null
PGLOG=/var/lib/pgsql/pgstartup.log
# Override defaults from /etc/sysconfig/pgsql if file is present
[ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}
export PGDATA
export PGPORT
export PGOPTS
# Check that networking is up.
# Pretty much need it for postmaster.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f $PGENGINE/postmaster ] || exit 0
[ -f "$PGENGINE/postmaster" ] || exit 1
script_result=0
start(){
PSQL_START=$"Starting ${NAME} service: "
# Make sure startup-time log file is valid
if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]
then
touch "$PGLOG" || exit 1
chown postgres:postgres "$PGLOG"
chmod go-rwx "$PGLOG"
[ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u -r object_r -t postgresql_log_t "$PGLOG"
fi
# Check for the PGDATA structure
if [ -f $PGDATA/PG_VERSION ] && [ -d $PGDATA/base ]
if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]
then
# Check version of existing PGDATA
if [ `cat $PGDATA/PG_VERSION` != "$PGVERSION" ]
if [ `cat "$PGDATA/PG_VERSION"` != "$PGVERSION" ]
then
SYSDOCDIR="(Your System's documentation directory)"
if [ -d /usr/doc/postgresql-$PGVERSION ]
if [ -d "/usr/doc/postgresql-$PGVERSION" ]
then
SYSDOCDIR=/usr/doc
fi
if [ -d /usr/share/doc/postgresql-$PGVERSION ]
if [ -d "/usr/share/doc/postgresql-$PGVERSION" ]
then
SYSDOCDIR=/usr/share/doc
fi
if [ -d /usr/doc/packages/postgresql-$PGVERSION ]
if [ -d "/usr/doc/packages/postgresql-$PGVERSION" ]
then
SYSDOCDIR=/usr/doc/packages
fi
if [ -d /usr/share/doc/packages/postgresql-$PGVERSION ]
if [ -d "/usr/share/doc/packages/postgresql-$PGVERSION" ]
then
SYSDOCDIR=/usr/share/doc/packages
fi
echo
echo $"An old version of the database format was found.\nYou need to upgrade the data format before using PostgreSQL.\nSee $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information."
exit 1
# This doesn't seem to do anything useful...
# else
# if echo "$TYPESET"|grep "declare -f success ()" >/dev/null
# then
# success "$PSQL_CHECK"
# else
# echo " [ OK ]"
# fi
# echo
fi
# No existing PGDATA! Initdb it.
else
echo -n $"Initializing database: "
if [ ! -e $PGDATA -a ! -h $PGDATA ]
echo -n $"Initializing database: "
if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]
then
mkdir -p $PGDATA || exit 1
chown postgres:postgres $PGDATA
chmod go-rwx $PGDATA
[ -x /sbin/restorecon ] && restorecon -R $PGDATA
mkdir -p "$PGDATA" || exit 1
chown postgres:postgres "$PGDATA"
chmod go-rwx "$PGDATA"
fi
# Make sure the locale from the initdb is preserved for later startups...
[ -f /etc/sysconfig/i18n ] && cp /etc/sysconfig/i18n $PGDATA/../initdb.i18n
# Just in case no locale was set, use en_US
[ ! -f /etc/sysconfig/i18n ] && echo "LANG=en_US" > $PGDATA/../initdb.i18n
# Is expanded this early to be used in the command $SU runs
echo "export LANG LC_ALL LC_CTYPE LC_COLLATE LC_NUMERIC LC_CTYPE LC_TIME" >> $PGDATA/../initdb.i18n
# Clean up SELinux tagging for PGDATA
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
# Initialize the database
$SU -l postgres -c "$PGENGINE/initdb --pgdata=$PGDATA" >> $PGLOG 2>&1 < /dev/null
[ -f $PGDATA/PG_VERSION ] && echo_success
[ ! -f $PGDATA/PG_VERSION ] && echo_failure
$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
fi
echo -n "$PSQL_START"
$SU -l postgres -c "$PGENGINE/postmaster -p ${PGPORT} -D '${PGDATA}' ${PGOPTS} &" >> $PGLOG 2>&1 < /dev/null
sleep 1
pid=`pidof -s $PGENGINE/postmaster`
if [ $pid ] && [ -f "${PGDATA}/postmaster.pid" ]
$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" ]
then
success "$PSQL_START"
touch /var/lock/subsys/${NAME}
head -n 1 "${PGDATA}/postmaster.pid" > /var/run/postmaster.${PGPORT}.pid
head -n 1 "$PGDATA/postmaster.pid" > "/var/run/postmaster.${PGPORT}.pid"
echo
else
failure "$PSQL_START"
echo
script_result=1
fi
}
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
$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
echo_failure
script_result=1
fi
echo
rm -f /var/run/postmaster.${PGPORT}.pid
rm -f /var/lock/subsys/${NAME}
rm -f "/var/run/postmaster.${PGPORT}.pid"
rm -f "/var/lock/subsys/${NAME}"
}
restart(){
@ -225,7 +229,7 @@ condstop(){
}
reload(){
$SU -l postgres -c "$PGENGINE/pg_ctl reload -D '${PGDATA}' -s" > /dev/null 2>&1 < /dev/null
$SU -l postgres -c "$PGENGINE/pg_ctl reload -D '$PGDATA' -s" > /dev/null 2>&1 < /dev/null
}
# This script is slightly unusual in that the name of the daemon (postmaster)
@ -241,6 +245,7 @@ case "$1" in
;;
status)
status postmaster
script_result=$?
;;
restart)
restart
@ -259,4 +264,4 @@ case "$1" in
exit 1
esac
exit 0
exit $script_result

View File

@ -10,14 +10,11 @@
#build7x, build8, and build9 similar
%{?build8:%define build89 1}
%{?build9:%define build89 1}
%{?build7x:%define kerbdir /usr/kerberos}
%{?build7x:%define tcldevel 0}
%{?build89:%define kerbdir /usr/kerberos}
%{?build8:%define tcldevel 0}
%{?build7x:%define aconfver autoconf-2.53}
%{!?tcldevel:%define tcldevel 1}
%{!?kerbdir:%define kerbdir /usr}
%{!?aconfver:%define aconfver autoconf}
%define beta 0
@ -25,7 +22,6 @@
%{?beta:%define __os_install_post /usr/lib/rpm/brp-compress}
%{!?tcl:%define tcl 1}
%{!?tkpkg:%define tkpkg 0}
%{!?jdbc:%define jdbc 1}
%{!?test:%define test 1}
%{!?python:%define python 1}
@ -37,6 +33,7 @@
%{!?nls:%define nls 1}
%{!?pam:%define pam 1}
%{!?pgfts:%define pgfts 1}
%{!?runselftest:%define runselftest 1}
# Python major version.
%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
@ -45,7 +42,7 @@
Summary: PostgreSQL client programs and libraries.
Name: postgresql
Version: 7.4.6
Version: 8.0.0
# Conventions for PostgreSQL Global Development Group RPM releases:
@ -67,42 +64,37 @@ Version: 7.4.6
# Pre-release RPM's should not be put up on the public ftp.postgresql.org server
# -- only test releases or full releases should be.
Release: 5
Release: 1
License: BSD
Group: Applications/Databases
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
Source3: postgresql.init
Source5: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.md5
Source4: Makefile.regress
Source6: README.rpm-dist
Source8: http://jdbc.postgresql.org/download/pg74.215.jdbc1.jar
Source9: http://jdbc.postgresql.org/download/pg74.215.jdbc2.jar
Source10: http://jdbc.postgresql.org/download/pg74.215.jdbc2ee.jar
Source11: http://jdbc.postgresql.org/download/pg74.215.jdbc3.jar
Source8: http://jdbc.postgresql.org/download/postgresql-8.0.309.jdbc2.jar
Source9: http://jdbc.postgresql.org/download/postgresql-8.0.309.jdbc2ee.jar
Source10: http://jdbc.postgresql.org/download/postgresql-8.0.309.jdbc3.jar
Source15: postgresql-bashprofile
Source16: filter-requires-perl-Pg.sh
Source18: ftp://ftp.druid.net/pub/distrib/PyGreSQL-3.6.tgz
Patch1: rpm-pgsql-7.4.patch
Patch2: rpm-multilib-%{version}.patch
Patch3: postgresql-7.4-tighten.patch
Patch4: postgresql-7.4-getppid.patch
Patch5: postgresql-plperl.patch
Patch6: postgresql-7.4-src-tutorial.patch
Patch7: postgresql-7.3.4-s390-pic.patch
Patch8: postgresql-7.4-com_err.patch
Source17: postgresql-8.0-US.pdf
Source18: ftp://ftp.druid.net/pub/distrib/PyGreSQL-3.6.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
Buildrequires: perl glibc-devel bison flex
Prereq: /sbin/ldconfig initscripts
%if %python
BuildPrereq: python-devel
%endif
%if %tcl
%if %tcl || %pltcl
BuildPrereq: tcl
%if %tcldevel
Buildrequires: tcl-devel
%endif
%endif
%if %tkpkg
BuildPrereq: tk
%endif
BuildPrereq: readline-devel
BuildPrereq: zlib-devel >= 1.0.4
%if %ssl
@ -205,7 +197,7 @@ PostgreSQL server.
Summary: The programs needed to create and run a PostgreSQL server.
Group: Applications/Databases
Prereq: /usr/sbin/useradd /sbin/chkconfig
Requires: postgresql = %{version} libpq.so
Prereq: postgresql = %{version} libpq.so
Conflicts: postgresql < 7.4
%description server
@ -223,16 +215,16 @@ to install the postgresql package.
%package docs
Summary: Extra documentation for PostgreSQL
Group: Applications/Databases
Prereq: postgresql = %{version}
%description docs
The postgresql-docs package includes the SGML source for the documentation
as well as the documentation in PDF format and some extra documentation.
Install this package if you want to help with the PostgreSQL documentation
project, or if you want to generate printed documentation.
The postgresql-docs package includes some additional documentation for
PostgreSQL. Currently, this includes the main documentation in PDF format,
the FAQ, and source files for the PostgreSQL tutorial.
%package contrib
Summary: Contributed source and binaries distributed with PostgreSQL
Group: Applications/Databases
Requires: postgresql = %{version}
Prereq: postgresql = %{version}
%description contrib
The postgresql-contrib package contains contributed packages that are
included in the PostgreSQL distribution.
@ -241,6 +233,7 @@ included in the PostgreSQL distribution.
%package devel
Summary: PostgreSQL development header files and libraries.
Group: Development/Libraries
Prereq: postgresql = %{version}
Requires: postgresql-libs = %{version}
%description devel
@ -257,7 +250,7 @@ package.
%package pl
Summary: The PL procedural languages for PostgreSQL.
Group: Applications/Databases
Requires: postgresql = %{version}
PreReq: postgresql = %{version}
PreReq: postgresql-server = %{version}
%description pl
@ -271,12 +264,13 @@ procedural languages for the backend. PL/Pgsql is part of the core server packa
%package tcl
Summary: A Tcl client library for PostgreSQL.
Group: Applications/Databases
Requires: tcl >= 8.0
Requires: libpq.so
Requires: tcl >= 8.3
%description tcl
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-tcl package contains the libpgtcl client library,
the pg-enhanced pgtclsh,and the pg-enhanced tksh, if so configured at buildtime.
system. The postgresql-tcl package contains the Pgtcl client library
and its documentation.
%endif
#------------
@ -284,10 +278,10 @@ the pg-enhanced pgtclsh,and the pg-enhanced tksh, if so configured at buildtime.
%package python
Summary: Development module for Python code to access a PostgreSQL DB.
Group: Applications/Databases
Requires: libpq.so
Requires: python mx
Conflicts: python < %pyver, python >= %pynextver
%description python
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-python package includes a module for
@ -303,7 +297,7 @@ Group: Applications/Databases
%description jdbc
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-jdbc package includes the .jar file needed for
system. The postgresql-jdbc package includes the .jar files needed for
Java programs to access a PostgreSQL database.
%endif
@ -312,7 +306,7 @@ Java programs to access a PostgreSQL database.
%package test
Summary: The test suite distributed with PostgreSQL.
Group: Applications/Databases
Requires: postgresql = %{version}
PreReq: postgresql = %{version}
PreReq: postgresql-server = %{version}
%description test
@ -333,10 +327,6 @@ popd
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
#call autoconf 2.53 or greater
%aconfver
@ -346,8 +336,7 @@ tar -zcf postgres.tar.gz *.html stylesheet.css
rm -f *.html stylesheet.css
popd
#cp -p %{SOURCE17} .
#tar zxf %{SOURCE17}
cp -p %{SOURCE17} .
%if %python
tar xzf %{SOURCE18}
@ -360,19 +349,23 @@ popd
chmod 755 PyGreSQL/tutorial/advanced.py PyGreSQL/tutorial/basics.py
%endif
%if %tcl
tar xzf %{SOURCE19}
PGTCLDIR=`basename %{SOURCE19} .tar.gz`
mv $PGTCLDIR Pgtcl
unzip %{SOURCE20}
PGTCLDOCDIR=`basename %{SOURCE20} .zip`
mv $PGTCLDOCDIR Pgtcl-docs
%endif
%build
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
%if %kerberos
CPPFLAGS="${CPPFLAGS} -I%{_includedir}/et" ; export CPPFLAGS
CFLAGS="${CFLAGS} -I%{_includedir}/et" ; export CFLAGS
%endif
# Strip out -ffast-math from CFLAGS....
CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
export LIBNAME=%{_lib}
%configure --disable-rpath \
%if %beta
--enable-debug \
@ -381,15 +374,10 @@ export LIBNAME=%{_lib}
%if %plperl
--with-perl \
%endif
%if %tcl
%if %pltcl
--with-tcl \
--with-tclconfig=%{_libdir} \
%endif
%if %tkpkg
--with-tkconfig=%{_libdir} \
%else
--without-tk \
%endif
%if %python
--with-python \
%endif
@ -400,7 +388,7 @@ export LIBNAME=%{_lib}
--with-pam \
%endif
%if %kerberos
--with-krb5=%kerbdir \
--with-krb5 \
%endif
%if %nls
--enable-nls \
@ -415,9 +403,22 @@ export LIBNAME=%{_lib}
make %{?_smp_mflags} all
make %{?_smp_mflags} -C contrib all
%if %test
pushd src/test
# Have to hack makefile to put correct path into tutorial scripts
sed "s|C=\`pwd\`;|C=%{_libdir}/pgsql/tutorial;|" < src/tutorial/Makefile > src/tutorial/GNUmakefile
make %{?_smp_mflags} -C src/tutorial NO_PGXS=1 all
rm -f src/tutorial/GNUmakefile
%if %runselftest
pushd src/test/regress
make all
make MAX_CONNECTIONS=5 check
make clean
popd
%endif
%if %test
pushd src/test/regress
make RPMTESTING=1 all
popd
%endif
@ -429,23 +430,32 @@ make %{?_smp_mflags} -C contrib all
pushd PyGreSQL
gcc $CFLAGS -fpic -shared -o _pgmodule.so ${python_includespec} -I../src/interfaces/libpq -I../src/include -I%{kerbdir}/include -L../src/interfaces/libpq -lpq pgmodule.c
gcc $CFLAGS -fpic -shared -o _pgmodule.so ${python_includespec} -I../src/interfaces/libpq -I../src/include -L../src/interfaces/libpq -lpq pgmodule.c
popd
%endif
%if %tcl
pushd Pgtcl
# pgtcl's configure only handles one include directory :-(
./configure --prefix=/usr \
--libdir=%{_libdir} \
--with-tcl=%{_libdir} \
--with-postgres-include="../src/interfaces/libpq -I../src/include" \
--with-postgres-lib=../src/interfaces/libpq
# note: as of pgtcl 1.5.2, its makefile is not parallel-safe
make all
popd
%endif
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
make -C contrib DESTDIR=$RPM_BUILD_ROOT install
# install dev headers.
make DESTDIR=$RPM_BUILD_ROOT install-all-headers
# copy over Makefile.global to the include dir....
install -m 644 src/Makefile.global $RPM_BUILD_ROOT/usr/include/pgsql
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
cp src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
%if %jdbc
# Java/JDBC
@ -456,8 +466,12 @@ install -m 644 src/Makefile.global $RPM_BUILD_ROOT/usr/include/pgsql
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
install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/usr/share/java
%endif
%if %tcl
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/Pgtcl
cp Pgtcl/pkgIndex.tcl $RPM_BUILD_ROOT%{_libdir}/Pgtcl
cp Pgtcl/libpgtcl*.so $RPM_BUILD_ROOT%{_libdir}/Pgtcl
%endif
if [ -d /etc/rc.d/init.d ]
@ -469,7 +483,7 @@ fi
# Remove stuff we don't want to ship.
rm -f $RPM_BUILD_ROOT%{_bindir}/findoidjoins
rm -f $RPM_BUILD_ROOT%{_bindir}/make_oidjoins_check
rm -f $RPM_BUILD_ROOT%{_docdir}/postgresql/contrib/README.findoidjoins
rm -f $RPM_BUILD_ROOT%{_docdir}/pgsql/contrib/README.findoidjoins
rm -f contrib/findoidjoins/README.findoidjoins
# PGDATA needs removal of group and world permissions due to pg_pwd hole.
@ -486,26 +500,26 @@ install -d -m 700 $RPM_BUILD_ROOT/etc/sysconfig/pgsql
%if %test
# tests. There are many files included here that are unnecessary, but include
# them anyway for completeness.
mkdir -p $RPM_BUILD_ROOT/usr/lib/pgsql/test
cp -a src/test/regress $RPM_BUILD_ROOT/usr/lib/pgsql/test
install -m 0755 contrib/spi/refint.so $RPM_BUILD_ROOT/usr/lib/pgsql/test/regress
install -m 0755 contrib/spi/autoinc.so $RPM_BUILD_ROOT/usr/lib/pgsql/test/regress
pushd $RPM_BUILD_ROOT/usr/lib/pgsql/test/regress/
# tests. There are many files included here that are unnecessary,
# but include them anyway for completeness. We replace the original
# Makefiles, however.
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pgsql/test
cp -a src/test/regress $RPM_BUILD_ROOT%{_libdir}/pgsql/test
install -m 0755 contrib/spi/refint.so $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress
install -m 0755 contrib/spi/autoinc.so $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress
pushd $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/
strip *.so
rm -f GNUmakefile Makefile
popd
cp %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/Makefile
chmod 0644 $RPM_BUILD_ROOT%{_libdir}/pgsql/test/regress/Makefile
%endif
# Fix some more documentation
# gzip doc/internals.ps
cp %{SOURCE6} README.rpm-dist
mv $RPM_BUILD_ROOT%{_docdir}/postgresql/html doc
rm -rf $RPM_BUILD_ROOT%{_docdir}/postgresql
%if %tkpkg
%else
rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/pgtksh.*
%endif
mv $RPM_BUILD_ROOT%{_docdir}/pgsql/html doc
rm -rf $RPM_BUILD_ROOT%{_docdir}/pgsql
%if %python
pushd PyGreSQL
@ -517,6 +531,9 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/pgtksh.*
%endif
%find_lang libpq
%find_lang initdb
%find_lang pg_config
%find_lang pg_ctl
%find_lang pg_dump
%find_lang postgres
%find_lang psql
@ -525,7 +542,8 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/pgtksh.*
%find_lang pgscripts
cat libpq.lang > libpq.lst
cat psql.lang pg_dump.lang pgscripts.lang > main.lst
cat pg_config.lang > pg_config.lst
cat initdb.lang pg_ctl.lang psql.lang pg_dump.lang pgscripts.lang > main.lst
cat postgres.lang pg_resetxlog.lang pg_controldata.lang > server.lst
%post libs -p /sbin/ldconfig
@ -535,9 +553,6 @@ cat postgres.lang pg_resetxlog.lang pg_controldata.lang > server.lst
groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
useradd -M -n -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
touch /var/log/pgsql
chown postgres:postgres /var/log/pgsql
chmod 0700 /var/log/pgsql
%post server
chkconfig --add postgresql
@ -556,11 +571,6 @@ if [ $1 = 0 ] ; then
groupdel postgres >/dev/null 2>&1 || :
fi
%if %tcl
%post -p /sbin/ldconfig tcl
%postun -p /sbin/ldconfig tcl
%endif
%if %pls
%post -p /sbin/ldconfig pl
%postun -p /sbin/ldconfig pl
@ -591,8 +601,6 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/dropuser
%{_bindir}/pg_dump
%{_bindir}/pg_dumpall
%{_bindir}/pg_encoding
%{_bindir}/pg_id
%{_bindir}/pg_restore
%{_bindir}/psql
%{_bindir}/vacuumdb
@ -613,9 +621,9 @@ rm -rf $RPM_BUILD_ROOT
%files docs
%defattr(-,root,root)
%doc doc/src/*
#doc *-US.pdf
%doc src/tutorial
%doc doc/src/FAQ
%doc *-US.pdf
%{_libdir}/pgsql/tutorial/
%files contrib
%defattr(-,root,root)
@ -640,8 +648,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pgsql/pending.so
%{_libdir}/pgsql/pgcrypto.so
%{_libdir}/pgsql/pgstattuple.so
%{_libdir}/pgsql/pg_trgm.so
%{_libdir}/pgsql/refint.so
%{_libdir}/pgsql/rserv.so
%{_libdir}/pgsql/rtree_gist.so
%{_libdir}/pgsql/seg.so
%{_libdir}/pgsql/string_io.so
@ -651,24 +659,15 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pgsql/tsearch2.so
%{_libdir}/pgsql/user_locks.so
%{_datadir}/pgsql/contrib/
%{_bindir}/DBMirror.pl
%{_bindir}/clean_pending.pl
%{_bindir}/my2pg.pl
%{_bindir}/mysql2pgsql
%{_bindir}/dbf2pg
%{_bindir}/fti.pl
%{_bindir}/oid2name
%{_bindir}/pg_dumplo
%{_bindir}/pg_logger
%{_bindir}/pgbench
%{_bindir}/RservTest
%{_bindir}/MasterInit
%{_bindir}/MasterAddTable
%{_bindir}/Replicate
%{_bindir}/MasterSync
%{_bindir}/CleanLog
%{_bindir}/SlaveInit
%{_bindir}/SlaveAddTable
%{_bindir}/GetSyncID
%{_bindir}/PrepareSnapshot
%{_bindir}/ApplySnapshot
%{_bindir}/InitRservTest
%{_bindir}/vacuumlo
%{_bindir}/pg_autovacuum
%doc contrib/*/README.* contrib/spi/*.example
@ -685,7 +684,6 @@ rm -rf $RPM_BUILD_ROOT
/etc/rc.d/init.d/postgresql
%attr (755,root,root) %dir /etc/sysconfig/pgsql
%{_bindir}/initdb
%{_bindir}/initlocation
%{_bindir}/ipcclean
%{_bindir}/pg_controldata
%{_bindir}/pg_ctl
@ -693,7 +691,6 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/postgres
%{_bindir}/postmaster
%{_mandir}/man1/initdb.*
%{_mandir}/man1/initlocation.*
%{_mandir}/man1/ipcclean.*
%{_mandir}/man1/pg_controldata.*
%{_mandir}/man1/pg_ctl.*
@ -702,7 +699,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/postmaster.*
%{_datadir}/pgsql/postgres.bki
%{_datadir}/pgsql/postgres.description
%{_datadir}/pgsql/system_views.sql
%{_datadir}/pgsql/*.sample
%{_datadir}/pgsql/timezone/
%{_libdir}/pgsql/plpgsql.so
%dir %{_datadir}/pgsql
%attr(700,postgres,postgres) %dir /var/lib/pgsql
@ -714,7 +713,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/pgsql/information_schema.sql
%{_datadir}/pgsql/sql_features.txt
%files devel
%files devel -f pg_config.lst
%defattr(-,root,root)
/usr/include/*
%{_bindir}/ecpg
@ -723,28 +722,20 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libecpg.so
%{_libdir}/libpq.a
%{_libdir}/libecpg.a
%if %tcl
%{_libdir}/libpgtcl.a
%endif
%{_libdir}/libecpg_compat.so
%{_libdir}/libecpg_compat.a
%{_libdir}/libpgport.a
%{_libdir}/libpgtypes.so
%{_libdir}/libpgtypes.a
%{_libdir}/pgsql/pgxs/
%{_mandir}/man1/ecpg.*
%{_mandir}/man1/pg_config.*
%if %tcl
%files tcl
%defattr(-,root,root)
%attr(755,root,root) %{_libdir}/libpgtcl.so.*
# libpgtcl.so is not in devel because Tcl scripts may load it by that name.
%{_libdir}/libpgtcl.so
%{_bindir}/pgtclsh
%{_mandir}/man1/pgtclsh.*
%if %tkpkg
%{_bindir}/pgtksh
%{_mandir}/man1/pgtksh.*
%endif
%{_libdir}/Pgtcl/
%doc Pgtcl-docs/*
%endif
%if %pls
@ -776,20 +767,31 @@ rm -rf $RPM_BUILD_ROOT
%if %jdbc
%files jdbc
%defattr(-,root,root)
%{_datadir}/java/pg74.215.jdbc1.jar
%{_datadir}/java/pg74.215.jdbc2.jar
%{_datadir}/java/pg74.215.jdbc2ee.jar
%{_datadir}/java/pg74.215.jdbc3.jar
%{_datadir}/java/*
%endif
%if %test
%files test
%defattr(-,postgres,postgres)
%attr(-,postgres,postgres) /usr/lib/pgsql/test/*
%attr(-,postgres,postgres) %dir /usr/lib/pgsql/test
%attr(-,postgres,postgres) %{_libdir}/pgsql/test/*
%attr(-,postgres,postgres) %dir %{_libdir}/pgsql/test
%endif
%changelog
* Wed Jan 19 2005 Tom Lane <tgl@redhat.com> 8.0.0-1
- Update to PostgreSQL 8.0.0, PyGreSQL 3.6.1, pgtcl 1.5.2,
and jdbc driver build 309.
- Extensive cleanout of obsolete cruft in patch set.
- Regression tests are run during RPM build (NOTE: cannot build as root when
this is enabled).
- Postmaster stderr goes someplace useful, not /dev/null (bz#76503, #103767)
- Make init script return a useful exit status (bz#80782)
- Move docs' tutorial directory to %%{_libdir}/pgsql/tutorial, since it
includes .so files that surely do not belong under /usr/share.
- Remove useless .sgml files from docs RPM (bz#134450)
- Put regression tests under /usr/lib64 on 64-bit archs, since .so files
are not architecture-independent.
* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> 7.4.6-5
- Rebuilt for new readline.

64
rpm-pgsql.patch Normal file
View File

@ -0,0 +1,64 @@
diff -Naur postgresql-8.0.0rc5.orig/src/Makefile.global.in postgresql-8.0.0rc5/src/Makefile.global.in
--- postgresql-8.0.0rc5.orig/src/Makefile.global.in 2004-12-18 21:16:18.000000000 -0500
+++ postgresql-8.0.0rc5/src/Makefile.global.in 2005-01-11 16:06:30.570550658 -0500
@@ -53,7 +53,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.
prefix := @prefix@
@@ -65,21 +65,21 @@
libexecdir := @libexecdir@
ifeq "$(findstring pgsql, $(libexecdir))" ""
ifeq "$(findstring postgres, $(libexecdir))" ""
-override libexecdir := $(libexecdir)/postgresql
+override libexecdir := $(libexecdir)/pgsql
endif
endif
datadir := @datadir@
ifeq "$(findstring pgsql, $(datadir))" ""
ifeq "$(findstring postgres, $(datadir))" ""
-override datadir := $(datadir)/postgresql
+override datadir := $(datadir)/pgsql
endif
endif
sysconfdir := @sysconfdir@
ifeq "$(findstring pgsql, $(sysconfdir))" ""
ifeq "$(findstring postgres, $(sysconfdir))" ""
-override sysconfdir := $(sysconfdir)/postgresql
+override sysconfdir := $(sysconfdir)/pgsql
endif
endif
@@ -87,7 +87,7 @@
pkglibdir = $(libdir)
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
-override pkglibdir := $(pkglibdir)/postgresql
+override pkglibdir := $(pkglibdir)/pgsql
endif
endif
@@ -95,7 +95,7 @@
pkgincludedir = $(includedir)
ifeq "$(findstring pgsql, $(pkgincludedir))" ""
ifeq "$(findstring postgres, $(pkgincludedir))" ""
-override pkgincludedir := $(pkgincludedir)/postgresql
+override pkgincludedir := $(pkgincludedir)/pgsql
endif
endif
includedir_server = $(pkgincludedir)/server
@@ -109,7 +109,7 @@
ifneq (,$(docdir))
ifeq "$(findstring pgsql, $(docdir))" ""
ifeq "$(findstring postgres, $(docdir))" ""
-override docdir := $(docdir)/postgresql
+override docdir := $(docdir)/pgsql
endif
endif
endif

10
sources
View File

@ -1,2 +1,8 @@
f0ea2b372a7bdaf2613e92176ebf5e0f postgresql-7.4.6.tar.bz2
3857df12291f7fad3cce553f05d97f4a PyGreSQL-3.6.tgz
3fe6bb504a6457daa80bc32daf10122e postgresql-8.0.0.tar.bz2
057c2d93f333ff2ed2177a8b87e19c0c PyGreSQL-3.6.1.tgz
d19dfdcb54c334495d32456a043e0232 pgtcl1.5.2.tar.gz
3d504b46231914d61fd49175f67e8715 pgtcldocs-20041108.zip
35ecfedea6bfb21eca15c85da6f062e9 postgresql-8.0.309.jdbc2.jar
0c565f0fce11c55242467aade130f86c postgresql-8.0.309.jdbc2ee.jar
04fb5bd60b3caddbf9322d6a9398f108 postgresql-8.0.309.jdbc3.jar
2edd229aa83105175a1212a001dd030a postgresql-8.0-US.pdf