Go to file
Richard Hughes 0bbef29d3e Always report the update-error correctly for multiple updates
The root of this problem is that we were trying to use pending.db as both a
pending report store and also a record of history, so you could see updates for
device foo 1.2.3->1.2.4 and then 1.2.4->1.2.5.
This sort-of half worked, but it meant in some cases we matched on the old
device version, sometimes on the new release version and sometimes matching on
either.

The problem was that in various places we were using the device ID as *the*
primary key, and so we had various functions like fu_history_get_device_by_id()
that expected to return just one device, not several.

The device ID also changes if the device is moved from USB plug to another, and
so it got even more complicated again trying to de-dupe the devices.

The sanest thing to do is to decide that pending.db only contains the latest
attempt to go from one version to another using device-id as the primary key.
This makes reporting work reliably now, although has the effect you can't
report a 1.2.3->1.2.4 and 1.2.4->1.2.5 at the same time. Note, if you tried to
do the latter before, the update-error (if set) would be wrong on the second
report...

For the 1.3.3 release make it all simpler and so the reporting works reliably.
Longer term we can design a better database schema that uses unique ID to
represent the *transaction* itself, that isn't tied to the device ID in any way.
This might mean extending the DBus API to cope with multiple devices being
returned with the same device-id set.
2019-11-01 08:16:18 -05:00
.circleci snap: switch to core18 2019-09-22 08:46:01 -05:00
.github trivial: add stalebot (Fixes: #1393) 2019-09-23 17:24:48 +01:00
.tx trivial: Add some files ready for a first release 2015-03-16 12:51:04 +00:00
contrib jabra: Move the Jabra-specific detach out into its own plugin 2019-10-30 15:09:49 +00:00
data Use device safety flags to show prompts before installing updates 2019-10-30 11:30:36 -05:00
docs dfu: Remove support for the Metadata Store Proposal 2019-10-09 20:56:38 +01:00
libfwupd Add new device flags indicating update resilience 2019-10-17 11:38:46 -05:00
plugins Move the file descriptor lifecycle into FuUdevDevice 2019-10-31 09:21:35 -05:00
po Release fwupd 1.3.2 2019-09-26 11:05:06 +01:00
policy trivial: update references of hughsie/fwupd to fwupd/fwupd 2019-08-22 09:47:52 -05:00
snap trivial: snap: correct install hook root directory 2019-09-26 13:34:26 -05:00
src Always report the update-error correctly for multiple updates 2019-11-01 08:16:18 -05:00
subprojects Use XMLb to query quirks 2019-10-30 08:29:58 -05:00
.gitignore Port from libappstream-glib to libxmlb 2018-10-17 14:41:13 +01:00
.gitmodules contrib: Adjust flatpak build for moving to flathub 2018-11-01 06:51:23 -05:00
.lgtm.yml Use XMLb to query quirks 2019-10-30 08:29:58 -05:00
.travis.yml Publish docs to fwupd.github.io using CircelCI 2019-08-22 09:15:29 -05:00
AUTHORS Add initial build files and enough code to launch a simple D-Bus daemon 2015-02-26 18:16:40 +00:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-09-12 15:26:14 +01:00
COMMITMENT Add COMMITMENT file as part of GPL Common Cure Rights Commitment 2018-06-18 16:09:54 +01:00
CONTRIBUTING.md Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
COPYING Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
MAINTAINERS Add initial build files and enough code to launch a simple D-Bus daemon 2015-02-26 18:16:40 +00:00
meson_options.txt Add a new plugin for working with eMMC devices (Fixes: #1455) 2019-10-18 14:18:09 -05:00
meson_post_install.sh Use more systemd directives for directories 2019-08-27 06:08:06 -05:00
meson.build Use XMLb to query quirks 2019-10-30 08:29:58 -05:00
README.md synaptics-rmi: Move the fuzzing instructions to the toplevel README 2019-10-02 16:28:28 +01:00
RELEASE trivial: post release version bump 2019-09-26 11:06:19 +01:00
SECURITY.md Create SECURITY.md 2019-05-28 06:24:41 -05:00

fwupd

Build Status Coverity Scan Build Status

Get it from the Snap Store

This project aims to make updating firmware on Linux automatic, safe and reliable.

Additional information is available at the website: https://fwupd.org

Compiling

The most up to date compilation instructions are available in the Wiki

LVFS

This project is configured by default to download firmware from the Linux Vendor Firmware Service (LVFS).

This service is available to all OEMs and firmware creators who would like to make their firmware available to Linux users.

You can find more information about the technical details of creating a firmware capsule in the hardware vendors section of the fwupd website.

Basic usage flow (command line)

If you have a device with firmware supported by fwupd, this is how you will check for updates and apply them using fwupd's command line tools.

# fwupdmgr get-devices

This will display all devices detected by fwupd.

# fwupdmgr refresh

This will download the latest metadata from LVFS.

# fwupdmgr get-updates

If updates are available for any devices on the system, they'll be displayed.

# fwupdmgr update

This will download and apply all updates for your system.

  • Updates that can be applied live will be done immediately.
  • Updates that run at bootup will be staged for the next reboot.

You can find more information about the update workflow in the end users section of the fwupd website.

Reporting status

fwupd will encourage users to report both successful and failed updates back to LVFS. This is an optional feature, but encouraged as it provides valuable feedback to LVFS administrators and OEM developers regarding firmware update process efficacy.

The privacy policy regarding this data can be viewed on the fwupd website.

To report the status of an update run:

# fwupdmgr report-history

To clear the local history of updates:

# fwupdmgr clear-history

Only updates that were distributed from the LVFS will be reported to the LVFS.

Enterprise Use

The flow of updates can be controlled in the enterprise using the "approved updates" feature. This allows the domain administrator to filter the possible updates from a central server (e.g. the LVFS, or a mirror) to only firmware that have been tested specifically in your organisation.

The list of approved updates can be enabled by adding ApprovalRequired=true to the remote configuration file, e.g. lvfs.conf. Once enabled, the list of approved updates can be set in daemon.conf using a comma delimited list.

For example:

ApprovedFirmware=foo,bar

Where foo,bar refers to the container checksums that would correspond to two updates in the metadata file.

Additionally, the list of approved firmware can be supplemented using fwupdmgr set-approved-firmware baz or using the D-Bus interface.

Other frontends

  1. GNOME Software is the graphical frontend available. When compiled with firmware support, it will check for updates periodically and automatically download firmware in the background. After the firmware has been downloaded a popup will be displayed in Gnome Software to perform the update.

  2. KDE Discover is the software centre, generally bundled with KDE Plasma. With the release of KDE Plasma 5.14, a new fwupd backend has been implemented in KDE Discover for firmware updates. These firmware updates are shown with other system updates.

  3. Wyse Management Suite A software suite available on Dell IoT gateways and Wyse thin clients with built-in fwupd support. The remote administration interface can be used to download and deploy firmware updates.

Fuzzing

There are several automated fuzzing tests in fwupd. These take some time to run:

CC=afl-gcc meson --default-library=static ../
AFL_HARDEN=1 ninja
ninja fuzz-synaptics-rmi
ninja fuzz-firmware
ninja fuzz-smbios