-
Notifications
You must be signed in to change notification settings - Fork 83
feat(core): Add support for building and running on musllinux_1_2; Add musllinux_1_2 dependency container images. #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
06c7147
feat(core): Add support for musllinux_1_2
jackluo923 e4adcf6
Add docs.
jackluo923 889f97d
Update tag for arm64
jackluo923 4998cd6
Rename directory to match other platforms
jackluo923 9b14097
Merge branch 'main' into musllinux_1_2
jackluo923 4edace6
Addressed code-rabbit review points.
jackluo923 fb47ca2
Addressed code-rabbit review points.
jackluo923 55dc329
Merge branch 'main' into musllinux_1_2
jackluo923 6be8932
Update components/core/tools/scripts/lib_install/musllinux_1_2/instal…
jackluo923 1112b85
Update components/core/tools/scripts/lib_install/musllinux_1_2/instal…
jackluo923 3c06cbf
Update docs/src/dev-guide/tooling-containers.md
jackluo923 56d3b92
Update components/core/tools/docker-images/clp-env-base-musllinux_1_2…
jackluo923 bedf84e
Removed comment regarding image flattening warning.
jackluo923 7b29331
Updated the docs related to the version of dependency task is install…
jackluo923 d34b315
Typo in comments in install-package-from-source.sh
jackluo923 c2c4a31
Update components/core/tools/docker-images/clp-env-base-musllinux_1_2…
jackluo923 5eea5f1
Merge branch 'main' into musllinux_1_2
jackluo923 987104c
Upgraded spdlog to 1.14.1, the latest version
jackluo923 8d2ed5d
Merge branch 'main' into musllinux_1_2
jackluo923 873b9dc
Update doc.
jackluo923 33d85e5
Resolve more code review issues.
jackluo923 2980a94
Merge branch 'main' into musllinux_1_2
jackluo923 6d9286b
Merge branch 'main' into musllinux_1_2
LinZhihao-723 d3a7817
Merge branch 'main' into musllinux_1_2
jackluo923 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
components/core/tools/docker-images/clp-env-base-musllinux_1_2-aarch64/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| FROM quay.io/pypa/musllinux_1_2_aarch64 | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| WORKDIR /root | ||
|
|
||
| RUN mkdir -p ./tools/scripts/lib_install | ||
| COPY ./tools/scripts/lib_install ./tools/scripts/lib_install | ||
|
|
||
| RUN ./tools/scripts/lib_install/musllinux_1_2/install-all.sh | ||
|
|
||
| # Remove cached files | ||
| RUN apk cache clean --all && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
27 changes: 27 additions & 0 deletions
27
components/core/tools/docker-images/clp-env-base-musllinux_1_2-aarch64/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
| component_root="${script_dir}/../../../" | ||
|
|
||
| build_cmd=( | ||
| docker buildx build | ||
| --platform linux/arm64 | ||
| --tag clp-core-dependencies-aarch64-musllinux_1_2:dev | ||
| "$component_root" | ||
| --file "${script_dir}/Dockerfile" | ||
| --load | ||
| ) | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ; | ||
| then | ||
| build_cmd+=( | ||
| --label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)" | ||
| --label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)" | ||
| ) | ||
| fi | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo "Running: ${build_cmd[*]}" | ||
| "${build_cmd[@]}" | ||
11 changes: 11 additions & 0 deletions
11
components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| FROM quay.io/pypa/musllinux_1_2_x86_64 AS base | ||
|
|
||
| WORKDIR /root | ||
|
|
||
| RUN mkdir -p ./tools/scripts/lib_install | ||
| COPY ./tools/scripts/lib_install ./tools/scripts/lib_install | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| RUN ./tools/scripts/lib_install/musllinux_1_2/install-all.sh | ||
|
|
||
| # Remove cached files | ||
| RUN apk cache clean --all && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* | ||
27 changes: 27 additions & 0 deletions
27
components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
| component_root="${script_dir}/../../../" | ||
|
|
||
| build_cmd=( | ||
| docker buildx build | ||
| --platform linux/amd64 | ||
| --tag clp-core-dependencies-x86-musllinux_1_2:dev | ||
| "$component_root" | ||
| --file "${script_dir}/Dockerfile" | ||
| --load | ||
| ) | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ; | ||
| then | ||
| build_cmd+=( | ||
| --label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)" | ||
| --label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)" | ||
| ) | ||
| fi | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo "Running: ${build_cmd[*]}" | ||
| "${build_cmd[@]}" | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
12 changes: 12 additions & 0 deletions
12
components/core/tools/scripts/lib_install/musllinux_1_2/install-all.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
|
||
| "${script_dir}/install-prebuilt-packages.sh" | ||
| "${script_dir}/install-packages-from-source.sh" | ||
|
|
||
| # TODO: https://github.com/y-scope/clp/issues/795 | ||
| "${script_dir}/../check-cmake-version.sh" | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
22 changes: 22 additions & 0 deletions
22
components/core/tools/scripts/lib_install/musllinux_1_2/install-packages-from-source.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
| lib_install_scripts_dir="${script_dir}/.." | ||
|
|
||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # NOTE: The remaining installation scripts depend on boost, so we install it beforehand. | ||
| "${lib_install_scripts_dir}/install-boost.sh" 1.87.0 | ||
|
|
||
| # NOTE: | ||
| # 1. libarchive may statically link with LZMA, LZ4, and Zstandard, so we install them beforehand. | ||
| # 2. The versions of libarchive, LZMA, LZ4, and Zstandard available in musllinux_1_2's package | ||
| # repositories are either dated or don't include static libraries, so we install more recent | ||
| # versions from source. | ||
| "${lib_install_scripts_dir}/liblzma.sh" 5.8.1 | ||
| "${lib_install_scripts_dir}/lz4.sh" 1.10.0 | ||
| "${lib_install_scripts_dir}/zstandard.sh" 1.5.7 | ||
| "${lib_install_scripts_dir}/libarchive.sh" 3.8.0 | ||
|
|
||
| "${lib_install_scripts_dir}/msgpack.sh" 7.0.0 | ||
47 changes: 47 additions & 0 deletions
47
components/core/tools/scripts/lib_install/musllinux_1_2/install-prebuilt-packages.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| apk update && apk add --no-cache \ | ||
| bzip2-dev \ | ||
| bzip2-static \ | ||
| curl-dev \ | ||
| jq \ | ||
| mariadb-connector-c-dev \ | ||
| openjdk11-jdk \ | ||
| openssl-dev \ | ||
| zlib-dev \ | ||
| zlib-static | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Determine architecture for `task` release to install | ||
| arch=$(uname -m) | ||
| case "$arch" in | ||
| "x86_64") | ||
| task_pkg_arch="amd64" | ||
| ;; | ||
| "aarch64") | ||
| task_pkg_arch="arm64" | ||
| ;; | ||
| *) | ||
| echo "Error: Unsupported architecture - $arch" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # Install `task` | ||
| # NOTE: We lock `task` to a version < 3.43 to avoid https://github.com/y-scope/clp/issues/872 | ||
| task_pkg_path=$(mktemp -t task-pkg.XXXXXXXXXX).tar.gz || exit 1 | ||
| curl \ | ||
| --fail \ | ||
| --location \ | ||
| --output "$task_pkg_path" \ | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --show-error \ | ||
| "https://github.com/go-task/task/releases/download/v3.42.1/task_linux_${task_pkg_arch}.tar.gz" | ||
| tar -C /usr/local/bin -xzf "$task_pkg_path" task | ||
| chmod +x /usr/local/bin/task | ||
| rm "$task_pkg_path" | ||
|
|
||
| # Downgrade to CMake v3 to work around https://github.com/y-scope/clp/issues/795 | ||
| pipx uninstall cmake | ||
| pipx install cmake~=3.31 | ||
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jackluo923 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.