Commit Graph

57 Commits

Author SHA1 Message Date
Mario Limonciello
53e3ae340b trivial: libfwupd: fix an unused variable in Win32 2022-05-10 14:52:24 -05:00
Mario Limonciello
a9f92dcb5e trivial: libfwupd: don't try to read /etc/os-release on windows 2022-05-05 15:38:43 -05:00
Richard Hughes
91512925a0 Check for os-release on FWUPD_SYSCONFDIR
Change-Id: I391eabfb1ef6eadbad100273445794172b2cb1fd

Fixes https://github.com/fwupd/fwupd/issues/4366

Based on a patch by Daniel Campello <campello@chromium.org>, many thanks.
2022-03-09 08:10:18 -07:00
Richard Hughes
4ce9972ce5 trivial: Don't leak the string even on critical failure
Not totally sure this is worthwhile, but it triggered a failure in the
RHEL tests we do - and it's less work to fix it than argue.
2022-03-08 16:01:16 +00:00
Richard Hughes
c725e42e34 trivial: Fix various const issues 2022-01-03 22:46:23 +00:00
Richard Hughes
c4590f2f25 trivial: Add some missing g_return_val_if_fail() calls 2022-01-03 22:46:23 +00:00
Richard Hughes
2e99055d1e trivial: Add some more annotations for language bindings 2022-01-03 22:46:23 +00:00
Richard Hughes
5ebbfe7f7d Export the component release ID over DBus
This allows us to map a specific component on the LVFS without guessing
by using the generated checksum.
2021-11-19 06:55:53 +00:00
Richard Hughes
5e895b89c9 Use pre-computed namespace GUIDs to load 0.3% faster
This should also help memory fragmentation at startup too as we were
splitting a lot of very small strings.
2021-11-03 21:51:45 +00:00
Richard Hughes
81d0216d14 trivial: Make checking a GUID faster to speed up startup by 0.23%
We call this 570 times at startup, and it makes up a non-trivial amount
of the daemon startup time...
2021-11-03 21:51:45 +00:00
Richard Hughes
5c60beae29 Show HSiLevel=0 attributes in JSON security output
Don't assume zero always means 'skip'.
2021-09-02 21:41:11 +01:00
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
Richard Hughes
9829103be9 trivial: Add some generic helpers for building JSON 2021-07-15 20:34:07 +01:00
Mario Limonciello
1e17457b16 Allow building the documentation with gi-docgen and gtk-doc
Until gi-docgen is declared stable support either of them.
This effectively means that hand builds and CI builds will use
gi-docgen, but distro builds use gtk-doc-tools.
2021-06-09 22:21:53 +01:00
Richard Hughes
66482687f7 trivial: Move the sys/mman.h include to the right #ifdef 2021-05-26 16:00:32 +01:00
Sergii Dmytruk
d01603c2f9 Don't fail if memfd_create() is not available
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2021-05-21 17:29:17 +01:00
Richard Hughes
769cbbf8af Add support for the PHAT table
On Alterlake and newer hardware the Platform Health Assessment Record
data can be used by the IHV to debug why a specific capsule update
failed. Any custom firmware loaded by the OEM can be identified and
used to further debug the root cause.
2021-05-12 12:02:33 +01:00
Richard Hughes
20ef071b3c trivial: Style fixes to lots of gtk-doc 2021-05-10 14:35:10 +01:00
Richard Hughes
89d45a0d91 trivial: Standardize on introspection for @error and @cancellable
Also standarize on `Returns:` for the result.
2021-04-28 16:19:50 +01:00
Norbert Kamiński
76e19930a8 fwupd port for BSD distros
Signed-off-by: Norbert Kamiński <norbert.kaminski@3mdeb.com>
2021-03-19 17:05:09 +00:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
6a489a9eaf trivial: Add missing calls to g_return_val_if_fail() 2021-01-04 15:24:35 +00:00
Richard Hughes
68f565c441 Don't assume we have memfd_create() 2020-12-14 13:09:47 +00:00
Richard Hughes
39e391e046 Fix compile warnings when using -Db_sanitize=undefined 2020-12-14 08:33:41 +00:00
Mario Limonciello
2195237f12 trivial: don't show OS release paths checked 2020-10-03 06:58:13 -05:00
Richard Hughes
7c8a830659 libfwupd: Add async versions of the library for GUI tools
Rather than force the GUI to interact with fwupd using threads, provide
async versions so thay can be run without blocking the UI thread.
2020-09-03 15:46:57 +01:00
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