-
Notifications
You must be signed in to change notification settings - Fork 7
chore: verify signature for arm-gcc toolchain #1108
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This pull request enhances the ARM GCC toolchain installation process in the C++ devcontainer by pre-downloading the toolchain archives during the build stage and verifying their integrity with checksums. The changes eliminate the runtime wget download, improve build performance through apt caching, and ensure the correct architecture-specific toolchain is available.
Changes:
- Added ARM GNU toolchain downloads with SHA256 checksums for both x86_64 and aarch64 architectures in the downloader stages
- Consolidated toolchain extraction into the main RUN instruction with apt caching enabled
- Replaced the separate
wget-based ARM toolchain installation with extraction from pre-downloaded archives
.devcontainer/cpp/Dockerfile
Outdated
|
|
||
| set -e | ||
|
|
||
| tar xJf /dl/arm-gnu-toolchain.tar.xz --exclude="*arm-none-eabi-gdb*" --exclude="share" --strip-components=1 |
Copilot
AI
Jan 28, 2026
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.
The ARM toolchain extraction lacks an explicit destination directory (no -C flag), which means it extracts to the current working directory (/). This could create unexpected files in the root filesystem. Consider adding -C /src or another appropriate destination directory to match the later mv /src/arm-none-eabi command on line 125.
| tar xJf /dl/arm-gnu-toolchain.tar.xz --exclude="*arm-none-eabi-gdb*" --exclude="share" --strip-components=1 | |
| mkdir -p /src | |
| tar xJf /dl/arm-gnu-toolchain.tar.xz -C /src --exclude="*arm-none-eabi-gdb*" --exclude="share" --strip-components=1 |
| RUN mkdir /opt/gcc-arm-none-eabi \ | ||
| && wget --no-hsts -qO - "https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-$(uname -m)-arm-none-eabi.tar.xz" | tar --exclude='*arm-none-eabi-gdb*' --exclude='share' --strip-components=1 -xJC /opt/gcc-arm-none-eabi | ||
| # Install arm-gcc toolchain | ||
| mv /src/arm-none-eabi /opt/gcc-arm-none-eabi |
Copilot
AI
Jan 28, 2026
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.
This command assumes that the ARM toolchain was extracted to /src/arm-none-eabi, but the extraction on line 58 doesn't specify -C /src as the destination. The toolchain is being extracted to the working directory (/) with --strip-components=1, which would place the arm-none-eabi directory at /arm-none-eabi, not /src/arm-none-eabi. Either update line 58 to extract to /src or change this line to mv /arm-none-eabi /opt/gcc-arm-none-eabi.
| mv /src/arm-none-eabi /opt/gcc-arm-none-eabi | |
| mv /arm-none-eabi /opt/gcc-arm-none-eabi |
❌MegaLinter analysis: Error
Detailed Issues❌ DOCKERFILE / hadolint - 1 error
|
📦 Container Size AnalysisNote Comparing 📈 Size Comparison Table
|
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
|
|
||
| set -e | ||
|
|
Copilot
AI
Jan 29, 2026
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.
Unnecessary blank lines have been added around set -e. These blank lines don't add clarity and should be removed to maintain consistency with the existing code style.
| set -e | |
| set -e |
|
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
| wget --no-hsts -qO "${ARM_GNU_TOOLCHAIN_TAR}" "${ARM_GNU_TOOLCHAIN_URL}" | ||
| echo "${ARM_GNU_TOOLCHAIN_SHA256} ${ARM_GNU_TOOLCHAIN_TAR}" | sha256sum -c - | ||
|
|
||
| tar xJf "${ARM_GNU_TOOLCHAIN_TAR}" --exclude="*arm-none-eabi-gdb*" --exclude="share" --strip-components=1 |
Copilot
AI
Jan 29, 2026
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.
The tar extraction uses --strip-components=1 but extracts to the current directory (/src) without specifying a target directory. Later, line 133 expects the extracted content at /src/arm-none-eabi. The strip-components will remove the top-level directory name from the archive, so the extraction may not produce the expected /src/arm-none-eabi path. Either remove --strip-components=1 or add -C flag to specify the extraction target explicitly.
| tar xJf "${ARM_GNU_TOOLCHAIN_TAR}" --exclude="*arm-none-eabi-gdb*" --exclude="share" --strip-components=1 | |
| mkdir -p /src | |
| tar xJf "${ARM_GNU_TOOLCHAIN_TAR}" -C /src --exclude="*arm-none-eabi-gdb*" --exclude="share" --strip-components=1 |
| RUN mkdir /opt/gcc-arm-none-eabi \ | ||
| && wget --no-hsts -qO - "https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-$(uname -m)-arm-none-eabi.tar.xz" | tar --exclude='*arm-none-eabi-gdb*' --exclude='share' --strip-components=1 -xJC /opt/gcc-arm-none-eabi | ||
| # Install arm-gcc toolchain | ||
| mv /src/arm-none-eabi /opt/gcc-arm-none-eabi |
Copilot
AI
Jan 29, 2026
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.
This assumes /src/arm-none-eabi exists after extraction on line 64, but the tar command uses --strip-components=1 which removes the top-level directory. The actual directory structure after extraction may not match this expectation. Verify the archive structure and adjust either the extraction command or this mv command accordingly.




🚀 Hey, I have created a Pull Request
Description of changes
This pull request updates the
.devcontainer/cpp/Dockerfileto improve how the ARM GCC toolchain is installed for both x86_64 and aarch64 development containers. The changes streamline the download and extraction process, ensure better caching for package installs, and remove redundant installation steps.ARM GCC toolchain integration:
/opt/gcc-arm-none-eabi. [1] [2]wgetcommand, reducing redundancy and potential network failures during build.Build performance improvements:
aptpackage management directories to speed up repeated builds and reduce network usage.✔️ Checklist