postgresql: update to version 15.1
authorDaniel Golle <daniel@makrotopia.org>
Mon, 19 Dec 2022 23:39:40 +0000 (23:39 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 14 Jan 2023 01:47:56 +0000 (01:47 +0000)
https://www.postgresql.org/docs/release/15.0/
https://www.postgresql.org/docs/release/15.1/

A dump/restore using pg_dumpall or use of pg_upgrade or logical
replication is required for those wishing to migrate data from any
previous release.

Do not backport to release branch which should remain on version 14.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
libs/postgresql/Makefile
libs/postgresql/patches/200-ranlib.patch
libs/postgresql/patches/300-fix-includes.patch [new file with mode: 0644]
libs/postgresql/patches/300-fix-pc-file.patch [deleted file]
libs/postgresql/patches/700-no-arm-crc-march-change.patch
libs/postgresql/patches/900-pg_ctl-setuid.patch

index 793c0cfd1262b5a78000d97de943c07e1b1e0984..7450393b99f48581a8ffe97b122637d3fd7db345 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postgresql
-PKG_VERSION:=14.6
+PKG_VERSION:=15.1
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=PostgreSQL
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=\
        http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
        ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
 
-PKG_HASH:=508840fc1809d39ab72274d5f137dabb9fd7fb4f933da4168aeebb20069edf22
+PKG_HASH:=64fdf23d734afad0dfe4077daca96ac51dcd697e68ae2d3d4ca6c45cb14e21ae
 
 PKG_USE_MIPS16:=0
 PKG_FIXUP:=autoreconf
index 3bf02efeeafadd1026ff935c45dd397cb1ade1c7..d4184a35427cf2ec0f28c54cabd9b3c1d6378d9e 100644 (file)
@@ -1,10 +1,10 @@
 --- a/src/port/Makefile
 +++ b/src/port/Makefile
-@@ -84,6 +84,7 @@ uninstall:
+@@ -83,6 +83,7 @@ uninstall:
  libpgport.a: $(OBJS)
        rm -f $@
        $(AR) $(AROPT) $@ $^
 +      $(RANLIB) libpgport.a
  
- # thread.o and thread_shlib.o need PTHREAD_CFLAGS (but thread_srv.o does not)
thread.o: CFLAGS+=$(PTHREAD_CFLAGS)
+ # getaddrinfo.o and getaddrinfo_shlib.o need PTHREAD_CFLAGS (but getaddrinfo_srv.o does not)
getaddrinfo.o: CFLAGS+=$(PTHREAD_CFLAGS)
diff --git a/libs/postgresql/patches/300-fix-includes.patch b/libs/postgresql/patches/300-fix-includes.patch
new file mode 100644 (file)
index 0000000..3611c8e
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/bin/pg_ctl/pg_ctl.c
++++ b/src/bin/pg_ctl/pg_ctl.c
+@@ -12,9 +12,11 @@
+ #include "postgres_fe.h"
+ #include <fcntl.h>
++#include <pwd.h>
+ #include <signal.h>
+ #include <time.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
+ #include <sys/wait.h>
+ #include <unistd.h>
diff --git a/libs/postgresql/patches/300-fix-pc-file.patch b/libs/postgresql/patches/300-fix-pc-file.patch
deleted file mode 100644 (file)
index 2d7eb97..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/src/Makefile.shlib
-+++ b/src/Makefile.shlib
-@@ -391,14 +391,27 @@ endif # PORTNAME == cygwin || PORTNAME =
- %.pc: $(MAKEFILE_LIST)
--      echo 'Name: lib$(NAME)' >$@
-+      echo 'prefix=$(prefix)' >$@
-+      echo 'exec_prefix=$(exec_prefix)' >>$@
-+ifeq ($(patsubst $(prefix)/%,,$(includedir)),)
-+      echo 'includedir=$${prefix}/$(patsubst $(prefix)/%,%,$(includedir))' >>$@
-+else
-+      echo 'includedir=$(includedir)' >>$@
-+endif
-+ifeq ($(patsubst $(exec_prefix)/%,,$(libdir)),)
-+      echo 'libdir=$${exec_prefix}/$(patsubst $(exec_prefix)/%,%,$(libdir))' >>$@
-+else
-+      echo 'libdir=$(libdir)' >>$@
-+endif
-+      echo >>$@
-+      echo 'Name: lib$(NAME)' >>$@
-       echo 'Description: PostgreSQL lib$(NAME) library' >>$@
-       echo 'Url: $(PACKAGE_URL)' >>$@
-       echo 'Version: $(VERSION)' >>$@
-       echo 'Requires: ' >>$@
-       echo 'Requires.private: $(PKG_CONFIG_REQUIRES_PRIVATE)' >>$@
--      echo 'Cflags: -I$(includedir)' >>$@
--      echo 'Libs: -L$(libdir) -l$(NAME)' >>$@
-+      echo 'Cflags: -I$${includedir}' >>$@
-+      echo 'Libs: -L$${libdir} -l$(NAME)' >>$@
- # Record -L flags that the user might have passed in to the PostgreSQL
- # build to locate third-party libraries (e.g., ldap, ssl).  Filter out
- # those that point inside the build or source tree.  Use sort to
index 9c4dcaae2f2f82ef41fa08404586545cb60651de..31dccffb4445147a50907155849252c57014d763 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2156,9 +2156,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+@@ -2236,9 +2236,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
  # 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([])
index d114a820eacde6cd815e89a75b742dbc85acfd2c..64d558fcc03cf6971a7f2aa4a64a3917acdf7acc 100644 (file)
@@ -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 *event_source = NULL;
+@@ -96,6 +96,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;
-@@ -2081,6 +2082,9 @@ do_help(void)
+@@ -2086,6 +2087,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"));
-@@ -2293,6 +2297,7 @@ main(int argc, char **argv)
+@@ -2298,6 +2302,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'},
-@@ -2333,20 +2338,6 @@ main(int argc, char **argv)
+@@ -2338,20 +2343,6 @@ main(int argc, char **argv)
                }
        }
  
@@ -47,7 +47,7 @@
  
        env_wait = getenv("PGCTLTIMEOUT");
        if (env_wait != NULL)
-@@ -2432,11 +2423,15 @@ main(int argc, char **argv)
+@@ -2437,11 +2428,15 @@ main(int argc, char **argv)
                                        wait_seconds_arg = true;
                                        break;
                                case 'U':
@@ -63,7 +63,7 @@
                                        break;
                                case 'w':
                                        do_wait = true;
-@@ -2518,6 +2513,41 @@ main(int argc, char **argv)
+@@ -2523,6 +2518,41 @@ main(int argc, char **argv)
                exit(1);
        }