gnu: postgresql: Fix finding extensions.
authorJulien Lepiller <julien@lepiller.eu>
Sat, 28 Jul 2018 15:38:38 +0000 (17:38 +0200)
committerJulien Lepiller <julien@lepiller.eu>
Thu, 4 Oct 2018 20:26:02 +0000 (22:26 +0200)
* gnu/packages/patches/postgresql-disable-resolve_symlinks.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/databases.scm (postgresql)[source]: Use it.

gnu/local.mk
gnu/packages/databases.scm
gnu/packages/patches/postgresql-disable-resolve_symlinks.patch [new file with mode: 0644]

index 60db25a..c3bc35a 100644 (file)
@@ -1042,6 +1042,7 @@ dist_patch_DATA =                                         \
   %D%/packages/patches/plotutils-libpng-jmpbuf.patch           \
   %D%/packages/patches/portaudio-audacity-compat.patch         \
   %D%/packages/patches/portmidi-modular-build.patch            \
+  %D%/packages/patches/postgresql-disable-resolve_symlinks.patch       \
   %D%/packages/patches/potrace-tests.patch                     \
   %D%/packages/patches/procmail-ambiguous-getline-debian.patch  \
   %D%/packages/patches/procmail-CVE-2014-3618.patch            \
index dc8e520..02bfbda 100644 (file)
@@ -18,7 +18,7 @@
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
@@ -814,7 +814,8 @@ as a drop-in replacement of MySQL.")
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "04a07jkvc5s6zgh6jr78149kcjmsxclizsqabjw44ld4j5n633kc"))))
+                "04a07jkvc5s6zgh6jr78149kcjmsxclizsqabjw44ld4j5n633kc"))
+              (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--with-uuid=e2fs")
diff --git a/gnu/packages/patches/postgresql-disable-resolve_symlinks.patch b/gnu/packages/patches/postgresql-disable-resolve_symlinks.patch
new file mode 100644 (file)
index 0000000..97ef692
--- /dev/null
@@ -0,0 +1,25 @@
+From 223c82d1d6ed1f29f26307249827ff679e09c780 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sat, 28 Jul 2018 12:22:12 +0200
+Subject: [PATCH] disable resolve_symlink
+
+---
+ src/common/exec.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/common/exec.c b/src/common/exec.c
+index 878fc29..6b3e283 100644
+--- a/src/common/exec.c
++++ b/src/common/exec.c
+@@ -218,6 +218,8 @@ find_my_exec(const char *argv0, char *retpath)
+ static int
+ resolve_symlinks(char *path)
+ {
++      // On GuixSD we *want* stuff relative to symlinks.
++      return 0;
+ #ifdef HAVE_READLINK
+       struct stat buf;
+       char            orig_wd[MAXPGPATH],
+--
+2.18.0
+