Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
ee46fb6d09 dfu: Allow wildcarded VIDs and PIDs when loading from a .cab file
The logic is that this will have been matched using the GUID before it gets to
the writing stage.
2017-11-16 15:30:30 +00:00
Richard Hughes
fd4697188a dfu: Invalidate the DFU mode, state and status when replugging 2017-11-16 15:30:30 +00:00
Richard Hughes
5826838987 trivial: Fix the comments in the DFU quirk file to be more helpful 2017-11-16 15:30:30 +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
Mario Limonciello
370e76d4f4 Skip hwid-requires test on s390x for now.
This makes CI more useful as there is currently a problem with
gcab 0.7 and big endian architectures not yet fixed.

More details available in:
https://github.com/hughsie/fwupd/issues/318
2017-11-16 07:46:42 -06: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
Mario Limonciello
2e52dc2242 dell: disable plugin if libsmbios fails 2017-11-14 13:20:59 -06:00
Mario Limonciello
20e856ccbe dell: activate libsmbios_c debugging output with --plugin-verbose=dell 2017-11-14 12:00:49 -06:00
Richard Hughes
c17f0f368e ebitdo: Fix a possible buffer overflow when debugging 2017-11-14 16:08:14 +00:00
Richard Hughes
bf186f26c2 trivial: Use the runtime GUID for the SFC30 gamepad in the hardware tests
To verify, this matches the <firmware> provide in the upstream metainfo file.
2017-11-14 16:01:12 +00:00
Richard Hughes
49fafec020 Set environment variables to allow easy per-plugin debugging
This allows end-users testing a specific plugin to start fwupd with an extra
command line parameter, e.g. `--plugin-verbose=unifying` to output a lot of
debugging information to the console for that specific plugin.

This replaces a lot of ad-hoc environment variables with different naming
conventions.
2017-11-14 14:22:02 +00:00
Richard Hughes
9c4b531945 trivial: Use fu_plugin_runner_device_generic() for unlock() 2017-11-14 11:34:53 +00:00
Richard Hughes
d3d96ccbb2 trivial: Allow running generic vfuncs in the tests without a GModule
This makes it easier to set up test harness in the daemon self tests.
2017-11-14 11:34:33 +00:00
Richard Hughes
2adee9082b dfu: Use the new update_detach() and update_attach() vfuncs 2017-11-14 10:49:43 +00:00
Richard Hughes
09ff4c905d colorhug: Use the new update_detach() and update_attach() vfuncs 2017-11-14 10:49:43 +00:00
Richard Hughes
37e124f3da unifying: Use the new update_detach() and update_attach() vfuncs 2017-11-14 10:49:43 +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
d81249465d trivial: Fix the case of some debugging statements 2017-11-14 10:19:02 +00:00
Richard Hughes
3979ba5039 nitrokey: Fix a buffer overrun spotted by Coverity
This only happens when debugging, so it was not spotted by valgrind.
2017-11-13 21:59:57 +00:00
Richard Hughes
9b0d228ed9 Add a nitrokey plugin
This gets the firmware version from the Nitrokey storage device but does not
enable the firmware upgrade mechanism.
2017-11-13 16:25:46 +00:00
Richard Hughes
31830aaea3 dfu: Ensure the mode is set correctly for fake runtimes 2017-11-13 16:01:57 +00:00
Richard Hughes
959e3d8a76 dfu: Add quirk for AT32UC3B1256 as used in the RubberDucky 2017-11-13 14:25:02 +00:00
Richard Hughes
ff3efe77b4 trivial: Fix the DFU self tests when the ColorHug+ is connected 2017-11-13 14:07:50 +00:00
Richard Hughes
9e59fa4d16 ebitdo: Rename FuDeviceEbitdo to FuEbitdoDevice
This is what most programmers expect and makes it clear what it derives.
2017-11-13 14:03:02 +00:00
Richard Hughes
a142bb15b6 altos: Rename FuDeviceAltos to FuAltosDevice
This is what most programmers expect and makes it clear what it derives.
2017-11-13 13:58:37 +00:00
Richard Hughes
ba6391e98d colorhug: Do not save the firmware blob in the device state
It's only needed for fu_plugin_update() so there's no point at all.
2017-11-11 21:58:17 +00:00
Richard Hughes
28abc4f60d colorhug: Do not use two prefixes for trivial log messages
G_LOG_DOMAIN is set to something ColorHug-specific already.
2017-11-11 21:58:17 +00:00
Richard Hughes
85dbcbf534 dfu: Add trivial helpers to get the current vid/pid/release 2017-11-11 21:06:18 +00:00
Richard Hughes
95ca91a515 trivial: Clarify two gtk-doc comments to explain the flags better 2017-11-11 21:06:14 +00:00
Richard Hughes
f1d6f6cfc3 trivial: Unconstify an allocated variable to avoid a GCC warning 2017-11-10 14:31:22 +00:00
Richard Hughes
97d1cbb304 trivial: Ensure the polkit rules always get installed into datadir 2017-11-10 14:31:22 +00:00
Mario Limonciello
ce051b8da5 debian: only do libsmbios on supported architectures 2017-11-09 18:53:46 -06:00
Mario Limonciello
3744e614a9 debian: debci: remove unnecessary dbus start command
Shouldn't be needed as depending on dbus-x11 depends on dbus
which should get the daemon up and running.
2017-11-09 16:36:28 -06:00
Richard Hughes
7bcba92f75 trivial: post release version bump 2017-11-09 15:23:12 +00:00
Richard Hughes
a72b3581fa Release fwupd 1.0.1 2017-11-09 15:19:58 +00:00
Richard Hughes
37906f6aae trivial: Fix NULL/FALSE confusion in the dfu plugin 2017-11-09 14:32:25 +00:00
Richard Hughes
78c8411253 Use the correct remote-specified username and passord when using fwupdmgr
Spotted by clang, many thanks.
2017-11-09 12:17:24 +00:00
Richard Hughes
2b9b9f359b trivial: Fix a false-positive noticed by clang 2017-11-09 12:16:53 +00:00
Richard Hughes
69fcb73a74 dfu: Fix a trivial unused variable spotted by clang 2017-11-09 12:16:12 +00:00
Richard Hughes
a14d771476 dell: Fix a trivial warning spotted by clang 2017-11-09 12:15:55 +00:00
Richard Hughes
8175f6d136 libfwupd: Remove a pointless call to fwupd_remote_build_uri() 2017-11-09 12:15:30 +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
ff372acb1d ebitdo: Wait for the device to come back after performing update
This means we can verify the firmware version that was flashed, and makes the
code perform in the same way as the DFU and ColorHug plugins.
2017-11-08 11:02:38 +00:00
Richard Hughes
da8f476aa2 ebitdo: Fix a error prefix string 2017-11-08 11:02:38 +00:00
Richard Hughes
876e5e0c35 ebitdo: Fix a double-unref when updating the device
This can cause the daemon to emit a critical warning...
2017-11-08 11:02:38 +00:00
Richard Hughes
06a4fe4d9a trivial: Add a hardware tests for two 8Bitdo devices
This only installs one version on to the hardware as a manual step is required.
2017-11-08 11:02:38 +00:00
Mario Limonciello
4c6667a46e contrib/debian: dynamically generate control file
All the information necessary to generate a debian control file
is now in the XML file.  Use it rather than hardcoding in multiple
places.
2017-11-07 16:39:28 -06:00
Mario Limonciello
d607817af4 contrib: Move dependencies into XML file
Monster CSV file is a little wild.  This is more readable and
will make adding new distros and dependencies easier later.
2017-11-07 16:39:28 -06:00
Richard Hughes
82a025c865 trivial: Add a hardware test for the ColorHug device 2017-11-07 20:09:41 +00:00
Mario Limonciello
7f3bfc9d99 dell: catch invalid dock component requests
Test if g_strrstr returns NULL, as this means the string was
modified and other requests predicated on this will fail miserably.
2017-11-07 09:46:36 -06:00