Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package postgresql13 for openSUSE:Factory 
checked in at 2021-09-13 16:24:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/postgresql13 (Old)
 and      /work/SRC/openSUSE:Factory/.postgresql13.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "postgresql13"

Mon Sep 13 16:24:18 2021 rev:11 rq:917542 version:13.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/postgresql13/postgresql13.changes        
2021-05-21 21:49:32.646350822 +0200
+++ /work/SRC/openSUSE:Factory/.postgresql13.new.1899/postgresql13.changes      
2021-09-13 16:24:44.054758799 +0200
@@ -1,0 +2,26 @@
+Tue Aug 31 11:14:53 UTC 2021 - Reinhard Max <m...@suse.com>
+
+- bsc#1185952: fix build with llvm12 on s390x.
+  0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch 
+- bsc#1179945: Re-enable icu for PostgreSQL 10.
+
+-------------------------------------------------------------------
+Tue Aug 24 12:45:53 UTC 2021 - Marcus Rueckert <mrueck...@suse.de>
+
+- Upgrade to version 13.4:
+  https://www.postgresql.org/docs/13/release-13-4.html
+  * CVE-2021-3677 (boo#1189748)
+    The planner could create an incorrect plan in cases where two
+    ProjectionPaths were stacked on top of each other. The only
+    known way to trigger that situation involves parallel sort
+    operations, but there may be other instances. The result would
+    be crashes or incorrect query results. Disclosure of server
+    memory contents is also possible.
+
+-------------------------------------------------------------------
+Mon Jun 28 10:00:46 UTC 2021 - Reinhard Max <m...@suse.com>
+
+- bsc#1187751: Make the dependency of postgresqlXX-server-devel on
+  llvm and clang optional (postgresql-llvm-optional.patch).
+
+-------------------------------------------------------------------

Old:
----
  postgresql-13.3.tar.bz2
  postgresql-13.3.tar.bz2.sha256

New:
----
  0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch
  postgresql-13.4.tar.bz2
  postgresql-13.4.tar.bz2.sha256
  postgresql-llvm-optional.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ postgresql13.spec ++++++
--- /var/tmp/diff_new_pack.R5ikjO/_old  2021-09-13 16:24:44.750759604 +0200
+++ /var/tmp/diff_new_pack.R5ikjO/_new  2021-09-13 16:24:44.754759608 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%define pgversion 13.3
+%define pgversion 13.4
 %define pgmajor 13
 %define pgsuffix %pgmajor
 %define buildlibs 1
@@ -72,11 +72,7 @@
 BuildRequires:  timezone
 BuildRequires:  zlib-devel
 %bcond_without  selinux
-%if %pgmajor > 10 || 0%{?suse_version} <= 1500
 %bcond_without  icu
-%else
-%bcond_with icu
-%endif
 %if  !%buildlibs
 BuildRequires:  %libecpg
 BuildRequires:  %libpq
@@ -88,6 +84,7 @@
 %bcond_with     systemd
 %bcond_with     systemd_notify
 %endif
+
 %if 0%{?suse_version} >= 1500 && %pgsuffix >= 11 && %pgsuffix < 90
 %bcond_without  llvm
 %else
@@ -115,15 +112,10 @@
 BuildRequires:  libselinux-devel
 %endif
 %if %{with llvm}
-BuildRequires:  gcc-c++
-%ifarch s390x
-BuildRequires:  clang11
-BuildRequires:  llvm11-devel
-%else
 BuildRequires:  clang
+BuildRequires:  gcc-c++
 BuildRequires:  llvm-devel
 %endif
-%endif
 BuildRequires:  libxslt-devel
 BuildRequires:  openldap2-devel
 BuildRequires:  openssl-devel
@@ -153,6 +145,10 @@
 Patch6:         postgresql-testsuite-int8.sql.patch
 Patch8:         postgresql-testsuite-keep-results-file.patch
 Patch9:         postgresql-var-run-socket.patch
+%if %{with llvm}
+Patch10:        postgresql-llvm-optional.patch
+Patch11:        0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch
+%endif
 URL:            https://www.postgresql.org/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Provides:       postgresql = %version-%release
@@ -227,9 +223,9 @@
 Provides:       %libecpg = %version-%release
 Provides:       %libpq = %version-%release
 Provides:       %pgname-devel = %version-%release
-Conflicts:      %pgname-devel
 Conflicts:      %libecpg
 Conflicts:      %libpq
+Conflicts:      %pgname-devel
 %else
 Requires:       %libecpg >= %version
 Requires:       %libpq >= %version
@@ -255,8 +251,8 @@
 Provides:       postgresql-server-devel-exclusive = %pgmajor
 Conflicts:      postgresql-server-devel-exclusive < %pgmajor
 %if %{with llvm}
-Requires:       clang
-Requires:       llvm
+Recommends:     clang
+Recommends:     llvm
 %endif
 Requires:       libxslt-devel
 Requires:       openssl-devel
@@ -459,6 +455,10 @@
 %patch6
 %patch8 -p1
 %patch9
+%if %{with llvm}
+%patch10
+%patch11
+%endif
 touch -r tmp configure
 rm tmp
 find src/test/ -name '*.orig' -delete
@@ -533,8 +533,7 @@
 %endif
 
 %install
-VLANG=${RPM_PACKAGE_VERSION%%.*}
-VSO=${RPM_PACKAGE_VERSION%%%%.*}
+VLANG=%pgmajor
 %if %mini
 make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/include install
 make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/interfaces install
@@ -922,6 +921,7 @@
 %if %buildlibs && %mini
 %files %devel -f devel.files -f libpq.files -f libecpg.files
 %else
+
 %files %devel -f devel.files
 %endif
 

++++++ 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch ++++++
>From 0edaa982336823d4d7af8f10b91579fe0099ef3d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstel...@redhat.com>
Date: Tue, 20 Apr 2021 20:14:21 -0700
Subject: [PATCH] jit: Workaround potential datalayout mismatch on s390x

LLVM's s390x target uses a different datalayout for z13 and newer processors.
If llvmjit_types.bc is compiled to target a processor older than z13, and
then the JIT runs on a z13 or newer processor, then there will be a mismatch
in datalayouts between llvmjit_types.bc and the JIT engine.  This mismatch
causes the JIT to fail at runtime.
---
 src/backend/jit/llvm/llvmjit.c | 46 ++++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)

--- src/backend/jit/llvm/llvmjit.c.orig
+++ src/backend/jit/llvm/llvmjit.c
@@ -736,6 +736,35 @@ llvm_compile_module(LLVMJitContext *cont
 }
 
 /*
+ * For the systemz target, LLVM uses a different datalayout for z13 and newer
+ * CPUs than it does for older CPUs.  This can cause a mismatch in datalayouts
+ * in the case where the llvm_types_module is compiled with a pre-z13 CPU
+ * and the JIT is running on z13 or newer.
+ * See computeDataLayout() function in
+ * llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp for information on the
+ * datalayout differences.
+ */
+static bool
+needs_systemz_workaround(void)
+{
+       bool ret = false;
+       LLVMContextRef llvm_context;
+       LLVMTypeRef vec_type;
+       LLVMTargetDataRef llvm_layoutref;
+       if (strncmp(LLVMGetTargetName(llvm_targetref), "systemz", 
strlen("systemz")))
+       {
+               return false;
+       }
+
+       llvm_context = LLVMGetModuleContext(llvm_types_module);
+       vec_type = LLVMVectorType(LLVMIntTypeInContext(llvm_context, 32), 4);
+       llvm_layoutref = LLVMCreateTargetData(llvm_layout);
+       ret = (LLVMABIAlignmentOfType(llvm_layoutref, vec_type) == 16);
+       LLVMDisposeTargetData(llvm_layoutref);
+       return ret;
+}
+
+/*
  * Per session initialization.
  */
 static void
@@ -744,6 +773,7 @@ llvm_session_initialize(void)
        MemoryContext oldcontext;
        char       *error = NULL;
        char       *cpu = NULL;
+       char       *host_features = NULL;
        char       *features = NULL;
        LLVMTargetMachineRef opt0_tm;
        LLVMTargetMachineRef opt3_tm;
@@ -775,10 +805,17 @@ llvm_session_initialize(void)
         * features not all CPUs have (weird, huh).
         */
        cpu = LLVMGetHostCPUName();
-       features = LLVMGetHostCPUFeatures();
+       features = host_features = LLVMGetHostCPUFeatures();
        elog(DEBUG2, "LLVMJIT detected CPU \"%s\", with features \"%s\"",
                 cpu, features);
 
+       if (needs_systemz_workaround())
+       {
+               const char *no_vector =",-vector";
+               features = malloc(sizeof(char) * (strlen(host_features) + 
strlen(no_vector) + 1));
+               sprintf(features, "%s%s", host_features, no_vector);
+       }
+
        opt0_tm =
                LLVMCreateTargetMachine(llvm_targetref, llvm_triple, cpu, 
features,
                                                                
LLVMCodeGenLevelNone,
@@ -792,8 +829,13 @@ llvm_session_initialize(void)
 
        LLVMDisposeMessage(cpu);
        cpu = NULL;
-       LLVMDisposeMessage(features);
+       if (features != host_features)
+       {
+               free(features);
+       }
        features = NULL;
+       LLVMDisposeMessage(host_features);
+       host_features = NULL;
 
        /* force symbols in main binary to be loaded */
        LLVMLoadLibraryPermanently(NULL);
++++++ postgresql-13.3.tar.bz2 -> postgresql-13.4.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/postgresql13/postgresql-13.3.tar.bz2 
/work/SRC/openSUSE:Factory/.postgresql13.new.1899/postgresql-13.4.tar.bz2 
differ: char 11, line 1

++++++ postgresql-13.3.tar.bz2.sha256 -> postgresql-13.4.tar.bz2.sha256 ++++++
--- /work/SRC/openSUSE:Factory/postgresql13/postgresql-13.3.tar.bz2.sha256      
2021-05-18 18:26:54.558841002 +0200
+++ 
/work/SRC/openSUSE:Factory/.postgresql13.new.1899/postgresql-13.4.tar.bz2.sha256
    2021-09-13 16:24:43.986758720 +0200
@@ -1 +1 @@
-3cd9454fa8c7a6255b6743b767700925ead1b9ab0d7a0f9dcb1151010f8eb4a1  
postgresql-13.3.tar.bz2
+ea93e10390245f1ce461a54eb5f99a48d8cabd3a08ce4d652ec2169a357bc0cd  
postgresql-13.4.tar.bz2

++++++ postgresql-llvm-optional.patch ++++++
--- src/Makefile.global.in.orig
+++ src/Makefile.global.in
@@ -192,7 +192,12 @@ with_krb_srvnam    = @with_krb_srvnam@
 with_ldap      = @with_ldap@
 with_libxml    = @with_libxml@
 with_libxslt   = @with_libxslt@
-with_llvm      = @with_llvm@
+# Only build for LLVM, if the core supports it and the llvm and clang packages 
are installed.
+ifeq (@with_llvm@ $(wildcard /usr/bin/clang /usr/bin/llvm-lto),yes 
/usr/bin/clang /usr/bin/llvm-lto)
+with_llvm      = yes
+else
+with_llvm      = no
+endif
 with_system_tzdata = @with_system_tzdata@
 with_uuid      = @with_uuid@
 with_zlib      = @with_zlib@

Reply via email to