From d9bd0c19e4d44c8c7bb32f6ff69c5d60029e3590 Mon Sep 17 00:00:00 2001 From: Daniel Danzberger Date: Tue, 18 Jun 2019 00:20:38 +0200 Subject: [PATCH] postgresql: Update to version 11.3 Version 11.3 is the current stable relase. Changes between 9.3 and 11.3: - pg_receivexlog, pg_resetxlog and pg_xlogdump have been replaced with pg_resetwal - ZIC config variable must be set when cross compiling - disable systemd support - ecpg is no longer needed for building - MAKELEVEL must be set to 0 when called from another makefile - Setting AC_CONFIG_AUX_DIR([config]) is no longer requried - Decrease build time by removing unnecessary configure checks Signed-off-by: Daniel Danzberger --- libs/postgresql/Makefile | 31 ++++++------- .../patches/001-configure_fixes.patch | 46 +++++++++++++++---- 2 files changed, 52 insertions(+), 25 deletions(-) diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index dd110e07a..62224d533 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postgresql -PKG_VERSION:=9.6.13 +PKG_VERSION:=11.3 PKG_RELEASE:=1 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=PostgreSQL @@ -16,12 +16,12 @@ PKG_SOURCE_URL:=\ http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \ ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION) -PKG_HASH:=ecbed20056296a65b6a4f5526c477e3ae5cc284cb01a15507785ddb23831e9a4 +PKG_HASH:=2a85e082fc225944821dfd23990e32dfcd2284c19060864b0ad4ca537d30522d PKG_USE_MIPS16:=0 PKG_FIXUP:=autoreconf PKG_MACRO_PATHS:=config -PKG_BUILD_DEPENDS:=readline/host postgresql/host +PKG_BUILD_DEPENDS:=postgresql/host PKG_INSTALL:=1 include $(INCLUDE_DIR)/host-build.mk @@ -88,23 +88,19 @@ PGSQL_SERVER_BIN := \ pg_dump \ pg_dumpall \ pg_isready \ - pg_receivexlog \ pg_recvlogical \ - pg_resetxlog \ + pg_resetwal \ pg_restore \ pg_standby \ pg_upgrade \ - pg_xlogdump \ postgres \ initdb PGSQL_CLI_EXTRA_BIN := \ clusterdb \ createdb \ - createlang \ createuser \ dropdb \ - droplang \ dropuser \ pgbench \ reindexdb \ @@ -112,7 +108,9 @@ PGSQL_CLI_EXTRA_BIN := \ PGSQL_CONFIG_VARS:= \ pgac_cv_snprintf_long_long_int_format="%lld" \ - pgac_cv_snprintf_size_t_support=yes + pgac_cv_snprintf_size_t_support=yes \ + USE_DEV_URANDOM=1 \ + ZIC=zic ifeq ($(CONFIG_USE_UCLIBC),y) # PostgreSQL does not build against uClibc with locales @@ -137,6 +135,7 @@ HOST_CONFIGURE_ARGS += \ --without-python \ --without-readline \ --without-tcl \ + --without-systemd \ --with-zlib="yes" \ --enable-depend @@ -151,15 +150,15 @@ CONFIGURE_ARGS += \ --without-perl \ --without-python \ --without-tcl \ + --without-systemd \ --with-zlib="yes" \ --enable-depend \ $(if $(CONFIG_arc),--disable-spinlocks) -# Need a native ecpg, pg_config and zic for build +# Need a native zic and pg_config for build define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)" - $(MAKE) -C $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)" - $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)" + +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)" + +$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/timezone CC="$(HOSTCC)" endef define Host/Install @@ -168,13 +167,11 @@ define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/port/libpgport.a $(STAGING_DIR_HOSTPKG)/lib/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/bin/pg_config/pg_config $(STAGING_DIR_HOSTPKG)/lib/ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg $(STAGING_DIR_HOSTPKG)/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/ endef -define Build/Configure - $(Build/Configure/Default) - $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) MAKELEVEL=0 all contrib endef # because PROFILE means something else in the project Makefile diff --git a/libs/postgresql/patches/001-configure_fixes.patch b/libs/postgresql/patches/001-configure_fixes.patch index ece527cbe..5d027ef6f 100644 --- a/libs/postgresql/patches/001-configure_fixes.patch +++ b/libs/postgresql/patches/001-configure_fixes.patch @@ -1,11 +1,41 @@ +diff --git a/configure.in b/configure.in +index 9082c5b..2c04edc 100644 --- a/configure.in +++ b/configure.in -@@ -25,7 +25,7 @@ recommended. You can remove the check f - your responsibility whether the result works or not.])]) - AC_COPYRIGHT([Copyright (c) 1996-2016, PostgreSQL Global Development Group]) - AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) --AC_CONFIG_AUX_DIR(config) -+AC_CONFIG_AUX_DIR([config]) - AC_PREFIX_DEFAULT(/usr/local/pgsql) - AC_SUBST(configure_args, [$ac_configure_args]) +@@ -2283,36 +2283,6 @@ if test "$with_python" = yes; then + CPPFLAGS=$ac_save_CPPFLAGS + fi +-# +-# Check for DocBook and tools +-# +-PGAC_PATH_XMLLINT +-PGAC_CHECK_DOCBOOK(4.2) +-PGAC_PATH_PROGS(DBTOEPUB, dbtoepub) +-PGAC_PATH_PROGS(XSLTPROC, xsltproc) +-PGAC_PATH_PROGS(FOP, fop) +- +-# +-# Check for test tools +-# +-if test "$enable_tap_tests" = yes; then +- # Check for necessary modules, unless user has specified the "prove" to use; +- # in that case it's her responsibility to have a working configuration. +- # (prove might be part of a different Perl installation than perl, eg on +- # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.) +- if test -z "$PROVE"; then +- # Test::More and Time::HiRes are supposed to be part of core Perl, +- # but some distros omit them in a minimal installation. +- AX_PROG_PERL_MODULES([IPC::Run Test::More=0.87 Time::HiRes], , +- [AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])]) +- fi +- # Now make sure we know where prove is +- PGAC_PATH_PROGS(PROVE, prove) +- if test -z "$PROVE"; then +- AC_MSG_ERROR([prove not found]) +- fi +-fi +- + # Thread testing + + # We have to run the thread test near the end so we have all our symbols