canonical / firmware-updater

An experimental firmware updater UI based on fwupd
GNU General Public License v3.0
107 stars 15 forks source link

fwupd fake test device doesn't work in `Firmware Updater` #264

Open superm1 opened 4 months ago

superm1 commented 4 months ago

In fwupd 1.9.14 in noble there is a new feature to very easily enable a test device for testing firmware upgrade flows without real hardware.

Install like this:

sudo apt install fwupd-tests
sudo fwupdtool enable-test-devices
sudo systemctl restart fwupd

After that a fake "Integrated Webcam" will show up that can be updated natively.

It works using fwupdmgr: Screenshot from 2024-02-29 14-06-06

It fails using firmware updater. Screenshot from 2024-02-29 12-21-52

Versions:

$ apt policy fwupd-tests
fwupd-tests:
  Installed: 1.9.14-1
  Candidate: 1.9.14-1
  Version table:
 *** 1.9.14-1 500
        500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status
$ apt policy fwupd
fwupd:
  Installed: 1.9.14-1
  Candidate: 1.9.14-1
  Version table:
 *** 1.9.14-1 500
        500 http://us.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status
$ snap info firmware-updater
name:      firmware-updater
summary:   Firmware Updater
publisher: Canonical✓
store-url: https://snapcraft.io/firmware-updater
contact:   https://github.com/canonical/firmware-updater/
license:   GPL-3.0+
description: |
  Update Firmware
commands:
  - firmware-updater
services:
  firmware-updater.firmware-notifier:    simple, enabled, inactive
  firmware-updater.firmware-updater-app: dbus, enabled, inactive
snap-id:      EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP
tracking:     latest/stable/ubuntu-24.04
refresh-date: 3 days ago, at 14:56 CST
channels:
  latest/stable:    0+git.90251bb 2024-02-20 (121) 11MB -
  latest/candidate: 0+git.90251bb 2024-02-02 (121) 11MB -
  latest/beta:      ↑
  latest/edge:      0+git.019bf66 2023-07-17 (105) 11MB -
installed:          0+git.90251bb            (121) 11MB -
superm1 commented 3 months ago

I guess this is is specifically because the firmware-updater snap is confined and can't access /usr.

I think a reasonable way to "solve" this issue is to not provide updates for "local" remotes for the system. In the case of the Integrated Webcam test device it would be able to be updated from LVFS as well and avoid this issue.