Commit Graph

238 Commits

Author SHA1 Message Date
Richard Hughes
a2d8b94bf1 trivial: post release version bump 2020-10-26 11:52:16 +00:00
Richard Hughes
c7283ea61e uefi: Drop efivar dependency 2020-10-19 16:13:21 +01:00
Richard Hughes
f019971c00 redfish: Drop efivar dependency 2020-10-19 16:13:21 +01:00
Mario Limonciello
68df30bd2b dell: Drop efivar dependency
Since we removed the ability to turn on/off force power this is dead code, and
an unnecessary dependency.
2020-10-19 16:13:21 +01:00
Mario Limonciello
11b71f4978 Offer to compile daemon without polkit support
Based on a patch from Daniel Campello at
https://chromium-review.googlesource.com/c/chromiumos/third_party/fwupd/+/2354521
2020-10-14 07:58:16 -05:00
Érico Rolim
0651aeef24 Fix header names.
- <sys/poll.h> should be <poll.h>
- <sys/errno.h> should be <errno.h>
2020-10-10 12:33:56 +01:00
Érico Rolim
acd95c661b uefi: add configuration option for objcopy utility. 2020-10-10 12:32:13 +01:00
Richard Hughes
4123885c81 bcm57xx: Add a plugin that can update the BCM5719 network adapter 2020-10-08 16:49:07 +01:00
Mario Limonciello
110eb286bc Make TPM more optional (Fixes: #2360)
- Rename the `plugin_tpm` option to `tpm` and when it's disabled
remove TPM support from all plugins
- If enabled then require the TSS to be installed
2020-09-08 15:16:58 -05:00
Jan Tojnar
3e82beedda build: fix systemd_root_prefix for systemd 246
systemd 246 replaced the variable names (4908de44b0).
The old ones are kept for backwards compatibility but some of them interpolate new variable names so redefining them breaks.
Curiously, only systemdshutdowndir is affected by that here.
2020-08-30 13:39:48 +01:00
Benson Leung
96bad357ad Require libgusb 0.3.5
Newer version of libgusb has g_usb_device_get_configuration_index which
will be used by cros-ec plugin.

Skip bumping this dependency on Debian and Ubuntu as of this commit date,
they don't know about 0.3.5 yet.
2020-08-28 10:48:03 -07:00
Mario Limonciello
5de5dd3582 Install the installed tests
Move binaries out of fwupd tree to https://github.com/fwupd/fwupd-test-firmware

Fixes some of https://github.com/fwupd/fwupd/issues/1956
2020-08-28 10:10:43 -05:00
Mario Limonciello
82c3e3471d Remove support for UEFI dbx security attribute
This is no longer relevant as fwupd is providing dbxtool now.
2020-08-19 07:38:51 +01:00
Richard Hughes
891de60df5 trivial: Disable -Wnull-dereference
It just doesn't work correctly.
2020-08-13 13:41:49 +01:00
Richard Hughes
cad96542e2 Check if CET is actually being used on the runtime system
With thanks to H.J. Lu <hjl.tools@gmail.com> for the initial code.
2020-07-27 15:53:38 +01:00
Richard Hughes
9a04ce8f29 msr: Add a new plugin to detect the Intel DCI state 2020-07-16 20:13:06 +01:00
Richard Hughes
71ba813a71 libfwupd: Add fwupd_client_update_metadata_bytes()
Sometimes the data is coming from a blob of memory and not a cached file, so
use a memfd to create a file descriptor that can be passed to the daemon.
2020-07-09 20:57:00 +01:00
Richard Hughes
885faa4011 trivial: Require libjcat even when compiled with -Dbuild=library 2020-07-03 11:51:05 -05:00
Benson Leung
cd65aeaa41 Require libgusb 0.3.3
Newer version of libgusb has support for a usb endpoint wrapper.
2020-05-29 06:55:40 +01:00
Mario Limonciello
d39bcee29d trivial: detect cpuid.h and also look for host architecture
Fixes cross compilation for arm with clang which provides cpuid.h
but helpfully has this error:
```
 #if !(__x86_64__ || __i386__)
 #error this header is for x86 only
 #endif
```

Fixes: #2131
2020-05-26 15:06:08 -05:00
Richard Hughes
bd44432240 trivial: Fix a build failure on aarch64
It seems cpuid.h isn't available everywhere, which make sense in retrospect.
2020-05-21 12:05:05 +01:00
Mario Limonciello
07f3fe702b trivial: if not specified try to use some better dbx defaults 2020-05-15 09:33:01 -05:00
Richard Hughes
f58ac7316c hsi: Abstract out the list of FwupdSecurityAttr objects for plugins
This exports FuSecurityAttrs into libfwupdplugin so that we can pass the plugins
this object rather than a 'bare' GPtrArray. This greatly simplifies the object
ownership, and also allows us to check the object type before adding.

In the future we could also check for duplicate appstream IDs or missing
properties at insertion time.

This change also changes the fu_plugin_add_security_attrs() to not return an
error. This forces the plugin to handle the error, storing the failure in the
attribute itself.

Only the plugin know if a missing file it needs to read indicates a runtime
problem or a simple failure to obtain a specific HSI level.
2020-05-12 16:47:24 +01:00
Richard Hughes
b9640a28ec uefi-dbx: Add a plugin that analyses the UEFI dbx variable
This will be used for future functionality.
2020-05-07 16:59:36 +01:00
Richard Hughes
9ed79ae644 Fix various build issues with -Wdiscarded-qualifiers
Fixes https://github.com/fwupd/fwupd/issues/2068
2020-05-07 16:15:30 +01:00
Richard Hughes
748a65f3c7 trivial: Post branch version bump
We're planning to ship fwupd 1.4.x in RHEL 8 and so it makes sense to have a
stable branch to do point releases. I don't intend to release versions 1.5.x
any time soon, so moderately-agressive backporting to 1_4_X is okay.
2020-05-05 11:34:17 +01:00
Richard Hughes
09e63cd45d trivial: post release version bump 2020-04-27 11:12:27 +01:00
Richard Hughes
0d4e2ca4c5 Make tss2-esys conditional
This is not provided in RHEL 8 in the default build root.
2020-04-22 09:36:14 +01:00
Jan Tojnar
463db5162f build: Allow overriding prefix for systemd file installation
It is a good practice to install files relative to our own variables
https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
and it is required on systems like NixOS.

Unfortunately, systemd allows overriding the root prefix,
see also 1c2c7c6cb3,
so we cannot just do that.

Let's at least make the systemd installation prefix overridable.

This will also allow us to drop `systemdsystemunitdir` option since
systemd hardcodes it to `${rootprefix}/lib/systemd/system`.
2020-04-18 15:22:10 +01:00
Richard Hughes
e1472c7f1f trivial: Add -Wmaybe-uninitialized to the list of warnings 2020-04-14 15:16:51 -05:00
Richard Hughes
a51f0e11ea trivial: post release version bump 2020-04-14 10:36:12 +01:00
Richard Hughes
39dc902a42 Define SOURCE_VERSION when building a package
In this case git exists, but there's no git checkout and so the source version
is an empty string.
2020-04-10 16:18:25 +01:00
Richard Hughes
fe4b3eadaa trivial: Use the same source version string between daemon and client
This fixes the common problem encountered when developing plugins:

    ./src/fwupdmgr get-devices
    Unsupported daemon version 1.4.0, client version is 1.4.0-179-gcf8095d5
2020-03-30 13:58:25 +01:00
Richard Hughes
cf8095d5af Use a static version number
Getting the version string from git means the commit version changes each time
we commit any patch, which means we need to use --force to install firmware
when building fwupd against a version that should be compatible.

It is also very inconvenient not bumping the release version for git snapshots
as firmware can no longer depend on the "planned" release triplet.

tl;dr: A good idea for Flashrom, not so awesome for me.
2020-03-29 12:17:52 +01:00
Richard Hughes
d5aab65f30 Use Jcat files in firmware archives and for metadata
A Jcat file can be used to store GPG, PKCS-7 and SHA-256 checksums for multiple
files. This allows us to sign a firmware or metadata multiple times (perhaps
by the OEM and also then the LVFS) which further decentralizes the trust model
of the LVFS.

The Jcat format was chosen as the Microsoft catalog format is nonfree and not
documented. We also don't want to modify an existing .cat file created from WU
as this may make it unsuitable to use on Windows.

More information can be found here: https://github.com/hughsie/libjcat
2020-03-23 19:55:12 +00:00
Richard Hughes
8d919b3acb Remove support for GCab less than v1.0
We can fall back to the subproject version if required for CI targets.
2020-02-24 12:33:44 +00:00
Richard Hughes
83425f99af Generate a win32 setup binary
Fixes https://github.com/fwupd/fwupd/issues/1704
2020-01-16 12:23:08 -06:00
Mario Limonciello
d81ea2e3fc Move MOTD population into the daemon
This allows it to be refreshed anytime the daemon updates rather
than once a day by a systemd job.

As part of this change, remove the logging from `fwupdmgr` which
was only used for motd purposes.
2020-01-16 10:33:43 -06:00
Richard Hughes
fbb677bee2 Add a new plugin that exposes the system TPM device firmware version
This plugin does not yet allow the device to be upgraded, and is provided for
information only.
2019-12-05 21:05:17 +00: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
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00
Richard Hughes
ec73f86a79 trivial: Allow building GCab from a subpackage 2019-11-26 17:32:27 +00:00
Richard Hughes
9e5675e1b4 trivial: Allow compiling without <glib-unix.h> 2019-11-26 17:15:45 +00:00
Richard Hughes
5c508de173 trivial: Allow compiling without <fnmatch.h>
This also allows us to add a Win32 implementation if required in the future.
2019-11-26 13:13:31 +00:00
Richard Hughes
1665837e78 Make gudev a compile-time option
This should make it nearly possible to build fwupd on FreeBSD.
2019-11-25 09:29:46 +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
40bef88ce1 Allow compiling GUsb as a subproject
This allows us to get closer to compiling on FreeBSD.
2019-11-24 16:59:48 +00:00
Richard Hughes
1f68b021d1 trivial: Allow compiling without pwrite() 2019-11-23 17:07:53 +00:00
Richard Hughes
633445dc10 trivial: Allow compiling without <errno.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
8694dee4e7 trivial: Allow compiling without realpath() 2019-11-23 17:07:53 +00:00