diff --git a/libpq-10.3-rpm-pgsql.patch b/libpq-10.3-rpm-pgsql.patch deleted file mode 100644 index 93a3532c43d7691412a50a6919a2d72cf87401bf..0000000000000000000000000000000000000000 --- a/libpq-10.3-rpm-pgsql.patch +++ /dev/null @@ -1,72 +0,0 @@ -For the RPMs, we want the custom installation directories to end in -/pgsql not /postgresql. This is historical but not worth changing. - -Notice that this patch also makes the appending of /pgsql unconditional. -This is to avoid unexpected behavior if the RPM is built in a working -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 --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 --# append "postgresql" to some of them, if the string does not already --# contain "pgsql" or "postgres", in order to avoid directory clutter. -+# append "pgsql" to some of them, in order to avoid directory clutter. - # - # In a PGXS build, we cannot use the values inserted into Makefile.global - # by configure, since the installation tree may have been relocated. -@@ -101,45 +100,23 @@ datarootdir := @datarootdir@ - bindir := @bindir@ - - datadir := @datadir@ --ifeq "$(findstring pgsql, $(datadir))" "" --ifeq "$(findstring postgres, $(datadir))" "" --override datadir := $(datadir)/postgresql --endif --endif - - sysconfdir := @sysconfdir@ --ifeq "$(findstring pgsql, $(sysconfdir))" "" --ifeq "$(findstring postgres, $(sysconfdir))" "" --override sysconfdir := $(sysconfdir)/postgresql --endif --endif - - libdir := @libdir@ - - pkglibdir = $(libdir) --ifeq "$(findstring pgsql, $(pkglibdir))" "" --ifeq "$(findstring postgres, $(pkglibdir))" "" --override pkglibdir := $(pkglibdir)/postgresql --endif --endif -+override pkglibdir := $(pkglibdir)/pgsql - - includedir := @includedir@ - - pkgincludedir = $(includedir) --ifeq "$(findstring pgsql, $(pkgincludedir))" "" --ifeq "$(findstring postgres, $(pkgincludedir))" "" --override pkgincludedir := $(pkgincludedir)/postgresql --endif --endif -+override pkgincludedir := $(pkgincludedir)/pgsql - - mandir := @mandir@ - - docdir := @docdir@ --ifeq "$(findstring pgsql, $(docdir))" "" --ifeq "$(findstring postgres, $(docdir))" "" --override docdir := $(docdir)/postgresql --endif --endif -+override docdir := $(docdir)/pgsql - - htmldir := @htmldir@ - diff --git a/libpq-10.3-var-run-socket.patch b/libpq-10.3-var-run-socket.patch deleted file mode 100644 index 4b130b0e0adca1c806190261db3d2c3391f6d54f..0000000000000000000000000000000000000000 --- a/libpq-10.3-var-run-socket.patch +++ /dev/null @@ -1,53 +0,0 @@ -Change the built-in default socket directory to be /var/run/postgresql. -For backwards compatibility with (probably non-libpq-based) clients that -might still expect to find the socket in /tmp, also create a socket in -/tmp. This is to resolve communication problems with clients operating -under systemd's PrivateTmp environment, which won't be using the same -global /tmp directory as the server; see bug #825448. - -Note that we apply the socket directory change at the level of the -hard-wired defaults in the C code, not by just twiddling the setting in -postgresql.conf.sample; this is so that the change will take effect on -server package update, without requiring any existing postgresql.conf -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 4dde819652..8c2f601333 100644 ---- a/src/backend/utils/misc/guc.c -+++ b/src/backend/utils/misc/guc.c -@@ -4159,7 +4159,7 @@ static struct config_string ConfigureNamesString[] = - }, - &Unix_socket_directories, - #ifdef HAVE_UNIX_SOCKETS -- DEFAULT_PGSOCKET_DIR, -+ DEFAULT_PGSOCKET_DIR ", /tmp", - #else - "", - #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 - snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'", -- DEFAULT_PGSOCKET_DIR); -+ DEFAULT_PGSOCKET_DIR ", /tmp"); - #else - 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 8f3ec6bde1..066daf3f08 100644 ---- a/src/include/pg_config_manual.h -+++ b/src/include/pg_config_manual.h -@@ -201,7 +201,7 @@ - * support them yet. - */ - #ifndef WIN32 --#define DEFAULT_PGSOCKET_DIR "/tmp" -+#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" - #else - #define DEFAULT_PGSOCKET_DIR "" - #endif diff --git a/libpq-12.1-symbol-versioning.patch b/libpq-12.1-symbol-versioning.patch deleted file mode 100644 index 48a2482c84dc6e7df69f2643698a29add8b849a3..0000000000000000000000000000000000000000 --- a/libpq-12.1-symbol-versioning.patch +++ /dev/null @@ -1,103 +0,0 @@ -commit 75040c3388d9a7dd5ad2bee53cbcc8bf3d35cd17 -Author: Honza Horak -Date: Fri Oct 30 20:16:50 2020 +0100 - - The libpq package is supposed to be used for all the PostgreSQL modules - available in RHEL 8, and ABI versioning will guarantee us that modular RPMs will - depend on appropriate libpq ABI version (picked at build-time). - -diff --git a/config/Makefile b/config/Makefile -index 67e7998..86612a4 100644 ---- a/config/Makefile -+++ b/config/Makefile -@@ -8,6 +8,7 @@ include $(top_builddir)/src/Makefile.global - install: all installdirs - $(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh' - $(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing' -+ $(INSTALL_SCRIPT) $(srcdir)/build-exports-gnu-ld '$(DESTDIR)$(pgxsdir)/config/build-exports-gnu-ld' - - 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 ---- 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 diff --git a/libpq.spec b/libpq.spec index b11ad5ba39224dd0411758e082fdf260093bb45e..624b69d9c10a2f39bf197214c670ee3ded63e9e4 100644 --- a/libpq.spec +++ b/libpq.spec @@ -1,8 +1,8 @@ -%define anolis_release 3 +%define anolis_release 1 Summary: PostgreSQL client library Name: libpq -Version: 15.2 +Version: 16.1 Release: %{anolis_release}%{?dist} License: PostgreSQL @@ -11,15 +11,6 @@ Url: http://www.postgresql.org/ Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 Source1: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256 -# Change custom installation directories to end in /pgsql not /postgresql for RPM -Patch1: libpq-10.3-rpm-pgsql.patch - -#Change the built-in default socket directory to be /var/run/postgresql. -Patch2: libpq-10.3-var-run-socket.patch - -# Export symbol versioning information -Patch3: libpq-12.1-symbol-versioning.patch - BuildRequires: gcc make BuildRequires: bison flex gawk gettext BuildRequires: glibc-devel @@ -27,8 +18,9 @@ BuildRequires: krb5-devel BuildRequires: openssl-devel BuildRequires: openldap-devel BuildRequires: zlib-devel +BuildRequires: libicu-devel -Obsoletes: postgresql-libs < 16 +Obsoletes: postgresql-libs < 17 Provides: postgresql-libs = %{version}-%{release} @@ -94,15 +86,14 @@ for subdir in %build_subdirs; do done find $RPM_BUILD_ROOT -name '*.a' -delete -rm -r $RPM_BUILD_ROOT%_includedir/pgsql/server find_lang_bins () { lst_file=$1 binary=$2 touch "$lst_file" - %find_lang "$binary"-15 - cat "$binary"-15.lang >>"$lst_file" + %find_lang "$binary"-16 + cat "$binary"-16.lang >>"$lst_file" } find_lang_bins %name.lst libpq5 @@ -132,6 +123,9 @@ find_lang_bins %name-devel.lst pg_config %doc doc/KNOWN_BUGS doc/TODO %changelog +* Tue Feb 18 2025 mgb01105731 - 16.1-1 +- Refer to CentOS Stream libpq-16.1-1(tdawson@redhat.com) + * Mon Apr 10 2023 Kun(llfl) - 15.2-3 - optimize spec file diff --git a/postgresql-15.2.tar.bz2.sha256 b/postgresql-15.2.tar.bz2.sha256 deleted file mode 100644 index 155528bf0ec597726dddf05ac13a28698e380374..0000000000000000000000000000000000000000 --- a/postgresql-15.2.tar.bz2.sha256 +++ /dev/null @@ -1 +0,0 @@ -99a2171fc3d6b5b5f56b757a7a3cb85d509a38e4273805def23941ed2b8468c7 postgresql-15.2.tar.bz2 diff --git a/postgresql-15.2.tar.bz2 b/postgresql-16.1.tar.bz2 similarity index 67% rename from postgresql-15.2.tar.bz2 rename to postgresql-16.1.tar.bz2 index e246f4e2d24ee71de49c1b8e22dad04fdf5321b6..6e12132785da557d37934aede1f1405029521549 100644 Binary files a/postgresql-15.2.tar.bz2 and b/postgresql-16.1.tar.bz2 differ diff --git a/postgresql-16.1.tar.bz2.sha256 b/postgresql-16.1.tar.bz2.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..8ef9f9e0f781e50c32899471180a70a2dea4e2ce --- /dev/null +++ b/postgresql-16.1.tar.bz2.sha256 @@ -0,0 +1 @@ +ce3c4d85d19b0121fe0d3f8ef1fa601f71989e86f8a66f7dc3ad546dd5564fec postgresql-16.1.tar.bz2