Commit Graph

2860 Commits

Author SHA1 Message Date
Mario Limonciello
b91d3d9bff trivial: snap: set up proper permissions for copied filed in hook 2018-09-09 12:46:40 -05:00
Mario Limonciello
78bc800396 trivial: snap: Add python3-apt to build-deps for signed 2018-09-09 12:46:40 -05: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
Richard Hughes
a76f12dbfa trivial: Use fu_udev_device_set_physical_id() in udev plugin 2018-09-09 16:24:30 +01:00
Richard Hughes
1513585d21 trivial: Move the poll setup into common code
This is used by two device types in the unifying plugin, and soon to be one
other new plugin.
2018-09-09 13:43:18 +01:00
Mario Limonciello
25b49b7943 snap: Add an install hook for classic snap
Install the policykit rules and actions into the host system.
If switched to a devmode snap this should be reverted.
2018-09-08 08:34:36 -05:00
Mario Limonciello
3514a5ea84 snap: Remove setting LD_LIBRARY_PATH
When working with classic snap this causes gpg to stop working.
If switching to devmode revert this fix.
2018-09-08 08:34:36 -05:00
Mario Limonciello
e7e569255f snap: Adjust grade to stable
The snap itself is in good shape now and should be able to migrate to
stable channels as needed.
2018-09-08 08:34:36 -05:00
Mario Limonciello
2e22d316eb snap: Move fwupd to / rather than /usr 2018-09-08 08:34:36 -05:00
Mario Limonciello
e9a3a0b925 snap: Enable builds for the daemon
This requires a newer version of gettext than is in Ubuntu 16.04
in order to support GETTEXTDATADIRS
2018-09-08 08:34:36 -05:00
Mario Limonciello
4e0bb5d5c9 trivial: uefi: fix a signed vs unsigned issue
This started popping up in Arch CI:
../fwupd/plugins/uefi/fu-uefi-vars.c: In function ‘fu_uefi_vars_get_data’:
../fwupd/plugins/uefi/fu-uefi-vars.c:233:9: error: pointer targets in assignment from ‘gchar *’ {aka ‘char *’} to ‘guint8 *’ {aka ‘unsigned char *’} differ in signedness [-Werror=pointer-sign]
   *data = g_steal_pointer (&data_tmp);
         ^
2018-09-07 23:32:03 -05:00
Richard Hughes
9d3f791727 unifying: Use the new daemon-provided functionality
Until now, the unifying plugin was a 'special snowflake' and did things in very
different ways to the other plugins. Refactor each object to derive from either
FuUsbDevice or FuUdevDevice, and then remove LuDevice and the LuContext layers.
2018-09-07 16:22:38 +01:00
Richard Hughes
841c1807e1 trivial: Copy the parent if set for the repluged device
Based on a patch from Mario Limonciello, many thanks.
2018-09-07 15:32:32 +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
Mario Limonciello
e1c5cd8637 trivial: Look at both logical and physical IDs for replug matching
This resolves erroneously matching a logical child to it's parent if the child
is in replug.
2018-09-07 15:09:37 +01:00
Richard Hughes
bd747ded4f trivial: Use an elipsis when showing the remaining time 2018-09-07 14:29:18 +01:00
Richard Hughes
ed0512269a trivial: Support HID_PHYS in fu_udev_device_set_physical_id() 2018-09-07 14:28:52 +01:00
Mario Limonciello
0307a0a843 trivial: fu-device: don't show messages with (null) for device ID
device ID might not yet be initialized, so just show the word
"unknown"
2018-09-07 09:13:14 +01:00
Richard Hughes
194c76536e trivial: Use a non-obsolete font when building the UEFI splash images 2018-09-06 14:21:24 -05:00
Mario Limonciello
e3016602f8 Include serial number in daemon device output when trusted
This moves the storing of the serial number into the daemon and
when the calling process is UID 0 includes it in device output
2018-09-06 13:34:28 -05: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
b5024e33a3 trivial: Do not overwrite device values set from quirk files 2018-09-06 12:50:51 +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
2a679cd3b5 trivial: Open the device in fwupdtool before attaching and detaching 2018-09-05 15:32:38 +01:00
Richard Hughes
214906817e trivial: Use less offensive wording when talking about private LVFS instances
Various guidelines we care about tell us not to use this word unless specified
in documentation, e.g. i2c.
2018-09-05 15:16:42 +01:00
Mario Limonciello
b900fe6b4e trivial: move all Dell dock related quirks into dell.quirk
These quirks aren't really needed if compiled without the Dell plugin
since they just set the parentage.
2018-09-05 08:10:52 -05:00
Mario Limonciello
5b9bf049a3 thunderbolt: Allow failing validation checks if device flag set
As an example use case earlier development versions of a Thunderbolt module
may contain DROM corresponding to one model ID and transition to another
model ID. Even if lying about the GUIDs supported by the device via a
quirk the Thunderbolt validation will fail because the device isn't
intended for that system.

This should only be used during development.
2018-09-05 08:03:28 -05:00
Mario Limonciello
da0e90f263 fu-install-task: Allow using --force to ignore version_lowest (Closes #701) 2018-09-05 08:03:28 -05:00
Mario Limonciello
9c3a6fd60f Add a new device flag "ignore-validation" that will override validation checks
This flag isn't really intended for production, but more for development
to allow setting a quirk for a device during a transition period.
2018-09-05 08:03:28 -05:00
Richard Hughes
afa5ee75ec trivial: Run FuDevice:probe() when adding children
Probe does not require the device to be open and can be used automatically.
2018-09-05 13:32:26 +01:00
Richard Hughes
85f53a418c uefi: Add the Windows 10 device ID for compatibility 2018-09-05 05:59:43 -05:00
Mario Limonciello
14c823e967 trivial: fu-install-task: Correct error message ordering (#701) 2018-09-05 10:26:28 +01:00
Mario Limonciello
b172fb8f63 fu-device: Add platform ID after creating GUID for children
This fixes issues where the child gets the same ID as the parent.
2018-09-04 21:43:50 +01:00
Richard Hughes
e39801f00d trivial: Fix some NULL/FALSE confusion 2018-09-04 20:37:17 +01:00
Richard Hughes
4cfe6b7002 nvme: Convert known version formats to semvers 2018-09-04 20:37:17 +01:00
Richard Hughes
f5465b01af trivial: Add the script used to generate the NVMe stats 2018-09-04 20:37:17 +01:00
Mario Limonciello
b4e4b0bdbd trivial: fu-usb-device: s/FU_IS_UDEV_DEVICE/FU_IS_USB_DEVICE/
Probably just a copy and paste error
2018-09-04 12:53:47 -05:00
Mario Limonciello
00fbfd7084 nvme: Drop need of --force flag to update
It's been test to flash succesfully on at least one device now.
2018-09-04 18:02:09 +01:00
Richard Hughes
cfc1768bf0 nvme: Always require a reboot after applying firmware
Although we can apply the firmware at runtime, the new firmware isn't going to
be running until the PCIe device has been re-enumerated.
2018-09-04 18:02:09 +01:00
Richard Hughes
8ddc864764 trivial: Do not set a vendor ID if the vendor is unknown 2018-09-04 18:02:09 +01:00
Richard Hughes
e1c519299b Fall back to the udev parent if the vendor is unknown
This lets us get the correct vendor for NVMe devices.
2018-09-04 18:02:09 +01:00
Richard Hughes
2c0635ae55 trivial: Fix up some more gtk-doc issues 2018-09-04 14:52:46 +01:00
Richard Hughes
127248560b trivial: Modernize FuPlugin to use 'self' as the instance name 2018-09-04 08:22:39 -05:00
Richard Hughes
8878f1094e trivial: Modernize FuDevice to use 'self' as the instance name 2018-09-04 08:22:39 -05:00
Richard Hughes
828c039c00 trivial: Fix up some gtk-doc warnings 2018-09-04 08:22:39 -05:00
Richard Hughes
2aa3360d46 trivial: Include appstream-glib.h in the main plugin header 2018-09-04 08:22:39 -05:00
Richard Hughes
4adf3bb52c trivial: Remove duplicate header includes 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
Richard Hughes
62867f1f4e trivial: Add fu_usb_device_get_{v|p}id 2018-09-04 08:22:39 -05:00