Commit Graph

4304 Commits

Author SHA1 Message Date
Mario Limonciello
7291c5b3ba trivial: fix TBT controller safe mode handling on Dell
- Set initial (invalid) GUID for TBT controller
- Don't set updatable unless GUID has been refreshed
- Correct the string used for GUID in Dell plugin
2017-08-28 13:24:59 -05:00
Richard Hughes
e0f28539ab trivial: Pedantic error literal conversion 2017-08-26 18:09:21 +01:00
Richard Hughes
91628ff8b6 dell: Use fu_device_has_flag() in the self tests 2017-08-26 18:09:21 +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
e116e2a6a6 trivial: Add the missing device flag to string functionality 2017-08-26 09:50:18 +01:00
Christian Kellner
1283003f2f thunderbolt: only build tests if glib >= 2.52
This change should restore building fwupd with the new thunderbolt
plugin on older systems.
2017-08-25 16:12:55 +02:00
Richard Hughes
e1a3bdec08 thunderbolt: Add a README file
Fixes: https://github.com/hughsie/fwupd/issues/185
2017-08-25 13:02:47 +01:00
Christian Kellner
e598f75a00 thunderbolt: test we handle change events properly
There was a bug in the plugin that would cause devices to be removed
on change uevents. This test checks for that.
2017-08-25 13:07:53 +02:00
Richard Hughes
6bc5968da2 thunderbolt: Don't remove devices on change events
Based on a patch by Mario Limonciello, many thanks.
2017-08-25 09:50:54 +01:00
Mario Limonciello
3bc251b3a8 thunderbolt: when in safe mode on a Dell system look up VID/DID from SMBIOS
Signed-off-by: Richard Hughes <richard@hughsie.com>
2017-08-25 09:46:41 +01:00
Mario Limonciello
35a0e864b8 Introduce concept of CanForcePower to turn on TBT controllers
Supported Dell devices will use this to turn on ThunderBolt controllers
during coldplug.
2017-08-25 09:35:46 +01:00
Richard Hughes
55566b53e6 Allow plugins to set boolean and integer metadata
Handling this in one place prevents plugins setting different values for
non-string values like TRUE/false or with different ways to represent integers.
2017-08-25 09:22:05 +01:00
Mario Limonciello
614908d08b trivial: debian: only modify /etc/fwupd.conf in CI context
This satisfies piuparts not modifying the system automatically.
2017-08-24 15:05:08 -05:00
Mario Limonciello
bae4b9948d trivial: minor typo that was missed on cherry-pick 2017-08-24 13:48:28 -05:00
Mario Limonciello
a4e764c3e2 Introduce a plugin interaction ABI 2017-08-24 13:41:27 -05: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
Christian Kellner
1f6873a5dd thunderbolt: add new devices without delay
We want thunderbolt to claim the device and not to race with the
udev plugin.
2017-08-24 13:55:00 +01:00
Jaroslav Lichtblau
6637f74161 thunderbolt plugin can be now tested on Arch Linux
umockdev package is now available in the community repository
of Arch Linux

https://github.com/hughsie/fwupd/issues/187
2017-08-24 11:21:55 +01:00
Mario Limonciello
3ed043abb2 trivial: debian: update for --enable-synaptics 2017-08-23 13:29:58 -05:00
Mario Limonciello
31f12579ff Add back options for HAVE_SYNAPTICS and HAVE_THUNDERBOLT
These were casualties in the move to meson that caused dell coldplug
prepare to fail.
2017-08-23 13:26:42 -05:00
Richard Hughes
6cbc7a6623 thunderbolt: Increase the runtime timeout for the self tests 2017-08-23 18:34:01 +01:00
Richard Hughes
7ef96b8a4e trivial: Fix up a few NULL/FALSE mismatches 2017-08-23 18:28:24 +01:00
Richard Hughes
c788134f75 trivial: Ensure that all the C source files include 'config.h' 2017-08-23 18:26:29 +01:00
Richard Hughes
07a91a4366 trivial: Use the new LVFS CA certificate
According to the crypto experts, path_len=1 makes things more secure for a CA
to prevent the Sub-CAs from issuing further Sub-Sub-CAs. I'll stick to code.
2017-08-23 15:36:22 +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
0dea1efb92 Use MetadataURI for both kinds of remote
I think this is clearer having one key for both types of remote.
2017-08-23 14:22:08 +01:00
Mario Limonciello
7f1ed952f2 trivial: update ubuntu dockerfile
Syncs with changes from Debian and sets it up for rolling with devel
release name changes
2017-08-22 13:50:25 -05:00
Richard Hughes
d067ed675e Add a configure switch for the LVFS remotes
On embedded devices these are not required.
2017-08-22 10:37:26 +01:00
Richard Hughes
3a0d3d5b58 trivial: Fix two introspection warnings 2017-08-22 10:37:26 +01:00
Philip Withnall
efcc7a0545 thunderbolt: Drop unnecessary fwup dependency
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-22 10:15:02 +01:00
Philip Withnall
883de6abd2 build: Fix use of undefined var in meson.build when systemd disabled
Fixes the meson error:
Meson encountered an error in file meson.build, line 207, column 2:
Unknown variable "systemd".

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-22 10:15:02 +01:00
Christian Kellner
81dd85f6d1 tbtfwu: remove legacy thunderbolt plugin
Replaced by the "thunderbolt" plugin.
2017-08-21 12:12:55 -05:00
Christian Kellner
73ba7ee82c thunderbolt: plugin for new tbt kernel interface
Thunderbolt has a new kernel interface starting from version 4.13,
which simplifies updating the host controller and devices: the
kernel now exposes a sysfs interface for the non-volatile memory
as a device node. This can be used to write the new firmware blob.
Updates are then triggered also via a simple write to a sysfs
file (nvm_authenticate), which in turn is also used for error
reporting.
The plugin should be functionally, but a few items are missing:
 - image verification
 - safe mode handling
2017-08-21 17:05:44 +01:00
Richard Hughes
9a7db9df7d Show a bouncing progress bar if the percentage remains at zero
Device actions like a Thunderbolt replug can take 25 seconds (!) and so it's a
good idea to show the user that the calling process is still alive.
2017-08-21 15:51:38 +01:00
Richard Hughes
38c1685c92 Do not install the PKCS7 certificate if installed with -Denable-pkcs7=false 2017-08-21 14:48:58 +01:00
Richard Hughes
adcc16a53c trivial: Check for zero size firmware image 2017-08-21 12:26:46 +01:00
Richard Hughes
11d55eb62c trivial: No need for a license in the README 2017-08-18 13:32:57 +01:00
Richard Hughes
0a8d5df265 trivial: Check the PKCS key purpose before adding to the trust list
According to some best practices this is a good idea, but in this specific case
the certificate will have been installed by the admin or package manager and
so is less important.
2017-08-18 12:19:23 +01:00
Richard Hughes
f03f386c68 trivial: Add a test for firmware signed with a derivative of the LVFS key
This also switches around the test for the self signed key to now fail, as the
generated certificate is no longer loaded into the trust list. This is a more
useful test as it more accurately represents what the fwupd daemon is doing.

As a side-note the detached signature from the derivate cannot be generated
using `--no-p7-include-cert` as only the main LVFS-CA certificate is shipped
with fwupd.
2017-08-18 12:11:59 +01:00
Richard Hughes
7ce6c93bf5 Install the LVFS PKCS7 certificate
This allows LVFS instances signed by the master key to distribute metadata and
firmware without using GPG and instead using PKCS7 certificates.
2017-08-18 11:10:15 +01:00
Richard Hughes
14047d7d24 trivial: Split up the keyring setup and public key adding 2017-08-18 11:10:03 +01:00
Max Ehrlich
6d0fc42685 Add a python script to create fwupd compatible cab files from Microsoft .exe files 2017-08-17 17:10:23 -05:00
Max Ehrlich
e9e23fd342 Remove extra ) from line 227 2017-08-17 16:37:23 -05:00
Mario Limonciello
ea0e9cec50 trivial: debian: add autopkgtest tests to run the CI suite 2017-08-17 13:19:58 -05:00
Mario Limonciello
97ebd16e16 trivial: fix some insignificant debian linitan warnings 2017-08-17 13:19:08 -05:00
Mario Limonciello
d3f304c0f1 trivial: ci: build deb package with hardlinks instaed of symlinks 2017-08-17 12:41:06 -05:00
Mario Limonciello
aa20ca2e7a trivial: debian: clarify why installed tests get installed in a generic directory (Closes: #872458) 2017-08-17 12:05:29 -05: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
Mario Limonciello
7cc2679f09 trivial: look for an empty string for systemd and udev directories 2017-08-17 09:22:39 -05:00
Matthias Klumpp
919e4ec61d ci: Echo shell commands, explicitly set error
By echoing the commands it is way easier to spot what the CI was doing
when a command failed. Setting fail-on-error mode explicitly makes sure
we always run with it, even if someone invokes the script with `bash
<scriptname>`
2017-08-16 23:00:29 -05:00