diff options
author | Austin Seipp <aseipp@pobox.com> | 2018-08-06 10:17:49 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2019-01-19 17:33:32 -0600 |
commit | 73f56ae19126109caa02bdfdc42ac2e633de00be (patch) | |
tree | 40caf4b77ae74309107f2585fa350ae935207d98 /pkgs/servers/sql/postgresql/patches | |
parent | 3cac5996285404808282164af34379e5393117b7 (diff) | |
download | nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.tar nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.tar.gz nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.tar.bz2 nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.tar.lz nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.tar.xz nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.tar.zst nixlib-73f56ae19126109caa02bdfdc42ac2e633de00be.zip |
nixpkgs: move postgresql patches into a common directory
This simply makes it easier to browse the PostgreSQL package directory. More to come. Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/servers/sql/postgresql/patches')
7 files changed, 110 insertions, 0 deletions
diff --git a/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks-94.patch b/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks-94.patch new file mode 100644 index 000000000000..fadeea90ac4b --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks-94.patch @@ -0,0 +1,12 @@ +--- a/src/common/exec.c 2014-09-04 20:19:12.236057588 +0200 ++++ b/src/common/exec.c 2014-09-04 20:19:50.550251633 +0200 +@@ -218,6 +218,9 @@ + static int + resolve_symlinks(char *path) + { ++ // On NixOS we *want* stuff relative to symlinks. ++ return 0; ++ + #ifdef HAVE_READLINK + struct stat buf; + char orig_wd[MAXPGPATH], diff --git a/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks.patch b/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks.patch new file mode 100644 index 000000000000..3e6fd5e838a2 --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks.patch @@ -0,0 +1,14 @@ +diff --git a/src/port/exec.c b/src/port/exec.c +index c79e8ba..42c4091 100644 +--- a/src/port/exec.c ++++ b/src/port/exec.c +@@ -216,6 +216,9 @@ find_my_exec(const char *argv0, char *retpath) + static int + resolve_symlinks(char *path) + { ++ // On NixOS we *want* stuff relative to symlinks. ++ return 0; ++ + #ifdef HAVE_READLINK + struct stat buf; + char orig_wd[MAXPGPATH], diff --git a/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path-96.patch b/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path-96.patch new file mode 100644 index 000000000000..6cd449769baa --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path-96.patch @@ -0,0 +1,14 @@ +diff -Naur postgresql-9.6.1-orig/src/common/config_info.c postgresql-9.6.1/src/common/config_info.c +--- postgresql-9.6.1-orig/src/common/config_info.c 2016-11-22 21:39:29.231929261 +0100 ++++ postgresql-9.6.1/src/common/config_info.c 2016-11-22 23:36:53.685163543 +0100 +@@ -118,7 +118,10 @@ + i++; + + configdata[i].name = pstrdup("PGXS"); ++ strlcpy(path, "HARDCODED_PGXS_PATH", sizeof(path)); ++/* commented out to be able to point to nix $out path + get_pkglib_path(my_exec_path, path); ++*/ + strlcat(path, "/pgxs/src/makefiles/pgxs.mk", sizeof(path)); + cleanup_path(path); + configdata[i].setting = pstrdup(path); diff --git a/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch b/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch new file mode 100644 index 000000000000..355813ffe20e --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch @@ -0,0 +1,17 @@ +--- a/src/bin/pg_config/pg_config.c ++++ b/src/bin/pg_config/pg_config.c +@@ -220,11 +220,13 @@ show_sysconfdir(bool all) + static void + show_pgxs(bool all) + { +- char path[MAXPGPATH]; ++ char path[MAXPGPATH] = "HARDCODED_PGXS_PATH"; + + if (all) + printf("PGXS = "); ++ /* commented out to be able to point to nix $out path + get_pkglib_path(mypath, path); ++ */ + strlcat(path, "/pgxs/src/makefiles/pgxs.mk", sizeof(path)); + cleanup_path(path); + printf("%s\n", path); diff --git a/pkgs/servers/sql/postgresql/patches/less-is-more-96.patch b/pkgs/servers/sql/postgresql/patches/less-is-more-96.patch new file mode 100644 index 000000000000..f14af9dc2207 --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/less-is-more-96.patch @@ -0,0 +1,12 @@ +diff -Naur postgresql-9.6.1-orig/src/include/fe_utils/print.h postgresql-9.6.1/src/include/fe_utils/print.h +--- postgresql-9.6.1-orig/src/include/fe_utils/print.h 2016-11-22 21:39:29.148932827 +0100 ++++ postgresql-9.6.1/src/include/fe_utils/print.h 2016-11-22 21:39:36.283626258 +0100 +@@ -18,7 +18,7 @@ + + /* This is not a particularly great place for this ... */ + #ifndef __CYGWIN__ +-#define DEFAULT_PAGER "more" ++#define DEFAULT_PAGER "less" + #else + #define DEFAULT_PAGER "less" + #endif diff --git a/pkgs/servers/sql/postgresql/patches/less-is-more.patch b/pkgs/servers/sql/postgresql/patches/less-is-more.patch new file mode 100644 index 000000000000..d640d24bdaad --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/less-is-more.patch @@ -0,0 +1,12 @@ +diff -Naur postgresql-9.2.7-orig/src/bin/psql/print.h postgresql-9.2.7/src/bin/psql/print.h +--- postgresql-9.2.7-orig/src/bin/psql/print.h 2014-02-17 14:38:15.000000000 -0500 ++++ postgresql-9.2.7/src/bin/psql/print.h 2014-03-04 14:42:28.874014415 -0500 +@@ -178,7 +178,7 @@ + extern const printTextFormat *get_line_style(const printTableOpt *opt); + + #ifndef __CYGWIN__ +-#define DEFAULT_PAGER "more" ++#define DEFAULT_PAGER "less" + #else + #define DEFAULT_PAGER "less" + #endif diff --git a/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch b/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch new file mode 100644 index 000000000000..fe95d2ee99f0 --- /dev/null +++ b/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch @@ -0,0 +1,29 @@ +diff -ur postgresql-9.5.3-orig/src/port/path.c postgresql-9.5.3/src/port/path.c +--- postgresql-9.5.3-orig/src/port/path.c 2016-05-09 22:50:23.000000000 +0200 ++++ postgresql-9.5.3/src/port/path.c 2016-08-29 22:44:10.507377613 +0200 +@@ -714,7 +714,11 @@ + void + get_lib_path(const char *my_exec_path, char *ret_path) + { +- make_relative_path(ret_path, LIBDIR, PGBINDIR, my_exec_path); ++ char const * const nix_pglibdir = getenv("NIX_PGLIBDIR"); ++ if(nix_pglibdir == NULL) ++ make_relative_path(ret_path, LIBDIR, PGBINDIR, my_exec_path); ++ else ++ make_relative_path(ret_path, nix_pglibdir, PGBINDIR, my_exec_path); + } + + /* +@@ -723,7 +727,11 @@ + void + get_pkglib_path(const char *my_exec_path, char *ret_path) + { +- make_relative_path(ret_path, PKGLIBDIR, PGBINDIR, my_exec_path); ++ char const * const nix_pglibdir = getenv("NIX_PGLIBDIR"); ++ if(nix_pglibdir == NULL) ++ make_relative_path(ret_path, PKGLIBDIR, PGBINDIR, my_exec_path); ++ else ++ make_relative_path(ret_path, nix_pglibdir, PGBINDIR, my_exec_path); + } + + /* |