X-Git-Url: https://git.tld-linux.org/?p=packages%2Fpostgresql.git;a=blobdiff_plain;f=socket-dir-fixes.patch;fp=socket-dir-fixes.patch;h=5b63aba4f760f4f97f046c84c04b4bdd0ba6c35a;hp=380ac7310893646efe9718c0d7673ca56876c726;hb=193d75f41ea3d2970978c911b760133c4518f030;hpb=5c4f9ef1e909fb7a86fc6a3e1da2e487ed04d484 diff --git a/socket-dir-fixes.patch b/socket-dir-fixes.patch index 380ac73..5b63aba 100644 --- a/socket-dir-fixes.patch +++ b/socket-dir-fixes.patch @@ -1,26 +1,24 @@ -diff -ur postgresql-14.0.orig/src/bin/pg_upgrade/option.c postgresql-14.0/src/bin/pg_upgrade/option.c ---- postgresql-14.0.orig/src/bin/pg_upgrade/option.c 2021-11-01 14:54:18.782057697 +0100 -+++ postgresql-14.0/src/bin/pg_upgrade/option.c 2021-11-01 14:54:35.649100699 +0100 -@@ -476,8 +476,14 @@ - */ - if (GET_MAJOR_VERSION(cluster->major_version) >= 901) - { -- if (!live_check) -+ if (!live_check) { - cluster->sockdir = user_opts.socketdir; +--- postgresql-15.2/src/bin/pg_upgrade/option.c 2023-03-07 23:37:50.271950638 +0100 ++++ postgresql-15.2/src/bin/pg_upgrade/option.c 2023-03-07 23:40:28.343899006 +0100 +@@ -445,8 +445,14 @@ + get_sock_dir(ClusterInfo *cluster, bool live_check) + { + #if defined(HAVE_UNIX_SOCKETS) && !defined(WIN32) +- if (!live_check) ++ if (!live_check) { + cluster->sockdir = user_opts.socketdir; +#ifndef UNIX_PATH_MAX +#define UNIX_PATH_MAX 108 +#endif -+ if (strlen(cluster->sockdir) >= UNIX_PATH_MAX - sizeof(".s.PGSQL.50432")) -+ strcpy(cluster->sockdir, "/tmp"); /* fall back to tmp */ -+ } - else - { - /* -diff -ur postgresql-14.0.orig/src/include/pg_config_manual.h postgresql-14.0/src/include/pg_config_manual.h ---- postgresql-14.0.orig/src/include/pg_config_manual.h 2021-11-01 14:54:18.575057170 +0100 -+++ postgresql-14.0/src/include/pg_config_manual.h 2021-11-01 14:54:35.767101001 +0100 -@@ -207,7 +207,7 @@ ++ if (strlen(cluster->sockdir) >= UNIX_PATH_MAX - sizeof(".s.PGSQL.50432")) ++ strcpy(cluster->sockdir, "/tmp"); /* fall back to tmp */ ++ } + else + { + /* +--- postgresql-15.2/src/include/pg_config_manual.h 2023-03-07 23:37:50.153949183 +0100 ++++ postgresql-15.2/src/include/pg_config_manual.h 2023-03-07 23:38:28.898426739 +0100 +@@ -224,7 +224,7 @@ * support them yet. */ #ifndef WIN32