Skip to content

Bug: Mask fwupd timer on ubuntu images #12225

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
merged 3 commits into from
May 22, 2025
Merged

Bug: Mask fwupd timer on ubuntu images #12225

merged 3 commits into from
May 22, 2025

Conversation

lawrencegripper
Copy link
Contributor

@lawrencegripper lawrencegripper commented May 21, 2025

We're running on VMs in Azure and the fwupd package is not needed.

Leaving it enable means periodic refreshes show in network traffic and firewall logs.

The current check has a bug, meaning the timer isn't masked.

In the current fwupd version there isn't a daemon.conf file present so the if condition doesn't run and doesn't mask the systemd unit.

❯ cat /etc/fwupd/daemon.conf                                                                                                                                                             
[bat error]: '/etc/fwupd/daemon.conf': No such file or directory (os error 2)

Related issue:

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

We're running on VMs in Azure and the fwupd package is not needed.

Leaving it enable means periodic refreshes show in network traffic and firewall logs.
@Copilot Copilot AI review requested due to automatic review settings May 21, 2025 09:19
Copy link
Contributor

@Copilot Copilot AI left a 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 PR ensures the fwupd package is uninstalled from Ubuntu VM images and adds a test to verify its removal.

  • Added a Pester test to assert that fwupd is not present on the box.
  • Updated the environment setup script to purge fwupd if installed and disable any remaining timer/config.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
images/ubuntu/scripts/tests/System.Tests.ps1 Added a test block to verify fwupd is removed
images/ubuntu/scripts/build/configure-environment.sh Purges fwupd package and disables its timer/config

@lawrencegripper lawrencegripper changed the title Bug: Fully remove fwupd from ubuntu images Bug: Mask fwupd timer on ubuntu images May 21, 2025
@subir0071 subir0071 merged commit ff069dc into main May 22, 2025
6 checks passed
@subir0071 subir0071 deleted the lg/fwupd2 branch May 22, 2025 19:59
@lawrencegripper
Copy link
Contributor Author

@subir0071 I think this failed CI on Ubuntu 22.04

I see:

2025-05-23T05:53:19.0089996Z azure-arm.build_image: Describing fwupd removed
2025-05-23T05:53:19.0505072Z azure-arm.build_image: [-] Is not present on box 36ms (35ms|1ms)
2025-05-23T05:53:19.0638175Z azure-arm.build_image: Expected regular expression 'masked' to match $null, but it did not match.
2025-05-23T05:53:19.0648319Z azure-arm.build_image: at $systemctlOutput | Should -Match "masked", /imagegeneration/tests/System.Tests.ps1:13
2025-05-23T05:53:19.0652551Z azure-arm.build_image: at , /imagegeneration/tests/System.Tests.ps1:13

Build:

24.04 was fine 🟢

dwydler pushed a commit to dwydler/runner-images-hetzner-cloud that referenced this pull request May 24, 2025
* Bug: Fully remove `fwupd` from ubuntu images

We're running on VMs in Azure and the fwupd package is not needed.

Leaving it enable means periodic refreshes show in network traffic and firewall logs.

* Update check method

* Simplify test
dwydler added a commit to dwydler/runner-images-hetzner-cloud that referenced this pull request May 24, 2025
* Bug: Fully remove `fwupd` from ubuntu images

We're running on VMs in Azure and the fwupd package is not needed.

Leaving it enable means periodic refreshes show in network traffic and firewall logs.

* Update check method

* Simplify test

Co-authored-by: Lawrence Gripper <lawrencegripper@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants