Blame SOURCES/postgresql-libpqwalreceiver-rpath.patch

5cb31b
Even in SCL world we so far lived fine with --disable-rpath.  But in some
5cb31b
usecases, SCLized libpqwalreceiver.so needs to have RPATH set.
5cb31b
5cb31b
Resolves: rhbz#1550567
5cb31b
5cb31b
diff --git a/src/backend/replication/libpqwalreceiver/Makefile b/src/backend/replication/libpqwalreceiver/Makefile
fe4f3c
index 75b0e2b..69b0de6 100644
5cb31b
--- a/src/backend/replication/libpqwalreceiver/Makefile
5cb31b
+++ b/src/backend/replication/libpqwalreceiver/Makefile
fe4f3c
@@ -15,7 +15,11 @@ include $(top_builddir)/src/Makefile.global
fe4f3c
 override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
5cb31b
 
5cb31b
 OBJS = libpqwalreceiver.o $(WIN32RES)
fe4f3c
-SHLIB_LINK_INTERNAL = $(libpq)
5cb31b
+# Force rpath to be used even though we disable it everywhere else.  This is
5cb31b
+# needed because the 'libpqwalreceiver.so' is loaded into process (with
5cb31b
+# CREATE SUBSCRIPTION) which has dropped the $LD_LIBRARY_PATH variable from the
5cb31b
+# parent $bindir/postgress process.
fe4f3c
+SHLIB_LINK_INTERNAL = $(libpq) $(rpath)
fe4f3c
 SHLIB_LINK = $(filter -lintl, $(LIBS))
5cb31b
 SHLIB_PREREQS = submake-libpq
5cb31b
 PGFILEDESC = "libpqwalreceiver - receive WAL during streaming replication"