Commit Graph

503 Commits

Author SHA1 Message Date
Richard Hughes
0393f6fa81 Be more explicit setting the update state
If the FuDevice is changed during a replug then the `UPDATE_STATE_SUCCESS` will
not be stored on the current FuDevice, which means we store an update-state of
`unknown` to the history database.

Which means we get no success or failure reports, which is bad.
2018-11-09 15:13:56 +00:00
Richard Hughes
3b743402f5 Include the os-release information in the release metadata
This means we are storing the distro that was used to perform the update,
rather than the distro that was used to do the upload.

Fixes https://github.com/hughsie/fwupd/issues/838
2018-11-09 15:13:56 +00:00
Richard Hughes
33171fd24d trivial: Store the AppStream component metadata correctly
We want the XML to look like:

  <custom>
    <value key="fwupd::RemoteId">lvfs</value>
  </custom>

not:

  <custom>
    <fwupd::RemoteId>lvfs</fwupd::RemoteId>
  </custom>

Also, fix the XPath query string to actually match the container checksum, and
actually save the custom node to the builder source.

This fixes a regression in 1.2.0 where no reports could be uploaded.
2018-11-09 15:13:56 +00:00
Richard Hughes
aaa60c60d9 trivial: Fix a typo in the verification store export 2018-11-07 11:05:50 +00:00
Richard Hughes
b095df6d4d trivial: Fix some NULL/FALSE confusion 2018-11-05 16:36:06 +00:00
Mario Limonciello
387f039bea trivial: fu-engine: Increase the priority on a device if it has children
This will cause devices with children to be displayed (and potentially
processed) before children devices.
2018-10-24 13:39:37 -05:00
Mario Limonciello
343095ddb5 trivial: fu-device-list: Return devices by priority 2018-10-24 13:39:37 -05:00
Richard Hughes
481aa2a923 Port from libappstream-glib to libxmlb
The libxmlb library is much faster to query, and does not require the daemon
to parse the XML metadata at startup. It's a zero-copy mmap design that is more
modern and less clunky.

RSS has reduced from 3Mb (peak 3.61Mb) to 1Mb (peak 1.07Mb) and the startup
time has gone from 280ms to 250ms.
2018-10-17 14:41:13 +01:00
Richard Hughes
416ade7f30 trivial: Hardcode the AppStream-glib version
This is the version we've imported from, which allows cabinet files requiring a
specific version of this library to continue working.
2018-10-11 07:54:01 +01:00
Richard Hughes
05cbb7245c Don't use AppStream-glib for version helpers
Refactor the imported version format code now we now longer need to stick to
the API mistakes of libappstream-glib.
2018-10-11 07:54:01 +01:00
Richard Hughes
d3d2c2c39f Don't use AppStream-glib for the GUID helpers
Long term we want to wean ourselves away from libappstream-glib.
2018-10-11 07:54:01 +01:00
Mario Limonciello
78599edcc9 trivial: correct a memory leak of the FuDevice when replugging 2018-10-10 11:24:27 -05:00
Richard Hughes
12c849966d Allow firmware files to depend on versions from other devices
At the moment firmware can declare that it has certain requirements, for
instance the existing firmware version, the bootloader version, or the
vendor ID of the device.

In some situations we actually want to check the firmware version of a
*different* device. Good examples here would be only allowing an EC upgrade if
a specific BIOS update has already been done, or only allowing a wireless
reciever to be updated if the attached wireless devices have been updated first.

To use this, you can do something like:

    <requires>
      <id compare="ge" version="1.1.3">org.freedesktop.fwupd</id>
      <firmware compare="ge" version="0.9.0">guid-of-other-device</firmware>
    </requires>
2018-10-02 06:53:52 -05:00
Mario Limonciello
769d768be9 trivial: fu-engine: downgrade couldn't find new device message to debug
I've found that this message comes up sometimes due to reprobing order
and it shouldn't be considered important enough to generate a warning.
2018-10-02 11:52:28 +01:00
Mario Limonciello
9cecbe1d1b fu-engine: Optionally wait for replug before updating a device
Plugins may have marked a device as needing to replug duing a
composite device preparation due to the order devices were plugged
in.
2018-09-27 09:18:31 -05:00
Richard Hughes
e671c05771 trivial: Do not use AsProfile
The profiling data is of limited use, and better data can be obtained using
kcachegrind and massif. Additionally, the profile samples were the cause of the
small RSS growth over time, when in reality the data would only be shown when
the verbose switch is used at daemon startup.
2018-09-18 06:23:25 -05:00
Mario Limonciello
fc139357e1 fu-engine: Don't show devices pending a reboot in GetUpgrades
Fixes part of http://gitlab.gnome.org/GNOME/gnome-software/issues/341
2018-09-13 10:37:29 -05:00
Richard Hughes
37d0943844 Add FuMutex helper to make various parts of the daemon thread-safe 2018-09-12 16:10:38 +01:00
Richard Hughes
5a9a6bd479 trivial: Return reference counted devices from FuDeviceList 2018-09-12 16:10:38 +01:00
Mario Limonciello
e6d2cf4dda trivial: Skip debugging messages for skipped releases
These are less interesting than which releases actually get added.
2018-09-11 18:59:05 +01:00
Richard Hughes
a1e82d3448 trivial: Add the components to the daemon store in one operation
This removes hundreds of lines of debugging spew.
2018-09-11 18:59:05 +01:00
Richard Hughes
17558acb35 trivial: Only show the number of loaded components at startup 2018-09-11 18:59:05 +01:00
Richard Hughes
b08e7bc7aa trivial: Set a log domain for each file
This allows us to do something like:

G_MESSAGES_DEBUG=FuEngine ./src/fwupd
2018-09-11 18:59:05 +01:00
Richard Hughes
7772dcfc91 trivial: Ensure the daemon sends IDLE when firmware is updated 2018-09-10 16:12:12 +01:00
Richard Hughes
ebae396d0a udev: Do not add devices after a small delay
Now devices can have multiple GUIDs and do not share platform IDs there is
really no point waiting to add the device.

This allows us to remove a whole lot of code for this now-unused functionality.
2018-09-09 16:24:30 +01:00
Mario Limonciello
b6fa47381e trivial: Refresh the list of devices sent to composite_cleanup()
If one of the devices went into replug during update the FuDevice instance will
have changed.
2018-09-07 15:16:14 +01:00
Richard Hughes
405baebbf2 trivial: Don't allow plugins to call fu_udev_device_emit_changed() 2018-09-06 16:22:46 +01:00
Richard Hughes
c125ec02ed Clarify what the platform ID actually is by renaming it
It wasn't hugely clear what the platform ID was actually meant to represent. In
some cases it was being used like a physical ID, in others it was a logical ID,
and in others it was both. In some cases it was even used as a sysfs path.

Clear up all the confusion by splitting the platform ID into two parts, an
optional *physical* ID to represent the electrical connection, and an optional
*logical* ID to disambiguate composite devices with the same physical ID.

Also create an explicit sysfs_path getter for FuUdevDevice to make this clear.

This allows WAIT_FOR_REPLUG to always work, rather than depending on the order
that the GUIDs were added, and that the kernel would always return the same
sysfs path (which it doesn't have to do, especially for hidraw devices).
2018-09-06 16:22:46 +01:00
Richard Hughes
037ce37fe6 trivial: Add some error prefixes to help debug a replug issue 2018-09-06 09:24:23 +01:00
Richard Hughes
828c039c00 trivial: Fix up some gtk-doc warnings 2018-09-04 08:22:39 -05:00
Richard Hughes
ff704414f6 Use superclassed versions of FuDevice when calling udev_added() and usb_added()
The daemon creates a baseclass of either FuUsbDevice or FuUdevDevice when the
devices are added or coldplugged to match the quirk database and to find out
what plugin to run.

This is proxied to plugins, but they are given the GUsbDevice or GUdevDevice and
the FuDevice is just thrown away. Most plugins either use a FuUsbDevice or
superclassed version like FuNvmeDevice and so we re-create the FuDevice, re-probe
the hardware, re-query the quirk database and then return this to the daemon.

In some cases, plugins actually probe the hardware three times (!) by creating
a FuUsbDevice to get the quirks, so that the plugin knows what kind of
superclass to create, which then itself probes the hardware again.

Passing the temporary FuDevice to the plugins means that the simplest ones can
just fu_plugin_device_add() the passed in object, or create a superclass and
incorporate the actual GUsbDevice and all the GUIDs.

This breaks internal plugin API but speeds up startup substantially and deletes
a lot of code.
2018-09-04 08:22:39 -05:00
Mario Limonciello
e260ead594 Notify all plugins of device removals through a new vfunc 2018-09-04 10:00:52 +01:00
Richard Hughes
3a8d532855 Allow the device list to take care of waiting for the device replug
This means that individual plugins do not have to manage thier own GUsbDevice
lifecycle and no longer have to call g_usb_context_wait_for_replug().
2018-08-31 16:41:40 +01:00
Richard Hughes
effcc7a7a7 trivial: Fix regression when enumerating udev subsystems 2018-08-31 14:34:01 +01:00
Richard Hughes
23170a8195 trivial: Set the plugin name when the GUID is added 2018-08-29 14:27:57 +01:00
Salud Lemus
980f2d9551 fu-engine: Don't fail get-details if compiled without GPG/PKCS7
Similar to commit 7d35278 regarding the install option with a daemon compiled without
GPG, but now, if you also have a daemon compiled without GPG, and if you have downloaded a
CAB file from LVFS and ran get-details, it would fail to display the contents
of the associated CAB file.

This allows it to still display the contents of the CAB file, and
a warning will be displayed in the logs.
2018-08-29 10:27:40 +01:00
Richard Hughes
6dec401a67 Store the DeviceInstanceId as a GUID in the quirk database
This allows us to match non-DeviceID GUIDs, and also GUIDs we don't know how to
generate.

To make this fully useful, search for device quirks when GUIDs are added.
2018-08-28 18:30:00 +01:00
Richard Hughes
73bf2337c1 trivial: Add fu_common_strtoull() as a shared function 2018-08-28 09:41:10 +01:00
Richard Hughes
9d6e0e743b Move the GUdevClient to the core daemon
Allowing plugins to 'register' for different udev subsystems in _init() allows
us to move the client to the engine, reducing the number of wakeups considerably
for each device event. It also will reduce the amount of boilerplate code in
each plugin that uses GUdev, much like we have done for GUsb.
2018-08-26 19:42:28 +01:00
Richard Hughes
bb764e99a0 trivial: Add fu_device_list_get_by_platform_id() 2018-08-26 19:38:58 +01:00
Mario Limonciello
e3b1a3f558 Plumb through support to set FwupdInstallFlags for update_prepare/update_cleanup
This will be used by other future commits.
2018-08-21 13:49:38 -05:00
Mario Limonciello
6463f311b8 fu-engine: emit signals when initializing
Some devices take a long time to initialize and tools like fu-tool
have no feedback during this time.

Show a status message to indicate what's going on.
2018-08-10 14:52:55 +01:00
Richard Hughes
ec85ebc760 trivial: Emit device-changed when the device status or percentage changes 2018-08-10 14:50:43 +01:00
Mario Limonciello
59cd4706f0 trivial: fu-engine: downgrade "Using Plugins %s" to debug
This isn't useful for most people and just takes up space in the logs.
When there is a problem it's typically specifically with a plugin
and at that time we ask them to run the daemon with verbose anyway.
2018-08-09 13:47:35 -05:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
81c427ca6d Allow different plugins to add the same device
In this instance, we define the 'same device' to be a FuDevice that has at
least one matching GUID. We allow the plugins to define which one is 'better'
than other plugins, and use this to only have one FuDevice for the physical
device.

Alternative to https://github.com/hughsie/fwupd/pull/604
2018-08-06 21:58:28 -05:00
Richard Hughes
881f624eba trivial: Fix getting details about firmware for unknown devices
Fix a logic error when testing requirements; what was supposed to happen was
that a the firmware requirements were only processed when we had a FuDevice set
in the FuInstallTask, but instead we were falling through to the handler for
'unknown requirement type'.
2018-08-06 11:03:08 +01:00
Richard Hughes
38c7c334f4 trivial: Remove duplicate requirement checks
The fu_engine_check_requirements() tests are already called from
fu_engine_get_result_from_app() using a NULL device.
2018-08-06 10:59:13 +01:00
Mario Limonciello
4afe7fb742 fu-engine: Add a timer for device update wrapping blob installation
This makes it a lot easier to benchmark performance relative to
other implementations, systems and buses.
2018-08-06 00:34:42 -05:00
Richard Hughes
2d37c3f64b trivial: Add a virtual provide of com.redhat.fwupdate
Some firmware depends on this component, which we absorbed in the last release.

See also: https://github.com/hughsie/fwupd/issues/614
2018-08-04 19:06:03 +01:00
Richard Hughes
f307775675 Add release information for locked devices 2018-06-28 15:51:11 +01:00
Richard Hughes
87fb9ff447 Change the quirk file structure to be more efficient
This pivots the data storage so that the group is used as the preconditon
and the key name is used as the parameter to change. This allows a more natural
data flow, where a new device needs one new group and a few few keys, rather
than multiple groups, each with one key.

This also allows us to remove the key globbing when matching the version format
which is often a source of confusion.

Whilst changing all the quirk files, change the key prefixes to be more familiar
to Windows users (e.g. Hwid -> Smbios, and FuUsbDevice -> DeviceInstanceId)
who have to use the same IDs in Windows Update.

This also allows us to pre-match the desired plugin, rather than calling the
probe() function on each plugin.
2018-06-28 13:32:30 +01:00
Richard Hughes
a39d6a52b5 trivial: Skip plugins that require the 'Plugin' quirk is set 2018-06-28 12:17:15 +01:00
Richard Hughes
6dbe8fef34 Allow devices to assign a plugin from the quirk subsystem
Not calling dozens of ->probe() functions is dramatically more efficient when
there are a large number of USB devices attached.

This requires plugins to 'opt-in' to the new behaviour, and also to supply
quirks that match all devices.
2018-06-28 12:16:31 +01:00
Richard Hughes
83cd57f095 Fix downgrading older releases to devices
The requirement filter needs to be relaxed when getting the available releases
for a device when not used to install the firmware.
2018-06-27 14:07:23 +01:00
Richard Hughes
e48351e260 Set the alternate device ID, not the object itself
If the daemon either de-duplicates or replaces the object passed emitted from
device-added then the object set as the alternate may not be the same instance
as the daemon version. This causes weird things to happen.

To make this less fragile, specify the *ID* of the object that should be the
alternate device, which allows the daemon to do clever things, and then assign
the object from the ID as the last step.

Although fixing no bug, this makes implementing future functionality easier.
2018-06-22 13:28:27 +01:00
Richard Hughes
dbd8c76eb8 Run a plugin vfunc before and after all the composite devices are updated
Now we can update multiple devices (in multiple plugins) using one firmware
archive we need a way to cleanup after all the plugins have been run.

Fixes https://github.com/hughsie/fwupd/issues/561
2018-06-18 16:06:15 +01:00
Richard Hughes
61ac08d6d5 trivial: Allow firmware files to select a quad version format
This can be used to select the AA.BB.CC.DD format rather than the default
AA.BB.CCDD format for firmware versions. This allows us to support new vendor
requirements without adding more complicated rules to the quirk file.
2018-06-14 14:56:47 +01:00
Mario Limonciello
cf63aecdaf fu-engine: Don't hardcode /etc/pki/fwupd-metadata 2018-06-11 14:22:08 -05:00
Mario Limonciello
3f9a1c182a Clean up plugins as the last step of engine cleanup (Closes: #550)
Fixes a segfault that occurs during cleanup of USB plugins.

When g_module_close was called memory allocated by the plugin would
get freed leading to the finalize method for object class pointing
to garbage.
2018-06-06 14:39:03 -05:00
Richard Hughes
4be17d1364 Add support for relocating various runtime paths
This allows a snap package to be easily built.

With much help from Mario Limonciello <mario.limonciello@dell.com>, many thanks.
2018-05-31 16:25:22 +01:00
Richard Hughes
fe221dc13d trivial: Fix up some NULL/FALSE confusion 2018-05-29 09:33:44 +01:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Richard Hughes
c02ee4da46 Allow whitelisting plugins in fwupdtool
When developing code it's really convenient to only run the new plugin. This
means you don't have to wait for the other hardware to initialize and there
are no side-effects from other plugins when installing firmware.

You can specify multiple plugins as globs, for instance:

    fwupdtool get-devices \
        --plugin-whitelist wacom \
        --plugin-whitelist "thunderbolt*"
2018-05-22 16:03:14 -05:00
Richard Hughes
8c71a3f2e9 Add a get-plugins command to fwupdtool
This returns the list of currently enabled plugins.
2018-05-22 16:03:14 -05:00
Richard Hughes
1d1f5cf098 trivial: Refactor the requirement tests to use a FuInstallTask 2018-05-21 21:23:45 +01:00
Richard Hughes
5b5f655e0b trivial: Allow the daemon to run without any idle sources
We need this if we want to run plugins without a daemon process.
2018-05-18 10:22:39 +01:00
Richard Hughes
c2de52a5b8 trivial: Only allow installing without history if the version is supplied 2018-05-18 10:14:36 +01:00
Richard Hughes
6e7419db0a trivial: Split up fu_engine_install()
This should allow the low-level tool to write unpackaged firmware.
2018-05-18 10:13:21 +01:00
Richard Hughes
76e0f94c86 Allow the client tools to avoid writing the history database 2018-05-14 18:54:15 +01:00
Richard Hughes
12040b51fe trivial: Fix fu_engine_get_device() to use the device list
This only worked when the device ID was already in the history database, and
was probably a copy-paste issue.
2018-05-14 13:38:58 +01:00
Richard Hughes
1e456bcd39 Do not call fu_plugin_init() on blacklisted plugins
Fixes https://github.com/hughsie/fwupd/issues/503
2018-05-11 07:26:17 -05:00
Richard Hughes
7e77bf3116 trivial: Be consistent with 'name [id]' in debug output
Based on a patch by Mario Limonciello <mario.limonciello@dell.com>, many thanks.
2018-05-10 09:26:07 +01:00
Richard Hughes
4ad41f027c Allow installing more than one firmware using 'fwupdmgr install'
When using failed to open firmware.cab we pass in a device ID of '*' which
tells the daemon to update anything that matches. The current implementation
will fail in two ways:

* If duplicate hardware is installed (for instance two Unifying receivers) then
  only the first matching device will be updated.

* If the firmware archive contains two different images then we only try and
  upgrade the first device that matches. This means we're unable to update
  composite devices using one firmware file.

To fix both issues, carefully build a list of tasks that can be processed using
the given firmware and installed devices, request authentication using all the
different action IDs, then upgrade all the devices one-at-a-time.

Based on a patch by Mario Limonciello <mario.limonciello@dell.com>, many thanks.
2018-05-10 09:26:07 +01:00
Richard Hughes
27bf9ecfbb trivial: Fix up all apps when building the store 2018-05-10 09:26:07 +01:00
Richard Hughes
7383ce263b trivial: Split out some common keyring functionality 2018-05-10 09:26:07 +01:00
Richard Hughes
5e447293fa Add the concept of logical mappings between different devices
This allows us to find out the logical parent device, for instance in composite
devices with more than one firmware image for a single device.

We also allow lazily specifying the device parent using a GUID and the engine
then automatically sets the parent object when the GUIDs match, which allows
children and parents to exist in different plugins.
2018-05-03 08:07:04 +01:00
Richard Hughes
3d71c16ed3 Allow specifying hwids with OR relationships
We don't want to use the version= attribute as the HWIDs are not versions, and
thinkgs like globbing just doesn't make sense given they are from hashes.

Fixes the client side part of https://github.com/hughsie/lvfs-website/issues/110
2018-05-01 14:33:23 +01:00
Richard Hughes
34e0dab1f1 Add fu_plugin_add_compile_version()
This allows plugins to set and explicit build-time version. It also uses the
same AppStream component-ID scheme rather than the home-grown 'FooVersion' key.

Also, use the new runtime and compile-time versions in the report metadata.
Due to the key change we'll also need to update some LVFS rules.
2018-04-20 20:45:08 +01:00
Richard Hughes
0eb123b986 Allow requiring specific versions of libraries for firmware updates
In some cases firmware can only be installed with an up to date GUsb (e.g. with
some STM-DFU hardware) or with a new version of fwupdate (e.g. any UEFI
UpdateCapsule without a capsule header).

We should be able to match against other software versions like we can the
fwupd version, e.g.

    <requires>
      <id compare="ge" version="0.9.2">org.freedesktop.fwupd</id>
      <id compare="ge" version="11">com.redhat.fwupdate</id>
    </requires>

Also, rather than checking each requirement we know about on the component,
check each requirement on the component about things we know. This ensures we
don't allow firmware to be installs that requires for instance fwupdate 22 when
the runtime version is only being added in fwupdate 12 and up.

This means the following is now an error that will fail to allow the firmware
to be installed:

    <requires>
      <firmware>doesnotexist</firmware>
      <some_future_tag>also_unknown</some_future_tag>
    </requires>

Also add a lot of self tests to test the various new failure modes.

Fixes https://github.com/hughsie/fwupd/issues/463
2018-04-20 16:19:05 +01:00
Mario Limonciello
ce2a8231ea Bump appstream-glib minimum version to 0.7.4
Ubuntu's LTS and Fedora's newest releases have it.  All CI targets
have it.
2018-04-20 09:05:17 -05:00
Richard Hughes
e598fc3447 trivial: Show the VID and PID when failing to add a USB device
Fixes https://github.com/hughsie/fwupd/issues/476
2018-04-19 20:15:09 +01:00
Mario Limonciello
ed1ac2a74b Enable CentOS 7 for CI
There are a lot of hacks here;
 * Pulling newer libappstream-glib from Fedora
 * Pulling a systemd backport
 * Manually installing pillow and pygobject
 * PKCS7 is turned off (gnutls is too old)
2018-04-18 10:25:22 -05:00
Richard Hughes
34e48634af trivial: Fix a critical warning when checking component requirements 2018-02-23 15:26:15 +00:00
Richard Hughes
849914e642 trivial: Don't keep asking the user if they want to report firmware
Don't optimize the device flag away. We need to be able to set the flag on all
devices that match the device ID, not just the one that happens to match now.
2018-02-14 19:57:27 +00:00
Mario Limonciello
44ebdb82d4 fu-engine: Clarify which devices don't have upgrades (Fixes #397) 2018-02-12 16:26:01 -06:00
Richard Hughes
4082d3367b Correctly mark updates as successful even if the device version number is wrong
If the device firmware was set incorrectly make then set it to the release
version so the database update works correctly. We can't do any kind of vercmp
in the database, so use a daemon warning so we can either fix the plugin or
the XML.

This fixes up the issue that the hardware reports '28.00' and the AppStream
release specifies '28.0'.

Fixes: https://github.com/hughsie/fwupd/issues/387
2018-02-09 16:55:09 +00:00
Richard Hughes
c0cd023d31 Be more careful deleting and modifying device history
If this happens:

1.2.3 -> 1.2.4 = failure
1.2.3 -> 1.2.5 = success

...we want to preserve both in the history database so they can both be shared
with the LVFS. Use the device ID and the new and old firmware versions when
modifying and deleting entries.

This fix is made slightly more tricky as we have to drop the PRIMARY KEY
attribute on the device_id, and due to a limitation in SQLite, it means copying
the old history into a new table.
2018-02-07 10:20:19 +00:00
Richard Hughes
65e44cac96 Always return useful information when calling GetResults()
Previous to having the history database we could only notify about firmware that
as installed using the uefi plugin, as that had a few system-wide API calls to
say 'this update failed' or 'this was the error'.

Now we have the local history database not only can we report more details about
the UEFI update (e.g. the old version number) but we can also offer the same
functionality for all other plugins.

Although this does rework how the data for GetResults() is populated, it does
make the FuEngine object quite a lot less confused.

It also fixes a warning in the fwupd plugin for gnome-software, which was
expecting the FwupdRelease to be populated for the FwupdDevice.
2018-02-07 10:20:19 +00:00
Richard Hughes
ee7e764603 trivial: Do not return failure if a device flag is already set
If we have multiple versions of upgrades/downgrades we'll be setting the
REPORTED flags for multiple history entries at once.
2018-02-01 14:01:58 +00:00
Richard Hughes
ad54f65f05 Add FWUPD_DEVICE_FLAG_NOTIFIED
This allows us to record whether we've shown the user a notification (either in
the terminal or in a GUI) that an update failed or was successful.

This can't be done in the session otherwise we'd get a notification for every
different user on the system. Notifying also isn't the same as reporting,
although one can certainly follow on from the latter.
2018-02-01 14:01:18 +00:00
Richard Hughes
534255cff3 Set the RemoteId when using GetDetails
This searches for the release container checksum in any enabled remote and
also sets the SUPPORTED flag if the local file matches.
2018-01-28 20:24:21 +00:00
Richard Hughes
2de8f13b2c Allow each plugin to opt-in to the recoldplug action
Recoldplug is really not required for the USB based plugins, and we should
restrict this action to plugins that have inter-dependencies on each other.
2018-01-17 20:19:58 +00:00
Richard Hughes
4012754569 trivial: Rename some FuDeviceList methods
The convention we're using is that find() returns the FuDeviceItem and get()
returns the FuDevice, so be consistent.

No code flow changes.
2018-01-16 13:48:51 +00:00
Richard Hughes
7e070c9bd7 Record an error if any NEEDS_REBOOT transaction fails to be applied
In the case of failing to even set up UpdateCapsule, the uefi plugin would
dutifully return SUCCESS as it was referring to the 2nd-to-last update that
actually worked.
2018-01-12 16:50:24 +00:00
Richard Hughes
7984310a65 trivial: Ensure a historical error message is cleared on success 2018-01-12 16:50:24 +00:00
Richard Hughes
d949d961e8 trivial: Pass the device-id to the fu_history_set_X() methods
This allows us to use a FwupdDevice or just use a string for testing.
2018-01-12 16:50:24 +00:00
Richard Hughes
0b9d996d4d trivial: Rename some methods in FuHistory to reflect the device-centric nature 2018-01-12 16:50:24 +00:00
Richard Hughes
f271142c47 trivial: Do not recover the pending update if the boot time is unchanged
This ensures we can restart the fwupd service without marking updates that need
a reboot as failed.
2018-01-12 16:17:27 +00:00
Richard Hughes
59c2ebe5cd Add in the kernel boot time to the uploaded report 2018-01-12 16:17:22 +00:00
Richard Hughes
a899713863 Rescan supported flags when refreshing metadata
The SUPPORTED flag is used when a device appears in the AppStream metadata of
any enabled remote, so when we rescan the modified store also ensure the flag
state is still correct.

Fixes https://github.com/hughsie/fwupd/issues/363
2018-01-12 15:04:21 +00:00
Richard Hughes
80b79bb9aa trivial: Allow plugins to add metadata to the uploaded reports 2018-01-11 21:28:22 +00:00
Richard Hughes
473c520e38 Add in extra metadata to the uploaded reports
Save the dependency versions, architecture and the kernel versions in the
history database as metadata as it may be different to the time of upload.
2018-01-11 21:28:22 +00:00
Richard Hughes
611f1a9cbf Set the remote-id on devices returned by GetHistory 2018-01-11 20:19:41 +00:00
Richard Hughes
3eb2a00d10 trivial: Fix up the version check for offline firmware reporting 2018-01-11 20:19:16 +00:00
Richard Hughes
6b22295cf0 Add a D-Bus method to modify a historical device
This allows us to set specific flags on the device stored in the database.
2018-01-11 10:20:48 +00:00
Richard Hughes
a2f8e45c0f trivial: Set the update state for any updates that need a reboot
This has to be done at each engine startup, as this will happen on the *next*
OS boot.
2018-01-11 10:11:17 +00:00
Richard Hughes
476363ac19 Add a D-Bus method to get the history information 2018-01-11 10:08:58 +00:00
Richard Hughes
bc3a4e1f57 Store firmware update success and failure to a local database
Rename FuPending to FuHistory to better represent what the object is now doing.
Also, while we're here, switch to using SQLite prepared statements to avoid a
possible invalid read on i386 hardware.
2018-01-11 09:59:34 +00:00
Richard Hughes
74fa2ca635 Fix firmware downloading using gnome-software compiled against fwupd 1.0.x
Always set the AppStream app properties on the FwupdRelease. In some cases we
were returning FwupdRelease objects with no name or summary which gnome-software
was ignoring.
2018-01-10 21:37:43 +00:00
Richard Hughes
eafba48905 trivial: Namespace the ignored cleanup error better 2018-01-08 21:59:08 +00:00
Richard Hughes
9939f1c85c trivial: Fix tiny memory leak when getting GUIDs from an invalid archive 2018-01-08 16:56:19 +00:00
Richard Hughes
c7bbbc246b Allow specifying the maximum archive size in the daemon config 2018-01-03 07:38:27 +00:00
Richard Hughes
4f50e6268a Do not try to parse huge compressed archive files
We don't want to allow DoS-ing the daemon by trying to decompress a huge sparse
cabinet archive.
2018-01-03 07:38:27 +00:00
Richard Hughes
eec8a3c068 trivial: Fix a compile warning with the latest GLib 2018-01-02 20:37:31 +00:00
Richard Hughes
deea2da041 Use the new functionality in libgcab >= 1.0 to avoid writing temp files
Using old versions of gcab we could only do one thing: extract the files in the
cabinet archive to a new directory in /tmp, and then fwupd would have to read
them back in to memory to parse them. This was both inelegant and wasteful, and
probably not an awesome idea from a security or privacy point of view.

Using libgcab >= 1.0 we can decompress to a GBytes blob, and then verify the
firmware and metainfo file without anything being written to disk.

As this is a security sensitive operation, move the fwupd-specific helper code
out of libappstream-glib and also add a lot of internal self tests.

The gcab code will have to remain in libappstream-glib for a long time, but we
don't have to use it. Handling the cab file here also allows us to fix two
long-standing bugs:

 * MetaInfo or firmware files in a subdirectory are handled correctly

 * The archive can also be self-signed using PKCS7 instead of using GPG
2017-12-21 08:54:00 +00:00
Richard Hughes
650dadebe6 Choose the correct component from provides matches using requirements
In the case of multiple <component> sections with different AppStream IDs, but
with the same GUID <provides>, filter using the requirements rather than just
choosing the first one.

This allows the update of Logitech devices with secure bootloaders. Many thanks
to Ogier Bouvier for identifying the problem.
2017-12-14 15:50:19 +00:00
Richard Hughes
fbcebe096b Connect the progress and status callbacks on the new FuDevice on replug
This ensures we get progress events when replugging a device. Also, remove the
callbacks on the 'old' device to avoid causing multiple events on a 2nd-replug.
2017-12-11 16:48:56 +00:00
Richard Hughes
23135eb1c9 trivial: Remove the now-unused fu_plugin_set_status() 2017-12-04 17:00:22 +00:00
Richard Hughes
4a036018f7 Set the progress and state on the FuDevice, not the FuPlugin
This makes more sense; we're updating the device, not the plugin itself.

This also means we don't need to funnel everything through callbacks like
GFileProgressCallback and we can also update the state without adding an
explicit callback to each derived device type.
2017-11-30 20:51:52 +00:00
Richard Hughes
c3476d56de Add a method to probe a FuUsbDevice before it is opened
This allows us to further clean up device creation.
2017-11-30 14:16:34 +00:00
Richard Hughes
df149ac006 Remove the superfluous check for a duplicate FuDevice addition 2017-11-29 15:56:29 +00:00
Richard Hughes
634e9228f8 Always show coldplugged USB devices
When adding GUsbDevice we didn't account for coldplugging devices using the
GUsbContext enumeration.
2017-11-29 15:50:08 +00:00
Richard Hughes
f77d706fff trivial: Add some more profiling to narrow down a slow boot issue 2017-11-27 18:07:53 +00:00
Richard Hughes
5b5e945b18 trivial: Fix the prefix of profiling statements 2017-11-27 18:07:53 +00:00
Richard Hughes
5f733f2581 Fix critical warning when more than one remote fails to load
See https://github.com/hughsie/fwupd/issues/318
2017-11-26 16:14:20 +00:00
Richard Hughes
88adcbe601 Show a nicer error message if the requirement fails
`Not compatible with fwupd version 1.0.2, requires >= 1.0.3`

...is easier to understand than...

`Value of org.freedesktop.fwupd incorrect: failed predicate [1.0.3 ge 1.0.2]`
2017-11-24 16:37:15 +00:00
Richard Hughes
104f651132 Add a fu_plugin_usb_device_added() dedicated vfunc
This saves all the USB plugins from connecting to the context and managing the
device lifecycle and allows devices that uses FuUsbDevice to be removed
automatically.

This makes supported plugins *much* smaller indeed.
2017-11-24 16:13:44 +00:00
Richard Hughes
70425fe923 Allow different plugins to claim the same device
When changing from runtime->bootloader->runtime the usual way of handling this
in a fwupd plugin is to:

* reset the device and wait for a replug
* flash the hardware
* reset the device and wait for a replug

This works well when the runtime and bootloader modes are handled by the same
plugin. For situations like the Nitrokey device, where one plugin handles the
runtime (nitrokey), and another handles the bootloader (dfu) we have to have
the ability to 'ignore' the device removal and just issue a 'changed' signal
so the client refreshes the properties.
2017-11-24 14:42:27 +00:00
Richard Hughes
170c0c13c3 trivial: Route the ::added and ::removed through the FuDeviceList
This will allow the list to withhold events in the future, no functional changes now.
2017-11-24 14:42:27 +00:00
Richard Hughes
0a7e783cdd trivial: Move the device list to a new object
This moves more functionality out of the engine, and will allow us to add some
cleverness to the device list to allow the FuDevice to be shared between
different plugins.
2017-11-24 14:42:27 +00:00
Richard Hughes
e7e95452fd trivial: Move the plugin list to a new object
FuEngine is getting somewhat large and complicated, so split out as much plugin
list-specific functionality as possible
2017-11-24 14:42:27 +00:00
Richard Hughes
3483410076 Look up the FuPlugin from the FuDevice each time it is used 2017-11-24 14:42:27 +00:00
Richard Hughes
175635b916 trivial: Move assigning a GError for future code 2017-11-22 14:26:49 +00:00
Richard Hughes
e89ab5976f Partially revert the FuDevice weak reference detection
This causes problems for future patchsets that re-populate the FuDeviceItem.
2017-11-22 14:26:49 +00:00
Richard Hughes
43f9dd8c40 Sort the output of GetUpgrades correctly
This allows clients to just select the 'first' FwupdRelease for the newest if
there are multiple installable releases.

Fixes https://github.com/hughsie/fwupd/issues/319
2017-11-16 15:24:47 +00:00
Richard Hughes
b6f79556f1 Use a SHA1 hash for the internal DeviceID
It's actually less scary to see a SHA1 hash than it is to see a path like
/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2. It's also way easier to
copy and paste into the various fwupdmgr command that require a device ID and
also means we can match a partial prefix much like git allows.

If we also move to a model where plugins can be changed during different stages
of the update (e.g. during detach) then the device might change connection type
and then the sysfs path not only becomes difficult to paste, but incorrect.

Session software doesn't care about the format of the device ID (it is supposed
to be an implementation detail) and so there's no API or ABI break here. A few
plugins also needed to be ported, but nothing too worrying.
2017-11-16 07:18:36 +00:00
Richard Hughes
0d7fdb3110 Split out the update detach and attach phases as explicit optional vfuncs
This allows us to do two things:

* Attach after a failed update, so the user isn't left with 'dead' hardware
* Split the detach and attach actions into different plugins in the future

This also allows us to have a separate vfunc to get the new version number
after flashing the firmware, as this may be handled in a different plugin to
the detach phase.
2017-11-14 10:49:43 +00:00
Richard Hughes
1cf88d6775 Detect if a plugin incorrectly unrefs the FuDevice
Watch the FuDevice in the FuDeviceItem with a weak reference and try to recover
without crashing the daemon if the plugin does the wrong thing.
2017-11-08 11:02:38 +00:00
Richard Hughes
2ec78d68db Add support for HWID requirements
In the latest version of the LVFS you can restrict the firmware to a specific
machine type, for instance a specific baseboard vendor. This is the same as
done in Microsoft Update using the CHID mechanism.

This commit adds support for the <hardware> requires type, although it needs to
be built against appstream-glib 0.7.4 to be supported and/or tested.
2017-11-03 23:42:57 +00:00
Richard Hughes
74a80ccc50 dell: Use the new quirk infrastructure for version numbers 2017-11-02 19:08:51 +00:00
Richard Hughes
9c028f06b5 Move the database of supported devices out into runtime loaded files
When fwupd is installed in long-term support distros it's very hard to backport
new versions as new hardware is released.

There are several reasons why we can't just include the mapping and quirk
information in the AppStream metadata:

 * The extra data is hugely specific to the installed fwupd plugin versions
 * The device-id is per-device, and the mapping is usually per-plugin
 * Often the information is needed before the FuDevice is created
 * There are security implications in allowing plugins to handle new devices

The idea with quirks is that the end user can drop an additional (or replace
an existing) file in a .d director with a simple format and the hardware will
magically start working. This assumes no new quirks are required, as this would
obviously need code changes, but allows us to get most existing devices working
in an easy way without the user compiling anything.

This allows us to fix issues like https://github.com/hughsie/fwupd/issues/265
2017-11-02 19:08:51 +00:00
Richard Hughes
cc70f193e9 trivial: Use the new API in libappstream-glib directly 2017-10-09 21:00:26 +01:00
Richard Hughes
4eada34d4c trivial: Fix up introspection issues in the daemon code 2017-10-05 10:32:05 +01:00
Richard Hughes
642ec13754 trivial: Remove GetUpdates as it is no longer used 2017-09-28 09:23:52 +01:00
Richard Hughes
603e42d527 trivial: Include the releases as part of the device a{sv} array 2017-09-28 09:23:52 +01:00
Richard Hughes
80893e29fe trivial: Remove FwupdResult from libfwupd 2017-09-28 09:23:52 +01:00
Richard Hughes
07f963a52d trivial: Remove the deprecated fwupd_client_get_details()
Also, rename fwupd_client_get_details_local() to it's now-removed counterpart.
2017-09-28 09:23:52 +01:00
Richard Hughes
08a37992f9 Allow plugins to depend on each other
The only things that plugins can declare is that they should be run before,
after or never with regard to another plugin.
2017-09-21 17:09:06 +01:00
Richard Hughes
f2eccdee5c trivial: Fix a tiny memory leak when getting the upgrades list 2017-09-20 11:18:03 +01:00
Richard Hughes
10bd8ecfb8 trivial: Remove EnableOptionROM from daemon.conf
The exact same thing can be done using BlacklistPlugins=udev
2017-09-19 20:06:44 +01:00
Richard Hughes
b0aa379300 Use a fallback SYSCONFDIR if the default is not set 2017-09-19 20:06:44 +01:00
Richard Hughes
1354ea9cd8 Add fu_plugin_check_supported()
This allows a plugin to see if a GUID is supported in the AppStream metadata of
configured remotes. It allows plugins to skip devices that are not supported
and that do bad things when probed.
2017-09-19 16:00:45 +01:00
Richard Hughes
7769fb8da7 trivial: Add some more FuEngine self tests 2017-09-18 11:12:52 +01:00
Richard Hughes
c07ac39ad1 trivial: Return a better error for keyring set up failure 2017-09-17 09:33:53 +01:00
Richard Hughes
84bf038a52 trivial: Do not log to the journal when calling GetDetails 2017-09-16 18:52:51 +01:00
Richard Hughes
820dac7fde trivial: Use a different SYSFSFIRMWAREDIR for self tests
This means we can drop some self-test specific code in fu_smbios_setup().
2017-09-16 17:46:41 +01:00
Richard Hughes
068d34307a Do not fail to load the daemon if cached metadata is invalid
Fixes: https://github.com/hughsie/fwupd/issues/257
2017-09-16 08:26:46 +01:00
Richard Hughes
93b1576bef trivial: Add helpers that can be used for returning local files
This also allows us to drop the use of FwupdResult in the daemon.
2017-09-15 14:12:18 +01:00
Richard Hughes
cc3de2efa4 Do not store the newest release as part of the FuDevice object 2017-09-15 14:12:18 +01:00
Richard Hughes
e7fd8eb81f trivial: Simplify the check for supported devices 2017-09-15 14:12:18 +01:00
Richard Hughes
a96413a368 Add a method to return a list of upgrades for a specific device 2017-09-15 14:12:18 +01:00
Richard Hughes
97284b1ad8 Move the downgrade calculation to the daemon 2017-09-15 14:12:18 +01:00
Richard Hughes
68982c6624 Make FuDevice derive from FwupdDevice rather than FwupdResult
We're aiming for a model where devices can have multiple releases and we can
nuke FwupdResult completely.
2017-09-15 14:12:18 +01:00
Richard Hughes
b3ca245b74 Move the release trust information to FwupdRelease
It only remained on FwupdResult because I couldn't make up my mind about whether
it was a property of the device, or the firmware release. It's more logically
the latter, as you could have a .cab file with multiple versions of the
firmware and only the first being signed.
2017-09-15 11:31:01 +01:00
Richard Hughes
d140210b4f trivial: Fix up the hex version numbers when adding to the store
This means we show the 'human readable' version numbers in the debug UI.
2017-09-14 10:26:15 +01:00
Richard Hughes
bd4d2856dd Merge releases where multiple remotes provide the same firmware
For a few months the lvfs-testing remote has not included firmware already
present in the stable lvfs remote. This means if you enable the testing remote
then components in the stable remote are not available to fwupd.

Instead of a simplistic check on the component ID, add the missing releases
no matter the ordering of the remotes.
2017-09-14 10:26:15 +01:00
Richard Hughes
fc0d170334 trivial: Show the available release versions in the daemon debug output
Also, truncate the output when there are lots of versions available.
2017-09-14 10:26:15 +01:00
Richard Hughes
225f3a98fe trivial: Sort the releases returned by GetReleases() 2017-09-13 19:38:51 +01:00
Richard Hughes
30dbf0d7d0 Remove the UniqueID property
This was only ever added for gnome-software, and is too inflexible for anything
else. It turns out we don't even need it in GNOME, as we can construct a
suitable ID ourselves using the existing values.

It was also ambiguous whether the unique ID was in reference to the device
or release -- and for gnome-software we need both.
2017-09-13 15:28:33 +01:00
Richard Hughes
9dde04fbda trivial: Split out some functionality not to be used by plugins 2017-09-13 14:59:32 +01:00
Richard Hughes
d2b4fc5e00 trivial: Set the AppStream ID when returning results from GetReleases
We need this for GUI software.
2017-09-12 16:42:46 +01:00
Richard Hughes
a6bd5580d3 Add ModifyRemote as an easy way to enable and disable remotes like the LVFS
For example:

    $ fwupdmgr modify-remote lvfs-testing Enabled true
2017-09-07 23:02:58 +01:00
Richard Hughes
1941c44559 Do not auto-open all USB devices at startup
Fixes: https://github.com/hughsie/fwupd/issues/220
2017-09-07 19:00:51 +01:00
Richard Hughes
49e5e05aa8 Parse the SMBIOS DMI table directly
The Linux DMI class still does not provide the information we need, and parsing
the blob directly also allows the Dell and Redfish plugins to get the raw data.
2017-09-05 18:10:36 +01:00
Yehezkel Bernat
e43f7fb655 trivial: cleanup for many compilation warnings from clang
Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 10:43:15 +01:00
Richard Hughes
a785a1c2f6 Remove the confusing ALLOW_OFFLINE and ALLOW_ONLINE flags
Over the months the original meaning of ALLOW_OFFLINE and ALLOW_ONLINE have be
lost, and there is now a confusing mixture of uses in the source tree. With this
commit we make it clear the UPDATABLE flag is used to specify when the device is
updatable (e.g. from the desktop live session, or from the systemd offline
updates mode, or both) and the NEEDS_REBOOT flag lets us know when the update
is actually going to be done.

For instance, a UEFI UpdateCapsule can be *scheduled* from either the desktop
or from the update mode (but the latter would be a bit weird), but does require
a reboot. Some devices might only be updatable outside the live session, for
instance a hard drive update or a GPU update -- there's just too much going on
with a live session and we want to tightly control what's running during the
firmware flash.

This also means we don't have to "retry" the update when scheduling an update
that really can be scheduled whenever, but just requires a reboot to apply.
2017-08-26 18:09:21 +01:00
Richard Hughes
e1fd34d5f1 Allow plugins to set metadata on devices created by other plugins
This could be used, for instance, to set a property on ThunderBolt controllers
inside Dell computers saying that they support forcing the power level during
coldplug. It could also be used to set the dock type for the synapticsmst hub.

Adding this level of complexity allows us to avoid the creep of HAVE_DELL and
HAVE_LENOVO into seemingly unrelated plugins, and also allows us to have
multiple vendor plugins providing the same end result with two different
vendor-specific mechanisms.
2017-08-24 16:15:11 +01:00
Richard Hughes
c6afb51e32 Add a FirmwareBaseURI parameter to the remote configs
This allows somebody to mirror the CDN without resigning the metadata files.

Fixes: https://github.com/hughsie/fwupd/issues/186
2017-08-23 14:22:12 +01:00
Richard Hughes
adcc16a53c trivial: Check for zero size firmware image 2017-08-21 12:26:46 +01:00
Richard Hughes
14047d7d24 trivial: Split up the keyring setup and public key adding 2017-08-18 11:10:03 +01:00
Richard Hughes
f69a4810fa Return the authority and timestamp as part of the signing validation
This means we return an error when encountering a rollback attack. This can
currently be performed by providing the old metadata and old signature when
calling into UpdateMetadata.
2017-08-17 16:15:47 +01:00
Richard Hughes
556ec355db trivial: Fix getting the keyring for PKCS7-enabled remotes
Found using Coverity, thanks.
2017-08-16 13:42:10 +01:00
Richard Hughes
99e621d388 Save the metadata signature in the local cache
This is useful if the admin wants to re-verify the metadata, or if a public
key is removed or expires.
2017-08-16 13:42:10 +01:00
Richard Hughes
b9ad09ca93 trivial: Correctly search for the .cab detached signature 2017-08-15 15:35:47 +01:00
Richard Hughes
7403dc505f Optionally use GnuTLS to verify PKCS7 certificates
We can use this as an alternative for GPG. No PKCS7 certificates are currently
installed by fwupd and it's expected that the LVFS will still only provide GPG
detached signatures.

If an OEM distributor wants to sign firmware with a PKCS7 and the corresponding
certificate is provided then the firmware will be marked as valid.

Only firmware shipping with a .p7b file will use the PKCS7 functionality,
similarly remote metadata validation will default to GPG unless Keyring=pkcs7
is specified in the config file.
2017-08-14 09:42:48 +01:00
Richard Hughes
0724d8bde0 trivial: Bump the appstream-glib requirement to 0.6.13 2017-08-09 17:21:48 +01:00
Richard Hughes
41cbe2aab3 Add a firmware builder
This runs a script inside the firmware archive to generate firmware specific to
the machine. This uses bubblewrap to protect the local machine.
2017-08-09 10:33:39 +01:00
Richard Hughes
d7704d4cc2 Allow plugins to get DMI data from the hardware in a safe way
The returned strings are converted to ASCII and have leading and trailing
spaces removed.
2017-08-09 10:19:13 +01:00
Richard Hughes
1ad45caeec Use new GUsb functionality to fix flashing Unifying devices
This avoids open()ing and close()ing multiple times on hotplug -- which in
itself isn't a huge problem as the requests are refcounted in libusb, but it
matters hugely when a plugin accidentally closes a device that was not opened.

As all the devices are going to be opened anyway (to read the vendor strings)
and the cost of keeping the device is open is tiny, just get libgusb to
auto-open *all* devices and keep them open for the duration.

Fixes: https://github.com/hughsie/fwupd/issues/155
2017-07-24 11:08:25 +01:00
Richard Hughes
535664cd1e Run the plugin coldplug methods in a predictable order
When reading with g_dir_read_name() the returned files do not have to be sorted
in any particular order and could even change between invokation. This patch
makes debugging the interactions between plugins much easier.
2017-07-24 10:32:06 +01:00
Mario Limonciello
c29b398ad0 trivial: fix various spelling errors 2017-07-17 13:07:05 -05:00
Mario Limonciello
5735fd67c1 trivial: set engine back to idle
A regression from 9945edbe74 causes
a missing newline for many actions because it doesn't go back to idle
2017-07-13 16:22:19 -05:00
Mario Limonciello
790701f32b trivial: adjust get-details and get-devices output Display Name output
This returns them back to the more readable 0.8.x behavior where
devices have the name first and then all the details indented.
2017-07-13 16:22:19 -05:00
Richard Hughes
32684f2344 Check all the device GUIDs against the blacklist when added
To the user it's not obvious which is the default GUID.

See https://github.com/hughsie/fwupd/issues/127
2017-07-13 09:32:26 +01:00
Mario Limonciello
dc8c985159 trivial: back the requirement on appstream-glib to 0.6.9
The items that 0.6.13 requires are now guarded by a version test.
This should allow running fwupd master on more distros that haven't
yet picked up appstream-glib 0.6.13.
2017-07-10 14:32:42 -05:00
Richard Hughes
ed34991bd8 Do not unlock devices when doing VerifyUpdate
We used to do this dance to avoid reading the Option ROM on hardware by default
(some faulty hardware would crash...) but now we're doing the verify update in
the daemon there's no need to split this into two steps.

Fixes: https://github.com/hughsie/fwupd/issues/149
2017-06-22 10:37:10 +01:00
Richard Hughes
b9bddfd7ac trivial: Ensure the verify component is replaced on veriy-update, not merged 2017-06-22 10:34:18 +01:00
Richard Hughes
08f12de44c trivial: Avoid warning when doing verify-update multiple times
Applications always need a valid source with newer appstream-glib versions;
even in this case where the source is the hardware itself.
2017-06-22 10:33:32 +01:00
Richard Hughes
22c88de8e4 trivial: Increase the warning level when a plugin adds a device twice 2017-06-22 09:36:32 +01:00
Richard Hughes
943d2c9bb5 trivial: Split out some common functionality from fu-engine.c 2017-06-21 09:04:39 +01:00
Richard Hughes
a5bb4d8428 trivial: Fix a missing signal causing a warning in the recent refactor 2017-06-19 20:22:25 +01:00
Richard Hughes
9945edbe74 Split up the daemon into the loader and an engine object
The idea here is that we move a lot of the 'meat' out of fu-main into the
engine. This also lets us simplify a lot of things and ensures the user
authentication is simple and easy to audit.
2017-06-19 13:50:38 +01:00