From 76c9304cd11ae592173474b3272501896911ad2e8e0aa5176afbdf7fc393d27c Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Wed, 8 Dec 2010 13:01:31 +0000 Subject: [PATCH 1/6] Version 8.4.5 and init script fix OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=41 --- postgresql-8.4.4.tar.bz2 | 3 - postgresql-8.4.5.tar.bz2 | 3 + postgresql-init | 50 +++++--------- postgresql-perl-return.patch | 10 ++- postgresql-pl.spec | 8 +-- postgresql.changes | 126 +++++++++++++++++++++++++++++++++++ postgresql.spec | 6 +- 7 files changed, 157 insertions(+), 49 deletions(-) delete mode 100644 postgresql-8.4.4.tar.bz2 create mode 100644 postgresql-8.4.5.tar.bz2 diff --git a/postgresql-8.4.4.tar.bz2 b/postgresql-8.4.4.tar.bz2 deleted file mode 100644 index ea370f7..0000000 --- a/postgresql-8.4.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e66b398d565f7fb16d8ae58ae72881dcd3dbb1b88f532bbe1c2d1284812be37e -size 13853838 diff --git a/postgresql-8.4.5.tar.bz2 b/postgresql-8.4.5.tar.bz2 new file mode 100644 index 0000000..a66aa62 --- /dev/null +++ b/postgresql-8.4.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:300022ae2d998a0291a1e91978c48468fdc9c389afca05d6e5f18209ff5732bf +size 14114152 diff --git a/postgresql-init b/postgresql-init index 085303f..8c3b99b 100644 --- a/postgresql-init +++ b/postgresql-init @@ -56,30 +56,6 @@ H=/usr/bin/postmaster test -x $H || exit 5 PIDFILE=$DATADIR/postmaster.pid -if [ -r $DATADIR/PG_VERSION ] ; then - BIN_VERSION=$($H --version|sed 's/.* \([0-9]\+\.[0-9]\+\).*/\1/') - DATA_VERSION=$(cat $DATADIR/PG_VERSION) - if [ "$BIN_VERSION" != "$DATA_VERSION" ]; then - for libdir in /usr/lib64 /usr/lib; do - H=$libdir/postgresql/backup/$DATA_VERSION/postmaster - test -x $H && break - done - if test -x $H; then - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$libdir/postgresql/backup" - echo " Your databases are still using the format of PostgreSQL $DATA_VERSION." - echo " Therefore a backup of the old PostgreSQL server program will be used" - echo " until you have saved and removed your old database files" - echo " See also /usr/share/doc/packages/postgresql/README.SuSE.{de,en} ." - else - echo " Your databases are still using the format of PostgreSQL $DATA_VERSION," - echo " but no backup of the old PostgreSQL server program was found." - echo " See /usr/share/doc/packages/postgresql/README.SuSE.{en,de}" - echo " for details on updating PostgeSQL." - exit 5 - fi - fi -fi - # The echo return value for success (defined in /etc/rc.config). rc_reset @@ -121,23 +97,23 @@ case "$1" in } fi echo -n "Starting PostgreSQL" - ## remove old socket, if it exists and no daemon is running. + ## remove old socket and pidfile, if they exist + ## and no daemon is running. checkproc -p $PIDFILE $H || { rm -f /tmp/.s.PGSQL.* $PIDFILE } - - ## Start daemon with startproc(8). If this fails - ## the echo return value is set appropriate. pg_ctl start -s -w -p $H -D $DATADIR -o "\"$OPTIONS\"" rc_status -v ;; stop) echo -n "Shutting down PostgreSQL" - ## Stop daemon with killproc(8) and if this fails - ## set the echo return value. - - pg_ctl stop -s -D $DATADIR -m fast + if pg_ctl status -s -D $DATADIR >/dev/null + then + pg_ctl stop -s -D $DATADIR -m fast + else + rc_failed 0 + fi rc_status -v ;; @@ -174,7 +150,15 @@ case "$1" in # 3 - service not running # NOTE: checkproc returns LSB compliant status values. - checkproc -p $PIDFILE $H + pg_ctl status -s -D $DATADIR >/dev/null + if ! pg_ctl status -s -D $DATADIR >/dev/null + then + if test -f $DATADIR/postmaster.pid; then + rc_failed 1 + else + rc_failed 3 + fi + fi rc_status -v ;; diff --git a/postgresql-perl-return.patch b/postgresql-perl-return.patch index 0bd63cc..a8d24e7 100644 --- a/postgresql-perl-return.patch +++ b/postgresql-perl-return.patch @@ -1,12 +1,10 @@ -Index: postgresql-8.4.4/src/pl/plperl/plperl.c -=================================================================== ---- postgresql-8.4.4.orig/src/pl/plperl/plperl.c 2010-05-13 18:40:36.000000000 +0200 -+++ postgresql-8.4.4/src/pl/plperl/plperl.c 2010-06-18 10:18:15.758499052 +0200 -@@ -535,6 +535,7 @@ pp_require_safe(pTHX) +--- src/pl/plperl/plperl.c ++++ src/pl/plperl/plperl.c +@@ -641,6 +641,7 @@ RETPUSHYES; DIE(aTHX_ "Unable to load %s into plperl", name); + return 0; } - + /* diff --git a/postgresql-pl.spec b/postgresql-pl.spec index 953e1ac..82f4056 100644 --- a/postgresql-pl.spec +++ b/postgresql-pl.spec @@ -1,5 +1,5 @@ # -# spec file for package postgresql-pl (Version 8.4.4) +# spec file for package postgresql-pl (Version 8.4.5) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -26,8 +26,8 @@ BuildRequires: krb5-devel libxslt-devel %endif BuildRequires: python-devel tcl-devel Summary: The PL/Tcl, PL/Perl, and PL/Python Procedural Languages for PostgreSQL -Version: 8.4.4 -Release: 2 +Version: 8.4.5 +Release: 0. %define pg_minor_version %(echo %version | cut -f1-2 -d.) License: BSD3c(or similar) Group: Productivity/Databases/Servers @@ -115,7 +115,7 @@ and triggers. # in the postgresql source RPM. %setup -q -n postgresql-%{version} %patch0 -%patch1 -p1 +%patch1 %build export CFLAGS="%optflags $SP" diff --git a/postgresql.changes b/postgresql.changes index a8776af..72c500b 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,129 @@ +------------------------------------------------------------------- +Wed Dec 8 13:00:12 UTC 2010 - max@novell.com + +- Fix LSB conformance of the init script (bnc#658014). + +------------------------------------------------------------------- +Thu Oct 7 17:34:57 CEST 2010 - max@suse.de + +- Security and bugfix release 8.4.5 (bnc#643771): + + * Use a separate interpreter for each calling SQL userid in + PL/Perl and PL/Tcl (CVE-2010-3433). + + * Prevent possible crashes in pg_get_expr() by disallowing it + from being called with an argument that is not one of the + system catalog columns it's intended to be used with. + + * Fix incorrect placement of placeholder evaluation. + + * Fix possible duplicate scans of UNION ALL member relations. + + * Fix "cannot handle unplanned sub-select" error. + + * Fix mishandling of whole-row Vars that reference a view or + sub-select and appear within a nested sub-select. + + * Fix mishandling of cross-type IN comparisons. + + * Fix computation of ANALYZE statistics for tsvector columns. + + * Improve planner's estimate of memory used by array_agg(), + string_agg(), and similar aggregate functions. + + * Fix failure to mark cached plans as transient. + + * Reduce PANIC to ERROR in some occasionally-reported btree + failure cases, and provide additional detail in the resulting + error messages. + + * Fix incorrect search logic for partial-match queries with GIN + indexes. + + * Prevent show_session_authorization() from crashing within + autovacuum processes. + + * Defend against functions returning setof record where not all + the returned rows are actually of the same rowtype. + + * Fix possible corruption of pending trigger event lists during + subtransaction rollback. + + * Fix possible failure when hashing a pass-by-reference function + result. + + * Improve merge join's handling of NULLs in the join columns. + + * Take care to fsync the contents of lockfiles (both + postmaster.pid and the socket lockfile) while writing them. + + * Avoid recursion while assigning XIDs to heavily-nested + subtransactions. + + * Avoid holding open old WAL segments in the walwriter process. + + * Fix log_line_prefix's %i escape, which could produce junk + early in backend startup. + + * Prevent misinterpretation of partially-specified relation + options for TOAST tables. + + * Fix inheritance count tracking in ALTER TABLE ... ADD + CONSTRAINT. + + * Fix possible data corruption in ALTER TABLE ... SET TABLESPACE + when archiving is enabled. + + * Allow CREATE DATABASE and ALTER DATABASE ... SET TABLESPACE to + be interrupted by query-cancel. + + * Improve CREATE INDEX's checking of whether proposed index + expressions are immutable. + + * Fix REASSIGN OWNED to handle operator classes and families. + + * Fix possible core dump when comparing two empty tsquery values. + + * Fix LIKE's handling of patterns containing % followed by _ + + * Re-allow input of Julian dates prior to 0001-01-01 AD. + + * Fix PL/pgSQL to throw an error, not crash, if a cursor is + closed within a FOR loop that is iterating over that cursor. + + * In PL/Python, defend against null pointer results from + PyCObject_AsVoidPtr and PyCObject_FromVoidPtr + + * In libpq, fix full SSL certificate verification for the case + where both host and hostaddr are specified. + + * Make psql recognize DISCARD ALL as a command that should not + be encased in a transaction block in autocommit-off mode. + + * Fix some issues in pg_dump's handling of SQL/MED objects. + + * Improve pg_dump and pg_restore's handling of non-seekable + archive files. This is important for proper functioning of + parallel restore. + + * Improve parallel pg_restore's ability to cope with selective + restore (-L option). + + * Fix ecpg to process data from RETURNING clauses correctly. + + * Fix some memory leaks in ecpg. + + * Improve contrib/dblink's handling of tables containing dropped + columns. + + * Fix connection leak after "duplicate connection name" errors + in contrib/dblink. + + * Fix contrib/dblink to handle connection names longer than 62 + bytes correctly. + + * Add hstore(text, text) function to contrib/hstore. + ------------------------------------------------------------------- Thu May 27 10:52:05 CEST 2010 - max@suse.de diff --git a/postgresql.spec b/postgresql.spec index 3389631..f6635a8 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -1,5 +1,5 @@ # -# spec file for package postgresql (Version 8.4.4) +# spec file for package postgresql (Version 8.4.5) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -25,8 +25,8 @@ BuildRequires: ncurses-devel BuildRequires: krb5-devel libxslt-devel %endif Summary: Basic Clients and Utilities for PostgreSQL -Version: 8.4.4 -Release: 2 +Version: 8.4.5 +Release: 0 %define pg_minor_version %(echo %version | cut -f1-2 -d.) License: BSD3c(or similar) Group: Productivity/Databases/Tools From 5c6e8a0e920de3285ba4bf9986c71f546c8f74ef4723dd3e9dbd936de0002ca2 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 4 Feb 2011 13:14:36 +0000 Subject: [PATCH 2/6] Version 9.0.3 and package overhaul OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=42 --- postgresql-8.4.5.tar.bz2 | 3 - postgresql-9.0.3.tar.bz2 | 3 + postgresql-conf.patch | 15 +- ...esql-pl.changes => postgresql-libs.changes | 718 +++++++++++++++++- postgresql-libs.spec | 199 +++++ postgresql-mkspecfiles | 11 + postgresql-perl-rpath.patch | 23 - postgresql-pl.spec | 182 ----- ...rl-return.patch => postgresql-plperl.patch | 6 +- postgresql-regress.patch | 18 +- postgresql-rpmlintrc | 2 + postgresql.changes | 10 + postgresql.spec | 263 +++++-- postgresql.spec.in | 551 ++++++++++++++ 14 files changed, 1684 insertions(+), 320 deletions(-) delete mode 100644 postgresql-8.4.5.tar.bz2 create mode 100644 postgresql-9.0.3.tar.bz2 rename postgresql-pl.changes => postgresql-libs.changes (56%) create mode 100644 postgresql-libs.spec create mode 100644 postgresql-mkspecfiles delete mode 100644 postgresql-perl-rpath.patch delete mode 100644 postgresql-pl.spec rename postgresql-perl-return.patch => postgresql-plperl.patch (67%) create mode 100644 postgresql.spec.in diff --git a/postgresql-8.4.5.tar.bz2 b/postgresql-8.4.5.tar.bz2 deleted file mode 100644 index a66aa62..0000000 --- a/postgresql-8.4.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:300022ae2d998a0291a1e91978c48468fdc9c389afca05d6e5f18209ff5732bf -size 14114152 diff --git a/postgresql-9.0.3.tar.bz2 b/postgresql-9.0.3.tar.bz2 new file mode 100644 index 0000000..fe8a5c9 --- /dev/null +++ b/postgresql-9.0.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf429421dea73a7bd5ef9fbdd1212a0d01c0f63c2059e0218a0e350891867b35 +size 14040705 diff --git a/postgresql-conf.patch b/postgresql-conf.patch index 3e9ef96..40650b4 100644 --- a/postgresql-conf.patch +++ b/postgresql-conf.patch @@ -1,12 +1,12 @@ --- src/backend/utils/misc/postgresql.conf.sample +++ src/backend/utils/misc/postgresql.conf.sample -@@ -230,13 +230,13 @@ +@@ -253,13 +253,13 @@ # - Where to Log - -#log_destination = 'stderr' # Valid values are combinations of +log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog and eventlog, + # stderr, csvlog, syslog, and eventlog, # depending on platform. csvlog # requires logging_collector to be on. @@ -16,7 +16,7 @@ # into log files. Required to be on for # csvlogs. # (change requires restart) -@@ -264,7 +264,7 @@ +@@ -287,7 +287,7 @@ #syslog_facility = 'LOCAL0' #syslog_ident = 'postgres' @@ -25,12 +25,13 @@ # DO NOT USE without syslog or # logging_collector # (change requires restart) -@@ -330,7 +330,7 @@ - #log_disconnections = off +@@ -352,7 +352,8 @@ #log_duration = off + #log_error_verbosity = default # terse, default, or verbose messages #log_hostname = off -#log_line_prefix = '' # special values: -+log_line_prefix = '%t %d %u ' # special values: ++log_line_prefix = '%t %d %u ' ++ # special values: + # %a = application name # %u = user name # %d = database name - # %r = remote host and port diff --git a/postgresql-pl.changes b/postgresql-libs.changes similarity index 56% rename from postgresql-pl.changes rename to postgresql-libs.changes index ec23a49..7124f70 100644 --- a/postgresql-pl.changes +++ b/postgresql-libs.changes @@ -1,53 +1,749 @@ ------------------------------------------------------------------- -Fri Jun 18 08:42:42 UTC 2010 - coolo@novell.com +Fri Feb 4 11:40:12 UTC 2011 - max@suse.de -- fix build +- New version: 9.0.3. For the complete release notes, see + http://www.postgresql.org/docs/9.0/static/release.html +- Build libs and devel separate from the main package. +- Build the PL subpackages as part of the main package. +- Have separate packages for libpq and libecpg. +- Generate the main and lib spec files from postgresql.spec.in. ------------------------------------------------------------------- -Thu Mar 11 18:24:28 CET 2010 - max@suse.de +Wed Dec 8 13:00:12 UTC 2010 - max@novell.com + +- Fix LSB conformance of the init script (bnc#658014). + +------------------------------------------------------------------- +Thu Oct 7 17:34:57 CEST 2010 - max@suse.de + +- Security and bugfix release 8.4.5 (bnc#643771): + + * Use a separate interpreter for each calling SQL userid in + PL/Perl and PL/Tcl (CVE-2010-3433). + + * Prevent possible crashes in pg_get_expr() by disallowing it + from being called with an argument that is not one of the + system catalog columns it's intended to be used with. + + * Fix incorrect placement of placeholder evaluation. + + * Fix possible duplicate scans of UNION ALL member relations. + + * Fix "cannot handle unplanned sub-select" error. + + * Fix mishandling of whole-row Vars that reference a view or + sub-select and appear within a nested sub-select. + + * Fix mishandling of cross-type IN comparisons. + + * Fix computation of ANALYZE statistics for tsvector columns. + + * Improve planner's estimate of memory used by array_agg(), + string_agg(), and similar aggregate functions. + + * Fix failure to mark cached plans as transient. + + * Reduce PANIC to ERROR in some occasionally-reported btree + failure cases, and provide additional detail in the resulting + error messages. + + * Fix incorrect search logic for partial-match queries with GIN + indexes. + + * Prevent show_session_authorization() from crashing within + autovacuum processes. + + * Defend against functions returning setof record where not all + the returned rows are actually of the same rowtype. + + * Fix possible corruption of pending trigger event lists during + subtransaction rollback. + + * Fix possible failure when hashing a pass-by-reference function + result. + + * Improve merge join's handling of NULLs in the join columns. + + * Take care to fsync the contents of lockfiles (both + postmaster.pid and the socket lockfile) while writing them. + + * Avoid recursion while assigning XIDs to heavily-nested + subtransactions. + + * Avoid holding open old WAL segments in the walwriter process. + + * Fix log_line_prefix's %i escape, which could produce junk + early in backend startup. + + * Prevent misinterpretation of partially-specified relation + options for TOAST tables. + + * Fix inheritance count tracking in ALTER TABLE ... ADD + CONSTRAINT. + + * Fix possible data corruption in ALTER TABLE ... SET TABLESPACE + when archiving is enabled. + + * Allow CREATE DATABASE and ALTER DATABASE ... SET TABLESPACE to + be interrupted by query-cancel. + + * Improve CREATE INDEX's checking of whether proposed index + expressions are immutable. + + * Fix REASSIGN OWNED to handle operator classes and families. + + * Fix possible core dump when comparing two empty tsquery values. + + * Fix LIKE's handling of patterns containing % followed by _ + + * Re-allow input of Julian dates prior to 0001-01-01 AD. + + * Fix PL/pgSQL to throw an error, not crash, if a cursor is + closed within a FOR loop that is iterating over that cursor. + + * In PL/Python, defend against null pointer results from + PyCObject_AsVoidPtr and PyCObject_FromVoidPtr + + * In libpq, fix full SSL certificate verification for the case + where both host and hostaddr are specified. + + * Make psql recognize DISCARD ALL as a command that should not + be encased in a transaction block in autocommit-off mode. + + * Fix some issues in pg_dump's handling of SQL/MED objects. + + * Improve pg_dump and pg_restore's handling of non-seekable + archive files. This is important for proper functioning of + parallel restore. + + * Improve parallel pg_restore's ability to cope with selective + restore (-L option). + + * Fix ecpg to process data from RETURNING clauses correctly. + + * Fix some memory leaks in ecpg. + + * Improve contrib/dblink's handling of tables containing dropped + columns. + + * Fix connection leak after "duplicate connection name" errors + in contrib/dblink. + + * Fix contrib/dblink to handle connection names longer than 62 + bytes correctly. + + * Add hstore(text, text) function to contrib/hstore. + +------------------------------------------------------------------- +Thu May 27 10:52:05 CEST 2010 - max@suse.de + +- Security and bugfix release 8.4.4: + + * Enforce restrictions in plperl using an opmask applied to the + whole interpreter, instead of using Safe.pm. Recent + developments have convinced us that Safe.pm is too insecure to + rely on for making plperl trustable. This change removes use of + Safe.pm altogether, in favor of using a separate interpreter + with an opcode mask that is always applied. Pleasant side + effects of the change include that it is now possible to use + Perl's strict pragma in a natural way in plperl, and that + Perl's $a and $b variables work as expected in sort routines, + and that function compilation is significantly + faster. (CVE-2010-1169) + + * Prevent PL/Tcl from executing untrustworthy code from + pltcl_modules. PL/Tcl's feature for autoloading Tcl code from + a database table could be exploited for trojan-horse attacks, + because there was no restriction on who could create or insert + into that table. This change disables the feature unless + pltcl_modules is owned by a superuser. (However, the + permissions on the table are not checked, so installations that + really need a less-than-secure modules table can still grant + suitable privileges to trusted non-superusers.) Also, prevent + loading code into the unrestricted "normal" Tcl interpreter + unless we are really going to execute a pltclu + function. (CVE-2010-1170) + + * Fix data corruption during WAL replay of ALTER ... SET + TABLESPACE. When archive_mode is on, ALTER ... SET TABLESPACE + generates a WAL record whose replay logic was incorrect. It + could write the data to the wrong place, leading to + possibly-unrecoverable data corruption. Data corruption would + be observed on standby slaves, and could occur on the master as + well if a database crash and recovery occurred after committing + the ALTER and before the next checkpoint. + + * Fix possible crash if a cache reset message is received during + rebuild of a relcache entry. This error was introduced in 8.4.3 + while fixing a related failure. + + * Apply per-function GUC settings while running the language + validator for the function. + + * This avoids failures if the function's code is invalid without + the setting; an example is that SQL functions may not parse if + the search_path is not correct. + + * Do constraint exclusion for inherited UPDATE and DELETE target + tables when constraint_exclusion = partition. Due to an + oversight, this setting previously only caused constraint + exclusion to be checked in SELECT commands. + + * Do not allow an unprivileged user to reset superuser-only + parameter settings. Previously, if an unprivileged user ran + ALTER USER ... RESET ALL for himself, or ALTER DATABASE + ... RESET ALL for a database he owns, this would remove all + special parameter settings for the user or database, even ones + that are only supposed to be changeable by a superuser. Now, + the ALTER will only remove the parameters that the user has + permission to change. + + * Avoid possible crash during backend shutdown if shutdown occurs + when a CONTEXT addition would be made to log entries. In some + cases the context-printing function would fail because the + current transaction had already been rolled back when it came + time to print a log message. + + * Fix erroneous handling of %r parameter in recovery_end_command. + The value always came out zero. + + * Ensure the archiver process responds to changes in + archive_command as soon as possible. + + * Fix pl/pgsql's CASE statement to not fail when the case + expression is a query that returns no rows. + + * Update pl/perl's ppport.h for modern Perl versions. + + * Fix assorted memory leaks in pl/python. + + * Handle empty-string connect parameters properly in ecpg. + + * Prevent infinite recursion in psql when expanding a variable + that refers to itself. + + * Fix psql's \copy to not add spaces around a dot within \copy + (select ...). Addition of spaces around the decimal point in a + numeric literal would result in a syntax error. + + * Avoid formatting failure in psql when running in a locale + context that doesn't match the client_encoding. + + * Fix unnecessary "GIN indexes do not support whole-index scans" + errors for unsatisfiable queries using contrib/intarray + operators. + + * Ensure that contrib/pgstattuple functions respond to cancel + interrupts promptly. + + * Make server startup deal properly with the case that shmget() + returns EINVAL for an existing shared memory segment. + + This behavior has been observed on BSD-derived kernels + including OS X. It resulted in an entirely-misleading startup + failure complaining that the shared memory request size was too + large. + +------------------------------------------------------------------- +Thu Apr 29 11:56:05 CEST 2010 - max@suse.de + +- Use %configure to pick up the default directories (bnc#600616). + +------------------------------------------------------------------- +Tue Mar 16 15:27:42 CET 2010 - max@suse.de + +- Security and bugfix release 8.4.3. + +------------------------------------------------------------------- +Thu Mar 11 18:23:38 CET 2010 - max@suse.de - Disable GSSAPI, XML, kerberos and make check in OBS for SLES9. ------------------------------------------------------------------- -Tue Feb 9 14:11:37 CET 2010 - max@suse.de +Thu Mar 11 17:57:38 CET 2010 - max@suse.de + +- Fix build for SLES9 + +------------------------------------------------------------------- +Tue Feb 9 14:42:29 CET 2010 - max@suse.de -- Fix linking against libperl.so (bnc#578053) - Fix package descriptions. ------------------------------------------------------------------- -Wed Sep 16 18:08:38 UTC 2009 - crrodriguez@novell.com +Wed Dec 16 16:19:20 CET 2009 - max@suse.de + +- Security and bugfix release 8.4.2: + + * CVE-2009-4136: Protect against indirect security threats + caused by index functions changing session-local state. This + change prevents allegedly-immutable index functions from + possibly subverting a superuser's session. + + * CVE-2009-4034: Reject SSL certificates containing an embedded + null byte in the common name (CN) field. This prevents + unintended matching of a certificate to a server or client + name during SSL validation. + + * Fix hash index corruption. The 8.4 change that made hash + indexes keep entries sorted by hash value failed to update the + bucket splitting and compaction routines to preserve the + ordering. So application of either of those operations could + lead to permanent corruption of an index, in the sense that + searches might fail to find entries that are present. To deal + with this, it is recommended to REINDEX any hash indexes you + may have after installing this update. + + * Fix possible crash during backend-startup-time cache + initialization + + * Avoid crash on empty thesaurus dictionary + + * Prevent signals from interrupting VACUUM at unsafe times. This + fix prevents a PANIC if a VACUUM FULL is cancelled after it's + already committed its tuple movements, as well as transient + errors if a plain VACUUM is interrupted after having truncated + the table. + + * Fix possible crash due to integer overflow in hash table size + calculation. This could occur with extremely large planner + estimates for the size of a hashjoin's result. + + * Fix crash if a DROP is attempted on an internally-dependent + object. + + * Fix very rare crash in inet/cidr comparisons. + + * Ensure that shared tuple-level locks held by prepared + transactions are not ignored. + + * Fix premature drop of temporary files used for a cursor that is + accessed within a subtransaction. + + * Fix memory leak in syslogger process when rotating to a new CSV + logfile. + + * Fix memory leak in postmaster when re-parsing "pg_hba.conf". + + * Make FOR UPDATE/SHARE in the primary query not propagate into + WITH queries. + + * Fix bug with a WITH RECURSIVE query immediately inside another + one. + + * Fix concurrency bug in hash indexes. Concurrent insertions + could cause index scans to transiently report wrong results. + + * Fix incorrect logic for GiST index page splits, when the split + depends on a non-first column of the index. + + * Fix wrong search results for a multi-column GIN index with + fastupdate enabled. + + * Fix bugs in WAL entry creation for GIN indexes. These bugs were + masked when full_page_writes was on, but with it off a WAL + replay failure was certain if a crash occurred before the next + checkpoint. + + * Don't error out if recycling or removing an old WAL file fails + at the end of checkpoint. It's better to treat the problem as + non-fatal and allow the checkpoint to complete. Future + checkpoints will retry the removal. Such problems are not + expected in normal operation, but have been seen to be caused + by misdesigned Windows anti-virus and backup software. + + * Ensure WAL files aren't repeatedly archived on Windows. This is + another symptom that could happen if some other process + interfered with deletion of a no-longer-needed file. + + * Fix PAM password processing to be more robust. The previous + code is known to fail with the combination of the Linux + pam_krb5 PAM module with Microsoft Active Directory as the + domain controller. It might have problems elsewhere too, since + it was making unjustified assumptions about what arguments the + PAM stack would pass to it. + + * Raise the maximum authentication token (Kerberos ticket) size + in GSSAPI and SSPI authentication methods. While the old + 2000-byte limit was more than enough for Unix Kerberos + implementations, tickets issued by Windows Domain Controllers + can be much larger. + + * Ensure that domain constraints are enforced in constructs like + ARRAY[...]::domain, where the domain is over an array type. + + * Fix foreign-key logic for some cases involving composite-type + columns as foreign keys. + + * Ensure that a cursor's snapshot is not modified after it is + created. This could lead to a cursor delivering wrong results + if later operations in the same transaction modify the data the + cursor is supposed to return. + + * Fix CREATE TABLE to properly merge default expressions coming + from different inheritance parent tables. This used to work but + was broken in 8.4. + + * Re-enable collection of access statistics for sequences. This + used to work but was broken in 8.3. + + * Fix processing of ownership dependencies during CREATE OR REPLACE + FUNCTION. + + * Fix incorrect handling of WHERE "x"="x" conditions. In some cases + these could get ignored as redundant, but they aren't -- they're + equivalent to "x" IS NOT NULL. + + * Fix incorrect plan construction when using hash aggregation to + implement DISTINCT for textually identical volatile + expressions. + + * Fix Assert failure for a volatile SELECT DISTINCT ON expression. + + * Fix ts_stat() to not fail on an empty tsvector value. + + * Make text search parser accept underscores in XML attributes. + + * Fix encoding handling in xml binary input. If the XML header + doesn't specify an encoding, we now assume UTF-8 by default; + the previous handling was inconsistent. + + * Fix bug with calling plperl from plperlu or vice versa. An + error exit from the inner function could result in crashes due + to failure to re-select the correct Perl interpreter for the + outer function. + + * Fix session-lifespan memory leak when a PL/Perl function is + redefined. + + * Ensure that Perl arrays are properly converted to PostgreSQL + arrays when returned by a set-returning PL/Perl function. This + worked correctly already for non-set-returning functions. + + * Fix rare crash in exception processing in PL/Python. + + * Fix ecpg problem with comments in DECLARE CURSOR statements. + + * Fix ecpg to not treat recently-added keywords as reserved + words. This affected the keywords CALLED, CATALOG, DEFINER, + ENUM, FOLLOWING, INVOKER, OPTIONS, PARTITION, PRECEDING, RANGE, + SECURITY, SERVER, UNBOUNDED, and WRAPPER. + + * Re-allow regular expression special characters in psql's \df + function name parameter. + + * In "contrib/pg_standby", disable triggering failover with a + signal on Windows. This never did anything useful, because + Windows doesn't have Unix-style signals, but recent changes + made it actually crash. + + * Put FREEZE and VERBOSE options in the right order in the VACUUM + command that "contrib/vacuumdb" produces. + + * Fix possible leak of connections when "contrib/dblink" + encounters an error. + + * Ensure psql's flex module is compiled with the correct system + header definitions. This fixes build failures on platforms + where --enable-largefile causes incompatible changes in the + generated code. + + * Make the postmaster ignore any application_name parameter in + connection request packets, to improve compatibility with + future libpq versions. + + * Update the timezone abbreviation files to match current reality + This includes adding IDT to the default timezone abbreviation + set. + +------------------------------------------------------------------- +Wed Dec 16 10:46:01 CET 2009 - jengelh@medozas.de + +- package documentation as noarch + +------------------------------------------------------------------- +Mon Dec 14 16:08:29 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Wed Sep 16 18:00:20 UTC 2009 - crrodriguez@novell.com - use find_lang to package language files correctly +------------------------------------------------------------------- +Thu Sep 10 12:06:36 CEST 2009 - max@suse.de + +- Security and bugfix release 8.4.1: + + * Fix WAL page header initialization at the end of archive + recovery. This could lead to failure to process the WAL in a + subsequent archive recovery. + * Fix "cannot make new WAL entries during recovery" error. + * Fix problem that could make expired rows visible after a crash. + This bug involved a page status bit potentially not being set + correctly after a server crash. + * Disallow RESET ROLE and RESET SESSION AUTHORIZATION inside + security-definer functions. This covers a case that was missed + in the previous patch that disallowed SET ROLE and SET SESSION + AUTHORIZATION inside security-definer functions. + (See CVE-2007-6600) + * Make LOAD of an already-loaded loadable module into a no-op. + * Formerly, LOAD would attempt to unload and re-load the module, + but this is unsafe and not all that useful. + * Make window function PARTITION BY and ORDER BY items always be + interpreted as simple expressions. In 8.4.0 these lists were + parsed following the rules used for top-level GROUP BY and + ORDER BY lists. But this was not correct per the SQL standard, + and it led to possible circularity. + * Fix several errors in planning of semi-joins. These led to + wrong query results in some cases where IN or EXISTS was used + together with another join. + * Fix handling of whole-row references to subqueries that are + within an outer join. An example is SELECT COUNT(ss.*) FROM + ... LEFT JOIN (SELECT ...) ss ON .... Here, ss.* would be + treated as ROW(NULL,NULL,...) for null-extended join rows, + which is not the same as a simple NULL. Now it is treated as a + simple NULL. + * Fix Windows shared-memory allocation code. This bug led to the + often-reported "could not reattach to shared memory" error + message. + * Fix locale handling with plperl. + This bug could cause the server's locale setting to change when + a plperl function is called, leading to data corruption. + * Fix handling of reloptions to ensure setting one option doesn't + force default values for others. + * Ensure that a "fast shutdown" request will forcibly terminate + open sessions, even if a "smart shutdown" was already in + progress. + * Avoid memory leak for array_agg() in GROUP BY queries. + * Treat to_char(..., 'TH') as an uppercase ordinal suffix with + 'HH'/'HH12'. It was previously handled as 'th' (lowercase). + * Include the fractional part in the result of EXTRACT(second) + and EXTRACT(milliseconds) for time and time with time zone + inputs. + This has always worked for floating-point datetime + configurations, but was broken in the integer datetime code. + * Fix overflow for INTERVAL 'x ms' when x is more than 2 million + and integer datetimes are in use. + * Improve performance when processing toasted values in index + scans. This is particularly useful for PostGIS. + * Fix a typo that disabled commit_delay. + * Output early-startup messages to postmaster.log if the server + is started in silent mode. Previously such error messages were + discarded, leading to difficulty in debugging. + * Remove translated FAQs. They are now on the wiki. The main FAQ + was moved to the wiki some time ago. + * Fix pg_ctl to not go into an infinite loop if postgresql.conf + is empty. + * Fix several errors in pg_dump's --binary-upgrade mode. + * pg_dump --binary-upgrade is used by pg_migrator. + * Fix contrib/xml2's xslt_process() to properly handle the + maximum number of parameters (twenty). + * Improve robustness of libpq's code to recover from errors + during COPY FROM STDIN. + + * Avoid including conflicting readline and editline header files + when both libraries are installed. + + * Work around gcc bug that causes "floating-point exception" + instead of "division by zero" on some platforms. + +------------------------------------------------------------------- +Mon Jul 27 20:24:35 CEST 2009 - poeml@suse.de + +- postgresql-8.4.0-sle10-timestamptz.patch added, and applied + _only_ on SLE10. It fixes a build failure due to a test case that + seems to be confused by daylight saving time in the time zone + that the test expects its result (PDT vs. PST). Since this + failure happened only on SLE10, I assume that the test case isn't + broken, and some peculiarity on that (rather old now) platform is + to blame (possibly too old timezone files). Also, the testcase is + checking correctness when converting timezones > 32 bit, which + actually seems to work. + +------------------------------------------------------------------- +Wed Jul 15 21:10:36 CEST 2009 - poeml@suse.de + +- replace "ident sameuser" with "ident" as auth method for the + initdb call in the init script, because the former doesn't work + with PostgreSQL 8.4. With the generated pg_hba.conf, PostgreSQL + failed to start. Added note to the upgrade READMEs. [bnc#522375] + +------------------------------------------------------------------- +Tue Jul 7 15:56:49 CEST 2009 - max@suse.de + +- New major release: 8.4.0 +- Improvements include: + * Windowing Functions + * Common Table Expressions and Recursive Queries + * Default and variadic parameters for functions + * Parallel Restore + * Column Permissions + * Per-database locale settings + * Improved hash indexes + * Improved join performance for EXISTS and NOT EXISTS queries + * Easier-to-use Warm Standby + * Automatic sizing of the Free Space Map + * Visibility Map (greatly reduces vacuum overhead for + slowly-changing tables) + * Version-aware psql (backslash commands work against older + servers) + * Support SSL certificates for user authentication + * Per-function runtime statistics + * Easy editing of functions in psql + * New contrib modules: pg_stat_statements, auto_explain, citext, + btree_gin + +------------------------------------------------------------------- +Wed May 6 17:57:43 CEST 2009 - max@suse.de + +- Remove dependency on local posixrules from horology test. + +------------------------------------------------------------------- +Mon Mar 23 18:12:42 CET 2009 - max@suse.de + +- Security release 8.3.7 + + * Fixes a vulnerability that allowed remote authenticated + users to cause a denial of service (stack consumption) + via mismatched encoding conversion requests. + + * Details of the other bugfixes contained in this and + previous releases can be found here: + http://www.postgresql.org/docs/8.3/static/release.html + /usr/share/doc/packages/postgresql/HISTORY + +- Users of GiST indexes should "REINDEX" them after installing + this update. + +- Re-added libpgport.a to the devel package, as some apps require + it, although it is meant to be internal to the PostgreSQL + backend. + +- Fix removal of leftover files on database startup (bnc#473644). + +------------------------------------------------------------------- +Wed Jan 7 12:34:56 CET 2009 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + +------------------------------------------------------------------- +Wed Nov 5 16:07:45 CET 2008 - max@suse.de + +- Bugfix release: 8.3.5 + * Fix GiST index corruption due to marking the wrong index + entry "dead" after a deletion. This would result in index + searches failing to find rows they should have found. + * Fix backend crash when the client encoding cannot represent a + localized error message. + * Fix possible crash in bytea-to-XML mapping. + * Fix possible crash when deeply nested functions are invoked + from a trigger. + * Improve optimization of "expression" IN ("expression-list") + queries. + * Fix mis-expansion of rule queries when a sub-SELECT appears + in a function call in FROM, a multi-row VALUES list, or a + RETURNING list. + * Fix Assert failure during rescan of an IS NULL search of + a GiST index. + * Fix memory leak during rescan of a hashed aggregation plan. + * Ensure an error is reported when a newly-defined PL/pgSQL + trigger function is invoked as a normal function. + * Force a checkpoint before "CREATE DATABASE" starts to copy + files This prevents a possible failure if files had recently + been deleted in the source database. + * Prevent possible collision of relfilenode numbers when moving + a table to another tablespace with "ALTER SET TABLESPACE". + * Fix incorrect text search headline generation when single + query item matches first word of text. + * Fix improper display of fractional seconds in interval + values when using a non-ISO datestyle in an + "--enable-integer-datetimes" build. + * Make ILIKE compare characters case-insensitively even when + they're escaped. + * Ensure "DISCARD" is handled properly by statement logging. + * Fix incorrect logging of last-completed-transaction time + during PITR recovery. + * Ensure SPI_getvalue and SPI_getbinval behave correctly when + the passed tuple and tuple descriptor have different numbers + of columns. + * Fix small memory leak when using libpq's gsslib parameter. + * Ensure libgssapi is linked into libpq if needed. + * Fix ecpg's parsing of "CREATE ROLE". + * Fix recent breakage of pg_ctl restart. + +------------------------------------------------------------------- +Thu Sep 25 13:19:09 CEST 2008 - max@suse.de + +- Bugfix release: 8.3.4 +- Issues fixed include autovacuum crashes reported by several + users, two Heap Only Tuple bugs, a foreign key failure + condition, a too-small lock address space, two Write Ahead Log + bugs, several planner mistakes, and numerous "corner condition" + bugs. + +------------------------------------------------------------------- +Fri Sep 5 10:15:20 CEST 2008 - max@suse.de + +- New version: 8.3.3 with countless bug fixes over 8.3.1. +- For details, see + http://www.postgresql.org/docs/8.3/static/release-8-3-2.html , + http://www.postgresql.org/docs/8.3/static/release-8-3-3.html , + or /usr/share/doc/packages/postgresql/HISTORY . + +------------------------------------------------------------------- +Thu Aug 28 23:23:58 CEST 2008 - cthiel@suse.de + +- fix init script + ------------------------------------------------------------------- Mon May 19 18:31:54 CEST 2008 - schwab@suse.de - Fix broken configure check. +------------------------------------------------------------------- +Fri May 9 10:25:15 CEST 2008 - aj@suse.de + +- Add baselibs.conf. + +------------------------------------------------------------------- +Fri Apr 18 11:37:38 CEST 2008 - max@suse.de + +- Removed static libs from postgresql-devel. +- Removed more old Obsoletes: tags. +- Fixed path to pid file in init script. +- Moved "make check" to %check section +- Silence some bogus rpmlint warnings + ------------------------------------------------------------------- Thu Apr 10 14:23:15 CEST 2008 - max@suse.de - Adopt the 8.3.1 package from Peter Eisentraut's OBS project. - New features in PostgreSQL 8.3 include: * Full text search is integrated into the core database system - * Support for the SQL/XML standard, including new operators and an - XML data type + * Support for the SQL/XML standard, including new operators and + an XML data type * Enumerated data types (ENUM) * Arrays of composite types * Universally Unique Identifier (UUID) data type * Add control over whether NULLs sort first or last * Updatable cursors - * Server configuration parameters can now be set on a per-function - basis + * Server configuration parameters can now be set on a + per-function basis * User-defined types can now have type modifiers * Automatically re-plan cached queries when table definitions change or statistics are updated * Numerous improvements in logging and statistics collection * Support multiple concurrent autovacuum processes, and other autovacuum improvements -- Add baselibs.conf - Remove old provides/obsoletes tags for way-back package renames. +------------------------------------------------------------------- +Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de + +- added baselibs.conf file to build xxbit packages + for multilib support + ------------------------------------------------------------------- Thu Jan 10 14:34:16 CET 2008 - max@suse.de diff --git a/postgresql-libs.spec b/postgresql-libs.spec new file mode 100644 index 0000000..1cca9b7 --- /dev/null +++ b/postgresql-libs.spec @@ -0,0 +1,199 @@ +# +# spec file for package postgresql (Version 8.4.3) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: postgresql-libs +%define _name postgresql +%define libpq libpq5 +%define libecpg libecpg6 +%define buildall 0 +%if 0%{?suse_version} > 910 +BuildRequires: krb5-devel libxslt-devel +%endif +BuildRequires: openldap2-devel openssl-devel +Summary: Basic Clients and Utilities for PostgreSQL +Version: 9.0.3 +Release: 2 +%define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') +License: BSD3c(or similar) +Group: Productivity/Databases/Tools +Source0: postgresql-%version.tar.bz2 +Source1: baselibs.conf +Source2: postgresql-README.SuSE.de +Source3: postgresql-README.SuSE.en +Source8: postgresql-sysconfig +Source9: postgresql-init +Source15: postgresql-bashprofile +Source16: postgresql-firewall +Source17: postgresql-rpmlintrc +Source100: postgresql-mkspecfiles +Source101: postgresql.spec.in +Patch1: postgresql-conf.patch +Patch2: postgresql-regress.patch +Patch3: postgresql-sle10-timestamptz.patch +Patch4: postgresql-plperl.patch +PreReq: postgresql-libs = %pg_minor_version +Url: http://www.postgresql.org/ +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: postgresql = %pg_minor_version +%description +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the basic utility and client programs necessary +to maintain and work with local or remote PostgreSQL databases as well +as manual pages for the SQL commands that PostgreSQL supports. Full +HTML documentation for PostgreSQL can be found in the postgresql-docs +package. + +%package -n %libpq +License: BSD3c(or similar) +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Obsoletes: postgresql-libs +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif + +%description -n %libpq +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the client library that most PostgreSQL client +program or language bindings are using. + +%package -n %libecpg +License: BSD3c(or similar) +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Obsoletes: postgresql-libs +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif + +%description -n %libecpg +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the runtime library of the embedded SQL C +preprocessor for PostgreSQL. + +%package -n %_name-devel +License: BSD3c(or similar) +Summary: PostgreSQL development header files and libraries +Group: Productivity/Databases/Tools +Requires: %libpq %libecpg + +%description -n %_name-devel +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the header files and libraries needed to compile +C applications which will directly interact with a PostgreSQL database +management server and the ECPG Embedded C Postgres preprocessor. You +need to install this package if you want to develop applications in C +which will interact with a PostgreSQL server. + + +%prep +%setup -q -n %_name-%version +%patch1 +%patch2 +# apply the following patch only on SLE10 +%if 0%{?suse_version} == 1010 +%patch3 -p1 +%endif +%patch4 + +%build +export CFLAGS="%optflags $SP" +# uncomment the following line to enable the stack protector +# CFLAGS="$CFLAGS -fstack-protector" +%configure \ + --includedir=%_includedir/pgsql \ + --datadir=%_datadir/postgresql \ + --docdir=%_docdir \ + --disable-rpath \ + --enable-nls \ + --enable-thread-safety \ + --enable-integer-datetimes \ + --without-readline \ + --with-openssl \ + --with-ldap \ +%if 0%{?suse_version} > 910 + --with-gssapi \ + --with-libxml \ + --with-libxslt \ + --with-krb5 \ +%endif + --with-system-tzdata=/usr/share/zoneinfo +make -C src/backend %{?jobs:-j%jobs} libpq-recursive +make -C src/interfaces %{?jobs:-j%jobs} +make -C src/port %{?jobs:-j%jobs} libpgport.a + +%install +for dir in interfaces include port; do + make -C src/$dir DESTDIR=%buildroot install +done +make -C src DESTDIR=%buildroot install-local +install -d %buildroot%_mandir/man1 +install doc/src/sgml/man1/ecpg.1 %buildroot%_mandir/man1 +# Don't ship static libraries, libpgport.a is needed, though. +rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) + +%find_lang libpq5-%{pg_minor_version} %libpq.lang +%find_lang ecpglib6-%{pg_minor_version} %libecpg.lang +%find_lang ecpg-%{pg_minor_version} %_name-devel.lang +%post -n %libpq -p /sbin/ldconfig +%postun -n %libpq -p /sbin/ldconfig +%post -n %libecpg -p /sbin/ldconfig +%postun -n %libecpg -p /sbin/ldconfig + +%clean +rm -rf %buildroot +rm -f %my_provides + +%files -n %libpq -f %libpq.lang +%defattr(-,root,root) +%_libdir/libpq.so.* + +%files -n %libecpg -f %libecpg.lang +%defattr(-,root,root) +%_libdir/libecpg*.so.* +%_libdir/libpgtypes.so.* + +%files -n %_name-devel -f %_name-devel.lang +%defattr(-,root,root) +%doc %_mandir/man1/ecpg.1* +%_bindir/ecpg +%_libdir/libpgport.a +%_libdir/lib*.so +%_libdir/postgresql/pgxs +%_includedir/pgsql +%dir %_datadir/postgresql +%_datadir/postgresql/pg_service.conf.sample + +%changelog diff --git a/postgresql-mkspecfiles b/postgresql-mkspecfiles new file mode 100644 index 0000000..46e3e3b --- /dev/null +++ b/postgresql-mkspecfiles @@ -0,0 +1,11 @@ +#!/bin/bash + +sed '/IF_LIBS/,/FI_LIBS/d + /IF_POSTGRES/d + /FI_POSTGRES/d +' postgresql.spec.in > postgresql.spec + +sed '/IF_POSTGRES/,/FI_POSTGRES/d + /IF_LIBS/d + /FI_LIBS/d +' postgresql.spec.in > postgresql-libs.spec diff --git a/postgresql-perl-rpath.patch b/postgresql-perl-rpath.patch deleted file mode 100644 index a6b6bf4..0000000 --- a/postgresql-perl-rpath.patch +++ /dev/null @@ -1,23 +0,0 @@ -We configure Postgres with --disable-rpath because for the most part we -want to leave it to ldconfig to determine where libraries are. However, -for some reason the Perl package puts libperl.so in a nonstandard place -and doesn't add that place to the ldconfig search path. I think this -is a Perl packaging bug, myself, but apparently it's not going to change. -So work around it by adding an rpath spec to plperl.so (only). -Per bug #162198. - - -Index: src/pl/plperl/GNUmakefile -=================================================================== ---- src/pl/plperl/GNUmakefile.orig 2010-05-13 18:40:36.000000000 +0200 -+++ src/pl/plperl/GNUmakefile 2010-06-18 10:10:04.296498028 +0200 -@@ -38,6 +38,9 @@ OBJS = plperl.o spi_internal.o SPI.o - - SHLIB_LINK = $(perl_embed_ldflags) - -+# Force rpath to be used even though we disable it everywhere else -+SHLIB_LINK += $(rpath) -+ - REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl --load-language=plperlu - REGRESS = plperl plperl_trigger plperl_shared plperl_elog - # if Perl can support two interpreters in one backend, diff --git a/postgresql-pl.spec b/postgresql-pl.spec deleted file mode 100644 index 82f4056..0000000 --- a/postgresql-pl.spec +++ /dev/null @@ -1,182 +0,0 @@ -# -# spec file for package postgresql-pl (Version 8.4.5) -# -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - - -Name: postgresql-pl -BuildRequires: bison flex gettext-devel -BuildRequires: openldap2-devel openssl-devel pam-devel readline-devel zlib-devel -BuildRequires: ncurses-devel -%if 0%{?suse_version} > 910 -BuildRequires: krb5-devel libxslt-devel -%endif -BuildRequires: python-devel tcl-devel -Summary: The PL/Tcl, PL/Perl, and PL/Python Procedural Languages for PostgreSQL -Version: 8.4.5 -Release: 0. -%define pg_minor_version %(echo %version | cut -f1-2 -d.) -License: BSD3c(or similar) -Group: Productivity/Databases/Servers -Source0: postgresql-%version.tar.bz2 -Patch0: postgresql-perl-rpath.patch -Patch1: postgresql-perl-return.patch -Url: http://www.postgresql.org/ -Requires: postgresql-server = %pg_minor_version -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define pls plperl plpython tcl - -%description -PostgreSQL is an advanced object-relational database management system -that supports an extended subset of the SQL standard, including -transactions, foreign keys, subqueries, triggers, and user-defined -types and functions. - -This source package builds the PL/Tcl, PL/Perl, and PL/Python -procedural languages from the PostgreSQL source code. With these -modules one can use Perl, Python, and Tcl to write stored procedures, -functions, and triggers. - -PostgreSQL also offers the built-in procedural language PL/pgSQL which is -included in the postgresql-server package. - -%package -n postgresql-plperl -License: BSD3c(or similar) -Summary: The PL/Tcl, PL/Perl, and PL/Python procedural languages for PostgreSQL -Group: Productivity/Databases/Servers -Requires: perl = %perl_version -Obsoletes: postgresql-pl -Provides: postgresql-pl:%_libdir/postgresql/plperl.so -Requires: postgresql-server = %pg_minor_version - -%description -n postgresql-plperl -PostgreSQL is an advanced object-relational database management system -that supports an extended subset of the SQL standard, including -transactions, foreign keys, subqueries, triggers, and user-defined -types and functions. - -This package contains the PL/Perl procedural language for PostgreSQL. -With this module one can use Perl to write stored procedures, -functions, and triggers. - -%package -n postgresql-plpython -License: BSD3c(or similar) -Summary: The PL/Python Procedural Languages for PostgreSQL -Group: Productivity/Databases/Servers -Obsoletes: postgresql-pl -Provides: postgresql-pl:%_libdir/postgresql/plpython.so -Requires: python -Requires: postgresql-server = %pg_minor_version - -%description -n postgresql-plpython -PostgreSQL is an advanced object-relational database management system -that supports an extended subset of the SQL standard, including -transactions, foreign keys, subqueries, triggers, and user-defined -types and functions. - -This package contains the PL/Python procedural language for PostgreSQL. -With this module one can use Python to write stored procedures, -functions, and triggers. - -%package -n postgresql-pltcl -License: BSD3c(or similar) -Summary: PL/Tcl Procedural Language for PostgreSQL -Group: Productivity/Databases/Tools -Obsoletes: postgresql-pl -Provides: postgresql-pl:%_libdir/postgresql/pltcl.so -Requires: tcl -Requires: postgresql-server = %pg_minor_version - -%description -n postgresql-pltcl -PostgreSQL is an advanced object-relational database management system -that supports an extended subset of the SQL standard, including -transactions, foreign keys, subqueries, triggers, and user-defined -types and functions. - -This package contains the PL/Tcl procedural language for PostgreSQL. -With thie module one can use Tcl to write stored procedures, functions, -and triggers. - -%prep -# The sources for the postgresql-pl package can be found -# in the postgresql source RPM. -%setup -q -n postgresql-%{version} -%patch0 -%patch1 - -%build -export CFLAGS="%optflags $SP" -./configure \ - --prefix=%_prefix \ - --libdir=%_libdir \ - --bindir=%_bindir \ - --includedir=%_includedir/pgsql \ - --datadir=%_datadir/postgresql \ - --mandir=%_mandir \ - --with-docdir=%_docdir \ - --disable-rpath \ - --enable-nls \ - --enable-thread-safety \ - --enable-integer-datetimes \ - --with-python \ - --with-perl \ - --with-tcl \ - --with-tclconfig=%_libdir \ - --with-openssl \ - --with-pam \ - --with-ldap \ -%if 0%{?suse_version} > 910 - --with-krb5 \ - --with-gssapi \ - --with-libxml \ - --with-libxslt \ -%endif - --with-system-tzdata=/usr/share/zoneinfo -# fmgroids.h is needed for plperl -make -C src/backend ../../src/include/utils/fmgroids.h -for f in %pls; do - make %{?jobs:-j%jobs} -C src/pl/$f all -done - -%install -for f in %pls; do - make DESTDIR=%buildroot -C src/pl/$f install -done -for pl in pltcl plperl plpython;do -%find_lang $pl-%{pg_minor_version} postgresql-$pl.lang -done - -%clean -rm -rf %buildroot - -%files -n postgresql-pltcl -f postgresql-pltcl.lang -%defattr(-,root,root) -%dir %_libdir/postgresql -%_libdir/postgresql/pltcl.so -%_datadir/postgresql -%_bindir/pltcl* - -%files -n postgresql-plperl -f postgresql-plperl.lang -%defattr(-,root,root) -%dir %_libdir/postgresql -%_libdir/postgresql/plperl.so - -%files -n postgresql-plpython -f postgresql-plpython.lang -%defattr(-,root,root) -%dir %_libdir/postgresql -%_libdir/postgresql/plpython.so - -%changelog diff --git a/postgresql-perl-return.patch b/postgresql-plperl.patch similarity index 67% rename from postgresql-perl-return.patch rename to postgresql-plperl.patch index a8d24e7..7842e64 100644 --- a/postgresql-perl-return.patch +++ b/postgresql-plperl.patch @@ -1,10 +1,10 @@ --- src/pl/plperl/plperl.c +++ src/pl/plperl/plperl.c -@@ -641,6 +641,7 @@ +@@ -652,6 +652,7 @@ RETPUSHYES; DIE(aTHX_ "Unable to load %s into plperl", name); -+ return 0; ++ return NULL; /* make rpmlint happy */ } - /* + diff --git a/postgresql-regress.patch b/postgresql-regress.patch index 475818e..547fb9d 100644 --- a/postgresql-regress.patch +++ b/postgresql-regress.patch @@ -1,6 +1,6 @@ --- src/test/regress/expected/horology.out +++ src/test/regress/expected/horology.out -@@ -601,26 +601,26 @@ +@@ -603,26 +603,26 @@ (1 row) -- timestamp with time zone, interval arithmetic around DST change @@ -34,15 +34,15 @@ Sat Apr 02 11:00:00 2005 CST --- src/test/regress/pg_regress.c +++ src/test/regress/pg_regress.c -@@ -63,7 +63,7 @@ - - /* currently we can use the same diff switches on all platforms */ +@@ -72,7 +72,7 @@ + */ + #ifndef WIN32 + const char *basic_diff_opts = ""; +-const char *pretty_diff_opts = "-C3"; ++const char *pretty_diff_opts = "-U5"; + #else const char *basic_diff_opts = "-w"; --const char *pretty_diff_opts = "-w -C3"; -+const char *pretty_diff_opts = "-w -U5"; - - /* options settable from command line */ - _stringlist *dblist = NULL; + const char *pretty_diff_opts = "-w -C3"; --- src/test/regress/sql/horology.sql +++ src/test/regress/sql/horology.sql @@ -113,11 +113,11 @@ diff --git a/postgresql-rpmlintrc b/postgresql-rpmlintrc index 0d4cc02..5ffd750 100644 --- a/postgresql-rpmlintrc +++ b/postgresql-rpmlintrc @@ -2,3 +2,5 @@ addFilter("useless-explicit-provides") addFilter("unnecessary-buildrequires") addFilter("patch-not-applied") addFilter("non-standard-uid") +addFilter("file-not-in-%lang") +addFilter("no-dependency-on") diff --git a/postgresql.changes b/postgresql.changes index 72c500b..7124f70 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Feb 4 11:40:12 UTC 2011 - max@suse.de + +- New version: 9.0.3. For the complete release notes, see + http://www.postgresql.org/docs/9.0/static/release.html +- Build libs and devel separate from the main package. +- Build the PL subpackages as part of the main package. +- Have separate packages for libpq and libecpg. +- Generate the main and lib spec files from postgresql.spec.in. + ------------------------------------------------------------------- Wed Dec 8 13:00:12 UTC 2010 - max@novell.com diff --git a/postgresql.spec b/postgresql.spec index f6635a8..8e2880e 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -1,5 +1,5 @@ # -# spec file for package postgresql (Version 8.4.5) +# spec file for package postgresql (Version 8.4.3) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,19 +15,26 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: postgresql -BuildRequires: bison flex gettext-devel -BuildRequires: openldap2-devel openssl-devel pam-devel readline-devel zlib-devel -BuildRequires: ncurses-devel +BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel +BuildRequires: pam-devel python-devel tcl-devel +%if 0%{?suse_version} >= 1110 +BuildRequires: fdupes +%else +%define fdupes # +%endif +%define _name postgresql +%define libpq libpq5 +%define libecpg libecpg6 +%define buildall 0 %if 0%{?suse_version} > 910 BuildRequires: krb5-devel libxslt-devel %endif +BuildRequires: openldap2-devel openssl-devel Summary: Basic Clients and Utilities for PostgreSQL -Version: 8.4.5 -Release: 0 -%define pg_minor_version %(echo %version | cut -f1-2 -d.) +Version: 9.0.3 +Release: 2 +%define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') License: BSD3c(or similar) Group: Productivity/Databases/Tools Source0: postgresql-%version.tar.bz2 @@ -39,15 +46,16 @@ Source9: postgresql-init Source15: postgresql-bashprofile Source16: postgresql-firewall Source17: postgresql-rpmlintrc -Source99: postgresql-pl.spec +Source100: postgresql-mkspecfiles +Source101: postgresql.spec.in Patch1: postgresql-conf.patch Patch2: postgresql-regress.patch Patch3: postgresql-sle10-timestamptz.patch +Patch4: postgresql-plperl.patch PreReq: postgresql-libs = %pg_minor_version Url: http://www.postgresql.org/ -Provides: postgresql = %pg_minor_version BuildRoot: %{_tmppath}/%{name}-%{version}-build - +Provides: postgresql = %pg_minor_version %description PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including @@ -60,28 +68,43 @@ as manual pages for the SQL commands that PostgreSQL supports. Full HTML documentation for PostgreSQL can be found in the postgresql-docs package. -%package libs +%package -n %libpq License: BSD3c(or similar) Summary: Shared Libraries Required for PostgreSQL Clients Group: Productivity/Databases/Clients +Obsoletes: postgresql-libs # bug437293 %ifarch ppc64 Obsoletes: postgresql-libs-64bit %endif -# -Provides: postgresql-libs = %pg_minor_version -PreReq: sh-utils fileutils -%description libs +%description -n %libpq PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. -This package provides the essential shared libraries for (almost) any -PostgreSQL client program or interface. You will need to install this -package in order to use any other PostgreSQL package or any clients -that need to connect to a PostgreSQL server. +This package provides the client library that most PostgreSQL client +program or language bindings are using. + +%package -n %libecpg +License: BSD3c(or similar) +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Obsoletes: postgresql-libs +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif + +%description -n %libecpg +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the runtime library of the embedded SQL C +preprocessor for PostgreSQL. %package server License: BSD3c(or similar) @@ -142,13 +165,13 @@ This package includes the programs needed to create and run a PostgreSQL server, which will in turn allow you to create and maintain PostgreSQL databases. -%package devel +%package -n %_name-devel License: BSD3c(or similar) Summary: PostgreSQL development header files and libraries Group: Productivity/Databases/Tools -Requires: postgresql-libs = %pg_minor_version +Requires: %libpq %libecpg -%description devel +%description -n %_name-devel PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, and user-defined @@ -160,15 +183,72 @@ management server and the ECPG Embedded C Postgres preprocessor. You need to install this package if you want to develop applications in C which will interact with a PostgreSQL server. +%package plperl +License: BSD3c(or similar) +Summary: The PL/Tcl, PL/Perl, and PL/Python procedural languages for PostgreSQL +Group: Productivity/Databases/Servers +Requires: perl = %perl_version +Obsoletes: postgresql-pl +Provides: postgresql-pl:%_libdir/postgresql/plperl.so +Requires: postgresql-server = %pg_minor_version + +%description plperl +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Perl procedural language for PostgreSQL. +With this module one can use Perl to write stored procedures, +functions, and triggers. + +%package plpython +License: BSD3c(or similar) +Summary: The PL/Python Procedural Languages for PostgreSQL +Group: Productivity/Databases/Servers +Obsoletes: postgresql-pl +Provides: postgresql-pl:%_libdir/postgresql/plpython.so +Requires: python +Requires: postgresql-server = %pg_minor_version + +%description plpython +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Python procedural language for PostgreSQL. +With this module one can use Python to write stored procedures, +functions, and triggers. + +%package pltcl +License: BSD3c(or similar) +Summary: PL/Tcl Procedural Language for PostgreSQL +Group: Productivity/Databases/Tools +Obsoletes: postgresql-pl +Provides: postgresql-pl:%_libdir/postgresql/pltcl.so +Requires: tcl +Requires: postgresql-server = %pg_minor_version + +%description pltcl +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Tcl procedural language for PostgreSQL. +With thie module one can use Tcl to write stored procedures, functions, +and triggers. %prep -%setup -q +%setup -q -n %_name-%version %patch1 %patch2 # apply the following patch only on SLE10 %if 0%{?suse_version} == 1010 %patch3 -p1 %endif +%patch4 %build export CFLAGS="%optflags $SP" @@ -182,11 +262,12 @@ export CFLAGS="%optflags $SP" --enable-nls \ --enable-thread-safety \ --enable-integer-datetimes \ - --without-python \ - --without-perl \ - --without-tcl \ - --with-openssl \ + --with-python \ + --with-perl \ + --with-tcl \ + --with-tclconfig=%_libdir \ --with-pam \ + --with-openssl \ --with-ldap \ %if 0%{?suse_version} > 910 --with-gssapi \ @@ -195,9 +276,7 @@ export CFLAGS="%optflags $SP" --with-krb5 \ %endif --with-system-tzdata=/usr/share/zoneinfo -make %{?jobs:-j%jobs} all -make %{?jobs:-j%jobs} -C contrib all -# +make %{?jobs:-j%jobs} world %ifnarch %arm %if 0%{?suse_version} > 910 @@ -217,9 +296,21 @@ make check || { %endif %install -make DESTDIR=%buildroot install +make DESTDIR=%buildroot install install-docs +%if !%buildall +make -C src/interfaces DESTDIR=%buildroot uninstall +make -C src/include DESTDIR=%buildroot uninstall +make -C src/port DESTDIR=%buildroot uninstall +make -C src/makefiles DESTDIR=%buildroot uninstall +make -C src DESTDIR=%buildroot uninstall-local +# We don't want to package these +rm -f %buildroot%_libdir/postgresql/pgxs/config/install-sh +rm -f %buildroot%_libdir/postgresql/pgxs/src/test/regress/pg_regress +rm -f %buildroot%_mandir/*/ecpg* +%endif # Don't ship static libraries, libpgport.a is needed, though. -rm %buildroot/%_libdir/{libecpg,libecpg_compat,libpgtypes,libpq}.a +rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) + # # Install and collect the contrib stuff # @@ -241,7 +332,6 @@ install -m 644 %SOURCE16 %buildroot/etc/sysconfig/SuSEfirewall2.d/services/postg ln -s ../../etc/init.d/postgresql %buildroot/usr/sbin/rcpostgresql install -d -m 750 %buildroot/var/lib/pgsql install -d -m 700 %buildroot/var/lib/pgsql/data -install -d -m 700 %buildroot/var/lib/pgsql/backups sed 's,@LIBDIR@,%_libdir,g' %{SOURCE15} > \ %buildroot/var/lib/pgsql/.bash_profile # Backup directory for old version binaries @@ -253,19 +343,18 @@ cp -a %SOURCE3 %buildroot%_docdir/postgresql/README.SuSE.en for appname in pg_dump pgscripts psql;do %find_lang $appname-%{pg_minor_version} %{name}.lang done -for libname in libpq5 ecpglib6;do -%find_lang $libname-%{pg_minor_version} %{name}-libs.lang -done -for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql;do +%if %buildall +%find_lang libpq5-%{pg_minor_version} %libpq.lang +%find_lang ecpglib6-%{pg_minor_version} %libecpg.lang +%find_lang ecpg-%{pg_minor_version} %_name-devel.lang +%endif +for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql pg_config;do %find_lang $serverapp-%{pg_minor_version} %{name}-server.lang done -for develapp in pg_config ecpg;do -%find_lang $develapp-%{pg_minor_version} %{name}-devel.lang +for pl in plperl plpython pltcl; do +%find_lang $pl-%{pg_minor_version} $pl.lang done - -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig +%fdupes %buildroot %post server %fillup_and_insserv @@ -283,29 +372,10 @@ exit 0 groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : -# Need to make a backup of the server binary if this is an upgrade. -# It will be needed to do a dump of the old version's database. -# All output redirected to /dev/null. -umask 022 -if [ -f usr/bin/postgres ] -then - OLD_VERSION=$(strings usr/bin/postgres | - /bin/sed -n '/postmaster (PostgreSQL)/s/.* \([0-9]\+\.[0-9]\+\).*/\1/p') - if [ "$OLD_VERSION" = "" ] - then - OLD_VERSION=$(strings usr/bin/postgres | - /bin/sed -n 's/^PostgreSQL \([0-9]\+\.[0-9]\+\).*/\1/p') - fi - MINOR_VERSION=$(echo %version | sed 's/^\([0-9]\+\.[0-9]\+\).*/\1/') - BACKUP_DIR=usr/%_lib/postgresql/backup/$OLD_VERSION - if [ "$OLD_VERSION" != "$MINOR_VERSION" -a ! -f "$BACKUP_DIR" ] - then - mkdir -p $BACKUP_DIR - for f in usr/bin/{postmaster,postgres}; do - test -f $f && cp -a $f $BACKUP_DIR - done - fi -fi +%post -n %libpq -p /sbin/ldconfig +%postun -n %libpq -p /sbin/ldconfig +%post -n %libecpg -p /sbin/ldconfig +%postun -n %libecpg -p /sbin/ldconfig %clean rm -rf %buildroot @@ -348,6 +418,7 @@ rm -f %my_provides %files docs %defattr(-,root,root) +%doc %_mandir/man3/* %docdir %_docdir/postgresql %dir %_docdir/postgresql %_docdir/postgresql/html @@ -361,10 +432,6 @@ rm -f %my_provides %dir %_datadir/postgresql %dir %_datadir/postgresql/contrib -%files libs -f %{name}-libs.lang -%defattr(-,root,root) -%_libdir/lib*.so.* - %files server -f %{name}-server.lang %defattr(-,root,root) %config /etc/init.d/postgresql @@ -391,23 +458,55 @@ rm -f %my_provides %_bindir/postmaster %doc %_mandir/man1/postmaster.1* %dir %_datadir/postgresql +%_bindir/pg_config +%doc %_mandir/man1/pg_config.1* %_datadir/postgresql/timezone* %_datadir/postgresql/*.* +%exclude %_datadir/postgresql/*.pltcl %_libdir/postgresql/*_and_*.so +%_libdir/postgresql/euc2004_sjis2004.so +%_libdir/postgresql/libpqwalreceiver.so %attr(750,postgres,postgres) %dir /var/lib/pgsql %attr(700,postgres,postgres) %dir /var/lib/pgsql/data -%attr(700,postgres,postgres) %dir /var/lib/pgsql/backups %attr(640,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile -%files devel -f %{name}-devel.lang +%files pltcl -f pltcl.lang %defattr(-,root,root) -%_includedir/pgsql -%_bindir/ecpg -%_bindir/pg_config -%_libdir/lib*.so -%_libdir/libpgport.a -%_libdir/postgresql/pgxs -%doc %_mandir/man1/ecpg.1* -%doc %_mandir/man1/pg_config.1* +%dir %_libdir/postgresql +%_libdir/postgresql/pltcl.so +%_datadir/postgresql/*.pltcl +%_bindir/pltcl* +%files plperl -f plperl.lang +%defattr(-,root,root) +%dir %_libdir/postgresql +%_libdir/postgresql/plperl.so + +%files plpython -f plpython.lang +%defattr(-,root,root) +%dir %_libdir/postgresql +%_libdir/postgresql/plpython*.so + +%if %buildall +%files -n %libpq -f %libpq.lang +%defattr(-,root,root) +%_libdir/libpq.so.* + +%files -n %libecpg -f %libecpg.lang +%defattr(-,root,root) +%_libdir/libecpg*.so.* +%_libdir/libpgtypes.so.* + +%files -n %_name-devel -f %_name-devel.lang +%defattr(-,root,root) +%doc %_mandir/man1/ecpg.1* +%_bindir/ecpg +%_libdir/libpgport.a +%_libdir/lib*.so +%_libdir/postgresql/pgxs +%_includedir/pgsql +%dir %_datadir/postgresql +%_datadir/postgresql/pg_service.conf.sample + +%endif %changelog diff --git a/postgresql.spec.in b/postgresql.spec.in new file mode 100644 index 0000000..b510d70 --- /dev/null +++ b/postgresql.spec.in @@ -0,0 +1,551 @@ +# +# spec file for package postgresql (Version 8.4.3) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +IF_POSTGRES +Name: postgresql +BuildRequires: gettext-devel zlib-devel ncurses-devel readline-devel +BuildRequires: pam-devel python-devel tcl-devel +%if 0%{?suse_version} >= 1110 +BuildRequires: fdupes +%else +%define fdupes # +%endif +FI_POSTGRES +IF_LIBS +Name: postgresql-libs +FI_LIBS +%define _name postgresql +%define libpq libpq5 +%define libecpg libecpg6 +%define buildall 0 +%if 0%{?suse_version} > 910 +BuildRequires: krb5-devel libxslt-devel +%endif +BuildRequires: openldap2-devel openssl-devel +Summary: Basic Clients and Utilities for PostgreSQL +Version: 9.0.3 +Release: 2 +%define pg_minor_version %(echo %version | sed -r 's/^([0-9]+\\.[0-9]+).*/\\1/') +License: BSD3c(or similar) +Group: Productivity/Databases/Tools +Source0: postgresql-%version.tar.bz2 +Source1: baselibs.conf +Source2: postgresql-README.SuSE.de +Source3: postgresql-README.SuSE.en +Source8: postgresql-sysconfig +Source9: postgresql-init +Source15: postgresql-bashprofile +Source16: postgresql-firewall +Source17: postgresql-rpmlintrc +Source100: postgresql-mkspecfiles +Source101: postgresql.spec.in +Patch1: postgresql-conf.patch +Patch2: postgresql-regress.patch +Patch3: postgresql-sle10-timestamptz.patch +Patch4: postgresql-plperl.patch +PreReq: postgresql-libs = %pg_minor_version +Url: http://www.postgresql.org/ +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: postgresql = %pg_minor_version +%description +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the basic utility and client programs necessary +to maintain and work with local or remote PostgreSQL databases as well +as manual pages for the SQL commands that PostgreSQL supports. Full +HTML documentation for PostgreSQL can be found in the postgresql-docs +package. + +%package -n %libpq +License: BSD3c(or similar) +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Obsoletes: postgresql-libs +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif + +%description -n %libpq +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the client library that most PostgreSQL client +program or language bindings are using. + +%package -n %libecpg +License: BSD3c(or similar) +Summary: Shared Libraries Required for PostgreSQL Clients +Group: Productivity/Databases/Clients +Obsoletes: postgresql-libs +# bug437293 +%ifarch ppc64 +Obsoletes: postgresql-libs-64bit +%endif + +%description -n %libecpg +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. + +This package provides the runtime library of the embedded SQL C +preprocessor for PostgreSQL. + +IF_POSTGRES +%package server +License: BSD3c(or similar) +Summary: The Programs Needed to Create and Run a PostgreSQL Server +Group: Productivity/Databases/Servers +PreReq: %insserv_prereq %fillup_prereq +PreReq: /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig +PreReq: /usr/bin/strings /bin/sed +PreReq: postgresql = %pg_minor_version +Requires: glibc-locale +Provides: postgresql-server = %pg_minor_version + +%package docs +License: BSD3c(or similar) +Summary: HTML Documentation for PostgreSQL +Group: Productivity/Databases/Tools +%if 0%{?suse_version} >= 1120 +BuildArch: noarch +%endif + +%description docs +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the HTML documentation for PostgreSQL. The start +page is: file:///usr/share/doc/packages/postgresql/html/index.html . +Manual pages for the PostgreSQL SQL statements can be found in the +postgresql package. + +%package contrib +License: BSD3c(or similar) +Summary: Contributed Extensions and Additions to PostgreSQL +Group: Productivity/Databases/Tools +Requires: postgresql-server = %pg_minor_version + +%description contrib +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +The postgresql-contrib package includes extensions and additions that +are distributed along with the PostgreSQL sources, but are not (yet) +officially part of the PostgreSQL core. + +Documentation for the modules contained in this package can be found in +/usr/share/doc/packages/postgresql/contrib. + +%description server +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, sub-queries, triggers, and user-defined +types and functions. + +This package includes the programs needed to create and run a +PostgreSQL server, which will in turn allow you to create and maintain +PostgreSQL databases. + +FI_POSTGRES +%package -n %_name-devel +License: BSD3c(or similar) +Summary: PostgreSQL development header files and libraries +Group: Productivity/Databases/Tools +Requires: %libpq %libecpg + +%description -n %_name-devel +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the header files and libraries needed to compile +C applications which will directly interact with a PostgreSQL database +management server and the ECPG Embedded C Postgres preprocessor. You +need to install this package if you want to develop applications in C +which will interact with a PostgreSQL server. + +IF_POSTGRES +%package plperl +License: BSD3c(or similar) +Summary: The PL/Tcl, PL/Perl, and PL/Python procedural languages for PostgreSQL +Group: Productivity/Databases/Servers +Requires: perl = %perl_version +Obsoletes: postgresql-pl +Provides: postgresql-pl:%_libdir/postgresql/plperl.so +Requires: postgresql-server = %pg_minor_version + +%description plperl +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Perl procedural language for PostgreSQL. +With this module one can use Perl to write stored procedures, +functions, and triggers. + +%package plpython +License: BSD3c(or similar) +Summary: The PL/Python Procedural Languages for PostgreSQL +Group: Productivity/Databases/Servers +Obsoletes: postgresql-pl +Provides: postgresql-pl:%_libdir/postgresql/plpython.so +Requires: python +Requires: postgresql-server = %pg_minor_version + +%description plpython +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Python procedural language for PostgreSQL. +With this module one can use Python to write stored procedures, +functions, and triggers. + +%package pltcl +License: BSD3c(or similar) +Summary: PL/Tcl Procedural Language for PostgreSQL +Group: Productivity/Databases/Tools +Obsoletes: postgresql-pl +Provides: postgresql-pl:%_libdir/postgresql/pltcl.so +Requires: tcl +Requires: postgresql-server = %pg_minor_version + +%description pltcl +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, and user-defined +types and functions. + +This package contains the PL/Tcl procedural language for PostgreSQL. +With thie module one can use Tcl to write stored procedures, functions, +and triggers. +FI_POSTGRES + +%prep +%setup -q -n %_name-%version +%patch1 +%patch2 +# apply the following patch only on SLE10 +%if 0%{?suse_version} == 1010 +%patch3 -p1 +%endif +%patch4 + +%build +export CFLAGS="%optflags $SP" +# uncomment the following line to enable the stack protector +# CFLAGS="$CFLAGS -fstack-protector" +%configure \ + --includedir=%_includedir/pgsql \ + --datadir=%_datadir/postgresql \ + --docdir=%_docdir \ + --disable-rpath \ + --enable-nls \ + --enable-thread-safety \ + --enable-integer-datetimes \ +IF_POSTGRES + --with-python \ + --with-perl \ + --with-tcl \ + --with-tclconfig=%_libdir \ + --with-pam \ +FI_POSTGRES +IF_LIBS + --without-readline \ +FI_LIBS + --with-openssl \ + --with-ldap \ +%if 0%{?suse_version} > 910 + --with-gssapi \ + --with-libxml \ + --with-libxslt \ + --with-krb5 \ +%endif + --with-system-tzdata=/usr/share/zoneinfo +IF_LIBS +make -C src/backend %{?jobs:-j%jobs} libpq-recursive +make -C src/interfaces %{?jobs:-j%jobs} +make -C src/port %{?jobs:-j%jobs} libpgport.a +FI_LIBS +IF_POSTGRES +make %{?jobs:-j%jobs} world +%ifnarch %arm +%if 0%{?suse_version} > 910 + +%check +# +# Run the regression tests. +# +make check || { + for f in src/test/regress/log/* regression.diffs; do + if test -f $f; then + cat $f + fi + done + exit 1 +} +%endif +%endif +FI_POSTGRES + +%install +IF_POSTGRES +make DESTDIR=%buildroot install install-docs +%if !%buildall +make -C src/interfaces DESTDIR=%buildroot uninstall +make -C src/include DESTDIR=%buildroot uninstall +make -C src/port DESTDIR=%buildroot uninstall +make -C src/makefiles DESTDIR=%buildroot uninstall +make -C src DESTDIR=%buildroot uninstall-local +# We don't want to package these +rm -f %buildroot%_libdir/postgresql/pgxs/config/install-sh +rm -f %buildroot%_libdir/postgresql/pgxs/src/test/regress/pg_regress +rm -f %buildroot%_mandir/*/ecpg* +%endif +FI_POSTGRES +IF_LIBS +for dir in interfaces include port; do + make -C src/$dir DESTDIR=%buildroot install +done +make -C src DESTDIR=%buildroot install-local +install -d %buildroot%_mandir/man1 +install doc/src/sgml/man1/ecpg.1 %buildroot%_mandir/man1 +FI_LIBS +# Don't ship static libraries, libpgport.a is needed, though. +rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) + +IF_POSTGRES +# +# Install and collect the contrib stuff +# +touch flag; sleep 1 # otherwise we have installed files that are not newer than flag +make DESTDIR=%buildroot -C contrib install +find %buildroot -type f -cnewer flag -printf "/%%P\n" | + grep -v %_docdir > files.contrib +rm flag +for f in /etc/init.d /var/adm/fillup-templates /usr/sbin \ + /etc/sysconfig/SuSEfirewall2.d/services +do + install -d %buildroot/$f +done +install -m 755 %{SOURCE9} %buildroot/etc/init.d/postgresql +install -m 644 %{SOURCE8} %buildroot/var/adm/fillup-templates/sysconfig.postgresql +%if 0%{?suse_version} > 1020 +install -m 644 %SOURCE16 %buildroot/etc/sysconfig/SuSEfirewall2.d/services/postgresql +%endif +ln -s ../../etc/init.d/postgresql %buildroot/usr/sbin/rcpostgresql +install -d -m 750 %buildroot/var/lib/pgsql +install -d -m 700 %buildroot/var/lib/pgsql/data +sed 's,@LIBDIR@,%_libdir,g' %{SOURCE15} > \ + %buildroot/var/lib/pgsql/.bash_profile +# Backup directory for old version binaries +install -d %buildroot%_libdir/postgresql/backup +cp doc/KNOWN_BUGS doc/MISSING_FEATURES doc/README* COPYRIGHT \ + README HISTORY doc/bug.template %buildroot%_docdir/postgresql +cp -a %SOURCE2 %buildroot%_docdir/postgresql/README.SuSE.de +cp -a %SOURCE3 %buildroot%_docdir/postgresql/README.SuSE.en +for appname in pg_dump pgscripts psql;do +%find_lang $appname-%{pg_minor_version} %{name}.lang +done +%if %buildall +FI_POSTGRES +%find_lang libpq5-%{pg_minor_version} %libpq.lang +%find_lang ecpglib6-%{pg_minor_version} %libecpg.lang +%find_lang ecpg-%{pg_minor_version} %_name-devel.lang +IF_POSTGRES +%endif +for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql pg_config;do +%find_lang $serverapp-%{pg_minor_version} %{name}-server.lang +done +for pl in plperl plpython pltcl; do +%find_lang $pl-%{pg_minor_version} $pl.lang +done +%fdupes %buildroot + +%post server +%fillup_and_insserv + +%postun server +%restart_on_update postgresql +%insserv_cleanup +exit 0 + +%preun server +%stop_on_removal postgresql +exit 0 + +%pre server +groupadd -g 26 -o -r postgres >/dev/null 2>/dev/null || : +useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ + -c "PostgreSQL Server" -u 26 postgres 2>/dev/null || : +FI_POSTGRES +%post -n %libpq -p /sbin/ldconfig +%postun -n %libpq -p /sbin/ldconfig +%post -n %libecpg -p /sbin/ldconfig +%postun -n %libecpg -p /sbin/ldconfig + +%clean +rm -rf %buildroot +rm -f %my_provides + +IF_POSTGRES +%files -f %{name}.lang +%defattr(-,root,root) +%doc %_mandir/man7/* +%docdir %_docdir/postgresql +%dir %_docdir/postgresql +%_docdir/postgresql/[[:upper:]]* +%_docdir/postgresql/bug.template +# command line tools +%_bindir/createdb +%doc %_mandir/man1/createdb.1* +%_bindir/clusterdb +%doc %_mandir/man1/clusterdb.1* +%_bindir/createlang +%doc %_mandir/man1/createlang.1* +%_bindir/createuser +%doc %_mandir/man1/createuser.1* +%_bindir/dropdb +%doc %_mandir/man1/dropdb.1* +%_bindir/droplang +%doc %_mandir/man1/droplang.1* +%_bindir/dropuser +%doc %_mandir/man1/dropuser.1* +%_bindir/pg_dump +%doc %_mandir/man1/pg_dump.1* +%_bindir/pg_dumpall +%doc %_mandir/man1/pg_dumpall.1* +%_bindir/pg_restore +%doc %_mandir/man1/pg_restore.1* +%_bindir/psql +%doc %_mandir/man1/psql.1* +%_bindir/vacuumdb +%doc %_mandir/man1/vacuumdb.1* +%_bindir/reindexdb +%doc %_mandir/man1/reindexdb.1.* + +%files docs +%defattr(-,root,root) +%doc %_mandir/man3/* +%docdir %_docdir/postgresql +%dir %_docdir/postgresql +%_docdir/postgresql/html + +%files contrib -f files.contrib +%defattr(-,root,root) +%docdir %_docdir/postgresql +%dir %_docdir/postgresql +%_docdir/postgresql/contrib +%dir %_libdir/postgresql +%dir %_datadir/postgresql +%dir %_datadir/postgresql/contrib + +%files server -f %{name}-server.lang +%defattr(-,root,root) +%config /etc/init.d/postgresql +%config /var/adm/fillup-templates/sysconfig.postgresql +%if 0%{?suse_version} > 1020 +%config /etc/sysconfig/SuSEfirewall2.d/services/postgresql +%endif +%_sbindir/rcpostgresql +%dir %_libdir/postgresql +%_libdir/postgresql/backup +%_libdir/postgresql/plpgsql.so +%_libdir/postgresql/dict_snowball.so +%_datadir/postgresql/tsearch_data +%_bindir/initdb +%doc %_mandir/man1/initdb.1* +%_bindir/pg_ctl +%doc %_mandir/man1/pg_ctl.1* +%_bindir/pg_controldata +%doc %_mandir/man1/pg_controldata.1* +%_bindir/pg_resetxlog +%doc %_mandir/man1/pg_resetxlog.1* +%_bindir/postgres +%doc %_mandir/man1/postgres.1* +%_bindir/postmaster +%doc %_mandir/man1/postmaster.1* +%dir %_datadir/postgresql +%_bindir/pg_config +%doc %_mandir/man1/pg_config.1* +%_datadir/postgresql/timezone* +%_datadir/postgresql/*.* +%exclude %_datadir/postgresql/*.pltcl +%_libdir/postgresql/*_and_*.so +%_libdir/postgresql/euc2004_sjis2004.so +%_libdir/postgresql/libpqwalreceiver.so +%attr(750,postgres,postgres) %dir /var/lib/pgsql +%attr(700,postgres,postgres) %dir /var/lib/pgsql/data +%attr(640,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile + +%files pltcl -f pltcl.lang +%defattr(-,root,root) +%dir %_libdir/postgresql +%_libdir/postgresql/pltcl.so +%_datadir/postgresql/*.pltcl +%_bindir/pltcl* + +%files plperl -f plperl.lang +%defattr(-,root,root) +%dir %_libdir/postgresql +%_libdir/postgresql/plperl.so + +%files plpython -f plpython.lang +%defattr(-,root,root) +%dir %_libdir/postgresql +%_libdir/postgresql/plpython*.so + +%if %buildall +FI_POSTGRES +%files -n %libpq -f %libpq.lang +%defattr(-,root,root) +%_libdir/libpq.so.* + +%files -n %libecpg -f %libecpg.lang +%defattr(-,root,root) +%_libdir/libecpg*.so.* +%_libdir/libpgtypes.so.* + +%files -n %_name-devel -f %_name-devel.lang +%defattr(-,root,root) +%doc %_mandir/man1/ecpg.1* +%_bindir/ecpg +%_libdir/libpgport.a +%_libdir/lib*.so +%_libdir/postgresql/pgxs +%_includedir/pgsql +%dir %_datadir/postgresql +%_datadir/postgresql/pg_service.conf.sample + +IF_POSTGRES +%endif +FI_POSTGRES +%changelog From 40c57355aa04a257df0095aeb11c6823436b580c467f7cf407a10f78bcc81f67 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 8 Feb 2011 18:24:18 +0000 Subject: [PATCH 3/6] Remove unneeded PreReq from postgresql on postgresql-libs. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=43 --- postgresql-libs.changes | 5 +++++ postgresql-libs.spec | 1 - postgresql.changes | 5 +++++ postgresql.spec | 1 - postgresql.spec.in | 1 - 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/postgresql-libs.changes b/postgresql-libs.changes index 7124f70..91588a2 100644 --- a/postgresql-libs.changes +++ b/postgresql-libs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 8 18:23:22 UTC 2011 - max@novell.com + +- Remove unneeded PreReq from postgresql on postgresql-libs. + ------------------------------------------------------------------- Fri Feb 4 11:40:12 UTC 2011 - max@suse.de diff --git a/postgresql-libs.spec b/postgresql-libs.spec index 1cca9b7..9fa2c85 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -45,7 +45,6 @@ Patch1: postgresql-conf.patch Patch2: postgresql-regress.patch Patch3: postgresql-sle10-timestamptz.patch Patch4: postgresql-plperl.patch -PreReq: postgresql-libs = %pg_minor_version Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version diff --git a/postgresql.changes b/postgresql.changes index 7124f70..91588a2 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 8 18:23:22 UTC 2011 - max@novell.com + +- Remove unneeded PreReq from postgresql on postgresql-libs. + ------------------------------------------------------------------- Fri Feb 4 11:40:12 UTC 2011 - max@suse.de diff --git a/postgresql.spec b/postgresql.spec index 8e2880e..dfdd1a3 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -52,7 +52,6 @@ Patch1: postgresql-conf.patch Patch2: postgresql-regress.patch Patch3: postgresql-sle10-timestamptz.patch Patch4: postgresql-plperl.patch -PreReq: postgresql-libs = %pg_minor_version Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version diff --git a/postgresql.spec.in b/postgresql.spec.in index b510d70..ef8c4fa 100644 --- a/postgresql.spec.in +++ b/postgresql.spec.in @@ -57,7 +57,6 @@ Patch1: postgresql-conf.patch Patch2: postgresql-regress.patch Patch3: postgresql-sle10-timestamptz.patch Patch4: postgresql-plperl.patch -PreReq: postgresql-libs = %pg_minor_version Url: http://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %pg_minor_version From 95dee0593573cbc0200c5f6ca8e213b8fd206d2564b026f98559d19c08685779 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 14 Feb 2011 14:03:56 +0000 Subject: [PATCH 4/6] Add missing dir to libs subpackage OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=44 --- postgresql-libs.spec | 1 + postgresql.spec | 1 + postgresql.spec.in | 1 + 3 files changed, 3 insertions(+) diff --git a/postgresql-libs.spec b/postgresql-libs.spec index 9fa2c85..c3c2e79 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -190,6 +190,7 @@ rm -f %my_provides %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so +%dir %_libdir/postgresql %_libdir/postgresql/pgxs %_includedir/pgsql %dir %_datadir/postgresql diff --git a/postgresql.spec b/postgresql.spec index dfdd1a3..e153612 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -502,6 +502,7 @@ rm -f %my_provides %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so +%dir %_libdir/postgresql %_libdir/postgresql/pgxs %_includedir/pgsql %dir %_datadir/postgresql diff --git a/postgresql.spec.in b/postgresql.spec.in index ef8c4fa..322cf6c 100644 --- a/postgresql.spec.in +++ b/postgresql.spec.in @@ -539,6 +539,7 @@ FI_POSTGRES %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so +%dir %_libdir/postgresql %_libdir/postgresql/pgxs %_includedir/pgsql %dir %_datadir/postgresql From 1699be4f2a3b5f234a455461a5f465edb79412c82013b557fee8504f76b0f931 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Wed, 16 Feb 2011 19:13:51 +0000 Subject: [PATCH 5/6] Move pg_config from -server to -devel to fix build of certain client software OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=45 --- postgresql-libs.changes | 8 ++++++++ postgresql-libs.spec | 7 ++++++- postgresql.changes | 8 ++++++++ postgresql.spec | 11 ++++++++--- postgresql.spec.in | 15 +++++++++++---- 5 files changed, 41 insertions(+), 8 deletions(-) diff --git a/postgresql-libs.changes b/postgresql-libs.changes index 91588a2..faccc84 100644 --- a/postgresql-libs.changes +++ b/postgresql-libs.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 16 19:10:54 UTC 2011 - max@novell.com + +- Move pg_config from -server to -devel to fix build of certain + client apps and language bindings, but using pg_config on the + client side is still considered broken, because it tells what + got linked into the server binary not what got linked into libpq. + ------------------------------------------------------------------- Tue Feb 8 18:23:22 UTC 2011 - max@novell.com diff --git a/postgresql-libs.spec b/postgresql-libs.spec index c3c2e79..1f17761 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -152,20 +152,23 @@ export CFLAGS="%optflags $SP" make -C src/backend %{?jobs:-j%jobs} libpq-recursive make -C src/interfaces %{?jobs:-j%jobs} make -C src/port %{?jobs:-j%jobs} libpgport.a +make -C src/bin/pg_config %{?jobs:-j%jobs} pg_config %install for dir in interfaces include port; do make -C src/$dir DESTDIR=%buildroot install done make -C src DESTDIR=%buildroot install-local +make -C src/bin/pg_config DESTDIR=%buildroot install install -d %buildroot%_mandir/man1 -install doc/src/sgml/man1/ecpg.1 %buildroot%_mandir/man1 +install doc/src/sgml/man1/{ecpg,pg_config}.1 %buildroot%_mandir/man1 # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) %find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang +%find_lang pg_config-%{pg_minor_version} %_name-devel.lang %post -n %libpq -p /sbin/ldconfig %postun -n %libpq -p /sbin/ldconfig %post -n %libecpg -p /sbin/ldconfig @@ -187,6 +190,8 @@ rm -f %my_provides %files -n %_name-devel -f %_name-devel.lang %defattr(-,root,root) %doc %_mandir/man1/ecpg.1* +%_bindir/pg_config +%doc %_mandir/man1/pg_config.1* %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so diff --git a/postgresql.changes b/postgresql.changes index 91588a2..faccc84 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 16 19:10:54 UTC 2011 - max@novell.com + +- Move pg_config from -server to -devel to fix build of certain + client apps and language bindings, but using pg_config on the + client side is still considered broken, because it tells what + got linked into the server binary not what got linked into libpq. + ------------------------------------------------------------------- Tue Feb 8 18:23:22 UTC 2011 - max@novell.com diff --git a/postgresql.spec b/postgresql.spec index e153612..51758b4 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -302,10 +302,12 @@ make -C src/include DESTDIR=%buildroot uninstall make -C src/port DESTDIR=%buildroot uninstall make -C src/makefiles DESTDIR=%buildroot uninstall make -C src DESTDIR=%buildroot uninstall-local +make -C src/bin/pg_config DESTDIR=%buildroot uninstall # We don't want to package these rm -f %buildroot%_libdir/postgresql/pgxs/config/install-sh rm -f %buildroot%_libdir/postgresql/pgxs/src/test/regress/pg_regress rm -f %buildroot%_mandir/*/ecpg* +rm -f %buildroot%_mandir/*/pg_config* %endif # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) @@ -346,8 +348,9 @@ done %find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang +%find_lang pg_config-%{pg_minor_version} %_name-devel.lang %endif -for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql pg_config;do +for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql;do %find_lang $serverapp-%{pg_minor_version} %{name}-server.lang done for pl in plperl plpython pltcl; do @@ -444,6 +447,8 @@ rm -f %my_provides %_libdir/postgresql/plpgsql.so %_libdir/postgresql/dict_snowball.so %_datadir/postgresql/tsearch_data +%exclude %_datadir/postgresql/tsearch_data/unaccent.rules +%exclude %_datadir/postgresql/tsearch_data/xsyn_sample.rules %_bindir/initdb %doc %_mandir/man1/initdb.1* %_bindir/pg_ctl @@ -457,8 +462,6 @@ rm -f %my_provides %_bindir/postmaster %doc %_mandir/man1/postmaster.1* %dir %_datadir/postgresql -%_bindir/pg_config -%doc %_mandir/man1/pg_config.1* %_datadir/postgresql/timezone* %_datadir/postgresql/*.* %exclude %_datadir/postgresql/*.pltcl @@ -499,6 +502,8 @@ rm -f %my_provides %files -n %_name-devel -f %_name-devel.lang %defattr(-,root,root) %doc %_mandir/man1/ecpg.1* +%_bindir/pg_config +%doc %_mandir/man1/pg_config.1* %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so diff --git a/postgresql.spec.in b/postgresql.spec.in index 322cf6c..5709987 100644 --- a/postgresql.spec.in +++ b/postgresql.spec.in @@ -293,6 +293,7 @@ IF_LIBS make -C src/backend %{?jobs:-j%jobs} libpq-recursive make -C src/interfaces %{?jobs:-j%jobs} make -C src/port %{?jobs:-j%jobs} libpgport.a +make -C src/bin/pg_config %{?jobs:-j%jobs} pg_config FI_LIBS IF_POSTGRES make %{?jobs:-j%jobs} world @@ -324,10 +325,12 @@ make -C src/include DESTDIR=%buildroot uninstall make -C src/port DESTDIR=%buildroot uninstall make -C src/makefiles DESTDIR=%buildroot uninstall make -C src DESTDIR=%buildroot uninstall-local +make -C src/bin/pg_config DESTDIR=%buildroot uninstall # We don't want to package these rm -f %buildroot%_libdir/postgresql/pgxs/config/install-sh rm -f %buildroot%_libdir/postgresql/pgxs/src/test/regress/pg_regress rm -f %buildroot%_mandir/*/ecpg* +rm -f %buildroot%_mandir/*/pg_config* %endif FI_POSTGRES IF_LIBS @@ -335,8 +338,9 @@ for dir in interfaces include port; do make -C src/$dir DESTDIR=%buildroot install done make -C src DESTDIR=%buildroot install-local +make -C src/bin/pg_config DESTDIR=%buildroot install install -d %buildroot%_mandir/man1 -install doc/src/sgml/man1/ecpg.1 %buildroot%_mandir/man1 +install doc/src/sgml/man1/{ecpg,pg_config}.1 %buildroot%_mandir/man1 FI_LIBS # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) @@ -379,9 +383,10 @@ FI_POSTGRES %find_lang libpq5-%{pg_minor_version} %libpq.lang %find_lang ecpglib6-%{pg_minor_version} %libecpg.lang %find_lang ecpg-%{pg_minor_version} %_name-devel.lang +%find_lang pg_config-%{pg_minor_version} %_name-devel.lang IF_POSTGRES %endif -for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql pg_config;do +for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql;do %find_lang $serverapp-%{pg_minor_version} %{name}-server.lang done for pl in plperl plpython pltcl; do @@ -480,6 +485,8 @@ IF_POSTGRES %_libdir/postgresql/plpgsql.so %_libdir/postgresql/dict_snowball.so %_datadir/postgresql/tsearch_data +%exclude %_datadir/postgresql/tsearch_data/unaccent.rules +%exclude %_datadir/postgresql/tsearch_data/xsyn_sample.rules %_bindir/initdb %doc %_mandir/man1/initdb.1* %_bindir/pg_ctl @@ -493,8 +500,6 @@ IF_POSTGRES %_bindir/postmaster %doc %_mandir/man1/postmaster.1* %dir %_datadir/postgresql -%_bindir/pg_config -%doc %_mandir/man1/pg_config.1* %_datadir/postgresql/timezone* %_datadir/postgresql/*.* %exclude %_datadir/postgresql/*.pltcl @@ -536,6 +541,8 @@ FI_POSTGRES %files -n %_name-devel -f %_name-devel.lang %defattr(-,root,root) %doc %_mandir/man1/ecpg.1* +%_bindir/pg_config +%doc %_mandir/man1/pg_config.1* %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so From ab4914b726fc207b16eb0b1a0e0201d842c96678e9cebcb788a23e84faf65403 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 17 Feb 2011 11:42:18 +0000 Subject: [PATCH 6/6] Fix build of external server extensions OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=46 --- postgresql-libs.changes | 6 ++++++ postgresql-libs.spec | 21 ++++++++++++++++----- postgresql.changes | 6 ++++++ postgresql.spec | 25 ++++++++++++++++--------- postgresql.spec.in | 31 +++++++++++++++++-------------- 5 files changed, 61 insertions(+), 28 deletions(-) diff --git a/postgresql-libs.changes b/postgresql-libs.changes index faccc84..84114c6 100644 --- a/postgresql-libs.changes +++ b/postgresql-libs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 17 11:38:42 UTC 2011 - max@novell.com + +- Move all of pgxs into the devel package to fix build of server + extensions. + ------------------------------------------------------------------- Wed Feb 16 19:10:54 UTC 2011 - max@novell.com diff --git a/postgresql-libs.spec b/postgresql-libs.spec index 1f17761..4fe911b 100644 --- a/postgresql-libs.spec +++ b/postgresql-libs.spec @@ -155,13 +155,24 @@ make -C src/port %{?jobs:-j%jobs} libpgport.a make -C src/bin/pg_config %{?jobs:-j%jobs} pg_config %install -for dir in interfaces include port; do - make -C src/$dir DESTDIR=%buildroot install -done -make -C src DESTDIR=%buildroot install-local -make -C src/bin/pg_config DESTDIR=%buildroot install +SUBINSTALL=install install -d %buildroot%_mandir/man1 install doc/src/sgml/man1/{ecpg,pg_config}.1 %buildroot%_mandir/man1 +if test -n "$SUBINSTALL"; then +# Install them for postgresql-libs and uninstall them for postgresql +make -C src DESTDIR=%buildroot $SUBINSTALL-local +for dir in \ + config \ + src/bin/pg_config \ + src/interfaces \ + src/include \ + src/makefiles \ + src/port \ + src/test/regress +do + make -C $dir DESTDIR=%buildroot $SUBINSTALL +done +fi # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) diff --git a/postgresql.changes b/postgresql.changes index faccc84..84114c6 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 17 11:38:42 UTC 2011 - max@novell.com + +- Move all of pgxs into the devel package to fix build of server + extensions. + ------------------------------------------------------------------- Wed Feb 16 19:10:54 UTC 2011 - max@novell.com diff --git a/postgresql.spec b/postgresql.spec index 51758b4..7bdd8d0 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -296,19 +296,26 @@ make check || { %install make DESTDIR=%buildroot install install-docs +SUBINSTALL=uninstall %if !%buildall -make -C src/interfaces DESTDIR=%buildroot uninstall -make -C src/include DESTDIR=%buildroot uninstall -make -C src/port DESTDIR=%buildroot uninstall -make -C src/makefiles DESTDIR=%buildroot uninstall -make -C src DESTDIR=%buildroot uninstall-local -make -C src/bin/pg_config DESTDIR=%buildroot uninstall -# We don't want to package these -rm -f %buildroot%_libdir/postgresql/pgxs/config/install-sh -rm -f %buildroot%_libdir/postgresql/pgxs/src/test/regress/pg_regress rm -f %buildroot%_mandir/*/ecpg* rm -f %buildroot%_mandir/*/pg_config* %endif +if test -n "$SUBINSTALL"; then +# Install them for postgresql-libs and uninstall them for postgresql +make -C src DESTDIR=%buildroot $SUBINSTALL-local +for dir in \ + config \ + src/bin/pg_config \ + src/interfaces \ + src/include \ + src/makefiles \ + src/port \ + src/test/regress +do + make -C $dir DESTDIR=%buildroot $SUBINSTALL +done +fi # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a) diff --git a/postgresql.spec.in b/postgresql.spec.in index 5709987..a6b4d7e 100644 --- a/postgresql.spec.in +++ b/postgresql.spec.in @@ -319,29 +319,32 @@ FI_POSTGRES %install IF_POSTGRES make DESTDIR=%buildroot install install-docs +SUBINSTALL=uninstall %if !%buildall -make -C src/interfaces DESTDIR=%buildroot uninstall -make -C src/include DESTDIR=%buildroot uninstall -make -C src/port DESTDIR=%buildroot uninstall -make -C src/makefiles DESTDIR=%buildroot uninstall -make -C src DESTDIR=%buildroot uninstall-local -make -C src/bin/pg_config DESTDIR=%buildroot uninstall -# We don't want to package these -rm -f %buildroot%_libdir/postgresql/pgxs/config/install-sh -rm -f %buildroot%_libdir/postgresql/pgxs/src/test/regress/pg_regress rm -f %buildroot%_mandir/*/ecpg* rm -f %buildroot%_mandir/*/pg_config* %endif FI_POSTGRES IF_LIBS -for dir in interfaces include port; do - make -C src/$dir DESTDIR=%buildroot install -done -make -C src DESTDIR=%buildroot install-local -make -C src/bin/pg_config DESTDIR=%buildroot install +SUBINSTALL=install install -d %buildroot%_mandir/man1 install doc/src/sgml/man1/{ecpg,pg_config}.1 %buildroot%_mandir/man1 FI_LIBS +if test -n "$SUBINSTALL"; then +# Install them for postgresql-libs and uninstall them for postgresql +make -C src DESTDIR=%buildroot $SUBINSTALL-local +for dir in \ + config \ + src/bin/pg_config \ + src/interfaces \ + src/include \ + src/makefiles \ + src/port \ + src/test/regress +do + make -C $dir DESTDIR=%buildroot $SUBINSTALL +done +fi # Don't ship static libraries, libpgport.a is needed, though. rm -f $(ls %buildroot/%_libdir/*.a | grep -F -v libpgport.a)