Commit Graph

309 Commits

Author SHA1 Message Date
Mario Limonciello
4fa95a7b51 Add a new daemon configuration option to control EnumerateAllDevices
For plugins that are configured to only enumerate devices supported
by metadata this will allow showing them in all contexts

Fixes: #1877
2020-03-31 13:05:57 -05:00
Filipe Laíns
674478d4b8 bash: add completion for fwupdtool reinstall
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-03-31 10:46:40 +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
exploide
b3c8bc4010 trivial: update command consumes device ids in fish shell completion 2020-03-17 19:12:00 +00:00
Richard Hughes
bca63edccf Add 'firmware-convert' subcommand to fwupdtool
This is a useful function that allows us to use all the fwupdplugin loaders.
2020-03-09 21:12:01 +00:00
Mario Limonciello
789d308f79 trivial: only install bash-completion for fwupdmgr if compiled with agent
`fwupdmgr`'s bash completion now uses `fwupdagent` for at least one command.
2020-03-06 18:42:00 +00:00
Mario Limonciello
b87d48a042 When TPM PCR0 measurements fail, query if secure boot is available and enabled
If the measurements are missing but it's a UEFI system, it's a good indication
that the user has secure boot turned off.
Notify the user on the UEFI device through a non-fatal `UpdateMessage`

To accomplish this, move fu-uefi-vars into the plugin library for other plugins to use
2020-03-05 07:54:15 -06:00
Dennis Kadioglu
d9597df863 fix fwupd.shutdown.in according to the movement of fwupdtool to bindir 2020-03-05 07:09:25 -06:00
Mario Limonciello
428ed8a0b2 trivial: Fix bash completion
`get-devices` and `get-remotes` output changed in the past.
It would be ideal to use `jq` instead, but it's not available by
default in most distros.
2020-03-04 08:03:19 -06:00
exploide
dfd7870697 improved fish shell completion 2020-03-03 13:01:50 -06:00
exploide
c33fbb5002 added completion script for fish shell 2020-02-29 16:31:50 +00:00
Richard Hughes
ffa9e6ce25 Release fwupd 1.3.8 2020-02-13 14:30:35 +00:00
Richard Hughes
4f28afb6e7 trivial: Only install the udev rules file if GUdev is enabled 2020-02-05 09:54:12 +00:00
Mario Limonciello
9dce1f7011 Detect kernel lockdown status
Disable superio when kernel lockdown in effect.
2020-02-04 10:08:25 -06:00
Mario Limonciello
5d8c244b2e trivial: correct a fwupd-refresh.service filling error 2020-02-02 11:27:20 +00:00
Richard Hughes
ca3cdaef43 Release fwupd 1.3.7 2020-01-31 13:13:57 +00:00
Richard Hughes
4959baa65b Add 'refresh' to fwupdtool
This actually makes 'get-updates' do something useful when using the flatpak.
2020-01-17 16:33:07 +00:00
Richard Hughes
fd7e994971 Add 'get-remotes' to fwupdtool 2020-01-17 16:33:07 +00:00
Mario Limonciello
315fd4dee9 trivial: motd: correct the systemd path to include package name 2020-01-16 21:00:47 -06:00
Mario Limonciello
4fdbb118a4 trivial: correct systemd motd directory variable
fixes the blank variable in systemd unit
2020-01-16 20:50:13 -06:00
Richard Hughes
56d0d51e00 trivial: Actually install daemon.conf for the standalone build too
The name is a bit of a misnomer, it really affects anything that loads FuEngine.
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
0e830d9c10 trivial: Fix typo in fwupdtool bash completion command name 2020-01-14 12:25:41 +00:00
Richard Hughes
3c314e3b83 Allow getting the list of updates in JSON format from fwupdagent 2020-01-14 12:25:41 +00:00
Richard Hughes
af14073522 Allow applying all releases to get to a target version
Some hardware does not handle upgrading from version 1.2.2 to 1.2.4 and instead
needs to be upgraded from 1.2.2->1.2.3->1.2.4 so that on-device metadata can be
migrated correctly.

Add a new per-device flag `install-all-releases` which causes the daemon to not
skip directly to the newest release. This is designed to be set from a quirk
file.

This can obviously only be used for devices that can apply firmware "live" and
thus do not need a reboot or system shutdown to actually apply the firmware.
This also needs the cabinet archive to ship multiple versions of the firmware,
and for the metainfo.xml file to refer to multiple release objects.
2020-01-07 15:33:12 +00:00
Richard Hughes
1ac566bc09 Release fwupd 1.3.6 2019-12-30 09:19:41 +00:00
Mario Limonciello
62b8336383 trivial: fu-remotes-list: drop usage of FU_SELF_TEST_REMOTES_DIR
Instead use `CONFIGURATION_DIRECTORY`, which already supported by
`fu-common`.
2019-12-12 13:23:13 -06:00
Richard Hughes
297d1598ef trivial: Only dlopen the test plugin once
This causes problems in the self tests when not lazy-loading symbols.

Also use g_build_filename() for the paths to be more portable and readable.
2019-12-01 20:59:19 +00:00
Mario Limonciello
19d948ea39 trivial: installed-tests: try to display journal for failed tests
This should help make debugging from CI infrastructures such as
autopkgtest easier.
2019-12-01 06:23:27 -06:00
Mario Limonciello
708f490075 trivial: installed-tests: explicitly choose webcam device ID
In some CI infrastructures other devices show up and so the webcam
is not automatically picked.

```
Enabling fwupd-tests remote...
Successfully enabled remote
Update the device hash database...
Choose a device:
0.	Cancel
1.	08d460be0f1f9f128413f816022a6439e0078018 (Integrated Webcam™)
2.	bbbf1ce3d1cf15550c3760b354592040292415bb (Virtio network device)
Request canceled
FAIL: fwupd/fwupdmgr.test (Child process exited with code 2)
SUMMARY: total=1; passed=0; skipped=0; failed=1; user=0.0s; system=0.0s; maxrss=11736
FAIL: fwupd/fwupdmgr.test (Child process exited with code 2)
autopkgtest [22:09:32]: test ci: -----------------------]
ci                   FAIL non-zero exit status 2
autopkgtest [22:09:33]: test ci:  - - - - - - - - - - results - - - - - - - - - -
autopkgtest [22:09:33]: @@@@@@@@@@@@@@@@@@@@ summary
ci                   FAIL non-zero exit status 2
```
2019-12-01 06:23:27 -06:00
Richard Hughes
713d20f79f Release fwupd 1.3.5 2019-11-29 12:56:50 +00:00
Leo
6640b571bf Fix shebangs on scripts 2019-11-24 18:51:56 -06:00
Richard Hughes
342a38b432 Release fwupd 1.3.4 2019-11-22 16:00:40 +00:00
Ken VanDine
d5988a5339 Allows confined snaps to activate fwupd via D-Bus 2019-11-12 12:40:08 -06:00
Mario Limonciello
5123d4333e Rename unifying plugin to logitech-hidpp (Fixes: #1329) 2019-11-04 13:35:36 -06:00
Richard Hughes
f6526ddb63 Release fwupd 1.3.3 2019-11-01 15:06:16 +00:00
Richard Hughes
02792c0ba3 trivial: Fix up some typos from codespell 2019-11-01 14:21:20 +00:00
Mario Limonciello
98b951688a Use device safety flags to show prompts before installing updates 2019-10-30 11:30:36 -05:00
Richard Hughes
a58510b246 Allow verifying the device image itself from fwupdtool
To debug flashing failures it's sometimes requried to get a SPI dump of the
hardware to analysis.

Add a debug-only command that lets us dump the device from the engine.
2019-10-30 13:55:55 +00:00
Richard Hughes
51a869a01d Use XMLb to query quirks
During startup we do 1898 persistent allocations to load the quirk files, which
equates to ~90kb of RSS. Use libxmlb to create a mmap'able store we can query
with XPath queries at runtime.
2019-10-30 08:29:58 -05:00
Richard Hughes
95c98a95b6 Allow fwupdtool to dump details of common firmware formats
To do this, the plugins have to register the GType(s) they are using for
firmware, along with a short 'id' that can be used in CLI scripts.
2019-10-22 12:36:15 -05:00
Mario Limonciello
0b9bfec150 Add a systemd preset file for fwupd-refresh.service
Makes `fwupd-refresh.service` strictly opt-in.

Some distros are defaulting to all systemd services on and causing
more refreshes than desirable by default, especially when using
both `gnome-software` and `fwupd-refresh.service`
2019-10-20 14:31:13 -05:00
Mario Limonciello
561751faff trivial: don't try to enable LVFS from systemd 2019-10-18 09:21:19 -05:00
Mario Limonciello
80d6581be8 trivial: fwupd-refresh: activate motd if using systemd v243 or later
It turns out there is some bug in systemd v242 or less that runtime
directories can't be used.  So only populate motd when we know that
we have a newer systemd
2019-10-15 15:56:33 -05:00
Mario Limonciello
2a4fa179ff trivial: fwupd-refresh: allow exit code 2 for success
This is no supported devices, and shouldn't cause systemd failures
for fwupd-refresh.
2019-10-15 15:56:33 -05:00
Richard Hughes
c0695320c8 Add a generic DFU firmware object for plugins to use 2019-10-11 13:19:46 +01:00
Mario Limonciello
d837ca8c28 fu-util: add support for a reinstall command 2019-10-03 08:16:41 -05:00
Mario Limonciello
34c366aab2 Add support for automatically uploading reports 2019-09-30 16:21:23 -05:00
Mario Limonciello
4f13bbc7e3 trivial: motd: disable updating motd for now
It looks like a systemd bug is happening, but let it be diagnosed upstream
systemd first.

https://github.com/systemd/systemd/issues/13688
2019-09-30 14:09:18 -05:00
Mario Limonciello
dc7e7c3808 trivial: fwupd-refresh: fix a clash with fwupd.service (Closes: #941360)
`fwupd-refresh.service` uses `DynamicUser=true` which causes systemd
to make `/var/cache/fwupd` a symlink to `/var/cache/private/fwupd`.

Individual units aren't allowed to access this directory, only the ones
with the directive.  This means that `fwupd.service` stops working as
soon as a user tries to start `fwupd-refresh.service`.

The bug details are present in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941360
2019-09-30 14:09:18 -05:00