Commit Graph

6361 Commits

Author SHA1 Message Date
Richard Hughes
448772b73e Wait for device reboot when using fwupdtool detach 2021-11-05 14:47:11 +00:00
Ross Burton
a346c582cc installed-tests: use sh instead of bash
fwupdmgr.sh uses [[ ]] tests, but none of the functionality offered by
them.

Use traditional [ ] tests, and switch the interpreter to /bin/sh.
2021-11-05 12:16:23 +00:00
Ross Burton
3147fef735 uefi-capsule: use /bin/sh in grub hook
Use . instead of source as source is a bashism.

Use /bin/sh as the interpretter as there are no strict bashisms in the
hook.

Ideally the shell expansion using `` is changed to $(), but the escaping
behaviour is complex and dash/busybox sh both support ``.
2021-11-05 12:16:23 +00:00
Richard Hughes
1507055849 trivial: Use GObject notify when modifying the proxy 2021-11-05 12:00:48 +00:00
Richard Hughes
c33483a279 vli: Fix a tiny memory leak on idle exit 2021-11-05 12:00:42 +00:00
Richard Hughes
ba2d82cb1d uefi-recovery: Set the device context to remove a daemon warning 2021-11-05 12:00:35 +00:00
Richard Hughes
02222a58c8 trivial: Add FU_UDEV_DEVICE_FLAG_OPEN_SYNC for future code 2021-11-05 08:01:25 +00:00
Richard Hughes
0fb2ef3aae trivial: Add fu_udev_device_seek() for future code 2021-11-05 08:01:25 +00:00
Richard Hughes
fe180cbf5d trivial: Add fu_udev_device_get_sysfs_attr_uint64() for future code 2021-11-05 08:01:25 +00:00
Richard Hughes
5dd2453012 Use a prepared query to improve startup speed by another 5% 2021-11-04 15:08:05 +00:00
Richard Hughes
9d6f862e14 trivial: Search all the GUIDs just once to speed up startup by 2%
We have to do a 2nd pass of all devices if the metadata or config file
changed, but we don't need to requery the silo at startup.
2021-11-04 15:08:05 +00:00
Richard Hughes
a32773efab Use indexes with the XPath query to speed up startup by 2% 2021-11-04 10:09:17 +00:00
Richard Hughes
1687513271 Do not sign dummy data at startup to speed up startup by ~6%
Also requires https://github.com/hughsie/libjcat/pull/54 to skip the
expensive GnuTLS signing operation for no data payload.
2021-11-04 10:09:17 +00:00
Richard Hughes
04d9f8c722 Use prepared queries for quirk lookup to speed up startup by 5%
We were already using xb_value_bindings_bind_str(), but recreating the
query object each time -- which kinda defeats the purpose...
2021-11-04 10:09:17 +00:00
Richard Hughes
eef0e079ab Speed up daemon startup by ~2%
We populate the plugin name hash table, but we forgot to use it.
2021-11-04 10:09:17 +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
Alexey Zapparov
f6b6d77eed Build logind plugin for elogind-enabled systems 2021-11-03 10:08:34 -05:00
Mario Limonciello
e873cf7dd7 trivial: ci: try to fix "Resource not accessible by integration"
See https://github.com/actions/first-interaction/issues/10 for more
2021-11-03 09:56:46 -05:00
Richard Hughes
ebf1fe19e8 trivial: Fix several broken links in the HSI specification
Fixes https://github.com/fwupd/fwupd/issues/3941
2021-11-03 13:45:08 +00:00
Richard Hughes
1a077289bc Speed up daemon startup by 15%
During my fwupd startup fu_plugin_has_custom_flag gets called 21 times
which causes all HWIDs to be enumerated with 346 calls to the quite
expensive fu_context_lookup_quirk_by_id() function.

Move the flag to a private hashset and enumerate the HWIDs only during
startup. There's nothing plugin specific about them anyway...
2021-11-03 07:14:37 +00:00
Richard Hughes
43924010b0 Version lock plugins to the daemon in the example spec file 2021-11-02 19:17:08 +00:00
Mario Limonciello
f65a242b1a Add a welcome message for any new contributors 2021-11-02 12:21:23 -05:00
Richard Hughes
7b2d75f94d trivial: Fix a tiny leak when using fwupdmgr 2021-11-02 13:47:56 +00:00
Richard Hughes
e3998eed5a trivial: Fix a tiny leak on request error path 2021-11-02 13:47:56 +00:00
Richard Hughes
8917a11208 logitech-hidpp: Fix a tiny memory leak for an error path 2021-11-02 13:47:56 +00:00
Richard Hughes
fa5994f3aa logitech-hidpp: Fix a tiny memory leak for ID6 devices 2021-11-02 13:47:56 +00:00
Richard Hughes
510a9bfe0c Merge tpm-eventlog into the tpm plugin
This is so much less complicated.
2021-11-02 13:47:25 +00:00
Richard Hughes
b0f80757f5 Add a test UEFI device that can be used to test capsules
To use this use `sudo systemctl edit fwupd.service` and set
`Environment="FWUPD_SYSFSFWDIR=/usr/share/installed-tests/fwupd"`

Fixes https://github.com/fwupd/fwupd/issues/3441
2021-11-02 08:09:25 +00:00
Richard Hughes
e29c74180c Move the TPM handling into the TPM place
The fact that it currently lives in uefi-capsule is a historical
accident, and it doesn't really belong to tpm-eventlog either.

Fixes some of https://github.com/fwupd/fwupd/issues/3901
2021-11-01 14:51:27 +00:00
Richard Hughes
23b1d20294 trivial: post release version bump 2021-11-01 11:57:50 +00:00
Richard Hughes
1c7b4ef223 Release fwupd 1.7.1 2021-11-01 11:55:09 +00:00
Richard Hughes
6d35c99393 Fix 'trivial: fwupdtool security' to show sane results 2021-11-01 11:46:44 +00:00
Richard Hughes
a026a177d9 Fix the CSME CVE detection
14.1.53.1649 appeared which showed that the logic was funcky.
2021-11-01 11:22:08 +00:00
Richard Hughes
74cb7a23d1 Fix 'fwupdmgr security' on a fresh install
If there are no HSI events then don't throw a critical warning when the
variant array type is unknown.
2021-11-01 10:14:43 +00:00
Richard Hughes
97785b3f5d trivial: Ignore security attrs without an assigned ID
This should never happen, but...
2021-11-01 10:14:43 +00:00
Richard Hughes
838db7e0fd trivial: Only show the 'Host Security Events' title when required
We actually ignore some of the events.
2021-11-01 10:14:43 +00:00
Richard Hughes
8b36789692 trivial: Fix spelling of fwupd 2021-11-01 08:50:51 +00:00
Richard Hughes
3e9d3cd50f trivial: Correctly redirect a typo in the HSI docs 2021-11-01 08:22:29 +00:00
Richard Hughes
a17222f8a0 trivial: Add some more details to the HSI specification 2021-11-01 08:22:29 +00:00
Richard Hughes
a0cb743700 Show changes in HSI attributes when required
e.g. `fwupdmgr security --force` would display:

    Host Security Events
      2021-10-29 10:51:42:  ✘ Kernel lockdown disabled
      2021-10-29 10:51:42:  ✘ SecureBoot disabled
      2021-10-29 09:32:32:  ✔ IOMMU device protection enabled
      2021-10-29 09:28:52:  ✘ IOMMU device protection disabled
2021-11-01 06:58:44 +00:00
Richard Hughes
3e456a8cbb Only save the HSI attributes to the database if different 2021-11-01 06:58:44 +00:00
Richard Hughes
17b6d79728 Allow getting the old HSI security attrs from the database
Based on a patch by Kate Hsuan <hpa@redhat.com>, many thanks.
2021-11-01 06:58:44 +00:00
Richard Hughes
e4b097c3dd Allow comparing two FuSecurityAttrs for equality
Based on a patch by Kate Hsuan <hpa@redhat.com>, many thanks.
2021-11-01 06:58:44 +00:00
Richard Hughes
8120616c62 trivial: Add a fallback result for an HSI attribute
The fallback may represent the old state, or a state
that may be considered equivalent.
2021-11-01 06:58:44 +00:00
Richard Hughes
01224b23e6 trivial: Fix the DCI links in the HSI specification
All the attributes have a 1:1 mapping except this one, and that broke
the Insights rules.
2021-10-30 19:33:11 +01:00
Richard Hughes
ad12a809e3 Add a configure option for fastboot support
Fixes https://github.com/fwupd/fwupd/issues/3920
2021-10-30 08:55:07 -05:00
James Beddek
d7bedc20af synaptics-rmi: fix meson configure when building tests
if synaptics-rmi is disabled and gnutls is not used, the configure fails

move the synaptics-rmi test check behind the "plugin_synaptics_rmi" option
2021-10-30 07:16:57 -05:00
syabbashp
3db727d460 Add support for HP Thunderbolt Dock G4 2021-10-29 18:33:15 +01:00
Richard Hughes
196dbec5ae trivial: Add fu_security_attrs_append_internal() for future code 2021-10-29 13:11:21 +01:00