Hello community, here is the log from the commit of package postgresql for openSUSE:11.4 checked in at Fri Feb 18 14:11:19 CET 2011. -------- New Changes file: --- /dev/null 2010-08-26 16:28:41.000000000 +0200 +++ /mounts/work_src_done/11.4/postgresql/postgresql-libs.changes 2011-02-17 12:42:16.000000000 +0100 @@ -0,0 +1,1831 @@ +------------------------------------------------------------------- +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 + +- 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 + +- Remove unneeded PreReq from postgresql on postgresql-libs. + +------------------------------------------------------------------- +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 + +- 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. ++++ 1634 more lines (skipped) ++++ between /dev/null ++++ and /mounts/work_src_done/11.4/postgresql/postgresql-libs.changes --- old-versions/11.4/all/postgresql/postgresql.changes 2010-05-27 11:28:57.000000000 +0200 +++ /mounts/work_src_done/11.4/postgresql/postgresql.changes 2011-02-17 12:42:17.000000000 +0100 @@ -1,0 +2,155 @@ +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 + +- 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 + +- Remove unneeded PreReq from postgresql on postgresql-libs. + +------------------------------------------------------------------- +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 + +- 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. + +------------------------------------------------------------------- calling whatdependson for 11.4-i586 Old: ---- postgresql-8.4.4.tar.bz2 postgresql-perl-return.patch postgresql-perl-rpath.patch postgresql-pl.changes postgresql-pl.spec New: ---- postgresql-9.0.3.tar.bz2 postgresql-libs.changes postgresql-libs.spec postgresql-mkspecfiles postgresql-plperl.patch postgresql.spec.in ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ postgresql-libs.spec ++++++ # # spec file for package postgresql-libs # # Copyright (c) 2011 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: 1.<RELEASE2> %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 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 make -C src/bin/pg_config %{?jobs:-j%jobs} pg_config %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) %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 %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/pg_config %doc %_mandir/man1/pg_config.1* %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so %dir %_libdir/postgresql %_libdir/postgresql/pgxs %_includedir/pgsql %dir %_datadir/postgresql %_datadir/postgresql/pg_service.conf.sample %changelog ++++++ postgresql.spec ++++++ --- /var/tmp/diff_new_pack.JNzTTF/_old 2011-02-18 14:11:10.000000000 +0100 +++ /var/tmp/diff_new_pack.JNzTTF/_new 2011-02-18 14:11:10.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package postgresql (Version 8.4.4) +# spec file for package postgresql # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 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 @@ -18,16 +18,25 @@ Name: postgresql -BuildRequires: bison flex gettext-devel -BuildRequires: openldap2-devel openssl-devel pam-devel readline-devel zlib-devel -BuildRequires: ncurses-devel +BuildRequires: gettext-devel ncurses-devel readline-devel zlib-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.4 -Release: 2 -%define pg_minor_version %(echo %version | cut -f1-2 -d.) +Version: 9.0.3 +Release: 1.<RELEASE2> +%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,14 +48,15 @@ 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 -PreReq: postgresql-libs = %pg_minor_version +Patch4: postgresql-plperl.patch 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 @@ -60,28 +70,47 @@ 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 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 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 runtime library of the embedded SQL C +preprocessor for PostgreSQL. %package server License: BSD3c(or similar) @@ -142,13 +171,15 @@ 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 +191,72 @@ 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 +270,12 @@ --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 +284,7 @@ --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 +304,30 @@ %endif %install -make DESTDIR=%buildroot install +make DESTDIR=%buildroot install install-docs +SUBINSTALL=uninstall +%if !%buildall +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 %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 +349,6 @@ 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 +360,19 @@ 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 +%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 +%find_lang pg_config-%{pg_minor_version} %_name-devel.lang +%endif for serverapp in initdb postgres pg_controldata pg_ctl pg_resetxlog plpgsql;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 +390,14 @@ 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 +440,7 @@ %files docs %defattr(-,root,root) +%doc %_mandir/man3/* %docdir %_docdir/postgresql %dir %_docdir/postgresql %_docdir/postgresql/html @@ -361,10 +454,6 @@ %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 @@ -378,6 +467,8 @@ %_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 @@ -393,21 +484,56 @@ %dir %_datadir/postgresql %_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 +%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/pg_config -%_libdir/lib*.so +%doc %_mandir/man1/pg_config.1* +%_bindir/ecpg %_libdir/libpgport.a +%_libdir/lib*.so +%dir %_libdir/postgresql %_libdir/postgresql/pgxs -%doc %_mandir/man1/ecpg.1* -%doc %_mandir/man1/pg_config.1* +%_includedir/pgsql +%dir %_datadir/postgresql +%_datadir/postgresql/pg_service.conf.sample + +%endif %changelog ++++++ postgresql-8.4.4.tar.bz2 -> postgresql-9.0.3.tar.bz2 ++++++ old-versions/11.4/all/postgresql/postgresql-8.4.4.tar.bz2 /mounts/work_src_done/11.4/postgresql/postgresql-9.0.3.tar.bz2 differ: char 11, line 1 ++++++ postgresql-conf.patch ++++++ --- /var/tmp/diff_new_pack.JNzTTF/_old 2011-02-18 14:11:10.000000000 +0100 +++ /var/tmp/diff_new_pack.JNzTTF/_new 2011-02-18 14:11:10.000000000 +0100 @@ -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 ++++++ postgresql-init ++++++ --- /var/tmp/diff_new_pack.JNzTTF/_old 2011-02-18 14:11:10.000000000 +0100 +++ /var/tmp/diff_new_pack.JNzTTF/_new 2011-02-18 14:11:10.000000000 +0100 @@ -56,30 +56,6 @@ 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 @@ } 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 @@ # 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 ;; ++++++ postgresql-mkspecfiles ++++++ #!/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 ++++++ postgresql-plperl.patch ++++++ --- src/pl/plperl/plperl.c +++ src/pl/plperl/plperl.c @@ -652,6 +652,7 @@ RETPUSHYES; DIE(aTHX_ "Unable to load %s into plperl", name); + return NULL; /* make rpmlint happy */ } ++++++ postgresql-regress.patch ++++++ --- /var/tmp/diff_new_pack.JNzTTF/_old 2011-02-18 14:11:10.000000000 +0100 +++ /var/tmp/diff_new_pack.JNzTTF/_new 2011-02-18 14:11:10.000000000 +0100 @@ -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 @@ ++++++ postgresql-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.JNzTTF/_old 2011-02-18 14:11:10.000000000 +0100 +++ /var/tmp/diff_new_pack.JNzTTF/_new 2011-02-18 14:11:10.000000000 +0100 @@ -2,3 +2,5 @@ addFilter("unnecessary-buildrequires") addFilter("patch-not-applied") addFilter("non-standard-uid") +addFilter("file-not-in-%lang") +addFilter("no-dependency-on") ++++++ postgresql.spec.in ++++++ # # 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 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 make -C src/bin/pg_config %{?jobs:-j%jobs} pg_config 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 SUBINSTALL=uninstall %if !%buildall rm -f %buildroot%_mandir/*/ecpg* rm -f %buildroot%_mandir/*/pg_config* %endif FI_POSTGRES IF_LIBS 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) 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 %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;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 %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 %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 %_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/pg_config %doc %_mandir/man1/pg_config.1* %_bindir/ecpg %_libdir/libpgport.a %_libdir/lib*.so %dir %_libdir/postgresql %_libdir/postgresql/pgxs %_includedir/pgsql %dir %_datadir/postgresql %_datadir/postgresql/pg_service.conf.sample IF_POSTGRES %endif FI_POSTGRES %changelog ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org