-
Notifications
You must be signed in to change notification settings - Fork 6
Collection of Improvements #24
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
AlexanderLanin
merged 11 commits into
eclipse-score:main
from
elektrobit-contrib:collection-of-improvements
Sep 9, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7979ec0
remove curl
opajonk 3b61437
pin all relevant tool versions to major/minor/patch
opajonk 3dcc52a
avoid installing recommended tools for qemu
opajonk 001df91
install & remove container build dependencies
opajonk 61276b5
pin all relevant tool versions to major/minor/patch
opajonk 0e3efd5
test also tool versions coming from "other features"
opajonk c26524a
Add persistent bash history
opajonk e16b4ae
Add VSCode plugin for GH-Style Markdow Preview
opajonk c0ac659
fix: probably also here we have to manually login
opajonk 4153add
version bump: ghcr.io/devcontainers/features/common-utils to 2.5.4
opajonk 6e28bbb
fix: update starpls version to 0.1.22 and correct sha256 checksum
opajonk 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
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
6 changes: 6 additions & 0 deletions
6
src/s-core-devcontainer/.devcontainer/s-core-local/install_matching_bazel_version.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,6 @@ | ||
| #!/usr/bin/env bash | ||
| set -eo pipefail | ||
|
|
||
| if [ -f .bazelversion ] && [ "$(cat .bazelversion)" != "$(dpkg --list | grep 'ii bazel ' | awk '{print $3}')" ]; then | ||
| sudo apt-get update && sudo apt-get install -y --allow-downgrades bazel=$(cat .bazelversion) | ||
| fi |
24 changes: 24 additions & 0 deletions
24
src/s-core-devcontainer/.devcontainer/s-core-local/setup_command_history.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,24 @@ | ||
| #!/usr/bin/env bash | ||
| set -eo pipefail | ||
|
|
||
| USERNAME=$(whoami) | ||
| GROUPNAME=$(id -gn) | ||
| COMMANDHISTORY_DIR="/commandhistory" | ||
| BASH_HISTORY_FILE="${COMMANDHISTORY_DIR}/.bash_history" | ||
| SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=${BASH_HISTORY_FILE}" | ||
| BASHRC_FILE="${HOME}/.bashrc" | ||
|
|
||
| # Ensure the directory exists and set permissions | ||
| sudo mkdir -p "${COMMANDHISTORY_DIR}" | ||
| sudo chown "${USERNAME}:${GROUPNAME}" "${COMMANDHISTORY_DIR}" | ||
| sudo chmod 755 "${COMMANDHISTORY_DIR}" | ||
|
|
||
| # Create .bash_history file if it doesn't exist and set permissions | ||
| if [[ ! -f "${BASH_HISTORY_FILE}" ]]; then | ||
| touch "${BASH_HISTORY_FILE}" | ||
| sudo chown "${USERNAME}:${GROUPNAME}" "${BASH_HISTORY_FILE}" | ||
| sudo chmod 600 "${BASH_HISTORY_FILE}" | ||
| fi | ||
|
|
||
| # Add snippet to .bashrc if not already present | ||
| grep -qF -- "${SNIPPET}" "${BASHRC_FILE}" || echo "${SNIPPET}" >> "${BASHRC_FILE}" | ||
26 changes: 16 additions & 10 deletions
26
src/s-core-devcontainer/.devcontainer/s-core-local/tests/test_default.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 |
|---|---|---|
| @@ -1,21 +1,27 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # Read tool versions + metadata into environment variables | ||
| . /devcontainer/features/s-core-local/versions.sh | ||
|
|
||
| # Common tooling | ||
| # For an unknown reason, dot -V reports on Ubuntu Noble a version 2.43.0, while the package has a different version. | ||
| # Hence, we have to work around that. | ||
| check "validate graphviz is working" bash -c "dot -V" | ||
| check "validate curl is working" bash -c "curl --version" | ||
| check "validate graphviz has the correct version" bash -c "dpkg -s graphviz | grep 'Version: ${graphviz_version}'" | ||
|
|
||
| # Other build-related tools | ||
| check "validate protoc is working and has the correct version" bash -c "protoc --version | grep 'libprotoc ${protobuf_compiler_version}'" | ||
|
|
||
| # Bazel and related tools | ||
| check "validate bazel is working" bash -c "bazel version" | ||
| check "validate bazel-compile-commands is working" bash -c "bazel-compile-commands --version" | ||
| check "validate buildifier is working" bash -c "buildifier --version" | ||
| check "validate bazel is working and has the correct version" bash -c "bazel version | grep '${bazel_version}'" | ||
| check "validate buildifier is working and has the correct version" bash -c "buildifier --version | grep '${buildifier_version}'" | ||
| check "validate starpls is working and has the correct version" bash -c "starpls version | grep '${starpls_version}'" | ||
| check "validate bazel-compile-commands is working and has the correct version" bash -c "bazel-compile-commands --version 2>&1 | grep '${bazel_compile_commands_version}'" | ||
|
|
||
| # Rust tooling | ||
| check "validate rust-analyzer is working" bash -c "rust-analyzer --version" | ||
|
|
||
| # Other build-related tools | ||
| check "validate protoc is working" bash -c "protoc --version" | ||
| check "validate rust-analyzer is working and has the correct version" bash -c "rust-analyzer --version 2>&1 | grep '${rust_analyzer_version}'" | ||
|
|
||
| # Qemu target-related tools | ||
| check "validate qemu-system-aarch64 is working" bash -c "qemu-system-aarch64 --version" | ||
| check "validate sshpass is working" bash -c "sshpass -V" | ||
| check "validate qemu-system-aarch64 is working and has the correct version" bash -c "qemu-system-aarch64 --version | grep '${qemu_system_arm_version}'" | ||
| check "validate sshpass is working and has the correct version" bash -c "sshpass -V | grep '${sshpass_version}'" |
12 changes: 12 additions & 0 deletions
12
src/s-core-devcontainer/.devcontainer/s-core-local/versions.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 -euo pipefail | ||
|
|
||
| curl -L "https://github.com/mikefarah/yq/releases/download/v4.47.1/yq_linux_amd64" -o /tmp/yq | ||
| echo "0fb28c6680193c41b364193d0c0fc4a03177aecde51cfc04d506b1517158c2fb /tmp/yq" | sha256sum -c - || exit -1 | ||
| chmod +x /tmp/yq | ||
|
|
||
| # Read tool versions and metadata into environment variables | ||
| export $(/tmp/yq eval '.. | select((tag == "!!map" or tag == "!!seq") | not) | (path | join("_")) + "=" + .' /devcontainer/features/s-core-local/versions.yaml | awk '!/=$/{print }' | xargs) | ||
|
|
||
| # Clean up | ||
| rm -f /tmp/yq |
46 changes: 46 additions & 0 deletions
46
src/s-core-devcontainer/.devcontainer/s-core-local/versions.yaml
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,46 @@ | ||
| bazel: | ||
| version: 8.3.0 | ||
|
|
||
| graphviz: | ||
| version: 2.42.2 | ||
|
|
||
| protobuf_compiler: | ||
| version: 3.21.12 | ||
|
|
||
| qemu_system_arm: | ||
| version: 1:8.2.2 | ||
|
|
||
| sshpass: | ||
| version: 1.09 | ||
|
|
||
| buildifier: | ||
| version: 8.2.1 | ||
| amd64: | ||
| # The following sha256sum is for the binary buildifier-linux-amd64 | ||
| # from the GitHub release page of buildtools | ||
| # It is generated by running 'sha256sum buildifier-linux-amd64' | ||
| sha256: 6ceb7b0ab7cf66fceccc56a027d21d9cc557a7f34af37d2101edb56b92fcfa1a | ||
|
|
||
| starpls: | ||
| version: 0.1.22 | ||
| amd64: | ||
| # The following sha256sum is for the binary starpls-linux-amd64 | ||
| # from the GitHub release page of starpls | ||
| # It is generated by running 'sha256sum starpls-linux-amd64' | ||
| sha256: 7c661cdde0d1c026665086d07523d825671e29056276681616bb32d0273c5eab | ||
|
|
||
| bazel_compile_commands: | ||
| version: 0.17.2 | ||
| amd64: | ||
| # The following sha256sums are for the deb package bazel-compile-commands_<version>-noble_amd64.deb | ||
| # It is generated by running 'sha256sum bazel-compile-commands_<version>-noble_amd64.deb' | ||
| sha256: 97239b316df58fd3370a8aa6350790ececd5e4a1de30efb42d45cb1c300a179a | ||
|
|
||
| rust_analyzer: | ||
| date: 2025-08-25 | ||
| version: 0.3.2593-standalone | ||
| amd64: | ||
| # The following sha256sum is for the binary rust-analyzer-x86_64-unknown-linux-gnu.gz | ||
| # from the GitHub release page of rust-analyzer | ||
| # It is generated by running 'sha256sum rust-analyzer-x86_64-unknown-linux-gnu.gz' | ||
| sha256: 487fb1cb99e567fd6b818cc88a7c1452d5260da57dbc171fc1359a4b604348ae |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about https://github.com/stuartleeks/dev-container-features/blob/main/src/shell-history/README.md ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me test that one. It has zsh support, which may be not a bad idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it, but it fails to install
Apparently, there are additional requirements for this feature. For this little advantage, it seems to be too complicated.