From 018394faa2bc32bf0cbf2a93787e31081150e2b1 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 26 Jul 2019 18:12:07 +0900 Subject: [PATCH] Define PG_ACTUAL_VERSION_NUM Due to [insert reason here], in the Debian package build process (and only there), when building frontend code PG_VERSION_NUM appears to be from the newest libpq-dev version installed, and does not necessarily match the version of the server the code is being built against. To work around this distribution-specific package build issue, we'll define our own substitution variable which is taken from the value provided in Makefile.global. --- Makefile.in | 3 ++- repmgr_version.h.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index dcdc704c..83cd9727 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,7 +59,8 @@ REPMGRD_OBJS = repmgrd.o repmgrd-physical.o repmgrd-bdr.o configfile.o log.o dbu DATE=$(shell date "+%Y-%m-%d") repmgr_version.h: repmgr_version.h.in - $(SED) '0,/REPMGR_VERSION_DATE/s,\(REPMGR_VERSION_DATE\).*,\1 "$(DATE)",' $< >$@ + $(SED) '0,/REPMGR_VERSION_DATE/s,\(REPMGR_VERSION_DATE\).*,\1 "$(DATE)",' $< >$@; \ + $(SED) '0,/PG_ACTUAL_VERSION_NUM/s,\(PG_ACTUAL_VERSION_NUM\).*,\1 $(VERSION_NUM),' $< >$@ $(REPMGR_CLIENT_OBJS): repmgr-client.h repmgr_version.h diff --git a/repmgr_version.h.in b/repmgr_version.h.in index bc362167..6803f429 100644 --- a/repmgr_version.h.in +++ b/repmgr_version.h.in @@ -2,3 +2,4 @@ #define REPMGR_VERSION "4.5dev" #define REPMGR_VERSION_NUM 40500 #define REPMGR_RELEASE_DATE "2019-XX-XX" +#define PG_ACTUAL_VERSION_NUM