diff --git a/libecpg-10.5-external-libpq.patch b/libecpg-10.5-external-libpq.patch deleted file mode 100644 index 71dc609..0000000 --- a/libecpg-10.5-external-libpq.patch +++ /dev/null @@ -1,40 +0,0 @@ -We don't build/install interfaces by upstream's implicit rules. - -This patch is used on two places; postgresql.spec and libecpg.spec -- keep those -in sync! - -Related: rhbz#1618698 - -diff --git a/src/Makefile b/src/Makefile -index bcdbd95..4bea236 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -20,7 +20,6 @@ SUBDIRS = \ - backend/utils/mb/conversion_procs \ - backend/snowball \ - include \ -- interfaces \ - backend/replication/libpqwalreceiver \ - backend/replication/pgoutput \ - fe_utils \ -diff --git a/src/Makefile.global.in b/src/Makefile.global.in -index 9a4a8a3..2bdfb77 100644 ---- a/src/Makefile.global.in -+++ b/src/Makefile.global.in -@@ -513,7 +513,7 @@ endif - - # This macro is for use by libraries linking to libpq. (Because libpgport - # isn't created with the same link flags as libpq, it can't be used.) --libpq = -L$(libpq_builddir) -lpq -+libpq = -lpq - - # This macro is for use by client executables (not libraries) that use libpq. - # We force clients to pull symbols from the non-shared libraries libpgport -@@ -539,7 +539,6 @@ endif - # Commonly used submake targets - - submake-libpq: | submake-generated-headers -- $(MAKE) -C $(libpq_builddir) all - - submake-libpgport: | submake-generated-headers - $(MAKE) -C $(top_builddir)/src/port all diff --git a/libecpg-12.2-dependency-build.patch b/libecpg-12.2-dependency-build.patch new file mode 100644 index 0000000..08fae2b --- /dev/null +++ b/libecpg-12.2-dependency-build.patch @@ -0,0 +1,34 @@ +Upstream patch +link: https://www.postgresql.org/message-id/20200321221303.GA17979%40momjian.us + +diff --git a/src/interfaces/ecpg/pgtypeslib/Makefile b/src/interfaces/ecpg/pgtypeslib/Makefile +index 530b580d7c..ae79ead7a7 100644 +--- a/src/interfaces/ecpg/pgtypeslib/Makefile ++++ b/src/interfaces/ecpg/pgtypeslib/Makefile +@@ -24,6 +24,7 @@ override CFLAGS += $(PTHREAD_CFLAGS) + + SHLIB_LINK_INTERNAL = -lpgcommon_shlib -lpgport_shlib + SHLIB_LINK += $(filter -lintl -lm, $(LIBS)) ++SHLIB_PREREQS = submake-libpgport + + SHLIB_EXPORTS = exports.txt + +diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile +index a06882651f..d4919970f8 100644 +--- a/src/interfaces/libpq/Makefile ++++ b/src/interfaces/libpq/Makefile +@@ -85,13 +85,12 @@ endif + ifeq ($(PORTNAME), win32) + SHLIB_LINK += -lshell32 -lws2_32 -lsecur32 $(filter -leay32 -lssleay32 -lcomerr32 -lkrb5_32, $(LIBS)) + endif ++SHLIB_PREREQS = submake-libpgport + + SHLIB_EXPORTS = exports.txt + + all: all-lib + +-all-lib: | submake-libpgport +- + # Shared library stuff + include $(top_srcdir)/src/Makefile.shlib + backend_src = $(top_srcdir)/src/backend diff --git a/libecpg-12.2-external-libpq.patch b/libecpg-12.2-external-libpq.patch new file mode 100644 index 0000000..668c771 --- /dev/null +++ b/libecpg-12.2-external-libpq.patch @@ -0,0 +1,35 @@ +We don't build/install interfaces by upstream's implicit rules. +This patch is used on two places; postgresql.spec and libecpg.spec -- keep those +in sync! +Related: rhbz#1618698 +diff -ur postgresql-12.2/src/Makefile postgresql-12.2_patch/src/Makefile +--- postgresql-12.2/src/Makefile 2020-02-10 23:14:51.000000000 +0100 ++++ postgresql-12.2_patch/src/Makefile 2020-03-02 12:49:45.530666894 +0100 +@@ -20,7 +20,6 @@ + backend/utils/mb/conversion_procs \ + backend/snowball \ + include \ +- interfaces \ + backend/replication/libpqwalreceiver \ + backend/replication/pgoutput \ + fe_utils \ +diff -ur postgresql-12.2/src/Makefile.global.in postgresql-12.2_patch/src/Makefile.global.in +--- postgresql-12.2/src/Makefile.global.in 2020-02-10 23:14:51.000000000 +0100 ++++ postgresql-12.2_patch/src/Makefile.global.in 2020-03-02 12:47:40.970583609 +0100 +@@ -550,7 +550,7 @@ + # How to link to libpq. (This macro may be used as-is by backend extensions. + # Client-side code should go through libpq_pgport or libpq_pgport_shlib, + # instead.) +-libpq = -L$(libpq_builddir) -lpq ++libpq = -lpq + + # libpq_pgport is for use by client executables (not libraries) that use libpq. + # We force clients to pull symbols from the non-shared libraries libpgport +@@ -580,7 +580,6 @@ + # Commonly used submake targets + + submake-libpq: | submake-generated-headers +- $(MAKE) -C $(libpq_builddir) all + + submake-libpgport: | submake-generated-headers + $(MAKE) -C $(top_builddir)/src/port all diff --git a/libecpg.spec b/libecpg.spec index 318db80..6db45d3 100644 --- a/libecpg.spec +++ b/libecpg.spec @@ -1,9 +1,9 @@ -%global majorversion 11 +%global majorversion 12 Summary: ECPG - Embedded SQL in C Name: libecpg Version: %majorversion.2 -Release: 3%{?dist} +Release: 1%{?dist} License: PostgreSQL Url: http://www.postgresql.org/ @@ -15,8 +15,9 @@ Source1: https://ftp.postgresql.org/pub/source/v%version/postgresql-%version.tar # Comments for these patches are in the patch files. Patch1: libecpg-10.5-rpm-pgsql.patch Patch2: libecpg-10.5-var-run-socket.patch -Patch3: libecpg-10.5-external-libpq.patch +Patch3: libecpg-12.2-external-libpq.patch Patch4: libecpg-10.5-no-compat-lib.patch +Patch5: libecpg-12.2-dependency-build.patch BuildRequires: gcc BuildRequires: glibc-devel bison flex gawk @@ -126,6 +127,12 @@ find_lang_bins %name-devel.lst ecpg %changelog +* Mon Mar 2 2020 Filip Januš - 12.2-1 +- Rebase onto: 12.2 +- update of patch(libecpg-10.5-external-libpq.patch) was needed +- add upstream patch libecpg-12.2-dependency-build.patch + https://www.postgresql.org/message-id/20200321221303.GA17979%40momjian.us + * Wed Jan 29 2020 Fedora Release Engineering - 11.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild