Logo
Explore Help
Sign In
public/nixpkgs
1
0
Fork 0
You've already forked nixpkgs
Code Issues Pull Requests Packages Projects Releases Wiki Activity
nixpkgs/pkgs/servers/sql/postgresql/disable-resolve_symlinks.patch

15 lines
374 B
Diff
Raw Normal View History

Disable exec symlink resolution for PostgreSQL 9.2 When building PostgreSQL with plugins under NixOS, NixOS will create a postgresql-and-plugins directory which symlinks PostgreSQL and all the plugins into a single directory. Unfortunately, the plugins will not actually be usable by PostgreSQL because it will still try and locate them in the original PostgreSQL share directory, not postgresql-and-plugins. In this commit, I have patched resolve_symlinks to always return success, which matches the behavior if HAVE_READLINK is false (so presumably invalid paths are never passed to this function).
2013-06-27 14:08:42 +01:00
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],
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 722ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API