From f9502278b0647cfacd2ce21a695e06a687216f4ff23d68f911f80ad157cd1821 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 13 Sep 2022 11:53:01 +0000 Subject: [PATCH 1/4] Accepting request 1003037 from openSUSE:Factory:RISCV - Disable LLVM JIT on riscv64 OBS-URL: https://build.opensuse.org/request/show/1003037 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=56 --- postgresql13.changes | 5 +++++ postgresql13.spec | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/postgresql13.changes b/postgresql13.changes index 1de68f6..69238d0 100644 --- a/postgresql13.changes +++ b/postgresql13.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 12 07:52:42 UTC 2022 - Andreas Schwab + +- Disable LLVM JIT on riscv64 + ------------------------------------------------------------------- Fri Aug 12 11:16:34 UTC 2022 - Reinhard Max diff --git a/postgresql13.spec b/postgresql13.spec index 27e76d5..3e9c078 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -88,7 +88,11 @@ BuildRequires: %libpq %endif %if 0%{?suse_version} >= 1500 && %pgsuffix >= 11 && %pgsuffix < 90 +%ifarch riscv64 +%bcond_with llvm +%else %bcond_without llvm +%endif %else %bcond_with llvm %endif From d3bcbd29691955b6fac5978c0aa565596ba91b5cb141a717966e29174f24f5e6 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 23 Sep 2022 12:44:57 +0000 Subject: [PATCH 2/4] - Add generic mechanism to pin to latest supported LLVM version. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=57 --- postgresql13.changes | 7 +++++++ postgresql13.spec | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/postgresql13.changes b/postgresql13.changes index 69238d0..64ccef7 100644 --- a/postgresql13.changes +++ b/postgresql13.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 22 21:26:36 UTC 2022 - Aaron Puchert + +- Create mechanism to specify the latest supported LLVM version. + Automatically pin to that version if the distribution has a newer + unsupported default version. + ------------------------------------------------------------------- Mon Sep 12 07:52:42 UTC 2022 - Andreas Schwab diff --git a/postgresql13.spec b/postgresql13.spec index 3e9c078..3e3e428 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -97,6 +97,7 @@ BuildRequires: %libpq %bcond_with llvm %endif %endif +%global latest_supported_llvm_ver 14 %ifnarch %arm %bcond_without check @@ -118,10 +119,15 @@ BuildRequires: libicu-devel BuildRequires: libselinux-devel %endif %if %{with llvm} -BuildRequires: clang BuildRequires: gcc-c++ +%if 0%{?product_libs_llvm_ver} > %{latest_supported_llvm_ver} +BuildRequires: clang%{latest_supported_llvm_ver} +BuildRequires: llvm%{latest_supported_llvm_ver}-devel +%else +BuildRequires: clang BuildRequires: llvm-devel %endif +%endif BuildRequires: libxslt-devel BuildRequires: openldap2-devel BuildRequires: openssl-devel From 879372ccb05c73dabaeec14f4606ec14a091626e6dc8d7e91e857a047e47d475 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 23 Sep 2022 14:11:55 +0000 Subject: [PATCH 3/4] - Sync spec file with postgresql15. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=58 --- postgresql13.changes | 5 +++++ postgresql13.spec | 34 +++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/postgresql13.changes b/postgresql13.changes index 64ccef7..903479c 100644 --- a/postgresql13.changes +++ b/postgresql13.changes @@ -5,6 +5,11 @@ Thu Sep 22 21:26:36 UTC 2022 - Aaron Puchert Automatically pin to that version if the distribution has a newer unsupported default version. +------------------------------------------------------------------- +Tue Sep 13 12:38:38 UTC 2022 - Reinhard Max + +- Sync spec file with postgresql15. + ------------------------------------------------------------------- Mon Sep 12 07:52:42 UTC 2022 - Andreas Schwab diff --git a/postgresql13.spec b/postgresql13.spec index 3e3e428..ec32bae 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -19,8 +19,8 @@ %define pgversion 13.8 %define pgmajor 13 %define pgsuffix %pgmajor -%define buildlibs 0 %define tarversion %{pgversion} +%define latest_supported_llvm_ver 14 ### CUT HERE ### %define pgname postgresql%pgsuffix @@ -42,6 +42,9 @@ %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") +# Only build client libraries of the latest version. +%define buildlibs (%{pgmajor} == %(rpm -q --qf %{VERSION} postgresql | cut -d. -f1)) + Name: %pgname %if "@BUILD_FLAVOR@" == "mini" %define devel devel-mini @@ -59,6 +62,14 @@ Name: %pgname %define python python %endif +%if 0%{?suse_version} >= 1500 +%bcond_without liblz4 +%endif + +%if 0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550 +%bcond_without libzstd +%endif + %if %mini %bcond_with selinux %bcond_with icu @@ -73,6 +84,14 @@ BuildRequires: readline-devel BuildRequires: tcl-devel BuildRequires: timezone BuildRequires: zlib-devel +%if %{with liblz4} +BuildRequires: pkgconfig(liblz4) +%endif + +%if %{with libzstd} +BuildRequires: pkgconfig(libzstd) +%endif + %bcond_without selinux %bcond_without icu %if !%buildlibs @@ -97,7 +116,6 @@ BuildRequires: %libpq %bcond_with llvm %endif %endif -%global latest_supported_llvm_ver 14 %ifnarch %arm %bcond_without check @@ -408,8 +426,8 @@ Summary: Contributed Extensions and Additions to PostgreSQL Group: Productivity/Databases/Tools Provides: postgresql-contrib-implementation = %version-%release Requires: postgresql-contrib-noarch >= %pgmajor -Requires(post): %pgname >= %pgmajor -Requires: %pgname >= %pgmajor +Requires(post): %pgname >= %{version} +Requires: %pgname >= %{version} PreReq: %pgname-server = %version-%release %description contrib @@ -526,6 +544,12 @@ PACKAGE_TARNAME=%pgname %configure \ --with-uuid=e2fs \ --with-libxml \ --with-libxslt \ +%if %{with liblz4} + --with-lz4 \ +%endif +%if %{with libzstd} + --with-zstd \ +%endif %if %{with systemd_notify} --with-systemd \ %endif @@ -588,7 +612,7 @@ mkdir -p %buildroot%pgtestdir/regress install -sm 0755 contrib/spi/{refint.so,autoinc.so} %buildroot%pgtestdir/regress install -sm 0755 src/test/regress/{pg_regress,regress.so} %buildroot%pgtestdir/regress for i in src/test/regress/{data,expected,input,output,sql}; do - cp -r $i %buildroot%pgtestdir/regress/ + test -d $i && cp -r $i %buildroot%pgtestdir/regress/ done install -m 0644 src/test/regress/*_schedule %buildroot%pgtestdir/regress # }}} From 9c479b5d8f6223e7368eba030bfffb935e3098b3d081e566487e38af65f44c56 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 23 Sep 2022 16:02:47 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=59 --- postgresql13.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/postgresql13.spec b/postgresql13.spec index ec32bae..8419b1c 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -19,6 +19,7 @@ %define pgversion 13.8 %define pgmajor 13 %define pgsuffix %pgmajor +%define buildlibs 0 %define tarversion %{pgversion} %define latest_supported_llvm_ver 14 @@ -42,9 +43,6 @@ %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") -# Only build client libraries of the latest version. -%define buildlibs (%{pgmajor} == %(rpm -q --qf %{VERSION} postgresql | cut -d. -f1)) - Name: %pgname %if "@BUILD_FLAVOR@" == "mini" %define devel devel-mini