From 627b5fb91addc4efbc0d8a2595c6954dff9e61f3 Mon Sep 17 00:00:00 2001 From: Filip Janus Date: Fri, 6 Jan 2023 17:37:06 +0100 Subject: [PATCH] Update postgresql to 15.1 Update postgresql-setup to 8.8 Resolves: #2157651 --- postgresql-15.0-llvm_pointer.patch | 191 ----------------------------- postgresql.spec | 14 ++- sources | 8 +- 3 files changed, 12 insertions(+), 201 deletions(-) delete mode 100644 postgresql-15.0-llvm_pointer.patch mode change 100644 => 100755 sources diff --git a/postgresql-15.0-llvm_pointer.patch b/postgresql-15.0-llvm_pointer.patch deleted file mode 100644 index d9a06cd..0000000 --- a/postgresql-15.0-llvm_pointer.patch +++ /dev/null @@ -1,191 +0,0 @@ -# From 0fed706031df781bb5889a859c47379e3c37f4f4 Mon Sep 17 00:00:00 2001 -# From: Thomas Munro -# Date: Thu, 22 Sep 2022 23:38:56 +1200 -# Subject: [PATCH v2] WIP: jit: LLVM 15: Minimal changes. - -# Per https://llvm.org/docs/OpaquePointers.html, support for non-opaque -# pointers still exists and we can request that on our context. We have -# until LLVM 16 to move to opaque pointers. -# --- -# src/backend/jit/llvm/llvmjit.c | 18 +++++++ -# src/backend/jit/llvm/meson.build | 3 ++ -# configure | 89 ++++++++++++++++++++++++++++++++ -# configure.ac | 3 ++ -# 4 files changed, 113 insertions(+) - -diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c -index fd3eecf27d3..bccfcfa9698 100644 ---- a/src/backend/jit/llvm/llvmjit.c -+++ b/src/backend/jit/llvm/llvmjit.c -@@ -798,6 +798,16 @@ llvm_session_initialize(void) - LLVMInitializeNativeAsmPrinter(); - LLVMInitializeNativeAsmParser(); - -+ /* -+ * When targetting an llvm version with opaque pointers enabled by -+ * default, turn them off for the context we build our code in. Don't need -+ * to do so for other contexts (e.g. llvm_ts_context) - once the IR is -+ * generated, it carries the necessary information. -+ */ -+#if LLVM_VERSION_MAJOR > 14 -+ LLVMContextSetOpaquePointers(LLVMGetGlobalContext(), false); -+#endif -+ - /* - * Synchronize types early, as that also includes inferring the target - * triple. -@@ -1112,7 +1122,11 @@ llvm_resolve_symbols(LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx, - LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags JDLookupFlags, - LLVMOrcCLookupSet LookupSet, size_t LookupSetSize) - { -+#if LLVM_VERSION_MAJOR > 14 -+ LLVMOrcCSymbolMapPairs symbols = palloc0(sizeof(LLVMOrcCSymbolMapPair) * LookupSetSize); -+#else - LLVMOrcCSymbolMapPairs symbols = palloc0(sizeof(LLVMJITCSymbolMapPair) * LookupSetSize); -+#endif - LLVMErrorRef error; - LLVMOrcMaterializationUnitRef mu; - -@@ -1230,7 +1244,11 @@ llvm_create_jit_instance(LLVMTargetMachineRef tm) - * Symbol resolution support for "special" functions, e.g. a call into an - * SQL callable function. - */ -+#if LLVM_VERSION_MAJOR > 14 -+ ref_gen = LLVMOrcCreateCustomCAPIDefinitionGenerator(llvm_resolve_symbols, NULL, NULL); -+#else - ref_gen = LLVMOrcCreateCustomCAPIDefinitionGenerator(llvm_resolve_symbols, NULL); -+#endif - LLVMOrcJITDylibAddGenerator(LLVMOrcLLJITGetMainJITDylib(lljit), ref_gen); - - return lljit; -# diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build -# index de2e624ab58..e5a702163b7 100644 -# --- a/src/backend/jit/llvm/meson.build -# +++ b/src/backend/jit/llvm/meson.build -# @@ -51,6 +51,9 @@ endif - -# # XXX: Need to determine proper version of the function cflags for clang -# bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv'] -# +if llvm.version().version_compare('>=15.0') -# + bitcode_cflags += ['-Xclang', '-no-opaque-pointers'] -# +endif -# bitcode_cflags += cppflags - - # XXX: Worth improving on the logic to find directories here -diff --git a/configure b/configure -index 1caca21b625..cf457a0ed4a 100755 ---- a/configure -+++ b/configure -@@ -7391,6 +7391,95 @@ if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; - fi - - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5 -+$as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; } -+if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ pgac_save_CFLAGS=$CFLAGS -+pgac_save_CC=$CC -+CC=${CLANG} -+CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers" -+ac_save_c_werror_flag=$ac_c_werror_flag -+ac_c_werror_flag=yes -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes -+else -+ pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ac_c_werror_flag=$ac_save_c_werror_flag -+CFLAGS="$pgac_save_CFLAGS" -+CC="$pgac_save_CC" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5 -+$as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; } -+if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then -+ BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers" -+fi -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5 -+$as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; } -+if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ pgac_save_CXXFLAGS=$CXXFLAGS -+pgac_save_CXX=$CXX -+CXX=${CLANGXX} -+CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers" -+ac_save_cxx_werror_flag=$ac_cxx_werror_flag -+ac_cxx_werror_flag=yes -+ac_ext=cpp -+ac_cpp='$CXXCPP $CPPFLAGS' -+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_cxx_try_compile "$LINENO"; then : -+ pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes -+else -+ pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ac_cxx_werror_flag=$ac_save_cxx_werror_flag -+CXXFLAGS="$pgac_save_CXXFLAGS" -+CXX="$pgac_save_CXX" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5 -+$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; } -+if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then -+ BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers" -+fi -+ -+ - NOT_THE_CFLAGS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5 - $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; } -diff --git a/configure.ac b/configure.ac -index 10fa55dd154..ecc6c495db9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -625,6 +625,9 @@ if test "$with_llvm" = yes ; then - PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, BITCODE_CFLAGS, [-fexcess-precision=standard]) - PGAC_PROG_VARCXX_VARFLAGS_OPT(CLANGXX, BITCODE_CXXFLAGS, [-fexcess-precision=standard]) - -+ PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, BITCODE_CFLAGS, [-Xclang -no-opaque-pointers]) -+ PGAC_PROG_VARCXX_VARFLAGS_OPT(CLANGXX, BITCODE_CXXFLAGS, [-Xclang -no-opaque-pointers]) -+ - NOT_THE_CFLAGS="" - PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, NOT_THE_CFLAGS, [-Wunused-command-line-argument]) - if test -n "$NOT_THE_CFLAGS"; then --- -2.37.3.542.gdd3f6c4cae - diff --git a/postgresql.spec b/postgresql.spec index cbadb38..a202cbd 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -64,8 +64,8 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 15 -Version: %{majorversion}.0 -Release: 2%{?dist} +Version: %{majorversion}.1 +Release: 1%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. @@ -81,7 +81,7 @@ Url: http://www.postgresql.org/ %global prev_prefix %{_libdir}/pgsql/postgresql-%{prevmajorversion} %global precise_version %{?epoch:%epoch:}%version-%release -%global setup_version 8.7 +%global setup_version 8.8 %global service_name postgresql.service @@ -118,8 +118,6 @@ Patch10: postgresql-datalayout-mismatch-on-s390.patch Patch12: postgresql-no-libecpg.patch # This patch disables deprecated ciphers in the test suite Patch14: postgresql-pgcrypto-openssl3-tests.patch -# This patch enables to build PostgreSQL 15 with llvm 15 -Patch15: postgresql-15.0-llvm_pointer.patch BuildRequires: make BuildRequires: lz4-devel @@ -442,7 +440,6 @@ goal of accelerating analytics queries. %patch9 -p1 %patch10 -p1 %patch14 -p1 -%patch15 -p1 # We used to run autoconf here, but there's no longer any real need to, # since Postgres ships with a reasonably modern configure script. @@ -1267,6 +1264,11 @@ make -C postgresql-setup-%{setup_version} check %changelog +* Fri Jan 06 2023 Filip Janus - 15.1-1 +- Update to 15.1 +- update postgresql-setup to 8.8 +- Resolves: #2157651 + * Sat Dec 31 2022 Pete Walter - 15.0-2 - Rebuild for ICU 72 diff --git a/sources b/sources old mode 100644 new mode 100755 index 95eb99b..0504df8 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ -SHA512 (postgresql-15.0.tar.bz2) = 537d223be619d8b192756791cb614638f7188532f981e233bbfa8c0245adf5afe94ba5160d771af77f7d4ead41bcf346cbb2197e1358a6411ead06b19e29f120 -SHA512 (postgresql-15.0.tar.bz2.sha256) = 9da21058369ceac6870f5394853ba58c90f0b5dbcd1524f170033598d6cd5e38b4329373e97f242c4f56a93ae0b1a212e762740149937f519db22ed7435c6fe8 -SHA512 (postgresql-15.0-US.pdf) = 97f685740ed384b7e1c439f326a2cd1771aac47accba64ec70f8d7d370944c163ad9c4bc61328358a6f442d44d01a7c426cfb2a57c99dfa4580a298a8db145a0 +SHA512 (postgresql-15.1.tar.bz2) = 803900363106d2e343305e6d1546016b6a6a37bbd49d7a84a9a6467c1dc3fc4eb52698411af9c2178590c2f7680967466b1a211a76955dcec5445d0b8b254202 +SHA512 (postgresql-15.1.tar.bz2.sha256) = 3a2ca45c3905ceab91c3c14fc5a61a3d9cfb44c9f657a377c162274f6d27506604c305c5a5a49a1bdd8fc96b7cc442787fadf32b43531a93f31fb14ee08a2d3b +SHA512 (postgresql-15.1-US.pdf) = c89f639c8cc7d67cf421453ac80ba6f32d4d2507cad85b3cd774409bd892cbc500193f50246adecf6fdee2f71e65d4cc1dc87af615fbfa9ca0746ebdd6f3e9c8 SHA512 (postgresql-14.3.tar.bz2) = 70e6f67b5729a23f80b92b04e3fad2e09596b939660e3ddebf499d06af946459a45a019279e05413673e7b65d09a28a0440ed3c2ae565068466ed37e2d4f6f17 SHA512 (postgresql-14.3.tar.bz2.sha256) = 29a4b501bdd17ad36e6b7c8c8e7c2f418b72c70811317409ad067d2d059e6adaf511efa367393d6837dcab458537fb3f297e9046bfc38072dc5d1af6338404f5 -SHA512 (postgresql-setup-8.7.tar.gz) = 741f036be517e7d9725e4f146ca7dac8b8a16b6a93d045a64ef268487f48faad6b08317b58e07ad16a31002d2a10de0ac32513a4935c3f22f48ec768a742d1fc \ No newline at end of file +SHA512 (postgresql-setup-8.8.tar.gz) = 4569e5ba83b16556312b89cd6762eb55902eb9265ce9ceb0e0fe18755e1ab7217ea748df465c4402e24d19b55b25702deab92030510dc722db8fcbc0cb639053