aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/postgresql')
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch10
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch6
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch117
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch6
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch47
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch10
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch38
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql.inc10
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql_14.11.bb18
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql_14.3.bb13
10 files changed, 204 insertions, 71 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
index 90b7419495..46343674fc 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
@@ -1,16 +1,17 @@
-From 780fd27ea6f7f2c446c46a7a5e26d94106c67efd Mon Sep 17 00:00:00 2001
+From 0801befde991250b4502954fdec61bec8c33da3b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 20 Nov 2016 15:04:52 +0000
Subject: [PATCH] Add support for RISC-V.
The architecture is sufficiently similar to aarch64 that simply
extending the existing aarch64 macro works.
+
---
src/include/storage/s_lock.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
-index dccbd29..ad60429 100644
+index 95049f0..e08c963 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -317,11 +317,12 @@ tas(volatile slock_t *lock)
@@ -35,7 +36,4 @@ index dccbd29..ad60429 100644
+#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
- /*
---
-2.34.1
-
+ /* S/390 and S/390x Linux (32- and 64-bit zSeries) */
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
index 02f4c9e513..eeffe6bcb1 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
@@ -1,4 +1,4 @@
-From bbba8a5261a99e79c9cd4693ef56021014a9856b Mon Sep 17 00:00:00 2001
+From e167d58d6be1b1ee4d49571650444700ab97ed7c Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Mon, 28 Dec 2020 16:38:21 +0800
Subject: [PATCH] Improve reproducibility,
@@ -18,6 +18,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
update patch for v13.1
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
---
src/common/Makefile | 3 ---
1 file changed, 3 deletions(-)
@@ -36,6 +37,3 @@ index 880722f..7a9b9d4 100644
override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
---
-2.34.1
-
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch b/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch
new file mode 100644
index 0000000000..eff69140f7
--- /dev/null
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch
@@ -0,0 +1,117 @@
+From 805f03529c7fc33685979651562112bab524e5a5 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 1 Aug 2022 15:44:38 +0800
+Subject: [PATCH] config_info.c: not expose build info
+
+Don't collect the build information to fix the buildpaths issue.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
+---
+ configure.ac | 2 +-
+ src/common/config_info.c | 70 +---------------------------------------
+ 2 files changed, 2 insertions(+), 70 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 54a539e..c6edc0a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2021, PostgreSQL Global Development Group])
+ AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+ AC_CONFIG_AUX_DIR(config)
+ AC_PREFIX_DEFAULT(/usr/local/pgsql)
+-AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure])
++AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["ac_configure_args"], [Saved arguments from configure])
+
+ [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
+ [PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`]
+diff --git a/src/common/config_info.c b/src/common/config_info.c
+index e72e729..a020236 100644
+--- a/src/common/config_info.c
++++ b/src/common/config_info.c
+@@ -38,7 +38,7 @@ get_configdata(const char *my_exec_path, size_t *configdata_len)
+ int i = 0;
+
+ /* Adjust this to match the number of items filled below */
+- *configdata_len = 23;
++ *configdata_len = 14;
+ configdata = (ConfigData *) palloc(*configdata_len * sizeof(ConfigData));
+
+ configdata[i].name = pstrdup("BINDIR");
+@@ -123,74 +123,6 @@ get_configdata(const char *my_exec_path, size_t *configdata_len)
+ configdata[i].setting = pstrdup(path);
+ i++;
+
+- configdata[i].name = pstrdup("CONFIGURE");
+- configdata[i].setting = pstrdup(CONFIGURE_ARGS);
+- i++;
+-
+- configdata[i].name = pstrdup("CC");
+-#ifdef VAL_CC
+- configdata[i].setting = pstrdup(VAL_CC);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("CPPFLAGS");
+-#ifdef VAL_CPPFLAGS
+- configdata[i].setting = pstrdup(VAL_CPPFLAGS);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("CFLAGS");
+-#ifdef VAL_CFLAGS
+- configdata[i].setting = pstrdup(VAL_CFLAGS);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("CFLAGS_SL");
+-#ifdef VAL_CFLAGS_SL
+- configdata[i].setting = pstrdup(VAL_CFLAGS_SL);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("LDFLAGS");
+-#ifdef VAL_LDFLAGS
+- configdata[i].setting = pstrdup(VAL_LDFLAGS);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("LDFLAGS_EX");
+-#ifdef VAL_LDFLAGS_EX
+- configdata[i].setting = pstrdup(VAL_LDFLAGS_EX);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("LDFLAGS_SL");
+-#ifdef VAL_LDFLAGS_SL
+- configdata[i].setting = pstrdup(VAL_LDFLAGS_SL);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+- configdata[i].name = pstrdup("LIBS");
+-#ifdef VAL_LIBS
+- configdata[i].setting = pstrdup(VAL_LIBS);
+-#else
+- configdata[i].setting = pstrdup(_("not recorded"));
+-#endif
+- i++;
+-
+ configdata[i].name = pstrdup("VERSION");
+ configdata[i].setting = pstrdup("PostgreSQL " PG_VERSION);
+ i++;
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch b/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch
index 78f24585e8..807eac219b 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch
@@ -1,4 +1,4 @@
-From f7084ba49758a6b8db46b917b7c0f831bd65a08f Mon Sep 17 00:00:00 2001
+From c48f2f132744a0b4a2473ec178d63c1d4d1a4a86 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] configure.ac: bypass autoconf 2.69 version check
@@ -14,12 +14,12 @@ Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
1 file changed, 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index d3c55f2..9120184 100644
+index e59dc99..41b4732 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
- AC_INIT([PostgreSQL], [14.3], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
+ AC_INIT([PostgreSQL], [14.11], [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
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
new file mode 100644
index 0000000000..555fd7f1fc
--- /dev/null
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
@@ -0,0 +1,47 @@
+From 5a17b7b88776cbbe5b37838baff71726b8a6e7dd 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] 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
+sysviews test failure.
+To fix it we need to reduce the count of parameters in sysviews test.
+Also we need to reduce the row count in expected result of sysview test
+to make the test output shown as pass.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com>
+
+---
+ src/test/regress/expected/sysviews.out | 2 +-
+ src/test/regress/sql/sysviews.sql | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out
+index 2088857..96a15cc 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)
+
+ -- 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;
+ ok
+ ----
+ t
+diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql
+index b24816e..72ff887 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;
+
+ -- 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;
+
+ -- We expect no cursors in this test; see also portals.sql
+ select count(*) = 0 as ok from pg_cursors;
diff --git a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
index fa46912eef..b742bd53bd 100644
--- a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
@@ -1,4 +1,4 @@
-From 56b830edecff1cac5f8a8a956e7a7eeef2aa7c17 Mon Sep 17 00:00:00 2001
+From 09fad1883f3312965a8d066f8477166eaa4db2c7 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 27 Nov 2018 13:25:15 +0800
Subject: [PATCH] not check libperl under cross compiling
@@ -15,15 +15,16 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
update patch to version 11.1
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index fba79ee..7170f26 100644
+index 159f2a2..d0f0b14 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -2261,7 +2261,7 @@ Use --without-tcl to disable building PL/Tcl.])
+@@ -2332,7 +2332,7 @@ Use --without-tcl to disable building PL/Tcl.])
fi
# check for <perl.h>
@@ -32,6 +33,3 @@ index fba79ee..7170f26 100644
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $perl_includespec"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
---
-2.34.1
-
diff --git a/meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch b/meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch
deleted file mode 100644
index 92a3dcc710..0000000000
--- a/meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Remove duplicate code for riscv
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/src/include/storage/s_lock.h
-+++ b/src/include/storage/s_lock.h
-@@ -341,30 +341,6 @@ tas(volatile slock_t *lock)
- #endif /* HAVE_GCC__SYNC_INT32_TAS */
- #endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
-
--
--/*
-- * RISC-V likewise uses __sync_lock_test_and_set(int *, int) if available.
-- */
--#if defined(__riscv)
--#ifdef HAVE_GCC__SYNC_INT32_TAS
--#define HAS_TEST_AND_SET
--
--#define TAS(lock) tas(lock)
--
--typedef int slock_t;
--
--static __inline__ int
--tas(volatile slock_t *lock)
--{
-- return __sync_lock_test_and_set(lock, 1);
--}
--
--#define S_UNLOCK(lock) __sync_lock_release(lock)
--
--#endif /* HAVE_GCC__SYNC_INT32_TAS */
--#endif /* __riscv */
--
--
- /* S/390 and S/390x Linux (32- and 64-bit zSeries) */
- #if defined(__s390__) || defined(__s390x__)
- #define HAS_TEST_AND_SET
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc
index 00c0107469..60d44ce979 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -205,7 +205,7 @@ do_install:append() {
# multiple server config directory
install -d -m 700 ${D}${sysconfdir}/default/${BPN}
- if [ "${@d.getVar('enable_pam')}" = "pam" ]; then
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/pam.d
install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql
fi
@@ -215,6 +215,14 @@ do_install:append() {
install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' \
${D}${systemd_unitdir}/system/postgresql.service
+ # Remove the build path
+ if [ -f ${D}${libdir}/${BPN}/pgxs/src/Makefile.global ]; then
+ sed -i -e 's#${RECIPE_SYSROOT}##g' \
+ -e 's#${RECIPE_SYSROOT_NATIVE}##g' \
+ -e 's#${WORKDIR}##g' \
+ -e 's#${TMPDIR}##g' \
+ ${D}${libdir}/${BPN}/pgxs/src/Makefile.global
+ fi
}
SSTATE_SCAN_FILES += "Makefile.global"
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_14.11.bb b/meta-oe/recipes-dbs/postgresql/postgresql_14.11.bb
new file mode 100644
index 0000000000..8a8c3b9f1e
--- /dev/null
+++ b/meta-oe/recipes-dbs/postgresql/postgresql_14.11.bb
@@ -0,0 +1,18 @@
+require postgresql.inc
+
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=89afbb2d7716371015101c2b2cb4297a"
+
+SRC_URI += "\
+ file://not-check-libperl.patch \
+ file://0001-Add-support-for-RISC-V.patch \
+ file://0001-Improve-reproducibility.patch \
+ file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \
+ file://0001-config_info.c-not-expose-build-info.patch \
+ file://0001-postgresql-fix-ptest-failure-of-sysviews.patch \
+"
+
+SRC_URI[sha256sum] = "a670bd7dce22dcad4297b261136b3b1d4a09a6f541719562aa14ca63bf2968a8"
+
+CVE_CHECK_IGNORE += "\
+ CVE-2017-8806 \
+"
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_14.3.bb b/meta-oe/recipes-dbs/postgresql/postgresql_14.3.bb
deleted file mode 100644
index c686c9b358..0000000000
--- a/meta-oe/recipes-dbs/postgresql/postgresql_14.3.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require postgresql.inc
-
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=75af6e3eeec4a06cdd2e578673236fc3"
-
-SRC_URI += "\
- file://not-check-libperl.patch \
- file://0001-Add-support-for-RISC-V.patch \
- file://0001-Improve-reproducibility.patch \
- file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \
- file://remove_duplicate.patch \
-"
-
-SRC_URI[sha256sum] = "279057368bf59a919c05ada8f95c5e04abb43e74b9a2a69c3d46a20e07a9af38"