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
5cb31b
index a7a5fe1..a9604a1 100644
5cb31b
--- a/src/backend/replication/libpqwalreceiver/Makefile
5cb31b
+++ b/src/backend/replication/libpqwalreceiver/Makefile
5cb31b
@@ -16,6 +16,13 @@ override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
5cb31b
 
5cb31b
 OBJS = libpqwalreceiver.o $(WIN32RES)
5cb31b
 SHLIB_LINK = $(libpq) $(filter -lintl, $(LIBS))
5cb31b
+
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.
5cb31b
+SHLIB_LINK += $(rpath)
5cb31b
+
5cb31b
 SHLIB_PREREQS = submake-libpq
5cb31b
 PGFILEDESC = "libpqwalreceiver - receive WAL during streaming replication"
5cb31b
 NAME = libpqwalreceiver