Преглед на файлове

finally upgrade to PostgreSQL 8.3

Ralf S. Engelschall преди 17 години
родител
ревизия
71cfe0815c
променени са 2 файла, в които са добавени 45 реда и са изтрити 24 реда
  1. 22 17
      postgresql/postgresql.patch
  2. 23 7
      postgresql/postgresql.spec

+ 22 - 17
postgresql/postgresql.patch

@@ -1,19 +1,24 @@
-Index: src/template/freebsd
---- src/template/freebsd.orig	2006-03-11 05:38:41 +0100
-+++ src/template/freebsd	2006-11-20 20:54:27 +0100
-@@ -1,5 +1,5 @@
- # $PostgreSQL: pgsql/src/template/freebsd,v 1.35 2006/03/11 04:38:41 momjian Exp $
+Index: src/backend/Makefile
+--- src/backend/Makefile.orig	2007-08-21 03:11:12 +0200
++++ src/backend/Makefile	2007-10-09 12:37:14 +0200
+@@ -30,7 +30,7 @@
+ LIBS := $(filter-out -lpgport, $(LIBS)) $(LDAP_LIBS_BE)
  
- case $host_cpu in
--  alpha*)   CFLAGS="-O";;  # alpha has problems with -O2
-+  alpha*)   CFLAGS=`echo "x$CFLAGS" | sed -e 's;^x;;' -e 's;-O2;-O;'`;;  # alpha has problems with -O2
- esac
-Index: src/template/linux
---- src/template/linux.orig	2006-03-11 05:38:41 +0100
-+++ src/template/linux	2006-11-20 20:54:27 +0100
-@@ -1,4 +1,4 @@
- # $PostgreSQL: pgsql/src/template/linux,v 1.28 2006/03/11 04:38:41 momjian Exp $
+ # The backend doesn't need everything that's in LIBS, however
+-LIBS := $(filter-out -lz -lreadline -ledit -ltermcap -lncurses -lcurses, $(LIBS))
++LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses, $(LIBS))
+ 
+ ##########################################################################
+ 
+Index: src/include/port.h
+--- src/include/port.h.orig	2007-09-29 00:25:49 +0200
++++ src/include/port.h	2007-10-09 12:30:19 +0200
+@@ -329,7 +329,7 @@
+ extern int	getopt(int nargc, char *const * nargv, const char *ostr);
+ #endif
+ 
+-#ifndef HAVE_ISINF
++#if !defined(HAVE_ISINF) && !defined(__FreeBSD__)
+ extern int	isinf(double x);
+ #endif
  
- # Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise
--CPPFLAGS="-D_GNU_SOURCE"
-+CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"

+ 23 - 7
postgresql/postgresql.spec

@@ -22,7 +22,9 @@
 ##
 
 #   package versions
-%define       V_postgresql      8.2.7
+%define       V_postgresql      8.3.1
+%define       V_postgresql_dist 8.3.1
+%define       V_postgresql_dir  8.3.1
 %define       V_libpqxx         2.6.9
 %define       V_perl            5.8.8
 %define       V_pgperl          2.0.2
@@ -30,8 +32,8 @@
 %define       V_pgjdbc          8.3-603
 %define       V_slony1_major    1.2
 %define       V_slony1_minor    13
-%define       V_pgcluster       1.7.0rc12
-%define       V_pgcluster_dir   1708
+%define       V_pgcluster       1.9.0rc5
+%define       V_pgcluster_dir   1706
 %define       V_mysqlcompat     1.0b3
 %define       V_mysqlcompat_dir 548
 
@@ -46,7 +48,7 @@ Class:        BASE
 Group:        Database
 License:      GPL
 Version:      %{V_postgresql}
-Release:      20080329
+Release:      20080402
 
 #   package options
 %option       with_server       yes
@@ -61,9 +63,10 @@ Release:      20080329
 %option       with_kerberos     no
 %option       with_mysqlcompat  no
 %option       with_int_datetime no
+%option       with_xml          no
 
 #   list of sources
-Source0:      ftp://ftp.postgresql.org/pub/source/v%{V_postgresql}/postgresql-%{V_postgresql}.tar.bz2
+Source0:      ftp://ftp.postgresql.org/pub/source/v%{V_postgresql_dir}/postgresql-%{V_postgresql_dist}.tar.bz2
 Source1:      http://pqxx.org/download/software/libpqxx/libpqxx-%{V_libpqxx}.tar.gz
 Source2:      ftp://gborg.postgresql.org/pub/pgperl/stable/pgperl-%{V_pgperl}.tar.gz
 Source3:      ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-%{V_psqlodbc}.tar.gz
@@ -103,8 +106,14 @@ PreReq:       tcl, tcl::with_x11 = yes, X11
 BuildPreReq:  KERBEROS
 PreReq:       KERBEROS
 %endif
+%if "%{with_xml}" == "yes"
+BuildPreReq:  libxml, libxslt, zlib
+PreReq:       libxml, libxslt, zlib
+%endif
 AutoReq:      no
 AutoReqProv:  no
+Provides:     postgresql = %{version}-%{release}
+Conflicts:    postgresql
 
 %description
     PostgreSQL is a sophisticated Object-Relational Database Management
@@ -127,9 +136,9 @@ AutoReqProv:  no
 
 %track
     prog postgresql = {
-        version   = %{V_postgresql}
+        version   = %{V_postgresql_dist}
         url       = ftp://ftp.postgresql.org/pub/source/
-        regex     = v(8\.2(\.\d+)*)
+        regex     = v(\d+\.\d+(\.\d+)*(?:beta\d*)?)
         url       = ftp://ftp.postgresql.org/pub/source/v__NEWVER__/
         regex     = postgresql-(\d+(\.\d+)+)\.tar\.(bz2|gz)
     }
@@ -255,6 +264,9 @@ AutoReqProv:  no
     case "%{l_platform -t}" in
         *-freebsd* ) LIBS="$LIBS -lcompat" ;;
     esac
+%endif
+%if "%{with_xml}" == "yes"
+    LIBS="$LIBS -liconv"
 %endif
     export TAR="%{l_tar}"
     export YACC="bison -y"
@@ -280,6 +292,10 @@ AutoReqProv:  no
 %endif
 %if "%{with_int_datetime}" == "yes"
         --enable-integer-datetimes \
+%endif
+%if "%{with_xml}" == "yes"
+        --with-libxml \
+        --with-libxslt \
 %endif
         --disable-syslog \
         --disable-shared