Commit Graph

328 Commits

Author SHA1 Message Date
Richard Hughes
9bc9debd98 Allow uploading security attributes to the LVFS
We sign the data with the client cert to allow users with LVFS accounts to
publish 'official' HSI ratings.
2020-05-21 11:48:09 +01:00
Richard Hughes
196c6c69db Add support for the Host Security ID
The HSI specification assigns a simple text ID to the current state of firmware
security. As new vulnerabilities are found, and as protection measures are
updated, new requirements will be added to the required firmware behaviours for
each HSI value.

The HSI specification is currently incomplete and in active development, and
so the --force flag is required in all command line tools. The current ID value
will probably change on a given platform so please do not start using the result
for any kind of compliance requirements.
2020-05-11 22:11:49 +01:00
Mario Limonciello
3838b22a7c trivial: add missing changelog entry for 1.3.9
This release came out after 1_3_X branched but long before 1.40 release
so these entries are confusing to be missing.
Fixes: #2059
2020-05-05 13:14:22 -05:00
Richard Hughes
86f6324a26 Switch the default of EnumerateAllDevices to false
This was causing dozens of regressions to be reported.
2020-05-03 06:47:40 +01:00
Richard Hughes
ad113b931f Release fwupd 1.4.1 2020-04-27 11:05:41 +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
Jan Tojnar
0f035013df build: Install bash-completion relative to datadir
Since bash-completion 2.9, it was no longer possible to override
the completionsdir through prefix. [1] In 2.10, the overridability
was re-estabilished but this time through datadir variable. [2]

This should not really matter except for developers installing the project
into a custom prefix or distros using per-package prefixes like NixOS.

[1]: 81ba2c7e7d
[2]: https://github.com/scop/bash-completion/pull/344
2020-04-16 12:45:19 -05:00
Mario Limonciello
c727742df3 trivial: remove references to hardware.py (Fixes: #2007) 2020-04-15 20:27:21 -05:00
Jan Tojnar
2f12e38e61 build: Re-use installed tests directory
It will make it easier for downstreams to patch the path.
2020-04-15 20:16:46 +01:00
Richard Hughes
a3d6ee0e29 Release fwupd 1.4.0 2020-04-14 10:27:32 +01:00
Richard Hughes
b47d347823 trivial: Add some more self tests 2020-04-09 16:55:17 +01:00
Richard Hughes
0e8ee75890 trivial: Add some more device regression tests 2020-04-09 09:55:30 +01:00
Richard Hughes
d668225685 trivial: Allow filtering the device-test by the protocol
This allows us to run the device tests with all 4 supported types of unifying
dongles plugged in at the same time.
2020-04-09 09:07:13 +01:00
Richard Hughes
b452c752aa trivial: Add some more device regression tests 2020-04-08 16:52:22 +01:00
Richard Hughes
854e6f6362 Add some more device regression tests 2020-04-08 13:55:39 +01:00
Richard Hughes
372565aef8 trivial: Show what device test is being run right now 2020-04-08 13:55:39 +01:00
Richard Hughes
f3966c784d Modularize the hardware tests 2020-04-07 16:09:47 +01:00
Ross Burton
d783c3a531 Install the installed-tests only if tests are enabled
The README says: "A test suite that can be used to interact with a fake device is installed when configured with `-Ddaemon=true` and `-Dtests=true`", so actually only install these tests when tests are enabled.
2020-04-06 12:16:52 -05:00
Paul Menzel
bf1b876e56 data/motd/fwupd-refresh: Only order after network.target
From [Lennart’s answer on systemd-devel][1]:

> fwupd.target should not list the various network management solutions,
> that is unnecessary, and ordering after network.target should be
> sufficient to achieve the same, in a generic fashion. i.e. network
> managers should order themselves before network.target, so that
> ordering yourself after that automatically orders you after all
> implementations at once...

So, remove the unneeded targets. As the service unit is not
installed/enabled, and instead called by a timer, the system will most
probably be online already.

[1]: https://lists.freedesktop.org/archives/systemd-devel/2020-March/044205.html
     "Best practices for starting unit only if network is online"
2020-04-01 13:14:41 -05:00
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