diff --git a/.gitignore b/.gitignore index a40bb76..f780b43 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/postgresql-12.3.tar.bz2 +SOURCES/postgresql-13.1.tar.bz2 diff --git a/.libpq.metadata b/.libpq.metadata index c0826bb..e054ac2 100644 --- a/.libpq.metadata +++ b/.libpq.metadata @@ -1 +1 @@ -2730f6c0c22037646c84b902a13f5aaa56308ab8 SOURCES/postgresql-12.3.tar.bz2 +3760c704f4d195100a28a983c0bc5331076259ee SOURCES/postgresql-13.1.tar.bz2 diff --git a/SOURCES/libpq-10.3-var-run-socket.patch b/SOURCES/libpq-10.3-var-run-socket.patch index 8e3b193..91dceab 100644 --- a/SOURCES/libpq-10.3-var-run-socket.patch +++ b/SOURCES/libpq-10.3-var-run-socket.patch @@ -42,12 +42,12 @@ diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index e278fa0..9ee15d4 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. +@@ -201,7 +201,7 @@ + * support them yet. */ + #ifndef WIN32 -#define DEFAULT_PGSOCKET_DIR "/tmp" +#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" - - /* - * This is the default event source for Windows event log. + #else + #define DEFAULT_PGSOCKET_DIR "" + #endif diff --git a/SOURCES/libpq-12.0-symbol-versioning.patch b/SOURCES/libpq-12.0-symbol-versioning.patch deleted file mode 100644 index 2ff9570..0000000 --- a/SOURCES/libpq-12.0-symbol-versioning.patch +++ /dev/null @@ -1,92 +0,0 @@ -- 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 67e7998f55..86612a42c3 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 --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt -index ccec59919b..4c2be8b7d5 100644 ---- a/src/interfaces/libpq/exports.txt -+++ b/src/interfaces/libpq/exports.txt -@@ -171,8 +171,8 @@ PQsslAttributeNames 168 - PQsslAttribute 169 - PQsetErrorContextVisibility 170 - PQresultVerboseErrorMessage 171 --PQencryptPasswordConn 172 --PQresultMemorySize 173 -+PQencryptPasswordConn 172 10 -+PQresultMemorySize 173 12 - PQhostaddr 174 - PQgssEncInUse 175 - PQgetgssctx 176 diff --git a/SOURCES/libpq-13.1-symbol-versioning.patch b/SOURCES/libpq-13.1-symbol-versioning.patch new file mode 100644 index 0000000..08c0d71 --- /dev/null +++ b/SOURCES/libpq-13.1-symbol-versioning.patch @@ -0,0 +1,96 @@ +- 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 67e7998f55..86612a42c3 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 --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt +index ccec59919b..4c2be8b7d5 100644 +--- a/src/interfaces/libpq/exports.txt ++++ b/src/interfaces/libpq/exports.txt +@@ -171,11 +171,11 @@ + 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 diff --git a/SOURCES/postgresql-12.3.tar.bz2.sha256 b/SOURCES/postgresql-12.3.tar.bz2.sha256 deleted file mode 100644 index 80e40e5..0000000 --- a/SOURCES/postgresql-12.3.tar.bz2.sha256 +++ /dev/null @@ -1 +0,0 @@ -94ed64a6179048190695c86ec707cc25d016056ce10fc9d229267d9a8f1dcf41 postgresql-12.3.tar.bz2 diff --git a/SOURCES/postgresql-13.1.tar.bz2.sha256 b/SOURCES/postgresql-13.1.tar.bz2.sha256 new file mode 100644 index 0000000..761d472 --- /dev/null +++ b/SOURCES/postgresql-13.1.tar.bz2.sha256 @@ -0,0 +1 @@ +12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f postgresql-13.1.tar.bz2 diff --git a/SPECS/libpq.spec b/SPECS/libpq.spec index 46a2d1b..d192383 100644 --- a/SPECS/libpq.spec +++ b/SPECS/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}.3 +Version: %{majorversion}.1 Release: 1%{?dist} License: PostgreSQL @@ -16,7 +16,7 @@ Source1: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version} # Comments for these patches are in the patch files. Patch1: libpq-10.3-rpm-pgsql.patch Patch2: libpq-10.3-var-run-socket.patch -Patch3: libpq-12.0-symbol-versioning.patch +Patch3: libpq-13.1-symbol-versioning.patch BuildRequires: gcc BuildRequires: glibc-devel bison flex gawk @@ -130,6 +130,14 @@ find_lang_bins %name-devel.lst pg_config %changelog +* Tue Nov 17 2020 Patrik Novotný - 13.1-1 +- Rebase to upstream release 13.1 + Resolves: BZ#1855776 + (BZ#1856242 particuarly) + +* Mon Aug 17 2020 Patrik Novotný - 12.4-1 +- Rebase to upstream release 12.4 + * Tue Jun 16 2020 Patrik Novotný - 12.3-1 - Rebase to upstream release 12.3