Change PCP UNIX_DOMAIN_PATH of RPM package to "/var/run/postgresql".
authorBo Peng <pengbo@sraoss.co.jp>
Fri, 31 Jul 2020 00:45:39 +0000 (09:45 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Fri, 31 Jul 2020 00:49:29 +0000 (09:49 +0900)
src/pgpool.spec
src/redhat/pcp_unix_domain_path.patch [new file with mode: 0644]

index 19d4ca183aa0d4505bdd8c41b37423ff8694b283..76991d54fda4eecf508f0c9294555111133d4d6e 100644 (file)
@@ -40,6 +40,7 @@ Source4:        pgpool_rhel7.sysconfig
 Patch1:         pgpool-II-head.patch
 %if %{pgsql_ver} >=94 && %{rhel} >= 7
 Patch2:         pgpool_socket_dir.patch
+Patch3:         pcp_unix_domain_path.patch
 %endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  postgresql%{pg_version}-devel pam-devel openssl-devel libmemcached-devel jade libxslt docbook-dtds docbook-style-xsl docbook-style-dsssl
@@ -96,6 +97,7 @@ Postgresql extensions libraries and sql files for pgpool-II.
 %patch1 -p1
 %if %{pgsql_ver} >=94 && %{rhel} >= 7
 %patch2 -p0
+%patch3 -p0
 %endif
 
 %build
diff --git a/src/redhat/pcp_unix_domain_path.patch b/src/redhat/pcp_unix_domain_path.patch
new file mode 100644 (file)
index 0000000..5b2b106
--- /dev/null
@@ -0,0 +1,17 @@
+*** src/include/pcp/pcp_stream.h       2020-07-31 09:24:10.835496879 +0900
+--- pcp_stream.h       2020-07-31 09:24:02.598396128 +0900
+***************
+*** 49,54 ****
+  extern int   pcp_write(PCP_CONNECTION * pc, void *buf, int len);
+  extern int   pcp_flush(PCP_CONNECTION * pc);
+  
+! #define UNIX_DOMAIN_PATH "/tmp"
+  
+  #endif                                                       /* PCP_STREAM_H */
+--- 49,54 ----
+  extern int   pcp_write(PCP_CONNECTION * pc, void *buf, int len);
+  extern int   pcp_flush(PCP_CONNECTION * pc);
+  
+! #define UNIX_DOMAIN_PATH "/var/run/postgresql"
+  
+  #endif                                                       /* PCP_STREAM_H */