From 9f2cb9cafb96405d0d25ffacf073864e9e5313e3 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sat, 16 Dec 2023 01:41:53 +0100 Subject: [PATCH] - updated to 16.1, kerberos5 support no longer works with heimdal implementation --- postgresql-autoconf.patch | 9 +++++---- postgresql-conf.patch | 10 +++++----- postgresql-heimdal.patch | 13 +++++++------ postgresql-link.patch | 25 ++++++++++++++----------- postgresql-tests.patch | 9 +++++---- postgresql.spec | 12 +++++------- socket-dir-fixes.patch | 16 +++++++++------- 7 files changed, 50 insertions(+), 44 deletions(-) diff --git a/postgresql-autoconf.patch b/postgresql-autoconf.patch index 4fef099..367b052 100644 --- a/postgresql-autoconf.patch +++ b/postgresql-autoconf.patch @@ -1,13 +1,14 @@ ---- postgresql-15.3/configure.ac 2023-03-07 23:41:18.334515306 +0100 -+++ postgresql-15.3/configure.ac 2023-03-07 23:42:03.131067994 +0100 +diff -ur postgresql-16.1.orig/configure.ac postgresql-16.1/configure.ac +--- postgresql-16.1.orig/configure.ac 2023-12-13 21:53:31.585066083 +0100 ++++ postgresql-16.1/configure.ac 2023-12-13 21:54:44.023989230 +0100 @@ -19,10 +19,6 @@ - AC_INIT([PostgreSQL], [15.3], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + AC_INIT([PostgreSQL], [16.1], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. -Untested combinations of 'autoconf' and PostgreSQL versions are not -recommended. You can remove the check from 'configure.ac' but it is then -your responsibility whether the result works or not.])]) - AC_COPYRIGHT([Copyright (c) 1996-2022, PostgreSQL Global Development Group]) + AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group]) AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) AC_CONFIG_AUX_DIR(config) diff --git a/postgresql-conf.patch b/postgresql-conf.patch index c147f22..51d4c5e 100644 --- a/postgresql-conf.patch +++ b/postgresql-conf.patch @@ -1,6 +1,6 @@ ---- postgresql-15.2/src/backend/utils/misc/postgresql.conf.sample 2023-03-07 23:29:21.289677003 +0100 -+++ postgresql-15.2/src/backend/utils/misc/postgresql.conf.sample 2023-03-07 23:32:49.321241168 +0100 -@@ -441,28 +441,28 @@ +--- postgresql-16.1/src/backend/utils/misc/postgresql.conf.sample 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/backend/utils/misc/postgresql.conf.sample 2023-12-16 01:39:41.030887367 +0100 +@@ -447,28 +447,28 @@ # - Where to Log - @@ -36,7 +36,7 @@ # happen after that much log output. # 0 disables. #log_truncate_on_rotation = off # If on, an existing log file with the -@@ -475,9 +475,9 @@ +@@ -481,9 +481,9 @@ # in all cases. # These are relevant when logging to syslog: @@ -49,7 +49,7 @@ #syslog_split_messages = on # This is only relevant when logging to eventlog (Windows): -@@ -551,12 +551,12 @@ +@@ -557,12 +557,12 @@ # actions running at least this number # of milliseconds. #log_checkpoints = on diff --git a/postgresql-heimdal.patch b/postgresql-heimdal.patch index 044c8be..464e773 100644 --- a/postgresql-heimdal.patch +++ b/postgresql-heimdal.patch @@ -1,11 +1,12 @@ ---- postgresql-15.2/configure.ac 2023-03-07 23:36:40.389089270 +0100 -+++ postgresql-15.2/configure.ac 2023-03-07 23:36:49.325199415 +0100 -@@ -1307,7 +1307,7 @@ +diff -ur postgresql-16.1.orig/configure.ac postgresql-16.1/configure.ac +--- postgresql-16.1.orig/configure.ac 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/configure.ac 2023-12-13 21:37:44.998989424 +0100 +@@ -1344,7 +1344,7 @@ if test "$with_gssapi" = yes ; then if test "$PORTNAME" != "win32"; then -- AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [], -+ AC_SEARCH_LIBS(gss_init_sec_context, [gssapi 'gssapi -lkrb5 -lcrypto' gssapi_krb5 gss], [], - [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])]) +- AC_SEARCH_LIBS(gss_store_cred_into, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [], ++ AC_SEARCH_LIBS(gss_store_cred_into, [gssapi 'gssapi -lkrb5 -lcrypto' gssapi_krb5 gss], [], + [AC_MSG_ERROR([could not find function 'gss_store_cred_into' required for GSSAPI])]) else LIBS="$LIBS -lgssapi32" diff --git a/postgresql-link.patch b/postgresql-link.patch index 4c6cefb..d983f4c 100644 --- a/postgresql-link.patch +++ b/postgresql-link.patch @@ -1,6 +1,7 @@ ---- postgresql-15.2/configure.ac 2023-03-07 23:37:05.721401513 +0100 -+++ postgresql-15.2/configure.ac 2023-03-07 23:37:22.414607273 +0100 -@@ -1603,6 +1603,7 @@ +diff -ur postgresql-16.1.orig/configure.ac postgresql-16.1/configure.ac +--- postgresql-16.1.orig/configure.ac 2023-12-13 21:41:13.777653991 +0100 ++++ postgresql-16.1/configure.ac 2023-12-13 21:42:33.649673374 +0100 +@@ -1616,6 +1616,7 @@ if test "$with_bonjour" = yes ; then AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file is required for Bonjour])]) @@ -8,7 +9,7 @@ dnl At some point we might add something like dnl AC_SEARCH_LIBS(DNSServiceRegister, dns_sd) dnl but right now, what that would mainly accomplish is to encourage -@@ -1610,6 +1611,7 @@ +@@ -1623,6 +1624,7 @@ dnl If you want to use Apple's own Bonjour code on another platform, dnl just add -ldns_sd to LIBS manually. fi @@ -16,19 +17,21 @@ # for contrib/uuid-ossp if test "$with_uuid" = bsd ; then ---- postgresql-15.2/src/backend/Makefile 2023-03-07 23:37:05.607400108 +0100 -+++ postgresql-15.2/src/backend/Makefile 2023-03-07 23:37:22.415607285 +0100 -@@ -64,7 +64,7 @@ +diff -ur postgresql-16.1.orig/src/backend/Makefile postgresql-16.1/src/backend/Makefile +--- postgresql-16.1.orig/src/backend/Makefile 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/backend/Makefile 2023-12-13 21:43:07.594106591 +0100 +@@ -65,7 +65,7 @@ ifneq ($(PORTNAME), aix) postgres: $(OBJS) -- $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(LIBS) -o $@ -+ $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(LIBS) $(BONJOUR_LIBS) -o $@ +- $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) -o $@ ++ $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) $(BONJOUR_LIBS) -o $@ endif endif ---- postgresql-15.2/src/Makefile.global.in 2023-03-07 23:37:05.481398555 +0100 -+++ postgresql-15.2/src/Makefile.global.in 2023-03-07 23:37:22.415607285 +0100 +diff -ur postgresql-16.1.orig/src/Makefile.global.in postgresql-16.1/src/Makefile.global.in +--- postgresql-16.1.orig/src/Makefile.global.in 2023-12-13 21:41:13.774653953 +0100 ++++ postgresql-16.1/src/Makefile.global.in 2023-12-13 21:42:33.649673374 +0100 @@ -172,6 +172,7 @@ pgxsdir = $(pkglibdir)/pgxs bitcodedir = $(pkglibdir)/bitcode diff --git a/postgresql-tests.patch b/postgresql-tests.patch index e7d0845..d65ca80 100644 --- a/postgresql-tests.patch +++ b/postgresql-tests.patch @@ -1,7 +1,8 @@ ---- postgresql-15.2/src/test/regress/pg_regress.c 2023-03-07 23:35:49.928467300 +0100 -+++ postgresql-15.2/src/test/regress/pg_regress.c 2023-03-07 23:36:01.693612316 +0100 -@@ -2386,6 +2386,7 @@ - header(_("starting postmaster")); +diff -urNp -x '*.orig' postgresql-16.1.org/src/test/regress/pg_regress.c postgresql-16.1/src/test/regress/pg_regress.c +--- postgresql-16.1.org/src/test/regress/pg_regress.c 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/test/regress/pg_regress.c 2023-12-13 21:08:28.129574600 +0100 +@@ -2427,6 +2427,7 @@ regression_main(int argc, char *argv[], + */ snprintf(buf, sizeof(buf), "\"%s%spostgres\" -D \"%s/data\" -F%s " + "-c \"log_directory=log\" " diff --git a/postgresql.spec b/postgresql.spec index 74d15fa..0709170 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -2,7 +2,7 @@ # Conditional build: %bcond_without tests # disable testing %bcond_without tcl # disable Tcl support -%bcond_without kerberos5 # disable kerberos5 support +%bcond_with kerberos5 # disable kerberos5 support %bcond_without perl # disable Perl support %bcond_without python # disable Python support %bcond_with bonjour # Bonjour/DNS_SD support @@ -14,8 +14,8 @@ # %define beta %{nil} -%define pgsqlversion 15 -%define pgsqlpriority 150 +%define pgsqlversion 16 +%define pgsqlpriority 160 Summary: PostgreSQL Data Base Management System Summary(de.UTF-8): PostgreSQL Datenbankverwaltungssystem @@ -28,12 +28,12 @@ Summary(tr.UTF-8): Veri Tabanı Yönetim Sistemi Summary(uk.UTF-8): PostgreSQL - система керування базами даних Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件 Name: postgresql-%{pgsqlversion} -Version: %{pgsqlversion}.3 +Version: %{pgsqlversion}.1 Release: 1 License: BSD Group: Applications/Databases Source0: http://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 -# Source0-md5: 7cb75773ff8fbe533701562c3278206b +# Source0-md5: 9cbfb9076ed06384471802b850698a6d Source1: postgresql.init Source2: pgsql-Database-HOWTO-html.tar.gz # Source2-md5: 5b656ddf1db41965761f85204a14398e @@ -881,7 +881,6 @@ fi %attr(755,root,root) %{pgsqllibdir}/bin/pg_waldump %attr(755,root,root) %{pgsqllibdir}/bin/pgbench %attr(755,root,root) %{pgsqllibdir}/bin/postgres -%attr(755,root,root) %{pgsqllibdir}/bin/postmaster %attr(755,root,root) %{moduledir}/cyrillic_and_mic.so %attr(755,root,root) %{moduledir}/dict_int.so @@ -925,7 +924,6 @@ fi %{pgsqldatadir}/man/man1/pg_upgrade.1* %{pgsqldatadir}/man/man1/pgbench.1* %{pgsqldatadir}/man/man1/postgres.1* -%{pgsqldatadir}/man/man1/postmaster.1* %files -n postgresql-common %defattr(644,root,root,755) diff --git a/socket-dir-fixes.patch b/socket-dir-fixes.patch index 5b63aba..6b0f67c 100644 --- a/socket-dir-fixes.patch +++ b/socket-dir-fixes.patch @@ -1,9 +1,10 @@ ---- postgresql-15.2/src/bin/pg_upgrade/option.c 2023-03-07 23:37:50.271950638 +0100 -+++ postgresql-15.2/src/bin/pg_upgrade/option.c 2023-03-07 23:40:28.343899006 +0100 -@@ -445,8 +445,14 @@ +diff -ur postgresql-16.1.orig/src/bin/pg_upgrade/option.c postgresql-16.1/src/bin/pg_upgrade/option.c +--- postgresql-16.1.orig/src/bin/pg_upgrade/option.c 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/bin/pg_upgrade/option.c 2023-12-13 21:51:21.445407619 +0100 +@@ -456,8 +456,14 @@ get_sock_dir(ClusterInfo *cluster, bool live_check) { - #if defined(HAVE_UNIX_SOCKETS) && !defined(WIN32) + #if !defined(WIN32) - if (!live_check) + if (!live_check) { cluster->sockdir = user_opts.socketdir; @@ -16,9 +17,10 @@ else { /* ---- postgresql-15.2/src/include/pg_config_manual.h 2023-03-07 23:37:50.153949183 +0100 -+++ postgresql-15.2/src/include/pg_config_manual.h 2023-03-07 23:38:28.898426739 +0100 -@@ -224,7 +224,7 @@ +diff -ur postgresql-16.1.orig/src/include/pg_config_manual.h postgresql-16.1/src/include/pg_config_manual.h +--- postgresql-16.1.orig/src/include/pg_config_manual.h 2023-11-06 23:04:27.000000000 +0100 ++++ postgresql-16.1/src/include/pg_config_manual.h 2023-12-13 21:49:50.563249439 +0100 +@@ -206,7 +206,7 @@ * support them yet. */ #ifndef WIN32 -- 2.44.0