Commit Graph

51 Commits

Author SHA1 Message Date
Richard Hughes
85226fd9d1 Remove potentially problematic language
Red Hat wants to drive an initiative in correcting problematic and potentially
divisive language in open source projects. These naming conventions and
descriptive phrases are hurtful and offensive to many of our colleagues across
the open source universe.

See https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language
2020-06-30 17:31:17 +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
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
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
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
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
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
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
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
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
d837ca8c28 fu-util: add support for a reinstall command 2019-10-03 08:16:41 -05:00
Richard Hughes
fbff921b35 Allow disabling all plugins
This allows us to easily build just libfwupd in a flatpak manifest without
installing dozens of deps to build things we're just going to delete anyway.
2019-09-13 10:27:57 +01:00
Richard Hughes
0e46b22728 Allow disabling SSL strict mode for broken corporate proxies 2019-09-05 19:14:38 +01:00
Mario Limonciello
dfff18e3e8 Add aliases for get-upgrades and upgrade
Mostly for consistency purpose.  Details:
* It's confusing that internally the functions for `FwupdClient` use
`upgrade` in the name.
* The logical antonym of `downgrade` is `upgrade` not `update`
* People who don't use the tool frequently may try `get-upgrades`
2019-08-29 19:14:55 +01:00
Mario Limonciello
b390b14f8f Add support to integrate into the motd (Fixes: #1270)
Fixes Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921820

Introduce a new --log option to fwupdmgr that will log stdout to an argument.
If run under systemd, prefix that argument with $RUNTIME_DIRECTORY.

Add a new systemd unit and associated timer to regularly refresh metadata.
After the metadata refresh is complete, save the output to the motd location.

The timer and service are disabled by default and can be enabled by an admin.
2019-08-22 06:39:02 +01:00
Richard Hughes
747f570310 Allow filtering devices when using the command line tools 2019-08-06 20:59:28 +01:00
Mario Limonciello
bfcf75b7a6 Allow fwupdmgr to modify the daemon config
This allows several things, for instance:

 * Adding or removing blacklisted plugins or devices
 * Changing the idle timeout where allowed

...without a user needing to manually modify a configuration file.
2019-04-17 12:12:13 -04:00
Mario Limonciello
fe593944a9 fu-tool: Port get-history command to fwupdtool 2019-04-03 14:37:25 -05:00
Richard Hughes
1568449e69 Add a verify-update command to fwupdtool
This is useful for debugging to just read the checksum from the device.
2019-03-18 10:08:58 +00:00
Richard Hughes
4ffc14f6ea Allow signing the fwupd report with the client certificate 2019-03-11 13:57:39 +00:00
Richard Hughes
3d60762bed Add a D-Bus method to generate a signature using the self-signed client certificate 2019-03-11 13:57:39 +00:00
Richard Hughes
4499d19ba3 Move out the offline update functionality to a new binary
The offline updates environment is special, and we have to be careful to delete
the trigger before doing anything that can fail to avoid boot loops.

For this reason, split it out to a simple self-contained binary that is easy to
understand.
2019-03-08 09:45:30 -06:00
Richard Hughes
5806867ebe Add the fwupdagent binary for use in shell scripts
This currently just outputs the current list of devices with releases and makes
it possible to integrate firmware version reporting with other tools like mgmt.
2019-03-06 13:15:55 +00:00
Richard Hughes
8dd4c1c4dd Allow restricting firmware updates for enterprise use 2019-03-05 19:05:07 +00:00
Mario Limonciello
3143bad0f5 fu-tool: Save device state to @LOCALSTATEDIR@/lib/fwupd/state.json on actions
This feature is turned on with the new fwupdtool option `--enable-json-state`

The intended use case is for ChromeOS to be able to save information about
devices on the system when `fwupdtool update` was run to display in the UX at
a later time.
2019-02-28 10:32:45 -06:00
Mario Limonciello
96a0dd5606 Add a support for delayed activation
This is intended for devices that it is not safe to immediately activate
the firmware.  It may be called at a more convenient time instead.

Both fwupdmgr and fwupdtool support the feature.

- if called at runtime with fwupdmgr it uses the daemon
- during shutdown fwupdtool uses the pending.db to perform this feature.
2019-02-27 09:04:54 +00:00
Mario Limonciello
53ce25d985 Add support to call composite prepare and cleanup using fwupdtool
Two new arguments added to fwupdtool: `--prepare` and `--cleanup`

They are used only with the `install-blob` command

This makes sure that devices can get rebooted in dell-dock even if using
fwupdtool to install a single blob.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-02-01 16:39:08 +00:00
Mario Limonciello
1e35e4c22d fu-tool: Port the get-updates command over
Now that there is actually support to load non-static information
(at least from fwupd perspective) it makes sense to support this
command in both tools.
2019-01-29 09:21:54 -06:00
Mario Limonciello
46aaee8cec fu-tool: Add support for an 'update' command to fwupdtool
This will perform updates with all currently present metadata.

It is "intended" for usage with local metadata repositories referring
to local files.

fwupdtool however does also support fetching a file from the web
and if the metadata refers to the file on the web it should also work
for that.
2019-01-11 12:59:00 +00:00
Mario Limonciello
62f8486ffe fwupdmgr/fwupdtool: Move monitor command to fwupdtool
This command is used for monitoring events from the daemon and normally
used only by power users or developers.
2018-10-18 19:36:59 +01:00
Mario Limonciello
f6d01b16de fwupdmgr/fwupdtool: Move firmware builder from fwupdmgr to fwupdtool
This command is really a power user command and should live in
fwupdtool with similar debugging and development features.
2018-10-18 19:36:59 +01:00
Richard Hughes
1d894f13cc trivial: Move the hwids debug functionality to fwupdtool 2018-08-31 16:39:09 +01:00
Mario Limonciello
02c738830d trivial: Don't install bash-completion for fwupdmgr in no daemon build 2018-05-30 13:44:17 -05:00
Mario Limonciello
716ab27c17 Add get-details command to fwupdtool 2018-05-29 13:35:44 -05:00
Mario Limonciello
b900c09ced trivial: add bash completion for get-plugins 2018-05-22 16:03:14 -05:00
Richard Hughes
c02ee4da46 Allow whitelisting plugins in fwupdtool
When developing code it's really convenient to only run the new plugin. This
means you don't have to wait for the other hardware to initialize and there
are no side-effects from other plugins when installing firmware.

You can specify multiple plugins as globs, for instance:

    fwupdtool get-devices \
        --plugin-whitelist wacom \
        --plugin-whitelist "thunderbolt*"
2018-05-22 16:03:14 -05:00
Mario Limonciello
e0294c77d6 trivial: Drop removed smbios-dump command for fwupdmgr bash completion 2018-05-22 05:44:52 +01:00
Mario Limonciello
e7d6cdc843 trivial: Add bash completion for fwupdtool 2018-05-22 05:44:52 +01:00
Richard Hughes
76e0f94c86 Allow the client tools to avoid writing the history database 2018-05-14 18:54:15 +01:00
Mario Limonciello
78956cc9ff fwupdmgr: Hide devices that aren't updatable by default
They are hidden from get-devices, get-updates, and get-topology
They can be viewed by adding '--show-all-devices' to command line
2018-05-07 14:08:39 -05:00
Richard Hughes
42728c4d5e Add 'fwupdmgr get-topology' to show logical device tree 2018-05-03 08:07:04 +01:00
Mario Limonciello
f6949b4911 Look up bash-completion paths using pkg-config 2018-05-01 16:21:31 -05:00
Richard Hughes
9e7d69ccb1 Show a warning with interactive prompt when enabling a remote 2018-04-12 08:17:08 +01:00
Richard Hughes
dfd228a132 Add enable-remote and disable-remote commands to fwupdmgr
This makes it easier to enable the LVFS on distributions where it is disabled
by default.
2018-04-12 08:17:08 +01:00
Mario Limonciello
c8d15f924c Show device description when bash completing an argument 2018-03-01 09:27:29 -06:00