summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-dbs/postgresql
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-dbs/postgresql
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-dbs/postgresql')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch41
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch39
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch46
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch25
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init4
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc27
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb10
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb12
8 files changed, 132 insertions, 72 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
new file mode 100644
index 00000000..865ad328
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
@@ -0,0 +1,41 @@
+From b06a228a5fd1589fc9bed654b3288b321fc21aa1 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 3fe29ce..7cd578f 100644
+--- a/src/include/storage/s_lock.h
++++ b/src/include/storage/s_lock.h
+@@ -316,11 +316,12 @@ tas(volatile slock_t *lock)
+
+ /*
+ * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available.
++ * On RISC-V, the same.
+ *
+ * We use the int-width variant of the builtin because it works on more chips
+ * than other widths.
+ */
+-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64)
++#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv)
+ #ifdef HAVE_GCC__SYNC_INT32_TAS
+ #define HAS_TEST_AND_SET
+
+@@ -337,7 +338,7 @@ tas(volatile slock_t *lock)
+ #define S_UNLOCK(lock) __sync_lock_release(lock)
+
+ #endif /* HAVE_GCC__SYNC_INT32_TAS */
+-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */
++#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
+
+
+ /* S/390 and S/390x Linux (32- and 64-bit zSeries) */
+--
+2.9.3
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
new file mode 100644
index 00000000..32b7f428
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
@@ -0,0 +1,39 @@
+From 3c13315447fa175da6c9ebe59a039e611cdb5bd1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 4 Jun 2019 13:45:30 +0800
+Subject: [PATCH] Improve reproducibility,
+
+Remove build patch from binaries which pg_config do
+not record var-CC, var-CFLAGS, and configure
+
+$ /usr/bin/pg_config --cc
+not recorded
+
+$ /usr/bin/pg_config --configure
+not recorded
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/common/Makefile | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/common/Makefile b/src/common/Makefile
+index 1fc2c66..5e6c457 100644
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -27,10 +27,6 @@ include $(top_builddir)/src/Makefile.global
+ # don't include subdirectory-path-dependent -I and -L switches
+ STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
+ STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
+-override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
+-override CPPFLAGS += -DVAL_CC="\"$(CC)\""
+-override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
+-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
+ override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
+ override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
+ override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
deleted file mode 100644
index f14da06d..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d3ee8c8df5808b63e86f40831f2ba62cbb33d291 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Wed, 8 Aug 2018 09:18:27 +0800
-Subject: [PATCH] postgresql: Use pkg-config for libxml2 detection.
-
-Upstream-Status: Inappropriate [configuration]
-
-xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
-
-Signed-off-by: Philip Balister <philip@balister.org>
-
-upate to version 10.4
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- configure.in | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index d9fe56e..3e2cd3a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -816,19 +816,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
- [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
-
- if test "$with_libxml" = yes ; then
-- PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
-- if test -n "$XML2_CONFIG"; then
-- for pgac_option in `$XML2_CONFIG --cflags`; do
-- case $pgac_option in
-- -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
-- esac
-- done
-- for pgac_option in `$XML2_CONFIG --libs`; do
-- case $pgac_option in
-- -L*) LDFLAGS="$LDFLAGS $pgac_option";;
-- esac
-- done
-- fi
-+ CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
-+ LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
- fi
-
- AC_SUBST(with_libxml)
---
-2.7.4
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
index 97151094..22b62d9d 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
@@ -1,4 +1,7 @@
-[PATCH] not check libperl under cross compiling
+From 7e2af4de19be58bc9d551c41ce2750396d357f34 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] PATCH] not check libperl under cross compiling
Upstream-Status: Inappropriate [configuration]
@@ -6,23 +9,29 @@ libperl ldflags returned by PGAC_CHECK_PERL_EMBED_LDFLAGS are native,
can not be used to check target library.
postpresql has the dependency on perl, so not need to check libperl
-again, like in postgresql-9.2.4
+again, like in postgresql-9.2.4
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.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: postgresql-9.4.15/configure.in
-===================================================================
---- postgresql-9.4.15.orig/configure.in
-+++ postgresql-9.4.15/configure.in
-@@ -1879,7 +1879,7 @@ if test "$with_tcl" = yes; then
+diff --git a/configure.in b/configure.in
+index b98b9bb..8584677 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2211,7 +2211,7 @@ Use --without-tcl to disable building PL/Tcl.])
fi
# check for <perl.h>
-if test "$with_perl" = yes; then
+if test "$with_perl" = yes && test "$cross_compiling" = no; then
ac_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
+ CPPFLAGS="$CPPFLAGS $perl_includespec"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
index 4a4f0cd1..1791e68b 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
@@ -14,8 +14,8 @@
# PGVERSION is the full package version, e.g., 8.4.0
# Note: the specfile inserts the correct value during package build
PGVERSION=9.2.4
-# PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
-PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
+# PGMAJORVERSION is major version, e.g., 10 (this should match PG_VERSION)
+PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\).*$/\1/'`
# Source function library.
. /etc/init.d/functions
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
index dc852245..5b20098a 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -18,7 +18,7 @@ DESCRIPTION = "\
this package if you're installing the postgresql-server package. \
"
HOMEPAGE = "http://www.postgresql.com"
-LICENSE = "BSD"
+LICENSE = "BSD-0-Clause"
DEPENDS = "libnsl2 zlib readline tzcode-native"
ARM_INSTRUCTION_SET = "arm"
@@ -29,7 +29,6 @@ SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \
file://postgresql.pam \
file://postgresql-setup \
file://postgresql.service \
- file://0001-Use-pkg-config-for-libxml2-detection.patch \
"
LEAD_SONAME = "libpq.so"
@@ -37,7 +36,7 @@ LEAD_SONAME = "libpq.so"
# LDFLAGS for shared libraries
export LDFLAGS_SL = "${LDFLAGS}"
-inherit autotools pkgconfig perlnative pythonnative useradd update-rc.d systemd gettext
+inherit autotools pkgconfig perlnative python3native useradd update-rc.d systemd gettext cpan-base
CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6"
@@ -58,7 +57,7 @@ enable_pam = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
PACKAGECONFIG ??= "${enable_pam} openssl python uuid libxml tcl nls libxml perl"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
-PACKAGECONFIG[python] = "--with-python,--without-python,python,python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python3,python3"
PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux,"
PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native,"
PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,,"
@@ -72,6 +71,16 @@ EXTRA_OECONF += "--enable-thread-safety --disable-rpath \
EXTRA_OECONF_sh4 += "--disable-spinlocks"
EXTRA_OECONF_aarch64 += "--disable-spinlocks"
+DEBUG_OPTIMIZATION_remove_mips = " -Og"
+DEBUG_OPTIMIZATION_append_mips = " -O"
+BUILD_OPTIMIZATION_remove_mips = " -Og"
+BUILD_OPTIMIZATION_append_mips = " -O"
+
+DEBUG_OPTIMIZATION_remove_mipsel = " -Og"
+DEBUG_OPTIMIZATION_append_mipsel = " -O"
+BUILD_OPTIMIZATION_remove_mipsel = " -Og"
+BUILD_OPTIMIZATION_append_mipsel = " -O"
+
PACKAGES_DYNAMIC += "^${PN}-plperl \
^${PN}-pltcl \
^${PN}-plpython \
@@ -106,6 +115,10 @@ python populate_packages_prepend() {
}
+# This will make native perl use target settings (for include dirs etc.)
+export PERLCONFIGTARGET = "${@is_target(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}"
+
do_configure() {
# do_configure
autotools_do_configure
@@ -119,7 +132,7 @@ do_configure() {
BLIBNA="\${STAGING_BASE_LIBDIR_NATIVE}"
sed -i -e "/^perl_archlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
${B}/src/Makefile.global
- sed -i -e "/^perl_privlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
+ sed -i -e "/^perl_privlibexp/s:${libdir}:${STAGING_LIBDIR}:g" \
${B}/src/Makefile.global
# remove the rpath, replace with correct lib path
sed -i \
@@ -266,7 +279,9 @@ FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \
${datadir}/${BPN}/timezonesets \
"
RDEPENDS_${PN} += "${PN}-timezone"
-FILES_${PN}-server-dev = "${includedir}/${BPN}/server"
+FILES_${PN}-server-dev = "${includedir}/${BPN}/server \
+ ${libdir}/${BPN}/pgxs \
+"
FILES_libecpg = "${libdir}/libecpg*${SOLIBS}"
FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb
deleted file mode 100644
index 8be794c3..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require postgresql.inc
-
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=87da2b84884860b71f5f24ab37e7da78"
-
-SRC_URI += "\
- file://not-check-libperl.patch \
-"
-
-SRC_URI[md5sum] = "3dac8187636fa8237802bef85be78023"
-SRC_URI[sha256sum] = "ad4f9b8575f98ed6091bf9bb2cb16f0e52795a5f66546c1f499ca5c69b21f253"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb
new file mode 100644
index 00000000..cc7e3ff5
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb
@@ -0,0 +1,12 @@
+require postgresql.inc
+
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc4ce21960f0c561460d750bc270d11f"
+
+SRC_URI += "\
+ file://not-check-libperl.patch \
+ file://0001-Add-support-for-RISC-V.patch \
+ file://0001-Improve-reproducibility.patch \
+"
+
+SRC_URI[md5sum] = "a30c023dd7088e44d73be71af2ef404a"
+SRC_URI[sha256sum] = "94ed64a6179048190695c86ec707cc25d016056ce10fc9d229267d9a8f1dcf41"