Skip to content
Snippets Groups Projects
Commit 5a430a54 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

chore: switch to picodata/tarantool fork

parent b4559a36
No related branches found
No related tags found
1 merge request!197chore: switch to picodata/tarantool fork
Pipeline #9571 passed
......@@ -3,5 +3,5 @@
url = ../tarantool-module.git
[submodule "tarantool-sys"]
path = tarantool-sys
url = https://github.com/tarantool/tarantool.git
url = ../../tarantool.git
ignore = dirty
......@@ -34,7 +34,7 @@ features = ["max_level_trace", "release_max_level_trace"]
[dependencies.tarantool]
path = "./tarantool/tarantool"
version = "0.6"
features = ["schema"]
features = ["schema", "picodata"]
[dev-dependencies]
assert_cmd = "2.0"
......
......@@ -117,7 +117,6 @@ fn build_tarantool() {
"msgpuck",
"crypto",
"vclock",
"uuid",
"bit",
"swim",
"uri",
......@@ -130,6 +129,7 @@ fn build_tarantool() {
"coll",
"fakesys",
"salad",
"tzcode",
] {
println!(
"cargo:rustc-link-search=native={}/src/lib/{}",
......@@ -149,12 +149,16 @@ fn build_tarantool() {
"cargo:rustc-link-search=native={}/third_party/libyaml",
build_disp
);
println!("cargo:rustc-link-search=native={build_disp}/third_party/c-dt/build");
println!("cargo:rustc-link-search=native={build_disp}/build/nghttp2/dest/lib");
for l in [
"tarantool",
"ev",
"coro",
"cdt",
"server",
"misc",
"nghttp2",
"zstd",
"decNumber",
"eio",
......@@ -186,12 +190,12 @@ fn build_tarantool() {
// duplicate symbols which is not allowed (by default) when linking with
// via -l... option
println!(
"cargo:rustc-link-arg={}/build/unwind-prefix/lib/libunwind-x86_64.a",
dst.display()
"cargo:rustc-link-arg={}/build/libunwind/dest/lib/libunwind-x86_64.a",
build_disp
);
println!(
"cargo:rustc-link-arg={}/build/unwind-prefix/lib/libunwind.a",
dst.display()
"cargo:rustc-link-arg={}/build/libunwind/dest/lib/libunwind.a",
build_disp
);
}
......
From 4ddd3f313bc7f95aeb5109786a7b4a62ed6dae46 Mon Sep 17 00:00:00 2001
From 8e1caeae48316c8464a769a1d224f18a930f4570 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Thu, 17 Feb 2022 13:56:53 +0300
Subject: [PATCH 1/3] picodata: make tarantool callable over ffi with a c
callback for setup
Date: Thu, 14 Jul 2022 17:06:36 +0300
Subject: [PATCH] picodata: make tarantool callable over ffi with a c callback
for setup
- tarantool is now a static library
- main(argc, argv) -> tarantool_main(argc, argv, cb, cb_data)
......@@ -15,23 +15,23 @@ Subject: [PATCH 1/3] picodata: make tarantool callable over ffi with a c
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0a0699d6e..f8a813553 100644
index 6fca3a888..a7800f0e7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -273,7 +273,7 @@ if (ENABLE_LTO)
set_source_files_properties(exports.c PROPERTIES COMPILE_FLAGS -fno-lto)
endif()
@@ -331,7 +331,7 @@ add_custom_command(
${EXPORT_LIST}
)
-add_executable(
+add_library(
tarantool main.cc exports.c
tarantool main.cc
${LIBUTIL_FREEBSD_SRC}/flopen.c
${LIBUTIL_FREEBSD_SRC}/pidfile.c)
diff --git a/src/lua/init.c b/src/lua/init.c
index 21582dd5e..931521f32 100644
index d3a265eb8..e066141b4 100644
--- a/src/lua/init.c
+++ b/src/lua/init.c
@@ -584,9 +584,16 @@ run_script_f(va_list ap)
@@ -871,9 +871,16 @@ run_script_f(va_list ap)
* never really dead. It never returns from its function.
*/
struct diag *diag = va_arg(ap, struct diag *);
......@@ -48,7 +48,7 @@ index 21582dd5e..931521f32 100644
/*
* Load libraries and execute chunks passed by -l and -e
* command line options
@@ -701,7 +708,8 @@ error:
@@ -988,7 +995,8 @@ error:
int
tarantool_lua_run_script(char *path, bool interactive,
......@@ -58,7 +58,7 @@ index 21582dd5e..931521f32 100644
{
const char *title = path ? basename(path) : "interactive";
/*
@@ -725,7 +733,7 @@ tarantool_lua_run_script(char *path, bool interactive,
@@ -1012,7 +1020,7 @@ tarantool_lua_run_script(char *path, bool interactive,
struct diag script_diag;
diag_create(&script_diag);
fiber_start(script_fiber, tarantool_L, path, interactive,
......@@ -82,12 +82,12 @@ index 7fc0b1a31..3b506a94b 100644
extern char *history;
diff --git a/src/main.cc b/src/main.cc
index de082c17f..a6add06c5 100644
index a424073ed..af4ca7247 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -587,8 +587,9 @@ print_help(const char *program)
extern "C" void **
export_syms(void);
@@ -618,8 +618,9 @@ print_help(const char *program)
puts("to see online documentation, submit bugs or contribute a patch.");
}
+extern "C"
int
......@@ -96,7 +96,7 @@ index de082c17f..a6add06c5 100644
{
/* set locale to make iswXXXX function work */
if (setlocale(LC_CTYPE, "C.UTF-8") == NULL &&
@@ -758,7 +759,7 @@ main(int argc, char **argv)
@@ -787,7 +788,7 @@ main(int argc, char **argv)
* initialized.
*/
if (tarantool_lua_run_script(script, interactive, optc, optv,
......
From 1690854c2c1aca4146aeb3e873806d00ccac1c57 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Thu, 17 Feb 2022 13:59:48 +0300
Subject: [PATCH 2/3] picodata: bump libunwind version to fix build on modern
ubuntu
---
static-build/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/static-build/CMakeLists.txt b/static-build/CMakeLists.txt
index 598c42bbc..e853f3364 100644
--- a/static-build/CMakeLists.txt
+++ b/static-build/CMakeLists.txt
@@ -16,8 +16,8 @@ set(NCURSES_VERSION 6.2)
set(NCURSES_HASH e812da327b1c2214ac1aed440ea3ae8d)
set(READLINE_VERSION 8.0)
set(READLINE_HASH 7e6c1f16aee3244a69aba6e438295ca3)
-set(UNWIND_VERSION 1.3-rc1)
-set(UNWIND_HASH f09b670de5db6430a3de666e6aed60e3)
+set(UNWIND_VERSION 1.6.2)
+set(UNWIND_HASH f625b6a98ac1976116c71708a73dc44a)
# Pass -isysroot=<SDK_PATH> option on Mac OS to a preprocessor and a C
# compiler to find header files installed with an SDK.
--
2.25.1
From 261ab204ea9e132426a7ce42549a4c6ca883ca66 Mon Sep 17 00:00:00 2001
From 99f29bd6d03d166af8fb29564cd2781f397861ae Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Thu, 17 Feb 2022 14:00:14 +0300
Subject: [PATCH 3/3] picodata: add support for static stored procedures using
Date: Thu, 14 Jul 2022 17:51:03 +0300
Subject: [PATCH] picodata: add support for static stored procedures using
".foo" syntax
box.schema.func.create(".func_name", {language = "C"}) will create a
stored procedure which calls the function `func_name` from the current
executable
---
src/box/module_cache.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
src/box/module_cache.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/box/module_cache.c b/src/box/module_cache.c
index 7f81902bd..a48c18ea0 100644
index 76685ed86..eeaff73c2 100644
--- a/src/box/module_cache.c
+++ b/src/box/module_cache.c
@@ -387,9 +387,37 @@ error:
@@ -374,9 +374,32 @@ error:
return NULL;
}
......@@ -35,12 +32,7 @@ index 7f81902bd..a48c18ea0 100644
+ memset(m, 0, size);
+ m->handle = dlopen(0, RTLD_NOW);
+ module_ref(m);
+
+ if (cache_put(m) != 0) {
+ module_unload(m);
+ return NULL;
+ }
+
+ cache_put(m);
+ return m;
+}
+
......@@ -53,7 +45,7 @@ index 7f81902bd..a48c18ea0 100644
char path[PATH_MAX];
size_t size = sizeof(path);
@@ -416,6 +444,9 @@ module_load_force(const char *package, size_t package_len)
@@ -400,6 +423,9 @@ module_load_force(const char *package, size_t package_len)
struct module *
module_load(const char *package, size_t package_len)
{
......
From f30c339585525b7eebc1714b3a5dd263723177f8 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Thu, 24 Feb 2022 06:43:20 -0800
Subject: [PATCH] build: update openssl version to support arm64-apple
---
static-build/CMakeLists.txt | 8 ++++----
6 files changed, 51 insertions(+), 10 deletions(-)
diff --git a/static-build/CMakeLists.txt b/static-build/CMakeLists.txt
index 598c42bbc..2ff8906b1 100644
--- a/static-build/CMakeLists.txt
+++ b/static-build/CMakeLists.txt
@@ -8,11 +8,11 @@ cmake_minimum_required(VERSION 2.8)
project(tarantool-static C CXX)
include(ExternalProject)
-set(OPENSSL_VERSION 1.1.1f)
-set(OPENSSL_HASH 3f486f2f4435ef14b81814dbbc7b48bb)
+set(OPENSSL_VERSION 1.1.1m)
+set(OPENSSL_HASH 8ec70f665c145c3103f6e330f538a9db)
set(ZLIB_VERSION 1.2.11)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(NCURSES_VERSION 6.2)
set(NCURSES_HASH e812da327b1c2214ac1aed440ea3ae8d)
set(READLINE_VERSION 8.0)
set(READLINE_HASH 7e6c1f16aee3244a69aba6e438295ca3)
--
2.32.0 (Apple Git-132)
From da9f7b4ee2423fb04976efca9f253d8c87e18002 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Tue, 8 Mar 2022 10:47:31 -0800
Subject: [PATCH] build: fix build on macOS 11.5 or higher
---
static-build/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/static-build/CMakeLists.txt b/static-build/CMakeLists.txt
index 598c42bbc..3525e294c 100644
--- a/static-build/CMakeLists.txt
+++ b/static-build/CMakeLists.txt
@@ -205,7 +205,7 @@ if (APPLE)
# So we need to find library and header and
# copy it locally
find_path(UNWIND_INCLUDE_DIR libunwind.h)
- find_library(UNWIND_LIBRARY libunwind.dylib
+ find_library(UNWIND_LIBRARY libunwind.tbd
PATH_SUFFIXES system
)
@@ -225,7 +225,7 @@ if (APPLE)
"${UNWIND_INSTALL_PREFIX}/include/"
)
add_custom_command(
- OUTPUT "${UNWIND_INSTALL_PREFIX}/lib/libunwind.dylib"
+ OUTPUT "${UNWIND_INSTALL_PREFIX}/lib/libunwind.tbd"
COMMAND ${CMAKE_COMMAND} -E make_directory
"${UNWIND_INSTALL_PREFIX}/lib"
COMMAND ${CMAKE_COMMAND} -E copy
@@ -234,7 +234,7 @@ if (APPLE)
)
set(UNWIND_DEPENDENCIES
${UNWIND_DEPENDENCIES}
- "${UNWIND_INSTALL_PREFIX}/lib/libunwind.dylib"
+ "${UNWIND_INSTALL_PREFIX}/lib/libunwind.tbd"
"${UNWIND_INSTALL_PREFIX}/include/libunwind.h"
)
else()
--
2.32.0 (Apple Git-132)
From 84880b8be478c7abed462559e9e10b8779086a3f Mon Sep 17 00:00:00 2001
From cfbf0fadf54c6d328e4e05974c140a715c197705 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Thu, 10 Mar 2022 17:33:56 +0300
Date: Thu, 14 Jul 2022 17:29:58 +0300
Subject: [PATCH] build: vendor the dependencies
---
static-build/CMakeLists.txt | 29 +++++++----------------------
1 file changed, 7 insertions(+), 22 deletions(-)
static-build/CMakeLists.txt | 30 ++++++------------------------
1 file changed, 6 insertions(+), 24 deletions(-)
diff --git a/static-build/CMakeLists.txt b/static-build/CMakeLists.txt
index 598c42bbc..df83e14cc 100644
index c830daf01..62417fdc2 100644
--- a/static-build/CMakeLists.txt
+++ b/static-build/CMakeLists.txt
@@ -8,16 +8,6 @@ cmake_minimum_required(VERSION 2.8)
@@ -8,18 +8,6 @@ cmake_minimum_required(VERSION 2.8)
project(tarantool-static C CXX)
include(ExternalProject)
-set(OPENSSL_VERSION 1.1.1m)
-set(OPENSSL_HASH 8ec70f665c145c3103f6e330f538a9db)
-set(LIBICU_VERSION release-71-1/icu4c-71_1)
-set(LIBICU_HASH e06ffc96f59762bd3c929b217445aaec)
-set(LIBICONV_VERSION 1.16)
-set(LIBICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
-set(OPENSSL_VERSION 1.1.1n)
-set(OPENSSL_HASH 2aad5635f9bb338bc2c6b7d19cbc9676)
-set(ZLIB_VERSION 1.2.11)
-set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
-set(NCURSES_VERSION 6.2)
-set(NCURSES_HASH e812da327b1c2214ac1aed440ea3ae8d)
-set(READLINE_VERSION 8.0)
-set(READLINE_HASH 7e6c1f16aee3244a69aba6e438295ca3)
-set(UNWIND_VERSION 1.6.2)
-set(UNWIND_HASH f625b6a98ac1976116c71708a73dc44a)
set(BACKUP_STORAGE https://distrib.hb.bizmrg.com)
# Pass -isysroot=<SDK_PATH> option on Mac OS to a preprocessor and a C
# compiler to find header files installed with an SDK.
@@ -44,8 +34,7 @@ endif()
@@ -47,8 +35,7 @@ endif()
# OpenSSL
#
ExternalProject_Add(openssl
- URL https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
- URL ${BACKUP_STORAGE}/openssl/openssl-${OPENSSL_VERSION}.tar.gz
- URL_MD5 ${OPENSSL_HASH}
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../vendor/openssl-1.1.1m
CONFIGURE_COMMAND <SOURCE_DIR>/config
CC=${CMAKE_C_COMPILER}
CXX=${CMAKE_CXX_COMPILER}
@@ -63,7 +52,7 @@ ExternalProject_Add(openssl
@@ -66,8 +53,7 @@ ExternalProject_Add(openssl
# ICU
#
ExternalProject_Add(icu
- URL https://github.com/unicode-org/icu/releases/download/release-62-1/icu4c-62_1-src.tgz
- URL https://github.com/unicode-org/icu/releases/download/${LIBICU_VERSION}-src.tgz
- URL_MD5 ${LIBICU_HASH}
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../vendor/icu4c-62_1
# By default libicu is built by using clang/clang++ compiler (if it
# exists). Here is a link for detecting compilers at libicu configure
# script: https://github.com/unicode-org/icu/blob/7c7b8bd5702310b972f888299169bc3cc88bf0a6/icu4c/source/configure.ac#L135
@@ -89,8 +78,7 @@ ExternalProject_Add(icu
@@ -93,8 +79,7 @@ ExternalProject_Add(icu
# ZLIB
#
ExternalProject_Add(zlib
- URL https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz
- URL ${BACKUP_STORAGE}/zlib/zlib-${ZLIB_VERSION}.tar.gz
- URL_MD5 ${ZLIB_HASH}
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../vendor/zlib-1.2.11
CONFIGURE_COMMAND env
CC=${CMAKE_C_COMPILER}
CFLAGS=${DEPENDENCY_CFLAGS}
@@ -105,8 +93,7 @@ ExternalProject_Add(zlib
@@ -109,8 +94,7 @@ ExternalProject_Add(zlib
# Ncurses
#
ExternalProject_Add(ncurses
......@@ -67,7 +70,7 @@ index 598c42bbc..df83e14cc 100644
CONFIGURE_COMMAND <SOURCE_DIR>/configure
CC=${CMAKE_C_COMPILER}
CXX=${CMAKE_CXX_COMPILER}
@@ -139,8 +126,7 @@ ExternalProject_Add(ncurses
@@ -143,8 +127,7 @@ ExternalProject_Add(ncurses
# ReadLine
#
ExternalProject_Add(readline
......@@ -77,25 +80,16 @@ index 598c42bbc..df83e14cc 100644
CONFIGURE_COMMAND <SOURCE_DIR>/configure
CC=${CMAKE_C_COMPILER}
CFLAGS=${DEPENDENCY_CFLAGS}
@@ -156,7 +142,7 @@ ExternalProject_Add(readline
@@ -160,8 +143,7 @@ ExternalProject_Add(readline
#
if (APPLE)
ExternalProject_Add(iconv
- URL https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
- URL https://ftp.gnu.org/pub/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz
- URL_MD5 ${LIBICONV_HASH}
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../vendor/libiconv-1.16
CONFIGURE_COMMAND <SOURCE_DIR>/configure
CC=${CMAKE_C_COMPILER}
CFLAGS=${DEPENDENCY_CFLAGS}
@@ -249,8 +235,7 @@ if (APPLE)
)
else()
ExternalProject_Add(unwind
- URL https://download.savannah.nongnu.org/releases/libunwind/libunwind-${UNWIND_VERSION}.tar.gz
- URL_MD5 ${UNWIND_HASH}
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../vendor/libunwind-1.6.2
CONFIGURE_COMMAND <SOURCE_DIR>/configure
CC=${CMAKE_C_COMPILER}
CXX=${CMAKE_CXX_COMPILER}
--
2.25.1
......@@ -6,7 +6,7 @@ git checkout -b new-patch
```
4. Add changes to `tarantool-sys` code and commit them with appropriate messages
3. Run format-patch specifying the commit from which the changes branched off
(currently it's `01023dbc2`)
(currently it's `1ec2a9d15`)
```bash
git format-patch <hash>
```
......
tarantool-sys @ 1ec2a9d1
Subproject commit 01023dbc24986ddacedd8dff6e18ac0a14752723
Subproject commit 1ec2a9d15f2904f07f44021bfae5e67ce55b3214
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment