postgresql: update to version 16.3
Switch to new major version 16. Use meson to build for target, however, old autotools-style configure is needed to clean the source directory before being able to run meson, and host build of the timezone compiler ('zic') also still requires using the old build system. See also https://www.postgresql.org/docs/16/release-16.html Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
34f9d96b4c
commit
6a46887e60
|
@ -5,7 +5,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=postgresql
|
||||
PKG_VERSION:=15.6
|
||||
PKG_VERSION:=16.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||
PKG_LICENSE:=PostgreSQL
|
||||
|
@ -17,21 +17,20 @@ PKG_SOURCE_URL:=\
|
|||
http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
|
||||
ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
|
||||
|
||||
PKG_HASH:=8455146ed9c69c93a57de954aead0302cafad035c2b242175d6aa1e17ebcb2fb
|
||||
PKG_HASH:=331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585
|
||||
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_MACRO_PATHS:=config
|
||||
PKG_BUILD_DEPENDS:=postgresql/host
|
||||
PKG_BUILD_DEPENDS:=perl/host postgresql/host
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/libpq
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libpthread
|
||||
DEPENDS:=+BUILD_NLS:icu +libpthread
|
||||
TITLE:=PostgreSQL client library
|
||||
URL:=http://www.postgresql.org/
|
||||
SUBMENU:=Database
|
||||
|
@ -114,29 +113,12 @@ PGSQL_CLI_EXTRA_BIN := \
|
|||
vacuumdb \
|
||||
vacuumlo
|
||||
|
||||
PGSQL_CONFIG_VARS:= \
|
||||
pgac_cv_snprintf_long_long_int_format="%lld" \
|
||||
pgac_cv_snprintf_size_t_support=yes \
|
||||
USE_DEV_URANDOM=1 \
|
||||
ac_cv_file__dev_urandom="/dev/urandom" \
|
||||
ZIC=zic
|
||||
|
||||
ifeq ($(CONFIG_USE_UCLIBC),y)
|
||||
# PostgreSQL does not build against uClibc with locales
|
||||
# enabled, due to an uClibc bug, see
|
||||
# http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html
|
||||
# so overwrite automatic detection and disable locale support
|
||||
PGSQL_CONFIG_VARS+= \
|
||||
pgac_cv_type_locale_t=no
|
||||
endif
|
||||
|
||||
TARGET_CONFIGURE_OPTS+=$(PGSQL_CONFIG_VARS)
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
FAKE_CONFIGURE_ARGS := \
|
||||
--disable-nls \
|
||||
--disable-rpath \
|
||||
--without-bonjour \
|
||||
--without-gssapi \
|
||||
--without-icu \
|
||||
--without-ldap \
|
||||
--without-openssl \
|
||||
--without-pam \
|
||||
|
@ -148,24 +130,50 @@ HOST_CONFIGURE_ARGS += \
|
|||
--with-zlib="yes" \
|
||||
--enable-depend
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
$(DISABLE_NLS) \
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-nls \
|
||||
--disable-rpath \
|
||||
--without-bonjour \
|
||||
--without-gssapi \
|
||||
--without-icu \
|
||||
--without-ldap \
|
||||
--without-openssl \
|
||||
--without-pam \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
--without-readline \
|
||||
--without-tcl \
|
||||
--without-systemd \
|
||||
--with-zlib="yes" \
|
||||
--enable-depend \
|
||||
$(if $(CONFIG_arc),--disable-spinlocks)
|
||||
--enable-depend
|
||||
|
||||
HOST_CFLAGS += -std=gnu99
|
||||
|
||||
MESON_ARGS += \
|
||||
-Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled \
|
||||
-Dicu=$(if $(CONFIG_BUILD_NLS),en,dis)abled \
|
||||
-Ddocs=disabled \
|
||||
-Ddocs_pdf=disabled \
|
||||
-Drpath=false \
|
||||
-Dbonjour=disabled \
|
||||
-Dbsd_auth=disabled \
|
||||
-Dgssapi=disabled \
|
||||
-Dldap=disabled \
|
||||
-Dlibxml=disabled \
|
||||
-Dlibxslt=disabled \
|
||||
-Dssl=none \
|
||||
-Dpam=disabled \
|
||||
-Dplperl=disabled \
|
||||
-Dplpython=disabled \
|
||||
-Dpltcl=disabled \
|
||||
-Dsystemd=disabled \
|
||||
-Dzlib=enabled \
|
||||
-Dspinlocks=$(if $(CONFIG_arc),true,false)
|
||||
|
||||
define Host/Configure
|
||||
$(call Host/Configure/Default)
|
||||
endef
|
||||
|
||||
# Need a native zic and pg_config for build
|
||||
define Host/Compile
|
||||
+$(HOST_MAKE_VARS) MAKELEVEL=0 $(MAKE) -C $(HOST_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
|
||||
|
@ -181,13 +189,6 @@ define Host/Install
|
|||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/timezone/zic $(STAGING_DIR_HOSTPKG)/bin/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) MAKELEVEL=0 all contrib
|
||||
endef
|
||||
|
||||
# because PROFILE means something else in the project Makefile
|
||||
unexport PROFILE
|
||||
|
||||
define Package/libpq/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.so.* $(1)/usr/lib/
|
||||
|
@ -231,6 +232,12 @@ define Package/pgsql-server/install
|
|||
$(INSTALL_BIN) ./files/postgresql.init $(1)/etc/init.d/postgresql
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default,$(FAKE_CONFIGURE_ARGS))
|
||||
make -C $(PKG_BUILD_DIR) maintainer-clean
|
||||
$(call Build/Configure/Meson)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(STAGING_DIR_HOSTPKG)/lib/pg_config $(1)/usr/bin
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- a/GNUmakefile.in
|
||||
+++ b/GNUmakefile.in
|
||||
@@ -8,7 +8,7 @@ subdir =
|
||||
top_builddir = .
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
-$(call recurse,all install,src config)
|
||||
+$(call recurse,all install,src config contrib)
|
||||
|
||||
docs:
|
||||
$(MAKE) -C doc all
|
|
@ -1,10 +0,0 @@
|
|||
--- a/src/port/Makefile
|
||||
+++ b/src/port/Makefile
|
||||
@@ -83,6 +83,7 @@ uninstall:
|
||||
libpgport.a: $(OBJS)
|
||||
rm -f $@
|
||||
$(AR) $(AROPT) $@ $^
|
||||
+ $(RANLIB) libpgport.a
|
||||
|
||||
# getaddrinfo.o and getaddrinfo_shlib.o need PTHREAD_CFLAGS (but getaddrinfo_srv.o does not)
|
||||
getaddrinfo.o: CFLAGS+=$(PTHREAD_CFLAGS)
|
|
@ -1,13 +1,15 @@
|
|||
--- a/src/bin/pg_ctl/pg_ctl.c
|
||||
+++ b/src/bin/pg_ctl/pg_ctl.c
|
||||
@@ -12,9 +12,11 @@
|
||||
@@ -12,11 +12,13 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
+#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2239,9 +2239,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
|
||||
@@ -2124,10 +2124,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
|
||||
# First check if __crc32c* intrinsics can be used with the default compiler
|
||||
# flags. If not, check if adding -march=armv8-a+crc flag helps.
|
||||
# CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
|
||||
PGAC_ARMV8_CRC32C_INTRINSICS([])
|
||||
# CFLAGS_CRC is set if the extra flag is required.
|
||||
-PGAC_ARMV8_CRC32C_INTRINSICS([])
|
||||
-if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
|
||||
- PGAC_ARMV8_CRC32C_INTRINSICS([-march=armv8-a+crc])
|
||||
-fi
|
||||
+#PGAC_ARMV8_CRC32C_INTRINSICS([])
|
||||
+#if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
|
||||
+# PGAC_ARMV8_CRC32C_INTRINSICS([-march=armv8-a+crc])
|
||||
+#fi
|
||||
AC_SUBST(CFLAGS_ARMV8_CRC32C)
|
||||
|
||||
# Select CRC-32C implementation.
|
||||
AC_SUBST(CFLAGS_CRC)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/bin/pg_ctl/pg_ctl.c
|
||||
+++ b/src/bin/pg_ctl/pg_ctl.c
|
||||
@@ -96,6 +96,7 @@ static char *event_source = NULL;
|
||||
@@ -91,6 +91,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,7 +8,7 @@
|
|||
static char *argv0 = NULL;
|
||||
static bool allow_core_files = false;
|
||||
static time_t start_time;
|
||||
@@ -2086,6 +2087,9 @@ do_help(void)
|
||||
@@ -1991,6 +1992,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"));
|
||||
|
@ -18,7 +18,7 @@
|
|||
printf(_(" -V, --version output version information, then exit\n"));
|
||||
printf(_(" -w, --wait wait until operation completes (default)\n"));
|
||||
printf(_(" -W, --no-wait do not wait until operation completes\n"));
|
||||
@@ -2298,6 +2302,7 @@ main(int argc, char **argv)
|
||||
@@ -2203,6 +2207,7 @@ main(int argc, char **argv)
|
||||
{"options", required_argument, NULL, 'o'},
|
||||
{"silent", no_argument, NULL, 's'},
|
||||
{"timeout", required_argument, NULL, 't'},
|
||||
|
@ -26,7 +26,7 @@
|
|||
{"core-files", no_argument, NULL, 'c'},
|
||||
{"wait", no_argument, NULL, 'w'},
|
||||
{"no-wait", no_argument, NULL, 'W'},
|
||||
@@ -2338,20 +2343,6 @@ main(int argc, char **argv)
|
||||
@@ -2243,20 +2248,6 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
env_wait = getenv("PGCTLTIMEOUT");
|
||||
if (env_wait != NULL)
|
||||
@@ -2437,11 +2428,15 @@ main(int argc, char **argv)
|
||||
@@ -2342,11 +2333,15 @@ main(int argc, char **argv)
|
||||
wait_seconds_arg = true;
|
||||
break;
|
||||
case 'U':
|
||||
|
@ -63,7 +63,7 @@
|
|||
break;
|
||||
case 'w':
|
||||
do_wait = true;
|
||||
@@ -2523,6 +2518,41 @@ main(int argc, char **argv)
|
||||
@@ -2428,6 +2423,41 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue