From: cvs2git Date: Thu, 20 Nov 2003 04:49:08 +0000 (+0000) Subject: This commit was manufactured by cvs2git to create tag 'STABLE'. X-Git-Tag: STABLE X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=refs%2Ftags%2FSTABLE;p=packages%2Fpostgresql.git This commit was manufactured by cvs2git to create tag 'STABLE'. Sprout from master 2002-10-03 13:11:48 UTC Arkadiusz Miśkiewicz '- more things, reminder about password etc' Cherrypick from master 2000-10-06 18:33:19 UTC mis '- cosmetics': postgresql-perl.patch -> 1.2 postgresql-pgaccess-typo.patch -> 1.1 postgresql-python.patch -> 1.1 Cherrypick from master 2002-02-21 03:39:20 UTC kloczek '- variouse fixes for contrib (patch stolen from rawhide).': postgresql-contribfixes.patch -> 1.1 Cherrypick from RA-branch 2003-11-20 04:49:08 UTC undefine '- add pam support on RA-branch too': postgresql-acfix.patch -> 1.1.2.1 postgresql-to_ascii-overflows.patch -> 1.1.2.1 postgresql.spec -> 1.169.2.9 --- diff --git a/postgresql-acfix.patch b/postgresql-acfix.patch new file mode 100644 index 0000000..1e47ba3 --- /dev/null +++ b/postgresql-acfix.patch @@ -0,0 +1,11 @@ +--- postgresql-7.2.3/config/general.m4.orig Tue Feb 4 12:26:06 2003 ++++ postgresql-7.2.3/config/general.m4 Tue Feb 4 12:25:41 2003 +@@ -41,7 +41,7 @@ + define([pgac_variable], [pgac_arg_to_variable([$1], [$2])])[]dnl + dnl Register help string, only if there is one + ifelse([$3], [], [], +-[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl ++[AC_DIVERT_PUSH(NOTICE)dnl + ac_help="$ac_help + [$3]" + AC_DIVERT_POP()])dnl diff --git a/postgresql-contribfixes.patch b/postgresql-contribfixes.patch new file mode 100644 index 0000000..38776c1 --- /dev/null +++ b/postgresql-contribfixes.patch @@ -0,0 +1,162 @@ +diff -uNr postgresql-7.2.orig/contrib/intarray/_int.c postgresql-7.2/contrib/intarray/_int.c +--- postgresql-7.2.orig/contrib/intarray/_int.c Thu Oct 4 11:41:14 2001 ++++ postgresql-7.2/contrib/intarray/_int.c Fri Feb 8 14:36:08 2002 +@@ -22,6 +22,7 @@ + #include "utils/array.h" + #include "utils/builtins.h" + #include "storage/bufpage.h" ++#include "access/tuptoaster.h" + + /* number ranges for compression */ + #define MAXNUMRANGE 100 +@@ -358,6 +359,8 @@ + if (entry->leafkey) { + r = (ArrayType *) PG_DETOAST_DATUM_COPY(entry->key); + PREPAREARR(r); ++ if ( VARSIZE(r) > TOAST_INDEX_TARGET ) ++ elog(ERROR,"Array is too big"); + r->flags |= LEAFKEY; + retval = palloc(sizeof(GISTENTRY)); + gistentryinit(*retval, PointerGetDatum(r), +diff -uNr postgresql-7.2.orig/contrib/tsearch/README.tsearch postgresql-7.2/contrib/tsearch/README.tsearch +--- postgresql-7.2.orig/contrib/tsearch/README.tsearch Fri Oct 12 19:19:09 2001 ++++ postgresql-7.2/contrib/tsearch/README.tsearch Fri Feb 8 14:36:08 2002 +@@ -198,23 +198,6 @@ + make clean; make; make install + + 2. +-As it was mentioned above we don't use explicitly ID of lexems +-as in OpenFTS but use hash function (crc32) instead to map lexem to +-integer. Our experiments show that probability of collision is quite small: +-for english text it's about 10**(-6) and 10**(-5) for russian collection. +-Default installation doesn't check for collisions but if your application +-does need to guarantee an exact (no collisions) search, you need +-to update system table to mark index islossy: +- +- update pg_amop set amopreqcheck = true where amopclaid = +- (select oid from pg_opclass where opcname = 'gist_txtidx_ops'); +- +-If you don't bother about collisions : +- +- update pg_amop set amopreqcheck = false where amopclaid = +- (select oid from pg_opclass where opcname = 'gist_txtidx_ops'); +- +-3. + txtidx doesn't preserve words ordering (this is not critical for searching) + for performance reason, for example: + +@@ -224,7 +207,7 @@ + 'two' 'page' + (1 row) + +-4. ++3. + Indexed access provided by txtidx data type isn't always good + because of internal data structure we use (RD-Tree). Particularly, + queries like '!gist' will be slower than just a sequential scan, +@@ -265,7 +248,7 @@ + These two queries will be processed by scanning of full index ! + Very slow ! + +-5. ++4. + Following selects produce the same result + + select title from titles where titleidx @@ 'patch&gist'; +diff -uNr postgresql-7.2.orig/contrib/tsearch/gistidx.c postgresql-7.2/contrib/tsearch/gistidx.c +--- postgresql-7.2.orig/contrib/tsearch/gistidx.c Fri Oct 12 19:19:09 2001 ++++ postgresql-7.2/contrib/tsearch/gistidx.c Fri Feb 8 14:36:08 2002 +@@ -10,6 +10,7 @@ + #include "utils/array.h" + #include "utils/builtins.h" + #include "storage/bufpage.h" ++#include "access/tuptoaster.h" + + #include "txtidx.h" + #include "query.h" +@@ -86,6 +87,15 @@ + return res + 1 - a; + } + ++static void ++makesign( BITVECP sign, GISTTYPE *a) { ++ int4 k,len = ARRNELEM( a ); ++ int4 *ptr = GETARR( a ); ++ MemSet( (void*)sign, 0, sizeof(BITVEC) ); ++ for(k=0;klen = len; + } +- ++ ++ /* make signature, if array is too long */ ++ if ( res->len > TOAST_INDEX_TARGET ) { ++ GISTTYPE *ressign; ++ ++ len = CALCGTSIZE( SIGNKEY, 0 ); ++ ressign = (GISTTYPE*)palloc( len ); ++ ressign->len = len; ++ ressign->flag = SIGNKEY; ++ makesign( GETSIGN(ressign), res ); ++ free(res); ++ res = ressign; ++ } ++ + retval = (GISTENTRY*)palloc(sizeof(GISTENTRY)); + gistentryinit(*retval, PointerGetDatum(res), + entry->rel, entry->page, +@@ -379,14 +402,6 @@ + PG_RETURN_POINTER( penalty ); + } + +-static void +-makesign( BITVECP sign, GISTTYPE *a) { +- int4 k,len = ARRNELEM( a ); +- int4 *ptr = GETARR( a ); +- MemSet( (void*)sign, 0, sizeof(BITVEC) ); +- for(k=0;kspl_right; + v->spl_nright = 0; + ++ if ( seed_1 == 0 || seed_2 == 0 ) { ++ seed_1 = 1; ++ seed_2 = 2; ++ } ++ + /* form initial .. */ + if ( cache[seed_1].allistrue ) { + datum_l = (GISTTYPE*)palloc( CALCGTSIZE( SIGNKEY|ALLISTRUE, 0 ) ); +diff -uNr postgresql-7.2.orig/contrib/tsearch/tsearch.sql.in postgresql-7.2/contrib/tsearch/tsearch.sql.in +--- postgresql-7.2.orig/contrib/tsearch/tsearch.sql.in Mon Nov 26 12:45:41 2001 ++++ postgresql-7.2/contrib/tsearch/tsearch.sql.in Fri Feb 8 14:36:08 2002 +@@ -171,7 +171,7 @@ + and ( tq.typname='query_txt' or tq.typname='mquery_txt' ); + + INSERT INTO pg_amop (amopclaid, amopstrategy, amopreqcheck, amopopr) +- SELECT opcl.oid, 1, false, c.opoid ++ SELECT opcl.oid, 1, true, c.opoid + FROM pg_opclass opcl, txtidx_ops_tmp c + WHERE + opcamid = (SELECT oid FROM pg_am WHERE amname = 'gist') +@@ -179,7 +179,7 @@ + and c.oprname = '@@'; + + INSERT INTO pg_amop (amopclaid, amopstrategy, amopreqcheck, amopopr) +- SELECT opcl.oid, 2, false, c.opoid ++ SELECT opcl.oid, 2, true, c.opoid + FROM pg_opclass opcl, txtidx_ops_tmp c + WHERE + opcamid = (SELECT oid FROM pg_am WHERE amname = 'gist') diff --git a/postgresql-perl.patch b/postgresql-perl.patch new file mode 100644 index 0000000..93887ec --- /dev/null +++ b/postgresql-perl.patch @@ -0,0 +1,17 @@ +--- postgresql-6.4.2.old/src/interfaces/Makefile Wed Jun 30 11:32:56 1999 ++++ postgresql-6.4.2/src/interfaces/Makefile Wed Jun 30 11:35:29 1999 +@@ -34,12 +34,8 @@ + $(MAKE) -C libpgtcl $@ + endif + ifeq ($(USE_PERL), true) +- if [ "$@" = "install" ]; then \ +- $(MAKE) $(MFLAGS) install-perl5; \ +- else \ +- $(MAKE) $(MFLAGS) perl5/Makefile; \ +- $(MAKE) $(MFLAGS) -C perl5 $@; \ +- fi ++ $(MAKE) $(MFLAGS) perl5/Makefile; ++ $(MAKE) $(MFLAGS) -C perl5 $@; + endif + ifeq ($(USE_ODBC), true) + $(MAKE) -C odbc $@ diff --git a/postgresql-pgaccess-typo.patch b/postgresql-pgaccess-typo.patch new file mode 100644 index 0000000..f73d2ee --- /dev/null +++ b/postgresql-pgaccess-typo.patch @@ -0,0 +1,12 @@ +diff -urN postgresql-7.0.2/src/bin/pgaccess/Makefile postgresql-7.0.2-new/src/bin/pgaccess/Makefile +--- postgresql-7.0.2/src/bin/pgaccess/Makefile Fri Oct 6 17:55:59 2000 ++++ postgresql-7.0.2-new/src/bin/pgaccess/Makefile Fri Oct 6 17:54:22 2000 +@@ -22,7 +22,7 @@ + + install: + $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/help +- $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/anguages ++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/languages + $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/images + $(INSTALL) $(INSTL_EXE_OPTS) pgaccess $(DESTDIR)$(BINDIR)/pgaccess + $(INSTALL) $(INSTL_EXE_OPTS) main.tcl $(DESTDIR)$(LIBDIR)/pgaccess diff --git a/postgresql-python.patch b/postgresql-python.patch new file mode 100644 index 0000000..ffb9aab --- /dev/null +++ b/postgresql-python.patch @@ -0,0 +1,36 @@ +diff -Nru postgresql-7.0.2/src/interfaces/python/mkdefines postgresql-7.0.2.new/src/interfaces/python/mkdefines +--- postgresql-7.0.2/src/interfaces/python/mkdefines Mon May 17 08:15:27 1999 ++++ postgresql-7.0.2.new/src/interfaces/python/mkdefines Thu Jul 6 02:34:09 2000 +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/python ++#! /usr/bin/python + + import string + +diff -Nru postgresql-7.0.2/src/interfaces/python/tutorial/advanced.py postgresql-7.0.2.new/src/interfaces/python/tutorial/advanced.py +--- postgresql-7.0.2/src/interfaces/python/tutorial/advanced.py Mon May 17 08:06:28 1999 ++++ postgresql-7.0.2.new/src/interfaces/python/tutorial/advanced.py Thu Jul 6 02:32:57 2000 +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/python ++#! /usr/bin/python + # advanced.py - demo of advanced features of PostGres. Some may not be ANSI. + # inspired from the Postgres tutorial + # adapted to Python 1995 by Pascal Andre +diff -Nru postgresql-7.0.2/src/interfaces/python/tutorial/basics.py postgresql-7.0.2.new/src/interfaces/python/tutorial/basics.py +--- postgresql-7.0.2/src/interfaces/python/tutorial/basics.py Mon May 17 08:06:30 1999 ++++ postgresql-7.0.2.new/src/interfaces/python/tutorial/basics.py Thu Jul 6 02:32:50 2000 +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/python ++#! /usr/bin/python + # basics.py - basic SQL commands tutorial + # inspired from the Postgres95 tutorial + # adapted to Python 1995 by Pascal ANDRE +diff -Nru postgresql-7.0.2/src/interfaces/python/tutorial/pgtools.py postgresql-7.0.2.new/src/interfaces/python/tutorial/pgtools.py +--- postgresql-7.0.2/src/interfaces/python/tutorial/pgtools.py Mon May 17 08:06:34 1999 ++++ postgresql-7.0.2.new/src/interfaces/python/tutorial/pgtools.py Thu Jul 6 02:32:46 2000 +@@ -1,4 +1,4 @@ +-#! /usr/local/bin/python ++#! /usr/bin/python + # pgtools.py - valuable functions for PostGreSQL tutorial + # written 1995 by Pascal ANDRE + diff --git a/postgresql-to_ascii-overflows.patch b/postgresql-to_ascii-overflows.patch new file mode 100644 index 0000000..edde445 --- /dev/null +++ b/postgresql-to_ascii-overflows.patch @@ -0,0 +1,56 @@ +cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot diff -u -rREL7_2_4 -rREL7_2_STABLE pgsql-server/src/backend/utils/adt/ascii.c + +Index: pgsql-server/src/backend/utils/adt/ascii.c +=================================================================== +RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/ascii.c,v +retrieving revision 1.12 +retrieving revision 1.12.2.2 +diff -u -r1.12 -r1.12.2.2 +--- pgsql-server/src/backend/utils/adt/ascii.c 5 Nov 2001 17:46:28 -0000 1.12 ++++ pgsql-server/src/backend/utils/adt/ascii.c 14 Jul 2003 16:41:56 -0000 1.12.2.2 +@@ -1,7 +1,7 @@ + /* ----------------------------------------------------------------------- + * ascii.c + * +- * $Header$ ++ * $Header$ + * + * Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group + * +@@ -67,9 +67,9 @@ + char * + pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *desc, int enc) + { +- unsigned char *x = NULL; +- unsigned char *ascii = NULL; +- int range = 0; ++ unsigned char *x; ++ unsigned char *ascii; ++ int range; + + /* + * relevant start for an encoding +@@ -106,12 +106,13 @@ + { + elog(ERROR, "pg_to_ascii(): unsupported encoding from %s", + pg_encoding_to_char(enc)); ++ return NULL; /* keep compiler quiet */ + } + + /* + * Encode + */ +- for (x = src; x <= src_end; x++) ++ for (x = src; x < src_end; x++) + { + if (*x < 128) + *desc++ = *x; +@@ -133,7 +134,7 @@ + { + pg_to_ascii( + (unsigned char *) VARDATA(data), /* src */ +- VARDATA(data) + VARSIZE(data), /* src end */ ++ (unsigned char *) (data) + VARSIZE(data), /* src end */ + (unsigned char *) VARDATA(data), /* desc */ + enc); /* encoding */ + diff --git a/postgresql.spec b/postgresql.spec index 11811e3..98af97e 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -2,7 +2,9 @@ # Conditional build: # _with_jdbc - with JDBC driver # - +# TODO: +# - put pgcrypto docs into docdir +# - put pgcrypto sql files in %{_datadir}/postgresql %include /usr/lib/rpm/macros.perl %include /usr/lib/rpm/macros.python @@ -17,13 +19,15 @@ Summary(tr): Veri Taban Summary(uk): PostgreSQL - ÓÉÓÔÅÍÁ ËÅÒÕ×ÁÎÎÑ ÂÁÚÁÍÉ ÄÁÎÉÈ Summary(zh_CN): PostgreSQL ¿Í»§¶Ë³ÌÐòºÍ¿âÎļþ Name: postgresql -Version: 7.2.3 -Release: 1 +Version: 7.2.4 +Release: 4 License: BSD Group: Applications/Databases Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: b767f204a91097f1b3a6d2b4c39eac7a Source1: %{name}.init Source2: pgsql-Database-HOWTO-html.tar.gz +# Source2-md5: 5b656ddf1db41965761f85204a14398e Source3: %{name}.sysconfig Source4: pgaccess.desktop Source5: pgaccess.png @@ -33,6 +37,8 @@ Patch2: %{name}-ac_fixes.patch Patch3: %{name}-pg_ctl-silent.patch Patch4: %{name}-DESTDIR.patch Patch5: %{name}-pg_ctl-nopsql.patch +Patch6: %{name}-acfix.patch +Patch7: %{name}-to_ascii-overflows.patch Icon: postgresql.xpm URL: http://www.postgresql.org/ BuildRequires: XFree86-devel @@ -43,6 +49,7 @@ BuildRequires: tk-devel >= 8.3.2 BuildRequires: readline-devel >= 4.2 BuildRequires: ncurses-devel >= 5.0 BuildRequires: openssl-devel >= 0.9.6a +BuildRequires: pam-devel BuildRequires: perl-devel >= 5.6 BuildRequires: python-devel >= 2.2.1 BuildRequires: rpm-perlprov @@ -882,6 +889,18 @@ potrzeby. Za pomoc± komendy createlang mo¿na dodaæ wsparcie dla jêzyka proceduralnego PL/TCL dla swojej bazy danych. +%package module-pgcrypto +Summary: Cryptographic functions for PostgreSQL +Summary(pl): Funkcje kryptograficzne dla PostgreSQL +Group: Applications/Databases +Requires: %{name} = %{version} + +%description module-pgcrypto +Cryptographic functions for PostgreSQL. + +%description module-pgcrypto -l pl +Funkcje kryptograficzne dla PostgreSQL. + %prep %setup -q %patch0 -p1 @@ -890,6 +909,8 @@ proceduralnego PL/TCL dla swojej bazy danych. %patch3 -p1 %patch4 -p1 %patch5 -p0 +%patch6 -p1 +%patch7 -p1 tar xzf doc/man*.tar.gz @@ -901,7 +922,7 @@ rm -fR `find contrib/ -type d -name CVS` %build rm -f config/libtool.m4 -aclocal -I config +%{__aclocal} -I config %{__autoconf} %configure \ %{!?_without_pgsql_locale:--enable-locale} \ @@ -912,6 +933,7 @@ aclocal -I config --enable-recode \ --enable-syslog \ --enable-unicode-conversion \ + --with-pam \ --with-CXX \ --with-tcl \ --with-tk \ @@ -928,6 +950,9 @@ aclocal -I config %{!?_without_tests: %{__make} check } %endif +cd contrib/pgcrypto/ +%{__make} + %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ @@ -971,6 +996,9 @@ install -d howto %py_comp $RPM_BUILD_ROOT%{py_libdir} %py_ocomp $RPM_BUILD_ROOT%{py_libdir} +cd contrib/pgcrypto/ +%{__make} install DESTDIR=$RPM_BUILD_ROOT + %clean rm -rf $RPM_BUILD_ROOT rm -f /tmp/tmp_perl_info @@ -1055,6 +1083,7 @@ fi %dir %{_pgsqldir} %dir %{_pgmoduledir} +%dir %{_datadir}/postgresql %{_datadir}/postgresql/*.bki %{_datadir}/postgresql/*.sample %{_datadir}/postgresql/*.description @@ -1236,3 +1265,10 @@ fi %files module-pltcl %defattr(644,root,root,755) %attr(755,root,root) %{_pgmoduledir}/pltcl.so + +%files module-pgcrypto +%defattr(644,root,root,755) +%attr(755,root,root) %{_pgmoduledir}/pgcrypto.so +# Hmm i think two below lines shouldn't be here - but i can be wrong ;) +#%{_datadir}/%{name}/contrib/pgcrypto.sql +#%{_datadir}/info/%{name}/contrib/README.pgcrypto.gz