Update to version 16

Build with ICU support
This commit is contained in:
Filip Janus 2023-12-05 14:57:41 +01:00
parent ffe73c3696
commit 629dad7480
4 changed files with 92 additions and 86 deletions

View File

@ -1,3 +1,4 @@
Change the built-in default socket directory to be /var/run/postgresql. Change the built-in default socket directory to be /var/run/postgresql.
For backwards compatibility with (probably non-libpq-based) clients that For backwards compatibility with (probably non-libpq-based) clients that
might still expect to find the socket in /tmp, also create a socket in might still expect to find the socket in /tmp, also create a socket in
@ -12,37 +13,34 @@ server package update, without requiring any existing postgresql.conf
to be updated. (Of course, a user who dislikes this behavior can still to be updated. (Of course, a user who dislikes this behavior can still
override it via postgresql.conf.) override it via postgresql.conf.)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c diff -ur postgresql-16.1/src/backend/utils/misc/guc_tables.c pg_patched/src/backend/utils/misc/guc_tables.c
index 4dde819652..8c2f601333 100644 --- postgresql-16.1/src/backend/utils/misc/guc_tables.c 2023-11-06 23:04:27.000000000 +0100
--- a/src/backend/utils/misc/guc.c +++ pg_patched/src/backend/utils/misc/guc_tables.c 2023-12-05 12:02:46.000000000 +0100
+++ b/src/backend/utils/misc/guc.c @@ -4271,7 +4271,7 @@
@@ -4159,7 +4159,7 @@ static struct config_string ConfigureNamesString[] = GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
}, },
&Unix_socket_directories, &Unix_socket_directories,
#ifdef HAVE_UNIX_SOCKETS
- DEFAULT_PGSOCKET_DIR, - DEFAULT_PGSOCKET_DIR,
+ DEFAULT_PGSOCKET_DIR ", /tmp", + DEFAULT_PGSOCKET_DIR ", /tmp",
#else NULL, NULL, NULL
"", },
#endif
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 4ff0c6c700..6ccd96b1f2 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1091,7 +1091,7 @@ setup_config(void)
#ifdef HAVE_UNIX_SOCKETS diff -ur postgresql-16.1/src/bin/initdb/initdb.c pg_patched/src/bin/initdb/initdb.c
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'", --- postgresql-16.1/src/bin/initdb/initdb.c 2023-11-06 23:04:27.000000000 +0100
- DEFAULT_PGSOCKET_DIR); +++ pg_patched/src/bin/initdb/initdb.c 2023-12-05 12:04:19.000000000 +0100
+ DEFAULT_PGSOCKET_DIR ", /tmp"); @@ -1287,7 +1287,7 @@
#else * these are indeed defaults, keep the postgresql.conf lines commented.
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''"); */
#endif conflines = replace_guc_value(conflines, "unix_socket_directories",
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h - DEFAULT_PGSOCKET_DIR, true);
index 8f3ec6bde1..066daf3f08 100644 + DEFAULT_PGSOCKET_DIR ", /tmp", true);
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h conflines = replace_guc_value(conflines, "port",
@@ -201,7 +201,7 @@ DEF_PGPORT_STR, true);
diff -ur postgresql-16.1/src/include/pg_config_manual.h pg_patched/src/include/pg_config_manual.h
--- postgresql-16.1/src/include/pg_config_manual.h 2023-11-06 23:04:27.000000000 +0100
+++ pg_patched/src/include/pg_config_manual.h 2023-12-05 11:45:20.000000000 +0100
@@ -206,7 +206,7 @@
* support them yet. * support them yet.
*/ */
#ifndef WIN32 #ifndef WIN32

View File

@ -6,11 +6,10 @@ Date: Fri Oct 30 20:16:50 2020 +0100
available in RHEL 8, and ABI versioning will guarantee us that modular RPMs will available in RHEL 8, and ABI versioning will guarantee us that modular RPMs will
depend on appropriate libpq ABI version (picked at build-time). depend on appropriate libpq ABI version (picked at build-time).
diff --git a/config/Makefile b/config/Makefile diff -ur postgresql-16.1/config/Makefile postgresql_patched/config/Makefile
index 67e7998..86612a4 100644 --- postgresql-16.1/config/Makefile 2023-11-06 23:04:27.000000000 +0100
--- a/config/Makefile +++ postgresql_patched/config/Makefile 2023-12-05 10:43:19.733619095 +0100
+++ b/config/Makefile @@ -8,6 +8,7 @@
@@ -8,6 +8,7 @@ include $(top_builddir)/src/Makefile.global
install: all installdirs install: all installdirs
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh' $(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
$(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing' $(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing'
@ -18,6 +17,46 @@ index 67e7998..86612a4 100644
installdirs: installdirs:
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config' $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
diff -ur postgresql-16.1/src/interfaces/libpq/exports.txt postgresql_patched/src/interfaces/libpq/exports.txt
--- postgresql-16.1/src/interfaces/libpq/exports.txt 2023-11-06 23:04:27.000000000 +0100
+++ postgresql_patched/src/interfaces/libpq/exports.txt 2023-12-05 10:48:24.627604638 +0100
@@ -171,19 +171,19 @@
PQsslAttribute 169
PQsetErrorContextVisibility 170
PQresultVerboseErrorMessage 171
-PQencryptPasswordConn 172
-PQresultMemorySize 173
+PQencryptPasswordConn 172 10
+PQresultMemorySize 173 12
PQhostaddr 174
PQgssEncInUse 175
PQgetgssctx 176
-PQsetSSLKeyPassHook_OpenSSL 177
+PQsetSSLKeyPassHook_OpenSSL 177 13
PQgetSSLKeyPassHook_OpenSSL 178
PQdefaultSSLKeyPassHook_OpenSSL 179
-PQenterPipelineMode 180
+PQenterPipelineMode 180 14
PQexitPipelineMode 181
PQpipelineSync 182
PQpipelineStatus 183
PQsetTraceFlags 184
PQmblenBounded 185
PQsendFlushRequest 186
-PQconnectionUsedGSSAPI 187
+PQconnectionUsedGSSAPI 187 16
diff -ur postgresql-16.1/src/Makefile.shlib postgresql_patched/src/Makefile.shlib
--- postgresql-16.1/src/Makefile.shlib 2023-11-06 23:04:27.000000000 +0100
+++ postgresql_patched/src/Makefile.shlib 2023-12-05 10:43:19.739634021 +0100
@@ -185,7 +185,7 @@
ifdef soname
LINK.shared += -Wl,-soname,$(soname)
endif
- BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
+ BUILD.exports = $(SHELL) $(top_srcdir)/config/build-exports-gnu-ld < $< > $@
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 diff --git a/config/build-exports-gnu-ld b/config/build-exports-gnu-ld
new file mode 100755 new file mode 100755
index 0000000000..84c48e3ade index 0000000000..84c48e3ade
@ -38,66 +77,30 @@ index 0000000000..84c48e3ade
+ +
+open_block () +open_block ()
+{ +{
+ $first || echo + $first || echo
+ first=false + first=false
+ echo "${SYMBOL_VERSION_PREFIX}$version {" + echo "${SYMBOL_VERSION_PREFIX}$version {"
+ echo "global:" + echo "global:"
+} +}
+ +
+close_block () +close_block ()
+{ +{
+ echo "}${version_prev:+ $SYMBOL_VERSION_PREFIX$version_prev};" + echo "}${version_prev:+ $SYMBOL_VERSION_PREFIX$version_prev};"
+ version_prev=$version + version_prev=$version
+ version=$1 + version=$1
+} +}
+ +
+open_block +open_block
+while read -r symbol _ new_version +while read -r symbol _ new_version
+do +do
+ case $symbol in '#'*) continue ;; esac + case $symbol in '#'*) continue ;; esac
+ if test -n "$new_version" && test "$new_version" != "$version"; then + if test -n "$new_version" && test "$new_version" != "$version"; then
+ close_block "$new_version" + close_block "$new_version"
+ open_block + open_block
+ fi + fi
+ echo " $symbol;" + echo " $symbol;"
+done +done
+ +
+echo "local:" +echo "local:"
+echo " *;" +echo " *;"
+close_block +close_block
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 373d73caef..d5bd5468cd 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -231,7 +231,7 @@ ifeq ($(PORTNAME), linux)
ifdef soname
LINK.shared += -Wl,-soname,$(soname)
endif
- BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
+ BUILD.exports = $(SHELL) $(top_srcdir)/config/build-exports-gnu-ld < $< > $@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
ifneq (,$(exports_file))
LINK.shared += -Wl,--version-script=$(exports_file)
diff -ur postgresql-14.1/src/interfaces/libpq/exports.txt patched/src/interfaces/libpq/exports.txt
--- postgresql-14.1/src/interfaces/libpq/exports.txt 2021-11-08 22:58:24.000000000 +0100
+++ patched/src/interfaces/libpq/exports.txt 2022-01-12 12:00:28.000000000 +0100
@@ -171,15 +171,15 @@
PQsslAttribute 169
PQsetErrorContextVisibility 170
PQresultVerboseErrorMessage 171
-PQencryptPasswordConn 172
-PQresultMemorySize 173
+PQencryptPasswordConn 172 10
+PQresultMemorySize 173 12
PQhostaddr 174
PQgssEncInUse 175
PQgetgssctx 176
-PQsetSSLKeyPassHook_OpenSSL 177
+PQsetSSLKeyPassHook_OpenSSL 177 13
PQgetSSLKeyPassHook_OpenSSL 178
PQdefaultSSLKeyPassHook_OpenSSL 179
-PQenterPipelineMode 180
+PQenterPipelineMode 180 14
PQexitPipelineMode 181
PQpipelineSync 182
PQpipelineStatus 183

View File

@ -1,9 +1,9 @@
%global majorversion 15 %global majorversion 16
%global obsoletes_version %( echo $(( %majorversion + 1 )) ) %global obsoletes_version %( echo $(( %majorversion + 1 )) )
Summary: PostgreSQL client library Summary: PostgreSQL client library
Name: libpq Name: libpq
Version: %{majorversion}.3 Version: %{majorversion}.1
Release: 1%{?dist} Release: 1%{?dist}
License: PostgreSQL License: PostgreSQL
@ -27,6 +27,7 @@ BuildRequires: openldap-devel
BuildRequires: gettext BuildRequires: gettext
BuildRequires: multilib-rpm-config BuildRequires: multilib-rpm-config
BuildRequires: make BuildRequires: make
BuildRequires: libicu-devel
Obsoletes: postgresql-libs < %obsoletes_version Obsoletes: postgresql-libs < %obsoletes_version
Provides: postgresql-libs = %version-%release Provides: postgresql-libs = %version-%release
@ -130,6 +131,10 @@ find_lang_bins %name-devel.lst pg_config
%_libdir/pkgconfig/libpq.pc %_libdir/pkgconfig/libpq.pc
%changelog %changelog
* Tue Dec 5 2023 Filip Janus <fjanus@redhat.com> - 16.1-1
- Update to 16.1
- Build with ICU by default - new upstream feature
* Wed Aug 2 2023 Filip Janus <fjanus@redhat.com> - 15.3-1 * Wed Aug 2 2023 Filip Janus <fjanus@redhat.com> - 15.3-1
- Update to the latest upstream version - Update to the latest upstream version

View File

@ -1,2 +1,2 @@
SHA512 (postgresql-15.3.tar.bz2) = cac97edeb40df1e8f2162f401b465751132929d7249495ef001e950645a2db46343bd732e7bd6504a7f795e25aea66724f2f4ab0065e3d9331b36db4b3a3bec6 SHA512 (postgresql-16.1.tar.bz2) = 69f4635e5841452599f13b47df41ce2425ab34b4e4582fd2c635bc78d561fa36c5b03eccb4ae6569872dc74775be1b5a62dee20c9a4f12a43339250128352918
SHA512 (postgresql-15.3.tar.bz2.sha256) = 1c4874650352b8c61b24271d668e09fe64d7e3a961bb7fcf46a5cafe2d4daa8d7a25e2e0ff6fc49ad889c82be8fd03709ff1c032f87f943ba5feb5b3892c7b15 SHA512 (postgresql-16.1.tar.bz2.sha256) = 3f573d81a7af02dea2a3eee180d4e465546fc4d283dde5b6627d25af0be4a546ffd3ae914dd3490e45264d1a43cf143e829e14e5cd9c6bd8f179b6eae4fd6ff1