diff --git a/.gitignore b/.gitignore index 9c1bc00..1ff8c26 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/postgresql-12.1.tar.bz2 +SOURCES/postgresql-13.2.tar.bz2 diff --git a/.libpq.metadata b/.libpq.metadata index 5c59073..19b7b06 100644 --- a/.libpq.metadata +++ b/.libpq.metadata @@ -1 +1 @@ -b9bd13230fa02a4d0105e92d15d56e7842119e26 SOURCES/postgresql-12.1.tar.bz2 +fc40c06ee7f2fd5f4ee5af88c8502f06a44c8698 SOURCES/postgresql-13.2.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.1.tar.bz2.sha256 b/SOURCES/postgresql-12.1.tar.bz2.sha256 deleted file mode 100644 index 27f8f97..0000000 --- a/SOURCES/postgresql-12.1.tar.bz2.sha256 +++ /dev/null @@ -1 +0,0 @@ -a09bf3abbaf6763980d0f8acbb943b7629a8b20073de18d867aecdb7988483ed postgresql-12.1.tar.bz2 diff --git a/SOURCES/postgresql-13.2.tar.bz2.sha256 b/SOURCES/postgresql-13.2.tar.bz2.sha256 new file mode 100644 index 0000000..9bdf2b0 --- /dev/null +++ b/SOURCES/postgresql-13.2.tar.bz2.sha256 @@ -0,0 +1 @@ +5fd7fcd08db86f5b2aed28fcfaf9ae0aca8e9428561ac547764c2a2b0f41adfc postgresql-13.2.tar.bz2 diff --git a/SPECS/libpq.spec b/SPECS/libpq.spec index d878136..80eab74 100644 --- a/SPECS/libpq.spec +++ b/SPECS/libpq.spec @@ -1,10 +1,10 @@ -%global majorversion 12 +%global majorversion 13 %global obsoletes_version %( echo $(( %majorversion + 1 )) ) Summary: PostgreSQL client library Name: libpq -Version: %{majorversion}.1 -Release: 3%{?dist} +Version: %{majorversion}.2 +Release: 1%{?dist} License: PostgreSQL Url: http://www.postgresql.org/ @@ -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,21 @@ find_lang_bins %name-devel.lst pg_config %changelog +* Tue Feb 16 2021 Honza Horak - 13.2-1 +- Rebase to 13.2 + Related: #1855776 + +* 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 + * Tue Nov 19 2019 Patrik Novotný - 12.1-3 - Rebuild with rebased symbol versioning patch