aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2011-03-20 14:53:42 -0400
committerAaron W. Swenson <titanofold@gentoo.org>2011-03-20 14:53:42 -0400
commit74d7c558dc2b9737bffcf5104aedf1c2d123522c (patch)
tree6be66949339237dbdcffa5a4a20af7daf42af878
parentInitial commit. README describes repository layout. (diff)
downloadpatches-74d7c558dc2b9737bffcf5104aedf1c2d123522c.tar.gz
patches-74d7c558dc2b9737bffcf5104aedf1c2d123522c.tar.bz2
patches-74d7c558dc2b9737bffcf5104aedf1c2d123522c.zip
Initial commit of 8.4 patches
-rw-r--r--postgresql-8.4-SuperH.patch33
-rw-r--r--postgresql-8.4-autoconf.patch14
-rw-r--r--postgresql-8.4-base.patch141
-rw-r--r--postgresql-8.4-darwin.patch19
-rw-r--r--postgresql-8.4-regress.patch53
-rw-r--r--postgresql-8.4-server.patch190
6 files changed, 450 insertions, 0 deletions
diff --git a/postgresql-8.4-SuperH.patch b/postgresql-8.4-SuperH.patch
new file mode 100644
index 0000000..08fe55a
--- /dev/null
+++ b/postgresql-8.4-SuperH.patch
@@ -0,0 +1,33 @@
+diff -Naur a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
+--- a/src/include/storage/s_lock.h 2011-01-27 21:23:36.000000000 -0500
++++ b/src/include/storage/s_lock.h 2011-03-20 14:01:26.453521541 -0400
+@@ -298,6 +298,29 @@
+
+ #endif /* __s390__ || __s390x__ */
+
++#if defined(__sh__)
++#define HAS_TEST_AND_SET
++
++typedef unsigned char slock_t;
++
++#define TAS(lock) tas(lock)
++
++static __inline__ int
++tas(volatile slock_t *lock)
++{
++ register int _res = 1;
++
++ __asm__ __volatile__(
++ "tas.b @%1\n\t"
++ "movt %0\n\t"
++ "xor #1,%0"
++: "=z"(_res)
++: "r"(lock)
++: "t","memory");
++ return _res;
++}
++
++#endif /* __sh__ */
+
+ #if defined(__sparc__) /* Sparc */
+ #define HAS_TEST_AND_SET
diff --git a/postgresql-8.4-autoconf.patch b/postgresql-8.4-autoconf.patch
new file mode 100644
index 0000000..0f9c0c6
--- /dev/null
+++ b/postgresql-8.4-autoconf.patch
@@ -0,0 +1,14 @@
+diff -Naur a/configure.in b/configure.in
+--- a/configure.in 2011-01-27 21:23:36.000000000 -0500
++++ b/configure.in 2011-03-20 14:12:28.647638541 -0400
+@@ -19,10 +19,6 @@
+
+ AC_INIT([PostgreSQL], [8.4.7], [pgsql-bugs@postgresql.org])
+
+-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.61], [], [m4_fatal([Autoconf version 2.61 is required.
+-Untested combinations of 'autoconf' and PostgreSQL versions are not
+-recommended. You can remove the check from 'configure.in' but it is then
+-your responsibility whether the result works or not.])])
+ AC_COPYRIGHT([Copyright (c) 1996-2009, PostgreSQL Global Development Group])
+ AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+ AC_CONFIG_AUX_DIR(config)
diff --git a/postgresql-8.4-base.patch b/postgresql-8.4-base.patch
new file mode 100644
index 0000000..3acefd3
--- /dev/null
+++ b/postgresql-8.4-base.patch
@@ -0,0 +1,141 @@
+diff -Naur a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/contrib/Makefile 2011-03-20 14:24:39.406295541 -0400
+@@ -5,46 +5,10 @@
+ include $(top_builddir)/src/Makefile.global
+
+ WANTED_DIRS = \
+- adminpack \
+- auto_explain \
+- btree_gin \
+- btree_gist \
+- chkpass \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- earthdistance \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_standby \
+- pg_stat_statements \
+- pg_trgm \
+ pgbench \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- seg \
+- spi \
+- tablefunc \
+- test_parser \
+- tsearch2 \
+ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-WANTED_DIRS += sslinfo
+-endif
+-
+ ifeq ($(with_ossp_uuid),yes)
+ WANTED_DIRS += uuid-ossp
+ endif
+diff -Naur a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/Makefile 2011-03-20 14:31:28.276295541 -0400
+@@ -15,16 +15,11 @@
+
+ all install installdirs uninstall distprep:
+ $(MAKE) -C port $@
+- $(MAKE) -C timezone $@
+ $(MAKE) -C backend $@
+- $(MAKE) -C backend/utils/mb/conversion_procs $@
+- $(MAKE) -C backend/snowball $@
+ $(MAKE) -C include $@
+ $(MAKE) -C interfaces $@
+ $(MAKE) -C bin $@
+- $(MAKE) -C pl $@
+ $(MAKE) -C makefiles $@
+- $(MAKE) -C test/regress $@
+
+ install: install-local
+
+diff -Naur a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/backend/Makefile 2011-03-20 14:27:56.756295541 -0400
+@@ -42,7 +42,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport postgres $(POSTGRES_IMP)
++all: someheaders
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -111,7 +111,7 @@
+ endif # aix
+
+ # Update the commonly used headers before building the subdirectories
+-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
+
+
+ # The postgres.o target is needed by the rule in Makefile.global that
+@@ -165,23 +165,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naur a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/bin/Makefile 2011-03-20 14:29:08.726295541 -0400
+@@ -13,8 +13,7 @@
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
+-DIRS = initdb pg_ctl pg_dump \
+- psql scripts pg_config pg_controldata pg_resetxlog
++DIRS = pg_dump psql scripts pg_config
+ ifeq ($(PORTNAME), win32)
+ DIRS+=pgevent
+ endif
+diff -Naur a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
+--- a/src/include/pg_config_manual.h 2011-01-27 21:23:36.000000000 -0500
++++ b/src/include/pg_config_manual.h 2011-03-20 14:30:40.046295541 -0400
+@@ -146,7 +146,7 @@
+ * here's where to twiddle it. You can also override this at runtime
+ * with the postmaster's -k switch.
+ */
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "@GENTOO_PORTAGE_EPREFIX@/var/run/postgresql"
+
+ /*
+ * The random() function is expected to yield values between 0 and
diff --git a/postgresql-8.4-darwin.patch b/postgresql-8.4-darwin.patch
new file mode 100644
index 0000000..3391626
--- /dev/null
+++ b/postgresql-8.4-darwin.patch
@@ -0,0 +1,19 @@
+diff -Naur a/src/makefiles/Makefile.darwin b/src/makefiles/Makefile.darwin
+--- a/src/makefiles/Makefile.darwin 2011-01-27 21:23:36.000000000 -0500
++++ b/src/makefiles/Makefile.darwin 2011-03-20 14:07:13.767638541 -0400
+@@ -5,7 +5,15 @@
+ CFLAGS_SL =
+
+ ifdef PGXS
++ifdef PGXS_IN_SERVER
++ifndef PGXS_WITH_SERVER
++BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres
++else
++BE_DLLLIBS= -bundle_loader ${PGXS_WITH_SERVER}
++endif
++else
+ BE_DLLLIBS= -bundle_loader $(bindir)/postgres
++endif
+ else
+ BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres
+ endif
diff --git a/postgresql-8.4-regress.patch b/postgresql-8.4-regress.patch
new file mode 100644
index 0000000..5a544e4
--- /dev/null
+++ b/postgresql-8.4-regress.patch
@@ -0,0 +1,53 @@
+diff -Naur a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
+--- a/src/test/regress/pg_regress.c 2011-01-27 21:23:36.000000000 -0500
++++ b/src/test/regress/pg_regress.c 2011-03-20 14:19:17.536295541 -0400
+@@ -791,7 +791,7 @@
+ datadir = tmp;
+
+ /* psql will be installed into temp-install bindir */
+- psqldir = bindir;
++ /* psqldir = bindir; */
+
+ /*
+ * Set up shared library paths to include the temp install.
+@@ -889,7 +889,7 @@
+
+ /* And now we can build and execute the shell command */
+ snprintf(psql_cmd, sizeof(psql_cmd),
+- SYSTEMQUOTE "\"%s%spsql\" -X -c \"%s\" \"%s\"" SYSTEMQUOTE,
++ SYSTEMQUOTE "\"%s%spsql\" -h @SOCKETDIR@ -X -c \"%s\" \"%s\"" SYSTEMQUOTE,
+ psqldir ? psqldir : "",
+ psqldir ? "/" : "",
+ query_escaped,
+@@ -2137,8 +2137,8 @@
+ * Check if there is a postmaster running already.
+ */
+ snprintf(buf2, sizeof(buf2),
+- SYSTEMQUOTE "\"%s/psql\" -X postgres <%s 2>%s" SYSTEMQUOTE,
+- bindir, DEVNULL, DEVNULL);
++ SYSTEMQUOTE "\"%s/psql\" -h @SOCKETDIR@ -X postgres <%s 2>%s" SYSTEMQUOTE,
++ psqldir, DEVNULL, DEVNULL);
+
+ for (i = 0; i < 16; i++)
+ {
+@@ -2169,7 +2169,7 @@
+ */
+ header(_("starting postmaster"));
+ snprintf(buf, sizeof(buf),
+- SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE,
++ SYSTEMQUOTE "\"%s/postgres\" -k @SOCKETDIR@ -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE,
+ bindir, temp_install,
+ debug ? " -d 5" : "",
+ hostname ? hostname : "",
+diff -Naur a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c
+--- a/src/test/regress/pg_regress_main.c 2011-01-27 21:23:36.000000000 -0500
++++ b/src/test/regress/pg_regress_main.c 2011-03-20 14:20:35.546295541 -0400
+@@ -59,7 +59,7 @@
+ add_stringlist_item(expectfiles, expectfile);
+
+ snprintf(psql_cmd, sizeof(psql_cmd),
+- SYSTEMQUOTE "\"%s%spsql\" -X -a -q -d \"%s\" < \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
++ SYSTEMQUOTE "\"%s%spsql\" -h @SOCKETDIR@ -X -a -q -d \"%s\" < \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
+ psqldir ? psqldir : "",
+ psqldir ? "/" : "",
+ dblist->str,
diff --git a/postgresql-8.4-server.patch b/postgresql-8.4-server.patch
new file mode 100644
index 0000000..f59a719
--- /dev/null
+++ b/postgresql-8.4-server.patch
@@ -0,0 +1,190 @@
+diff -Naur a/GNUmakefile.in b/GNUmakefile.in
+--- a/GNUmakefile.in 2011-01-27 21:23:36.000000000 -0500
++++ b/GNUmakefile.in 2011-03-20 14:42:22.786295541 -0400
+@@ -11,19 +11,16 @@
+ all:
+ $(MAKE) -C doc all
+ $(MAKE) -C src all
+- $(MAKE) -C config all
+ @echo "All of PostgreSQL successfully made. Ready to install."
+
+ install:
+ $(MAKE) -C doc $@
+ $(MAKE) -C src $@
+- $(MAKE) -C config $@
+ @echo "PostgreSQL installation complete."
+
+ installdirs uninstall:
+ $(MAKE) -C doc $@
+ $(MAKE) -C src $@
+- $(MAKE) -C config $@
+
+ distprep:
+ $(MAKE) -C doc $@
+diff -Naur a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/contrib/Makefile 2011-03-20 14:37:45.916295541 -0400
+@@ -23,14 +23,12 @@
+ isn \
+ lo \
+ ltree \
+- oid2name \
+ pageinspect \
+ pg_buffercache \
+ pg_freespacemap \
+ pg_standby \
+ pg_stat_statements \
+ pg_trgm \
+- pgbench \
+ pgcrypto \
+ pgrowlocks \
+ pgstattuple \
+@@ -38,8 +36,7 @@
+ spi \
+ tablefunc \
+ test_parser \
+- tsearch2 \
+- vacuumlo
++ tsearch2
+
+ ifeq ($(with_openssl),yes)
+ WANTED_DIRS += sslinfo
+diff -Naur a/contrib/adminpack/Makefile b/contrib/adminpack/Makefile
+--- a/contrib/adminpack/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/contrib/adminpack/Makefile 2011-03-20 14:35:33.556295541 -0400
+@@ -1,7 +1,7 @@
+ # $PostgreSQL: pgsql/contrib/adminpack/Makefile,v 1.6 2007/11/10 23:59:50 momjian Exp $
+
+ MODULE_big = adminpack
+-PG_CPPFLAGS = -I$(libpq_srcdir)
++PG_CPPFLAGS = -I$(libpq_srcdir) -I../../src/include/
+ DATA_built = adminpack.sql
+ DATA = uninstall_adminpack.sql
+ OBJS = adminpack.o
+diff -Naur a/contrib/dblink/Makefile b/contrib/dblink/Makefile
+--- a/contrib/dblink/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/contrib/dblink/Makefile 2011-03-20 14:36:08.856295541 -0400
+@@ -1,7 +1,7 @@
+ # $PostgreSQL: pgsql/contrib/dblink/Makefile,v 1.15 2007/11/10 23:59:50 momjian Exp $
+
+ MODULE_big = dblink
+-PG_CPPFLAGS = -I$(libpq_srcdir)
++PG_CPPFLAGS = -I$(libpq_srcdir) -I../../src/include/
+ OBJS = dblink.o
+ SHLIB_LINK = $(libpq)
+
+diff -Naur a/contrib/uuid-ossp/Makefile b/contrib/uuid-ossp/Makefile
+--- a/contrib/uuid-ossp/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/contrib/uuid-ossp/Makefile 2011-03-20 14:38:59.026295541 -0400
+@@ -1,11 +1,13 @@
+ # $PostgreSQL: pgsql/contrib/uuid-ossp/Makefile,v 1.4 2007/11/13 00:13:19 tgl Exp $
+
++PG_CPPFLAGS += "-DHAVE_OSSP_UUID_H"
++
+ MODULE_big = uuid-ossp
+ OBJS = uuid-ossp.o
+ DATA_built = uuid-ossp.sql
+ DATA = uninstall_uuid-ossp.sql
+
+-SHLIB_LINK += $(OSSP_UUID_LIBS)
++SHLIB_LINK += -lossp-uuid
+
+ ifdef USE_PGXS
+ PG_CONFIG = pg_config
+diff -Naur a/contrib/xml2/Makefile b/contrib/xml2/Makefile
+--- a/contrib/xml2/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/contrib/xml2/Makefile 2011-03-20 14:41:04.296295541 -0400
+@@ -4,7 +4,8 @@
+
+ OBJS = xpath.o xslt_proc.o
+
+-SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))
++PG_CPPFLAGS = $(shell xml2-config --cflags)
++SHLIB_LINK += $(shell xml2-config --libs) $(shell xslt-config --libs)
+
+ DATA_built = pgxml.sql
+ DATA = uninstall_pgxml.sql
+diff -Naur a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/Makefile 2011-03-20 14:47:01.876295541 -0400
+@@ -19,14 +19,11 @@
+ $(MAKE) -C backend $@
+ $(MAKE) -C backend/utils/mb/conversion_procs $@
+ $(MAKE) -C backend/snowball $@
+- $(MAKE) -C include $@
+- $(MAKE) -C interfaces $@
+ $(MAKE) -C bin $@
+ $(MAKE) -C pl $@
+- $(MAKE) -C makefiles $@
+ $(MAKE) -C test/regress $@
+
+-install: install-local
++install:
+
+ install-local: installdirs-local
+ $(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
+diff -Naur a/src/Makefile.global.in b/src/Makefile.global.in
+--- a/src/Makefile.global.in 2011-01-27 21:23:36.000000000 -0500
++++ b/src/Makefile.global.in 2011-03-20 14:48:32.566295541 -0400
+@@ -443,6 +443,7 @@
+ LDFLAGS += $(PROFILE)
+ endif
+
++CFLAGS += -I${top_srcdir}/src/include
+
+ ##########################################################################
+ #
+diff -Naur a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/bin/Makefile 2011-03-20 14:44:35.496295541 -0400
+@@ -13,8 +13,7 @@
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
+-DIRS = initdb pg_ctl pg_dump \
+- psql scripts pg_config pg_controldata pg_resetxlog
++DIRS = initdb pg_ctl pg_controldata pg_resetxlog
+ ifeq ($(PORTNAME), win32)
+ DIRS+=pgevent
+ endif
+diff -Naur a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
+--- a/src/bin/initdb/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/bin/initdb/Makefile 2011-03-20 14:43:37.636295541 -0400
+@@ -14,7 +14,7 @@
+ top_builddir = ../../..
+ include $(top_builddir)/src/Makefile.global
+
+-override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
++override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/libpq $(CPPFLAGS)
+
+ OBJS= initdb.o encnames.o pqsignal.o $(WIN32RES)
+
+diff -Naur a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
+--- a/src/include/pg_config_manual.h 2011-01-27 21:23:36.000000000 -0500
++++ b/src/include/pg_config_manual.h 2011-03-20 14:46:12.816295541 -0400
+@@ -146,7 +146,7 @@
+ * here's where to twiddle it. You can also override this at runtime
+ * with the postmaster's -k switch.
+ */
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "@GENTOO_PORTAGE_EPREFIX@/var/run/postgresql"
+
+ /*
+ * The random() function is expected to yield values between 0 and
+diff -Naur a/src/port/Makefile b/src/port/Makefile
+--- a/src/port/Makefile 2011-01-27 21:23:36.000000000 -0500
++++ b/src/port/Makefile 2011-03-20 14:49:33.936295541 -0400
+@@ -39,11 +39,10 @@
+ # foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND
+ OBJS_SRV = $(OBJS:%.o=%_srv.o)
+
+-all: libpgport.a libpgport_srv.a
++all: libpgport_srv.a
+
+ # libpgport is needed by some contrib
+-install: all installdirs
+- $(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a'
++install:
+
+ installdirs:
+ $(mkinstalldirs) '$(DESTDIR)$(libdir)'