diff options
Diffstat (limited to 'meta-oe/recipes-dbs')
70 files changed, 1742 insertions, 956 deletions
diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch b/meta-oe/recipes-dbs/influxdb/influxdb/0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch new file mode 100644 index 0000000000..e31c7be1ec --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb/0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch @@ -0,0 +1,39 @@ +From 4ca405e9763fd0ba747ef00edd30648b66992fbb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 30 Nov 2021 15:14:39 -0800 +Subject: [PATCH] Use v2.1.2 xxhash to fix build with go 1.17 + +Fixes +| # github.com/cespare/xxhash +| asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access and is used here: 000 +92 (/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/influxdb/1.8.10-r0/build/pkg/mod/github.com/cespare/xxhash@ +v1.1.0/xxhash_amd64.s:120) ADDQ R15, AX +| asm: assembly failed + +Upstream-Status: Backport [https://github.com/cespare/xxhash/commit/e7a6b52374f7e2abfb8abb27249d53a1997b09a7] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + go.mod | 3 ++- + go.sum | 2 ++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +--- a/go.mod ++++ b/go.mod +@@ -55,3 +55,5 @@ require ( + gonum.org/v1/gonum v0.6.0 // indirect + google.golang.org/grpc v1.26.0 + ) ++ ++replace github.com/cespare/xxhash => github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 +--- a/go.sum ++++ b/go.sum +@@ -188,6 +188,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dA + github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= + github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= + github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= ++github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 h1:hCQ0jTkNInQ7PpNeGlSV9s+QMi6nUyyMuz37Bg3TduE= ++github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= + github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= + github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= + github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch b/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch index 6e87b9d91e..b05fd3666b 100644 --- a/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch +++ b/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch @@ -3,7 +3,7 @@ From: Khem Raj <raj.khem@gmail.com> Date: Mon, 11 Jan 2021 15:16:57 -0800 Subject: [PATCH] patch term module for mips ispeed/ospeed termios absense -Upstream-Status: OE-Specific [needed on mips] +Upstream-Status: Inappropriate [OE-Specific needed on mips] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- @@ -12,20 +12,20 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> --- a/go.mod +++ b/go.mod -@@ -54,3 +54,5 @@ require ( - gonum.org/v1/gonum v0.6.0 // indirect +@@ -56,4 +56,5 @@ require ( google.golang.org/grpc v1.26.0 ) -+ + +replace github.com/pkg/term => github.com/kraj/term v0.0.0-20210111231523-7c42fcb0e627 + replace github.com/cespare/xxhash => github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 --- a/go.sum +++ b/go.sum -@@ -215,6 +215,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dA +@@ -188,6 +188,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dA github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kraj/term v0.0.0-20210111231523-7c42fcb0e627 h1:3/XXm86KqrOZEJvEmFlzl3NTFA99n5Pd/cSXl60LmuA= +github.com/kraj/term v0.0.0-20210111231523-7c42fcb0e627/go.mod h1:BYR4E+NOQrH+NhXE71KuBNmyR1lQ+yDvP+O3IIHO5bM= + github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 h1:hCQ0jTkNInQ7PpNeGlSV9s+QMi6nUyyMuz37Bg3TduE= + github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= - github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= - github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= diff --git a/meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb b/meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb deleted file mode 100644 index 06f7947642..0000000000 --- a/meta-oe/recipes-dbs/influxdb/influxdb_1.7.10.bb +++ /dev/null @@ -1,65 +0,0 @@ -DESCRIPTION = "InfluxDB is a time series database designed to handle high write and query loads." -HOMEPAGE = "https://www.influxdata.com/products/influxdb-overview/" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=ba8146ad9cc2a128209983265136e06a" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -RDEPENDS_${PN} = "bash" -RDEPENDS_${PN}-dev = "bash" - -GO_IMPORT = "github.com/influxdata/influxdb" - -GO_INSTALL = "\ - ${GO_IMPORT}/cmd/influx \ - ${GO_IMPORT}/cmd/influxd \ -" - -SRC_URI = "\ - git://${GO_IMPORT};protocol=https;branch=1.7;destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \ - file://influxdb \ - file://influxdb.conf \ -" - -SRC_URI_append_mipsarch = " file://0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch;patchdir=src/${GO_IMPORT}" - -SRCREV = "c958f436b2e538a88a7815aad721c7774a0b8f63" - -inherit go-mod systemd update-rc.d useradd - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb" - -do_install_prepend() { - rm ${B}/src/${GO_IMPORT}/build.py - rm ${B}/src/${GO_IMPORT}/build.sh - rm ${B}/src/${GO_IMPORT}/Dockerfile* -} - -do_install_append() { - install -d ${D}${sysconfdir}/influxdb - install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb - chown -R root.influxdb ${D}${sysconfdir}/influxdb - - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb - - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then - install -d ${D}${sysconfdir}/logrotate.d - install -m 0644 ${S}/src/${GO_IMPORT}/scripts/logrotate ${D}${sysconfdir}/logrotate.d/influxdb - fi - - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service - fi - - # TODO chown -} - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME = "influxdb" -INITSCRIPT_PARAMS = "defaults" - -SYSTEMD_SERVICE_${PN} = "influxdb.service" diff --git a/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb new file mode 100644 index 0000000000..cc8161cc3d --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb @@ -0,0 +1,79 @@ +DESCRIPTION = "InfluxDB is a time series database designed to handle high write and query loads." +HOMEPAGE = "https://www.influxdata.com/products/influxdb-overview/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=f39a8d10930fb37bd59adabb3b9d0bd6" + +RDEPENDS:${PN} = "bash" +RDEPENDS:${PN}-dev = "bash" + +GO_IMPORT = "github.com/influxdata/influxdb" + +GO_INSTALL = "\ + ${GO_IMPORT}/cmd/influx \ + ${GO_IMPORT}/cmd/influxd \ +" + +SRC_URI = "\ + git://${GO_IMPORT};protocol=https;branch=1.8;destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \ + file://0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch;patchdir=src/${GO_IMPORT} \ + file://influxdb \ + file://influxdb.conf \ +" + +SRC_URI:append:mipsarch = " file://0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch;patchdir=src/${GO_IMPORT}" + +SRCREV = "688e697c51fd5353725da078555adbeff0363d01" + +inherit go-mod pkgconfig systemd update-rc.d useradd + +export GOPROXY = "https://proxy.golang.org,direct" + +# Workaround for network access issue during compile step +# this needs to be fixed in the recipes buildsystem to move +# this such that it can be accomplished during do_fetch task +do_compile[network] = "1" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb" + +do_install:prepend() { + test -e ${B}/src/${GO_IMPORT}/build.py && rm ${B}/src/${GO_IMPORT}/build.py + test -e ${B}/src/${GO_IMPORT}/build.sh && rm ${B}/src/${GO_IMPORT}/build.sh + rm -rf ${B}/src/${GO_IMPORT}/Dockerfile* + + sed -i -e "s#usr/bin/sh#bin/sh#g" ${B}/src/${GO_IMPORT}/scripts/ci/run_perftest.sh +} + +do_install:append() { + install -d ${D}${sysconfdir}/influxdb + install -m 0644 ${UNPACKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb + chown -R root:influxdb ${D}${sysconfdir}/influxdb + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb + + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then + install -d ${D}${sysconfdir}/logrotate.d + install -m 0644 ${S}/src/${GO_IMPORT}/scripts/logrotate ${D}${sysconfdir}/logrotate.d/influxdb + fi + + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service + install -d ${D}${libdir}/influxdb/scripts + install -m 0755 ${S}/src/${GO_IMPORT}/scripts/influxd-systemd-start.sh ${D}${libdir}/influxdb/scripts/influxd-systemd-start.sh + fi + + # TODO chown +} + +FILES:${PN} += "${libdir}/influxdb/scripts/influxd-systemd-start.sh" + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME = "influxdb" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_SERVICE:${PN} = "influxdb.service" + +CVE_STATUS[CVE-2019-10329] = "cpe-incorrect: Version does not match and only the Jenkins plugin is affected." diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch new file mode 100644 index 0000000000..b0bfb8bf16 --- /dev/null +++ b/meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch @@ -0,0 +1,55 @@ +From 77da477840f89da7ced29da315de77571e8f190e Mon Sep 17 00:00:00 2001 +From: Martin Jansa <martin.jansa@gmail.com> +Date: Fri, 20 Oct 2023 22:57:48 +0200 +Subject: [PATCH] CMakeLists.txt: fix googletest related options + +* https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html + says that CMake options are case-sensitive and I don't see lower-case version in + currently used googletest submodules and gtest is indeed installed with leveldb + +* install_gmock option I don't see at all, so I've kept it as is, INSTALL_GTEST, BUILD_GMOCK + do exist as upper-case + +$ grep -Ri install_.*mock . +./CMakeLists.txt: set(install_gmock OFF) +./third_party/googletest/googlemock/CMakeLists.txt:install_project(gmock gmock_main) +$ grep -Ri build_gmock . +./CMakeLists.txt: set(BUILD_GMOCK ON) +./third_party/googletest/googletest/README.md:cmake .. -DBUILD_GMOCK=OFF +./third_party/googletest/CMakeLists.txt:option(BUILD_GMOCK "Builds the googlemock subproject" ON) +./third_party/googletest/CMakeLists.txt:if(BUILD_GMOCK) +$ grep -Ri install_gtest . +./CMakeLists.txt: set(INSTALL_GTEST OFF) +./third_party/googletest/googletest/cmake/internal_utils.cmake: if(INSTALL_GTEST) +./third_party/googletest/googletest/CMakeLists.txt:if (INSTALL_GTEST) +./third_party/googletest/CMakeLists.txt:option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) + +* also use CACHE and FORCE as sugested in: + https://cmake.org/cmake/help/latest/command/set.html + https://stackoverflow.com/questions/20239334/cmake-set-subdirectory-options + for the value to correctly propagate into third_party/googletest subdirectory + +Signed-off-by: Martin Jansa <martin.jansa@gmail.com> +--- +Upstream-Status: Submitted [https://github.com/google/leveldb/pull/1152] + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fda9e01..f8a2629 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -295,9 +295,9 @@ if(LEVELDB_BUILD_TESTS) + + # Prevent overriding the parent project's compiler/linker settings on Windows. + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- set(install_gtest OFF) +- set(install_gmock OFF) +- set(build_gmock ON) ++ set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) ++ set(install_gmock OFF CACHE BOOL "" FORCE) ++ set(BUILD_GMOCK ON CACHE BOOL "" FORCE) + + # This project is tested using GoogleTest. + add_subdirectory("third_party/googletest") diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch new file mode 100644 index 0000000000..b9f45e773d --- /dev/null +++ b/meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch @@ -0,0 +1,43 @@ +From 1ccdb7513a7a0f24b8ce3b6766e52e690874bc64 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 17 Oct 2023 19:08:12 -0700 +Subject: [PATCH] Fix printing 64-bit integer types + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + db/db_impl.cc | 5 +++-- + db/version_edit.h | 1 + + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/db/db_impl.cc ++++ b/db/db_impl.cc +@@ -5,6 +5,7 @@ + #include "db/db_impl.h" + + #include <algorithm> ++#include <cinttypes> + #include <atomic> + #include <cstdint> + #include <cstdio> +@@ -520,8 +521,8 @@ Status DBImpl::WriteLevel0Table(MemTable + mutex_.Lock(); + } + +- Log(options_.info_log, "Level-0 table #%llu: %lld bytes %s", +- (unsigned long long)meta.number, (unsigned long long)meta.file_size, ++ Log(options_.info_log, "Level-0 table #%" PRIu64 " : %" PRIu64 " bytes %s", ++ meta.number, meta.file_size, + s.ToString().c_str()); + delete iter; + pending_outputs_.erase(meta.number); +--- a/db/version_edit.h ++++ b/db/version_edit.h +@@ -5,6 +5,7 @@ + #ifndef STORAGE_LEVELDB_DB_VERSION_EDIT_H_ + #define STORAGE_LEVELDB_DB_VERSION_EDIT_H_ + ++#include <cstdint> + #include <set> + #include <utility> + #include <vector> diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb b/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb index b597ef1ea8..60b486df78 100644 --- a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb +++ b/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb @@ -4,14 +4,16 @@ HOMEPAGE = "https://github.com/google/leveldb" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" -SRC_URI = "git://github.com/google/${BPN}.git \ - file://run-ptest" +SRC_URI = "gitsm://github.com/google/${BPN}.git;branch=main;protocol=https \ + file://0001-CMakeLists.txt-fix-googletest-related-options.patch \ + file://0001-Fix-printing-64-bit-integer-types.patch \ + file://run-ptest \ +" -SRCREV = "78b39d68c15ba020c0d60a3906fb66dbf1697595" +SRCREV = "068d5ee1a3ac40dabd00d211d5013af44be55bea" S = "${WORKDIR}/git" inherit cmake ptest - PACKAGECONFIG ??= "" PACKAGECONFIG[benchmarks] = "-DLEVELDB_BUILD_BENCHMARKS=ON,-DLEVELDB_BUILD_BENCHMARKS=OFF,sqlite" PACKAGECONFIG[snappy] = ",,snappy" @@ -20,7 +22,7 @@ PACKAGECONFIG[tcmalloc] = ",,gperftools" EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \ -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)}" -do_install_append() { +do_install:append() { install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil } @@ -30,4 +32,4 @@ do_install_ptest() { # Do not try to build lib32-leveldb for mips64, but allow libn32-leveldb. # -COMPATIBLE_HOST_mipsarcho32_pn-lib32-leveldb = "null" +COMPATIBLE_HOST:mipsarcho32:pn-lib32-leveldb = "null" diff --git a/meta-oe/recipes-dbs/libdbi/libdbi.inc b/meta-oe/recipes-dbs/libdbi/libdbi.inc index cea2838e36..0aba91b5db 100644 --- a/meta-oe/recipes-dbs/libdbi/libdbi.inc +++ b/meta-oe/recipes-dbs/libdbi/libdbi.inc @@ -4,7 +4,7 @@ DESCRIPTION = "Database Independent Abstraction Layer for C" HOMEPAGE = "http://libdbi.sourceforge.net/" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" SECTION = "libs" diff --git a/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb b/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb index 24eae28501..7322916499 100644 --- a/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb +++ b/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb @@ -1,6 +1,5 @@ require ${PN}.inc -PR = "${INC_PR}.0" SRC_URI[md5sum] = "05e2ceeac4bc85fbe40de8b4b22d9ab3" SRC_URI[sha256sum] = "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503" diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch new file mode 100644 index 0000000000..3017bcede1 --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch @@ -0,0 +1,35 @@ +From 4a11d4d03ef66729d302cc122fa0c693299a7776 Mon Sep 17 00:00:00 2001 +From: Sakib Sajal <sakib.sajal@windriver.com> +Date: Wed, 18 Aug 2021 10:49:38 -0400 +Subject: [PATCH] Makefile: use libprefix instead of libdir + +libdir expands to "$(exec_prefix)/lib" where "lib" is hardcoded. +This is a problem for builds that enable MULTILIB since libraries +are to be installed in "lib64" directory. Hence allow the directory +to be configurable. + +Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> +--- +Upstream-Status: Pending + + libraries/liblmdb/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index f254511..1ec74e6 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,11 +46,11 @@ all: $(ILIBS) $(PROGS) + + install: $(ILIBS) $(IPROGS) $(IHDRS) + mkdir -p $(DESTDIR)$(bindir) +- mkdir -p $(DESTDIR)$(libdir) ++ mkdir -p $(DESTDIR)$(libprefix) + mkdir -p $(DESTDIR)$(includedir) + mkdir -p $(DESTDIR)$(mandir)/man1 + for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done +- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done ++ for f in $(ILIBS); do cp $$f $(DESTDIR)$(libprefix); done + for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done + for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done + diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch b/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch new file mode 100644 index 0000000000..3dde46573f --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch @@ -0,0 +1,24 @@ +From b4d418bf3f78748d84e3cfb110833443eef34284 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@cold-front.org> +Date: Thu, 25 Aug 2022 17:22:20 -0400 +Subject: [PATCH] make: set soname on liblmdb + +--- +Upstream-Status: Pending + + libraries/liblmdb/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile +index 1ec74e6..ea08cd6 100644 +--- a/libraries/liblmdb/Makefile ++++ b/libraries/liblmdb/Makefile +@@ -66,7 +66,7 @@ liblmdb.a: mdb.o midl.o + + liblmdb$(SOEXT): mdb.lo midl.lo + # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) +- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) ++ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS) + + mdb_stat: mdb_stat.o liblmdb.a + mdb_copy: mdb_copy.o liblmdb.a diff --git a/meta-oe/recipes-dbs/lmdb/files/run-ptest b/meta-oe/recipes-dbs/lmdb/files/run-ptest new file mode 100644 index 0000000000..a6a7549b9e --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/run-ptest @@ -0,0 +1,25 @@ +#!/bin/sh + +cd tests + +retval=0 +for t in mtest* +do + mkdir testdb + ./$t > /dev/null && ./mdb_stat testdb > /dev/null + if [ $? -ne 0 ]; then + echo "FAIL: $t" + retval=$(( ${retval} + 1)) + else + echo "PASS: $t" + fi + rm -rf testdb +done + +if [ $retval -eq 0 ] ; then + echo "PASS: lmdb" +else + echo "FAIL: lmdb" +fi + +exit $retval
\ No newline at end of file diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb new file mode 100644 index 0000000000..b2f1920f6b --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org> +# SPDX-FileCopyrightText: 2019 Hannah Kiekens <hannahkiekens@gmail.com> +# +# SPDX-License-Identifier: MIT + +SUMMARY = "Lightning Memory-Mapped Database (LMDB)" +HOMEPAGE = "https://symas.com/lightning-memory-mapped-database/" +LICENSE = "OLDAP-2.8" +LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972" + +SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1;protocol=https \ + file://run-ptest \ + file://0001-Makefile-use-libprefix-instead-of-libdir.patch \ + file://0001-make-set-soname-on-liblmdb.patch;patchdir=../.. \ + " + +SRCREV = "ce201088de95d26fc0da36ba805bf2ddc2ba74ff" + +inherit ptest + +S = "${WORKDIR}/git/libraries/liblmdb" + +do_compile() { + oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" XCFLAGS="${CFLAGS}" +} + +do_install() { + oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" XCFLAGS="${CFLAGS}" install + cd ${D}${libdir} + ln -s liblmdb.so.${PV} liblmdb.so + rm liblmdb.a +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + for test in mtest mtest2 mtest3 mtest4 mtest5 mdb_stat; do + install -m 755 ${S}/$test ${D}${PTEST_PATH}/tests + done +} diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.8.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.9.bb index 73b2a0980d..578357b480 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.8.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.9.bb @@ -2,9 +2,11 @@ require mariadb.inc inherit native PROVIDES += "mysql5-native" -DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native" +DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native \ +gnutls-native fmt-native \ +" -RDEPENDS_${PN} = "" +RDEPENDS:${PN} = "" PACKAGES = "" EXTRA_OEMAKE = "" @@ -16,5 +18,6 @@ do_install() { install -m 0755 sql/gen_lex_token ${D}${bindir}/ install -m 0755 extra/comp_err ${D}${bindir}/ install -m 0755 scripts/comp_sql ${D}${bindir}/ + install -m 0755 strings/uca-dump ${D}${bindir}/ } diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 27eede6c30..ae6581ec71 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -1,77 +1,85 @@ SUMMARY = "A robust, scalable, and reliable SQL server" HOMEPAGE = "http://mariadb.org" SECTION = "libs" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b1becf0cfa3366e0f4d854d1d264f311" -SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz \ +SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://my.cnf \ file://mysqld.service \ file://install_db.service \ file://install_db \ file://mysql-systemd-start \ file://configure.cmake-fix-valgrind.patch \ - file://fix-a-building-failure.patch \ file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \ - file://sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ - file://0001-disable-ucontext-on-musl.patch \ - file://c11_atomics.patch \ - file://clang_version_header_conflict.patch \ file://fix-arm-atomic.patch \ file://0001-Fix-library-LZ4-lookup.patch \ file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ - file://0001-stacktrace-t.c-make-the-test-conditional.patch \ + file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \ + file://ssize_t.patch \ + file://mm_malloc.patch \ + file://sys_futex.patch \ + file://cross-compiling.patch \ + file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ + file://lfs64.patch \ + file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ " -SRC_URI[sha256sum] = "eb4824f6f2c532cd3fc6a6bce7bf78ea7c6b949f8bdd07656b2c84344e757be8" +SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" +SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20" -UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" - -S = "${WORKDIR}/mariadb-${PV}" +UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/tags" BINCONFIG_GLOB = "mysql_config" -inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script +inherit cmake gettext binconfig update-rc.d systemd multilib_script multilib_header pkgconfig MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ - ${PN}-server:${bindir}/mariadb-install-db" + ${PN}-setupdb:${bindir}/mariadb-install-db \ + libmysqlclient-dev:${bindir}/mysql_config \ + " INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb" -INITSCRIPT_NAME_${PN}-server = "mysqld" -INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." - -USERADD_PACKAGES = "${PN}-server" -USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" -GROUPADD_PARAM_${PN}-server = "--system mysql" +INITSCRIPT_NAME:${PN}-server = "mysqld" +INITSCRIPT_PARAMS:${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." -INITSCRIPT_NAME_${PN}-setupdb = "install_db" -INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44" +INITSCRIPT_NAME:${PN}-setupdb = "install_db" +INITSCRIPT_PARAMS:${PN}-setupdb ?= "defaults 44 44" SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb" -SYSTEMD_SERVICE_${PN}-server = "mysqld.service" -SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable" - -SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service" -SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable" -ALLOW_EMPTY_${PN}-setupdb ?= "1" -FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db" - +SYSTEMD_SERVICE:${PN}-server = "mysqld.service" +SYSTEMD_AUTO_ENABLE:${PN}-server ?= "disable" + +SYSTEMD_SERVICE:${PN}-setupdb = "install_db.service" +SYSTEMD_AUTO_ENABLE:${PN}-setupdb ?= "enable" +ALLOW_EMPTY:${PN}-setupdb ?= "1" +FILES:${PN}-setupdb = "${sysconfdir}/init.d/install_db \ + ${bindir}/mariadb-install-db \ + ${bindir}/my_print_defaults \ + ${bindir}/mysql_install_db \ + ${bindir}/mysql-systemd-start \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} lz4 openssl" EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" +PACKAGECONFIG:class-native = "" +PACKAGECONFIG[pam] = "-DPLUGIN_AUTH_PAM=YES,-DPLUGIN_AUTH_PAM=NO,libpam" PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" PACKAGECONFIG[krb5] = ", ,krb5" -PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb" -PACKAGECONFIG[zstd] = "-DWITH_ROCKSDB_ZSTD=ON,-DWITH_ROCKSDB_ZSTD=OFF,zstd" +PACKAGECONFIG[lz4] = ", ,lz4" +PACKAGECONFIG[openssl] = "-DWITH_SSL='system',-DWITH_SSL='bundled',openssl" # MariaDB doesn't link properly with gold # https://mariadb.atlassian.net/browse/MDEV-5982 TARGET_CFLAGS += "-fuse-ld=bfd" LDFLAGS += " -pthread" + BUILD_CFLAGS += "-fuse-ld=bfd" BUILD_CXXFLAGS += "-fuse-ld=bfd" +LDFLAGS:x86:toolchain-clang = "-latomic" +LDFLAGS:riscv32:toolchain-clang = "-latomic" + EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DWITH_JEMALLOC=no \ -DWITHOUT_TOKUDB=TRUE \ @@ -88,16 +96,24 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ -DMYSQL_DATADIR:PATH=/var/mysql \ -DCAT_EXECUTABLE=`which cat` \ + -DSTACK_DIRECTION=1 \ + -DHAVE_SYSTEM_LIBFMT_EXITCODE=0 \ -DCMAKE_AR:FILEPATH=${AR}" + # With Ninja it fails with: # make: *** No rule to make target `install'. Stop. OECMAKE_GENERATOR = "Unix Makefiles" -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" -do_configure_append() { +do_compile:prepend:class-target () { + # remove the buildpath + sed -i -e "s:CMAKE_SYSROOT:CMAKE_SYSROOT_PLACE_HOLDER:g" ${S}/libmariadb/mariadb_config/mariadb_config.c.in +} + +do_configure:append() { # handle distros with different values of ${libexecdir} libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'` sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh @@ -105,19 +121,19 @@ do_configure_append() { sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh } -do_generate_toolchain_file_append_class-native () { +do_generate_toolchain_file:append:class-native () { # If these are set cmake will assume we're cross-compiling, which will # result in certain things we want being disabled sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake } -do_compile_prepend_class-target () { + +do_compile:prepend:class-target () { # These need to be in-tree or make will think they need to be built, # and since we're cross-compiling that is disabled cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts - if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then if ! [ -e ${B}/include/openssl/kssl.h ] ; then mkdir -p ${B}/include/openssl @@ -127,11 +143,7 @@ do_compile_prepend_class-target () { echo "#endif" >>${B}/include/openssl/kssl.h fi fi - # workaround to handle out-of-source build from source package - yacc_files="sql_yacc.hh sql_yacc.cc sql_yacc_ora.hh sql_yacc_ora.cc" - for yacc_file in ${yacc_files}; do - cp ${S}/sql/${yacc_file} ${B}/sql/${yacc_file} - done + install -D ${RECIPE_SYSROOT_NATIVE}/usr/bin/uca-dump ${B}/strings/uca-dump } SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" @@ -148,29 +160,32 @@ mariadb_sysroot_preprocess () { do_install() { oe_runmake 'DESTDIR=${D}' install + oe_multilib_header mysql/mariadb_version.h mysql/server/my_config.h mysql/server/private/config.h install -d ${D}/${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/ - install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/ + install -m 0644 ${UNPACKDIR}/my.cnf ${D}/${sysconfdir}/ + install -m 0755 ${UNPACKDIR}/install_db ${D}/${sysconfdir}/init.d/ mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/mysqld.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/install_db.service ${D}${systemd_unitdir}/system sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \ ${D}${systemd_unitdir}/system/install_db.service - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "f /var/log/mysqld.err 0640 mysql mysql -" \ - > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf - fi install -d ${D}${bindir} - install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir} + install -m 755 ${UNPACKDIR}/mysql-systemd-start ${D}${bindir} install -d ${D}${datadir}/doc/${PN} if [ -f ${D}${datadir}/doc/README ]; then mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/ fi + + # mini-benchmark used for Gitlab-CI to run on every commit to catch + # if there are severe performance regressions. + # remove it to avoid introducing bash dependency + if [ -f ${D}${datadir}/mysql/mini-benchmark ]; then + rm -rf ${D}${datadir}/mysql/mini-benchmark + fi if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then pam_so=$(find ${D} -name pam_user_map.so) if [ x"${pam_so}" != x ]; then @@ -181,69 +196,80 @@ do_install() { fi } -PACKAGES = "${PN}-dbg ${PN} \ +PACKAGES = "${PN}-dbg ${PN}-setupdb ${PN} \ libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev \ libmysqlclient libmysqlclient-dev libmysqlclient-staticdev \ - libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers" -CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf" -CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf" -CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf" + libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-leftovers" +CONFFILES:${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf" +CONFFILES:${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf" +CONFFILES:libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf" -RPROVIDES_${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg" +RPROVIDES:${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg" -FILES_${PN} = " " -RDEPENDS_${PN} = "${PN}-client ${PN}-server" -ALLOW_EMPTY_${PN} = "1" +FILES:${PN} = " " +RDEPENDS:${PN} = "${PN}-client ${PN}-server" +ALLOW_EMPTY:${PN} = "1" -RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ +RDEPENDS:${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \ perl-module-exporter" -RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ +RDEPENDS:${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ perl-module-file-basename perl-module-file-path perl-module-sys-hostname \ perl-module-file-copy perl-module-file-temp perl-module-posix \ - ${PN}-client ${PN}-setupdb libdbi-perl libdbd-mysql-perl" -RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ + ${PN}-client ${PN}-setupdb libdbi-perl dbd-mariadb lzo" +RDEPENDS:${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \ perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \ perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \ perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \ perl-module-io-socket-inet perl-module-io-select bash" -RDEPENDS_${PN}-setupdb = "coreutils" +RDEPENDS:${PN}-setupdb = "coreutils" # Allow old code to link to the backward compatible library -RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev" +RDEPENDS:libmysqlclient-dev = "libmysqlclient-r-dev" + +PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" +src_package_preprocess () { + # Trim build paths from comments in generated sources to ensure reproducibility + sed -i -e "s,${S}/sql/,,g" \ + -e "s,${B}/sql/,,g" \ + ${B}/sql/yy_oracle.hh \ + ${B}/sql/yy_mariadb.cc \ + ${B}/sql/yy_mariadb.hh \ + ${B}/sql/yy_oracle.cc +} -FILES_libmysqlclient = "\ +FILES:libmysqlclient = "\ ${libdir}/libmysqlclient.so.* \ ${libdir}/libmariadb.so.* \ ${sysconfdir}/my.cnf.d/client.cnf" -FILES_libmysqlclient-dev = " \ +FILES:libmysqlclient-dev = " \ ${includedir}/mysql/ \ ${libdir}/libmysqlclient.so \ ${libdir}/libmariadb.so \ ${sysconfdir}/aclocal \ ${bindir}/mysql_config" -FILES_libmysqlclient-staticdev = "\ +FILES:libmysqlclient-staticdev = "\ ${libdir}/*.a" # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 # which are intentionally non-PIC on 32-bit x86 (see e.g. # storage/xtradb/plug.in in the source) -INSANE_SKIP_libmysqlclient_append_x86 = " textrel" +INSANE_SKIP:libmysqlclient:append:x86 = " textrel" -FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" -FILES_libmysqlclient-r-dev = "\ +FILES:libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" +FILES:libmysqlclient-r-dev = "\ ${libdir}/libmysqlclient_r.so" -FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" +FILES:libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" -FILES_libmysqld = "\ +FILES:libmysqld = "\ ${libdir}/libmysqld.so.* \ ${libdir}/libmariadbd.so.*" -FILES_libmysqld-dev = "\ +FILES:libmysqld-dev = "\ ${libdir}/libmysqld.so \ ${libdir}/libmariadbd.so" -FILES_${PN}-client = "\ +FILES:${PN}-client = "\ ${bindir}/myisam_ftdump \ ${bindir}/mysql \ ${bindir}/mariadb \ @@ -278,7 +304,7 @@ FILES_${PN}-client = "\ ${libexecdir}/mysqlmanager \ ${sysconfdir}/my.cnf.d/mysql-clients.cnf" -FILES_${PN}-server = "\ +FILES:${PN}-server = "\ ${bindir}/msql2mysql \ ${bindir}/my_print_defaults \ ${bindir}/myisamchk \ @@ -287,7 +313,6 @@ FILES_${PN}-server = "\ ${bindir}/mysql_convert_table_format \ ${bindir}/mariadb-convert-table-format \ ${bindir}/mysql_install_db \ - ${bindir}/mariadb-install-db \ ${bindir}/mysql_secure_installation \ ${bindir}/mariadb-secure-installation \ ${bindir}/mysql_setpermission \ @@ -329,5 +354,5 @@ FILES_${PN}-server = "\ ${sysconfdir}/security/user_map.conf \ ${sysconfdir}/tmpfiles.d" -DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" -FILES_${PN}-leftovers = "/" +DESCRIPTION:${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" +FILES:${PN}-leftovers = "/" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch new file mode 100644 index 0000000000..f8ccb998be --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch @@ -0,0 +1,84 @@ +From 68100b1f2243304289b9a9a35e8fb0e1bb0cf70f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 24 Jan 2023 21:40:43 -0800 +Subject: [PATCH] Add missing includes <cstdint> and <cstdio> + +This is needed with GCC 13 and newer [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + .../rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h | 1 + + storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h | 1 + + .../rocksdb/rocksdb/table/block_based/data_block_hash_index.h | 1 + + storage/rocksdb/rocksdb/util/slice.cc | 1 + + storage/rocksdb/rocksdb/util/string_util.h | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +index 963c1d8e..73487edd 100644 +--- a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h ++++ b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include "rocksdb/rocksdb_namespace.h" + + struct CompactionIterationStats { +diff --git a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +index c7f93b4c..3c2ab805 100644 +--- a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h ++++ b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +@@ -8,6 +8,7 @@ + #pragma once + #ifndef ROCKSDB_LITE + ++#include <cstdint> + #include <string> + #include <vector> + #include "rocksdb/status.h" +diff --git a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +index f356395f..32152217 100644 +--- a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h ++++ b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include <string> + #include <vector> + +diff --git a/storage/rocksdb/rocksdb/util/slice.cc b/storage/rocksdb/rocksdb/util/slice.cc +index 6db11cc9..c26b6a21 100644 +--- a/storage/rocksdb/rocksdb/util/slice.cc ++++ b/storage/rocksdb/rocksdb/util/slice.cc +@@ -8,6 +8,7 @@ + // found in the LICENSE file. See the AUTHORS file for names of contributors. + + #include <algorithm> ++#include <cstdint> + #include "rocksdb/slice_transform.h" + #include "rocksdb/slice.h" + #include "util/string_util.h" + +diff --git a/util/string_util.h b/util/string_util.h +index 55d106fff02..11178fd1d7b 100644 +--- a/storage/rocksdb/rocksdb/util/string_util.h ++++ b/storage/rocksdb/rocksdb/util/string_util.h +@@ -6,6 +6,7 @@ + + #pragma once + ++#include <cstdint> + #include <sstream> + #include <string> + #include <unordered_map> +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch index 0cf0560e11..d8671b76b0 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch @@ -1,30 +1,33 @@ -From 1d7612b063eb1fc7bf97bc27b13e1de596748aa1 Mon Sep 17 00:00:00 2001 +From f15fbdf1244ca9ce01c5507660a86d685ed88bcf Mon Sep 17 00:00:00 2001 From: Sumit Garg <sumit.garg@linaro.org> -Date: Wed, 8 Jan 2020 04:58:30 +0000 +Date: Mon, 21 Mar 2022 15:08:40 +0800 Subject: [PATCH] Fix library LZ4 lookup. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- +Upstream-Status: Pending + cmake/FindLZ4.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake -index e97dd63e2b0..2f4694e727c 100644 +index eebd859..094241c 100644 --- a/cmake/FindLZ4.cmake +++ b/cmake/FindLZ4.cmake @@ -1,5 +1,10 @@ --find_path(LZ4_INCLUDE_DIR NAMES lz4.h) +-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) -find_library(LZ4_LIBRARIES NAMES lz4) +find_path(LZ4_INCLUDE_DIR -+ NAMES lz4.h ++ NAMES lz4.h + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + +find_library(LZ4_LIBRARIES + NAMES lz4 + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS( + if(LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS}/lz4.h") + file(STRINGS "${LZ4_INCLUDE_DIRS}/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]") -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch new file mode 100644 index 0000000000..aba9b9d966 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch @@ -0,0 +1,45 @@ +From 0a3222338efc108c831fbdd719a47d35f4b0adcd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Aug 2021 06:49:25 +0000 +Subject: [PATCH] aio_linux: Check if syscall exists before using it + +Return -ENOSYS if not implememented, fixes build on arches like RISCV32 +Fixes +tpool/aio_linux.cc:63:20: error: '__NR_io_getevents' was not declared in this scope; did you mean 'io_getevents'? + 63 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), + | ^~~~~~~~~~~~~~~~~ + | io_getevents + +Upstream-Staus: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + tpool/aio_linux.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc +index 4abc213..da75411 100644 +--- a/tpool/aio_linux.cc ++++ b/tpool/aio_linux.cc +@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/ + */ + static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) + { ++#ifdef __NR_io_getevents + int saved_errno= errno; + int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), + min_nr, nr, ev, 0); +@@ -67,6 +68,9 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) + errno= saved_errno; + } + return ret; ++#else ++ return -ENOSYS; ++#endif + } + + +-- +2.29.2 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch deleted file mode 100644 index daf2432a54..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b658bdb38b7ff6a78915fd0ac390fc224e4006cb Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 26 Mar 2017 14:30:33 -0700 -Subject: [PATCH] disable ucontext on musl - -musl does not have *contex() APIs even though it has ucontext.h header - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - include/my_context.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/my_context.h b/include/my_context.h -index ea0e3496..4c9b37dc 100644 ---- a/include/my_context.h -+++ b/include/my_context.h -@@ -31,7 +31,7 @@ - #define MY_CONTEXT_USE_X86_64_GCC_ASM - #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) - #define MY_CONTEXT_USE_I386_GCC_ASM --#elif defined(HAVE_UCONTEXT_H) -+#elif defined(__GLIBC__) && defined(HAVE_UCONTEXT_H) - #define MY_CONTEXT_USE_UCONTEXT - #else - #define MY_CONTEXT_DISABLE diff --git a/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch index 4cb0443392..456a2bad64 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch @@ -1,6 +1,6 @@ -From cfce1491827e5a581878b5e166bf4d30e6d90e07 Mon Sep 17 00:00:00 2001 +From f92f657973997df30afdb0032c88ad3a14ead46b Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> -Date: Thu, 23 Jul 2020 00:08:16 -0700 +Date: Fri, 23 Sep 2022 15:48:21 +0800 Subject: [PATCH] sql/CMakeLists.txt: fix gen_lex_hash not found Fix the below do_compile issue in cross-compiling env. @@ -11,14 +11,14 @@ Upstream-Status: Inappropriate [oe build specific] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- - sql/CMakeLists.txt | 30 ++++++++++++++++++++---------- - 1 file changed, 20 insertions(+), 10 deletions(-) + sql/CMakeLists.txt | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt -index 0dc3caa..616017b 100644 +index 241b482..27a3991 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt -@@ -52,11 +52,16 @@ ${CMAKE_BINARY_DIR}/sql +@@ -60,11 +60,18 @@ ${CMAKE_BINARY_DIR}/sql ${CMAKE_SOURCE_DIR}/tpool ) @@ -26,21 +26,22 @@ index 0dc3caa..616017b 100644 - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h - COMMAND gen_lex_token > lex_token.h - DEPENDS gen_lex_token --) +IF(NOT CMAKE_CROSSCOMPILING) + ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h -+ COMMAND gen_lex_token > lex_token.h -+ DEPENDS gen_lex_token) ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h ++ COMMAND gen_lex_token > lex_token.h ++ DEPENDS gen_lex_token ++) +ELSE() + ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h -+ COMMAND gen_lex_token > lex_token.h) ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h ++ COMMAND gen_lex_token > lex_token.h + ) +ENDIF() - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.yy -@@ -345,11 +350,16 @@ IF(NOT CMAKE_CROSSCOMPILING) + FIND_PACKAGE(BISON 2.4) + +@@ -372,11 +379,18 @@ IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) ENDIF() @@ -48,20 +49,21 @@ index 0dc3caa..616017b 100644 - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h - COMMAND gen_lex_hash > lex_hash.h - DEPENDS gen_lex_hash --) +IF(NOT CMAKE_CROSSCOMPILING) + ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h -+ COMMAND gen_lex_hash > lex_hash.h -+ DEPENDS gen_lex_hash) ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ++ COMMAND gen_lex_hash > lex_hash.h ++ DEPENDS gen_lex_hash ++) +ELSE() + ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h -+ COMMAND gen_lex_hash > lex_hash.h) ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ++ COMMAND gen_lex_hash > lex_hash.h + ) +ENDIF() - MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc COMPONENT Server) + MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc) SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch deleted file mode 100644 index d8f672d744..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 966cbeb309f867ff4ac8e7f4462be4780e421700 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Mon, 25 Jan 2021 19:01:06 -0800 -Subject: [PATCH] stacktrace-t.c: make the test conditional - -Fixes: -/prj/tmp/work/cortexa57-poky-linux-musl/mariadb/10.5.8-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/../../libexec/aarch64-poky-linux-musl/gcc/aarch64-poky-linux-musl/10.2.0/ld.bfd: /usr/src/debug/mariadb/10.5.8-r0/mariadb-10.5.8/unittest/mysys/stacktrace-t.c:36: undefined reference to `my_safe_print_str' - -Upstream-Status: Submitted [https://jira.mariadb.org/browse/MDEV-24131] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - unittest/mysys/stacktrace-t.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/unittest/mysys/stacktrace-t.c b/unittest/mysys/stacktrace-t.c -index 8fa0db15b36..d8408f80d76 100644 ---- a/unittest/mysys/stacktrace-t.c -+++ b/unittest/mysys/stacktrace-t.c -@@ -29,6 +29,7 @@ void test_my_safe_print_str() - memcpy(b_stack, "LEGAL", 6); - memcpy(b_bss, "LEGAL", 6); - -+#ifdef HAVE_STACKTRACE - #ifndef __SANITIZE_ADDRESS__ - fprintf(stderr, "\n===== stack =====\n"); - my_safe_print_str(b_stack, 65535); -@@ -48,6 +49,7 @@ void test_my_safe_print_str() - fprintf(stderr, "\n===== (const char*) 1 =====\n"); - my_safe_print_str((const char*)1, 5); - #endif /*__SANITIZE_ADDRESS__*/ -+#endif /*HAVE_STACKTRACE*/ - - free(b_heap); - --- -2.17.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch b/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch deleted file mode 100644 index 32c9818ab0..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 976468458d53d8bb71acf48ddfc852a60557acb9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= <vicentiu@mariadb.org> -Date: Thu, 23 Jul 2020 00:02:21 -0700 -Subject: [PATCH] Link with libatomic to enable C11 atomics support - - Some architectures (mips) require libatomic to support proper - atomic operations. Check first if support is available without - linking, otherwise use the library. - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - configure.cmake | 20 +++++++++++++++++++- - mysys/CMakeLists.txt | 4 ++++ - sql/CMakeLists.txt | 4 ++++ - 3 files changed, 27 insertions(+), 1 deletion(-) - -diff --git a/configure.cmake b/configure.cmake -index bb3ad43..2ff4f19 100644 ---- a/configure.cmake -+++ b/configure.cmake -@@ -861,7 +861,25 @@ int main() - long long int *ptr= &var; - return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); - }" --HAVE_GCC_C11_ATOMICS) -+HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) -+IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) -+ SET(HAVE_GCC_C11_ATOMICS True) -+ELSE() -+ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) -+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") -+ CHECK_CXX_SOURCE_COMPILES(" -+ int main() -+ { -+ long long int var= 1; -+ long long int *ptr= &var; -+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); -+ }" -+ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ SET(HAVE_GCC_C11_ATOMICS True) -+ ENDIF() -+ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) -+ENDIF() - - IF(WITH_VALGRIND) - SET(HAVE_valgrind 1) -diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt -index 6a3a1ef..e306ae7 100644 ---- a/mysys/CMakeLists.txt -+++ b/mysys/CMakeLists.txt -@@ -140,6 +140,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} - ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO}) - DTRACE_INSTRUMENT(mysys) - -+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ TARGET_LINK_LIBRARIES(mysys atomic) -+ENDIF() -+ - IF(HAVE_BFD_H) - TARGET_LINK_LIBRARIES(mysys bfd) - ENDIF(HAVE_BFD_H) -diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt -index 4978d01..883a930 100644 ---- a/sql/CMakeLists.txt -+++ b/sql/CMakeLists.txt -@@ -220,6 +220,10 @@ ELSE() - SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) - ENDIF() - -+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ TARGET_LINK_LIBRARIES(sql atomic) -+ENDIF() -+ - IF(MSVC) - SET(libs_to_export_symbols sql mysys dbug strings) - # Create shared library of already compiled object --- -2.17.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch b/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch deleted file mode 100644 index c77a869441..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch +++ /dev/null @@ -1,32 +0,0 @@ -libc++ also has a file called version and this file and how cflags are specified -it ends up including this file and resulting in compile errors - -fixes errors like -storage/mroonga/version:1:1: error: expected unqualified-id -7.07 -^ - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/storage/mroonga/CMakeLists.txt -+++ b/storage/mroonga/CMakeLists.txt -@@ -80,7 +80,7 @@ else() - set(MRN_SOURCE_DIR ${CMAKE_SOURCE_DIR}) - endif() - --file(READ ${MRN_SOURCE_DIR}/version MRN_VERSION) -+file(READ ${MRN_SOURCE_DIR}/ver MRN_VERSION) - file(READ ${MRN_SOURCE_DIR}/version_major MRN_VERSION_MAJOR) - file(READ ${MRN_SOURCE_DIR}/version_minor MRN_VERSION_MINOR) - file(READ ${MRN_SOURCE_DIR}/version_micro MRN_VERSION_MICRO) ---- /dev/null -+++ b/storage/mroonga/ver -@@ -0,0 +1 @@ -+7.07 -\ No newline at end of file ---- a/storage/mroonga/version -+++ /dev/null -@@ -1 +0,0 @@ --7.07 -\ No newline at end of file diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch index 9149ee21f2..d0d6e3c730 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch @@ -1,28 +1,27 @@ -From 1b2b6a61c9f82157cd2e0c3744f6c07e07aeb0bd Mon Sep 17 00:00:00 2001 +From 80be37351d995654f86b838f6b5ed47e8a90261b Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> -Date: Mon, 4 Mar 2019 01:11:30 -0800 -Subject: [PATCH] fix a building failure - -Upstream-Status: Inappropriate [configuration] +Date: Fri, 23 Sep 2022 12:05:17 +0800 +Subject: [PATCH] CMakeLists.txt: not include import_executables.cmake building failed since native does not generate import_executables.cmake -In fact, our building system will export the needed commands +In fact, our building system will export the needed commands. + +Upstream-Status: Inappropriate [oe specific] -Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc30750..4f9110e 100644 +index f9e2b1b..34924ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -347,11 +347,6 @@ CHECK_PCRE() - +@@ -394,11 +394,6 @@ CHECK_LIBFMT() + ADD_SUBDIRECTORY(tpool) CHECK_SYSTEMD() --IF(CMAKE_CROSSCOMPILING) +-IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) - SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") - INCLUDE(${IMPORT_EXECUTABLES}) -ENDIF() @@ -31,5 +30,5 @@ index fc30750..4f9110e 100644 # Setup maintainer mode options. Platform checks are # not run with the warning options as to not perturb fragile checks -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch new file mode 100644 index 0000000000..7a685a6521 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch @@ -0,0 +1,21 @@ +Upstream-Status: Pending + +--- a/storage/connect/os.h ++++ b/storage/connect/os.h +@@ -2,13 +2,15 @@ + #ifndef _OS_H_INCLUDED + #define _OS_H_INCLUDED + +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__)) + typedef off_t off64_t; + #define lseek64(fd, offset, whence) lseek((fd), (offset), (whence)) + #define open64(path, flags, mode) open((path), (flags), (mode)) + #define ftruncate64(fd, length) ftruncate((fd), (length)) ++#ifndef O_LARGEFILE + #define O_LARGEFILE 0 + #endif ++#endif + + #ifdef _AIX + #ifndef O_LARGEFILE diff --git a/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch new file mode 100644 index 0000000000..6aa6c84882 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch @@ -0,0 +1,13 @@ +Upstream-Status: Pending + +--- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h ++++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h +@@ -5,7 +5,7 @@ + + #pragma once + +-#if defined(__clang__) ++#if defined(__clang__) && defined(__GLIBC__) + // glibc's `posix_memalign()` declaration specifies `throw()` while clang's + // declaration does not. There is a hack in clang to make its re-declaration + // compatible with glibc's if they are declared consecutively. That hack breaks diff --git a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf index dc4c172e54..75db46a559 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf +++ b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf @@ -10,7 +10,7 @@ user = mysql port = 3306 socket = /var/lib/mysql/mysql.sock pid-file = /var/lib/mysql/mysqld.pid -log-error = /var/log/mysqld.err +log-error = /var/log/mysqld.log basedir = /usr datadir = /var/lib/mysql skip-external-locking diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch new file mode 100644 index 0000000000..3787b74ad1 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch @@ -0,0 +1,43 @@ +Upstream-Status: Pending + +Remove glibc specific function dependencies + +Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +diff --git a/include/my_cpu.h b/include/my_cpu.h +index f2e26fca..94599b74 100644 +--- a/include/my_cpu.h ++++ b/include/my_cpu.h +@@ -24,17 +24,16 @@ + */ + + #ifdef _ARCH_PWR8 +-#include <sys/platform/ppc.h> + /* Very low priority */ +-#define HMT_very_low() __ppc_set_ppr_very_low() ++#define HMT_very_low() asm volatile("or 31,31,31") + /* Low priority */ +-#define HMT_low() __ppc_set_ppr_low() ++#define HMT_low() asm volatile ("or 1,1,1") + /* Medium low priority */ +-#define HMT_medium_low() __ppc_set_ppr_med_low() ++#define HMT_medium_low() asm volatile ("or 6,6,6") + /* Medium priority */ +-#define HMT_medium() __ppc_set_ppr_med() ++#define HMT_medium() asm volatile ("or 2,2,2") + /* Medium high priority */ +-#define HMT_medium_high() __ppc_set_ppr_med_high() ++#define HMT_medium_high() asm volatile("or 5,5,5") + /* High priority */ + #define HMT_high() asm volatile("or 3,3,3") + #else +@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void) + __asm__ __volatile__ ("pause"); + #endif + #elif defined(_ARCH_PWR8) +- __ppc_get_timebase(); ++ __builtin_ppc_get_timebase(); + #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) + /* Mainly, prevent the compiler from optimizing away delay loops */ + __asm__ __volatile__ ("":::"memory"); diff --git a/meta-oe/recipes-dbs/mysql/mariadb/run-ptest b/meta-oe/recipes-dbs/mysql/mariadb/run-ptest new file mode 100644 index 0000000000..2f905cd379 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/run-ptest @@ -0,0 +1,20 @@ +#!/bin/sh + +# test case test-connect is excluded. Becasue this test case need following steps before running. +# Without these steps, test case test-connect will fail. +# 1. Disable 'skip-networking' in /etc/my.cnf +# $ sed -i '/skip-networking/s/^/#/g' /etc/my.cnf +# 2. Restart mysqld.service +# $ systemctl restart mysqld +# 3. Set password for MySQL user "root" +# $ mysql -u root +# MariaDB [(none)]> SET PASSWORD FOR "root"@"localhost" = PASSWORD("myReallyStrongPwd"); +# MariaDB [(none)]> FLUSH PRIVILEGES; + +# If test-connect is included, please uncomment these lines. +#export MASTER_MYPORT=3306 +#export MYSQL_TEST_HOST=127.0.0.1 +#export MYSQL_TEST_USER=root +#export MYSQL_TEST_PASSWD=myReallyStrongPwd + +ctest --force-new-ctest-process -E test-connect | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch new file mode 100644 index 0000000000..4e499d4137 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch @@ -0,0 +1,15 @@ +ssize_t comes from sys/types.h therefore include it + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/wsrep-lib/include/wsrep/gtid.hpp ++++ b/wsrep-lib/include/wsrep/gtid.hpp +@@ -25,7 +25,7 @@ + #include "compiler.hpp" + + #include <iosfwd> +- ++#include <sys/types.h> + /** + * Minimum number of bytes guaratneed to store GTID string representation, + * terminating '\0' not included (36 + 1 + 20). diff --git a/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch b/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch index 4f9a4e9b0e..233d9e6af6 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch @@ -7,7 +7,7 @@ Comment out the logic which for suse as it introduces below do_populate_sysroot error: ERROR: mariadb-native-10.3.13-r0 do_populate_sysroot: sstate found an absolute path symlink /build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/sysroot-destdir/build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/recipe-sysroot-native/usr/sbin/rcmysql pointing at /build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/recipe-sysroot-native/etc/init.d/mysql. Please replace this with a relative link. -Upstream-Status: Inappropriate[oe build specific] +Upstream-Status: Inappropriate [oe build specific] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> diff --git a/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch b/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch new file mode 100644 index 0000000000..3244ab8da2 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch @@ -0,0 +1,23 @@ +Use SYS_futex for syscall + +glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there +is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/storage/innobase/sync/srw_lock.cc ++++ b/storage/innobase/sync/srw_lock.cc +@@ -210,6 +210,12 @@ void ssux_lock_low::wake() { WakeByAddre + # ifdef __linux__ + # include <linux/futex.h> + # include <sys/syscall.h> ++/** Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and ++ therefore do not define __NR_futex */ ++# if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++# endif ++ + # define SRW_FUTEX(a,op,n) \ + syscall(SYS_futex, a, FUTEX_ ## op ## _PRIVATE, n, nullptr, nullptr, 0) + # elif defined __OpenBSD__ diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.11.9.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.9.bb new file mode 100644 index 0000000000..b1d1355e2b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.9.bb @@ -0,0 +1,63 @@ +require mariadb.inc + +inherit ptest +inherit useradd + +SRC_URI += "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}" +DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}" +RDEPENDS:${PN}-ptest += "cmake sed perl-module-test-more" + +do_install_ptest () { + rsync -a ${B}/unittest ${B}/dbug ${D}${PTEST_PATH} \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile \ + --exclude=*.a \ + --exclude=*.h \ + --exclude=*.o \ + --exclude=*.so \ + --exclude=*.d \ + --exclude=*.txt + install -m 0755 -d ${D}${PTEST_PATH}/storage + rsync -a ${B}/storage/maria ${B}/storage/perfschema ${B}/storage/innobase ${D}${PTEST_PATH}/storage \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile \ + --exclude=*.a \ + --exclude=*.h \ + --exclude=*.o \ + --exclude=*.so \ + --exclude=*.d \ + --exclude=*.txt + cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} + sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` +} + +DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \ + zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd" + +PROVIDES += "mysql5 libmysqlclient" + +USERADD_PACKAGES = "${PN}-setupdb" +USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" +GROUPADD_PARAM:${PN}-setupdb = "--system mysql" + +RPROVIDES:${PN} += "mysql5" +RREPLACES:${PN} += "mysql5" +RCONFLICTS:${PN} += "mysql5" + +RPROVIDES:${PN}-dbg += "mysql5-dbg" +RREPLACES:${PN}-dbg += "mysql5-dbg" +RCONFLICTS:${PN}-dbg += "mysql5-dbg" + +RPROVIDES:${PN}-leftovers += "mysql5-leftovers" +RREPLACES:${PN}-leftovers += "mysql5-leftovers" +RCONFLICTS:${PN}-leftovers += "mysql5-leftovers" + +RPROVIDES:${PN}-client += "mysql5-client" +RREPLACES:${PN}-client += "mysql5-client" +RCONFLICTS:${PN}-client += "mysql5-client" + +RPROVIDES:${PN}-server += "mysql5-server" +RREPLACES:${PN}-server += "mysql5-server" +RCONFLICTS:${PN}-server += "mysql5-server" diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb deleted file mode 100644 index e6743fe97a..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb +++ /dev/null @@ -1,27 +0,0 @@ -require mariadb.inc - -EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1" - -DEPENDS += "mariadb-native bison-native libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2" - -PROVIDES += "mysql5 libmysqlclient" - -RPROVIDES_${PN} += "mysql5" -RREPLACES_${PN} += "mysql5" -RCONFLICTS_${PN} += "mysql5" - -RPROVIDES_${PN}-dbg += "mysql5-dbg" -RREPLACES_${PN}-dbg += "mysql5-dbg" -RCONFLICTS_${PN}-dbg += "mysql5-dbg" - -RPROVIDES_${PN}-leftovers += "mysql5-leftovers" -RREPLACES_${PN}-leftovers += "mysql5-leftovers" -RCONFLICTS_${PN}-leftovers += "mysql5-leftovers" - -RPROVIDES_${PN}-client += "mysql5-client" -RREPLACES_${PN}-client += "mysql5-client" -RCONFLICTS_${PN}-client += "mysql5-client" - -RPROVIDES_${PN}-server += "mysql5-server" -RREPLACES_${PN}-server += "mysql5-server" -RCONFLICTS_${PN}-server += "mysql5-server" diff --git a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb index 4617da8e1b..15f6b6fb9a 100644 --- a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb +++ b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb @@ -1,7 +1,7 @@ SUMMARY = "Python interface to MySQL" HOMEPAGE = "https://github.com/farcepest/MySQLdb1" SECTION = "devel/python" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "mysql5" @@ -16,6 +16,8 @@ SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e S = "${WORKDIR}/${SRCNAME}-${PV}" +SKIP_RECIPE[mysql-python] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}" + inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "setuptools", "", d)} python() { 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 0dc6ece6da..ebd3e03685 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,17 +1,21 @@ -From b06a228a5fd1589fc9bed654b3288b321fc21aa1 Mon Sep 17 00:00:00 2001 +From ba079b8d6a50796db41bb0ddf4c22bfe022ef898 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. +Subject: [PATCH 1/5] Add support for RISC-V. The architecture is sufficiently similar to aarch64 that simply extending the existing aarch64 macro works. + +Upstream-Status: Pending --- 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 c9fa84c..9b491e8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h -@@ -316,11 +316,12 @@ tas(volatile slock_t *lock) +@@ -252,11 +252,12 @@ spin_delay(void) /* * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available. @@ -20,17 +24,20 @@ extending the existing aarch64 macro works. * 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) +-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) ++#if defined(__arm__) || defined(__arm) || 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) +@@ -290,7 +291,7 @@ spin_delay(void) + #endif /* __aarch64__ */ #endif /* HAVE_GCC__SYNC_INT32_TAS */ --#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */ -+#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ +-#endif /* __arm__ || __arm || __aarch64__ */ ++#endif /* __arm__ || __arm || __aarch64__ || __riscv */ /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch index e9bc6240de..b3e87cbc46 100644 --- a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch +++ b/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch @@ -1,7 +1,7 @@ -From 71fbee3888ee889a269eded5585ed7591bcbe9dd Mon Sep 17 00:00:00 2001 +From 084cc44215c1d5e6d33bc3d2e1d24da4fc98bdcd 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, +Subject: [PATCH 2/5] Improve reproducibility, Remove build patch from binaries which pg_config do not record var-CC, var-CFLAGS, and configure @@ -22,9 +22,11 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> src/common/Makefile | 3 --- 1 file changed, 3 deletions(-) +diff --git a/src/common/Makefile b/src/common/Makefile +index 113029b..58842a6 100644 --- a/src/common/Makefile +++ b/src/common/Makefile -@@ -31,9 +31,6 @@ include $(top_builddir)/src/Makefile.glo +@@ -31,9 +31,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)) @@ -34,3 +36,6 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-configure.in-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 970d750b13..342aeba85e 100644 --- a/meta-oe/recipes-dbs/postgresql/files/0001-configure.in-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 7177d8334a3c28ab0ec5c90e0656f43414929659 Mon Sep 17 00:00:00 2001 +From 30b1b37d309f67ba6d58f2197bd917107bc7d56c 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.in: bypass autoconf 2.69 version check +Subject: [PATCH 3/5] configure.ac: bypass autoconf 2.69 version check for upgrade to autoconf 2.71 @@ -9,19 +9,24 @@ Upstream-Status: Inappropriate [disable feature] Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> --- - configure.in | 4 ---- + configure.ac | 4 ---- 1 file changed, 4 deletions(-) ---- a/configure.in -+++ b/configure.in -@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch un +diff --git a/configure.ac b/configure.ac +index 65715a4..4ad6340 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros - AC_INIT([PostgreSQL], [13.2], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + AC_INIT([PostgreSQL], [16.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.in' but it is then +-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-2020, PostgreSQL Global Development Group]) + AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group]) AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) AC_CONFIG_AUX_DIR(config) +-- +2.34.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch b/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch new file mode 100644 index 0000000000..ff0582ab80 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch @@ -0,0 +1,119 @@ +From 5be3ffdf767c1efcbfd2d1be87aa83f2e37e348e 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 4/5] 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 27f382d..3dd6bb1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2023, 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 09e78a6..86e4230 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 = palloc_array(ConfigData, *configdata_len); + + 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++; +-- +2.25.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 new file mode 100644 index 0000000000..af36da4927 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch @@ -0,0 +1,49 @@ +From 1a8b94140988d2ee5ff987b0bb3e7c3e936b8c01 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 + +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 001c6e7..8256898 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 351e469..84c113e 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; +-- +2.25.1 + 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 ba2ee29f05..1f735f322b 100644 --- a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch +++ b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch @@ -1,7 +1,7 @@ -From 7e2af4de19be58bc9d551c41ce2750396d357f34 Mon Sep 17 00:00:00 2001 +From 56b830edecff1cac5f8a8a956e7a7eeef2aa7c17 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 +Subject: [PATCH] not check libperl under cross compiling Upstream-Status: Inappropriate [configuration] @@ -16,12 +16,14 @@ 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 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/configure.in -+++ b/configure.in -@@ -2206,7 +2206,7 @@ Use --without-tcl to disable building PL +diff --git a/configure.ac b/configure.ac +index fba79ee..7170f26 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2297,7 +2297,7 @@ Use --without-tcl to disable building PL/Tcl.]) fi # check for <perl.h> @@ -30,3 +32,6 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 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/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index 09c6a3ca9d..4fc2e47b35 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -18,12 +18,12 @@ DESCRIPTION = "\ this package if you're installing the postgresql-server package. \ " HOMEPAGE = "http://www.postgresql.com" -LICENSE = "BSD-0-Clause" -DEPENDS = "libnsl2 zlib readline tzcode-native" +LICENSE = "0BSD" +DEPENDS = "libnsl2 tzcode-native perl" ARM_INSTRUCTION_SET = "arm" -SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \ +SRC_URI = "https://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \ file://postgresql.init \ file://postgresql-profile \ file://postgresql.pam \ @@ -35,16 +35,16 @@ LEAD_SONAME = "libpq.so" # LDFLAGS for shared libraries export LDFLAGS_SL = "${LDFLAGS}" +export LDFLAGS_EX_BE = "-Wl,--export-dynamic" -inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base +inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext perl-version multilib_header CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" -SYSTEMD_SERVICE_${PN} = "postgresql.service" -SYSTEMD_AUTO_ENABLE_${PN} = "disable" +SYSTEMD_SERVICE:${PN} = "postgresql.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" -DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}" -pkg_postinst_${PN} () { +pkg_postinst:${PN} () { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then if [ -n "$D" ]; then OPTS="--root=$D" @@ -53,40 +53,48 @@ pkg_postinst_${PN} () { fi } -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 ac_cv_file__dev_urandom=yes,openssl," -PACKAGECONFIG[python] = "--with-python,--without-python,python3,python3" -PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux," +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ + openssl python uuid libxml tcl perl zlib icu readline \ +" PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," -PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," -PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2" PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" +PACKAGECONFIG[python] = "--with-python,--without-python,python3,python3" +PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd systemd-systemctl-native" +PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux" +PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2" +PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" +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 \ --datadir=${datadir}/${BPN} \ --sysconfdir=${sysconfdir}/${BPN} \ " -EXTRA_OECONF_sh4 += "--disable-spinlocks" -EXTRA_OECONF_aarch64 += "--disable-spinlocks" +EXTRA_OECONF:sh4 += "--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: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" +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 \ " -python populate_packages_prepend() { +python populate_packages:prepend() { def fill_more(name): if name is None or name.strip() == "": @@ -115,6 +123,12 @@ python populate_packages_prepend() { } +# Same as the function in cpan-base.bbclass (but without the perl RDEPENDS) +def is_target(d): + if not bb.data.inherits_class('native', d): + return "yes" + return "no" + # 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)}" @@ -123,7 +137,7 @@ do_configure() { # do_configure autotools_do_configure - # do_configure_append + # do_configure:append # workaround perl package related bugs sed -i -e "s:-L/usr/local/lib:-L=/usr/local/lib:g" \ ${B}/src/Makefile.global @@ -159,7 +173,7 @@ do_configure() { fi } -do_compile_append() { +do_compile:append() { oe_runmake -C contrib all } @@ -167,17 +181,18 @@ do_compile_append() { usernum = "28" groupnum = "28" USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \ +USERADD_PARAM:${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \ -s /bin/sh -c 'PostgreSQL Server' -u ${usernum} postgres" -GROUPADD_PARAM_${PN} = "-g ${groupnum} -o -r postgres" +GROUPADD_PARAM:${PN} = "-g ${groupnum} -o -r postgres" INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME = "${BPN}-server" INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." -do_install_append() { +do_install:append() { # install contrib oe_runmake DESTDIR=${D} -C contrib install + oe_multilib_header pg_config.h pg_config_ext.h ecpg_config.h postgresql/server/pg_config.h postgresql/server/pg_config_ext.h # install tutorial install -d -m 0755 ${D}${libdir}/${BPN}/tutorial install ${B}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial @@ -190,30 +205,48 @@ do_install_append() { # install dirs and server init install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server + install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server - install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup + install -m 0755 ${UNPACKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups - install -m 644 ${WORKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile + install -m 644 ${UNPACKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN} # 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 + install -m 644 ${UNPACKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql fi # Install systemd unit files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/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" -SSTATE_SCAN_FILES_remove = "*_config" +SSTATE_SCAN_FILES:remove = "*_config" + +postgresql_fix_sources () { + for f in ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/Util.c \ + ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/SPI.c; do + if [ -e $f ]; then + sed -i -e 's#${B}/../${P}#${TARGET_DBGSRC_DIR}#g' $f + fi + done +} +PACKAGESPLITFUNCS =+ "postgresql_fix_sources" PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ libecpg-compat libecpg-compat-dev \ @@ -223,7 +256,7 @@ PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ ${PN}-contrib \ " -RPROVIDES_${PN}-dbg += "libecpg-compat-dbg \ +RPROVIDES:${PN}-dbg += "libecpg-compat-dbg \ libecpg-dbg \ libpq-dbg \ libpgtypes-dbg \ @@ -233,7 +266,7 @@ RPROVIDES_${PN}-dbg += "libecpg-compat-dbg \ ${PN}-plperl-dbg \ " -FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ +FILES:${PN} += "${sysconfdir}/init.d/${BPN}-server \ ${localstatedir}/lib/${BPN}/data ${localstatedir}/lib/${BPN}/backups \ ${localstatedir}/lib/${BPN}/.profile ${sysconfdir}/default/${BPN} \ ${libdir}/${BPN}/dict_snowball.so ${libdir}/${BPN}/plpgsql.so \ @@ -245,7 +278,7 @@ FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ else ''} \ " -FILES_${PN}-client = "${bindir}/clusterdb \ +FILES:${PN}-client = "${bindir}/clusterdb \ ${bindir}/createdb \ ${bindir}/createuser \ ${bindir}/dropdb \ @@ -259,7 +292,7 @@ FILES_${PN}-client = "${bindir}/clusterdb \ ${bindir}/vacuumlo \ ${datadir}/${BPN}/psqlrc.sample \ " -FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \ +FILES:${PN}-client-doc = "${mandir}/man1/clusterdb.* \ ${mandir}/man1/createdb.* ${mandir}/man1/createlang.* \ ${mandir}/man1/createuser.* ${mandir}/man1/dropdb.* \ ${mandir}/man1/droplang.* ${mandir}/man1/dropuser.* \ @@ -268,46 +301,46 @@ FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \ ${mandir}/man1/reindexdb.* ${mandir}/man1/vacuumdb.* \ ${mandir}/man7/* \ " -FILES_${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \ +FILES:${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \ ${mandir}/man1/initdb.* ${mandir}/man1/pg_controldata.* \ ${mandir}/man1/pg_ctl.* ${mandir}/man1/pg_resetxlog.* \ ${mandir}/man1/postgres.* ${mandir}/man1/postmaster.* \ " -FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \ +FILES:${PN}-timezone = "${datadir}/${BPN}/timezone \ ${datadir}/${BPN}/timezonesets \ " -RDEPENDS_${PN} += "${PN}-timezone" -FILES_${PN}-server-dev = "${includedir}/${BPN}/server \ +RDEPENDS:${PN} += "${PN}-timezone" +FILES:${PN}-server-dev = "${includedir}/${BPN}/server \ ${libdir}/${BPN}/pgxs \ " -FILES_libecpg = "${libdir}/libecpg*${SOLIBS}" -FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \ +FILES:libecpg = "${libdir}/libecpg*${SOLIBS}" +FILES:libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \ ${libdir}/libpgtypes*${SOLIBSDEV} \ ${includedir}/ecpg*.h ${includedir}/${BPN}/ecpg*.h \ ${includedir}/pgtypes*.h ${includedir}/${BPN}/informix \ ${includedir}/sql3types.h ${includedir}/sqlca.h \ " -FILES_libecpg-doc = "${mandir}/man1/ecpg.*" -FILES_libecpg-staticdev = "${libdir}/libecpg*.a" -SECTION_libecpg-staticdev = "devel" -RDEPENDS_libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})" +FILES:libecpg-doc = "${mandir}/man1/ecpg.*" +FILES:libecpg-staticdev = "${libdir}/libecpg*.a" +SECTION:libecpg-staticdev = "devel" +RDEPENDS:libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})" -FILES_libpq = "${libdir}/libpq*${SOLIBS}" -FILES_libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \ +FILES:libpq = "${libdir}/libpq*${SOLIBS}" +FILES:libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \ ${includedir} \ " -FILES_libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a" -SECTION_libpq-staticdev = "devel" -RDEPENDS_libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})" +FILES:libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a" +SECTION:libpq-staticdev = "devel" +RDEPENDS:libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})" -FILES_libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}" -FILES_libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}" -FILES_libpgtypes = "${libdir}/libpgtypes*${SOLIBS}" -FILES_libpgtypes-staticdev = "${libdir}/libpgtypes*.a" -FILES_libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h" +FILES:libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}" +FILES:libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}" +FILES:libpgtypes = "${libdir}/libpgtypes*${SOLIBS}" +FILES:libpgtypes-staticdev = "${libdir}/libpgtypes*.a" +FILES:libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h" -FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ +FILES:${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ ${bindir}/pgbench \ ${S}/contrib/spi/*.example \ ${libdir}/${BPN}/_int.so ${libdir}/${BPN}/adminpack.so \ @@ -335,27 +368,27 @@ FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ ${libdir}/${BPN}/pg_upgrade_support.so ${libdir}/${BPN}/.so \ ${libdir}/${BPN}/unaccent.so \ " -DESCRIPTION_${PN}-contrib = "The postgresql-contrib package contains \ +DESCRIPTION:${PN}-contrib = "The postgresql-contrib package contains \ contributed packages that are included in the PostgreSQL distribution." -FILES_${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \ +FILES:${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \ ${binddir}/pltcl_listmod ${bindir}/pltcl_loadmod \ ${datadir}/${BPN}/unknown.pltcl" -SUMMARY_${PN}-pltcl = "The Tcl procedural language for PostgreSQL" -DESCRIPTION_${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \ +SUMMARY:${PN}-pltcl = "The Tcl procedural language for PostgreSQL" +DESCRIPTION:${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \ database management system. The postgresql-pltcl package contains the PL/Tcl \ procedural language for the backend." -FILES_${PN}-plperl = "${libdir}/${BPN}/plperl.so" -SUMMARY_${PN}-plperl = "The Perl procedural language for PostgreSQL" -DESCRIPTION_${PN}-plperl = "PostgreSQL is an advanced Object-Relational \ +FILES:${PN}-plperl = "${libdir}/${BPN}/plperl.so" +SUMMARY:${PN}-plperl = "The Perl procedural language for PostgreSQL" +DESCRIPTION:${PN}-plperl = "PostgreSQL is an advanced Object-Relational \ database management system. The postgresql-plperl package contains the \ PL/Perl procedural language for the backend." # In version 8, it will be plpython.so # In version 9, it might be plpython{2,3}.so depending on python2 or 3 -FILES_${PN}-plpython = "${libdir}/${BPN}/plpython*.so" -SUMMARY_${PN}-plpython = "The Python procedural language for PostgreSQL" -DESCRIPTION_${PN}-plpython = "PostgreSQL is an advanced Object-Relational \ +FILES:${PN}-plpython = "${libdir}/${BPN}/plpython*.so" +SUMMARY:${PN}-plpython = "The Python procedural language for PostgreSQL" +DESCRIPTION:${PN}-plpython = "PostgreSQL is an advanced Object-Relational \ database management system. The postgresql-plpython package contains \ the PL/Python procedural language for the backend." diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_13.2.bb b/meta-oe/recipes-dbs/postgresql/postgresql_13.2.bb deleted file mode 100644 index ca8a6c7cee..0000000000 --- a/meta-oe/recipes-dbs/postgresql/postgresql_13.2.bb +++ /dev/null @@ -1,12 +0,0 @@ -require postgresql.inc - -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=255f15687738db8068fbe9b938c90217" - -SRC_URI += "\ - file://not-check-libperl.patch \ - file://0001-Add-support-for-RISC-V.patch \ - file://0001-Improve-reproducibility.patch \ - file://0001-configure.in-bypass-autoconf-2.69-version-check.patch \ -" - -SRC_URI[sha256sum] = "5fd7fcd08db86f5b2aed28fcfaf9ae0aca8e9428561ac547764c2a2b0f41adfc" diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_16.4.bb b/meta-oe/recipes-dbs/postgresql/postgresql_16.4.bb new file mode 100644 index 0000000000..1a47369e4d --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/postgresql_16.4.bb @@ -0,0 +1,16 @@ +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://0002-Improve-reproducibility.patch \ + file://0003-configure.ac-bypass-autoconf-2.69-version-check.patch \ + file://0004-config_info.c-not-expose-build-info.patch \ + file://0005-postgresql-fix-ptest-failure-of-sysviews.patch \ +" + +SRC_URI[sha256sum] = "971766d645aa73e93b9ef4e3be44201b4f45b5477095b049125403f9f3386d6f" + +CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch index 7eda038756..84d4467c0e 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch @@ -1,26 +1,27 @@ -[PATCH] do not use the hardcode libdir +From 8f3ed8df4721991958a5becf75a69493d67e7514 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 +Subject: [PATCH] [PATCH] do not use the hardcode libdir -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 9b88d4c..df5ad7a 100644 +index 00b359e..ba50e6f 100644 --- a/configure.ac +++ b/configure.ac -@@ -140,7 +140,7 @@ if test "$with_libpq" != yes; then +@@ -114,7 +114,7 @@ if test "$with_libpq" != yes; then if test -d "$with_libpq"; then - PATH="$PATH:$with_libpq/bin" - CPPFLAGS="$CPPFLAGS -I$with_libpq/include" + PATH="$with_libpq/bin:$PATH" + CPPFLAGS="$CPPFLAGS -I$with_libpq/include -I$with_libpq/include/postgresql/internal" - LDFLAGS="$LDFLAGS -L$with_libpq/lib" + LDFLAGS="$LDFLAGS -L$with_libpq/${base_libdir}" else if test -x "$with_libpq"; then PG_CONFIG=$with_libpq --- -2.8.1 - diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch index a8f14e7689..081c6d0fd0 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch @@ -1,3 +1,6 @@ +From 96896b88776d0080609ec830cf9538d2babe665a Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 Subject: [PATCH] psqlodbc: fixes for ptest support * Fix the LIBODBC since we don't use ODBC_CONFIG. @@ -9,27 +12,24 @@ Subject: [PATCH] psqlodbc: fixes for ptest support Upstream-Status: Inappropriate [OE ptest specific] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- test/Makefile.in | 2 +- test/odbcini-gen.sh | 8 ++++---- - test/runsuite.c | 26 +++++++++++++------------- - 3 files changed, 18 insertions(+), 18 deletions(-) + test/runsuite.c | 20 ++++++++++---------- + 3 files changed, 15 insertions(+), 15 deletions(-) -diff --git a/test/Makefile.in b/test/Makefile.in -index 8710616..fcb470e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in -@@ -18,7 +18,7 @@ CFLAGS = @CFLAGS@ +@@ -19,7 +19,7 @@ CPPFLAGS = @CPPFLAGS@ -I.. # config.h ODBC_CONFIG = @ODBC_CONFIG@ PROVE = @PROVE@ --LIBODBC := $(shell $(ODBC_CONFIG) --libs) +-LIBODBC = @LIBODBC@ +LIBODBC = -lodbc all: $(TESTBINS) runsuite reset-db -diff --git a/test/odbcini-gen.sh b/test/odbcini-gen.sh -index d2c2c87..6068d9d 100755 --- a/test/odbcini-gen.sh +++ b/test/odbcini-gen.sh @@ -6,7 +6,7 @@ @@ -41,7 +41,16 @@ index d2c2c87..6068d9d 100755 driver=${drvr}.so if test ! -e $driver ; then driver=${drvr}.dll -@@ -33,10 +33,10 @@ Driver = psqlodbc test driver +@@ -16,7 +16,7 @@ if test ! -e $driver ; then + fi + fi + +-drvra=../.libs/psqlodbca ++drvra=@LIBDIR@/psqlodbca + drivera=${drvra}.so + if test ! -e $drivera ; then + drivera=${drvra}.dll +@@ -52,10 +52,10 @@ Driver = PostgreSQL Unicode Trace = No TraceFile = Database = contrib_regression @@ -55,11 +64,9 @@ index d2c2c87..6068d9d 100755 ReadOnly = No RowVersioning = No ShowSystemTables = No -diff --git a/test/runsuite.c b/test/runsuite.c -index 583cf35..fd2a90e 100644 --- a/test/runsuite.c +++ b/test/runsuite.c -@@ -51,7 +51,7 @@ bailout(const char *fmt, ...) +@@ -55,7 +55,7 @@ bailout(const char *fmt, ...) /* Given a test program's name, get the test name */ void @@ -68,7 +75,7 @@ index 583cf35..fd2a90e 100644 { const char *basename; #ifdef WIN32 -@@ -65,7 +65,7 @@ parse_argument(const char *in, char *testname, char *binname) +@@ -69,7 +69,7 @@ parse_argument(const char *in, char *tes if (strchr(in, DIR_SEP) == NULL) { strcpy(testname, in); @@ -77,7 +84,7 @@ index 583cf35..fd2a90e 100644 return; } -@@ -127,7 +127,7 @@ int main(int argc, char **argv) +@@ -131,7 +131,7 @@ int main(int argc, char **argv) failures = 0; for (i = 1, j = 1; i <= numtests; i++, j++) { @@ -86,7 +93,7 @@ index 583cf35..fd2a90e 100644 if (runtest(binname, testname, i, inputdir) != 0) failures++; } -@@ -157,29 +157,29 @@ runtest(const char *binname, const char *testname, int testno, const char *input +@@ -161,29 +161,29 @@ runtest(const char *binname, const char #ifndef WIN32 snprintf(cmdline, sizeof(cmdline), "ODBCSYSINI=. ODBCINSTINI=./odbcinst.ini ODBCINI=./odbc.ini " @@ -123,26 +130,3 @@ index 583cf35..fd2a90e 100644 ret = 0; } fflush(stdout); -@@ -196,7 +196,7 @@ rundiff(const char *testname, const char *inputdir) - char *result; - size_t result_len; - -- snprintf(filename, sizeof(filename), "results/%s.out", testname); -+ snprintf(filename, sizeof(filename), "%s/results/%s.out", inputdir, testname); - result = slurpfile(filename, &result_len); - - outputno = 0; -@@ -244,8 +244,8 @@ rundiff(const char *testname, const char *inputdir) - * files and print the smallest diff? - */ - snprintf(cmdline, sizeof(cmdline), -- "diff -c %s/expected/%s.out results/%s.out >> regression.diffs", -- inputdir, testname, testname); -+ "diff -c %s/expected/%s.out %s/results/%s.out >> regression.diffs", -+ inputdir, testname, inputdir, testname); - if (system(cmdline) == -1) - printf("# diff failed\n"); - --- -2.8.2 - diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch index 1d988182e7..9131d70be6 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch @@ -1,3 +1,6 @@ +From 8ca6b0c72b6b933642ec7c4ebb83734244fec46f Mon Sep 17 00:00:00 2001 +From: "Song.Li" <Song.Li@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 Subject: [PATCH] remove some checks for cross-compiling some lib check is not suitable for @@ -8,15 +11,16 @@ Upstream-Status: Inappropriate [not a real bug,just for cross-compiling] Signed-off-by: Song.Li <Song.Li@windriver.com> Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- - configure.ac | 66 +++++++----------------------------------------------------- - 1 file changed, 7 insertions(+), 59 deletions(-) + configure.ac | 80 +++++----------------------------------------------- + 1 file changed, 7 insertions(+), 73 deletions(-) diff --git a/configure.ac b/configure.ac -index df5ad7a..b72bd4c 100644 +index 7f79563..00b359e 100644 --- a/configure.ac +++ b/configure.ac -@@ -46,57 +46,19 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas +@@ -57,71 +57,20 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas if test "$with_iodbc" != no; then with_unixodbc=no AC_DEFINE(WITH_IODBC, 1, [Define to 1 to build with iODBC support]) @@ -34,6 +38,7 @@ index df5ad7a..b72bd4c 100644 - fi fi + wo_odbc_config=__without_odbc_config if test "$with_unixodbc" != no; then AC_DEFINE(WITH_UNIXODBC, 1, [Define to 1 to build with unixODBC support]) @@ -42,7 +47,9 @@ index df5ad7a..b72bd4c 100644 - else - ODBC_CONFIG=$with_unixodbc - fi -- if test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then +- if test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then +- : +- elif test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then - if test ! -x "${ODBC_CONFIG}"; then - AC_MSG_ERROR([odbc_config not found (required for unixODBC build)]) - fi @@ -62,22 +69,33 @@ index df5ad7a..b72bd4c 100644 - # Linking libiodoc is rather problematic - [ODBC_LIBDIR=`${ODBC_CONFIG} --libs | sed -e "s/^\(-L\|.*[ \t]-L\)\([^ \n\r\f\t]*\).*$/-L\2/"`] - LDFLAGS="$LDFLAGS ${ODBC_LIBDIR}" +- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test +- elif test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then +- ODBC_INCLUDE=/usr/include +- CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" +- ODBC_LIBDiR="" +- LIBODBC="-lodbc" # for regression test - else - ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix` - CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" -- # Linking libodoc is rather problematic +- # Linking libodbc is rather problematic - ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix` -- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" +- if test "${ODBC_LIBDIR}" != ""; then +- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" +- fi +- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test - fi - AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR]) +- AC_MSG_NOTICE([using $LIBODBC for regression test]) -fi +-AC_SUBST(LIBODBC) +ODBC_LIBS="-lodbcinst" +LIBS="$LIBS ${ODBC_LIBS}" +AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS]) # # SQLCOLATTRIBUTE_SQLLEN check -@@ -176,18 +138,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, +@@ -190,19 +139,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, # Find libpq headers and libraries # @@ -87,8 +105,9 @@ index df5ad7a..b72bd4c 100644 - -if test -n "$PG_CONFIG"; then - pg_includedir=`"$PG_CONFIG" --includedir` +- pg_pkg_includedir=`"$PG_CONFIG" --pkgincludedir` - pg_libdir=`"$PG_CONFIG" --libdir` -- CPPFLAGS="$CPPFLAGS -I$pg_includedir" +- CPPFLAGS="$CPPFLAGS -I$pg_includedir -I$pg_pkg_includedir/internal" - LDFLAGS="$LDFLAGS -L$pg_libdir" -fi - @@ -100,7 +119,7 @@ index df5ad7a..b72bd4c 100644 # 1. Programs -@@ -211,12 +165,6 @@ if test "$with_iodbc" != no; then +@@ -226,12 +166,6 @@ if test "$with_iodbc" != no; then [AC_MSG_ERROR([iODBC library "iodbcinst" not found])]) fi @@ -113,6 +132,3 @@ index df5ad7a..b72bd4c 100644 AC_CHECK_LIB(pq, PQsetSingleRowMode, [], [AC_MSG_ERROR([libpq library version >= 9.2 is required])]) --- -2.8.1 - diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb deleted file mode 100644 index 6e1c8ab4a0..0000000000 --- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb +++ /dev/null @@ -1,14 +0,0 @@ -require ${PN}.inc - -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://license.txt;md5=6db3822fc7512e83087ba798da013692" - -SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \ - file://psqlodbc-remove-some-checks-for-cross-compiling.patch \ - file://psqlodbc-donot-use-the-hardcode-libdir.patch \ - file://psqlodbc-fix-for-ptest-support.patch \ - file://run-ptest \ -" - -SRC_URI[md5sum] = "4c6e0b22187d7bb1c998ffac89e50f6b" -SRC_URI[sha256sum] = "9521f328bf28aaaf5c8488dc89792b614f9d6271742c0baf9bb41c97537764a8" diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb index 5337b45695..a1ef8e75e9 100644 --- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc +++ b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb @@ -14,7 +14,19 @@ DESCRIPTION = "\ software to accept ODBC clients. \ " SECTION = "libs" -HOMEPAGE = "http://psqlodbc.projects.postgresql.org/" +HOMEPAGE = "https://odbc.postgresql.org/" + +LICENSE = "LGPL-2.0-only" +LIC_FILES_CHKSUM = "file://license.txt;md5=6db3822fc7512e83087ba798da013692" + +SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \ + file://psqlodbc-remove-some-checks-for-cross-compiling.patch \ + file://psqlodbc-donot-use-the-hardcode-libdir.patch \ + file://psqlodbc-fix-for-ptest-support.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "afd892f89d2ecee8d3f3b2314f1bd5bf2d02201872c6e3431e5c31096eca4c8b" DEPENDS += "postgresql unixodbc" @@ -24,8 +36,7 @@ EXTRA_OECONF = "\ --with-unixodbc=yes \ --with-libpq=${STAGING_LIBDIR}/.. \ --enable-pthreads \ - --disable-unicode \ - LIBS="-lpthread" \ + LIBS='-lpthread' \ " inherit autotools pkgconfig ptest @@ -44,7 +55,8 @@ do_install_ptest() { sed -i -e 's|@LIBDIR@|${libdir}|' ${D}${PTEST_PATH}/odbcini-gen.sh } -FILES_${PN} += "${libdir}" +FILES:${PN} += "${libdir}" # The tests need a local PostgreSQL server running -RDEPENDS_${PN}-ptest = "postgresql" +RDEPENDS:${PN}-ptest += "psqlodbc postgresql diffutils" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils locale-base-en-us glibc-gconv glibc-charmaps" diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch index eb9928a0ca..ba6a2d4fbb 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch @@ -1,4 +1,4 @@ -From cf168ae0b7bceab8432d096719b331f18428fe39 Mon Sep 17 00:00:00 2001 +From 034a9c4ce2ae61cfcffa977f1eb8e6f68947f480 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2020 15:10:37 -0700 Subject: [PATCH] cmake: Add check for atomic support @@ -18,6 +18,7 @@ Fixes | /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_add_8' Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] + Signed-off-by: Khem Raj <raj.khem@gmail.com> --- CMakeLists.txt | 5 +++ @@ -26,10 +27,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> create mode 100644 cmake/modules/CheckAtomic.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt -index f9c8f3346..4d604004b 100644 +index 5cfc1b4803..0a7f820a22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -852,7 +852,12 @@ endif() +@@ -1038,7 +1038,12 @@ set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX}) if(WIN32) set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) else() @@ -41,10 +42,10 @@ index f9c8f3346..4d604004b 100644 + endif() endif() - add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) + set(ROCKSDB_PLUGIN_EXTERNS "") diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake new file mode 100644 -index 000000000..8b7dc8a37 +index 0000000000..8b7dc8a377 --- /dev/null +++ b/cmake/modules/CheckAtomic.cmake @@ -0,0 +1,69 @@ @@ -118,5 +119,5 @@ index 000000000..8b7dc8a37 +endif() + -- -2.28.0 +2.25.1 diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch deleted file mode 100644 index aa291daa3e..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch +++ /dev/null @@ -1,47 +0,0 @@ -From ddcc8a9f7e0f0bfee96f2f0a0c10f21f9fa9b05d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 15 Nov 2020 15:02:28 -0800 -Subject: [PATCH] folly: Use SYS_futex for syscall - -glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there -is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 - -Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7676] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - third-party/folly/folly/detail/Futex.cpp | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/third-party/folly/folly/detail/Futex.cpp b/third-party/folly/folly/detail/Futex.cpp -index 62d6ea2b2..a914a8c73 100644 ---- a/third-party/folly/folly/detail/Futex.cpp -+++ b/third-party/folly/folly/detail/Futex.cpp -@@ -48,9 +48,15 @@ namespace { - #define FUTEX_CLOCK_REALTIME 256 - #endif - -+/// Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and -+/// therefore do not define __NR_futex -+#if !defined(SYS_futex) && defined(SYS_futex_time64) -+# define SYS_futex SYS_futex_time64 -+#endif -+ - int nativeFutexWake(const void* addr, int count, uint32_t wakeMask) { - long rv = syscall( -- __NR_futex, -+ SYS_futex, - addr, /* addr1 */ - FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG, /* op */ - count, /* val */ -@@ -112,7 +118,7 @@ FutexResult nativeFutexWaitImpl( - // Unlike FUTEX_WAIT, FUTEX_WAIT_BITSET requires an absolute timeout - // value - http://locklessinc.com/articles/futex_cheat_sheet/ - long rv = syscall( -- __NR_futex, -+ SYS_futex, - addr, /* addr1 */ - op, /* op */ - expected, /* val */ --- -2.29.2 - diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch new file mode 100644 index 0000000000..342964cf2c --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch @@ -0,0 +1,66 @@ +From 1ba84e1b8d4c9a3ad85dc443b0df4d79c89cca4b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 17 Jun 2021 19:35:01 -0700 +Subject: [PATCH] replace old sync with new atomic builtin equivalents + +Helps compiling with gcc on newer arches e.g. riscv32 where these +__sync* builtins are not implemented atleast for 64bit values + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../range/range_tree/lib/portability/toku_atomic.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +index aaa2298faf..9385902808 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +@@ -77,37 +77,37 @@ template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_fetch_and_add(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_fetch_and_add(addr, diff); ++ return __atomic_fetch_add(addr, diff, 5); + } + template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_add_and_fetch(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_add_and_fetch(addr, diff); ++ return __atomic_add_fetch(addr, diff, 5); + } + template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_fetch_and_sub(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_fetch_and_sub(addr, diff); ++ return __atomic_fetch_sub(addr, diff, 5); + } + template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_sub_and_fetch(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_sub_and_fetch(addr, diff); ++ return __atomic_sub_fetch(addr, diff, 5); + } + template <typename T, typename U, typename V> + __attribute__((always_inline)) static inline T toku_sync_val_compare_and_swap( + T *addr, U oldval, V newval) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_val_compare_and_swap(addr, oldval, newval); ++ return __atomic_compare_exchange(addr, oldval, newval); + } + template <typename T, typename U, typename V> + __attribute__((always_inline)) static inline bool + toku_sync_bool_compare_and_swap(T *addr, U oldval, V newval) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_bool_compare_and_swap(addr, oldval, newval); ++ return static_cast<bool>(__atomic_compare_exchange(addr, oldval, newval)); + } + + // in case you include this but not toku_portability.h +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch index 57433b057a..6b46a1f300 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch @@ -1,4 +1,4 @@ -From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 +From bb3fc86f87a9acc64628e1cb32f5c8a1cfbeb880 Mon Sep 17 00:00:00 2001 From: Pascal Bach <pascal.bach@nextrem.ch> Date: Mon, 12 Oct 2020 21:22:46 +0200 Subject: [PATCH] cmake: Use exported target for bz2 @@ -8,23 +8,14 @@ This is not portable and makes it fail in environment like Yocto. Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] --- - CMakeLists.txt | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) + CMakeLists.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 676192913..801586c30 100644 +index 0a7f820a22..be80edb955 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -32,7 +32,7 @@ - # 3. cmake .. - # 4. make -j - --cmake_minimum_required(VERSION 3.5.1) -+cmake_minimum_required(VERSION 3.7.2) - - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/") - include(ReadVersion) -@@ -148,12 +148,7 @@ else() +@@ -149,12 +149,7 @@ else() if(WITH_BZ2) find_package(BZip2 REQUIRED) add_definitions(-DBZIP2) @@ -39,5 +30,5 @@ index 676192913..801586c30 100644 if(WITH_LZ4) -- -2.28.0 +2.25.1 diff --git a/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch new file mode 100644 index 0000000000..e2f785d7cf --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch @@ -0,0 +1,33 @@ +From bb10f55eb77be7b7eee94cb3506c9cbef8e24099 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 26 Jan 2023 13:00:43 -0800 +Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang + +When testcase is compiled with clang and -msse4.2 -mpclmul is added to +cxxflags then clang -m32 still ends up compiling the test case which is +not correct for i386, therefore depend on yocto to pass the right flags +from environemnt via cflags rather than manufecture them here + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be80edb955..a1bbade81a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,7 +279,7 @@ endif() + + include(CheckCXXSourceCompiles) + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) +-if(NOT MSVC) ++if(NOT MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul") + endif() + +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch new file mode 100644 index 0000000000..5fcf1f7dae --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch @@ -0,0 +1,42 @@ +From c6accd34e8169d7a6b92fc89dce5d4309978e39e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Mar 2024 14:11:09 +0800 +Subject: [PATCH] Implement support for musl/ppc64 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../lock/range/range_tree/lib/portability/toku_time.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index 9b83c53511..0a7488c397 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. + #include <stdint.h> + #include <sys/time.h> + #include <time.h> +-#if defined(__powerpc__) ++#if defined(__powerpc__) && defined(__GLIBC__) + #include <sys/platform/ppc.h> + #endif + +@@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(void) { + uint64_t result; + __asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result)); + return result; +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) && defined(__GLIBC__) + return __ppc_get_timebase(); ++#elif defined(__powerpc64__) || defined(__ppc64__) ++ uint64_t result; ++ asm volatile("mfspr %0, 268" : "=r"(result)); ++ return result; + #elif defined(__s390x__) + uint64_t result; + asm volatile("stckf %0" : "=Q"(result) : : "cc"); +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch b/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch new file mode 100644 index 0000000000..2979b73d2f --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch @@ -0,0 +1,32 @@ +From 2ebc0ff33e41d23e4d3aec1a86f3d8bd4be410e7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Mar 2024 14:14:58 +0800 +Subject: [PATCH] Implement timer implementation for mips platform + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../lock/range/range_tree/lib/portability/toku_time.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index 0a7488c397..ad7d9f2124 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -162,6 +162,12 @@ static inline tokutime_t toku_time_now(void) { + unsigned long result; + asm volatile ("rdtime.d\t%0,$r0" : "=r" (result)); + return result; ++#elif defined(__mips__) ++ // mips apparently only allows rdtsc for superusers, so we fall ++ // back to gettimeofday. It's possible clock_gettime would be better. ++ struct timeval tv; ++ gettimeofday(&tv, nullptr); ++ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; + #else + #error No timer implementation for this platform + #endif +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch new file mode 100644 index 0000000000..0ae673c425 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch @@ -0,0 +1,40 @@ +From 9e274ba2762724f353227b5a3a6e4433f706468a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Mar 2024 14:16:08 +0800 +Subject: [PATCH] Implement timer for arm >= v6 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../range/range_tree/lib/portability/toku_time.h | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index ad7d9f2124..bcb795b7e7 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -168,6 +168,20 @@ static inline tokutime_t toku_time_now(void) { + struct timeval tv; + gettimeofday(&tv, nullptr); + return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; ++#elif (__ARM_ARCH >= 6) ++ uint32_t pmccntr; ++ uint32_t pmuseren; ++ uint32_t pmcntenset; ++ // Read the user mode perf monitor counter access permissions. ++ asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren)); ++ if (pmuseren & 1) { // Allows reading perfmon counters for user mode code. ++ asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset)); ++ if (pmcntenset & 0x80000000ul) { // Is it counting? ++ asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr)); ++ // The counter is set up to count every 64th cycle ++ return (uint64_t)pmccntr * 64; // Should optimize to << 6 ++ } ++ } + #else + #error No timer implementation for this platform + #endif +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch b/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch new file mode 100644 index 0000000000..9ba34450ba --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch @@ -0,0 +1,39 @@ +From ed549d43c8b691cd7891c7e5c76df189feb04b4f Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Sun, 7 Apr 2024 17:16:53 +0800 +Subject: [PATCH] Fix declaration scope of LE_LOAD32 in crc32c + +Fix build error when __SSE4_2__ is defined: +util/crc32c.cc: In function 'void rocksdb::crc32c::DefaultCRC32(uint64_t*, const uint8_t**)': +util/crc32c.cc:267:53: error: 'LE_LOAD32' was not declared in this scope + 267 | *l = _mm_crc32_u32(static_cast<unsigned int>(*l), LE_LOAD32(*p)); + | ^~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/12515] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + util/crc32c.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/crc32c.cc b/util/crc32c.cc +index 38a69bb50..aa13ad882 100644 +--- a/util/crc32c.cc ++++ b/util/crc32c.cc +@@ -242,12 +242,12 @@ static const uint32_t table3_[256] = { + 0xc747336e, 0x1a0299d6, 0x782010ef, 0xa565ba57, 0xbc65029d, 0x6120a825, + 0x0302211c, 0xde478ba4, 0x31035088, 0xec46fa30, 0x8e647309, 0x5321d9b1, + 0x4a21617b, 0x9764cbc3, 0xf54642fa, 0x2803e842}; ++#endif // !__SSE4_2__ + + // Used to fetch a naturally-aligned 32-bit word in little endian byte-order + static inline uint32_t LE_LOAD32(const uint8_t* p) { + return DecodeFixed32(reinterpret_cast<const char*>(p)); + } +-#endif // !__SSE4_2__ + + static inline void DefaultCRC32(uint64_t* l, uint8_t const** p) { + #ifndef __SSE4_2__ +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/static_library_as_option.patch b/meta-oe/recipes-dbs/rocksdb/files/static_library_as_option.patch new file mode 100644 index 0000000000..9a85e8db45 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/static_library_as_option.patch @@ -0,0 +1,71 @@ +From 285d306494bde3e9c24c8cd6fea1eb380a304d03 Mon Sep 17 00:00:00 2001 +From: Bindu-Bhabu <bindudaniel1996@gmail.com> +Date: Fri, 26 Jul 2024 15:14:45 +0530 +Subject: Add option to CMake for building static libraries + +ROCKSDB creates a STATIC library target reference by default. +Modify the cmake so that the STATIC library is also an option +just like creating a SHARED library and set default to ON. + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/12890] + +Signed-off-by: Nisha Parrakat <nisha.m.parrakat@bmw.de> +Signed-off-by: Bindu Bhabu <bhabu.bindu@kpit.com> +--- + CMakeLists.txt | 29 +++++++++++++++++------------ + 1 file changed, 17 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 93b884dd9c1..2ca925d505c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -98,6 +98,7 @@ if (WITH_WINDOWS_UTF8_FILENAMES) + add_definitions(-DROCKSDB_WINDOWS_UTF8_FILENAMES) + endif() + option(ROCKSDB_BUILD_SHARED "Build shared versions of the RocksDB libraries" ON) ++option(ROCKSDB_BUILD_STATIC "Build static versions of the RocksDB libraries" ON) + + if( NOT DEFINED CMAKE_CXX_STANDARD ) + set(CMAKE_CXX_STANDARD 17) +@@ -1139,11 +1140,13 @@ string(REGEX REPLACE "[^0-9: /-]+" "" GIT_DATE "${GIT_DATE}") + set(BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/build_version.cc) + configure_file(util/build_version.cc.in ${BUILD_VERSION_CC} @ONLY) + +-add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) +-target_include_directories(${ROCKSDB_STATIC_LIB} PUBLIC +- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>) +-target_link_libraries(${ROCKSDB_STATIC_LIB} PRIVATE +- ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++if(ROCKSDB_BUILD_STATIC) ++ add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) ++ target_include_directories(${ROCKSDB_STATIC_LIB} PUBLIC ++ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>) ++ target_link_libraries(${ROCKSDB_STATIC_LIB} PRIVATE ++ ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++endif() + + if(ROCKSDB_BUILD_SHARED) + add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES} ${BUILD_VERSION_CC}) +@@ -1238,13 +1241,15 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) + + install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) + +- install( +- TARGETS ${ROCKSDB_STATIC_LIB} +- EXPORT RocksDBTargets +- COMPONENT devel +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +- ) ++ if(ROCKSDB_BUILD_STATIC) ++ install( ++ TARGETS ${ROCKSDB_STATIC_LIB} ++ EXPORT RocksDBTargets ++ COMPONENT devel ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ) ++ endif() + + if(ROCKSDB_BUILD_SHARED) + install( diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.15.5.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_6.15.5.bb deleted file mode 100644 index acef05b015..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.15.5.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "RocksDB an embeddable, persistent key-value store" -DESCRIPTION = "RocksDB is library that provides an embeddable, persistent key-value store for fast storage." -HOMEPAGE = "http://rocksdb.org/" -LICENSE = "(Apache-2.0 | GPL-2.0) & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" - -SRCREV = "abd4b1ff1504ae2a7ed6e60bc9c9797b880c33a5" -SRCBRANCH = "6.15.fb" - -SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ - file://0001-cmake-Add-check-for-atomic-support.patch \ - file://0001-cmake-Use-exported-target-for-bz2.patch \ - file://0001-folly-Use-SYS_futex-for-syscall.patch \ - " - -S = "${WORKDIR}/git" - -inherit cmake - -PACKAGECONFIG ??= "bzip2 zlib lz4 gflags" -PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2" -PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4" -PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib" -PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd" -PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" -PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" - -# Tools and tests currently don't compile on armv5 so we disable them -EXTRA_OECMAKE = "\ - -DPORTABLE=ON \ - -DWITH_TESTS=OFF \ - -DWITH_BENCHMARK_TOOLS=OFF \ - -DWITH_TOOLS=OFF \ - -DFAIL_ON_WARNINGS=OFF \ -" - -do_install_append() { - # fix for qa check buildpaths - sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake -} - -LDFLAGS_append_riscv64 = " -pthread" diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb new file mode 100644 index 0000000000..fae54fdba4 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb @@ -0,0 +1,59 @@ +SUMMARY = "RocksDB an embeddable, persistent key-value store" +DESCRIPTION = "RocksDB is library that provides an embeddable, persistent key-value store for fast storage." +HOMEPAGE = "http://rocksdb.org/" +LICENSE = "(Apache-2.0 | GPL-2.0-only) & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" + +SRCREV = "f4441966592636253fd5ab0bb9ed44fc2697fc53" +SRCBRANCH = "9.0.fb" + +SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \ + file://0001-cmake-Add-check-for-atomic-support.patch \ + file://0002-cmake-Use-exported-target-for-bz2.patch \ + file://0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch \ + file://0004-Implement-support-for-musl-ppc64.patch \ + file://0005-Implement-timer-implementation-for-mips-platform.patch \ + file://0006-Implement-timer-for-arm-v6.patch \ + file://0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch \ + file://static_library_as_option.patch \ + " + +SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" +SRC_URI:append:mips = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" +SRC_URI:append:powerpc = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" +SRC_URI:remove:toolchain-clang:riscv32 = "file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ??= "bzip2 zlib lz4 gflags" +PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2" +PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4" +PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib" +PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd" +PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" +PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" + +# Tools and tests currently don't compile on armv5 so we disable them +EXTRA_OECMAKE = "\ + -DPORTABLE=ON \ + -DWITH_TESTS=OFF \ + -DWITH_BENCHMARK_TOOLS=OFF \ + -DWITH_TOOLS=OFF \ + -DFAIL_ON_WARNINGS=OFF \ + -DROCKSDB_BUILD_STATIC=OFF \ +" + +CXXFLAGS += "${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Og', '-DXXH_NO_INLINE_HINTS', '', d)}" + +do_install:append() { + # Fix for qa check buildpaths + sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake +} + +# Need toku_time_now() implemented for ppc/musl +# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +COMPATIBLE_HOST:libc-musl:powerpc = "null" diff --git a/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch b/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch new file mode 100644 index 0000000000..eb29627c6d --- /dev/null +++ b/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch @@ -0,0 +1,32 @@ +From e5f72c656829402c6f70e7416039bc18f0c26485 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 30 Aug 2022 22:17:14 -0700 +Subject: [PATCH] Do not use std::shuffle with clang 15 + +This fails to compile although its preferred approach for c++11 and +newer + +See +https://github.com/SOCI/soci/issues/984 + +Upstream-Status: Inappropriate [Workaround] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cmake/SociConfig.cmake | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmake/SociConfig.cmake b/cmake/SociConfig.cmake +index 492e1837..f24fd9a6 100644 +--- a/cmake/SociConfig.cmake ++++ b/cmake/SociConfig.cmake +@@ -94,6 +94,7 @@ else() + set(SOCI_CXX11 ON) + set(SOCI_CXX_VERSION_FLAGS "-std=c++11") + add_definitions(-DCATCH_CONFIG_CPP11_NO_IS_ENUM) ++ add_definitions(-DCATCH_CONFIG_CPP11_NO_SHUFFLE) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS}") + +-- +2.37.3 + diff --git a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch b/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch deleted file mode 100644 index 00a1a5c862..0000000000 --- a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch +++ /dev/null @@ -1,28 +0,0 @@ -Define SOCI_LIBDIR only if its not passed via environemnt. In OE we -want to set it per our choice since we use 'lib' for 64bit unless we -are using multilib - --Khem - -Index: soci-3.2.2/CMakeLists.txt -=================================================================== ---- soci-3.2.2.orig/CMakeLists.txt -+++ soci-3.2.2/CMakeLists.txt -@@ -69,11 +69,12 @@ include(SociDependencies) - ############################################################################### - # Installation - ############################################################################### -- --if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -- set(SOCI_LIBDIR "lib") --else() -- set(SOCI_LIBDIR "lib64") -+if(NOT DEFINED SOCI_LIBDIR) -+ if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -+ set(SOCI_LIBDIR "lib") -+ else() -+ set(SOCI_LIBDIR "lib") -+ endif() - endif() - - set(BINDIR "bin" CACHE PATH "The directory to install binaries into.") diff --git a/meta-oe/recipes-dbs/soci/soci_3.2.3.bb b/meta-oe/recipes-dbs/soci/soci_3.2.3.bb deleted file mode 100644 index 3f22d38181..0000000000 --- a/meta-oe/recipes-dbs/soci/soci_3.2.3.bb +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "The C++ Database Access Library" -HOMEPAGE = "http://soci.sourceforge.net" -LICENSE = "BSL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" -SECTION = "libs" -DEPENDS = "boost" - - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz \ - file://soci_libdir.patch \ - " -SRC_URI[md5sum] = "acfbccf176cd20e06833a8037a2d3699" -SRC_URI[sha256sum] = "2c659db0f4f7b424bbcffe195c03c293a1dbf676189a27b077fb2aab4d53a610" - -TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \ - -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" \ - -DSOCI_TEST_MYSQL_CONNSTR:STRING="db=soci_test user=oe password=oe"' - -OBASEDIR ?= "/opt/oracle" -OINCDIR = "rdbms/public" -OLIBDIR = "lib" - -PACKAGECONFIG[sqlite3] = "-DSOCI_SQLITE3=ON,-DSOCI_SQLITE3=OFF,sqlite3," -PACKAGECONFIG[mysql] = "-DSOCI_MYSQL=ON,-DSOCI_MYSQL=OFF,mariadb," -PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgresql," -PACKAGECONFIG[odbc] = "-DSOCI_ODBC=ON,-DSOCI_ODBC=OFF,," -PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,," -PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,," -PACKAGECONFIG[ptest] = "${TESTCONFIG},,," - -# enable your backend by default we enable 'empty' -PACKAGECONFIG ??= "empty" - -# Take the flags added by PACKAGECONFIG and pass them to cmake. -EXTRA_OECMAKE = "${EXTRA_OECONF} -DSOCI_LIBDIR=${libdir}" -DISABLE_STATIC = "" - -inherit dos2unix cmake - -PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle" - -FILES_${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*" -FILES_${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*" -FILES_${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*" -FILES_${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*" -FILES_${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*" diff --git a/meta-oe/recipes-dbs/soci/soci_4.0.3.bb b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb new file mode 100644 index 0000000000..315f5d515e --- /dev/null +++ b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "The C++ Database Access Library" +HOMEPAGE = "http://soci.sourceforge.net" +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" +SECTION = "libs" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz \ + file://0001-Do-not-use-std-shuffle-with-clang-15.patch \ + " +SRC_URI[sha256sum] = "615e5f7e4b52007f3a3b4050a99aadf6346b56b5098eb08b3a650836083c6a33" + +TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \ + -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" \ + -DSOCI_TEST_MYSQL_CONNSTR:STRING="db=soci_test user=oe password=oe"' + +OBASEDIR ?= "/opt/oracle" +OINCDIR = "rdbms/public" +OLIBDIR = "lib" + +PACKAGECONFIG[sqlite3] = "-DWITH_SQLITE3=ON,-DWITH_SQLITE3=OFF,sqlite3," +PACKAGECONFIG[mysql] = "-DWITH_MYSQL=ON,-DWITH_MYSQL=OFF,mariadb," +PACKAGECONFIG[postgresql] = "-DWITH_POSTGRESQL=ON,-DWITH_POSTGRESQL=OFF,postgresql," +PACKAGECONFIG[odbc] = "-DWITH_ODBC=ON,-DWITH_ODBC=OFF,," +PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,," +PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,," +PACKAGECONFIG[firebird] = "-DWITH_FIREBIRD=ON,-DWITH_FIREBIRD=OFF,," +PACKAGECONFIG[boost] = "-DWITH_BOOST=ON,-DWITH_BOOST=OFF,boost" +PACKAGECONFIG[ptest] = "${TESTCONFIG},-DSOCI_TESTS=OFF,," + +# enable your backend by default we enable 'empty' +PACKAGECONFIG ??= "boost empty" + +EXTRA_OECMAKE = "-DWITH_DB2=OFF" +DISABLE_STATIC = "" + +inherit dos2unix cmake + +PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle" + +FILES:${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*" +FILES:${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*" +FILES:${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*" +FILES:${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*" +FILES:${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*" + +do_install:append() { + sed -i 's|${RECIPE_SYSROOT}${prefix}|${_IMPORT_PREFIX}|g' ${D}${libdir}/cmake/SOCI/SOCITargets*.cmake +} diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch deleted file mode 100644 index c5d7c0c81a..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 443980ddc82fb40e2e1f9544f2be169bd23dd246 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 17 Jun 2017 16:49:24 -0700 -Subject: [PATCH] shell.c: Fix format not a string literal warning - -src/shell.c:695:20: error: format not a string literal and no format arguments [-Werror=format-security] -| fprintf(stderr,zHelp); -| ^~~~~ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/shell.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/shell.c b/src/shell.c -index bb46c49..3c6fe0f 100644 ---- a/src/shell.c -+++ b/src/shell.c -@@ -692,7 +692,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ - }else - - if( c=='h' && strncmp(azArg[0], "help", n)==0 ){ -- fprintf(stderr,zHelp); -+ fprintf(stderr, "%s", zHelp); - }else - - if( c=='i' && strncmp(azArg[0], "indices", n)==0 && nArg>1 ){ --- -2.13.1 - diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch deleted file mode 100644 index 914422f1df..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk ---- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000 -+++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000 -@@ -139,7 +139,7 @@ - # This is the default Makefile target. The objects listed here - # are what get build when you type just "make" with no arguments. - # --all: sqlite.h config.h libsqlite.a sqlite$(EXE) -+all: sqlite.h config.h libsqlite.so sqlite$(EXE) - - # Generate the file "last_change" which contains the date of change - # of the most recently modified source code file -@@ -148,13 +148,12 @@ - cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \ - | awk '{print $$5,$$6}' >last_change - --libsqlite.a: $(LIBOBJ) -- $(AR) libsqlite.a $(LIBOBJ) -- $(RANLIB) libsqlite.a -- --sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h -- $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ -- libsqlite.a $(LIBREADLINE) $(THREADLIB) -+libsqlite.so: $(LIBOBJ) -+ $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ) -+ -+sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h -+ $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ -+ -lsqlite $(LIBREADLINE) $(THREADLIB) - - sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \ - $(TOP)/tool/spaceanal.tcl diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch deleted file mode 100644 index b84b6486ef..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk ---- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600 -+++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600 -@@ -58,7 +58,7 @@ - expr.o func.o hash.o insert.o \ - main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \ - select.o table.o tokenize.o trigger.o update.o util.o \ -- vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o -+ vacuum.o vdbe.o vdbeaux.o where.o - - # All of the source code files. - # -@@ -91,7 +91,6 @@ - $(TOP)/src/sqlite.h.in \ - $(TOP)/src/sqliteInt.h \ - $(TOP)/src/table.c \ -- $(TOP)/src/tclsqlite.c \ - $(TOP)/src/tokenize.c \ - $(TOP)/src/trigger.c \ - $(TOP)/src/update.c \ diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc deleted file mode 100644 index 6bc742eecb..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc +++ /dev/null @@ -1,12 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: SQLite -Description: SQL database engine -Version: 2.8.17 -Libs: -L${libdir} -lsqlite -Cflags: -I${includedir} diff --git a/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb b/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb deleted file mode 100644 index 501c0e3e77..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "An Embeddable SQL Database Engine" -HOMEPAGE = "http://www.sqlite.org/" -SECTION = "libs" -DEPENDS = "readline ncurses" -LICENSE = "PD" -LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=10;md5=e98469a8efa024a38ad5b2e4b92f4a96" - -PR = "r7" - -SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \ - file://mainmk_build_dynamic.patch \ - file://mainmk_no_tcl.patch \ - file://sqlite.pc \ - file://0001-shell.c-Fix-format-not-a-string-literal-warning.patch \ - " - -SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \ - expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \ - parse.o pragma.o printf.o random.o select.o table.o tokenize.o \ - trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o" - -inherit autotools pkgconfig - -do_configure() { - echo "main.mk is patched, no need to configure" - # make pkgconfig.bbclass pick this up - cp ${WORKDIR}/sqlite.pc ${S} -} - -do_compile() { - oe_runmake -f ${S}/Makefile.linux-gcc \ - TOP="${S}" \ - BCC="${BUILD_CC}" \ - TCC="${CC}" \ - OPTS="-fPIC -D'INTPTR_TYPE=int'" \ - TCL_FLAGS= LIBTCL= \ - READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \ - LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses" -} - -do_install() { - install -d ${D}${libdir} ${D}${bindir} - install sqlite ${D}${bindir} - install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6 - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0 - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8 - install -d ${D}${includedir} - install -m 0644 sqlite.h ${D}${includedir}/sqlite.h - install -d ${D}${libdir}/pkgconfig - install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc -} - -PACKAGES += "${PN}-bin" -FILES_${PN}-bin = "${bindir}/*" -FILES_${PN} = "${libdir}/*.so.*" - -SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b" -SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37" - -BBCLASSEXTEND = "native" |