From 04e71645c7cbea990eb41c26c6c463bdbbe9cca3 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 25 Jun 2017 15:31:13 +0200 Subject: [PATCH] postgresql: update to version 9.6.3 Signed-off-by: Daniel Golle --- libs/postgresql/Makefile | 22 ++++++++----------- .../patches/001-configure_fixes.patch | 2 +- .../patches/020-pg_config-target-cflags.patch | 14 ------------ .../patches/800-busybox-default-pager.patch | 13 ++++++----- .../patches/900-pg_ctl-setuid.patch | 14 ++++++------ 5 files changed, 24 insertions(+), 41 deletions(-) delete mode 100644 libs/postgresql/patches/020-pg_config-target-cflags.patch diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index 431729f04..fd9ab3d77 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -5,8 +5,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postgresql -PKG_VERSION:=9.4.12 -PKG_RELEASE:=4 +PKG_VERSION:=9.6.3 +PKG_RELEASE:=2 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=PostgreSQL @@ -15,7 +15,8 @@ PKG_SOURCE_URL:=\ https://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \ http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \ ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION) -PKG_MD5SUM:=fca055481875d1c49e31c28443f56472a1474b3fbe25b7ae64440c6118f82e64 + +PKG_HASH:=1645b3736901f6d854e695a937389e68ff2066ce0cde9d73919d6ab7c995b9c6 PKG_USE_MIPS16:=0 PKG_FIXUP:=autoreconf @@ -125,6 +126,7 @@ endif TARGET_CONFIGURE_OPTS+=$(PGSQL_CONFIG_VARS) HOST_CONFIGURE_ARGS += \ + --disable-nls \ --disable-rpath \ --without-bonjour \ --without-gssapi \ @@ -155,10 +157,9 @@ CONFIGURE_ARGS += \ EXTRA_CFLAGS:= -I$(PKG_BUILD_DIR)/src/include/ -# Need a native ecpg and zic for build +# Need a native ecpg, pg_config and zic for build define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR)/src/common CC="$(HOSTCC)" - $(MAKE) -C $(HOST_BUILD_DIR)/src/port CC="$(HOSTCC)" + $(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)" endef @@ -167,6 +168,7 @@ define Host/Install $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/common/libpgcommon.a $(STAGING_DIR_HOSTPKG)/lib/ $(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/ @@ -177,12 +179,6 @@ define Build/Configure $(SED) 's@ECPG = ../../preproc/ecpg@ECPG = $(STAGING_DIR_HOSTPKG)/bin/ecpg@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress endef -define Build/Compile - $(call Build/Compile/Default, ) - $(MAKE) -C $(PKG_BUILD_DIR)/src/bin/pg_config clean - $(MAKE) -C $(PKG_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)" TARGET_CC="$(TARGET_CC)" CFLAGS="$(HOST_CFLAGS)" TARGET_CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" STD_LDFLAGS="$(TARGET_LDFLAGS)" -endef - TARGET_CFLAGS += $(FPIC) -lpthread # because PROFILE means something else in the project Makefile @@ -229,7 +225,7 @@ endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config $(1)/usr/bin/ + $(CP) $(STAGING_DIR_HOSTPKG)/lib/pg_config $(1)/usr/bin $(INSTALL_DIR) $(1)/host/bin/ $(LN) $(STAGING_DIR)/usr/bin/pg_config $(1)/host/bin $(INSTALL_DIR) $(1)/usr/include diff --git a/libs/postgresql/patches/001-configure_fixes.patch b/libs/postgresql/patches/001-configure_fixes.patch index 2edaba6a0..ece527cbe 100644 --- a/libs/postgresql/patches/001-configure_fixes.patch +++ b/libs/postgresql/patches/001-configure_fixes.patch @@ -2,7 +2,7 @@ +++ 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-2014, PostgreSQL Global Development Group]) + 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]) diff --git a/libs/postgresql/patches/020-pg_config-target-cflags.patch b/libs/postgresql/patches/020-pg_config-target-cflags.patch deleted file mode 100644 index d3347ef8a..000000000 --- a/libs/postgresql/patches/020-pg_config-target-cflags.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/bin/pg_config/Makefile -+++ b/src/bin/pg_config/Makefile -@@ -22,9 +22,9 @@ STD_CPPFLAGS := $(filter-out -I$(top_src - STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/port,$(LDFLAGS)) - - override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\"" --override CPPFLAGS += -DVAL_CC="\"$(CC)\"" -+override CPPFLAGS += -DVAL_CC="\"$(TARGET_CC)\"" - override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" --override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" -+override CPPFLAGS += -DVAL_CFLAGS="\"$(TARGET_CFLAGS)\"" - override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" - override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" - override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" diff --git a/libs/postgresql/patches/800-busybox-default-pager.patch b/libs/postgresql/patches/800-busybox-default-pager.patch index 1be196991..f6af04ed8 100644 --- a/libs/postgresql/patches/800-busybox-default-pager.patch +++ b/libs/postgresql/patches/800-busybox-default-pager.patch @@ -1,13 +1,14 @@ ---- a/src/bin/psql/print.h -+++ b/src/bin/psql/print.h -@@ -179,10 +179,6 @@ extern void printQuery(const PGresult *r - extern void setDecimalLocale(void); - extern const printTextFormat *get_line_style(const printTableOpt *opt); +--- a/src/include/fe_utils/print.h ++++ b/src/include/fe_utils/print.h +@@ -17,11 +17,7 @@ + + /* This is not a particularly great place for this ... */ -#ifndef __CYGWIN__ -#define DEFAULT_PAGER "more" -#else #define DEFAULT_PAGER "less" -#endif - #endif /* PRINT_H */ + enum printFormat + { diff --git a/libs/postgresql/patches/900-pg_ctl-setuid.patch b/libs/postgresql/patches/900-pg_ctl-setuid.patch index b8d95e81c..5a7003c93 100644 --- a/libs/postgresql/patches/900-pg_ctl-setuid.patch +++ b/libs/postgresql/patches/900-pg_ctl-setuid.patch @@ -1,6 +1,6 @@ --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c -@@ -94,6 +94,7 @@ static char *exec_path = NULL; +@@ -88,6 +88,7 @@ static char *event_source = NULL; static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ static char *register_username = NULL; static char *register_password = NULL; @@ -8,8 +8,8 @@ static char *argv0 = NULL; static bool allow_core_files = false; static time_t start_time; -@@ -2093,6 +2094,9 @@ do_help(void) - printf(_(" -D, --pgdata=DATADIR location of the database storage area\n")); +@@ -1930,6 +1931,9 @@ do_help(void) + #endif printf(_(" -s, --silent only print errors, no informational messages\n")); printf(_(" -t, --timeout=SECS seconds to wait when using -w option\n")); +#if !defined(WIN32) && !defined(__CYGWIN__) @@ -18,7 +18,7 @@ printf(_(" -V, --version output version information, then exit\n")); printf(_(" -w wait until operation completes\n")); printf(_(" -W do not wait until operation completes\n")); -@@ -2289,6 +2293,7 @@ main(int argc, char **argv) +@@ -2126,6 +2130,7 @@ main(int argc, char **argv) {"pgdata", required_argument, NULL, 'D'}, {"silent", no_argument, NULL, 's'}, {"timeout", required_argument, NULL, 't'}, @@ -26,7 +26,7 @@ {"core-files", no_argument, NULL, 'c'}, {NULL, 0, NULL, 0} }; -@@ -2329,20 +2334,6 @@ main(int argc, char **argv) +@@ -2166,20 +2171,6 @@ main(int argc, char **argv) } } @@ -47,7 +47,7 @@ env_wait = getenv("PGCTLTIMEOUT"); if (env_wait != NULL) -@@ -2416,11 +2407,15 @@ main(int argc, char **argv) +@@ -2265,11 +2256,15 @@ main(int argc, char **argv) wait_seconds_arg = true; break; case 'U': @@ -63,7 +63,7 @@ break; case 'w': do_wait = true; -@@ -2502,6 +2497,41 @@ main(int argc, char **argv) +@@ -2351,6 +2346,41 @@ main(int argc, char **argv) exit(1); }