From eab86d3b60911ce8a099a0a160e0c4e54921b42cef3e58b5b2b94bb55829b6da Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Wed, 25 Aug 2021 11:41:54 +0000 Subject: [PATCH] - bsc#1187751: Make the dependency of postgresqlXX-server-devel on llvm and clang optional (postgresql-llvm-optional.patch). OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql12?expand=0&rev=48 --- postgresql-llvm-optional.patch | 16 ++++++++++++++++ postgresql12.changes | 6 ++++++ postgresql12.spec | 10 ++++++---- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 postgresql-llvm-optional.patch diff --git a/postgresql-llvm-optional.patch b/postgresql-llvm-optional.patch new file mode 100644 index 0000000..87a8d9f --- /dev/null +++ b/postgresql-llvm-optional.patch @@ -0,0 +1,16 @@ +--- 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@ diff --git a/postgresql12.changes b/postgresql12.changes index 44d893f..d43b217 100644 --- a/postgresql12.changes +++ b/postgresql12.changes @@ -11,6 +11,12 @@ Tue Aug 24 13:01:54 UTC 2021 - Marcus Rueckert be crashes or incorrect query results. Disclosure of server memory contents is also possible. +------------------------------------------------------------------- +Fri Jul 2 07:47:15 UTC 2021 - Reinhard Max + +- bsc#1187751: Make the dependency of postgresqlXX-server-devel on + llvm and clang optional (postgresql-llvm-optional.patch). + ------------------------------------------------------------------- Wed May 19 15:24:24 UTC 2021 - Reinhard Max diff --git a/postgresql12.spec b/postgresql12.spec index bfba53a..5806dda 100644 --- a/postgresql12.spec +++ b/postgresql12.spec @@ -88,6 +88,7 @@ BuildRequires: %libpq %bcond_with systemd %bcond_with systemd_notify %endif + %if 0%{?suse_version} >= 1500 && %pgsuffix >= 11 && %pgsuffix < 90 %bcond_without llvm %else @@ -153,6 +154,7 @@ Patch4: postgresql-plperl-keep-rpath.patch Patch6: postgresql-testsuite-int8.sql.patch Patch8: postgresql-testsuite-keep-results-file.patch Patch9: postgresql-var-run-socket.patch +Patch10: postgresql-llvm-optional.patch URL: https://www.postgresql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: postgresql = %version-%release @@ -255,8 +257,8 @@ Requires: %pgname-server = %version-%release 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 +461,7 @@ touch -r configure tmp %patch6 %patch8 -p1 %patch9 +%patch10 touch -r tmp configure rm tmp find src/test/ -name '*.orig' -delete @@ -533,8 +536,7 @@ make check || { %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