added my Recipes
This commit is contained in:
@@ -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__
|
||||
Reference in New Issue
Block a user