From 7d81dca0eae977de64a6db7aa2cd5814b1bb1112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= Date: Thu, 22 Oct 2020 13:14:13 +0200 Subject: [PATCH] Rebase to upstream release 13.0 --- .gitignore | 1 + libpq-10.3-rpm-pgsql.patch | 12 ++-- libpq-10.3-var-run-socket.patch | 22 +++--- libpq-12.1-symbol-versioning.patch | 112 +++++++++++++++-------------- libpq.spec | 7 +- sources | 4 +- 6 files changed, 84 insertions(+), 74 deletions(-) diff --git a/.gitignore b/.gitignore index d83a125..b1bf628 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /postgresql-*.tar.bz2* +/rpms diff --git a/libpq-10.3-rpm-pgsql.patch b/libpq-10.3-rpm-pgsql.patch index aec64ac..93a3532 100644 --- a/libpq-10.3-rpm-pgsql.patch +++ b/libpq-10.3-rpm-pgsql.patch @@ -7,11 +7,11 @@ 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 -Naur postgresql-9.0.1.orig/src/Makefile.global.in postgresql-9.0.1/src/Makefile.global.in ---- postgresql-9.0.1.orig/src/Makefile.global.in 2010-10-01 10:25:44.000000000 -0400 -+++ postgresql-9.0.1/src/Makefile.global.in 2010-10-11 11:52:05.224975308 -0400 -@@ -55,8 +55,7 @@ +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 @@ -21,7 +21,7 @@ diff -Naur postgresql-9.0.1.orig/src/Makefile.global.in postgresql-9.0.1/src/Mak # # In a PGXS build, we cannot use the values inserted into Makefile.global # by configure, since the installation tree may have been relocated. -@@ -74,45 +73,23 @@ +@@ -101,45 +100,23 @@ datarootdir := @datarootdir@ bindir := @bindir@ datadir := @datadir@ diff --git a/libpq-10.3-var-run-socket.patch b/libpq-10.3-var-run-socket.patch index 8e3b193..0c3e882 100644 --- a/libpq-10.3-var-run-socket.patch +++ b/libpq-10.3-var-run-socket.patch @@ -13,10 +13,10 @@ to be updated. (Of course, a user who dislikes this behavior can still override it via postgresql.conf.) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c -index 9481f2d..75532c7 100644 +index 4dde819652..8c2f601333 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c -@@ -3196,7 +3196,7 @@ static struct config_string ConfigureNamesString[] = +@@ -4159,7 +4159,7 @@ static struct config_string ConfigureNamesString[] = }, &Unix_socket_directories, #ifdef HAVE_UNIX_SOCKETS @@ -26,10 +26,10 @@ index 9481f2d..75532c7 100644 "", #endif diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c -index feeff9e..3e3d784 100644 +index 4ff0c6c700..6ccd96b1f2 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c -@@ -1234,7 +1234,7 @@ setup_config(void) +@@ -1091,7 +1091,7 @@ setup_config(void) #ifdef HAVE_UNIX_SOCKETS snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'", @@ -39,15 +39,15 @@ index feeff9e..3e3d784 100644 snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''"); #endif diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h -index e278fa0..9ee15d4 100644 +index 8f3ec6bde1..066daf3f08 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h -@@ -169,7 +169,7 @@ - * here's where to twiddle it. You can also override this at runtime - * with the postmaster's -k switch. - */ --#define DEFAULT_PGSOCKET_DIR "/tmp" +@@ -203,7 +203,7 @@ + #ifndef WIN32 + #define DEFAULT_PGSOCKET_DIR "/tmp" + #else +-#define DEFAULT_PGSOCKET_DIR "" +#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" + #endif /* - * This is the default event source for Windows event log. diff --git a/libpq-12.1-symbol-versioning.patch b/libpq-12.1-symbol-versioning.patch index d977789..189140b 100644 --- a/libpq-12.1-symbol-versioning.patch +++ b/libpq-12.1-symbol-versioning.patch @@ -10,58 +10,11 @@ index 67e7998f55..86612a42c3 100644 installdirs: $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config' -diff --git a/config/build-exports-gnu-ld b/config/build-exports-gnu-ld -new file mode 100755 -index 0000000000..84c48e3ade ---- /dev/null -+++ b/config/build-exports-gnu-ld -@@ -0,0 +1,41 @@ -+#! /bin/sh -+ -+# by default use PG_ prefix -+: "${SYMBOL_VERSION_PREFIX=PG_}" -+ -+# we started symbol versioning since v10 -+: "${SYMBOL_VERSION_START=9.6}" -+ -+version=$SYMBOL_VERSION_START -+version_prev= -+first=: -+ -+open_block () -+{ -+ $first || echo -+ first=false -+ echo "${SYMBOL_VERSION_PREFIX}$version {" -+ echo "global:" -+} -+ -+close_block () -+{ -+ echo "}${version_prev:+ $SYMBOL_VERSION_PREFIX$version_prev};" -+ version_prev=$version -+ version=$1 -+} -+ -+open_block -+while read -r symbol _ new_version -+do -+ case $symbol in '#'*) continue ;; esac -+ if test -n "$new_version" && test "$new_version" != "$version"; then -+ close_block "$new_version" -+ open_block -+ fi -+ echo " $symbol;" -+done -+ -+echo "local:" -+echo " *;" -+close_block diff --git a/src/Makefile.shlib b/src/Makefile.shlib -index 373d73caef..d5bd5468cd 100644 +index 29a7f6d38c..d7599a3e16 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib -@@ -231,7 +231,7 @@ ifeq ($(PORTNAME), linux) +@@ -215,7 +215,7 @@ ifeq ($(PORTNAME), linux) ifdef soname LINK.shared += -Wl,-soname,$(soname) endif @@ -70,16 +23,69 @@ index 373d73caef..d5bd5468cd 100644 exports_file = $(SHLIB_EXPORTS:%.txt=%.list) ifneq (,$(exports_file)) LINK.shared += -Wl,--version-script=$(exports_file) +diff --git a/config/build-exports-gnu-ld b/config/build-exports-gnu-ld +new file mode 100755 +index 0000000000..84c48e3ade +--- /dev/null ++++ b/config/build-exports-gnu-ld +@@ -0,0 +1,41 @@ ++#! /bin/sh ++ ++# by default use PG_ prefix ++: "${SYMBOL_VERSION_PREFIX=PG_}" ++ ++# we started symbol versioning since v10 ++: "${SYMBOL_VERSION_START=9.6}" ++ ++version=$SYMBOL_VERSION_START ++version_prev= ++first=: ++ ++open_block () ++{ ++ $first || echo ++ first=false ++ echo "${SYMBOL_VERSION_PREFIX}$version {" ++ echo "global:" ++} ++ ++close_block () ++{ ++ echo "}${version_prev:+ $SYMBOL_VERSION_PREFIX$version_prev};" ++ version_prev=$version ++ version=$1 ++} ++ ++open_block ++while read -r symbol _ new_version ++do ++ case $symbol in '#'*) continue ;; esac ++ if test -n "$new_version" && test "$new_version" != "$version"; then ++ close_block "$new_version" ++ open_block ++ fi ++ echo " $symbol;" ++done ++ ++echo "local:" ++echo " *;" ++close_block diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt -index 7c808e5215..3631340b23 100644 +index bbc1f90481..0b00a94279 100644 --- a/src/interfaces/libpq/exports.txt +++ b/src/interfaces/libpq/exports.txt -@@ -171,7 +171,7 @@ PQsslAttributeNames 168 +@@ -171,11 +171,11 @@ PQsslAttributeNames 168 PQsslAttribute 169 PQsetErrorContextVisibility 170 PQresultVerboseErrorMessage 171 -PQencryptPasswordConn 172 -+PQencryptPasswordConn 172 10 - PQresultMemorySize 173 +-PQresultMemorySize 173 ++PQencryptPasswordConn 172 10 ++PQresultMemorySize 173 12 PQhostaddr 174 PQgssEncInUse 175 +-PQgetgssctx 176 ++PQgetgssctx 176 13 + PQsetSSLKeyPassHook_OpenSSL 177 + PQgetSSLKeyPassHook_OpenSSL 178 + PQdefaultSSLKeyPassHook_OpenSSL 179 diff --git a/libpq.spec b/libpq.spec index ce4d394..2f16263 100644 --- a/libpq.spec +++ b/libpq.spec @@ -1,9 +1,9 @@ -%global majorversion 12 +%global majorversion 13 %global obsoletes_version %( echo $(( %majorversion + 1 )) ) Summary: PostgreSQL client library Name: libpq -Version: %{majorversion}.4 +Version: %{majorversion}.0 Release: 1%{?dist} License: PostgreSQL @@ -130,6 +130,9 @@ find_lang_bins %name-devel.lst pg_config %changelog +* Wed Oct 14 2020 Patrik Novotný - 13.0-1 +- Rebase to upstream release 13.0 + * Tue Aug 18 2020 Patrik Novotný - 12.4-1 - Rebase to upstream release 12.4 diff --git a/sources b/sources index c8ee27a..5e751b5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (postgresql-12.4.tar.bz2) = 36daf10878ca153370829178786dd6ee366ab4d4d6dc9c527536740fdb14b688ae4c33f850eb4243a7667d23f87e4bfd1ddee0755447ad4f3996e423e391c2f3 -SHA512 (postgresql-12.4.tar.bz2.sha256) = d5c6d9c6cf189f0ef9c4ebac18782f25c0ff8420d0b063217f4ac250cca4706ec782e983326ffcb23258bcd5bf17b481e53d84aeb85b5744bfd90ea1bd33431a +SHA512 (postgresql-13.0.tar.bz2) = 1fde89487c3e50a7a07e1d42fba60d415645ea89c5d4c5c7fcc93fbd5330feca7ec991d5b274f6ab757d5d04667ca1a7efdf4eaaa760add19d2e02437465f8f5 +SHA512 (postgresql-13.0.tar.bz2.sha256) = 147e2fa96eb8aab3c80dfbfdcf2dbd220599ec9c2200bd890e30e5a8a65b3136b035835444ab2c98368ac53c8ae190d83999e344ee6b52c069b3cd6d157dd34e