diff options
Diffstat (limited to 'meta-oe/recipes-dbs')
65 files changed, 1321 insertions, 1055 deletions
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 b8d355706c..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> --- diff --git a/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb index b2899ec381..5301071516 100644 --- a/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb +++ b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb @@ -27,6 +27,13 @@ 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" @@ -40,7 +47,7 @@ do_install:prepend() { do_install:append() { install -d ${D}${sysconfdir}/influxdb install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb - chown -R root.influxdb ${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 @@ -53,11 +60,15 @@ do_install:append() { 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" 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 87750ec79d..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;branch=master;protocol=https \ - 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" 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 index 2cc98e6d62..3017bcede1 100644 --- 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 @@ -10,6 +10,8 @@ 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/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/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb index b58a36c446..b2f1920f6b 100644 --- a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb +++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb @@ -11,22 +11,21 @@ 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 = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a" +SRCREV = "ce201088de95d26fc0da36ba805bf2ddc2ba74ff" -inherit base ptest +inherit ptest S = "${WORKDIR}/git/libraries/liblmdb" -LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}" - do_compile() { - oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" + 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}" 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 diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.6.4.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.7.bb index e38726d3f9..578357b480 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb-native_10.6.4.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.7.bb @@ -2,7 +2,9 @@ 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} = "" PACKAGES = "" @@ -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 51e6ddbf71..33da32fb28 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -1,7 +1,7 @@ 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://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ @@ -12,7 +12,6 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://mysql-systemd-start \ file://configure.cmake-fix-valgrind.patch \ file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \ - file://c11_atomics.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 \ @@ -20,11 +19,15 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://ssize_t.patch \ file://mm_malloc.patch \ file://sys_futex.patch \ - file://0001-MDEV-25785-Add-support-for-OpenSSL-3.0.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 \ + file://0001-Remove-the-compile_time_assert-lines.patch \ + file://0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch \ " SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" - -SRC_URI[sha256sum] = "75bf9b147a95d38160d01a73b098d50a1960563b46d16a235971fff64d99643c" +SRC_URI[sha256sum] = "5239a245ed90517e96396605cd01ccd8f73cd7442d1b3076b6ffe258110e5157" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" @@ -32,7 +35,7 @@ S = "${WORKDIR}/mariadb-${PV}" 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 pkgconfig MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ ${PN}-setupdb:${bindir}/mariadb-install-db" @@ -41,10 +44,6 @@ 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}-setupdb" -USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" -GROUPADD_PARAM:${PN}-setupdb = "--system mysql" - INITSCRIPT_NAME:${PN}-setupdb = "install_db" INITSCRIPT_PARAMS:${PN}-setupdb ?= "defaults 44 44" @@ -62,20 +61,26 @@ FILES:${PN}-setupdb = "${sysconfdir}/init.d/install_db \ ${bindir}/mysql-systemd-start \ " -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} lz4 openssl" +EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" + PACKAGECONFIG:class-native = "" -PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" +PACKAGECONFIG[pam] = "-DPLUGIN_AUTH_PAM=YES,-DPLUGIN_AUTH_PAM=NO,libpam" PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" PACKAGECONFIG[krb5] = ", ,krb5" -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" + EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DWITH_JEMALLOC=no \ -DWITHOUT_TOKUDB=TRUE \ @@ -92,9 +97,10 @@ 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}" -EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper " # With Ninja it fails with: # make: *** No rule to make target `install'. Stop. @@ -103,6 +109,11 @@ OECMAKE_GENERATOR = "Unix Makefiles" ARM_INSTRUCTION_SET:armv4 = "arm" ARM_INSTRUCTION_SET:armv5 = "arm" +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'` @@ -118,18 +129,12 @@ do_generate_toolchain_file:append:class-native () { sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake } -do_configure:prepend:class-target () { - # Write out a qemu wrapper that will be used by cmake - # so that it can run target helper binaries through that. - qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" - cat > ${WORKDIR}/qemuwrapper << EOF -#!/bin/sh -$qemu_binary "\$@" -EOF - chmod +x ${WORKDIR}/qemuwrapper -} 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 @@ -139,6 +144,7 @@ do_compile:prepend:class-target () { echo "#endif" >>${B}/include/openssl/kssl.h fi fi + install -D ${RECIPE_SYSROOT_NATIVE}/usr/bin/uca-dump ${B}/strings/uca-dump } SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" @@ -173,6 +179,13 @@ do_install() { 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 @@ -203,7 +216,7 @@ RDEPENDS:${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ 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" + ${PN}-client ${PN}-setupdb libdbi-perl libdbd-mysql-perl 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 \ @@ -215,6 +228,17 @@ RDEPENDS:${PN}-setupdb = "coreutils" # Allow old code to link to the backward compatible library 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 = "\ ${libdir}/libmysqlclient.so.* \ ${libdir}/libmariadb.so.* \ 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-MDEV-25785-Add-support-for-OpenSSL-3.0.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-25785-Add-support-for-OpenSSL-3.0.patch deleted file mode 100644 index ab6811c0f5..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-25785-Add-support-for-OpenSSL-3.0.patch +++ /dev/null @@ -1,381 +0,0 @@ -From 1b238e343506b43825092941d4cd294d9b866bef Mon Sep 17 00:00:00 2001 -From: Vladislav Vaintroub <wlad@mariadb.com> -Date: Mon, 8 Nov 2021 18:48:19 +0100 -Subject: [PATCH] MDEV-25785 Add support for OpenSSL 3.0 - -Summary of changes - -- MD_CTX_SIZE is increased - -- EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points - to nobody knows where. The assumption made previously was that - (since the function does not seem to be documented) - was that it points to the last partial source block. - Add own partial block buffer for NOPAD encryption instead - -- SECLEVEL in CipherString in openssl.cnf - had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible - (according to https://github.com/openssl/openssl/blob/openssl-3.0.0/NEWS.md - even though the manual for SSL_CTX_get_security_level claims that it - should not be necessary) - -- Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers, - in addition to what was set in --ssl-cipher - -- ctx_buf buffer now must be aligned to 16 bytes with openssl( - previously with WolfSSL only), ot crashes will happen - -- updated aes-t , to be better debuggable - using function, rather than a huge multiline macro - added test that does "nopad" encryption piece-wise, to test - replacement of EVP_CIPHER_CTX_buf_noconst - -Upstream-Status: Backport [https://github.com/MariaDB/server/commit/1b238e343506b43825092941d4cd294d9b866bef] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - cmake/ssl.cmake | 8 ++ - include/ssl_compat.h | 3 +- - mysql-test/lib/openssl.cnf | 2 +- - mysql-test/main/ssl_cipher.result | 6 +- - mysql-test/main/ssl_cipher.test | 2 +- - mysys_ssl/my_crypt.cc | 46 +++++++----- - unittest/mysys/aes-t.c | 121 ++++++++++++++++++++++-------- - 7 files changed, 133 insertions(+), 55 deletions(-) - -diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake -index 7c2488be8bd..1bd46bc0f39 100644 ---- a/cmake/ssl.cmake -+++ b/cmake/ssl.cmake -@@ -139,6 +139,13 @@ MACRO (MYSQL_CHECK_SSL) - SET(SSL_INTERNAL_INCLUDE_DIRS "") - SET(SSL_DEFINES "-DHAVE_OPENSSL") - -+ # Silence "deprecated in OpenSSL 3.0" -+ IF((NOT OPENSSL_VERSION) # 3.0 not determined by older cmake -+ OR NOT(OPENSSL_VERSION VERSION_LESS "3.0.0")) -+ SET(SSL_DEFINES "${SSL_DEFINES} -DOPENSSL_API_COMPAT=0x10100000L") -+ SET(CMAKE_REQUIRED_DEFINITIONS -DOPENSSL_API_COMPAT=0x10100000L) -+ ENDIF() -+ - SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) - SET(CMAKE_REQUIRED_LIBRARIES ${SSL_LIBRARIES}) - SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) -@@ -152,6 +159,7 @@ MACRO (MYSQL_CHECK_SSL) - HAVE_X509_check_host) - SET(CMAKE_REQUIRED_INCLUDES) - SET(CMAKE_REQUIRED_LIBRARIES) -+ SET(CMAKE_REQUIRED_DEFINITIONS) - ELSE() - IF(WITH_SSL STREQUAL "system") - MESSAGE(FATAL_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support") -diff --git a/include/ssl_compat.h b/include/ssl_compat.h -index 9f4b6be8d95..affa9f2a448 100644 ---- a/include/ssl_compat.h -+++ b/include/ssl_compat.h -@@ -24,7 +24,7 @@ - #define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION) - #define ERR_remove_state(X) ERR_clear_error() - #define EVP_CIPHER_CTX_SIZE 176 --#define EVP_MD_CTX_SIZE 48 -+#define EVP_MD_CTX_SIZE 72 - #undef EVP_MD_CTX_init - #define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0) - #undef EVP_CIPHER_CTX_init -@@ -74,7 +74,6 @@ - #endif - - #define DH_set0_pqg(D,P,Q,G) ((D)->p= (P), (D)->g= (G)) --#define EVP_CIPHER_CTX_buf_noconst(ctx) ((ctx)->buf) - #define EVP_CIPHER_CTX_encrypting(ctx) ((ctx)->encrypt) - #define EVP_CIPHER_CTX_SIZE sizeof(EVP_CIPHER_CTX) - -diff --git a/mysql-test/lib/openssl.cnf b/mysql-test/lib/openssl.cnf -index b9ab37ac3a1..7cd6f748af2 100644 ---- a/mysql-test/lib/openssl.cnf -+++ b/mysql-test/lib/openssl.cnf -@@ -9,4 +9,4 @@ ssl_conf = ssl_section - system_default = system_default_section - - [system_default_section] --CipherString = ALL:@SECLEVEL=1 -+CipherString = ALL:@SECLEVEL=0 -diff --git a/mysql-test/main/ssl_cipher.result b/mysql-test/main/ssl_cipher.result -index 930d384eda9..66d817b7b41 100644 ---- a/mysql-test/main/ssl_cipher.result -+++ b/mysql-test/main/ssl_cipher.result -@@ -61,8 +61,8 @@ connect ssl_con,localhost,root,,,,,SSL; - SHOW STATUS LIKE 'Ssl_cipher'; - Variable_name Value - Ssl_cipher AES128-SHA --SHOW STATUS LIKE 'Ssl_cipher_list'; --Variable_name Value --Ssl_cipher_list AES128-SHA -+SELECT VARIABLE_VALUE like '%AES128-SHA%' FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher_list'; -+VARIABLE_VALUE like '%AES128-SHA%' -+1 - disconnect ssl_con; - connection default; -diff --git a/mysql-test/main/ssl_cipher.test b/mysql-test/main/ssl_cipher.test -index 36549d76d02..d4cdcffb276 100644 ---- a/mysql-test/main/ssl_cipher.test -+++ b/mysql-test/main/ssl_cipher.test -@@ -98,6 +98,6 @@ let $restart_parameters=--ssl-cipher=AES128-SHA; - source include/restart_mysqld.inc; - connect (ssl_con,localhost,root,,,,,SSL); - SHOW STATUS LIKE 'Ssl_cipher'; --SHOW STATUS LIKE 'Ssl_cipher_list'; -+SELECT VARIABLE_VALUE like '%AES128-SHA%' FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher_list'; - disconnect ssl_con; - connection default; -diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc -index e512eee9066..4d7ebc7bd27 100644 ---- a/mysys_ssl/my_crypt.cc -+++ b/mysys_ssl/my_crypt.cc -@@ -29,11 +29,7 @@ - #include <ssl_compat.h> - #include <cstdint> - --#ifdef HAVE_WOLFSSL - #define CTX_ALIGN 16 --#else --#define CTX_ALIGN 0 --#endif - - class MyCTX - { -@@ -100,8 +96,9 @@ class MyCTX_nopad : public MyCTX - { - public: - const uchar *key; -- uint klen, buf_len; -+ uint klen, source_tail_len; - uchar oiv[MY_AES_BLOCK_SIZE]; -+ uchar source_tail[MY_AES_BLOCK_SIZE]; - - MyCTX_nopad() : MyCTX() { } - ~MyCTX_nopad() { } -@@ -112,7 +109,7 @@ class MyCTX_nopad : public MyCTX - compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad)); - this->key= key; - this->klen= klen; -- this->buf_len= 0; -+ this->source_tail_len= 0; - if (ivlen) - memcpy(oiv, iv, ivlen); - DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv)); -@@ -123,26 +120,41 @@ class MyCTX_nopad : public MyCTX - return res; - } - -+ /** Update last partial source block, stored in source_tail array. */ -+ void update_source_tail(const uchar* src, uint slen) -+ { -+ if (!slen) -+ return; -+ uint new_tail_len= (source_tail_len + slen) % MY_AES_BLOCK_SIZE; -+ if (new_tail_len) -+ { -+ if (slen + source_tail_len < MY_AES_BLOCK_SIZE) -+ { -+ memcpy(source_tail + source_tail_len, src, slen); -+ } -+ else -+ { -+ DBUG_ASSERT(slen > new_tail_len); -+ memcpy(source_tail, src + slen - new_tail_len, new_tail_len); -+ } -+ } -+ source_tail_len= new_tail_len; -+ } -+ - int update(const uchar *src, uint slen, uchar *dst, uint *dlen) - { -- buf_len+= slen; -+ update_source_tail(src, slen); - return MyCTX::update(src, slen, dst, dlen); - } - - int finish(uchar *dst, uint *dlen) - { -- buf_len %= MY_AES_BLOCK_SIZE; -- if (buf_len) -+ if (source_tail_len) - { -- uchar *buf= EVP_CIPHER_CTX_buf_noconst(ctx); - /* - Not much we can do, block ciphers cannot encrypt data that aren't - a multiple of the block length. At least not without padding. - Let's do something CTR-like for the last partial block. -- -- NOTE this assumes that there are only buf_len bytes in the buf. -- If OpenSSL will change that, we'll need to change the implementation -- of this class too. - */ - uchar mask[MY_AES_BLOCK_SIZE]; - uint mlen; -@@ -154,10 +166,10 @@ class MyCTX_nopad : public MyCTX - return rc; - DBUG_ASSERT(mlen == sizeof(mask)); - -- for (uint i=0; i < buf_len; i++) -- dst[i]= buf[i] ^ mask[i]; -+ for (uint i=0; i < source_tail_len; i++) -+ dst[i]= source_tail[i] ^ mask[i]; - } -- *dlen= buf_len; -+ *dlen= source_tail_len; - return MY_AES_OK; - } - }; -diff --git a/unittest/mysys/aes-t.c b/unittest/mysys/aes-t.c -index 34704e06749..cbec2760941 100644 ---- a/unittest/mysys/aes-t.c -+++ b/unittest/mysys/aes-t.c -@@ -21,27 +21,96 @@ - #include <string.h> - #include <ctype.h> - --#define DO_TEST(mode, nopad, slen, fill, dlen, hash) \ -- SKIP_BLOCK_IF(mode == 0xDEADBEAF, nopad ? 4 : 5, #mode " not supported") \ -- { \ -- memset(src, fill, src_len= slen); \ -- ok(my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_ENCRYPT, \ -- src, src_len, dst, &dst_len, \ -- key, sizeof(key), iv, sizeof(iv)) == MY_AES_OK, \ -- "encrypt " #mode " %u %s", src_len, nopad ? "nopad" : "pad"); \ -- if (!nopad) \ -- ok (dst_len == my_aes_get_size(mode, src_len), "my_aes_get_size");\ -- my_md5(md5, (char*)dst, dst_len); \ -- ok(dst_len == dlen && memcmp(md5, hash, sizeof(md5)) == 0, "md5"); \ -- ok(my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_DECRYPT, \ -- dst, dst_len, ddst, &ddst_len, \ -- key, sizeof(key), iv, sizeof(iv)) == MY_AES_OK, \ -- "decrypt " #mode " %u", dst_len); \ -- ok(ddst_len == src_len && memcmp(src, ddst, src_len) == 0, "memcmp"); \ -+ -+/** Test streaming encryption, bytewise update.*/ -+static int aes_crypt_bytewise(enum my_aes_mode mode, int flags, const unsigned char *src, -+ unsigned int slen, unsigned char *dst, unsigned int *dlen, -+ const unsigned char *key, unsigned int klen, -+ const unsigned char *iv, unsigned int ivlen) -+{ -+ /* Allocate context on odd address on stack, in order to -+ catch misalignment errors.*/ -+ void *ctx= (char *)alloca(MY_AES_CTX_SIZE+1)+1; -+ -+ int res1, res2; -+ uint d1= 0, d2; -+ uint i; -+ -+ if ((res1= my_aes_crypt_init(ctx, mode, flags, key, klen, iv, ivlen))) -+ return res1; -+ for (i= 0; i < slen; i++) -+ { -+ uint tmp_d1=0; -+ res1= my_aes_crypt_update(ctx, src+i,1, dst, &tmp_d1); -+ if (res1) -+ return res1; -+ d1+= tmp_d1; -+ dst+= tmp_d1; -+ } -+ res2= my_aes_crypt_finish(ctx, dst, &d2); -+ *dlen= d1 + d2; -+ return res1 ? res1 : res2; -+} -+ -+ -+#ifndef HAVE_EncryptAes128Ctr -+const uint MY_AES_CTR=0xDEADBEAF; -+#endif -+#ifndef HAVE_EncryptAes128Gcm -+const uint MY_AES_GCM=0xDEADBEAF; -+#endif -+ -+#define MY_AES_UNSUPPORTED(x) (x == 0xDEADBEAF) -+ -+static void do_test(uint mode, const char *mode_str, int nopad, uint slen, -+ char fill, size_t dlen, const char *hash) -+{ -+ uchar key[16]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}; -+ uchar iv[16]= {2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7}; -+ uchar src[1000], dst[1100], dst2[1100], ddst[1000]; -+ uchar md5[MY_MD5_HASH_SIZE]; -+ uint src_len, dst_len, dst_len2, ddst_len; -+ int result; -+ -+ if (MY_AES_UNSUPPORTED(mode)) -+ { -+ skip(nopad?7:6, "%s not supported", mode_str); -+ return; -+ } -+ memset(src, fill, src_len= slen); -+ result= my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_ENCRYPT, src, src_len, -+ dst, &dst_len, key, sizeof(key), iv, sizeof(iv)); -+ ok(result == MY_AES_OK, "encrypt %s %u %s", mode_str, src_len, -+ nopad ? "nopad" : "pad"); -+ -+ if (nopad) -+ { -+ result= aes_crypt_bytewise(mode, nopad | ENCRYPTION_FLAG_ENCRYPT, src, -+ src_len, dst2, &dst_len2, key, sizeof(key), -+ iv, sizeof(iv)); -+ ok(result == MY_AES_OK, "encrypt bytewise %s %u", mode_str, src_len); -+ /* Compare with non-bytewise encryption result*/ -+ ok(dst_len == dst_len2 && memcmp(dst, dst2, dst_len) == 0, -+ "memcmp bytewise %s %u", mode_str, src_len); -+ } -+ else -+ { -+ int dst_len_real= my_aes_get_size(mode, src_len); -+ ok(dst_len_real= dst_len, "my_aes_get_size"); - } -+ my_md5(md5, (char *) dst, dst_len); -+ ok(dst_len == dlen, "md5 len"); -+ ok(memcmp(md5, hash, sizeof(md5)) == 0, "md5"); -+ result= my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_DECRYPT, -+ dst, dst_len, ddst, &ddst_len, key, sizeof(key), iv, -+ sizeof(iv)); -+ -+ ok(result == MY_AES_OK, "decrypt %s %u", mode_str, dst_len); -+ ok(ddst_len == src_len && memcmp(src, ddst, src_len) == 0, "memcmp"); -+} - --#define DO_TEST_P(M,S,F,D,H) DO_TEST(M,0,S,F,D,H) --#define DO_TEST_N(M,S,F,D,H) DO_TEST(M,ENCRYPTION_FLAG_NOPAD,S,F,D,H) -+#define DO_TEST_P(M, S, F, D, H) do_test(M, #M, 0, S, F, D, H) -+#define DO_TEST_N(M, S, F, D, H) do_test(M, #M, ENCRYPTION_FLAG_NOPAD, S, F, D, H) - - /* useful macro for debugging */ - #define PRINT_MD5() \ -@@ -53,25 +122,15 @@ - printf("\"\n"); \ - } while(0); - --#ifndef HAVE_EncryptAes128Ctr --const uint MY_AES_CTR=0xDEADBEAF; --#endif --#ifndef HAVE_EncryptAes128Gcm --const uint MY_AES_GCM=0xDEADBEAF; --#endif - - int - main(int argc __attribute__((unused)),char *argv[]) - { -- uchar key[16]= {1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6}; -- uchar iv[16]= {2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7}; -- uchar src[1000], dst[1100], ddst[1000]; -- uchar md5[MY_MD5_HASH_SIZE]; -- uint src_len, dst_len, ddst_len; - - MY_INIT(argv[0]); - -- plan(87); -+ plan(122); -+ - DO_TEST_P(MY_AES_ECB, 200, '.', 208, "\xd8\x73\x8e\x3a\xbc\x66\x99\x13\x7f\x90\x23\x52\xee\x97\x6f\x9a"); - DO_TEST_P(MY_AES_ECB, 128, '?', 144, "\x19\x58\x33\x85\x4c\xaa\x7f\x06\xd1\xb2\xec\xd7\xb7\x6a\xa9\x5b"); - DO_TEST_P(MY_AES_CBC, 159, '%', 160, "\x4b\x03\x18\x3d\xf1\xa7\xcd\xa1\x46\xb3\xc6\x8a\x92\xc0\x0f\xc9"); --- -2.17.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch new file mode 100644 index 0000000000..3e42535dad --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch @@ -0,0 +1,170 @@ +From dae52f5916ef59434c93f0b716270f59dd0c3a94 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar <jtojnar@gmail.com> +Date: Sun, 7 Jan 2024 10:19:54 +0100 +Subject: [PATCH] MDEV-33439 Fix build with libxml2 2.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libxml2 2.12.0 made `xmlGetLastError()` return `const` pointer: + +https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711 + +Clang 16 does not like this: + + error: assigning to 'xmlErrorPtr' (aka '_xmlError *') from 'const xmlError *' (aka 'const _xmlError *') discards qualifiers + error: cannot initialize a variable of type 'xmlErrorPtr' (aka '_xmlError *') with an rvalue of type 'const xmlError *' (aka 'const _xmlError *') + +Let’s update the variables to `const`. +For older versions, it will be automatically converted. + +But then `xmlResetError(xmlError*)` will not like the `const` pointer: + + error: no matching function for call to 'xmlResetError' + note: candidate function not viable: 1st argument ('const xmlError *' (aka 'const _xmlError *')) would lose const qualifier + +Let’s replace it with `xmlResetLastError()`. + +ALso remove `LIBXMLDOC::Xerr` protected member property. +It was introduced in 65b0e5455b547a3d574fa77b34cce23ae3bea0a0 +along with the `xmlResetError` calls. +It does not appear to be used for anything. + +Upstream-Status: Backport [https://github.com/MariaDB/server/pull/2983] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + storage/connect/libdoc.cpp | 39 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 20 deletions(-) + +diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp +index 67f22ce2..ab588dd4 100644 +--- a/storage/connect/libdoc.cpp ++++ b/storage/connect/libdoc.cpp +@@ -93,7 +93,6 @@ class LIBXMLDOC : public XMLDOCUMENT { + xmlXPathContextPtr Ctxp; + xmlXPathObjectPtr Xop; + xmlXPathObjectPtr NlXop; +- xmlErrorPtr Xerr; + char *Buf; // Temporary + bool Nofreelist; + }; // end of class LIBXMLDOC +@@ -327,7 +326,6 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp) + Ctxp = NULL; + Xop = NULL; + NlXop = NULL; +- Xerr = NULL; + Buf = NULL; + Nofreelist = false; + } // end of LIBXMLDOC constructor +@@ -365,8 +363,8 @@ bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn) + Encoding = (char*)Docp->encoding; + + return false; +- } else if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ } else if (xmlGetLastError()) ++ xmlResetLastError(); + + return true; + } // end of ParseFile +@@ -505,9 +503,9 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn) + #if 1 + // This function does not crash ( + if (xmlSaveFormatFileEnc((const char *)ofn, Docp, Encoding, 0) < 0) { +- xmlErrorPtr err = xmlGetLastError(); ++ const xmlError *err = xmlGetLastError(); + strcpy(g->Message, (err) ? err->message : "Error saving XML doc"); +- xmlResetError(Xerr); ++ xmlResetLastError(); + rc = -1; + } // endif Save + // rc = xmlDocDump(of, Docp); +@@ -546,8 +544,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (Nlist) { + xmlXPathFreeNodeSet(Nlist); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + Nlist = NULL; + } // endif Nlist +@@ -555,8 +553,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (Xop) { + xmlXPathFreeObject(Xop); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + Xop = NULL; + } // endif Xop +@@ -564,8 +562,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (NlXop) { + xmlXPathFreeObject(NlXop); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + NlXop = NULL; + } // endif NlXop +@@ -573,8 +571,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (Ctxp) { + xmlXPathFreeContext(Ctxp); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + Ctxp = NULL; + } // endif Ctxp +@@ -590,6 +588,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + /******************************************************************/ + xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp) + { ++ const xmlError *xerr; + xmlNodeSetPtr nl; + + if (trace(1)) +@@ -649,11 +648,11 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp) + } else + xmlXPathFreeObject(Xop); // Caused node not found + +- if ((Xerr = xmlGetLastError())) { +- strcpy(g->Message, Xerr->message); +- xmlResetError(Xerr); ++ if ((xerr = xmlGetLastError())) { ++ strcpy(g->Message, xerr->message); ++ xmlResetLastError(); + return NULL; +- } // endif Xerr ++ } // endif xerr + + } // endif Xop + +@@ -1079,7 +1078,7 @@ void XML2NODE::AddText(PGLOBAL g, PCSZ txtp) + /******************************************************************/ + void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp) + { +- xmlErrorPtr xerr; ++ const xmlError *xerr; + + if (trace(1)) + htrc("DeleteChild: node=%p\n", dnp); +@@ -1122,7 +1121,7 @@ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp) + if (trace(1)) + htrc("DeleteChild: errmsg=%-.256s\n", xerr->message); + +- xmlResetError(xerr); ++ xmlResetLastError(); + } // end of DeleteChild + + /* -------------------- class XML2NODELIST ---------------------- */ +-- +2.44.0 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch new file mode 100644 index 0000000000..9a6e28297b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch @@ -0,0 +1,43 @@ +From cc5f1d0759b367265a1a000287e2ec15c31eb518 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Mon, 26 Feb 2024 14:56:02 +0800 +Subject: [PATCH] Remove the compile_time_assert lines + +Remove the problematic compile_time_assert lines to fix the below build +failure on 32-bit arm. + In file included from TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/mariadb/10.11.7/mariadb-10.11.7/tests/mysql_client_test.c:38: + TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/mariadb/10.11.7/mariadb-10.11.7/tests/mysql_client_fw.c:1438:3: error: 'compile_time_assert' declared as an array with a negative size + 1438 | compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Inappropriate [Upstream will bring the asset back + in a new way [1]] +[1] https://jira.mariadb.org/browse/MDEV-33429 + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + tests/mysql_client_fw.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c +index c9e64678..5c0c7ce2 100644 +--- a/tests/mysql_client_fw.c ++++ b/tests/mysql_client_fw.c +@@ -1430,14 +1430,6 @@ int main(int argc, char **argv) + tests_to_run[i]= NULL; + } + +-#ifdef _WIN32 +- /* must be the same in C/C and embedded, 1208 on 64bit, 968 on 32bit */ +- compile_time_assert(sizeof(MYSQL) == 60*sizeof(void*)+728); +-#else +- /* must be the same in C/C and embedded, 1272 on 64bit, 964 on 32bit */ +- compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656); +-#endif +- + if (mysql_server_init(embedded_server_arg_count, + embedded_server_args, + (char**) embedded_server_groups)) +-- +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 index 6ed174113b..aba9b9d966 100644 --- 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 @@ -13,6 +13,8 @@ tpool/aio_linux.cc:63:20: error: '__NR_io_getevents' was not declared in this sc 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/meta-oe/recipes-dbs/mysql/mariadb/0001-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 new file mode 100644 index 0000000000..456a2bad64 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch @@ -0,0 +1,69 @@ +From f92f657973997df30afdb0032c88ad3a14ead46b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +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. +| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_hash', needed by 'sql/lex_hash.h'. Stop. +| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_token', needed by 'sql/lex_token.h'. Stop. + +Upstream-Status: Inappropriate [oe build specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + sql/CMakeLists.txt | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) + +diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt +index 241b482..27a3991 100644 +--- a/sql/CMakeLists.txt ++++ b/sql/CMakeLists.txt +@@ -60,11 +60,18 @@ ${CMAKE_BINARY_DIR}/sql + ${CMAKE_SOURCE_DIR}/tpool + ) + +-ADD_CUSTOM_COMMAND( +- 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 ++) ++ELSE() ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h ++ COMMAND gen_lex_token > lex_token.h + ) ++ENDIF() + + 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() + +-ADD_CUSTOM_COMMAND( +- 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 ++) ++ELSE() ++ ADD_CUSTOM_COMMAND( ++ 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) + SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") +-- +2.25.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 1c76ab3918..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 4fc324a9..23a2ea91 100644 ---- a/configure.cmake -+++ b/configure.cmake -@@ -862,7 +862,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 6aab788f..91b9c393 100644 ---- a/mysys/CMakeLists.txt -+++ b/mysys/CMakeLists.txt -@@ -154,6 +154,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 b9cd418f..d42e5017 100644 ---- a/sql/CMakeLists.txt -+++ b/sql/CMakeLists.txt -@@ -222,6 +222,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 OR CMAKE_SYSTEM_NAME MATCHES AIX) - SET(libs_to_export_symbols sql mysys dbug strings) - # Create shared library of already compiled object --- -2.25.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch new file mode 100644 index 0000000000..d0d6e3c730 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch @@ -0,0 +1,34 @@ +From 80be37351d995654f86b838f6b5ed47e8a90261b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +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. + +Upstream-Status: Inappropriate [oe specific] + +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 f9e2b1b..34924ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -394,11 +394,6 @@ CHECK_LIBFMT() + ADD_SUBDIRECTORY(tpool) + CHECK_SYSTEMD() + +-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() +- + # + # Setup maintainer mode options. Platform checks are + # not run with the warning options as to not perturb fragile checks +-- +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 index 347fcd8516..6aa6c84882 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h +++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h @@ -5,7 +5,7 @@ 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 index a4deee6070..3787b74ad1 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Remove glibc specific function dependencies Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch 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/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_10.11.7.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.7.bb new file mode 100644 index 0000000000..b1d1355e2b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.7.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.6.4.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.6.4.bb deleted file mode 100644 index 04dfb42234..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb_10.6.4.bb +++ /dev/null @@ -1,27 +0,0 @@ -require mariadb.inc - -inherit qemu - -DEPENDS += "qemu-native bison-native boost 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 43fc69073f..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,7 +16,7 @@ SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e S = "${WORKDIR}/${SRCNAME}-${PV}" -PNBLACKLIST[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)}" +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)} 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 db9769f82e..d76d1991b6 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 eba2c940afcd83521f591ccf6b49eca06908ea8e 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,24 +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(-) -diff --git a/configure.in b/configure.in -index fb14dcc..a2b4a4f 100644 ---- a/configure.in -+++ b/configure.in +diff --git a/configure.ac b/configure.ac +index 401ce30..27f382d 100644 +--- a/configure.ac ++++ b/configure.ac @@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros - AC_INIT([PostgreSQL], [13.4], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + AC_INIT([PostgreSQL], [16.2], [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.17.1 +2.25.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..fa46912eef 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 +@@ -2261,7 +2261,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 e609ac33e5..e29a5bef77 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 readline tzcode-native" 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,15 +35,15 @@ 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 cpan-base multilib_header CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" 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} () { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then if [ -n "$D" ]; then @@ -53,23 +53,30 @@ 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 \ +" 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" EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ --datadir=${datadir}/${BPN} \ --sysconfdir=${sysconfdir}/${BPN} \ " EXTRA_OECONF:sh4 += "--disable-spinlocks" -EXTRA_OECONF:aarch64 += "--disable-spinlocks" DEBUG_OPTIMIZATION:remove:mips = " -Og" DEBUG_OPTIMIZATION:append:mips = " -O" @@ -178,6 +185,7 @@ INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." 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 @@ -200,7 +208,7 @@ do_install:append() { # multiple server config directory install -d -m 700 ${D}${sysconfdir}/default/${BPN} - if [ "${@d.getVar('enable_pam')}" = "pam" ]; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/pam.d install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql fi @@ -210,11 +218,29 @@ do_install:append() { install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system sed -i -e 's,@BINDIR@,${bindir},g' \ ${D}${systemd_unitdir}/system/postgresql.service + # Remove the build path + if [ -f ${D}${libdir}/${BPN}/pgxs/src/Makefile.global ]; then + sed -i -e 's#${RECIPE_SYSROOT}##g' \ + -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ + -e 's#${WORKDIR}##g' \ + -e 's#${TMPDIR}##g' \ + ${D}${libdir}/${BPN}/pgxs/src/Makefile.global + fi } SSTATE_SCAN_FILES += "Makefile.global" 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 \ libecpg libecpg-dev libecpg-staticdev libecpg-doc \ diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_13.4.bb b/meta-oe/recipes-dbs/postgresql/postgresql_13.4.bb deleted file mode 100644 index f63d23dbef..0000000000 --- a/meta-oe/recipes-dbs/postgresql/postgresql_13.4.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] = "ea93e10390245f1ce461a54eb5f99a48d8cabd3a08ce4d652ec2169a357bc0cd" diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb b/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb new file mode 100644 index 0000000000..31f83a564b --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/postgresql_16.2.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] = "446e88294dbc2c9085ab4b7061a646fa604b4bec03521d5ea671c2e5ad9b2952" + +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 ae20a72a11..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 @@ -47,4 +58,5 @@ do_install_ptest() { 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 8bdd27ff25..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 +++ @@ -25,9 +26,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 74 insertions(+) create mode 100644 cmake/modules/CheckAtomic.cmake +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cfc1b4803..0a7f820a22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -935,7 +935,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() @@ -39,7 +42,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> + endif() endif() - add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) + set(ROCKSDB_PLUGIN_EXTERNS "") +diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake +new file mode 100644 +index 0000000000..8b7dc8a377 --- /dev/null +++ b/cmake/modules/CheckAtomic.cmake @@ -0,0 +1,69 @@ @@ -112,3 +118,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> + endif() +endif() + +-- +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 9c70d4f6a6..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch +++ /dev/null @@ -1,42 +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(-) - ---- 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 */ diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch deleted file mode 100644 index dbb0dda221..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1a69d4cc3f97e348dba9714c7ec60da1a8650664 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 15 Jun 2021 22:05:36 -0700 -Subject: [PATCH] jemalloc_helper: Limit the mm_malloc.h hack to glibc on linux - -Musl does not need this hack - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - port/jemalloc_helper.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/port/jemalloc_helper.h -+++ b/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/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch deleted file mode 100644 index 86c1bffea6..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 89c032a9b4011385c0b504ea61e5df0db71f0ff5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 16 Jun 2021 19:06:02 -0700 -Subject: [PATCH] range_tree: Implement toku_time_now for rv32/rv64 in asm - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - .../range_tree/lib/portability/toku_time.h | 19 +++++++++++++++++++ - 1 file changed, 19 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 4425a4a2e..4ac964f85 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 -@@ -133,6 +133,25 @@ static inline tokutime_t toku_time_now(void) { - return result; - #elif defined(__powerpc__) - return __ppc_get_timebase(); -+#elif defined(__riscv) // RISC-V -+#if __riscv_xlen == 32 -+ uint32_t lo, hi0, hi1; -+ __asm __volatile__( -+ "rdcycleh %0\n" -+ "rdcycle %1\n" -+ "rdcycleh %2\n" -+ "sub %0, %0, %2\n" -+ "seqz %0, %0\n" -+ "sub %0, zero, %0\n" -+ "and %1, %1, %0\n" -+ : "=r"(hi0), "=r"(lo), "=r"(hi1)); -+ return ((uint64_t)hi1 << 32) | lo; -+#else -+ uint64_t result; -+ __asm __volatile__("rdcycle %0" : "=r"(result)); -+ return result; -+#endif -+ - #else - #error No timer implementation for this platform - #endif --- -2.32.0 - 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 index 4aa91d9b26..342964cf2c 100644 --- 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 @@ -1,4 +1,4 @@ -From 114c42fba3fc86119710e8dd1bb2b7a9e39e3064 Mon Sep 17 00:00:00 2001 +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 @@ -6,11 +6,15 @@ 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> @@ -57,3 +61,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> } // 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 d3054759a7..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,21 +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 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) -@@ -152,12 +152,7 @@ else() +@@ -149,12 +149,7 @@ else() if(WITH_BZ2) find_package(BZip2 REQUIRED) add_definitions(-DBZIP2) @@ -36,3 +29,6 @@ Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] endif() if(WITH_LZ4) +-- +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/arm.patch b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch index d428a6624a..0ae673c425 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/arm.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch @@ -1,9 +1,20 @@ -implement timer for arm >= v6 +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 -@@ -161,6 +161,20 @@ static inline tokutime_t toku_time_now(v +@@ -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; @@ -24,3 +35,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #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/mips.patch b/meta-oe/recipes-dbs/rocksdb/files/mips.patch deleted file mode 100644 index db2305d296..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/mips.patch +++ /dev/null @@ -1,19 +0,0 @@ -implement timer implementation for mips platform - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -@@ -155,7 +155,12 @@ static inline tokutime_t toku_time_now(v - __asm __volatile__("rdcycle %0" : "=r"(result)); - return result; - #endif -- -+#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 diff --git a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch deleted file mode 100644 index bc40f1b1e7..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch +++ /dev/null @@ -1,28 +0,0 @@ -implement support for musl/ppc64 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- 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 - #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(v - 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(__riscv) // RISC-V - #if __riscv_xlen == 32 - uint32_t lo, hi0, hi1; diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb index a5f6d8344a..444351dbb4 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb @@ -1,27 +1,27 @@ 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" +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 = "8608d75d85f8e1b3b64b73a4fb6d19baec61ba5c" -SRCBRANCH = "6.20.fb" +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://0001-cmake-Use-exported-target-for-bz2.patch \ - file://0001-folly-Use-SYS_futex-for-syscall.patch \ - file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \ - file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \ - file://ppc64.patch \ - file://mips.patch \ - file://arm.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 \ " 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" @@ -45,9 +45,13 @@ EXTRA_OECMAKE = "\ -DFAIL_ON_WARNINGS=OFF \ " +CXXFLAGS += "${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Og', '-DXXH_NO_INLINE_HINTS', '', d)}" + do_install:append() { - # fix for qa check buildpaths + # Fix for qa check buildpaths sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake } -LDFLAGS:append:riscv64 = " -pthread" +# 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_4.0.3.bb index c218b7151e..25d67ff8bf 100644 --- a/meta-oe/recipes-dbs/soci/soci_3.2.3.bb +++ b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb @@ -1,6 +1,3 @@ -# 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" @@ -8,12 +5,10 @@ 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" + 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" \ @@ -29,6 +24,7 @@ PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgres 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[firebird] = "-DWITH_FIREBIRD=ON,-DWITH_FIREBIRD=OFF,," PACKAGECONFIG[ptest] = "${TESTCONFIG},,," # enable your backend by default we enable 'empty' @@ -47,3 +43,7 @@ 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 bb62afab48..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" |