Commit Graph

31 Commits

Author SHA1 Message Date
Richard Hughes
59f871deda libfwupd: Move GUnixInputStream-creating functions to common code
We'll need to use them from other methods soon.
2020-07-09 20:57:00 +01:00
Richard Hughes
9b6d616383 fwupd: Export fwupd_client_download_bytes() into the client library
The logic here is that we can use one central session for all client actions.

Also, set the user agent for the *runtime* version of fwupd -- it's the runtime
version we use when checking capabilities, rather than the built-against
version. This would also explain why there are so many very obsolete versions
of fwupd being recorded on the LVFS...
2020-07-08 19:00:42 +01:00
Richard Hughes
ec2a4b586f trivial: Move some code for future use 2020-07-01 20:10:39 +01:00
Richard Hughes
1bde4fdd29 Fix the DeviceID set by GetDetails
The returned ID is the result of the SHA1 hash of the actual device ID. This
does not match anything found by the client, and so the install fails.

The symbol is exported as I think the device ID is an important identifier and
used in various fwupd tools.

When backported to the stable branch the verification should just be a static
function in src/fu-engine.c rather than a new symbol.
2020-04-20 17:42:22 +01:00
Richard Hughes
45a00738d8 Allow building on Windows with MinGW
Add various fixes to enable us to build a selection of useful USB plugins.
Also, skip tests that don't make sense on WIN32 or that will not work.

With much help from Mario Limonciello <mario.limonciello@dell.com> -- Thanks!
2019-12-03 16:33:43 +00:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Richard Hughes
b026e456f3 trivial: Allow compiling without HAVE_LC_MESSAGES 2019-11-23 17:07:53 +00:00
Richard Hughes
fc1e267d33 trivial: Allow compiling without <sys/utsname.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
a45994cb4a Fall back to /var/lib/dbus/machine-id when required
Fixes https://github.com/fwupd/fwupd/issues/1365
2019-09-23 17:34:47 +01:00
Richard Hughes
89def5ea51 Include all GUIDs when uploading a report
The LVFS already knows how to deal with arrays of strings, so this is a forwards
and backwards compatible change.

Fixes https://github.com/fwupd/fwupd/issues/1363
2019-09-17 13:46:15 +01:00
Richard Hughes
06ef7f7e46 Include all device checksums in the LVFS report
On some hardware the SHA1 checksum is not set and so we want to use the SHA256
hash value as well.

The LVFS doesn't currently read the ChecksumDevice value and so nothing will
explode serverside when changing this type from 'string' to 'array of strings'.
2019-03-11 06:42:26 -05:00
Richard Hughes
0b1cbb92c7 trivial: Fix building against old versions of GLib
Fixes https://github.com/hughsie/fwupd/issues/1023
2019-02-12 09:28:36 -06:00
Richard Hughes
8ff529debb trivial: Don't try to generate a GUID for an empty string 2019-02-07 18:56:15 +00:00
Richard Hughes
6b78d64987 Add fwupd_guid_from_string() to drop dep on uuid
This also allows us to write mixed-endian structures and adds tests. As part of
this commit we've also changed the API of something that's not yet been in any
tarball release, so no pitchforks please.
2019-02-06 14:48:04 +00:00
Richard Hughes
b8c30b8732 Do not use efivar just to print a mixed endian GUID 2019-02-04 15:19:57 +00:00
Richard Hughes
592baedfff Export some of the GUID functionality 2019-02-04 15:19:57 +00:00
Mario Limonciello
32241f4256 Add support for an UpdateMessage and display it in tools
The idea is that if the user should know something about the device update
"after" it's succesfully completed then the plugin can set `UpdateMessage`
for the device and a client can show it.

An example would be a device that doesn't reboot on its own and the user
needs to power cycle it manually.
2019-01-29 13:59:07 -06:00
Richard Hughes
e2fa12ed2f Submit the device firmware checksum and update protocol in the submitted report
This is usually the same as the content checksum, but can be a different value
for instance in the PCR0 UEFI case.
2018-12-14 19:23:04 +00:00
Richard Hughes
ef677dab81 trivial: Rename a function to better explain what it does 2018-10-17 14:41:07 +01:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
fe221dc13d trivial: Fix up some NULL/FALSE confusion 2018-05-29 09:33:44 +01:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Mario Limonciello
ed1ac2a74b Enable CentOS 7 for CI
There are a lot of hacks here;
 * Pulling newer libappstream-glib from Fedora
 * Pulling a systemd backport
 * Manually installing pillow and pygobject
 * PKCS7 is turned off (gnutls is too old)
2018-04-18 10:25:22 -05:00
Richard Hughes
d17dc0616f trivial: Export fwupd_get_os_release()
We need this for future client functionality and it seems a sane thing to
share.
2018-04-11 09:48:02 +01:00
Richard Hughes
03fa8c1002 trivial: Don't upload the DeviceID when sharing history
We don't use it on the LVFS, and it's not useful for debugging problems.
2018-01-26 09:30:49 +00:00
Richard Hughes
b58104895d trivial: Add fwupd_build_history_report_json() for future use 2018-01-11 21:28:22 +00:00
Richard Hughes
ae142a411f trivial: Parse the os-release file in a more useful way
This allows us to use the other keys for future use.
2018-01-11 10:30:39 +00:00
Richard Hughes
f1ed711c7e trivial: Add fwupd_build_machine_id()
This allows us to identify a specific machine using the machine-id.
2018-01-11 08:16:55 +00:00
Richard Hughes
8f89cf04fb Add more metadata to the user-agent string 2017-12-21 08:25:29 +00:00
Richard Hughes
b86484a585 Export some more API for dealing with checksums 2017-06-09 10:11:58 +01:00
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