Skip to content

Fix Docker build: replace deprecated udev with systemd-dev - #37

Closed
gabrielfrasantos with Copilot wants to merge 2 commits into
mainfrom
copilot/replace-udev-with-systemd-dev
Closed

Fix Docker build: replace deprecated udev with systemd-dev#37
gabrielfrasantos with Copilot wants to merge 2 commits into
mainfrom
copilot/replace-udev-with-systemd-dev

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

udev (255.4-1ubuntu8.12) is no longer available in Ubuntu repos and has been superseded by systemd-dev, breaking Docker builds for both the cpp and rust containers.

Changes

  • .devcontainer/rust/apt-requirements-base.jsonudevsystemd-dev
  • .devcontainer/cpp/apt-requirements-base.jsonudevsystemd-dev
-  "udev": "255.4-1ubuntu8.12",
+  "systemd-dev": "255.4-1ubuntu8.12",
Original prompt

Problem

The Docker build is failing because the pinned udev package (255.4-1ubuntu8.12) is no longer available in the Ubuntu package repositories. The udev package has been replaced by systemd-dev.

Error from CI logs:

E: Package 'udev' has no installation candidate
However the following packages replace it:
  systemd-dev

E: Version '255.4-1ubuntu8.12' for 'udev' was not found

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.json and installs the listed packages via apt-get.

Fix Required

In the file .devcontainer/rust/apt-requirements-base.json, replace the udev entry with systemd-dev. The version string may or may not need to change — if 255.4-1ubuntu8.12 is not available for systemd-dev either, find the correct available version by looking at how the project handles version pinning, or remove the exact version pin temporarily.

Change from:

"udev": "255.4-1ubuntu8.12",

To:

"systemd-dev": "255.4-1ubuntu8.12",

If the version 255.4-1ubuntu8.12 is not available for systemd-dev, try using an unversioned approach or check what versions are available. The key change is the package name: udevsystemd-dev.

File to modify

  • .devcontainer/rust/apt-requirements-base.json

The 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 the udev package has been replaced by systemd-dev:

E: Package 'udev' has no installation candidate
However the following packages replace it:
  systemd-dev

E: Version '255.4-1ubuntu8.12' for 'udev' was not found

Solution

Update .devcontainer/rust/apt-requirements-base.json to replace udev with systemd-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"
}

Note: If the version 255.4-1ubuntu8.12 is also unavailable for systemd-dev, you'll need to check the repository for the current available version (e.g., by running apt-cache policy systemd-dev inside the base image) and update accordingly. Alternatively, if exact version pinning isn't strictly required for udev/systemd-dev, you could remove the version pin temporarily to unblock the build and then re-pin to the resolved version.

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 pinned udev package version is no longer available in the Ubuntu repositories:

E: Package 'udev' has no installation candidate
However the following packages replace it:
  systemd-dev

E: Version '255.4-1ubuntu8.12' for 'udev' was not found

The file apt-requirements-base.json is identical on both main and this PR branch, meaning this build would also fail on main.

What Needs to Be Fixed

The file .devcontainer/rust/apt-requirements-base.json needs to replace udev with its successor package systemd-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.

…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>
Copilot AI changed the title [WIP] Fix Docker build by replacing udev with systemd-dev Fix Docker build: replace deprecated udev with systemd-dev Mar 27, 2026
@github-actions

github-actions Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

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.

⚠️ Details

No release type found in pull request title "Fix Docker build: replace deprecated udev with systemd-dev". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit cc6c109.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

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
⚠️ MARKDOWN 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
⚠️ REPOSITORY 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

MegaLinter is graciously provided by OX Security

@github-actions

Copy link
Copy Markdown
Contributor

Pull Request Report (#37)

Static measures

Description Value
Number of added lines 2
Number of deleted lines 2
Number of changed files 2
Number of commits 2
Number of reviews 0
Number of comments (w/o review comments) 3
Number of reviews that contains a comment to resolve 0
Number of reviews that requested a change from the author 0
Number of reviews that approved the Pull Request 0
Get the total number of participants of a Pull Request 3

Time related measures

Description Value
PR lead time (from creation to close of PR) 1.9 Hours
Time that was spend on the branch before the PR was created 1 Sec
Time that was spend on the branch before the PR was merged 0 Sec
Time to merge after last review 0 Sec

Status check related measures

Description Value
Total runtime for last status check run (Workflow for PR) 8.9 Min
Total time spend in last status check run on PR 2.7 Min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants