build: install automake 1.16.5 from source in dev container#783
build: install automake 1.16.5 from source in dev container#783yutaro-sakamoto wants to merge 3 commits intoopensourcecobol:developfrom
Conversation
- Remove automake from dnf packages - Download and build automake 1.16.5 from GNU FTP - Add SHA256 checksum verification for security - Use parallel build for faster compilation - Add automake version check to CI workflow
There was a problem hiding this comment.
Pull request overview
This PR updates the dev container to install automake 1.16.5 from source rather than using the dnf package manager, ensuring a consistent version across development environments. The change addresses version consistency concerns while adding verification through CI.
Changes:
- Replace dnf-based automake installation with source-based installation of version 1.16.5
- Add wget package for downloading automake source tarball
- Add automake version verification to CI workflow
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .devcontainer/Dockerfile | Removes automake from dnf packages, adds wget, and implements source-based installation of automake 1.16.5 with build steps and cleanup |
| .github/workflows/check-dev-container.yml | Adds automake version check to verify the installation in CI |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| && tar xzf automake-1.16.5.tar.gz \ | ||
| && cd automake-1.16.5 \ | ||
| && ./configure \ | ||
| && make -j"$(nproc)" \ | ||
| && make install \ | ||
| && cd .. \ | ||
| && rm -rf automake-1.16.5 automake-1.16.5.tar.gz | ||
|
|
There was a problem hiding this comment.
The DL3003 hadolint rule warns against using 'cd' in a RUN instruction instead of WORKDIR. While the current suppression allows the build to work, using WORKDIR would be more aligned with Docker best practices and make directory changes more explicit.
Consider refactoring the automake installation to use WORKDIR for better clarity and to follow Docker conventions, though this would require splitting the RUN instruction or accepting the additional layer.
| && tar xzf automake-1.16.5.tar.gz \ | |
| && cd automake-1.16.5 \ | |
| && ./configure \ | |
| && make -j"$(nproc)" \ | |
| && make install \ | |
| && cd .. \ | |
| && rm -rf automake-1.16.5 automake-1.16.5.tar.gz | |
| && tar xzf automake-1.16.5.tar.gz | |
| WORKDIR /automake-1.16.5 | |
| RUN ./configure \ | |
| && make -j"$(nproc)" \ | |
| && make install \ | |
| && rm -rf /automake-1.16.5 /automake-1.16.5.tar.gz | |
| WORKDIR / |
| && wget -q https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz \ | ||
| && tar xzf automake-1.16.5.tar.gz \ | ||
| && cd automake-1.16.5 \ | ||
| && ./configure \ | ||
| && make -j"$(nproc)" \ | ||
| && make install \ | ||
| && cd .. \ | ||
| && rm -rf automake-1.16.5 automake-1.16.5.tar.gz |
There was a problem hiding this comment.
This PR installs automake 1.16.5 from source in the dev container to ensure version consistency, but the static-analysis.yml workflow (line 27) still installs automake via dnf, which may result in a different version. This inconsistency could lead to build differences between the dev container and the CI environment.
For true consistency across environments as stated in the PR description, consider also updating static-analysis.yml to install the same automake version from source.
| && wget -q https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz \ | ||
| && tar xzf automake-1.16.5.tar.gz \ | ||
| && cd automake-1.16.5 \ | ||
| && ./configure \ | ||
| && make -j"$(nproc)" \ | ||
| && make install \ |
There was a problem hiding this comment.
This Dockerfile downloads and builds automake-1.16.5.tar.gz directly from https://ftp.gnu.org and executes its configure/make as root without any checksum or signature verification, which introduces a supply chain risk. If an attacker can compromise or MITM the download host, they can serve a malicious tarball that will be built and installed into the dev container, potentially exfiltrating source code or secrets from developers' environments. To reduce this risk, verify the archive's integrity (e.g., pinned checksum or signature) or rely on a trusted, managed package source instead of an ad-hoc wget+build step.
Summary / 概要
Test plan / テスト方法
automake --versionoutputs 1.16.5 in the containerautomake --versionが1.16.5を出力することを確認