Fix Docker build: replace deprecated udev with systemd-dev - #37
Fix Docker build: replace deprecated udev with systemd-dev#37gabrielfrasantos with Copilot wants to merge 2 commits into
udev with systemd-dev#37Conversation
…ase.json Agent-Logs-Url: https://github.com/embedded-pro/embedded-devcontainer/sessions/f7a208ef-d431-4d01-bd21-46bf591f4f91 Co-authored-by: gabrielfrasantos <21131318+gabrielfrasantos@users.noreply.github.com>
udev with systemd-dev
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. No release type found in pull request title "Fix Docker build: replace deprecated Available types:
|
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit cc6c109. |
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 19 | 0 | 0 | 0.61s | |
| ✅ DOCKERFILE | hadolint | 2 | 0 | 0 | 0.92s | |
| ✅ GHERKIN | gherkin-lint | 6 | 0 | 0 | 2.55s | |
| ✅ JSON | npm-package-json-lint | yes | no | no | 0.56s | |
| ✅ JSON | prettier | 16 | 2 | 0 | 0 | 0.68s |
| ✅ JSON | v8r | 16 | 0 | 0 | 8.22s | |
| markdownlint | 9 | 0 | 1 | 0 | 0.88s | |
| ✅ MARKDOWN | markdown-table-formatter | 9 | 1 | 0 | 0 | 0.27s |
| ✅ REPOSITORY | gitleaks | yes | no | no | 1.23s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.01s | |
| grype | yes | no | 2 | 32.58s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 0.96s | |
| ✅ REPOSITORY | syft | yes | no | no | 2.05s | |
| ✅ REPOSITORY | trivy | yes | no | no | 5.61s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.24s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 2.41s | |
| ✅ SPELL | lychee | 70 | 0 | 0 | 21.59s | |
| ✅ YAML | prettier | 25 | 0 | 0 | 0 | 1.14s |
| ✅ YAML | v8r | 25 | 0 | 0 | 9.51s | |
| ✅ YAML | yamllint | 25 | 0 | 0 | 0.73s |
Detailed Issues
⚠️ REPOSITORY / grype - 2 warnings
note: A low vulnerability in python package: pygments, version 2.17.2 was found at: /.devcontainer/cpp/requirements.txt
warning: A medium vulnerability in python package: requests, version 2.32.4 was found at: /.devcontainer/cpp/requirements.txt
warning: 1 warnings emitted
⚠️ MARKDOWN / markdownlint - 1 error
.github/CONTRIBUTING.md:18:7 MD051/link-fragments Link fragments should be valid [Context: "[Found a security vulnerability?](#found-a-security-vulnerability)"]
See detailed reports in MegaLinter artifacts
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@9.0.1 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,DOCKERFILE_HADOLINT,GHERKIN_GHERKIN_LINT,JSON_V8R,JSON_PRETTIER,JSON_NPM_PACKAGE_JSON_LINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R
Pull Request Report (#37)Static measures
Time related measures
Status check related measures
|

udev(255.4-1ubuntu8.12) is no longer available in Ubuntu repos and has been superseded bysystemd-dev, breaking Docker builds for both thecppandrustcontainers.Changes
.devcontainer/rust/apt-requirements-base.json—udev→systemd-dev.devcontainer/cpp/apt-requirements-base.json—udev→systemd-devOriginal prompt
Problem
The Docker build is failing because the pinned
udevpackage (255.4-1ubuntu8.12) is no longer available in the Ubuntu package repositories. Theudevpackage has been replaced bysystemd-dev.Error from CI logs:
Failing job: https://github.com/embedded-pro/embedded-devcontainer/actions/runs/23394815198/job/68927524828?pr=34
The failure occurs during the Docker build step
[stage-1 2/7]which reads.devcontainer/rust/apt-requirements-base.jsonand installs the listed packages viaapt-get.Fix Required
In the file
.devcontainer/rust/apt-requirements-base.json, replace theudeventry withsystemd-dev. The version string may or may not need to change — if255.4-1ubuntu8.12is not available forsystemd-deveither, find the correct available version by looking at how the project handles version pinning, or remove the exact version pin temporarily.Change from:
To:
If the version
255.4-1ubuntu8.12is not available forsystemd-dev, try using an unversioned approach or check what versions are available. The key change is the package name:udev→systemd-dev.File to modify
.devcontainer/rust/apt-requirements-base.jsonThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant:
I'll start by fetching the job logs and the workflow definition to understand what's failing.
Assistant:
Failing Job Analysis
The Docker build is failing because the pinned version of
udev(255.4-1ubuntu8.12) is no longer available in the Ubuntu package repositories. The error message also indicates that theudevpackage has been replaced bysystemd-dev:Solution
Update
.devcontainer/rust/apt-requirements-base.jsonto replaceudevwithsystemd-dev(its replacement package) and use the correct available version. You may also want to verify that other pinned package versions are still available.{ "bash-completion": "1:2.11-8", "ca-certificates": "20240203", "g++-14": "14.2.0-4ubuntu2~24.04.1", "git": "1:2.43.0-1ubuntu7.3", "gnupg2": "2.4.4-2ubuntu17.4", "rustup": "1.26.0-5build1", "systemd-dev": "255.4-1ubuntu8.12", "wget": "1.21.4-1ubuntu4.1", "xz-utils": "5.6.1+really5.4.5-1ubuntu0.2" }User: Ok, what is needed to fix this PR?
Assistant:
Let me look at the full PR to understand all the changes and context.
Assistant: Here's what's happening and what needs to be fixed:
The Problem
The CI failure in PR #34 is not caused by the PR's own changes (which only update VS Code extensions). The failure comes from a pre-existing issue on
main— the Docker build fails because the pinnedudevpackage version is no longer available in the Ubuntu repositories:The file
apt-requirements-base.jsonis identical on bothmainand this PR branch, meaning this build would also fail onmain.What Needs to Be Fixed
The file
.devcontainer/rust/apt-requirements-base.jsonneeds to replaceudevwith its successor packagesystemd-dev. There are two approaches:Option 1: Fix it in a separate PR on
main(recommended)Since this is a pre-existing issue unrelated to the VS Code extension updat...
This pull request was created from Copilot chat.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.