Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
68cc00c7e9 Allow multiple checksums on devices and releases
Although we supported other hashes than SHA1 (which is now moderately unsafe)
we had to switch the metadata provider and daemon on some kind of flag day to
using SHA256. Since that's somewhat impractical, just allow multiple checksums
to be set on objects and just try to match whatever is given in preference
order.

This also means we can easily transition to other hash types in the future.

The removed API was never present in a tarball release, so not an API break.
2017-06-06 20:06:53 +01:00
Richard Hughes
985ac07ab7 Only decompress the firmware after the signature check
This is moderately more secure, in the event that g_zlib_decompressor_new() has
an exploitable overflow. Spotted by Sebastian Krahmer, many thanks.
2017-06-06 20:02:54 +01:00
Richard Hughes
812d1b708d trivial: Spit out non-enum functionality into a common file 2017-06-06 16:27:47 +01:00
Richard Hughes
605791d19e trivial: Remove the libgcab1-dev dep, nothing actually requires it 2017-06-06 14:51:25 +01:00
Richard Hughes
fe461b618e trivial: Use SHA256 for the store origin
If we're using this for caching it seems a good idea to use a secure cache function.
2017-06-06 14:18:17 +01:00
Richard Hughes
6b8528632c trivial: Update the bump soname list 2017-06-06 12:26:43 +01:00
Richard Hughes
7e206447a8 Use the user cache directory for firmware
We don't need to redownload this multiple times if we have multiple devices
needing the same firmware update.
2017-06-06 12:22:30 +01:00
Richard Hughes
81c7649dd8 libfwupd: Add fwupd_client_get_devices_simple() to return us an array of devices, not results 2017-06-06 11:10:57 +01:00
Richard Hughes
45c1545b0a Add a 'downgrade' command to fwupdmgr
This allows the user to downgrade the firmware on a device.
2017-06-06 09:44:47 +01:00
Richard Hughes
224002ab38 Prompt for the device ID if nothing specified in get-releases
This makes it somewhat easier to use for the common case.
2017-06-06 09:34:46 +01:00
Richard Hughes
6e48871bce trivial: Respect the checksum kind when calling VerifyUpdate 2017-06-05 17:48:13 +01:00
Richard Hughes
e4a100cfee Add a GetReleases() D-Bus call to return all releases for a device
This allows us to downgrade firmware in the future.
2017-06-05 17:42:57 +01:00
Richard Hughes
fdce4f57a3 Remove deprecated API added since the last tarball release 2017-06-05 17:41:57 +01:00
Richard Hughes
1642b3b95a Deprecate the old FwupdResult API
It will be removed next time we bump soname.
2017-06-05 17:41:11 +01:00
Richard Hughes
4db6c4a4b0 libfwupd: Split up FwupdResult into FwupdDevice and FwupdRelease
This retains the old API to avoid breaking ABI.
2017-06-05 17:34:36 +01:00
Richard Hughes
502a2ca64a Do not re-download firmware that exists in the cache 2017-06-05 09:23:10 +01:00
Richard Hughes
01c13d1634 trivial: Use a helper to get the sysconfig dir
This makes testing using a prefix much easier.
2017-06-05 09:10:17 +01:00
Richard Hughes
0fe22ff010 ebitdo: Ensure the version is set on the device in non-bootloader mode 2017-06-05 09:03:44 +01:00
Richard Hughes
a9adbf5d22 ebitdo: 8bitdo has started using a new VID 2017-06-05 08:46:50 +01:00
Richard Hughes
b8f8db2082 Add support for Microsoft HardwareIDs
This commit provides a new "hwids" subcommand for fwupdmgr that shows the
hardware GUIDs on the local system. It also provides API that plugins can use
to self-disable when a specific HWID does not match.

The GUIDs used in this implementation match that of ComputerHardwareIds.exe
2017-06-04 19:46:36 +01:00
Richard Hughes
f29a6eeb2c trivial: Modernize the daemon private data cleanup 2017-06-02 20:14:14 +01:00
Richard Hughes
0b57806b68 Use the correct user and password for the firmware download 2017-06-02 13:19:08 +01:00
Richard Hughes
90bcd058f0 Return the remote ID when getting updates about hardware 2017-06-02 13:19:08 +01:00
Richard Hughes
d4bdfd6883 Do not copy the origin from the new metadata file
If the system has multiple remotes enabled then simply setting the origin to
the 'last-updated' source is confusing.
2017-06-02 13:19:08 +01:00
Richard Hughes
1b50d960f2 Send the daemon the remote ID when sending updated firmware metadata
This allows us to 'tag' the components with the correct remote ID value, which
then means we can tell where the firmware information has come from when saving
a composite store. It also allows us use the correct username and password in
the future when downloading the firmware blob itself.

Keep the old D-Bus method around to preserve API for existing clients.
2017-06-02 13:19:05 +01:00
Richard Hughes
dfed515573 Allow downloading metadata from more than just the LVFS
Add the concept of 'remotes' that can dropped into /etc and used as firmware
metadata sources. This may be desirable when firmware is only accessable with
a valid support contract or from behind a VPN.
2017-06-02 13:19:05 +01:00
Richard Hughes
5408985aef trivial: Fix up the example spec file 2017-06-01 10:50:09 +01:00
Eric Koegel
23603f0452 Add support for ConsoleKit2
Make systemd and ConsoleKit support an optional compile time flag
with both enabled by default. If both are used, the ifdef/elif will
ensure only the systemd calls are used so there's no conflict.
2017-06-01 09:00:16 +01:00
Chris Mayo
f358837685 Make documentation and man pages optional
Reduce the minimum build-time dependencies.
2017-05-31 20:00:59 +01:00
Richard Hughes
35579c3183 unifying: Do not expect a reply when issuing a REBOOT command
Although the device does send a response, in some cases the Linux USB stack
processes the disconnect before the reply is processed.

Resolves: https://github.com/hughsie/fwupd/issues/122
2017-05-31 16:44:21 +01:00
Richard Hughes
5bba7caa4d unifying: Remove the indirection to lu_device_send_request()
It's only called by one static user, and it is much simpler this way.
2017-05-31 16:40:54 +01:00
Richard Hughes
2ff985e04b unifying: Allow calling lu_device_close() multiple times without an error 2017-05-31 16:36:00 +01:00
Richard Hughes
e1e9fa99b4 unifying: Don't read a register we don't use
It seems other firmware versions are affected too.
2017-05-30 19:46:42 +01:00
Timo Gurr
555c634a92 Allow to specify bindir 2017-05-29 16:54:30 +01:00
Mario Limonciello
ffe77c2d3a trivial: minor typo corrections 2017-05-26 08:45:12 -05:00
Mario Limonciello
59983adf8e trivial: typo 2017-05-26 08:44:19 -05:00
Mario Limonciello
ea736d2a95 trivial: correct markdown URLs 2017-05-26 08:43:18 -05:00
Mario Limonciello
100ea26553 Add build directions to README.md (#120) 2017-05-26 08:42:50 -05:00
Mirco Tischler
63687ad124 Remove 'lib' prefix when looking for libraries
ld will prepend the lib prefix itself and will actually look for
liblibgpg-error and liblibm if called with -llibgpg-error and -llibm. Let's
get rid of the prefix.
2017-05-26 12:09:19 +01:00
Mario Limonciello
df1f570069 Fix a logic error with testing for a dell system.
Some Lenovo systems were inadvertently matching.
2017-05-25 21:33:54 -05:00
Mario Limonciello
966b083e22 Make systemd dependency at least version 231
systemd 231 renamed ReadWriteDirectories to ReadWritePaths.
FW updates will fail for difficult to debug reasons if using an older
and the current unit.
2017-05-25 09:50:48 -05:00
Chris Mayo
584921f16c Increase minimum required AppStream-Glib version to 0.6.13
Adds regex command used for comparing firmware versions.
2017-05-24 20:13:00 +01:00
Richard Hughes
e2ecefa3c3 unifying: Relax the requirement that a SHORT request should return a SHORT reply
For some HID++2.0 devices a SHORT request is allowed to be padded into a LONG
response.
2017-05-23 13:54:10 +01:00
Richard Hughes
2b5f6b9a74 unifying: Correctly open RQR12 devices with original factory firmware
It seems reading from the register is fixed in later firmware versions.
2017-05-23 13:14:28 +01:00
Richard Hughes
fd45583728 unifying: Ensure HID devices are closed if the subclassed open() or probe() failed
Fixes the critical warnings in https://github.com/hughsie/fwupd/issues/117
2017-05-23 12:27:23 +01:00
Richard Hughes
26a52be318 unifying: Fix the spelling of 'Receiver' 2017-05-23 09:30:20 +01:00
Piotr Drąg
63c6c4c9d9 trivial: Update LINGUAS
Add Basque, Indonesian, and Kazakh.
2017-05-22 20:13:05 +01:00
Richard Hughes
bf5180ae81 trivial: post release version bump 2017-05-22 19:39:19 +01:00
Richard Hughes
d90b214e0c Release fwupd 0.9.2 2017-05-22 19:37:19 +01:00
Richard Hughes
ccda0d2be7 uefi: Add a translatable string for future use
This is added now so the translator teams get a chance to translate it before
it is used in anger.
2017-05-22 12:01:26 +01:00