diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c2528b6 --- /dev/null +++ b/ci.fmf @@ -0,0 +1,12 @@ +/test: + summary: + Basic set of quick tests for libpq. Since libpq is client library and + part of postgresql. Postgresql testsuite is used. + discover: + - name: fedora + how: fmf + url: "https://src.fedoraproject.org/tests/postgresql.git" + ref: main + filter: tag:libpq + execute: + how: tmt diff --git a/libpq-10.3-rpm-pgsql.patch b/libpq-10.3-rpm-pgsql.patch index 93a3532..71a28e5 100644 --- a/libpq-10.3-rpm-pgsql.patch +++ b/libpq-10.3-rpm-pgsql.patch @@ -21,7 +21,7 @@ index 9a6265b3a0..c9371a07c4 100644 # # 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@ +@@ -111,45 +110,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 4b130b0..3081c26 100644 --- a/libpq-10.3-var-run-socket.patch +++ b/libpq-10.3-var-run-socket.patch @@ -1,3 +1,4 @@ + 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 @@ -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 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[] = +diff -ur postgresql-16.1/src/backend/utils/misc/guc_tables.c pg_patched/src/backend/utils/misc/guc_tables.c +--- postgresql-16.1/src/backend/utils/misc/guc_tables.c 2023-11-06 23:04:27.000000000 +0100 ++++ pg_patched/src/backend/utils/misc/guc_tables.c 2023-12-05 12:02:46.000000000 +0100 +@@ -4648,7 +4648,7 @@ + GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY }, &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 @@ + NULL, NULL, NULL + }, + +diff -ur postgresql-16.1/src/bin/initdb/initdb.c pg_patched/src/bin/initdb/initdb.c +--- postgresql-16.1/src/bin/initdb/initdb.c 2023-11-06 23:04:27.000000000 +0100 ++++ pg_patched/src/bin/initdb/initdb.c 2023-12-05 12:04:19.000000000 +0100 +@@ -1368,7 +1368,7 @@ + * these are indeed defaults, keep the postgresql.conf lines commented. + */ + conflines = replace_guc_value(conflines, "unix_socket_directories", +- DEFAULT_PGSOCKET_DIR, true); ++ DEFAULT_PGSOCKET_DIR ", /tmp", true); + + conflines = replace_guc_value(conflines, "port", + 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 +@@ -190,7 +190,7 @@ * support them yet. */ #ifndef WIN32 diff --git a/libpq-12.1-symbol-versioning.patch b/libpq-12.1-symbol-versioning.patch index 48a2482..2bd2525 100644 --- a/libpq-12.1-symbol-versioning.patch +++ b/libpq-12.1-symbol-versioning.patch @@ -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 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 +diff -ur postgresql-16.1/config/Makefile postgresql_patched/config/Makefile +--- postgresql-16.1/config/Makefile 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql_patched/config/Makefile 2023-12-05 10:43:19.733619095 +0100 +@@ -8,6 +8,7 @@ install: all installdirs $(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh' $(INSTALL_SCRIPT) $(srcdir)/missing '$(DESTDIR)$(pgxsdir)/config/missing' @@ -18,6 +17,51 @@ index 67e7998..86612a4 100644 installdirs: $(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,23 +171,23 @@ + 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 +-PQclosePrepared 188 ++PQconnectionUsedGSSAPI 187 16 ++PQclosePrepared 188 18 + PQclosePortal 189 + PQsendClosePrepared 190 + PQsendClosePortal 191 +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 +@@ -176,7 +176,7 @@ + endif + 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 new file mode 100755 index 0000000000..84c48e3ade @@ -38,66 +82,30 @@ index 0000000000..84c48e3ade + +open_block () +{ -+ $first || echo -+ first=false -+ echo "${SYMBOL_VERSION_PREFIX}$version {" -+ echo "global:" ++ $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 ++ 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;" ++ 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 " *;" ++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 55e689f..4db4d81 100644 --- a/libpq.spec +++ b/libpq.spec @@ -1,16 +1,21 @@ -%global majorversion 14 +%global majorversion 18 %global obsoletes_version %( echo $(( %majorversion + 1 )) ) +%global betaversion 18beta1 Summary: PostgreSQL client library Name: libpq -Version: %{majorversion}.1 -Release: 2%{?dist} +Version: %{majorversion}.0 +Release: 3%{?dist} License: PostgreSQL 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 +# Use this when 18.0 is released +# 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 + +Source0: https://ftp.postgresql.org/pub/source/v%{betaversion}/postgresql-%{betaversion}.tar.bz2 +Source1: https://ftp.postgresql.org/pub/source/v%{betaversion}/postgresql-%{betaversion}.tar.bz2.sha256 # Comments for these patches are in the patch files. @@ -27,6 +32,8 @@ BuildRequires: openldap-devel BuildRequires: gettext BuildRequires: multilib-rpm-config BuildRequires: make +BuildRequires: libicu-devel +BuildRequires: perl Obsoletes: postgresql-libs < %obsoletes_version Provides: postgresql-libs = %version-%release @@ -57,7 +64,7 @@ package or any clients that need to connect to a PostgreSQL server. %prep ( cd "$(dirname "%SOURCE1")" ; sha256sum -c "%SOURCE1" ) -%autosetup -n postgresql-%version -p1 +%autosetup -n postgresql-%{betaversion} -p1 # remove .gitignore files to ensure none get into the RPMs (bug #642210) find . -type f -name .gitignore | xargs rm @@ -67,6 +74,7 @@ find . -type f -name .gitignore | xargs rm # complements symbol-versioning patch export SYMBOL_VERSION_PREFIX=RHPG_ +export CFLAGS="$CFLAGS -DOPENSSL_NO_ENGINE -std=c17" # We don't build server nor client (e.g. /bin/psql) binaries in this package, so # we can disable some configure options. %configure \ @@ -97,10 +105,17 @@ done # remove files not to be packaged find $RPM_BUILD_ROOT -name '*.a' -delete +# preserve just errcodes.h +mv $RPM_BUILD_ROOT%{_includedir}/pgsql/server/utils/errcodes.h \ + $RPM_BUILD_ROOT%{_includedir}/pgsql rm -r $RPM_BUILD_ROOT%_includedir/pgsql/server +mkdir -p $RPM_BUILD_ROOT%{_includedir}/pgsql/server/utils +mv $RPM_BUILD_ROOT%{_includedir}/pgsql/errcodes.h \ + $RPM_BUILD_ROOT%{_includedir}/pgsql/server/utils +rm $RPM_BUILD_ROOT%_datadir/pgsql/postgres.bki +rm $RPM_BUILD_ROOT%_datadir/pgsql/system_constraints.sql %multilib_fix_c_header --file "%_includedir/pg_config.h" -%multilib_fix_c_header --file "%_includedir/pg_config_ext.h" find_lang_bins () { @@ -129,12 +144,85 @@ find_lang_bins %name-devel.lst pg_config %_libdir/libpq.so %_libdir/pkgconfig/libpq.pc - %changelog +* Wed Sep 17 2025 Filip Janus - 18.0-3 +- Removes server based files + +* Thu Jul 24 2025 Fedora Release Engineering - 18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jun 09 2025 Nikola Davidova - 18.0-1 +- Rebase to upstream release 18.0 + +* Fri Jan 17 2025 Fedora Release Engineering - 16.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Aug 21 2024 Ales Nezbeda - 16.4-1 +- Update to 16.4 + +* Tue Jul 30 2024 Ales Nezbeda - 16.3-5 +- Disable openssl ENGINE_API +- Fedora change: https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine +- BZ: 2300910 + +* Thu Jul 18 2024 Fedora Release Engineering - 16.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 18 2024 Filip Janus - 16.3-3 +- Move errcodes.h to usr/include/pgsql/server/utils/ +- to be consistent with upstream + +* Tue Jun 18 2024 Filip Janus - 16.3-2 +- Ship errcodes.h in -devel package (kea package requires errorcodes) + +* Mon May 27 2024 Ales Nezbeda - 16.3-1 +- Update to 16.3 +- Remove backported OpenSSL fix + +* Tue Feb 20 2024 Yaakov Selkowitz - 16.1-4 +- Backport OpenSSL 3.2 fix from upstream master + +* Thu Jan 25 2024 Fedora Release Engineering - 16.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 16.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Dec 5 2023 Filip Janus - 16.1-1 +- Update to 16.1 +- Build with ICU by default - new upstream feature + +* Wed Aug 2 2023 Filip Janus - 15.3-1 +- Update to the latest upstream version + +* Thu Jul 20 2023 Fedora Release Engineering - 15.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 15.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Dec 05 2022 Filip Janus - 15.0-2 +- Revert versioning patch +- There are no new symbols in libpq 15 + +* Tue Sep 27 2022 Ondrej Sloup - 15.0-1 +- Update to v15 +- Update patches +- Resolves: https://fedoraproject.org/wiki/Changes/PostgreSQL_15 + +* Thu Jul 21 2022 Fedora Release Engineering - 14.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jun 14 2022 Filip Januš - 14.3-1 +- Update to 14.3 + +* Tue Feb 22 2022 Filip Januš - 14.2-1 +- Update to 14.2 + * Thu Jan 20 2022 Fedora Release Engineering - 14.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Mon Jan 03 2022 Filip Januš - 14.1-1 +* Mon Jan 03 2022 Filip Januš - 14.1-1 - Update to v14 - Resolves: https://fedoraproject.org/wiki/Changes/PostgreSQL_14 diff --git a/sources b/sources index 0d7df43..26803b0 100755 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (postgresql-14.1.tar.bz2) = 4a0bec157d5464bb9e5f5c0eb0efdede55526e03f6f4d660b87d161a47705eb152fa0878960b1581bce42a5ed28a1f457825ea54e8d22e34b5b8eb36473ceefd -SHA512 (postgresql-14.1.tar.bz2.sha256) = 99edebb68b62a11d4698423deae2a9349b98128909221d7ca9aff347061d56dcd11bd8a6e445dcde27b6556598a73d7beea01ea08dccca7ed517d28377145a5d +SHA512 (postgresql-18beta1.tar.bz2) = 881a3442552d282fbe03ea22fab4bdd818cb901f8410485f19867ff64dc577d50cd9f7bb898828aec9783ff7e482798ffae63ff1cbfd19c4e1c64fed9e0a2daf +SHA512 (postgresql-18beta1.tar.bz2.sha256) = fc8fb34666d899dde9bb3c5886dec3ea87241913d47a464f960d1d1b4b105c8b007a36dac6f62ae2c45b9d254fe3c1b1a32fa42693af43d8561a192fee4340d9