X-Git-Url: https://git.tld-linux.org/?p=packages%2Fpostgresql.git;a=blobdiff_plain;f=socket-dir-fixes.patch;h=3690d568fe51613e38c451c5a8ea8b27576d179d;hp=380ac7310893646efe9718c0d7673ca56876c726;hb=HEAD;hpb=e91dafec9b0903bad6593b54c939b8dde755b243 diff --git a/socket-dir-fixes.patch b/socket-dir-fixes.patch index 380ac73..6b0f67c 100644 --- a/socket-dir-fixes.patch +++ b/socket-dir-fixes.patch @@ -1,26 +1,26 @@ -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; +diff -ur postgresql-16.1.orig/src/bin/pg_upgrade/option.c postgresql-16.1/src/bin/pg_upgrade/option.c +--- postgresql-16.1.orig/src/bin/pg_upgrade/option.c 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/bin/pg_upgrade/option.c 2023-12-13 21:51:21.445407619 +0100 +@@ -456,8 +456,14 @@ + get_sock_dir(ClusterInfo *cluster, bool live_check) + { + #if !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 + { + /* +diff -ur postgresql-16.1.orig/src/include/pg_config_manual.h postgresql-16.1/src/include/pg_config_manual.h +--- postgresql-16.1.orig/src/include/pg_config_manual.h 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/include/pg_config_manual.h 2023-12-13 21:49:50.563249439 +0100 +@@ -206,7 +206,7 @@ * support them yet. */ #ifndef WIN32