Commit Graph

4304 Commits

Author SHA1 Message Date
Mario Limonciello
5723c2f643 dell: Add coldplug methods to let other plugins turn on TBT/GPIO
Remove the dummy devices created for NVM and MST, these will
be created by other plugins.  Other plugins will however
be using the Dell methods to enable these devices.
2017-01-06 15:25:57 -06:00
Mario Limonciello
ddeb0297bf trivial: dell: remove unnecessary usb_ctx after moving to plugins 2017-01-06 12:03:21 -06:00
Mario Limonciello
49c96b8941 trivial: dell: remove unnecessary include 2017-01-06 12:03:21 -06:00
Richard Hughes
4852ff8521 Fix the appstream-glib version guards
Resolves: https://github.com/hughsie/fwupd/issues/78
2017-01-04 20:38:29 +00:00
Richard Hughes
7ceb318a27 Add fwupd_result_get_device_version_bootloader()
This functionality is required so that AppStream metadata can check the fwupd
version, the firmware version, bootloader version or a combination of all three.
2016-12-23 11:21:22 +00:00
Richard Hughes
404cc51be3 Allow the metadata to match a version of fwupd and the existing fw version
This allows us to have new markup specified in the MetaInfo or AppStream XML:

  <requires>
    <id compare="ge" version="0.8.1">org.freedesktop.fwupd</id>
    <firmware compare="ge" version="0.1.2"/>
  </requires>

This means that only updates that match these versions will be shown.
2016-12-21 16:16:18 +00:00
Richard Hughes
d4184cf2c6 trivial: Fix a crash when a Unifying USB device is quickly replugged
We need to remove the device from the delayed hash table to ensure we don't
accidently free the helper when it removed a *second* time.
2016-12-21 16:05:19 +00:00
Richard Hughes
2d744f5571 trivial: Fix critical warning when policykit rules are not installed 2016-12-20 09:07:37 +00:00
Richard Hughes
0075a98b51 unifying: Use the actual bootloader VID/PIDs when in firmware mode 2016-12-16 21:24:55 +00:00
Richard Hughes
04042a10e8 trivial: Fix a tiny memory leak in the Udev plugin
Also, fix some method prefixes to match the plugin name.
2016-12-16 14:03:08 +00:00
Richard Hughes
a59777ad8d Add initial skeleton for Intel Thunderbolt support 2016-12-16 12:41:57 +00:00
Richard Hughes
598a40d746 trivial: Use a delay when adding Udev devices
There might be a better plugin to claim these than the generic fallback.
2016-12-16 12:41:57 +00:00
Richard Hughes
ae3d65f60b Move the device add delay to shared code
This allows us to reuse the logic in other plugins.
2016-12-16 12:41:57 +00:00
Richard Hughes
74702297b2 Move the Option ROM parsing to the Udev plugin 2016-12-15 17:09:38 +00:00
Richard Hughes
29c220db9f Add VerifyUpdate to update the device checksums server-side 2016-12-15 17:09:37 +00:00
Mario Limonciello
3b09e323c8 trivial: whitespace fixes in dell plugin 2016-12-15 10:30:41 -06:00
Mario Limonciello
9bb952ac7e dell: add a new method for forcing a controller to flash mode
This method will be used in conjunction with other new plugins
in the future that will perform online flashes.
2016-12-15 10:30:37 -06:00
Richard Hughes
0c7c4e4406 trivial: Use the HIDPP constants from libratbag 2016-12-15 16:26:30 +00:00
Richard Hughes
74d95ab988 trivial: Find the release when verifying and there is no version 2016-12-15 12:55:21 +00:00
Richard Hughes
0f5867e850 trivial: Use a suitable icon when doing polkit authentications 2016-12-15 12:55:21 +00:00
Richard Hughes
561c457149 trivial: Use unique profiling IDs in plugins 2016-12-15 12:55:21 +00:00
Richard Hughes
99b317d4f7 Use more restrictive settings when running under systemd 2016-12-14 13:05:03 +00:00
Richard Hughes
df3aa3bdc9 trivial: Fix a warning when compiling the ROM fuzzer 2016-12-14 10:52:58 +00:00
Richard Hughes
c591460ff8 trivial: Fix a warning when compiling the unifying plugin 2016-12-14 10:52:44 +00:00
Mario Limonciello
803e4808af Disable PrivateNetwork on systemd service
commit e34654e1 caused a regression that hotplugging devices no
longer worked.

Disabling systemd PrivateNetwork confinement resolves this.
2016-12-13 15:28:02 -06:00
Mario Limonciello
02ccecb2be fix dfu plugin loading
failed to open plugin
/usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_dfu.so:
failed to open plugin:
/usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_dfu.so:
undefined symbol: dfu_device_upload
2016-12-13 13:19:55 -06:00
Mario Limonciello
f074b0d367 Fix udev plugin loading
failed to open plugin /usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_udev.so:
failed to open plugin: /usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_udev.so:
undefined symbol: g_udev_device_get_property
2016-12-13 13:19:51 -06:00
Mario Limonciello
e781bb9b64 trivial: fix cosmetic fallout from provider -> plugin
some code (such as libfwupd) still internally refers to provider,
but this will need to be more carefully massaged
2016-12-13 12:25:09 -06:00
Mario Limonciello
6a1cbc61b2 trivial: correct raspberry pi error message 2016-12-13 12:03:49 -06:00
Richard Hughes
6d9d985f1b trivial: Fix a gtk-doc header issue 2016-12-13 16:02:50 +00:00
Richard Hughes
4232185bec trivial: Remove some false-positive messages when using clang 2016-12-13 16:01:52 +00:00
Richard Hughes
ee54d32f4d trivial: Fix a Coverity false positive 2016-12-12 17:02:10 +00:00
Richard Hughes
59a9344c1e Move the UPower functionality to a plugin 2016-12-12 16:28:16 +00:00
Richard Hughes
e8fb74a341 Return the pending UEFI update when not on AC power
The user will not be notified about firmware security updates all the time they
are on battery power. It's better to handle this in the client prompting the
user to connect the AC power source.
2016-12-12 16:17:38 +00:00
Richard Hughes
7b8b202786 Add a set of vfuncs that are run before and after a device update 2016-12-12 16:15:03 +00:00
Richard Hughes
864363e139 Add support for Logitech Unifying devices
If you do not have Unifying hardware you can emulate writing firmware using:

$ fu-unifying-tool write file.hex -v --emulate=bootloader-nordic
2016-12-12 15:36:53 +00:00
Richard Hughes
31bfba3d1b trivial: Fix an error path when getting firmware results 2016-12-12 15:14:12 +00:00
Richard Hughes
cff38bcb3a Convert the providers to plugins to simplify code and for future features
This is a large commit that removes all the providers and turns them into
plugins. I think having both providers _and_ plugins was super confusing.

Plugins are loaded at runtime so you could in theory develop a new plugin
without putting it in the fwupd source tree, although there are no installed
headers or PC files as I'm not sure it's a good idea at this stage.

This commit moves all the per-provider docs, tests, notes, debug dumps and test
data to plugin-specific directories -- these also allows the plugin author to
"own" more of the source tree so we don't enforce fu- prefixes and the style
guide everywhere.

This allows us to run the same action on all the plugins in the future, so we
could have a prepare(FuPlugin, FuDevice) and cleanup(FuPlugin, FuDevice) run
on *all* plugins, so doing an update using one plugin would allow us to work
around hardware quirks in other plugins.

If I've broken your out-of-tree provider it's trivial to port to the new API
with sed and a fixed up build file. If you need help please let me know.
2016-12-12 12:31:23 +00:00
Richard Hughes
b4a24f6035 trivial: Post branch version bump 2016-12-12 12:31:23 +00:00
Richard Hughes
319a6bab12 Move the plugins into plugin-specific directories
This will allow us to add further documentation here in the future.
2016-12-12 11:52:03 +00:00
Richard Hughes
d8e8134bdf trivial: Move the libdfu test files to under libdfu 2016-12-12 11:17:11 +00:00
Richard Hughes
28bbab532a Unexport libebitdo
Nothing is ever going to use this except fwupd, so it makes no sense adding the
extra overhead.
2016-12-09 09:56:31 +00:00
Richard Hughes
70a6822231 trivial: Remove the now-unused Ebitdo parse program 2016-12-08 22:06:37 +00:00
Richard Hughes
20bf83a676 trivial: Remove empty file 2016-12-08 21:19:20 +00:00
Richard Hughes
bc93e4ab6e Make all providers and plugins share a GUsbContext
This means we don't have more that one thread just watching for the USB
hotplug events. To achieve this split up the coldplug into setup and coldplug
phases and run the enumerate just once in the daemon.
2016-12-08 19:51:55 +00:00
Paul Wise
e34654e17f Uncomment SystemdService parameter in the dbus service file. (#74)
Without this the fwupd process will leak into the dbus cgroup.
2016-11-23 08:04:28 +00:00
Richard Hughes
7419e9624a trivial: Use the correct index value when getting the local file descriptor
I assume GLib in F25 is more strict about invalid values.
2016-11-22 19:48:06 +00:00
Philip Withnall
bc339aa657 Fix redeclaration of polkit autocleanup functions
ifdef cannot be used to determine if a C symbol is defined, as it’s
evaluated by the preprocessor, before symbols are parsed. Instead, try
to detect whether polkit.h is suitably recent enough to define its own
auto-cleanup functions.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2016-11-22 16:13:33 +00:00
Richard Hughes
013bb77ee9 Always make sure we're getting a C99 compiler
Spotted by pwithnall, many thanks.
2016-11-22 16:05:51 +00:00
Richard Hughes
1deda31cae Make libelf support optional 2016-11-22 15:39:57 +00:00