added my Recipes
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
require mariadb.inc
|
||||
inherit native
|
||||
|
||||
PROVIDES += "mysql5-native"
|
||||
DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native \
|
||||
gnutls-native fmt-native \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN} = ""
|
||||
PACKAGES = ""
|
||||
EXTRA_OEMAKE = ""
|
||||
|
||||
do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 sql/gen_lex_hash ${D}${bindir}/
|
||||
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}/
|
||||
}
|
||||
|
||||
353
meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
Normal file
353
meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
Normal file
@@ -0,0 +1,353 @@
|
||||
SUMMARY = "A robust, scalable, and reliable SQL server"
|
||||
HOMEPAGE = "http://mariadb.org"
|
||||
SECTION = "libs"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b1becf0cfa3366e0f4d854d1d264f311"
|
||||
|
||||
SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
|
||||
file://my.cnf \
|
||||
file://mysqld.service \
|
||||
file://install_db.service \
|
||||
file://install_db \
|
||||
file://mysql-systemd-start \
|
||||
file://configure.cmake-fix-valgrind.patch \
|
||||
file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \
|
||||
file://fix-arm-atomic.patch \
|
||||
file://0001-Fix-library-LZ4-lookup.patch \
|
||||
file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \
|
||||
file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \
|
||||
file://ssize_t.patch \
|
||||
file://mm_malloc.patch \
|
||||
file://sys_futex.patch \
|
||||
file://cross-compiling.patch \
|
||||
file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \
|
||||
file://lfs64.patch \
|
||||
file://0001-Add-missing-includes-cstdint-and-cstdio.patch \
|
||||
"
|
||||
SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch"
|
||||
SRC_URI[sha256sum] = "1c89dee0caed0f68bc2a1d203eb98a123150e6a179f6ee0f1fc0ba3f08dc71dc"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
|
||||
|
||||
S = "${WORKDIR}/mariadb-${PV}"
|
||||
|
||||
BINCONFIG_GLOB = "mysql_config"
|
||||
|
||||
inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script pkgconfig
|
||||
|
||||
MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \
|
||||
${PN}-setupdb:${bindir}/mariadb-install-db"
|
||||
|
||||
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"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb"
|
||||
SYSTEMD_SERVICE:${PN}-server = "mysqld.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN}-server ?= "disable"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}-setupdb = "install_db.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN}-setupdb ?= "enable"
|
||||
ALLOW_EMPTY:${PN}-setupdb ?= "1"
|
||||
FILES:${PN}-setupdb = "${sysconfdir}/init.d/install_db \
|
||||
${bindir}/mariadb-install-db \
|
||||
${bindir}/my_print_defaults \
|
||||
${bindir}/mysql_install_db \
|
||||
${bindir}/mysql-systemd-start \
|
||||
"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} lz4 openssl"
|
||||
EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
|
||||
|
||||
PACKAGECONFIG:class-native = ""
|
||||
PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
|
||||
PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind"
|
||||
PACKAGECONFIG[krb5] = ", ,krb5"
|
||||
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 \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
|
||||
-DGROFF=FALSE \
|
||||
-DNROFF=FALSE \
|
||||
-DENABLE_DTRACE=FALSE \
|
||||
-DWITH_PIC=ON \
|
||||
-DWITH_PCRE=system \
|
||||
-DINSTALL_LAYOUT=RPM \
|
||||
-DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \
|
||||
-DINSTALL_LIBDIR:PATH=${baselib} \
|
||||
-DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \
|
||||
-DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
|
||||
-DMYSQL_DATADIR:PATH=/var/mysql \
|
||||
-DCAT_EXECUTABLE=`which cat` \
|
||||
-DSTACK_DIRECTION=1 \
|
||||
-DCMAKE_AR:FILEPATH=${AR}"
|
||||
|
||||
|
||||
# With Ninja it fails with:
|
||||
# make: *** No rule to make target `install'. Stop.
|
||||
OECMAKE_GENERATOR = "Unix Makefiles"
|
||||
|
||||
ARM_INSTRUCTION_SET:armv4 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
|
||||
do_configure:append() {
|
||||
# handle distros with different values of ${libexecdir}
|
||||
libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
|
||||
sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
|
||||
sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh
|
||||
sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
|
||||
}
|
||||
|
||||
do_generate_toolchain_file:append:class-native () {
|
||||
# If these are set cmake will assume we're cross-compiling, which will
|
||||
# result in certain things we want being disabled
|
||||
sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake
|
||||
sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
|
||||
}
|
||||
|
||||
|
||||
do_compile:prepend:class-target () {
|
||||
# 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
|
||||
echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h
|
||||
echo "#define KSSL_H" >>${B}/include/openssl/kssl.h
|
||||
echo "#include <openssl/opensslconf.h>">>${B}/include/openssl/kssl.h
|
||||
echo "#endif" >>${B}/include/openssl/kssl.h
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
|
||||
|
||||
# We need to append this so it runs *after* binconfig's preprocess function
|
||||
#
|
||||
# We really don't care exactly what the directories were set to originally.
|
||||
# plugindir is not fixed, but we don't create any plugins.
|
||||
#
|
||||
mariadb_sysroot_preprocess () {
|
||||
sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
|
||||
sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
|
||||
install -d ${D}/${sysconfdir}/init.d
|
||||
install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
|
||||
install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/
|
||||
mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
|
||||
${D}${systemd_unitdir}/system/install_db.service
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
|
||||
install -d ${D}${datadir}/doc/${PN}
|
||||
if [ -f ${D}${datadir}/doc/README ]; then
|
||||
mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
|
||||
fi
|
||||
|
||||
# mini-benchmark used for Gitlab-CI to run on every commit to catch
|
||||
# if there are severe performance regressions.
|
||||
# remove it to avoid introducing bash dependency
|
||||
if [ -f ${D}${datadir}/mysql/mini-benchmark ]; then
|
||||
rm -rf ${D}${datadir}/mysql/mini-benchmark
|
||||
fi
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
|
||||
pam_so=$(find ${D} -name pam_user_map.so)
|
||||
if [ x"${pam_so}" != x ]; then
|
||||
pam_dir=$(dirname ${pam_so})
|
||||
mv ${pam_dir} ${D}/${libdir}
|
||||
rmdir --ignore-fail-on-non-empty ${pam_dir%security}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES = "${PN}-dbg ${PN}-setupdb ${PN} \
|
||||
libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev \
|
||||
libmysqlclient libmysqlclient-dev libmysqlclient-staticdev \
|
||||
libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-leftovers"
|
||||
CONFFILES:${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf"
|
||||
CONFFILES:${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf"
|
||||
CONFFILES:libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf"
|
||||
|
||||
RPROVIDES:${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg"
|
||||
|
||||
FILES:${PN} = " "
|
||||
RDEPENDS:${PN} = "${PN}-client ${PN}-server"
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
RDEPENDS:${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \
|
||||
perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \
|
||||
perl-module-exporter"
|
||||
RDEPENDS:${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \
|
||||
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 lzo"
|
||||
RDEPENDS:${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \
|
||||
perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \
|
||||
perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \
|
||||
perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \
|
||||
perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \
|
||||
perl-module-io-socket-inet perl-module-io-select bash"
|
||||
RDEPENDS:${PN}-setupdb = "coreutils"
|
||||
|
||||
# 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.* \
|
||||
${sysconfdir}/my.cnf.d/client.cnf"
|
||||
FILES:libmysqlclient-dev = " \
|
||||
${includedir}/mysql/ \
|
||||
${libdir}/libmysqlclient.so \
|
||||
${libdir}/libmariadb.so \
|
||||
${sysconfdir}/aclocal \
|
||||
${bindir}/mysql_config"
|
||||
FILES:libmysqlclient-staticdev = "\
|
||||
${libdir}/*.a"
|
||||
|
||||
# Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0
|
||||
# which are intentionally non-PIC on 32-bit x86 (see e.g.
|
||||
# storage/xtradb/plug.in in the source)
|
||||
INSANE_SKIP:libmysqlclient:append:x86 = " textrel"
|
||||
|
||||
FILES:libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*"
|
||||
FILES:libmysqlclient-r-dev = "\
|
||||
${libdir}/libmysqlclient_r.so"
|
||||
FILES:libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
|
||||
|
||||
FILES:libmysqld = "\
|
||||
${libdir}/libmysqld.so.* \
|
||||
${libdir}/libmariadbd.so.*"
|
||||
FILES:libmysqld-dev = "\
|
||||
${libdir}/libmysqld.so \
|
||||
${libdir}/libmariadbd.so"
|
||||
|
||||
FILES:${PN}-client = "\
|
||||
${bindir}/myisam_ftdump \
|
||||
${bindir}/mysql \
|
||||
${bindir}/mariadb \
|
||||
${bindir}/mysql_client_test \
|
||||
${bindir}/mariadb-client-test \
|
||||
${bindir}/mysql_client_test_embedded \
|
||||
${bindir}/mariadb-client-test-embedded \
|
||||
${bindir}/mysql_find_rows \
|
||||
${bindir}/mariadb-find-rows \
|
||||
${bindir}/mysql_fix_extensions \
|
||||
${bindir}/mariadb-fix-extensions \
|
||||
${bindir}/mysql_waitpid \
|
||||
${bindir}/mariadb-waitpid \
|
||||
${bindir}/mysqlaccess \
|
||||
${bindir}/mariadb-access \
|
||||
${bindir}/mysqladmin \
|
||||
${bindir}/mariadb-admin \
|
||||
${bindir}/mysqlcheck \
|
||||
${bindir}/mariadb-check \
|
||||
${bindir}/mysqldump \
|
||||
${bindir}/mariadb-dump \
|
||||
${bindir}/mysqldumpslow \
|
||||
${bindir}/mariadb-dumpslow \
|
||||
${bindir}/mysqlimport \
|
||||
${bindir}/mariadb-import \
|
||||
${bindir}/mysqlshow \
|
||||
${bindir}/mariadb-show \
|
||||
${bindir}/mysqlslap \
|
||||
${bindir}/mariadb-slap \
|
||||
${bindir}/mysqltest_embedded \
|
||||
${bindir}/mariadb-test-embedded \
|
||||
${libexecdir}/mysqlmanager \
|
||||
${sysconfdir}/my.cnf.d/mysql-clients.cnf"
|
||||
|
||||
FILES:${PN}-server = "\
|
||||
${bindir}/msql2mysql \
|
||||
${bindir}/my_print_defaults \
|
||||
${bindir}/myisamchk \
|
||||
${bindir}/myisamlog \
|
||||
${bindir}/myisampack \
|
||||
${bindir}/mysql_convert_table_format \
|
||||
${bindir}/mariadb-convert-table-format \
|
||||
${bindir}/mysql_install_db \
|
||||
${bindir}/mysql_secure_installation \
|
||||
${bindir}/mariadb-secure-installation \
|
||||
${bindir}/mysql_setpermission \
|
||||
${bindir}/mariadb-setpermission \
|
||||
${bindir}/mysql-systemd-start \
|
||||
${bindir}/mysql_tzinfo_to_sql \
|
||||
${bindir}/mariadb-tzinfo-to-sql \
|
||||
${bindir}/mysql_upgrade \
|
||||
${bindir}/mariadb-upgrade \
|
||||
${bindir}/mysql_plugin \
|
||||
${bindir}/mariadb-plugin \
|
||||
${bindir}/mysqlbinlog \
|
||||
${bindir}/mariadb-binlog \
|
||||
${bindir}/mysqld_multi \
|
||||
${bindir}/mariadbd-multi \
|
||||
${bindir}/mariadbd-safe \
|
||||
${bindir}/mysqld_safe \
|
||||
${bindir}/mysqld_safe_helper \
|
||||
${bindir}/mariadbd-safe-helper \
|
||||
${bindir}/mysqlhotcopy \
|
||||
${bindir}/mariadb-hotcopy \
|
||||
${bindir}/mysqltest \
|
||||
${bindir}/mariadb-test \
|
||||
${bindir}/perror \
|
||||
${bindir}/replace \
|
||||
${bindir}/resolve_stack_dump \
|
||||
${bindir}/resolveip \
|
||||
${libexecdir}/mysqld \
|
||||
${sbindir}/mysqld \
|
||||
${sbindir}/mariadbd \
|
||||
${libdir}/plugin/*.so \
|
||||
${libdir}/security/*.so \
|
||||
${libdir}/plugin/auth_pam_tool_dir/auth_pam_tool \
|
||||
${datadir}/mysql/ \
|
||||
${localstatedir}/mysql/ \
|
||||
${sysconfdir}/init.d/mysqld \
|
||||
${sysconfdir}/my.cnf \
|
||||
${sysconfdir}/my.cnf.d/server.cnf \
|
||||
${sysconfdir}/security/user_map.conf \
|
||||
${sysconfdir}/tmpfiles.d"
|
||||
|
||||
DESCRIPTION:${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}"
|
||||
FILES:${PN}-leftovers = "/"
|
||||
@@ -0,0 +1,95 @@
|
||||
From 6e376601c990abaa5e261d1311f92acb3b370b8f 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>
|
||||
---
|
||||
.../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 +
|
||||
tpool/aio_linux.cc | 1 +
|
||||
6 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h
|
||||
index 963c1d8eb49..73487edd96d 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 c7f93b4cfcd..3c2ab80535a 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 f356395f329..3215221755d 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 6db11cc947a..c26b6a21a57 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/storage/rocksdb/rocksdb/util/string_util.h b/storage/rocksdb/rocksdb/util/string_util.h
|
||||
index a761be66c52..064d059f08f 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>
|
||||
diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc
|
||||
index 10234e0e46a..a6adf1af257 100644
|
||||
--- a/tpool/aio_linux.cc
|
||||
+++ b/tpool/aio_linux.cc
|
||||
@@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
|
||||
|
||||
# include <thread>
|
||||
# include <atomic>
|
||||
+# include <cstdio>
|
||||
# include <libaio.h>
|
||||
# include <sys/syscall.h>
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From f15fbdf1244ca9ce01c5507660a86d685ed88bcf Mon Sep 17 00:00:00 2001
|
||||
From: Sumit Garg <sumit.garg@linaro.org>
|
||||
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>
|
||||
---
|
||||
cmake/FindLZ4.cmake | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
|
||||
index eebd859..094241c 100644
|
||||
--- a/cmake/FindLZ4.cmake
|
||||
+++ b/cmake/FindLZ4.cmake
|
||||
@@ -1,5 +1,10 @@
|
||||
-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
|
||||
-find_library(LZ4_LIBRARIES NAMES lz4)
|
||||
+find_path(LZ4_INCLUDE_DIR
|
||||
+ 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)
|
||||
|
||||
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.25.1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 0a3222338efc108c831fbdd719a47d35f4b0adcd Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 18 Aug 2021 06:49:25 +0000
|
||||
Subject: [PATCH] aio_linux: Check if syscall exists before using it
|
||||
|
||||
Return -ENOSYS if not implememented, fixes build on arches like RISCV32
|
||||
Fixes
|
||||
tpool/aio_linux.cc:63:20: error: '__NR_io_getevents' was not declared in this scope; did you mean 'io_getevents'?
|
||||
63 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx),
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
| io_getevents
|
||||
|
||||
Upstream-Staus: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
tpool/aio_linux.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc
|
||||
index 4abc213..da75411 100644
|
||||
--- a/tpool/aio_linux.cc
|
||||
+++ b/tpool/aio_linux.cc
|
||||
@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
|
||||
*/
|
||||
static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
|
||||
{
|
||||
+#ifdef __NR_io_getevents
|
||||
int saved_errno= errno;
|
||||
int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx),
|
||||
min_nr, nr, ev, 0);
|
||||
@@ -67,6 +68,9 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
|
||||
errno= saved_errno;
|
||||
}
|
||||
return ret;
|
||||
+#else
|
||||
+ return -ENOSYS;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From d611f78198dee64bb6a05933d200b544e2510b76 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 14 Nov 2020 14:37:13 -0800
|
||||
Subject: [PATCH] innobase: Define __NR_futex if it does not exist
|
||||
|
||||
__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
|
||||
they only have 64bit variant of time_t. Glibc defines SYS_futex interface based
|
||||
on
|
||||
__NR_futex, since this is used in applications, such applications start
|
||||
to fail to build for these newer architectures. This patch defines a
|
||||
fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
|
||||
working
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
storage/innobase/log/log0sync.cc | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/storage/innobase/log/log0sync.cc b/storage/innobase/log/log0sync.cc
|
||||
index 7799e605..4fab8f74 100644
|
||||
--- a/storage/innobase/log/log0sync.cc
|
||||
+++ b/storage/innobase/log/log0sync.cc
|
||||
@@ -66,6 +66,9 @@ Note that if write operation is very fast, a) or b) can be fine as alternative.
|
||||
#ifdef __linux__
|
||||
#include <linux/futex.h>
|
||||
#include <sys/syscall.h>
|
||||
+#if !defined(SYS_futex) && defined(SYS_futex_time64)
|
||||
+# define SYS_futex SYS_futex_time64
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#include <atomic>
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 24e2b0edc2612acefcc48414bb6f0aeb086061a9 Mon Sep 17 00:00:00 2001
|
||||
From: Jackie Huang <jackie.huang@windriver.com>
|
||||
Date: Tue, 26 Feb 2019 23:57:06 -0800
|
||||
Subject: [PATCH] configure.cmake: fix valgrind
|
||||
|
||||
Check valgrind headers only if WITH_VALGRIND is set.
|
||||
|
||||
mariadb uses two macros for valgrind compilations:
|
||||
HAVE_valgrind - valgrind is installed and can be set by configure option -DWITH_VALGRIND
|
||||
HAVE_VALGRIND - valgrind debug libraries is installed, set by auto check
|
||||
|
||||
We would like to set them both by the configure option so that we can use
|
||||
PACKAGECONFIG to decide if valgrind is needed or not.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
|
||||
---
|
||||
configure.cmake | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.cmake b/configure.cmake
|
||||
index 3cfc4b31..d017b3b3 100644
|
||||
--- a/configure.cmake
|
||||
+++ b/configure.cmake
|
||||
@@ -930,10 +930,9 @@ HAVE_GCC_C11_ATOMICS)
|
||||
|
||||
IF(WITH_VALGRIND)
|
||||
SET(HAVE_valgrind 1)
|
||||
-ENDIF()
|
||||
-
|
||||
-CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
|
||||
+ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
|
||||
HAVE_VALGRIND_MEMCHECK_H)
|
||||
+ENDIF()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for IPv6 support
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From f447aca534d1a12809eeb146e8220d305cc3884d Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Thu, 9 Apr 2020 14:07:19 +0800
|
||||
Subject: [PATCH] build_rocksdb.cmake: fix atomic support on arm
|
||||
|
||||
Check to link with libatomic to enable C11 atomics support
|
||||
to fix below build error on arm:
|
||||
| /build/tmp/work/armv5e-wrs-linux-gnueabi/mariadb/10.3.13-r0/recipe-sysroot-native/usr/bin/arm-wrs-linux-gnueabi/../../libexec/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/8.3.0/ld.bfd: librocksdblib.a(env_posix.cc.o): in function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
|
||||
| /usr/include/c++/8.3.0/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
storage/rocksdb/build_rocksdb.cmake | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
|
||||
index d7895b0..3bcd52a 100644
|
||||
--- a/storage/rocksdb/build_rocksdb.cmake
|
||||
+++ b/storage/rocksdb/build_rocksdb.cmake
|
||||
@@ -470,6 +470,9 @@ list(APPEND SOURCES ${CMAKE_CURRENT_BINARY_DIR}/build_version.cc)
|
||||
|
||||
ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES})
|
||||
target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
||||
+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
|
||||
+ TARGET_LINK_LIBRARIES(rocksdblib atomic)
|
||||
+ENDIF()
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -Wno-error")
|
||||
endif()
|
||||
--
|
||||
2.7.4
|
||||
|
||||
13
meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/install_db
Executable file
13
meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/install_db
Executable file
@@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting to install database for mariadb"
|
||||
/usr/bin/mysql-systemd-start pre
|
||||
echo "done."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/install_db start"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Simple install MySQL database service file
|
||||
# It shoulb be done before mysqld.service
|
||||
|
||||
[Unit]
|
||||
Description=Install MySQL Community Server Database
|
||||
After=network.target
|
||||
After=syslog.target
|
||||
Before=mysqld.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=@BINDIR@/mysql-systemd-start pre
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- 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
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h
|
||||
+++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#if defined(__clang__)
|
||||
+#if defined(__clang__) && defined(__GLIBC__)
|
||||
// glibc's `posix_memalign()` declaration specifies `throw()` while clang's
|
||||
// declaration does not. There is a hack in clang to make its re-declaration
|
||||
// compatible with glibc's if they are declared consecutively. That hack breaks
|
||||
25
meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
Normal file
25
meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/my.cnf
Normal file
@@ -0,0 +1,25 @@
|
||||
[client]
|
||||
#password = password
|
||||
port = 3306
|
||||
socket = /var/lib/mysql/mysql.sock
|
||||
|
||||
[mysqld_safe]
|
||||
|
||||
[mysqld]
|
||||
user = mysql
|
||||
port = 3306
|
||||
socket = /var/lib/mysql/mysql.sock
|
||||
pid-file = /var/lib/mysql/mysqld.pid
|
||||
log-error = /var/log/mysqld.log
|
||||
basedir = /usr
|
||||
datadir = /var/lib/mysql
|
||||
skip-external-locking
|
||||
skip-networking
|
||||
ignore-builtin-innodb
|
||||
default-storage-engine = myisam
|
||||
bind-address = localhost
|
||||
|
||||
#
|
||||
# include all files from the config directory
|
||||
#
|
||||
!includedir /etc/my.cnf.d
|
||||
@@ -0,0 +1,66 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Needed argument: pre | post
|
||||
#
|
||||
# pre mode : try to run mysql_install_db and fix perms and SELinux contexts
|
||||
# post mode : ping server until answer is received
|
||||
#
|
||||
|
||||
get_option () {
|
||||
local section=$1
|
||||
local option=$2
|
||||
local default=$3
|
||||
ret=$(/usr/bin/my_print_defaults $section | grep '^--'${option}'=' | cut -d= -f2-)
|
||||
[ -z $ret ] && ret=$default
|
||||
echo $ret
|
||||
}
|
||||
|
||||
install_db () {
|
||||
# Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode)
|
||||
datadir=$(get_option mysqld datadir "/var/lib/mysql")
|
||||
|
||||
# Restore log, dir, perms and SELinux contexts
|
||||
[ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
|
||||
log=/var/log/mysqld.log
|
||||
[ -e $log ] || touch $log
|
||||
chmod 0640 $log
|
||||
chown mysql:mysql $log || exit 1
|
||||
if [ -x /usr/sbin/restorecon ]; then
|
||||
/usr/sbin/restorecon "$datadir"
|
||||
/usr/sbin/restorecon $log
|
||||
fi
|
||||
|
||||
# If special mysql dir is in place, skip db install
|
||||
[ -d "$datadir/mysql" ] && exit 0
|
||||
|
||||
# Create initial db
|
||||
/usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql
|
||||
exit 0
|
||||
}
|
||||
|
||||
pinger () {
|
||||
# Wait for ping to answer to signal startup completed,
|
||||
# might take a while in case of e.g. crash recovery
|
||||
# MySQL systemd service will timeout script if no answer
|
||||
datadir=$(get_option mysqld datadir "/var/lib/mysql")
|
||||
socket=$(get_option mysqld socket "$datadir/mysql.sock")
|
||||
case $socket in
|
||||
/*) adminsocket="$socket" ;;
|
||||
*) adminsocket="$datadir/$socket" ;;
|
||||
esac
|
||||
|
||||
while /bin/true ; do
|
||||
sleep 1
|
||||
mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping >/dev/null 2>&1 && break
|
||||
done
|
||||
exit 0
|
||||
}
|
||||
|
||||
# main
|
||||
case $1 in
|
||||
"pre") install_db ;;
|
||||
"post") pinger ;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
[Unit]
|
||||
Description=MariaDB database server
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
PIDFile=/var/lib/mysql/mysqld.pid
|
||||
Type=simple
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
# Execute post scripts as root
|
||||
PermissionsStartOnly=true
|
||||
|
||||
# Start main service
|
||||
ExecStart=@BINDIR@/mysqld_safe --basedir=@PREFIX@
|
||||
|
||||
# Don't signal startup success before a ping works
|
||||
ExecStartPost=@BINDIR@/mysql-systemd-start post
|
||||
|
||||
TimeoutSec=300
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,41 @@
|
||||
Remove glibc specific function dependencies
|
||||
|
||||
Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
diff --git a/include/my_cpu.h b/include/my_cpu.h
|
||||
index f2e26fca..94599b74 100644
|
||||
--- a/include/my_cpu.h
|
||||
+++ b/include/my_cpu.h
|
||||
@@ -24,17 +24,16 @@
|
||||
*/
|
||||
|
||||
#ifdef _ARCH_PWR8
|
||||
-#include <sys/platform/ppc.h>
|
||||
/* Very low priority */
|
||||
-#define HMT_very_low() __ppc_set_ppr_very_low()
|
||||
+#define HMT_very_low() asm volatile("or 31,31,31")
|
||||
/* Low priority */
|
||||
-#define HMT_low() __ppc_set_ppr_low()
|
||||
+#define HMT_low() asm volatile ("or 1,1,1")
|
||||
/* Medium low priority */
|
||||
-#define HMT_medium_low() __ppc_set_ppr_med_low()
|
||||
+#define HMT_medium_low() asm volatile ("or 6,6,6")
|
||||
/* Medium priority */
|
||||
-#define HMT_medium() __ppc_set_ppr_med()
|
||||
+#define HMT_medium() asm volatile ("or 2,2,2")
|
||||
/* Medium high priority */
|
||||
-#define HMT_medium_high() __ppc_set_ppr_med_high()
|
||||
+#define HMT_medium_high() asm volatile("or 5,5,5")
|
||||
/* High priority */
|
||||
#define HMT_high() asm volatile("or 3,3,3")
|
||||
#else
|
||||
@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void)
|
||||
__asm__ __volatile__ ("pause");
|
||||
#endif
|
||||
#elif defined(_ARCH_PWR8)
|
||||
- __ppc_get_timebase();
|
||||
+ __builtin_ppc_get_timebase();
|
||||
#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
|
||||
/* Mainly, prevent the compiler from optimizing away delay loops */
|
||||
__asm__ __volatile__ ("":::"memory");
|
||||
@@ -0,0 +1,15 @@
|
||||
ssize_t comes from sys/types.h therefore include it
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
--- a/wsrep-lib/include/wsrep/gtid.hpp
|
||||
+++ b/wsrep-lib/include/wsrep/gtid.hpp
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "compiler.hpp"
|
||||
|
||||
#include <iosfwd>
|
||||
-
|
||||
+#include <sys/types.h>
|
||||
/**
|
||||
* Minimum number of bytes guaratneed to store GTID string representation,
|
||||
* terminating '\0' not included (36 + 1 + 20).
|
||||
@@ -0,0 +1,34 @@
|
||||
From 4ac5b555d058d4d489f25a3806a787b7b2465d09 Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Wed, 27 Feb 2019 22:41:26 -0800
|
||||
Subject: [PATCH] support-files/CMakeLists.txt: fix do_populate_sysroot issue
|
||||
|
||||
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]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
|
||||
---
|
||||
support-files/CMakeLists.txt | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
|
||||
index b5767432..56733de1 100644
|
||||
--- a/support-files/CMakeLists.txt
|
||||
+++ b/support-files/CMakeLists.txt
|
||||
@@ -165,12 +165,5 @@ IF(UNIX)
|
||||
INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR}
|
||||
COMPONENT IniFiles)
|
||||
ENDIF()
|
||||
-
|
||||
- # This is for SuSE:
|
||||
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
- ${INSTALL_SYSCONFDIR}/init.d/mysql
|
||||
- ${INSTALL_SBINDIR}/rcmysql
|
||||
- WORKING_DIRECTORY \$ENV{DESTDIR}${prefix})"
|
||||
- COMPONENT SupportFiles)
|
||||
ENDIF(INSTALL_SYSCONFDIR)
|
||||
ENDIF()
|
||||
@@ -0,0 +1,23 @@
|
||||
Use SYS_futex for syscall
|
||||
|
||||
glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there
|
||||
is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
--- a/storage/innobase/sync/srw_lock.cc
|
||||
+++ b/storage/innobase/sync/srw_lock.cc
|
||||
@@ -210,6 +210,12 @@ void ssux_lock_low::wake() { WakeByAddre
|
||||
# ifdef __linux__
|
||||
# include <linux/futex.h>
|
||||
# include <sys/syscall.h>
|
||||
+/** Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and
|
||||
+ therefore do not define __NR_futex */
|
||||
+# if !defined(SYS_futex) && defined(SYS_futex_time64)
|
||||
+# define SYS_futex SYS_futex_time64
|
||||
+# endif
|
||||
+
|
||||
# define SRW_FUTEX(a,op,n) \
|
||||
syscall(SYS_futex, a, FUTEX_ ## op ## _PRIVATE, n, nullptr, nullptr, 0)
|
||||
# elif defined __OpenBSD__
|
||||
@@ -0,0 +1,26 @@
|
||||
require mariadb.inc
|
||||
|
||||
DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \
|
||||
zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd"
|
||||
|
||||
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"
|
||||
@@ -0,0 +1,34 @@
|
||||
From 45436592aa64308b2ab46f84c6107c6d7de0a3ec Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Wed, 6 Mar 2019 00:16:17 -0800
|
||||
Subject: [PATCH] _mysql.c: fix compilation with MariaDB 10.3.13
|
||||
|
||||
Use standard API function MYSQL_OPT_RECONNECT
|
||||
instead of direct modification of internal structures
|
||||
which does not work for MariaDB.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
_mysql.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/_mysql.c
|
||||
+++ b/_mysql.c
|
||||
@@ -2002,7 +2002,14 @@ _mysql_ConnectionObject_ping(
|
||||
int r, reconnect = -1;
|
||||
if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
|
||||
check_connection(self);
|
||||
- if ( reconnect != -1 ) self->connection.reconnect = reconnect;
|
||||
+ if ( reconnect != -1 ) {
|
||||
+#if MYSQL_VERSION_ID >= 50013
|
||||
+ my_bool recon = reconnect;
|
||||
+ mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
|
||||
+#else
|
||||
+ self->connection.reconnect = reconnect;
|
||||
+#endif
|
||||
+ }
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
r = mysql_ping(&(self->connection));
|
||||
Py_END_ALLOW_THREADS
|
||||
@@ -0,0 +1,26 @@
|
||||
SUMMARY = "Python interface to MySQL"
|
||||
HOMEPAGE = "https://github.com/farcepest/MySQLdb1"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
DEPENDS = "mysql5"
|
||||
|
||||
SRCNAME = "MySQL-python"
|
||||
|
||||
SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip \
|
||||
file://0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "654f75b302db6ed8dc5a898c625e030c"
|
||||
SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74"
|
||||
|
||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||
|
||||
SKIP_RECIPE[mysql-python] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}"
|
||||
|
||||
inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "setuptools", "", d)}
|
||||
|
||||
python() {
|
||||
if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
|
||||
raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
|
||||
}
|
||||
Reference in New Issue
Block a user