summaryrefslogtreecommitdiff
path: root/libpq-10.3-rpm-pgsql.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-08-31 09:13:37 +0000
committerCoprDistGit <infra@openeuler.org>2023-08-31 09:13:37 +0000
commitd8a538d7266fb76b9976728f80c2005ffa93fa1a (patch)
tree134f6ef8019b70981300555b8e99a2d34ed55719 /libpq-10.3-rpm-pgsql.patch
parent88e58cf7d4a8cfdb4cc97b8ca8ba9c837e614430 (diff)
automatic import of libpqopeneuler20.03
Diffstat (limited to 'libpq-10.3-rpm-pgsql.patch')
-rw-r--r--libpq-10.3-rpm-pgsql.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/libpq-10.3-rpm-pgsql.patch b/libpq-10.3-rpm-pgsql.patch
new file mode 100644
index 0000000..93a3532
--- /dev/null
+++ b/libpq-10.3-rpm-pgsql.patch
@@ -0,0 +1,72 @@
+For the RPMs, we want the custom installation directories to end in
+/pgsql not /postgresql. This is historical but not worth changing.
+
+Notice that this patch also makes the appending of /pgsql unconditional.
+This is to avoid unexpected behavior if the RPM is built in a working
+directory whose path happens to include "postgres" or "pgsql" already.
+However, datadir and sysconfdir are already set up in the specfile's
+configure call, so we do not have to append anything to them.
+
+diff --git a/src/Makefile.global.in b/src/Makefile.global.in
+index 9a6265b3a0..c9371a07c4 100644
+--- a/src/Makefile.global.in
++++ b/src/Makefile.global.in
+@@ -82,8 +82,7 @@ vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $
+ # Installation directories
+ #
+ # These are set by the equivalent --xxxdir configure options. We
+-# append "postgresql" to some of them, if the string does not already
+-# contain "pgsql" or "postgres", in order to avoid directory clutter.
++# append "pgsql" to some of them, in order to avoid directory clutter.
+ #
+ # In a PGXS build, we cannot use the values inserted into Makefile.global
+ # by configure, since the installation tree may have been relocated.
+@@ -101,45 +100,23 @@ datarootdir := @datarootdir@
+ bindir := @bindir@
+
+ datadir := @datadir@
+-ifeq "$(findstring pgsql, $(datadir))" ""
+-ifeq "$(findstring postgres, $(datadir))" ""
+-override datadir := $(datadir)/postgresql
+-endif
+-endif
+
+ sysconfdir := @sysconfdir@
+-ifeq "$(findstring pgsql, $(sysconfdir))" ""
+-ifeq "$(findstring postgres, $(sysconfdir))" ""
+-override sysconfdir := $(sysconfdir)/postgresql
+-endif
+-endif
+
+ libdir := @libdir@
+
+ pkglibdir = $(libdir)
+-ifeq "$(findstring pgsql, $(pkglibdir))" ""
+-ifeq "$(findstring postgres, $(pkglibdir))" ""
+-override pkglibdir := $(pkglibdir)/postgresql
+-endif
+-endif
++override pkglibdir := $(pkglibdir)/pgsql
+
+ includedir := @includedir@
+
+ pkgincludedir = $(includedir)
+-ifeq "$(findstring pgsql, $(pkgincludedir))" ""
+-ifeq "$(findstring postgres, $(pkgincludedir))" ""
+-override pkgincludedir := $(pkgincludedir)/postgresql
+-endif
+-endif
++override pkgincludedir := $(pkgincludedir)/pgsql
+
+ mandir := @mandir@
+
+ docdir := @docdir@
+-ifeq "$(findstring pgsql, $(docdir))" ""
+-ifeq "$(findstring postgres, $(docdir))" ""
+-override docdir := $(docdir)/postgresql
+-endif
+-endif
++override docdir := $(docdir)/pgsql
+
+ htmldir := @htmldir@
+