From 3e4ddd4422d1427edaebda2f9f4a7f8462434958 Mon Sep 17 00:00:00 2001 From: Giuseppe Baccini Date: Mon, 27 Nov 2023 14:12:26 +0100 Subject: [PATCH] reverted back to Leap builder Signed-off-by: Giuseppe Baccini --- .gitignore | 1 + README.md | 13 +++++-------- contrib/depot_tools | 2 +- docs/build.md | 6 +++--- scripts/Dockerfile.builder | 3 ++- scripts/Dockerfile.chatterbox | 2 +- scripts/Dockerfile.chatterbox-test | 2 +- scripts/build.sh | 3 +++ 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index eda907d..6adeee6 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ contrib/.cipd contrib/.gclient* contrib/rapidyaml-build contrib/pistache-build +venv diff --git a/README.md b/README.md index 102f418..b7a4c74 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

chatterbox-logo

-chatterbox is a tool for quickly write a conversation against a REST endpoint. +chatterbox is a tool for chatting with a REST endpoint. You write conversations using a `yaml` formalism describing an arbitrary complex interaction between chatterbox and the endpoint. @@ -22,13 +22,10 @@ chatterbox could be useful to you when you have to: - Quickly build a complex interaction with an endpoint. - Debug/test your endpoint when APIs are not available. -chatterbox embeds [V8](https://v8.dev/) the Google’s open source -high-performance JavaScript engine. - -The V8 engine is used to allow an input to be optionally evaluated -as the result of a user defined JavaScript function. -Moreover, the V8 engine allows to maintain a JavaScript context -during the conversation; this can be used to store an arbitrary state. +chatterbox embeds a JavaScript interpreter: [V8](https://v8.dev/) +so the user can benefit from scripting capabilities. +A JavaScript context is kept during the entire conversation; +this allows to maintain an arbitrary state. ## quick example diff --git a/contrib/depot_tools b/contrib/depot_tools index 60adf7b..9c44fe5 160000 --- a/contrib/depot_tools +++ b/contrib/depot_tools @@ -1 +1 @@ -Subproject commit 60adf7b6d975f3fe8d337edb85445dd8f51e5ae8 +Subproject commit 9c44fe5fca957f65f36b5a5f2b375c2ad95b83dc diff --git a/docs/build.md b/docs/build.md index de68266..254ac78 100644 --- a/docs/build.md +++ b/docs/build.md @@ -3,7 +3,7 @@ - [Build](#build) - [Build requirements](#build-requirements) - [How to build](#how-to-build) - - [Build using the OpenSuse Tumbleweed Docker builder image](#build-using-the-opensuse-tumbleweed-docker-builder-image) + - [Build using the OpenSuse Leap Docker builder image](#build-using-the-opensuse-leap-docker-builder-image) ## Build requirements @@ -30,7 +30,7 @@ cd scripts ./build.sh build-all ``` -### Build using the OpenSuse Tumbleweed Docker builder image +### Build using the OpenSuse Leap Docker builder image It is possible to use a Docker builder image to compile the binary of `chatterbox`. @@ -55,7 +55,7 @@ localhost/chatterbox-builder latest ``` Using this image, it is possible to build the `chatterbox` binary -for OpenSuse Tumbleweed: +for OpenSuse Leap: ```shell cd scripts diff --git a/scripts/Dockerfile.builder b/scripts/Dockerfile.builder index a0b1bc5..0b61adf 100644 --- a/scripts/Dockerfile.builder +++ b/scripts/Dockerfile.builder @@ -1,4 +1,4 @@ -FROM opensuse/tumbleweed +FROM opensuse/leap:15.5 LABEL Name=chatterbox-builder RUN zypper -n install --no-recommends \ @@ -12,6 +12,7 @@ RUN zypper -n install --no-recommends \ ccache \ ninja \ binutils \ + python311 \ gcc12-c++ \ automake \ autogen \ diff --git a/scripts/Dockerfile.chatterbox b/scripts/Dockerfile.chatterbox index e90a7b2..6d46af1 100644 --- a/scripts/Dockerfile.chatterbox +++ b/scripts/Dockerfile.chatterbox @@ -1,4 +1,4 @@ -FROM opensuse/tumbleweed +FROM opensuse/leap:15.5 LABEL Name=chatterbox RUN zypper -n install --no-recommends curl \ diff --git a/scripts/Dockerfile.chatterbox-test b/scripts/Dockerfile.chatterbox-test index 9d78991..db10cf8 100644 --- a/scripts/Dockerfile.chatterbox-test +++ b/scripts/Dockerfile.chatterbox-test @@ -1,4 +1,4 @@ -FROM opensuse/tumbleweed +FROM opensuse/leap:15.5 LABEL Name=chatterbox-test RUN zypper -n install --no-recommends curl \ diff --git a/scripts/build.sh b/scripts/build.sh index 08e15ac..a82e542 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -5,6 +5,7 @@ basedir=$(realpath ${BASE_DIR:-"../"}) ninja_jobs=${NINJA_JOBS:-"6"} builder_image=${BUILDER_IMAGE:-"chatterbox-builder"} contrib_path=$(realpath ${CONTRIB_PATH:-"../contrib"}) +python_bin=${PYTHON_BIN:-"python3.11"} usage() { cat << EOF @@ -159,6 +160,8 @@ patch_v8_code() { } build_v8() { + $python_bin -m venv venv + source venv/bin/activate echo "Building V8 ..." PATH=$contrib_path/depot_tools:$PATH cd $contrib_path