1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

review fixes

This commit is contained in:
aleksei.bukhalov
2025-07-04 14:36:10 +02:00
committed by Leonid Fedorov
parent 6a57129416
commit 09f5df182c
8 changed files with 38 additions and 26 deletions

View File

@ -481,7 +481,7 @@ local Pipeline(branch, platform, event, arch="amd64", server="10.6-enterprise",
'bash -c "set -o pipefail && bash /mdb/' + builddir + "/storage/columnstore/columnstore/build/bootstrap_mcs.sh " +
"--build-type RelWithDebInfo " +
"--distro " + platform + " " +
"--build-packages --install-deps --sccache --sccache-arch " + arch +
"--build-packages --install-deps --sccache" +
" " + customBootstrapParams +
" " + customBootstrapParamsForExisitingPipelines(platform) + " | " +
"/mdb/" + builddir + "/storage/columnstore/columnstore/build/ansi2txt.sh " +
@ -497,7 +497,7 @@ local Pipeline(branch, platform, event, arch="amd64", server="10.6-enterprise",
DEBIAN_FRONTEND: "noninteractive",
},
commands: [
"bash /mdb/" + builddir + "/storage/columnstore/columnstore/build/build_cmapi.sh --distro " + platform + " --arch " + arch,
"bash /mdb/" + builddir + "/storage/columnstore/columnstore/build/build_cmapi.sh --distro " + platform,
],
},
{

View File

@ -76,11 +76,11 @@ if [[ ! " ${DISTRO_OPTIONS[*]} " =~ " ${OS} " ]]; then
detect_distro
fi
if [[ "$OS" == *"rocky"* ]]; then
pkg_format="rpm"
select_pkg_format ${OS}
if [[ "$PKG_FORMAT" == "rpm" ]]; then
CTEST_BIN_NAME=:"ctest3"
else
pkg_format="deb"
CTEST_BIN_NAME="ctest"
fi
@ -277,7 +277,7 @@ modify_packaging() {
echo "Modifying_packaging..."
cd $MDB_SOURCE_PATH
if [[ $pkg_format == "deb" ]]; then
if [[ $PKG_FORMAT == "deb" ]]; then
sed -i 's|.*-d storage/columnstore.*|elif [[ -d storage/columnstore/columnstore/debian ]]|' debian/autobake-deb.sh
fi
@ -289,7 +289,7 @@ modify_packaging() {
grep mariadb /usr/share/lto-disabled-list/lto-disabled-list
fi
if [[ $pkg_format == "deb" ]]; then
if [[ $PKG_FORMAT == "deb" ]]; then
apt-cache madison liburing-dev | grep liburing-dev || {
sed 's/liburing-dev/libaio-dev/g' -i debian/control &&
sed '/-DIGNORE_AIO_CHECK=YES/d' -i debian/rules &&
@ -498,7 +498,7 @@ generate_svgs() {
build_package() {
cd $MDB_SOURCE_PATH
if [[ $pkg_format == "rpm" ]]; then
if [[ $PKG_FORMAT == "rpm" ]]; then
command="cmake ${MDB_CMAKE_FLAGS[@]} && make -j\$(nproc) package"
else
export DEBIAN_FRONTEND="noninteractive"

View File

@ -13,7 +13,6 @@ MDB_SOURCE_PATH=$(realpath "$SCRIPT_LOCATION"/../../../..)
source "$SCRIPT_LOCATION"/utils.sh
optparse.define short=d long=distro desc="distro" variable=OS
optparse.define short=a long=arch desc="architecture" variable=ARCH
source $(optparse.build)
echo "Arguments received: $@"
@ -22,18 +21,15 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi
if [[ -z "${OS:-}" || -z "${ARCH:-}" ]]; then
echo "Please provide provide --distro and --arch parameters, e.g. ./build_cmapi.sh --distro ubuntu:22.04 --arch amd64"
if [[ -z "${OS:-}" ]]; then
echo "Please provide provide --distro parameter, e.g. ./build_cmapi.sh --distro ubuntu:22.04"
exit 1
fi
pkg_format="deb"
if [[ "$OS" == *"rocky"* ]]; then
pkg_format="rpm"
fi
select_pkg_format ${OS}
if [[ "$ARCH" == "arm64" ]]; then
export CC=gcc #TODO: what it is for?
if [[ "$(arch)" == "arm64" ]]; then
export CC=gcc
fi
on_exit() {
@ -55,18 +51,18 @@ install_deps() {
retry_eval 5 "dnf config-manager --set-enabled devel && dnf update -q -y" #to make redhat-lsb-core available for rocky 9
fi
if [[ "$pkg_format" == "rpm" ]]; then
if [[ "$PKG_FORMAT" == "rpm" ]]; then
retry_eval 5 "dnf update -q -y && dnf install -q -y epel-release wget zstd findutils gcc cmake make rpm-build redhat-lsb-core libarchive"
else
retry_eval 5 "apt-get update -qq -o Dpkg::Use-Pty=0 && apt-get install -qq -o Dpkg::Use-Pty=0 wget zstd findutils gcc cmake make dpkg-dev lsb-release"
fi
if [ "$ARCH" == "amd64" ]; then
if [ "$(arch)" == "x86_64" ]; then
PYTHON_URL="https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13+20220802-x86_64_v2-unknown-linux-gnu-pgo+lto-full.tar.zst"
elif [ "$ARCH" == "arm64" ]; then
elif [ "$(arch)" == "arm64" ]; then
PYTHON_URL="https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13+20220802-aarch64-unknown-linux-gnu-noopt-full.tar.zst"
else
echo "Unsupported architecture: $ARCH"
echo "Unsupported architecture: $(arch)"
exit 1
fi
@ -84,7 +80,7 @@ install_deps() {
build_cmapi() {
cd "$COLUMNSTORE_SOURCE_PATH"/cmapi
./cleanup.sh
cmake -D"${pkg_format^^}"=1 -DSERVER_DIR="$MDB_SOURCE_PATH" . && make package
cmake -D"${PKG_FORMAT^^}"=1 -DSERVER_DIR="$MDB_SOURCE_PATH" . && make package
}
install_deps
build_cmapi

View File

@ -27,8 +27,10 @@ if [[ -z "${CONTAINER_NAME:-}" || -z "${DOCKER_IMAGE:-}" || -z "${RESULT:-}" ||
exit 1
fi
select_pkg_format ${RESULT}
start_container() {
if [[ "$RESULT" == *rocky* ]]; then
if [[ $PKG_FORMAT == "rpm" ]]; then
SYSTEMD_PATH="/usr/lib/systemd/systemd"
MTR_PATH="/usr/share/mysql-test"
else

View File

@ -39,7 +39,9 @@ if [[ -z $(docker ps -q --filter "name=${CONTAINER_NAME}") ]]; then
exit 1
fi
if [[ "$RESULT" == *rocky* ]]; then
select_pkg_format ${RESULT}
if [[ "$PKG_FORMAT" == "rpm" ]]; then
SYSTEMD_PATH="/usr/lib/systemd/systemd"
MTR_PATH="/usr/share/mysql-test"
else

View File

@ -39,8 +39,9 @@ collect_logs() {
}
trap collect_logs EXIT
select_pkg_format ${RESULT}
if [[ "$DISTRO" == *rocky* ]]; then
if [[ "$PKG_FORMAT" == "rpm" ]]; then
SOCKET_PATH="/var/lib/mysql/mysql.sock"
MTR_PATH="/usr/share/mysql-test"
else

View File

@ -23,8 +23,9 @@ for flag in MCS_IMAGE_NAME DISTRO; do
fi
done
select_pkg_format ${DISTRO}
if [[ "$DISTRO" == *rocky* ]]; then
if [[ "$PKG_FORMAT" == "rpm" ]]; then
SOCKET_PATH="/var/lib/mysql/mysql.sock"
MTR_PATH="/usr/share/mysql-test"
else

View File

@ -171,6 +171,16 @@ detect_distro() {
message "Detected $color_yellow$OS $OS_VERSION$color_normal"
}
select_pkg_format() {
local distro="$1"
if [[ "$distro" == *rocky* ]]; then
export PKG_FORMAT="rpm"
else
export PKG_FORMAT="deb"
fi
}
menuStr=""
function hideCursor() {