From 99c63d9f7d8a0292268f9ce1e6cb82e00251468e2ea60b3b71d389a62ef12740 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 30 Nov 2021 16:49:34 +0000 Subject: [PATCH 1/5] - Add a llvmjit-devel subpackage to pull in the right versions of clang and llvm for building extensions. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=44 --- postgresql13.changes | 6 ++++++ postgresql13.spec | 42 +++++++++++++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/postgresql13.changes b/postgresql13.changes index 1294ba8..b8bc99c 100644 --- a/postgresql13.changes +++ b/postgresql13.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 25 11:02:15 UTC 2021 - Reinhard Max + +- Add a llvmjit-devel subpackage to pull in the right versions + of clang and llvm for building extensions. + ------------------------------------------------------------------- Wed Nov 10 18:04:28 UTC 2021 - Reinhard Max diff --git a/postgresql13.spec b/postgresql13.spec index c1c6fb1..2f7a3bb 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -40,6 +40,8 @@ %define pgcontribdir %pgdatadir/contrib %define pgmandir %_mandir +%define requires_file() %( readlink -f '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' -f | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") + Name: %pgname %if "@BUILD_FLAVOR@" == "mini" %define devel devel-mini @@ -228,6 +230,7 @@ Conflicts: %pgname-devel %else Requires: %libecpg >= %version Requires: %libpq >= %version +Requires: postgresql-devel-noarch >= %version %endif # Installation of postgresql??-devel is exclusive Provides: postgresql-devel-exclusive = %pgmajor @@ -249,10 +252,6 @@ Requires: %pgname-server = %version-%release # Installation of postgresql??-devel is exclusive Provides: postgresql-server-devel-exclusive = %pgmajor Conflicts: postgresql-server-devel-exclusive < %pgmajor -%if %{with llvm} -Recommends: clang -Recommends: llvm -%endif Requires: libxslt-devel Requires: openssl-devel Requires: pam-devel @@ -262,6 +261,9 @@ Requires: pkgconfig(krb5) %if %{with selinux} Requires: libselinux-devel %endif +%if %{with llvm} +Recommends: %pgname-llvmjit-devel = %version-%release +%endif %if %{with server_devel} %description server-devel @@ -335,6 +337,30 @@ PostgreSQL queries. Using LLVM it compiles e.g. expressions and tuple deforming into native code, with the goal of accelerating analytics queries. +%package llvmjit-devel +Summary: PostgreSQL development files for extensions with LLVM support +Group: Development/Libraries/C and C++ +Provides: postgresql-llvmjit-devel = %version-%release +Provides: postgresql-llvmjit-devel-implementation = %version-%release +Requires: %pgname-server-devel = %version +%if %{with llvm} +Requires(post): postgresql-llvmjit-noarch >= %pgmajor +Requires(postun):postgresql-llvmjit-noarch >= %pgmajor +%requires_file %_bindir/llc +%requires_file %_bindir/clang +%endif + +%description llvmjit-devel +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, sub-queries, triggers, and user-defined +types and functions. + +This package pulls in the right versions of llvm and clang to compile +PostgreSQL extensions that support just-in-time compilation with LLVM, +if llvm is supported. Otherwise it will just pull the +%{pgname}-server-devel package. + %package test Summary: The test suite for PostgreSQL Group: Productivity/Databases/Servers @@ -866,17 +892,19 @@ fi %pglibdir/*_and_*.so %pglibdir/euc2004_sjis2004.so %pglibdir/libpqwalreceiver.so -%if %{with llvm} -%dir %pglibdir/bitcode -%endif %pgextensiondir/plpgsql* %attr(750,postgres,postgres) %dir /var/lib/pgsql %if %{with llvm} +%dir %pglibdir/bitcode + %files llvmjit %defattr(-,root,root) %pglibdir/llvm* %pglibdir/bitcode/* + +%files llvmjit-devel +%doc README %endif %files pltcl -f pltcl.lang From b0156e7b6095b633ba7acd466339621f5d44e4adfe79fa0af6df4079f64e1bb2 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 30 Nov 2021 17:13:10 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=45 --- postgresql13.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgresql13.spec b/postgresql13.spec index 2f7a3bb..bc22111 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -344,8 +344,8 @@ Provides: postgresql-llvmjit-devel = %version-%release Provides: postgresql-llvmjit-devel-implementation = %version-%release Requires: %pgname-server-devel = %version %if %{with llvm} -Requires(post): postgresql-llvmjit-noarch >= %pgmajor -Requires(postun):postgresql-llvmjit-noarch >= %pgmajor +Requires(post): postgresql-llvmjit-devel-noarch >= %pgmajor +Requires(postun):postgresql-llvmjit-devel-noarch >= %pgmajor %requires_file %_bindir/llc %requires_file %_bindir/clang %endif From 0eec778c1a584b0be899d14489b63a6ddd5312bace09aecbf84a2fb278c9c754 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 30 Nov 2021 18:52:48 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=46 --- postgresql13.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/postgresql13.spec b/postgresql13.spec index bc22111..5abeb56 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -131,6 +131,9 @@ BuildRequires: pkgconfig(systemd) #!BuildIgnore: %pgname-server #!BuildIgnore: postgresql-implementation #!BuildIgnore: postgresql-server-implementation +#!BuildIgnore: postgresql-devel-noarch +#!BuildIgnore: postgresql-llvmjit-devel-noarch +#!BuildIgnore: postgresql-server-devel-noarch Summary: Basic Clients and Utilities for PostgreSQL License: PostgreSQL Group: Productivity/Databases/Tools @@ -230,7 +233,7 @@ Conflicts: %pgname-devel %else Requires: %libecpg >= %version Requires: %libpq >= %version -Requires: postgresql-devel-noarch >= %version +Requires: postgresql-devel-noarch >= %pgmajor %endif # Installation of postgresql??-devel is exclusive Provides: postgresql-devel-exclusive = %pgmajor @@ -245,8 +248,8 @@ Provides: %pgname-server-devel = %version-%release %endif Provides: postgresql-server-devel = %version-%release Provides: postgresql-server-devel-implementation = %version-%release -Requires(post): postgresql-server-noarch >= %pgmajor -Requires(postun):postgresql-server-noarch >= %pgmajor +Requires(post): postgresql-server-devel-noarch >= %pgmajor +Requires(postun):postgresql-server-devel-noarch >= %pgmajor Requires: %pgname-devel = %version Requires: %pgname-server = %version-%release # Installation of postgresql??-devel is exclusive @@ -344,6 +347,7 @@ Provides: postgresql-llvmjit-devel = %version-%release Provides: postgresql-llvmjit-devel-implementation = %version-%release Requires: %pgname-server-devel = %version %if %{with llvm} +Requires: %pgname-llvmjit = %version Requires(post): postgresql-llvmjit-devel-noarch >= %pgmajor Requires(postun):postgresql-llvmjit-devel-noarch >= %pgmajor %requires_file %_bindir/llc @@ -902,10 +906,10 @@ fi %defattr(-,root,root) %pglibdir/llvm* %pglibdir/bitcode/* +%endif %files llvmjit-devel %doc README -%endif %files pltcl -f pltcl.lang %defattr(-,root,root) From b86d3596f22e1149153099905edae2a1bafabb125a2de7714bc9163ae50ca17b Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 30 Nov 2021 19:03:55 +0000 Subject: [PATCH 4/5] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=47 --- postgresql13.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/postgresql13.spec b/postgresql13.spec index 5abeb56..c5c3df4 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -127,8 +127,6 @@ BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) %endif -#!BuildIgnore: %pgname -#!BuildIgnore: %pgname-server #!BuildIgnore: postgresql-implementation #!BuildIgnore: postgresql-server-implementation #!BuildIgnore: postgresql-devel-noarch From 9f00a57e2127bef683a37132414d2a9071679ec86468dc75d658b15c5f9353d4 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 2 Dec 2021 13:44:09 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=48 --- postgresql13.changes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postgresql13.changes b/postgresql13.changes index b8bc99c..572a816 100644 --- a/postgresql13.changes +++ b/postgresql13.changes @@ -3,6 +3,9 @@ Thu Nov 25 11:02:15 UTC 2021 - Reinhard Max - Add a llvmjit-devel subpackage to pull in the right versions of clang and llvm for building extensions. +- Fix some mistakes in the interdependencies between the + implementation packages and their noarch counterpart. +- Update the BuildIgnore section. ------------------------------------------------------------------- Wed Nov 10 18:04:28 UTC 2021 - Reinhard Max