diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/50-per-version-dirs.patch | 56 | ||||
-rw-r--r-- | debian/patches/51-default-sockets-in-var.patch | 20 | ||||
-rw-r--r-- | debian/patches/52-tutorial-README.patch | 16 | ||||
-rw-r--r-- | debian/patches/53-pg_service.conf_directory_doc.patch | 19 | ||||
-rw-r--r-- | debian/patches/54-debian-alternatives-for-external-tools.patch | 28 | ||||
-rw-r--r-- | debian/patches/64-pg_upgrade-sockdir | 18 | ||||
-rw-r--r-- | debian/patches/70-history | 9 | ||||
-rw-r--r-- | debian/patches/filter-debug-prefix-map | 15 | ||||
-rw-r--r-- | debian/patches/series | 8 |
9 files changed, 189 insertions, 0 deletions
diff --git a/debian/patches/50-per-version-dirs.patch b/debian/patches/50-per-version-dirs.patch new file mode 100644 index 0000000..e03dd5f --- /dev/null +++ b/debian/patches/50-per-version-dirs.patch @@ -0,0 +1,56 @@ +Author: Martin Pitt <mpitt@debian.org> +Description: Use version specific installation directories so that several major versions can be installed in parallel. +Forwarded: No, Debian specific packaging with postgresql-common + + * Install lib files into /usr/lib/postgresql/<version>/lib/ + * Install server related header files into /usr/include/postgresql/<version>/server/ + * Disable PostgreSQL's automagic path mangling and fix libdir for pg_config, + so that pg_config in /usr/bin and /usr/lib/postgresql/<version>/bin behave + identically. + +Bug-Debian: http://bugs.debian.org/462037 + +--- a/src/Makefile.global.in ++++ b/src/Makefile.global.in +@@ -120,7 +120,7 @@ libdir := @libdir@ + pkglibdir = $(libdir) + ifeq "$(findstring pgsql, $(pkglibdir))" "" + ifeq "$(findstring postgres, $(pkglibdir))" "" +-override pkglibdir := $(pkglibdir)/postgresql ++override pkglibdir := /usr/lib/postgresql/@PG_MAJORVERSION@/lib + endif + endif + +@@ -168,7 +168,7 @@ endif # PGXS + + # These derived path variables aren't separately configurable. + +-includedir_server = $(pkgincludedir)/server ++includedir_server = $(pkgincludedir)/@PG_MAJORVERSION@/server + includedir_internal = $(pkgincludedir)/internal + pgxsdir = $(pkglibdir)/pgxs + +--- a/src/bin/pg_config/pg_config.c ++++ b/src/bin/pg_config/pg_config.c +@@ -27,6 +27,8 @@ + #include "port.h" + #include "common/config_info.h" + ++#include "../port/pg_config_paths.h" ++ + static const char *progname; + + /* +@@ -148,11 +150,7 @@ main(int argc, char **argv) + } + } + +- if (find_my_exec(argv[0], my_exec_path) < 0) +- { +- fprintf(stderr, _("%s: could not find own program executable\n"), progname); +- exit(1); +- } ++ snprintf(my_exec_path, sizeof(my_exec_path), "%s/%s", PGBINDIR, progname); + + configdata = get_configdata(my_exec_path, &configdata_len); + /* no arguments -> print everything */ diff --git a/debian/patches/51-default-sockets-in-var.patch b/debian/patches/51-default-sockets-in-var.patch new file mode 100644 index 0000000..24bd6b1 --- /dev/null +++ b/debian/patches/51-default-sockets-in-var.patch @@ -0,0 +1,20 @@ +Author: Martin Pitt <mpitt@debian.org> +Description: Put server Unix sockets into /var/run/postgresql/ by default +Forwarded: No, Debian specific configuration with postgresql-common + +Using /tmp for sockets allows everyone to spoof a PostgreSQL server. Thus use +/var/run/postgresql/ for "system" clusters which run as 'postgres' (user +clusters will still use /tmp). Since system cluster are by far the common case, +set it as default. + +--- a/src/include/pg_config_manual.h ++++ b/src/include/pg_config_manual.h +@@ -161,7 +161,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 "/var/run/postgresql" + + /* + * This is the default event source for Windows event log. diff --git a/debian/patches/52-tutorial-README.patch b/debian/patches/52-tutorial-README.patch new file mode 100644 index 0000000..9eb3263 --- /dev/null +++ b/debian/patches/52-tutorial-README.patch @@ -0,0 +1,16 @@ +Author: Martin Pitt <mpitt@debian.org> +Description: Update tutorial README for required build dependencies. +Forwarded: No, Debian specific + +--- a/src/tutorial/README ++++ b/src/tutorial/README +@@ -6,8 +6,7 @@ tutorial + This directory contains SQL tutorial scripts. To look at them, first do a + % make + to compile all the scripts and C files for the user-defined functions +-and types. (make needs to be GNU make --- it may be named something +-different on your system, often 'gmake') ++and types. This requires a postgresql-server-dev-* package to be installed. + + Then, run psql with the -s (single-step) flag: + % psql -s diff --git a/debian/patches/53-pg_service.conf_directory_doc.patch b/debian/patches/53-pg_service.conf_directory_doc.patch new file mode 100644 index 0000000..584b41c --- /dev/null +++ b/debian/patches/53-pg_service.conf_directory_doc.patch @@ -0,0 +1,19 @@ +Author: Martin Pitt <mpitt@debian.org> +Description: Update pg_service.conf example to tell the Debian specific file location. +Forwarded: No, Debian specific + +Index: postgresql-9.2-9.2~beta1/src/interfaces/libpq/pg_service.conf.sample +=================================================================== +--- postgresql-9.2-9.2~beta1.orig/src/interfaces/libpq/pg_service.conf.sample 2011-04-27 23:17:22.000000000 +0200 ++++ postgresql-9.2-9.2~beta1/src/interfaces/libpq/pg_service.conf.sample 2011-05-10 11:25:42.151949794 +0200 +@@ -8,8 +8,8 @@ + # to look up such parameters. A sample configuration for postgres is + # included in this file. Lines beginning with '#' are comments. + # +-# Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and +-# rename it pg_service.conf. ++# Copy this to /etc/postgresql-common/ (or select its location with the ++# PGSYSCONFDIR environment variable) and rename it pg_service.conf. + # + # + #[postgres] diff --git a/debian/patches/54-debian-alternatives-for-external-tools.patch b/debian/patches/54-debian-alternatives-for-external-tools.patch new file mode 100644 index 0000000..13c2741 --- /dev/null +++ b/debian/patches/54-debian-alternatives-for-external-tools.patch @@ -0,0 +1,28 @@ +Author: Martin Pitt <mpitt@debian.org> +Description: Use Debian alternatives for external tools instead of hardcoded programs +Forwarded: No, Debian specific + +--- a/src/bin/psql/settings.h ++++ b/src/bin/psql/settings.h +@@ -19,8 +19,8 @@ + #define DEFAULT_EDITOR "notepad.exe" + /* no DEFAULT_EDITOR_LINENUMBER_ARG for Notepad */ + #else +-#define DEFAULT_EDITOR "vi" +-#define DEFAULT_EDITOR_LINENUMBER_ARG "+" ++#define DEFAULT_EDITOR "sensible-editor" ++/*#define DEFAULT_EDITOR_LINENUMBER_ARG "+"*/ + #endif + + #define DEFAULT_PROMPT1 "%/%R%# " +--- a/src/include/fe_utils/print.h ++++ b/src/include/fe_utils/print.h +@@ -18,7 +18,7 @@ + + /* This is not a particularly great place for this ... */ + #ifndef __CYGWIN__ +-#define DEFAULT_PAGER "more" ++#define DEFAULT_PAGER "pager" + #else + #define DEFAULT_PAGER "less" + #endif diff --git a/debian/patches/64-pg_upgrade-sockdir b/debian/patches/64-pg_upgrade-sockdir new file mode 100644 index 0000000..60ed2b6 --- /dev/null +++ b/debian/patches/64-pg_upgrade-sockdir @@ -0,0 +1,18 @@ +Fix for: connection to database failed: Unix-domain socket path "/build/buildd-postgresql-9.3_9.3~beta1-1-i386-mHjRUH/postgresql-9.3-9.3~beta1/build/contrib/pg_upgrade/.s.PGSQL.50432" is too long (maximum 107 bytes) + +See also: http://lists.debian.org/debian-wb-team/2013/05/msg00015.html + +--- a/src/bin/pg_upgrade/option.c ++++ b/src/bin/pg_upgrade/option.c +@@ -460,6 +460,11 @@ get_sock_dir(ClusterInfo *cluster, bool + cluster->sockdir = pg_malloc(MAXPGPATH); + if (!getcwd(cluster->sockdir, MAXPGPATH)) + pg_fatal("could not determine current directory\n"); ++#ifndef UNIX_PATH_MAX ++#define UNIX_PATH_MAX 108 ++#endif ++ if (strlen(cluster->sockdir) >= UNIX_PATH_MAX - sizeof(".s.PGSQL.50432")) ++ strcpy(cluster->sockdir, "/tmp"); /* fall back to tmp */ + } + else + { diff --git a/debian/patches/70-history b/debian/patches/70-history new file mode 100644 index 0000000..20bd55f --- /dev/null +++ b/debian/patches/70-history @@ -0,0 +1,9 @@ +--- a/HISTORY ++++ b/HISTORY +@@ -3,3 +3,6 @@ + + Distribution file sets include release notes for their version and preceding + versions. Visit the file doc/src/sgml/html/release.html in an HTML browser. ++ ++On Debian systems, the release notes are contained in the postgresql-doc-* ++packages, located in /usr/share/doc/postgresql-doc-*/html/release.html. diff --git a/debian/patches/filter-debug-prefix-map b/debian/patches/filter-debug-prefix-map new file mode 100644 index 0000000..60d738a --- /dev/null +++ b/debian/patches/filter-debug-prefix-map @@ -0,0 +1,15 @@ +--- a/src/common/Makefile ++++ b/src/common/Makefile +@@ -30,10 +30,10 @@ LIBS += $(PTHREAD_LIBS) + # don't include subdirectory-path-dependent -I and -L switches + STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) + STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/port,$(LDFLAGS)) +-override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\"" ++override CPPFLAGS += -DVAL_CONFIGURE="\"$(filter-out -fdebug-prefix-map%,$(configure_args))\"" + override CPPFLAGS += -DVAL_CC="\"$(CC)\"" + override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" +-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" ++override CPPFLAGS += -DVAL_CFLAGS="\"$(filter-out -fdebug-prefix-map%,$(CFLAGS))\"" + override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" + override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" + override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..37fa915 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,8 @@ +50-per-version-dirs.patch +51-default-sockets-in-var.patch +52-tutorial-README.patch +53-pg_service.conf_directory_doc.patch +54-debian-alternatives-for-external-tools.patch +64-pg_upgrade-sockdir +70-history +filter-debug-prefix-map |