Commit Graph

445 Commits

Author SHA1 Message Date
Richard Hughes
2d00cda464 Remove PLUGINBUILDDIR and use G_TEST_SRCDIR and G_TEST_BUILDDIR instead
This allows us to override the location we load data files from, which
allows us to do more kinds of installed tests in the future.

Also, move the global data/tests content into the place that it is used
as it was getting impossible to manage.
2021-10-21 18:36:22 +01:00
Richard Hughes
6235a8222a Share the Common Flash Memory Interface quirks between plugins
Now two plugins are using hardcoded SPI constants for various CFI chips,
and it makes sense to have some common quirk data that can be used by
both.

Add a FuSpiChip helper object that can be used by FuDevice subclasses
to get the specific SPI commands to use for each flash ID.
2021-10-20 12:19:39 +01:00
Richard Hughes
be1879fa4d trivial: Delete some unused test data 2021-10-20 09:55:44 +01:00
Richard Hughes
fcb5257e16 Allow OnlyTrusted=false in the non-polkit case 2021-10-17 14:29:58 +01:00
Richard Hughes
644ac0ea05 Only installing firmwares with signatures by default
99.9999% of users are consuming firmware updates from the LVFS or
another trusted remote. It's far too easy to get a user to enter the
password to install an untrusted firmware, where the security
consequences are pretty dire.

Provide an escape-hatch for firmware engineers, but it does mean
editing a file in /etc as root. This seems like an acceptable level of
inconvenience.
2021-10-15 15:54:44 +01:00
Richard Hughes
88592df086 rts54hub: Use demo firmware on the evaluation board for the tests
This avoids clashing with real-world devices that have the same VID/PID.
Many thanks to Ricky WU <ricky_wu@realtek.com> for all the help.

Fixes: https://github.com/fwupd/fwupd/issues/3835
2021-10-13 20:07:15 +08:00
Richard Hughes
24cc4d9d30 trivial: Set the systemd timeout to match the client proxy
The systemd default of 90 seconds is uncomfortably close to the
worst-case Redfish startup time. Give ourselves some more headroom.
2021-10-08 17:22:45 +01:00
Richard Hughes
0afe353e05 Release fwupd 1.7.0 2021-10-06 16:09:38 +01:00
Mario Limonciello
70b327c41f trivial: drop fish-completion for ignore-power 2021-10-06 14:57:05 +01:00
Richard Hughes
204da7a775 trivial: Remove one case of master that snuck in 2021-09-24 19:13:44 +01:00
Richard Hughes
494fd2736f Allow installing the LVFS remote, but disabled
This is a patch that I have to regenerate almost every rebase. Just
move it upstream as it's probably not RHEL specific.
2021-09-24 16:55:04 +01:00
Richard Hughes
90ea3453c3 trivial: Do not install the device tests when using -Dtests=false 2021-09-24 06:51:09 -05:00
Mario Limonciello
6ebccf1e1e Remove support for --ignore-power by frontends
This functionality broke a number of releases ago as part of
implementing device inhibition and was just noticed now.

Instead of fixing it, the preference seems to be to remove the
functionality as it exists today as inhibitions can happen for
a number of reasons.

To still allow people to override these power warnings (such as during
development) add a new daemon configuration item that can be used.

Fixes: #3778
2021-09-21 13:13:52 -05:00
Richard Hughes
9d37e447a1 Convert the device test script to a fwupdmgr subcommand
This allows us to do a few things:

 * Remove the runtime dep on Python 3, which is tricky for ChromeOS
 * Test composite devices more efficiently, only writing once per test
 * Automatically upload signed reports for successful device tests.
2021-09-16 15:01:36 +01:00
Ricardo Cañuelo
15a39b94ee logitech-hidpp: Add support for updating Bolt peripheral firmware
Also simplify the Instance IDs added by the Bolt hardware.
2021-09-13 11:28:55 +01:00
Richard Hughes
75eae41a86 dell-dock: Use the correct data file for the device test 2021-09-09 17:59:20 +01:00
Richard Hughes
75221f2e07 cxaudio: Use the correct data file for the device test 2021-09-09 17:59:20 +01:00
Mario Limonciello
41c00ff404 trivial: libfwupdplugin: make the self tests not overwrite source folders 2021-09-03 15:10:38 -05:00
Richard Hughes
3932a1f0d3 device-tests: Do not use a deprecated method
This also fixes the bug where you can't recover a Unifying device stuck
in bootloader mode if the 'default' protocol is not the one that matches.
2021-09-01 15:36:07 +01:00
Ricardo Cañuelo
35af30321a logitech-hidpp: Add support for updating Bolt receivers 2021-09-01 15:07:09 +01:00
Richard Hughes
c1ff02f055 trivial: Make the quirk style more consistent 2021-08-23 18:10:12 +01:00
Richard Hughes
7cfbea795c redfish: Allow starting when using RestrictAddressFamilies 2021-08-03 15:45:15 +01:00
Richard Hughes
2f9eece213 Release fwupd 1.6.2 2021-08-02 15:18:37 +01:00
Richard Hughes
19ab121f80 trivial: Write some initial release notes 2021-07-31 20:46:03 +01:00
Richard Hughes
f11abafed7 trivial: Use a valid firmware file for the ColorHug test 2021-07-30 18:53:30 +01:00
Richard Hughes
ac44c59605 Support DeviceRequest in the regression device-tests
Real hardware needs this and it was causing failures in the pre-release
regression tests.
2021-07-30 07:24:17 +01:00
Mario Limonciello
3081dea088 trivial: allow writing to /boot/grub
When running with systemd confinement writing to /boot/grub is needed.
```
fwupd[20533]: /usr/sbin/grub-mkconfig: 269: cannot create /boot/grub/grub.cfg.new: Read-only file system
fwupd[20492]: 03:12:53:0148 GLib                 posix_spawn avoided (fd close requested)
fwupd[20630]: /usr/bin/grub-editenv: error: cannot open `/boot/grub/grubenv': Read-only file system.
```
2021-07-28 17:11:39 +01:00
Richard Hughes
3747e245e5 uefi-capsule: Add support for CapsuleOnDisk
Based on a patch by Ilias Apalodimas <ilias.apalodimas@linaro.org>,
many thanks.

Fixes https://github.com/fwupd/fwupd/issues/2900
2021-07-28 17:11:39 +01:00
Mario Limonciello
84c4ae387d trivial: only use systemd env variables if /usr prefix
This helps avoid confusion of /usr/local/etc vs /etc/ when using hand
install on a system that previous had packaged install.
2021-07-28 10:25:47 -05:00
Richard Hughes
eb215753ee trivial: Add the ability to download files using PkClient for testing 2021-07-27 15:59:17 +01:00
Peter Marheine
464425fb5c SMBIOS: try reading from /sys/class/dmi if direct access fails
The raw SMBIOS tables that Linux exposes in /sys/firmware/dmi
are restricted to being readable by root only. If running as
non-root access is still permitted by fields that have been
pre-parsed by the kernel in /sys/class/dmi, most of which are
world-readable. This allows the daemon to load most HWIDs even
if running as a non-root user, as is done on Chromium OS.
2021-07-23 09:46:45 +01:00
Mario Limonciello
798d1ed3ee trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
Richard Hughes
f0bc835769 Move all the fwupdagent code to fwupdmgr
We want to provide a lot more in JSON format in the future, and this
will reduce a lot of code duplication.

As various people are using this in the wild, the existing fwupdagent
binary just shims requests to fwupdmgr as required. We'll stop doing
this for 2.0.0 or something.
2021-07-15 20:34:07 +01:00
Richard Hughes
65b3115b48 trivial: Move the builder docs to docdir
Fixes https://github.com/fwupd/fwupd/issues/3464
2021-07-09 16:40:36 +01:00
Yuan-Chen Cheng
c593ca6d4b trivial: vendor-directory typo 2021-07-03 10:17:31 +01:00
Richard Hughes
ef2c226a0c wacom-usb: Retry the legacy bluetooth version read for up to 5s 2021-06-18 14:03:54 +01:00
Mario Limonciello
04fdca165e trivial: move upower.quirk out of upower plugin
This should be used by other power plugins as well.
2021-06-18 09:12:57 +01:00
Benson Leung
d92d99d075 trivial: device-tests: Add HP USB-C Dock G5 firmware v1.0.13
Fixes #3376
2021-06-17 10:25:05 +01:00
Richard Hughes
85e3916c77 Release fwupd 1.6.1 2021-06-14 14:31:12 +01:00
Richard Hughes
3f8c3e04d0 trivial: Include the LVFS remotes for the standalone build too 2021-06-07 22:04:17 +01:00
Richard Hughes
69071e14e8 trivial: Use new 8BitDo name 2021-05-24 08:59:54 +01:00
Richard Hughes
d7ed64b536 trivial: Actually look for GNU tar for --xform support
This fixes the tests on FreeBSD.
2021-05-21 17:23:11 +01:00
Richard Hughes
2e6fee186e trivial: Fix several potential leaks when parsing remotes
This fixes several issues when calling fwupd_remote_load_from_filename()
multiple times on the same FwupdRemote.
2021-05-14 06:02:56 +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
ba890cde46 Release fwupd 1.6.0 2021-04-26 10:46:50 +01:00
John Karahalis
ae690c57b7 trivial: Update --no-reboot-check description
Update the description of the --no-reboot-check option to clarify that
this option also disables the reboot prompt.
2021-04-23 07:58:14 -05:00
Richard Hughes
e65d28d817 Add a utility to resign firmware files
This can be used like this:

    fwupdtool firmware-sign firmware.cab rhughes_signed.pem rhughes.key

Test signing certificates can be generated using the example script here:
https://github.com/hughsie/libjcat/blob/master/contrib/build-certs.py although
these certificates should not be used for enterprise use.
2021-04-19 12:59:35 +01:00
Mario Limonciello
563d24954b trivial: fix a shellcheck failure 2021-04-09 16:02:20 +01:00
Mario Limonciello
6d1afc3e87 trivial: reformat all python code with black 2021-04-08 10:43:29 -05:00
Richard Hughes
b5555003bb Detect files with CRLF line endings
Mixing Unix-style and Windows-style line endings causes some of our tools
heartache. Just standardize on the former.
2021-04-08 15:55:36 +01:00