From f2c92c6ae81073810678cbb358eb7cebcb053097a9e774f48c7827268bae9ee8 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 26 Sep 2022 11:50:25 +0000 Subject: [PATCH 1/3] Accepting request 1005434 from home:Andreas_Schwab:Factory - Update postgresql_has_llvm macro OBS-URL: https://build.opensuse.org/request/show/1005434 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=143 --- postgresql-extensions-macros | 2 +- postgresql.changes | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/postgresql-extensions-macros b/postgresql-extensions-macros index b38332b..847e501 100644 --- a/postgresql-extensions-macros +++ b/postgresql-extensions-macros @@ -49,5 +49,5 @@ Recommends: %{pg_name}-llvmjit \ %nil %pg_version_from_name %define pg_version %( echo %{?pg_name} | sed -e 's|^postgresql||g' )%{nil} -%postgresql_has_llvm (0%{?suse_version} >= 1500 && 0%{?pg_version} >= 11 && 0%{?pg_version} < 90) +%postgresql_has_llvm (0%{?suse_version} >= 1500 && "%{_target_cpu}" != "riscv64" && 0%{?pg_version} >= 11 && 0%{?pg_version} < 90) diff --git a/postgresql.changes b/postgresql.changes index c7d4323..893de22 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 22 14:23:49 UTC 2022 - Andreas Schwab + +- Update postgresql_has_llvm macro + ------------------------------------------------------------------- Mon Sep 5 13:12:41 UTC 2022 - Dirk Müller From 96a9f148fc75e62f5f744ab340a25e7fffadd883c039ee4162c1ac68951a3766 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 26 Sep 2022 11:50:52 +0000 Subject: [PATCH 2/3] - riscv64 does not have llvm support yet, adapt the %postgresql_has_llvm macro accordingly. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=144 --- postgresql.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postgresql.changes b/postgresql.changes index 893de22..2274d7a 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Thu Sep 22 14:23:49 UTC 2022 - Andreas Schwab -- Update postgresql_has_llvm macro +- riscv64 does not have llvm support yet, + adapt the %postgresql_has_llvm macro accordingly. ------------------------------------------------------------------- Mon Sep 5 13:12:41 UTC 2022 - Dirk Müller From 4f12378358d450a40b582f8705707f02cf577693c7815b51df9ba8b1f331dbcb Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Mon, 9 Jan 2023 11:03:44 +0000 Subject: [PATCH 3/3] - bsc#1206796: Refine the distinction of where to use sysusers and use bcond to have the expression only in one place. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=145 --- postgresql.changes | 6 ++++++ postgresql.spec | 18 +++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/postgresql.changes b/postgresql.changes index 2274d7a..01165f9 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 9 09:22:55 UTC 2023 - Reinhard Max + +- bsc#1206796: Refine the distinction of where to use sysusers and + use bcond to have the expression only in one place. + ------------------------------------------------------------------- Thu Sep 22 14:23:49 UTC 2022 - Andreas Schwab diff --git a/postgresql.spec b/postgresql.spec index b8604f9..00fd24b 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -40,6 +40,14 @@ %bcond_with llvm %endif +# On SLE-15 up to SP3 sysusers does not support shells +# other than /bin/nologin +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400 +%bcond_without sysusers +%else +%bcond_with sysusers +%endif + Name: postgresql Summary: Basic Clients and Utilities for PostgreSQL License: PostgreSQL @@ -105,7 +113,7 @@ Requires: postgresql-server-implementation Requires: postgresql = %version-%release Recommends: %defaultpackage-server %if 0%{?suse_version} >= 1315 -%if 0%{?suse_version} >= 1500 +%if %{with sysusers} BuildRequires: sysuser-tools %sysusers_requires %else @@ -314,7 +322,7 @@ and triggers. %prep %build -%if 0%{?suse_version} >= 1500 +%if %{with sysusers} %sysusers_generate_pre %{SOURCE9} %{name}-server %{name}-server.conf %endif echo "This is a dummy package to provide a dependency on the default PostgreSQL version." > README @@ -355,7 +363,7 @@ ln -sf /etc/init.d/postgresql %buildroot/usr/sbin/rcpostgresql install -D -m 0644 %{SOURCE8} %{buildroot}%{_rpmmacrodir}/macros.%{name} # sysusers.d -%if 0%{?suse_version} >= 1500 +%if %{with sysusers} install -Dm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/%{name}-server.conf %endif @@ -363,7 +371,7 @@ install -Dm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/%{name}-server.conf %define eflag /run/postgresql-was-enabled %define aflag /run/postgresql-was-running -%if 0%{?suse_version} >= 1500 +%if %{with sysusers} %pre server -f %{name}-server.pre %else %pre server @@ -470,7 +478,7 @@ fi %config /etc/init.d/postgresql %dir %attr(1775,postgres,postgres) /var/run/postgresql %endif -%if 0%{?suse_version} >= 1500 +%if %{with sysusers} %{_sysusersdir}/%{name}-server.conf %endif