Blame SOURCES/postgresql-libpqwalreceiver-rpath.patch

62d2ae
Even in SCL world we so far lived fine with --disable-rpath.  But in some
62d2ae
usecases, SCLized libpqwalreceiver.so needs to have RPATH set.
62d2ae
62d2ae
Resolves: rhbz#1550567
62d2ae
62d2ae
diff -up postgresql-13.1/src/backend/replication/libpqwalreceiver/Makefile.patch8 postgresql-13.1/src/backend/replication/libpqwalreceiver/Makefile
62d2ae
--- postgresql-13.1/src/backend/replication/libpqwalreceiver/Makefile.patch8	2020-12-09 21:34:35.511591655 +0100
62d2ae
+++ postgresql-13.1/src/backend/replication/libpqwalreceiver/Makefile	2020-12-09 21:35:25.783119162 +0100
62d2ae
@@ -18,6 +18,11 @@ OBJS = \
62d2ae
 	$(WIN32RES) \
62d2ae
 	libpqwalreceiver.o
62d2ae
 SHLIB_LINK_INTERNAL = $(libpq)
62d2ae
+# Force rpath to be used even though we disable it everywhere else.  This is
62d2ae
+# needed because the 'libpqwalreceiver.so' is loaded into process (with
62d2ae
+# CREATE SUBSCRIPTION) which has dropped the $LD_LIBRARY_PATH variable from the
62d2ae
+# parent $bindir/postgress process.
62d2ae
+SHLIB_LINK_INTERNAL = $(libpq) $(rpath)
62d2ae
 SHLIB_LINK = $(filter -lintl, $(LIBS))
62d2ae
 SHLIB_PREREQS = submake-libpq
62d2ae
 PGFILEDESC = "libpqwalreceiver - receive WAL during streaming replication"