Commit Graph

369 Commits

Author SHA1 Message Date
Richard Hughes
45a00738d8 Allow building on Windows with MinGW
Add various fixes to enable us to build a selection of useful USB plugins.
Also, skip tests that don't make sense on WIN32 or that will not work.

With much help from Mario Limonciello <mario.limonciello@dell.com> -- Thanks!
2019-12-03 16:33:43 +00:00
Francois Berder
15daf69ad9 Fix shifting integer by more than 31 in fu_util_filter_device
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-29 06:33:09 -06:00
Richard Hughes
9e5675e1b4 trivial: Allow compiling without <glib-unix.h> 2019-11-26 17:15:45 +00:00
Richard Hughes
1665837e78 Make gudev a compile-time option
This should make it nearly possible to build fwupd on FreeBSD.
2019-11-25 09:29:46 +00:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Mario Limonciello
0f109b0d97 trivial: fu-util/fu-tool: explicitly block unsupported flags
Recently had a discussion on the expected behavior of calling
`#fwupdmgr update`/`fwupdtool update` with `--allow-reinstall`
in place.

It wasn't working which was confusing to the reporter, but I
feel that flag should only be usable with `install`.  Upgrades
are for upgrades and downgrades are for downgrades.  Reinstalls are
for reinstall.
2019-11-14 11:06:11 -06:00
Mario Limonciello
eb4c76416c Add a new property Interactive to the daemon
Clients can use this as a hint whether the daemon is running on
a terminal.

`fwupdmgr` uses this to bypass the systemd service check.
2019-11-11 11:16:21 -06:00
Mario Limonciello
429a5128d3 Dynamically determine release version
This is inspired by a change in flashrom to read the version string for meson
dynamically.

No need for "post release version bump", this happens automatically from git
now by there being a dirty commit.
2019-11-08 09:52:02 -06:00
Richard Hughes
9fcd29f92e trivial: Fix fwupdmgr get-history if the firmware was not installed from the LVFS
If you install a local .cab file that's not available on the LVFS then none
of the history for any devices is available.
2019-11-01 08:16:18 -05:00
Mario Limonciello
98b951688a Use device safety flags to show prompts before installing updates 2019-10-30 11:30:36 -05:00
Mario Limonciello
0a956799ed trivial: fu-util: fix typo 2019-10-25 09:16:11 -05:00
Mario Limonciello
561751faff trivial: don't try to enable LVFS from systemd 2019-10-18 09:21:19 -05:00
Mario Limonciello
326950cd68 trivial: fu-util: break out of automatic reports if one is not automatic
Currently this is controlled by the order of remotes enumerated and might
return the wrong result with too many remotes.
2019-10-16 10:13:10 -05:00
Mario Limonciello
1d01d3bb38 Fix device flag filtering
When multiple flags were passed, they made combinations that would never
exist in the daemon causing advanced filtering to not work.
2019-10-14 12:41:09 -05:00
Mario Limonciello
8fa0b382fa Add new flags can-verify and can-verify-image
These are used to indicate that the device can verify checksums or
can dump an image for checksumming.
2019-10-14 12:41:09 -05:00
Mario Limonciello
49556a3948 trivial: make verify and verify-update safer
Don't show output for all devices - it doesn't work for most of them.

I also found that running verify on my Synaptics touchpad device puts it
into a pretty bad state until reboot.  That's of course a problem on
it's own, but at least prompting for it will prevent it from easily
happening.
2019-10-14 12:41:09 -05:00
Mario Limonciello
e202a39851 trivial: fu-util: add some extra checks around automatic reports
Avoid some extra roundtrips to the daemon if user has poked at some
files.
2019-10-13 07:34:09 +01:00
Mario Limonciello
d70260692f trivial: fu-engine: fix never reporting remotes
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):
0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
1
key ReportUri not supported
```
2019-10-07 05:36:22 -05:00
Mario Limonciello
9213c5c7bf trivial: fu-util: don't show warnings for no reports to upload
```
(fwupdmgr:5605): FuMain-WARNING **: 22:16:06.048: No reports require uploading
```
2019-10-07 05:36:22 -05:00
Mario Limonciello
d837ca8c28 fu-util: add support for a reinstall command 2019-10-03 08:16:41 -05:00
Mario Limonciello
350fc4c787 trivial: fu-util/fu-tool: update re-install help text to reinstall 2019-10-03 08:16:41 -05:00
Mario Limonciello
f59cc375ae trivial: fu-util: remove double printed message about succesful firmware update 2019-10-03 08:16:41 -05:00
Mario Limonciello
d122facc09 trivial: fu-util: show no updatable devices error for update command
This makes it mirror the behavior of `get-updates` command.
2019-10-03 08:16:41 -05:00
Mario Limonciello
2b69098d89 trivial: fu-util: output newline after prompt.
Before:
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
```

After:
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):
0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
```
2019-10-01 16:07:48 -05:00
Mario Limonciello
fac50a8eef trivial: fix %u output in report upload
Don't bother showing the numbers, they were listed right above.
2019-10-01 16:07:48 -05:00
Mario Limonciello
34c366aab2 Add support for automatically uploading reports 2019-09-30 16:21:23 -05:00
Richard Hughes
c56d2bd046 Add some success messages when CLI tasks have completed
Updating firware is sometimes scary, and for user-facing CLI tools we ought to
show some kind of reassurance than it went well.

Fixes some of https://github.com/fwupd/fwupd/issues/1409
2019-09-27 12:20:00 -05:00
Richard Hughes
bcee63a52d trivial: Put the boolean prompt on the same line as the text 2019-09-27 12:20:00 -05:00
Richard Hughes
f1accad201 Do not ask the user to upload a report if ReportURI is not set
Fixes https://github.com/fwupd/fwupd/issues/1400
2019-09-25 05:05:31 -05:00
Mario Limonciello
ce94d163f8 fu-util/fu-tool: Map out changelogs from remotes
If the data is there, try to show the changelog that matches the
release.
2019-09-20 16:02:55 -05:00
Mario Limonciello
3be596b907 fu-util/fu-tool: Better display historical information
* When firmware has been modified use the device key "Previous version"
  instead of "Current version".
* Show release as a child node when looking at history
* Don't output empty flags for release
* Use the key "New version" for releases

Sample output from `get-history`
```
├Integrated Webcam™:
│ │   Device ID:           08d460be0f1f9f128413f816022a6439e0078018
│ │   Previous version:    1.2.2
│ │   Update State:        success
│ │   Flags:               updatable
│ │   Last modified:       2019-09-20 14:53
│ │   GUID:                b585990a-003e-5270-89d5-3705a17f9a43
│ │
│ └  New version:       1.2.3
│
└Integrated Webcam™:
  │   Device ID:           08d460be0f1f9f128413f816022a6439e0078018
  │   Modified version:    1.2.2
  │   Update State:        success
  │   Flags:               updatable
  │   Last modified:       2019-09-20 14:53
  │   GUID:                b585990a-003e-5270-89d5-3705a17f9a43
  │
  └  New version:       1.2.4
```

Sample output from `get-updates`
```
Integrated Webcam™:
  │   Device ID:           08d460be0f1f9f128413f816022a6439e0078018
  │   Summary:             A fake webcam
  │   Current version:     1.2.2
  │   Previous Version:     1.2.0
  │   Bootloader Version:  0.1.2
  │   Vendor:              ACME Corp. (USB:0x046D)
  │   Flags:               updatable|supported|registered
  │   GUID:                b585990a-003e-5270-89d5-3705a17f9a43
  │
  ├FakeDevice Firmware:
  │     New version:       1.2.4
  │     Remote ID:         fwupd-tests
  │     Summary:           Firmware for the ACME Corp Integrated Webcam
  │     License:           GPL-2.0+
  │     Size:              17 bytes
  │     Vendor:            ACME Corp
  │     Flags:             is-upgrade
  │     Description:       Fixes another bug with the flux capacitor to prevent time going backwards.
  │
  └FakeDevice Firmware:
        New version:       1.2.3
        Remote ID:         fwupd-tests
        Summary:           Firmware for the ACME Corp Integrated Webcam
        License:           GPL-2.0+
        Size:              17 bytes
        Vendor:            ACME Corp
        Flags:             is-upgrade
        Description:       Fixes a bug with the flux capacitor to avoid year 2038 overflow.
```
2019-09-20 16:02:55 -05:00
Richard Hughes
0e46b22728 Allow disabling SSL strict mode for broken corporate proxies 2019-09-05 19:14:38 +01:00
Richard Hughes
c4ee883ea4 trivial: Allow ignoring the daemon version check by using --force 2019-09-05 18:13:05 +01:00
Mario Limonciello
20cc9eebc5 Try to only show DMI product name once
* libfwupd: export new property HostProduct
* clients: Use this property for setting the title of trees

Before:
```
○
├─XPS 13 7390 TPM 2.0:
│     Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
│     Summary:             Platform TPM device
│     Current version:     7.2.1.0
│     Vendor:              Dell Inc.
│     Update Error:        Updating disabled due to TPM ownership
│     Flags:               internal|require-ac|registered
└─XPS 13 7390 System Firmware:
      Device ID:           b6c08fb9e5384d9d101853cc1ca20cf0ce2df2e2
      Current version:     0.1.1.1
      Minimum Version:     0.1.1.1
      Vendor:              Dell Inc.
      Flags:               internal|updatable|require-ac|registered|needs-reboot

```

After:
```
XPS 13 7390
│
├─TPM 2.0:
│     Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
│     Summary:             Platform TPM device
│     Current version:     7.2.1.0
│     Vendor:              Dell Inc.
│     Update Error:        Updating disabled due to TPM ownership
│     Flags:               internal|require-ac|registered
└─System Firmware:
      Device ID:           b6c08fb9e5384d9d101853cc1ca20cf0ce2df2e2
      Current version:     0.1.1.1
      Minimum Version:     0.1.1.1
      Vendor:              Dell Inc.
      Flags:               internal|updatable|require-ac|registered|needs-reboot
```
2019-09-05 11:22:39 -05:00
Mario Limonciello
8e14544d37 fu-util: show release output in get-details again
This was lost in the move to tree output
```
$ fwupdmgr get-details tpm.cab
Decompressing…           [***************************************]
○
└─XPS 13 9380 TPM 2.0:
  │   Device ID:           1a433daa3acb71e6befadcf2b1a783c1549663b1
  │   Description:         Updating the system firmware improves performance.
  │
  │   Flags:               internal|updatable|require-ac|registered|needs-reboot
  │
  └─TPM 2.0 Update:
        Version:           7.2.0.2
        Summary:           Firmware for the Dell TPM 2.0
        License:           proprietary
        Size:              1.1 MB
        Vendor:            Dell Inc.
        Flags:             none
```
2019-09-05 00:09:40 -05:00
Mario Limonciello
4250d9da62 fu-util/fu-tool: Print devices, remotes, releases using a tree
This brings consistency to all fwupd output and allows stuff like
this:

```
    No upgrades for Thunderbolt controller in Dell dock, current is 43.00: 40.00=older
    No upgrades for Package level of Dell dock, current is 01.00.08.01: 01.00.04.01=older
    No upgrades for RTS5413 in Dell dock, current is 01.21: 01.21=same
    No upgrades for RTS5487 in Dell dock, current is 01.47: 01.47=same
    No upgrades for VMM5331 in Dell dock, current is 05.04.00: 05.03.10=older
    No upgrades for WD19TB, current is 01.00.00.02: 01.00.00.00=older
    ○
    └─XPS 13 9380 System Firmware:
      │   Device ID:           6c24a747f97668873b761558e322398a91dbf394
      │   Current version:     0.1.6.0
      │   Minimum Version:     0.1.6.0
      │   Vendor:              Dell Inc.
      │   Flags:               internal|updatable|require-ac|supported|registered|needs-reboot
      │
      └─XPS 13 9380 System Update:
            Version:           0.1.7.0
            Remote ID:         lvfs
            Summary:           Firmware for the Dell XPS 13 9380
            License:           proprietary
            Size:              0x1563d67
            Vendor:            Dell Inc.
            Flags:             is-upgrade
            Description:       This stable release fixes the following issues:

           Fixed the issue where the Dell Power Manager displays an error when a 130W Type-C adapter is connected to the system.

           new functionality has also been added:

           Added a new feature to automatically suspend BitLocker before upgrading the firmware. After the firmware upgrade is complete, BitLocker is automatically enabled.
```
2019-08-29 13:58:00 -05: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
1a9127d676 Make get-devices and get-topology aliases for one another
Since get-topology can now show all the details while in a topology,
just make both commands point to the same code.
2019-08-27 15:39:29 +01:00
Mario Limonciello
b76960efe0 trivial: fu-util: fix debug output for devices
I noticed this was only actually working for fwupdtool, and that's
because fwupdmgr doesn't set FWUPD_VERBOSE currently in the environment.
2019-08-27 06:08:06 -05:00
Mario Limonciello
71d2f62dc2 trivial: update references of hughsie/fwupd to fwupd/fwupd 2019-08-22 09:47:52 -05: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
Mario Limonciello
fee8f499fc Simplify get-devices output to not show un-useful fields
This prevents showing things not generally useful to most people:
Created
Modified
Icon
Plugin
FlashesLeft
2019-08-21 16:12:17 -05:00
Mario Limonciello
d2afb59b42 trivial: If no devices support updates, show messaging (Closes: #1295)
Normally the flag 'supported' is used to indicate that devices can
update from a remote such as LVFS.

Running `#fwupdmgr get-updates` in this situation will show a message
for each device that is already up to date as well as messages for
devices that have updates available.

If no devices contain the supported flag, `# fwupdmgr get-updates`
will show no output, which is confusing to some people.

Show "No updatable devices" instead for those situations.
2019-08-21 22:05:24 +01:00
Richard Hughes
747f570310 Allow filtering devices when using the command line tools 2019-08-06 20:59:28 +01:00
Richard Hughes
7565baf3c0 Never show AppStream markup on the console 2019-07-31 16:34:02 +01:00
Richard Hughes
596d593cdd Do not segfault when trying to quit the downgrade selection 2019-07-31 16:05:58 +01:00
Mario Limonciello
05c5c101ec fu-util: When unlocking prompt for reboot if applicable 2019-07-15 04:37:37 -07:00
Mario Limonciello
55d46a6f4a fu-util: Show devices with an UpdateError in get-devices output 2019-07-11 09:33:23 -07:00
Mario Limonciello
057c67a830 trivial: fu-main: clarify missing PK file error
Point people to a wiki page to explain what is happening and how to fix it.
2019-05-23 11:11:04 -05:00
Richard Hughes
d92cccaf13 trivial: Fix non-systemd build 2019-05-20 11:37:09 +01:00
Richard Hughes
3d00522dd3 Check if the system is offline during install, rather than at startup
This splits out the systemd functionality to a new file, but makes no other
logic changes.
2019-05-18 08:02:29 -07:00
Richard Hughes
54e636e96d Prompt the user to shutdown if requried when installing by ID
This matches what is done in the update-all and install cases.
2019-05-18 14:07:23 +01:00
Richard Hughes
1877e8682c trivial: Allow using --force to use the wrong daemon version 2019-05-18 14:07:05 +01:00
Mario Limonciello
81d83c416c fu-util: Check the daemon version is at least the client version 2019-05-08 10:05:31 -05:00
Mario Limonciello
88f8b7f8e1 fu-util: Check that daemon is started by expected unit
Unexpected behaviors can happen if:
* a snapped daemon is running with a packaged frontend
* a packaged daemon is running with a snapped frontend

This should make sure that if the snap is installed on top of a
packaged frontend that people don't try to mix and match as much.
2019-05-08 10:05:31 -05:00
Richard Hughes
acfa4ef012 Display the remote warning on the console in an easy-to-read way
The lines are almost impossible to read as they are not wrapped and not
delimited from the normal script output. Add a box around to make them stand out:

    ╔══════════════════════════════════════════════════════════════════════════════╗
    ║ The LVFS is a free service that operates as an independent legal entity and  ║
    ║ has no connection with Fedora. Your distributor may not have verified any    ║
    ║ of the firmware updates for compatibility with your system or connected      ║
    ║ devices. All firmware is provided only by the original equipment             ║
    ║ manufacturer.                                                                ║
    ║                                                                              ║
    ║ Enabling this functionality is done at your own risk, which means you have   ║
    ║ to contact your original equipment manufacturer regarding any problems       ║
    ║ caused by these updates. Only problems with the update process itself        ║
    ║ should be filed at https://bugzilla.redhat.com/.                             ║
    ║                                                                              ║
    ╚══════════════════════════════════════════════════════════════════════════════╝

    Agree and enable the remote? [Y|n]:
2019-05-01 14:03:11 +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
Richard Hughes
dce91204c9 Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
Richard Hughes
02ac92c17c Add a component categories to express the firmware type
Some firmwares only update one part of the system, e.g. the EC or ME firmware.
Other updates include all the updates needed for the whole system, and vendors
have been doing different things with the component name due to this.

To fix, add an enumerated set of firmware 'categories' that can be set by the
uploader in the metainfo.xml file (or changed the LVFS) which automatically
set the name suffix.

Only append the translated version in the client when <categories> has
not been set, as the LVFS is still operating in compatibility mode and setting
the <name> with the prefix. Add the support to fwupd now so we can switch in
about 9 months time.
2019-04-04 17:35:02 -04:00
Richard Hughes
7eb1e92837 trivial: Use plural form for an ambiguous translatable string
In pt_BR there are plural form of both words firmware and approved.
2019-03-27 09:30:56 +00:00
Richard Hughes
0cbd149b7a Show the DeviceID when showing the updates list
This allows us to only update the device we want on the command line, rather
than having to run 'fwupdmgr get-devices' to get the specific ID.
2019-03-24 12:33:43 +00:00
Richard Hughes
026d642e2b trivial: Automatically use the OFFLINE flag for devices that require it
We use the same flow for UEFI updates, and this allows it to just work...
2019-03-24 12:33:43 +00:00
Richard Hughes
809abea834 Ask to reboot after scheduling an offline firmware update 2019-03-23 11:14:44 +00:00
Richard Hughes
4ffc14f6ea Allow signing the fwupd report with the client certificate 2019-03-11 13:57:39 +00:00
Richard Hughes
2eee2582fd trivial: Fix several NULL/FALSE return mistakes 2019-03-11 13:17:55 +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
8dd4c1c4dd Allow restricting firmware updates for enterprise use 2019-03-05 19:05:07 +00:00
Richard Hughes
e1f44372ce trivial: Show the release flags when doing fwupdmgr get-releases 2019-03-04 15:11:36 +00:00
Richard Hughes
7120667ccd trivial: Move getting the SoupSession to common code 2019-03-01 10:07:50 -06:00
Richard Hughes
c77e111449 trivial: Move command line handling into common code
I'm about to use this a third time, so now is the time to refactor.
2019-03-01 10:07:50 -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
9b31e6f33a fu-progressbar: be more quiet when running non-interactive
If fwupdmgr or fwupdtool are scripted all the erasing of lines and
progressbars are much less useful.
2019-01-31 22:40:50 +00:00
Mario Limonciello
32241f4256 Add support for an UpdateMessage and display it in tools
The idea is that if the user should know something about the device update
"after" it's succesfully completed then the plugin can set `UpdateMessage`
for the device and a client can show it.

An example would be a device that doesn't reboot on its own and the user
needs to power cycle it manually.
2019-01-29 13:59:07 -06:00
Mario Limonciello
4f24d0bae3 When using directory remote type automatically generate metadata
The CAB files will be parsed upon `fwupd`/`fwupdtool` startup and
loaded into the daemon.
2019-01-29 09:21:54 -06:00
Mario Limonciello
706ab43898 libfwupd: Add support for new remote type "directory"
This remote will be used for automatically building metadata based
on files in a directory.
2019-01-29 09:21:54 -06:00
Mario Limonciello
3f243a9e9e fu-util/fu-tool: sync up reboot and shutdown behavior
It's currently a hodge podge of commands that can install files not
always invoking a reboot or shutdown.

Move the actual code into `fu-util-common.c` and make sure that all
`install` and `update` functions call it now.
2019-01-22 21:06:08 +00:00
Richard Hughes
f425d29a28 Show a console warning if loading an out-of-tree plugin
Fixes https://github.com/hughsie/fwupd/issues/950
2019-01-19 07:26:20 +00:00
Richard Hughes
f803964e37 Add _NEEDS_SHUTDOWN flag for devices
Some devices require the system to be powered down and back up, rather than
just being "warm" rebooted.
2019-01-17 16:35:34 +00:00
Richard Hughes
6e0c8f8742 Add per-release install duration values
These are set from the AppStream metadata and are specific to the firmware
release.

If not provided, the install duration falls back to the per-device duration
values which can be set in the quirk files.
2018-11-12 14:18:28 +00:00
Richard Hughes
ab8849aee1 Use HTTPS_PROXY if set
Apparently, most application support both the lower and upper case versions...

Fixes https://github.com/hughsie/fwupd/issues/815
2018-10-24 13:16:27 +01: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
481aa2a923 Port from libappstream-glib to libxmlb
The libxmlb library is much faster to query, and does not require the daemon
to parse the XML metadata at startup. It's a zero-copy mmap design that is more
modern and less clunky.

RSS has reduced from 3Mb (peak 3.61Mb) to 1Mb (peak 1.07Mb) and the startup
time has gone from 280ms to 250ms.
2018-10-17 14:41:13 +01:00
Richard Hughes
05cbb7245c Don't use AppStream-glib for version helpers
Refactor the imported version format code now we now longer need to stick to
the API mistakes of libappstream-glib.
2018-10-11 07:54:01 +01:00
Mario Limonciello
91353d48bd Stop showing the current release during updates in fwupdmgr
With handling composite CAB files this information isn't relayed to the
frontend on which release is being handled, but was rather guessed.

Avoid showing invalid information in this instance.
2018-10-10 11:24:27 -05:00
Mario Limonciello
2d4b7a5826 trivial: fu-util/fu-tool: Move --version into a common shared function
This is mostly for usage with the flatpak so it's easy to tell what
version of the flatpak is installed.
2018-09-14 18:22:38 +01:00
Richard Hughes
b08e7bc7aa trivial: Set a log domain for each file
This allows us to do something like:

G_MESSAGES_DEBUG=FuEngine ./src/fwupd
2018-09-11 18:59:05 +01:00
Richard Hughes
1d894f13cc trivial: Move the hwids debug functionality to fwupdtool 2018-08-31 16:39:09 +01:00
Richard Hughes
c440da9494 trivial: Allow running 'fwupdmgr hwids' with an optional DMI file 2018-08-31 16:39:09 +01:00
Richard Hughes
5b281e6f5e trivial: Make the 'Computer Information' match ComputerHardwareIds.exe
The BIOS release is specified in base 16, but seemingly displayed in base 10.
It's hashed with the former, so no HwIds need to change.
2018-08-31 16:39:09 +01:00
Richard Hughes
3d178befb1 Download firmware if the user specifies a URI 2018-08-31 06:07:46 +01:00
Richard Hughes
798cb062bf trivial: Refactor out functionality to get a user cachedir filename 2018-08-30 17:29:52 +01:00
Richard Hughes
898fc80fde Allow updating just one specific device from the command line 2018-08-21 12:21:50 +01:00
Mario Limonciello
f00ca2a8e0 fu-util: When processing "install" command don't try to show current_release
The frontend was never notified of the release (and didn't parse the CAB) so
it doesn't know at this time what the version of the release is and
so this shows a NULL assertion at the time.
2018-08-21 10:06:27 +01:00
Mario Limonciello
f78f66d479 trivial: Also show device title for 'install' command in fwupdmgr
Commit 171ec0d added support for 'update' and 'downgrade' operations
in fwupdmgr.  Since users can also install CAB files manually
show the titles for those too.
2018-08-13 10:03:49 +01:00
Richard Hughes
171ec0dd95 Show the correct title when updating multiple devices with one file
Multiple devices can be updated from one cabinet archive, and it would be quite
confusing just to print the first device title and then have the progressbar go
from 0..100 multiple times.

Use the existing device-changed signal to set the 'current device' and print a
new header if the device changes during the install phase.
2018-08-10 14:50:43 +01:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Mario Limonciello
ece90a4879 trivial: fu-util/fu-tool: Output a new line between devices for get-details
With composite CAB files it's difficult to see between devices when packed:
  Homepage:             http://support.dell.com/
  Vendor:               Dell Inc.
  TrustFlags:           none
Unknown Device
  Guid:                 558d18fa-5530-5fc8-9e4b-de3ee8a5eca7
  Homepage:             http://support.dell.com/
  Vendor:               Dell Inc.
  TrustFlags:           none
Unknown Device
2018-08-06 11:05:52 +01:00
Richard Hughes
a6b1d8d19c Don't potentially expose user passwords for remotes
Inspired by a patch by Mario Limonciello, many thanks.
2018-08-06 06:21:29 +01:00
Mario Limonciello
d1775bc026 uefi: Populate UpdateError with reasons that the plugin won't run
Previously if missing secure boot binaries, or invalid ESP was created the
plugin would just not load.

Now instead populate UpdateError and remove the updateble flag, but still show
the device in fwupdmgr and fwupdtool.
2018-07-17 14:30:27 +01:00