uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -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],
|
||||
|
|
@ -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],
|
||||
59
pkgs/servers/sql/postgresql/patches/findstring.patch
Normal file
59
pkgs/servers/sql/postgresql/patches/findstring.patch
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
From: Matthew Bauer <mjbauer95@gmail.com>
|
||||
Date: Wed, 29 May 2019 22:51:52 -0400
|
||||
Subject: [PATCH] Add /postgresql suffix for Nix outputs
|
||||
|
||||
Nix outputs put the `name' in each store path like
|
||||
/nix/store/...-<name>. This was confusing the Postgres make script
|
||||
because it thought its data directory already had postgresql in its
|
||||
directory. This lead to Postgres installing all of its fils in
|
||||
$out/share. To fix this, we just look for postgres or psql in the part
|
||||
after the / using make's notdir.
|
||||
|
||||
---
|
||||
From: Matthew Bauer <mjbauer95@gmail.com>
|
||||
Date: Wed, 29 May 2019 22:51:52 -0400
|
||||
Subject: [PATCH] Add /postgresql suffix for Nix outputs
|
||||
|
||||
Nix outputs put the `name' in each store path like
|
||||
/nix/store/...-<name>. This was confusing the Postgres make script
|
||||
because it thought its data directory already had postgresql in its
|
||||
directory. This lead to Postgres installing all of its fils in
|
||||
$out/share. To fix this, we just look for postgres or psql in the part
|
||||
after the / using make's notdir.
|
||||
|
||||
---
|
||||
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
|
||||
index b9d86acaa9..bce05464c3 100644
|
||||
--- a/src/Makefile.global.in
|
||||
+++ b/src/Makefile.global.in
|
||||
@@ -102,15 +102,15 @@ datarootdir := @datarootdir@
|
||||
bindir := @bindir@
|
||||
|
||||
datadir := @datadir@
|
||||
-ifeq "$(findstring pgsql, $(datadir))" ""
|
||||
-ifeq "$(findstring postgres, $(datadir))" ""
|
||||
+ifeq "$(findstring pgsql, $(notdir $(datadir)))" ""
|
||||
+ifeq "$(findstring postgres, $(notdir $(datadir)))" ""
|
||||
override datadir := $(datadir)/postgresql
|
||||
endif
|
||||
endif
|
||||
|
||||
sysconfdir := @sysconfdir@
|
||||
-ifeq "$(findstring pgsql, $(sysconfdir))" ""
|
||||
-ifeq "$(findstring postgres, $(sysconfdir))" ""
|
||||
+ifeq "$(findstring pgsql, $(notdir $(sysconfdir)))" ""
|
||||
+ifeq "$(findstring postgres, $(notdir $(sysconfdir)))" ""
|
||||
override sysconfdir := $(sysconfdir)/postgresql
|
||||
endif
|
||||
endif
|
||||
@@ -136,8 +136,8 @@ endif
|
||||
mandir := @mandir@
|
||||
|
||||
docdir := @docdir@
|
||||
-ifeq "$(findstring pgsql, $(docdir))" ""
|
||||
-ifeq "$(findstring postgres, $(docdir))" ""
|
||||
+ifeq "$(findstring pgsql, $(notdir $(docdir)))" ""
|
||||
+ifeq "$(findstring postgres, $(notdir $(docdir)))" ""
|
||||
override docdir := $(docdir)/postgresql
|
||||
endif
|
||||
endif
|
||||
|
|
@ -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);
|
||||
17
pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch
Normal file
17
pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch
Normal file
|
|
@ -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);
|
||||
12
pkgs/servers/sql/postgresql/patches/less-is-more-96.patch
Normal file
12
pkgs/servers/sql/postgresql/patches/less-is-more-96.patch
Normal file
|
|
@ -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
|
||||
12
pkgs/servers/sql/postgresql/patches/less-is-more.patch
Normal file
12
pkgs/servers/sql/postgresql/patches/less-is-more.patch
Normal file
|
|
@ -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
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git i/src/include/pg_config_manual.h w/src/include/pg_config_manual.h
|
||||
index 8f3ec6bde1..4fc01e4a0a 100644
|
||||
--- i/src/include/pg_config_manual.h
|
||||
+++ w/src/include/pg_config_manual.h
|
||||
@@ -201,7 +201,7 @@
|
||||
* support them yet.
|
||||
*/
|
||||
#ifndef WIN32
|
||||
-#define DEFAULT_PGSOCKET_DIR "/tmp"
|
||||
+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
|
||||
#else
|
||||
#define DEFAULT_PGSOCKET_DIR ""
|
||||
#endif
|
||||
13
pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch
Normal file
13
pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
|
||||
index 743401cb96..be5c5f61d2 100644
|
||||
--- a/src/include/pg_config_manual.h
|
||||
+++ b/src/include/pg_config_manual.h
|
||||
@@ -179,7 +179,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 "/run/postgresql"
|
||||
|
||||
/*
|
||||
* This is the default event source for Windows event log.
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
Loading…
Add table
Add a link
Reference in a new issue