SHA256
1
0
forked from pool/postgresql13

31 Commits

Author SHA256 Message Date
Reinhard Max
9b45492853 Merge remote-tracking branch 'origin/factory' into slfo-main 2026-01-22 12:15:30 +01:00
19d48c198f Accepting request 1323490 from server:database:postgresql
OBS-URL: https://build.opensuse.org/request/show/1323490
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=40
2025-12-18 17:36:25 +00:00
833be3e13b - Fix build on aarch64 with upstream commit 0dceba2:
* llvm-21-aarch64.patch

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=116
2025-12-18 09:16:06 +00:00
ea79cf94d2 Accepting request 1320378 from server:database:postgresql
- Fix build with uring for post SLE15 code streams.

- Use %product_libs_llvm_ver to determine the LLVM version.
- Remove conditionals for obsolete PostgreSQL releases.

- Upgrade to 13.23:
  * https://www.postgresql.org/about/news/p-3171/
  * https://www.postgresql.org/docs/release/13.23/
  * bsc#1253332, CVE-2025-12817: Missing check for CREATE
    privileges on the schema in CREATE STATISTICS allowed table
    owners to create statistics in any schema, potentially leading
    to unexpected naming conflicts.
  * bsc#1253333, CVE-2025-12818: Several places in libpq were not
    sufficiently careful about computing the required size of a
    memory allocation. Sufficiently large inputs could cause
    integer overflow, resulting in an undersized buffer, which
    would then lead to writing past the end of the buffer.

OBS-URL: https://build.opensuse.org/request/show/1320378
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=39
2025-11-28 15:52:53 +00:00
dd25526918 - Fix build with uring for post SLE15 code streams.
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=114
2025-11-24 16:53:10 +00:00
e1df3a5837 - Use %product_libs_llvm_ver to determine the LLVM version.
- Remove conditionals for obsolete PostgreSQL releases.

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=113
2025-11-14 17:14:07 +00:00
9866480260 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=112 2025-11-13 15:50:36 +00:00
535f955e09 - Upgrade to 13.23:
* https://www.postgresql.org/docs/release/13.23/
  * bsc#1253332, CVE-2025-12817: Missing check for CREATE
    privileges on the schema in CREATE STATISTICS allowed table
    owners to create statistics in any schema, potentially leading
    to unexpected naming conflicts.
  * bsc#1253333, CVE-2025-12818: Several places in libpq were not
    sufficiently careful about computing the required size of a
    memory allocation. Sufficiently large inputs could cause
    integer overflow, resulting in an undersized buffer, which
    would then lead to writing past the end of the buffer.

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=111
2025-11-13 14:34:32 +00:00
4ac216d3bf Accepting request 1307157 from server:database:postgresql
- Sync spec file from version 18

OBS-URL: https://build.opensuse.org/request/show/1307157
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=38
2025-09-25 16:46:06 +00:00
bf356d3490 format spec file cleanup
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=109
2025-09-25 14:30:17 +00:00
13c42494c6 - Sync spec file from version 18
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=108
2025-09-25 14:15:49 +00:00
705215920b Sync changes to SLFO-1.2 branch 2025-08-20 10:46:25 +02:00
93801292c2 Accepting request 1299468 from server:database:postgresql
Forwarded request #1299463 from darix

https://www.postgresql.org/about/news/postgresql-176-1610-1514-1419-1322-and-18-beta-3-released-3118/

OBS-URL: https://build.opensuse.org/request/show/1299468
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=37
2025-08-15 19:52:18 +00:00
ef7d233a1b https://www.postgresql.org/about/news/postgresql-176-1610-1514-1419-1322-and-18-beta-3-released-3118/
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=106
2025-08-14 20:11:33 +00:00
909dbc7cca Accepting request 1278027 from server:database:postgresql
- Upgrade to 13.21:
  * bsc#1242931, CVE-2025-4207: postgresql: PostgreSQL GB18030
    encoding validation can read one byte past end of allocation
    for text that fails validation.
  * https://www.postgresql.org/docs/release/13.21/
  * https://www.postgresql.org/about/news/p-3072/
- Add postresql-pg_config_paths.patch to fix a race condition
  while generating pg_config_paths.h.

OBS-URL: https://build.opensuse.org/request/show/1278027
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=36
2025-05-20 07:35:14 +00:00
b8e3224e7f - Upgrade to 13.21:
* bsc#1242931, CVE-2025-4207: postgresql: PostgreSQL GB18030
    encoding validation can read one byte past end of allocation
    for text that fails validation.
  * https://www.postgresql.org/docs/release/13.21/
  * https://www.postgresql.org/about/news/p-3072/
- Add postresql-pg_config_paths.patch to fix a race condition
  while generating pg_config_paths.h.

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=104
2025-05-09 12:02:23 +00:00
492777a08d Accepting request 1247461 from server:database:postgresql
- Upgrade to 13.20:
  * Improve behavior of libpq's quoting functions:
    The changes made for CVE-2025-1094 had one serious oversight:
    PQescapeLiteral() and PQescapeIdentifier() failed to honor
    their string length parameter, instead always reading to the
    input string's trailing null. This resulted in including
    unwanted text in the output, if the caller intended to
    truncate the string via the length parameter. With very bad
    luck it could cause a crash due to reading off the end of
    memory.
    In addition, modify all these quoting functions so that when
    invalid encoding is detected, an invalid sequence is
    substituted for just the first byte of the presumed
    character, not all of it. This reduces the risk of problems
    if a calling application performs additional processing on
    the quoted string.
  * Fix small memory leak in pg_createsubscriber.
  * https://www.postgresql.org/docs/release/13.20/
  * https://www.postgresql.org/about/news/p-3018/

OBS-URL: https://build.opensuse.org/request/show/1247461
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=35
2025-02-20 18:46:48 +00:00
377d923e40 - Upgrade to 13.20:
* Improve behavior of libpq's quoting functions:
    The changes made for CVE-2025-1094 had one serious oversight:
    PQescapeLiteral() and PQescapeIdentifier() failed to honor
    their string length parameter, instead always reading to the
    input string's trailing null. This resulted in including
    unwanted text in the output, if the caller intended to
    truncate the string via the length parameter. With very bad
    luck it could cause a crash due to reading off the end of
    memory.
    In addition, modify all these quoting functions so that when
    invalid encoding is detected, an invalid sequence is
    substituted for just the first byte of the presumed
    character, not all of it. This reduces the risk of problems
    if a calling application performs additional processing on
    the quoted string.
  * Fix small memory leak in pg_createsubscriber.
  * https://www.postgresql.org/docs/release/13.20/
  * https://www.postgresql.org/about/news/p-3018/

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=102
2025-02-20 16:34:04 +00:00
496a4fcd5a Accepting request 1245712 from server:database:postgresql
- Upgrade to 13.19:
  * bsc#1237093, CVE-2025-1094: Harden PQescapeString and allied
    functions against invalidly-encoded input strings.
  * obsoletes postgresql-tzdata2025a.patch
  * https://www.postgresql.org/docs/release/13.19/
  * https://www.postgresql.org/about/news/-3015/
- Disable LLVM JIT on loongarch64

OBS-URL: https://build.opensuse.org/request/show/1245712
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=34
2025-02-13 17:40:26 +00:00
a440b64193 - Upgrade to 13.19:
* bsc#1237093, CVE-2025-1094: Harden PQescapeString and allied
    functions against invalidly-encoded input strings.
  * obsoletes postgresql-tzdata2025a.patch
  * https://www.postgresql.org/docs/release/13.19/
  * https://www.postgresql.org/about/news/-3015/
- Disable LLVM JIT on loongarch64

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=100
2025-02-13 14:50:48 +00:00
2452335da7 Accepting request 1240824 from server:database:postgresql
- Fix build, add postgresql-tzdata2025a.patch

OBS-URL: https://build.opensuse.org/request/show/1240824
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=33
2025-01-28 16:09:52 +00:00
ca9790eaaf OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=98 2025-01-28 12:53:33 +00:00
79b1cbc06b - Fix build, add postgresql-tzdata2025a.patch
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=97
2025-01-28 12:35:17 +00:00
d152e245f4 Accepting request 1225752 from server:database:postgresql
- Upgrade to 13.18:
  * Restore functionality of ALTER {ROLE|DATABASE} SET role.
  * Fix cases where a logical replication slot's restart_lsn could
    go backwards.
  * Count index scans in contrib/bloom indexes in the statistics
    views, such as the pg_stat_user_indexes.idx_scan counter.
  * Fix crash when checking to see if an index's opclass options
    have changed.
  * https://www.postgresql.org/about/news/p-2965/
  * https://www.postgresql.org/docs/release/13.18/

OBS-URL: https://build.opensuse.org/request/show/1225752
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=32
2024-11-22 22:51:57 +00:00
4d1e55ad06 - Upgrade to 13.18:
* Restore functionality of ALTER {ROLE|DATABASE} SET role.
  * Fix cases where a logical replication slot's restart_lsn could
    go backwards.
  * Count index scans in contrib/bloom indexes in the statistics
    views, such as the pg_stat_user_indexes.idx_scan counter.
  * Fix crash when checking to see if an index's opclass options
    have changed.
  * https://www.postgresql.org/about/news/p-2965/
  * https://www.postgresql.org/docs/release/13.18/

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=95
2024-11-21 17:45:12 +00:00
0c6f59b3d7 Accepting request 1224295 from server:database:postgresql
- Upgrade to 13.17:
  * CVE-2024-10976, bsc#1233323: Ensure cached plans are marked as
    dependent on the calling role when RLS applies to a
    non-top-level table reference.
  * CVE-2024-10977, bsc#1233325: Make libpq discard error messages
    received during SSL or GSS protocol negotiation.
  * CVE-2024-10978, bsc#1233326: Fix unintended interactions
    between SET SESSION AUTHORIZATION and SET ROLE
  * CVE-2024-10979, bsc#1233327: Prevent trusted PL/Perl code from
    changing environment variables.
  * https://www.postgresql.org/about/news/p-2955/
  * https://www.postgresql.org/docs/release/13.17/

- Sync spec file from postgresql17.

  * https://www.postgresql.org/about/news/p-2910/

OBS-URL: https://build.opensuse.org/request/show/1224295
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=31
2024-11-15 14:43:21 +00:00
64b67acc52 - Upgrade to 13.17:
* CVE-2024-10976, bsc#1233323: Ensure cached plans are marked as
    dependent on the calling role when RLS applies to a
    non-top-level table reference.
  * CVE-2024-10977, bsc#1233325: Make libpq discard error messages
    received during SSL or GSS protocol negotiation.
  * CVE-2024-10978, bsc#1233326: Fix unintended interactions
    between SET SESSION AUTHORIZATION and SET ROLE
  * CVE-2024-10979, bsc#1233327: Prevent trusted PL/Perl code from
    changing environment variables.
  * https://www.postgresql.org/about/news/p-2955/
  * https://www.postgresql.org/docs/release/13.17/
  * https://www.postgresql.org/about/news/p-2910/

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=93
2024-11-14 14:16:21 +00:00
88a326ba0c - Pull upstream patch to fix tests with timezone 2024b
* postgresql-testsuite-timezone-fix.patch

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=92
2024-11-05 14:00:46 +00:00
b88c2d48dd OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=91 2024-09-26 14:38:02 +00:00
39367c5e9b Accepting request 1201984 from server:database:postgresql
- Upgrade to 13.16 (bsc#1229013):
  * bsc#1229013, CVE-2024-7348 PostgreSQL relation replacement
    during pg_dump executes arbitrary SQL
  * https://www.postgresql.org/about/news/postgresql-164-158-1413-1316-1220-and-17-beta-3-released-2910/
  * https://www.postgresql.org/docs/release/13.16/

OBS-URL: https://build.opensuse.org/request/show/1201984
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql13?expand=0&rev=30
2024-09-19 19:17:55 +00:00
456e89ad3c https://www.postgresql.org/about/news/postgresql-164-158-1413-1316-1220-and-17-beta-3-released-2910/
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=89
2024-08-10 14:37:23 +00:00
8 changed files with 319 additions and 64 deletions

41
llvm-21-aarch64.patch Normal file
View File

@@ -0,0 +1,41 @@
From 0dceba21d74f01e63aa690879b44808bbb74a9c3 Mon Sep 17 00:00:00 2001
From: Thomas Munro <tmunro@postgresql.org>
Date: Sat, 22 Nov 2025 20:51:16 +1300
Subject: [PATCH] jit: Adjust AArch64-only code for LLVM 21.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
LLVM 21 changed the arguments of RTDyldObjectLinkingLayer's
constructor, breaking compilation with the backported
SectionMemoryManager from commit 9044fc1d.
https://github.com/llvm/llvm-project/commit/cd585864c0bbbd74ed2a2b1ccc191eed4d1c8f90
Backpatch-through: 14
Author: Holger Hoffstätte <holger@applied-asynchrony.com>
Reviewed-by: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Discussion: https://postgr.es/m/d25e6e4a-d1b4-84d3-2f8a-6c45b975f53d%40applied-asynchrony.com
---
src/backend/jit/llvm/llvmjit_wrap.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/backend/jit/llvm/llvmjit_wrap.cpp b/src/backend/jit/llvm/llvmjit_wrap.cpp
index da850d67ab647..c31a57b8563e8 100644
--- a/src/backend/jit/llvm/llvmjit_wrap.cpp
+++ b/src/backend/jit/llvm/llvmjit_wrap.cpp
@@ -53,7 +53,14 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(llvm::orc::ObjectLayer, LLVMOrcObjectLayerRef
LLVMOrcObjectLayerRef
LLVMOrcCreateRTDyldObjectLinkingLayerWithSafeSectionMemoryManager(LLVMOrcExecutionSessionRef ES)
{
+#if LLVM_VERSION_MAJOR >= 21
+ return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
+ *unwrap(ES), [](const llvm::MemoryBuffer&) {
+ return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true);
+ }));
+#else
return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
*unwrap(ES), [] { return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true); }));
+#endif
}
#endif

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42edd415446d33b8c242be76d1ad057531b2264b2e86939339b7075c6e4ec925
size 21597871

View File

@@ -1 +0,0 @@
42edd415446d33b8c242be76d1ad057531b2264b2e86939339b7075c6e4ec925 postgresql-13.15.tar.bz2

3
postgresql-13.23.tar.bz2 Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6
size 21767253

View File

@@ -0,0 +1 @@
6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6 postgresql-13.23.tar.bz2

View File

@@ -1,3 +1,153 @@
-------------------------------------------------------------------
Fri Dec 12 08:14:22 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Fix build on aarch64 with upstream commit 0dceba2:
* llvm-21-aarch64.patch
-------------------------------------------------------------------
Mon Nov 24 16:50:08 UTC 2025 - Reinhard Max <max@suse.com>
- Fix build with uring for post SLE15 code streams.
-------------------------------------------------------------------
Fri Nov 14 14:46:57 UTC 2025 - Reinhard Max <max@suse.com>
- Use %product_libs_llvm_ver to determine the LLVM version.
- Remove conditionals for obsolete PostgreSQL releases.
-------------------------------------------------------------------
Wed Nov 12 15:37:00 UTC 2025 - Reinhard Max <max@suse.com>
- Upgrade to 13.23:
* https://www.postgresql.org/about/news/p-3171/
* https://www.postgresql.org/docs/release/13.23/
* bsc#1253332, CVE-2025-12817: Missing check for CREATE
privileges on the schema in CREATE STATISTICS allowed table
owners to create statistics in any schema, potentially leading
to unexpected naming conflicts.
* bsc#1253333, CVE-2025-12818: Several places in libpq were not
sufficiently careful about computing the required size of a
memory allocation. Sufficiently large inputs could cause
integer overflow, resulting in an undersized buffer, which
would then lead to writing past the end of the buffer.
-------------------------------------------------------------------
Thu Sep 25 14:14:21 UTC 2025 - Reinhard Max <max@suse.com>
- Sync spec file from version 18
-------------------------------------------------------------------
Thu Aug 14 19:55:18 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- Upgrade to 13.22:
* https://www.postgresql.org/about/news/postgresql-176-1610-1514-1419-1322-and-18-beta-3-released-3118/
* https://www.postgresql.org/docs/release/13.22/
Security Issues
* CVE-2025-8713: PostgreSQL optimizer statistics can expose
sampled data within a view, partition, or child table
(boo#1248120)
* CVE-2025-8714: PostgreSQL pg_dump lets superuser of origin
server execute arbitrary code in psql client (boo#1248122)
* CVE-2025-8715: PostgreSQL pg_dump newline in object name
executes arbitrary code in psql client and in restore target
server (boo#1248119)
-------------------------------------------------------------------
Fri May 9 12:01:03 UTC 2025 - Reinhard Max <max@suse.com>
- Upgrade to 13.21:
* bsc#1242931, CVE-2025-4207: postgresql: PostgreSQL GB18030
encoding validation can read one byte past end of allocation
for text that fails validation.
* https://www.postgresql.org/docs/release/13.21/
* https://www.postgresql.org/about/news/p-3072/
- Add postresql-pg_config_paths.patch to fix a race condition
while generating pg_config_paths.h.
-------------------------------------------------------------------
Tue Feb 18 11:36:44 UTC 2025 - Reinhard Max <max@suse.com>
- Upgrade to 13.20:
* Improve behavior of libpq's quoting functions:
The changes made for CVE-2025-1094 had one serious oversight:
PQescapeLiteral() and PQescapeIdentifier() failed to honor
their string length parameter, instead always reading to the
input string's trailing null. This resulted in including
unwanted text in the output, if the caller intended to
truncate the string via the length parameter. With very bad
luck it could cause a crash due to reading off the end of
memory.
In addition, modify all these quoting functions so that when
invalid encoding is detected, an invalid sequence is
substituted for just the first byte of the presumed
character, not all of it. This reduces the risk of problems
if a calling application performs additional processing on
the quoted string.
* Fix small memory leak in pg_createsubscriber.
* https://www.postgresql.org/docs/release/13.20/
* https://www.postgresql.org/about/news/p-3018/
-------------------------------------------------------------------
Tue Feb 11 14:27:58 UTC 2025 - Reinhard Max <max@suse.com>
- Upgrade to 13.19:
* bsc#1237093, CVE-2025-1094: Harden PQescapeString and allied
functions against invalidly-encoded input strings.
* obsoletes postgresql-tzdata2025a.patch
* https://www.postgresql.org/docs/release/13.19/
* https://www.postgresql.org/about/news/-3015/
- Disable LLVM JIT on loongarch64
-------------------------------------------------------------------
Tue Jan 28 12:23:29 UTC 2025 - Reinhard Max <max@suse.com>
- Fix build, add postgresql-tzdata2025a.patch
-------------------------------------------------------------------
Tue Nov 19 14:17:26 UTC 2024 - Reinhard Max <max@suse.com>
- Upgrade to 13.18:
* Restore functionality of ALTER {ROLE|DATABASE} SET role.
* Fix cases where a logical replication slot's restart_lsn could
go backwards.
* Count index scans in contrib/bloom indexes in the statistics
views, such as the pg_stat_user_indexes.idx_scan counter.
* Fix crash when checking to see if an index's opclass options
have changed.
* https://www.postgresql.org/about/news/p-2965/
* https://www.postgresql.org/docs/release/13.18/
-------------------------------------------------------------------
Wed Nov 13 13:30:13 UTC 2024 - Reinhard Max <max@suse.com>
- Upgrade to 13.17:
* CVE-2024-10976, bsc#1233323: Ensure cached plans are marked as
dependent on the calling role when RLS applies to a
non-top-level table reference.
* CVE-2024-10977, bsc#1233325: Make libpq discard error messages
received during SSL or GSS protocol negotiation.
* CVE-2024-10978, bsc#1233326: Fix unintended interactions
between SET SESSION AUTHORIZATION and SET ROLE
* CVE-2024-10979, bsc#1233327: Prevent trusted PL/Perl code from
changing environment variables.
* https://www.postgresql.org/about/news/p-2955/
* https://www.postgresql.org/docs/release/13.17/
-------------------------------------------------------------------
Tue Nov 5 14:00:20 UTC 2024 - Reinhard Max <max@suse.com>
- Sync spec file from postgresql17.
-------------------------------------------------------------------
Sat Aug 10 14:13:54 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Upgrade to 13.16 (bsc#1229013):
* bsc#1229013, CVE-2024-7348 PostgreSQL relation replacement
during pg_dump executes arbitrary SQL
* https://www.postgresql.org/about/news/p-2910/
* https://www.postgresql.org/docs/release/13.16/
-------------------------------------------------------------------
Wed May 8 14:10:27 UTC 2024 - Reinhard Max <max@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package postgresql13
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,11 +16,8 @@
#
%define pgversion 13.15
%define pgmajor 13
%define buildlibs 0
%define tarversion %{pgversion}
%define latest_supported_llvm_ver 17
%define pgminor 23
### CUT HERE ###
%define pgname postgresql%pgmajor
@@ -38,12 +35,23 @@
%define pgextensiondir %pgdatadir/extension
%define pgcontribdir %pgdatadir/contrib
%define pgmandir %_mandir
%define pgversion %{pgmajor}.%{pgminor}
%define tarversion %{pgversion}%{?prerelease}
%if %pgmajor == 18 || ( %pgmajor == 17 && 0%{?sle_version} == 120200 )
# We still build the libs for PG 17 on SLE-12-SP2, because
# newer PG versions will only be released for SP5.
%define buildlibs 1
%else
%define buildlibs 0
%endif
%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")
%if "@BUILD_FLAVOR@" == "mini"
%define devel devel-mini
%define mini 1
%define buildlibs 1
Name: %pgname-mini
%else
%define devel devel
@@ -51,20 +59,29 @@ Name: %pgname-mini
Name: %pgname
%endif
# Use Python 2 for for PostgreSQL 10 on SLE12.
# Use Python 3 for everything else.
%if 0%{?is_opensuse} || 0%{?sle_version} >= 150000 || %pgmajor > 10
# Use Python 3 for everything.
%define python python3
%else
%define python python
%endif
%if %pgmajor >= 17
%bcond_with dreived
%bcond_with derived
%else
%bcond_without derived
%endif
%if %pgmajor >= 18 && 0%{?suse_version} >= 1500
%bcond_without curl
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1600
%bcond_without uring
%else
%bcond_with uring
%endif
%bcond_without numa
%else
%bcond_with curl
%bcond_with uring
%bcond_with numa
%endif
%if 0%{?suse_version} >= 1500
%bcond_without liblz4
%endif
@@ -73,6 +90,12 @@ Name: %pgname
%bcond_without libzstd
%endif
%if %{without derived}
BuildRequires: bison
BuildRequires: docbook-xsl-stylesheets
BuildRequires: flex
BuildRequires: perl
%endif
%if %mini
%bcond_with selinux
%if %pgmajor >= 16
@@ -94,12 +117,6 @@ BuildRequires: zlib-devel
%if %{with liblz4}
BuildRequires: pkgconfig(liblz4)
%endif
%if %{without derived}
BuildRequires: bison
BuildRequires: docbook-xsl-stylesheets
BuildRequires: flex
BuildRequires: perl
%endif
%if %{with libzstd}
BuildRequires: pkgconfig(libzstd)
@@ -112,11 +129,12 @@ BuildRequires: %libecpg
BuildRequires: %libpq
%endif
%if 0%{?suse_version} >= 1500 && %pgmajor >= 11
%ifarch riscv64
%if 0%{?suse_version} >= 1500
%ifarch riscv64 loongarch64
%bcond_with llvm
%else
%bcond_without llvm
%{!?product_libs_llvm_ver: %global product_libs_llvm_ver 15}
%endif
%else
%bcond_with llvm
@@ -129,12 +147,6 @@ BuildRequires: %libpq
%bcond_with check
%endif
%if %pgmajor >= 11 || %mini
%bcond_without server_devel
%else
%bcond_with server_devel
%endif
BuildRequires: fdupes
%if %{with icu}
BuildRequires: libicu-devel
@@ -143,21 +155,34 @@ BuildRequires: libicu-devel
BuildRequires: libselinux-devel
%endif
%if %{with llvm}
BuildRequires: clang%{product_libs_llvm_ver}
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
BuildRequires: llvm%{product_libs_llvm_ver}-devel
%endif
BuildRequires: libxslt-devel
BuildRequires: openldap2-devel
BuildRequires: openssl-devel
BuildRequires: pkg-config
%if 0%{?suse_version} >= 1500
BuildRequires: openssl-devel
BuildRequires: (pkgconfig(ldap) or openldap2-devel)
%else
%if 0%{?sle_version} >= 120400
BuildRequires: libopenssl-1_1-devel
%else
BuildRequires: openssl-devel
%endif
BuildRequires: openldap2-devel
%endif
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(libsystemd)
%if %{with curl}
BuildRequires: pkgconfig(libcurl)
%endif
%if %{with uring}
BuildRequires: pkgconfig(liburing)
%endif
%if %{with numa}
BuildRequires: pkgconfig(numa)
%endif
BuildRequires: pkgconfig(systemd)
#!BuildIgnore: %pgname
#!BuildIgnore: %pgname-server
@@ -185,6 +210,7 @@ Source1: https://ftp.postgresql.org/pub/source/v%{tarversion}/postgresql-
Source2: baselibs.conf
Source17: postgresql-rpmlintrc
Patch1: postgresql-conf.patch
Patch2: postresql-pg_config_paths.patch
# PL/Perl needs to be linked with rpath (bsc#578053)
Patch4: postgresql-plperl-keep-rpath.patch
Patch8: postgresql-testsuite-keep-results-file.patch
@@ -192,6 +218,8 @@ Patch9: postgresql-var-run-socket.patch
%if %{with llvm}
Patch10: postgresql-llvm-optional.patch
Patch11: 0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch
# PATCH-FIX-UPSTREAM - commit 0dceba2
Patch12: llvm-21-aarch64.patch
%endif
URL: https://www.postgresql.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -279,13 +307,9 @@ Requires: postgresql-devel-noarch >= %pgmajor
Provides: postgresql-devel-exclusive = %pgmajor
Conflicts: postgresql-devel-exclusive < %pgmajor
%if %{with server_devel}
%package server-devel
Summary: PostgreSQL server development header files and utilities
Group: Development/Libraries/C and C++
%else
Provides: %pgname-server-devel = %version-%release
%endif
Provides: postgresql-server-devel = %version-%release
Provides: postgresql-server-devel-implementation = %version-%release
Requires(post): postgresql-server-devel-noarch >= %pgmajor
@@ -304,11 +328,13 @@ Requires: pkgconfig(krb5)
%if %{with selinux}
Requires: libselinux-devel
%endif
%if %{with numa}
Requires: pkgconfig(numa)
%endif
%if %{with llvm}
Recommends: %pgname-llvmjit-devel = %version-%release
%endif
%if %{with server_devel}
%description server-devel
PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
@@ -318,7 +344,6 @@ types and functions.
This package contains the header files and libraries needed to compile
C extensions that link into the PostgreSQL server. For building client
applications, see the postgresql%pgmajor-devel package.
%endif
%description -n %pgname-%devel
PostgreSQL is an advanced object-relational database management system
@@ -520,12 +545,14 @@ included in the postgresql-server package.
# confuse PostgreSQL's build system
touch -r configure tmp
%patch -P 1
%patch -P 2
%patch -P 4
%patch -P 8
%patch -P 9
%if %{with llvm}
%patch -P 10
%patch -P 11
%patch -P 12 -p1
%endif
touch -r tmp configure
rm tmp
@@ -558,6 +585,15 @@ PACKAGE_TARNAME=%pgname %configure \
--with-uuid=e2fs \
--with-libxml \
--with-libxslt \
%if %{with curl}
--with-libcurl \
%endif
%if %{with uring}
--with-liburing \
%endif
%if %{with numa}
--with-libnuma \
%endif
%if %{with liblz4}
--with-lz4 \
%endif
@@ -610,6 +646,7 @@ VLANG=%pgmajor
make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/include install
make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname -C src/interfaces install
rm -rf %buildroot%pgincludedir/server
rm -rf %buildroot%pgdatadir
%else
make DESTDIR=%buildroot PACKAGE_TARNAME=%pgname install install-docs
%if 0
@@ -638,9 +675,8 @@ ls %buildroot%pglibdir/lib* |
mv %buildroot%pglibdir/pkgconfig %buildroot%_libdir
find %buildroot%_libdir/pkgconfig -type f -exec sed -i 's, -L%pglibdir,,' '{}' +
# Don't ship static libraries,
# libpgport.a and libpgcommon.a are needed, though.
rm -f $(ls %buildroot/%_libdir/*.a %buildroot%pglibdir/*.a | grep -F -v -e libpgport.a -e libpgcommon.a)
# Don't ship static libraries, some of then are needed, though.
rm -f $(ls %buildroot/%_libdir/*.a %buildroot%pglibdir/*.a | grep -F -v -e libpgport.a -e libpgcommon.a -e libpgfeutils.a)
%if !%mini
#
@@ -759,7 +795,7 @@ sed -i '/^LIBS = /s/= .*/=/' %buildroot/%pglibdir/pgxs/src/Makefile.global
# Make sure we can also link agaist newer versions
pushd %buildroot%_libdir
for f in *.so; do
for f in $( find -type l -name \*.so ) ; do
ln -sf $f.? $f
done
%if 0
@@ -772,8 +808,6 @@ done
%endif
popd
mkdir -p %buildroot%pgmandir/man1
cp -a doc/src/sgml/man1/ecpg.1 %buildroot%pgmandir/man1/ecpg.1pg%pgmajor
%find_lang ecpg-$VLANG devel.files
# The devel subpackage is exclusive across versions
# and not handled by update-alternatives.
@@ -784,17 +818,15 @@ mv %buildroot%pgbindir/ecpg %buildroot%_bindir/ecpg
ln -s %pgbindir/pg_config %buildroot%_bindir/pg_config
%endif
%if %{without server_devel}
cat server-devel.files >> devel.files
%endif
# Build up the file lists for the libpq and libecpg packages
cat > libpq.files <<EOF
%defattr(-,root,root)
%if !%mini
%dir %pgdatadir
%pgdatadir/pg_service.conf.sample
%endif
EOF
find %buildroot -name 'libpq*.so.*' -printf '/%%P\n' >> libpq.files
find %buildroot \( -name 'libpq*.so.*' -o -name 'libpq-oauth*.so' \) -printf '/%%P\n' >> libpq.files
%find_lang libpq5-$VLANG libpq.files
cat > libecpg.files <<EOF
@@ -816,13 +848,11 @@ awk -v P=%buildroot '/^(%lang|[^%])/{print P $NF}' libpq.files libecpg.files | x
%postun -n %pgname-%devel
/sbin/ldconfig
%if %{with server_devel}
%post server-devel
/usr/share/postgresql/install-alternatives %pgmajor
%postun server-devel
/usr/share/postgresql/install-alternatives %pgmajor
%endif
%if !%mini
@@ -976,17 +1006,16 @@ fi
%dir %pgbindir
%_bindir/ecpg
%_libdir/pkgconfig/*
%_libdir/lib*.so
%_libdir/libecpg.so
%_libdir/libecpg_compat.so
%_libdir/libpgtypes.so
%_libdir/libpq.so
%pgincludedir
%if %{with server_devel}
%exclude %pgincludedir/server
%endif
%doc %pgmandir/man1/ecpg.1*
%if !%mini
%if %{with server_devel}
%doc %pgmandir/man1/ecpg.1*
%files server-devel -f server-devel.files
%endif
%defattr(-,root,root)
%ghost %_bindir/pg_config
%pgbindir/pg_config

View File

@@ -0,0 +1,35 @@
--- src/port/Makefile.orig
+++ src/port/Makefile
@@ -145,18 +145,20 @@ path_srv.o: path.c pg_config_paths.h
# because many of these values come from makefiles and are not
# available to configure.
pg_config_paths.h: $(top_builddir)/src/Makefile.global
- echo "#define PGBINDIR \"$(bindir)\"" >$@
- echo "#define PGSHAREDIR \"$(datadir)\"" >>$@
- echo "#define SYSCONFDIR \"$(sysconfdir)\"" >>$@
- echo "#define INCLUDEDIR \"$(includedir)\"" >>$@
- echo "#define PKGINCLUDEDIR \"$(pkgincludedir)\"" >>$@
- echo "#define INCLUDEDIRSERVER \"$(includedir_server)\"" >>$@
- echo "#define LIBDIR \"$(libdir)\"" >>$@
- echo "#define PKGLIBDIR \"$(pkglibdir)\"" >>$@
- echo "#define LOCALEDIR \"$(localedir)\"" >>$@
- echo "#define DOCDIR \"$(docdir)\"" >>$@
- echo "#define HTMLDIR \"$(htmldir)\"" >>$@
- echo "#define MANDIR \"$(mandir)\"" >>$@
+ T=`mktemp -p .`; \
+ echo "#define PGBINDIR \"$(bindir)\"" >>$$T; \
+ echo "#define PGSHAREDIR \"$(datadir)\"" >>$$T; \
+ echo "#define SYSCONFDIR \"$(sysconfdir)\"" >>$$T; \
+ echo "#define INCLUDEDIR \"$(includedir)\"" >>$$T; \
+ echo "#define PKGINCLUDEDIR \"$(pkgincludedir)\"" >>$$T; \
+ echo "#define INCLUDEDIRSERVER \"$(includedir_server)\"" >>$$T; \
+ echo "#define LIBDIR \"$(libdir)\"" >>$$T; \
+ echo "#define PKGLIBDIR \"$(pkglibdir)\"" >>$$T; \
+ echo "#define LOCALEDIR \"$(localedir)\"" >>$$T; \
+ echo "#define DOCDIR \"$(docdir)\"" >>$$T; \
+ echo "#define HTMLDIR \"$(htmldir)\"" >>$$T; \
+ echo "#define MANDIR \"$(mandir)\"" >>$$T; \
+ mv $$T $@
clean distclean maintainer-clean:
rm -f libpgport.a libpgport_shlib.a libpgport_srv.a