diff mbox series

[meta-oe] postgresql: upgrade 16.8 -> 17.4

Message ID 20250227011625.1260215-1-changqing.li@windriver.com
State Accepted
Headers show
Series [meta-oe] postgresql: upgrade 16.8 -> 17.4 | expand

Commit Message

Changqing Li Feb. 27, 2025, 1:16 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

This is a major version upgrade, see release note:
https://www.postgresql.org/docs/release/

* Refresh patches:
0003-configure.ac-bypass-autoconf-2.69-version-check.patch
0005-postgresql-fix-ptest-failure-of-sysviews.patch
* Removed dropped option --enable-thread-safety
* Add depends for bison-native
* Fix do_packge_qa error:
  *.c *.h generated by bison or flex leave full paths in comment,
rewrite those before *-src packaging

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 ...ac-bypass-autoconf-2.69-version-check.patch | 12 ++++++------
 ...tgresql-fix-ptest-failure-of-sysviews.patch | 18 +++++++++---------
 meta-oe/recipes-dbs/postgresql/postgresql.inc  |  9 +++++++--
 .../{postgresql_16.8.bb => postgresql_17.4.bb} |  2 +-
 4 files changed, 23 insertions(+), 18 deletions(-)
 rename meta-oe/recipes-dbs/postgresql/{postgresql_16.8.bb => postgresql_17.4.bb} (87%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch b/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch
index 9584cfcb16..92ac335a7b 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch
@@ -1,7 +1,7 @@ 
-From 30b1b37d309f67ba6d58f2197bd917107bc7d56c Mon Sep 17 00:00:00 2001
+From 5ce7d8398f6aff41eee8c8c80eeaad2fcb3da1fc Mon Sep 17 00:00:00 2001
 From: Yi Fan Yu <yifan.yu@windriver.com>
 Date: Fri, 5 Feb 2021 17:15:42 -0500
-Subject: [PATCH 3/5] configure.ac: bypass autoconf 2.69 version check
+Subject: [PATCH] configure.ac: bypass autoconf 2.69 version check
 
 for upgrade to autoconf 2.71
 
@@ -13,20 +13,20 @@  Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
  1 file changed, 4 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index df61ab4..b795f8c 100644
+index a8a61c5..27c2760 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
  
- AC_INIT([PostgreSQL], [16.8], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
+ AC_INIT([PostgreSQL], [17.4], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
  
 -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
 -Untested combinations of 'autoconf' and PostgreSQL versions are not
 -recommended.  You can remove the check from 'configure.ac' but it is then
 -your responsibility whether the result works or not.])])
- AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group])
+ AC_COPYRIGHT([Copyright (c) 1996-2024, PostgreSQL Global Development Group])
  AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
  AC_CONFIG_AUX_DIR(config)
 -- 
-2.40.0
+2.34.1
 
diff --git a/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch
index af36da4927..8219fc80e9 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch
@@ -1,7 +1,7 @@ 
-From 1a8b94140988d2ee5ff987b0bb3e7c3e936b8c01 Mon Sep 17 00:00:00 2001
+From d1fb37569b5a8c21968f69164e8bc6e4bb0185eb Mon Sep 17 00:00:00 2001
 From: Manoj Saun <manojsingh.saun@windriver.com>
 Date: Wed, 22 Mar 2023 08:07:26 +0000
-Subject: [PATCH 5/5] postgresql: fix ptest failure of sysviews
+Subject: [PATCH] postgresql: fix ptest failure of sysviews
 
 The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info
 in pg_config table which reduces the count of rows from pg_config and leads to
@@ -19,12 +19,12 @@  Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com>
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out
-index 001c6e7..8256898 100644
+index 2176a54..a84bc27 100644
 --- a/src/test/regress/expected/sysviews.out
 +++ b/src/test/regress/expected/sysviews.out
-@@ -29,7 +29,7 @@ select name, ident, parent, level, total_bytes >= free_bytes
- (1 row)
+@@ -52,7 +52,7 @@ from pg_backend_memory_contexts where name = 'Caller tuples';
  
+ rollback;
  -- At introduction, pg_config had 23 entries; it may grow
 -select count(*) > 20 as ok from pg_config;
 +select count(*) > 13 as ok from pg_config;
@@ -32,11 +32,11 @@  index 001c6e7..8256898 100644
  ----
   t
 diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql
-index 351e469..84c113e 100644
+index b047fb5..d1e3999 100644
 --- a/src/test/regress/sql/sysviews.sql
 +++ b/src/test/regress/sql/sysviews.sql
-@@ -18,7 +18,7 @@ select name, ident, parent, level, total_bytes >= free_bytes
-   from pg_backend_memory_contexts where level = 0;
+@@ -33,7 +33,7 @@ from pg_backend_memory_contexts where name = 'Caller tuples';
+ rollback;
  
  -- At introduction, pg_config had 23 entries; it may grow
 -select count(*) > 20 as ok from pg_config;
@@ -45,5 +45,5 @@  index 351e469..84c113e 100644
  -- We expect no cursors in this test; see also portals.sql
  select count(*) = 0 as ok from pg_cursors;
 -- 
-2.25.1
+2.34.1
 
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc
index e19f2f48e2..7bbcaca443 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -19,7 +19,7 @@  DESCRIPTION = "\
 "
 HOMEPAGE = "http://www.postgresql.com"
 LICENSE = "0BSD"
-DEPENDS = "libnsl2 tzcode-native perl"
+DEPENDS = "libnsl2 tzcode-native perl bison-native"
 
 ARM_INSTRUCTION_SET = "arm"
 
@@ -73,7 +73,7 @@  PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl
 PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu"
 PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
 
-EXTRA_OECONF += "--enable-thread-safety --disable-rpath \
+EXTRA_OECONF += "--disable-rpath \
     --datadir=${datadir}/${BPN} \
     --sysconfdir=${sysconfdir}/${BPN} \
 "
@@ -175,6 +175,11 @@  do_configure() {
 
 do_compile:append() {
     oe_runmake -C contrib all
+
+    for f in `find ${B} -name "*.[c|h]"`;
+    do
+        sed -i -e 's,${B}/../,,' $f
+    done
 }
 
 # server needs to configure user and group
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_16.8.bb b/meta-oe/recipes-dbs/postgresql/postgresql_17.4.bb
similarity index 87%
rename from meta-oe/recipes-dbs/postgresql/postgresql_16.8.bb
rename to meta-oe/recipes-dbs/postgresql/postgresql_17.4.bb
index 0843d90750..b1c95ed244 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql_16.8.bb
+++ b/meta-oe/recipes-dbs/postgresql/postgresql_17.4.bb
@@ -12,6 +12,6 @@  SRC_URI += "\
    file://0001-tcl.m4-Recognize-tclsh9.patch \
 "
 
-SRC_URI[sha256sum] = "9468083a56ce0ee7d294601b74dad3dd9fc69d87aff61f0a9fb63c813ff7efd8"
+SRC_URI[sha256sum] = "c4605b73fea11963406699f949b966e5d173a7ee0ccaef8938dec0ca8a995fe7"
 
 CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it."