Commit Graph

1767 Commits

Author SHA1 Message Date
Richard Hughes
2db7528b13 trivial: Mark the remotes as config files in the rpm spec example
If a user disables the reporting URI, we don't want to re-enable it
accidentally when upgrading fwupd.
2018-01-12 14:23:08 +00:00
Mario Limonciello
a66ad15855 Fix UX capsule reference to the one in efivar
The work for this landed in what will turn into efivar 33.

Later down the road when efivar 33 is in most the major distros
this can be removed and a requirement set for efivar 33.
2018-01-12 09:08:18 +00:00
Richard Hughes
0d2320735d Nag the user to upload reports when doing common operations
This is supposed to be a gentle nag, rather than being obnoxious. To disable
this, simply remove the ReportURI key from the relevant remote.
2018-01-11 21:31:29 +00:00
Richard Hughes
0a7bc97317 Add a 'report-history' command to fwupdmgr
This shares your history with a reporting server, typically the LVFS.

NOTE: no data is sent without the user opting-in, and the data sent is shown to
the user before upload.
2018-01-11 21:31:29 +00:00
Richard Hughes
b58104895d trivial: Add fwupd_build_history_report_json() for future use 2018-01-11 21:28:22 +00:00
Richard Hughes
80b79bb9aa trivial: Allow plugins to add metadata to the uploaded reports 2018-01-11 21:28:22 +00:00
Richard Hughes
473c520e38 Add in extra metadata to the uploaded reports
Save the dependency versions, architecture and the kernel versions in the
history database as metadata as it may be different to the time of upload.
2018-01-11 21:28:22 +00:00
Richard Hughes
38c59fcf4a Allow saving extra metadata in the history database
This will be used to store things like the kernel version in the future, and
also means we can stop abusing the vendor property for the fwupd version.
2018-01-11 21:27:44 +00:00
Richard Hughes
d0adb23968 Allow adding metadata to the FwupdRelease 2018-01-11 20:52:58 +00:00
Richard Hughes
e09dbd4ce1 trivial: Do not save flags with daemon state in the history database 2018-01-11 20:20:03 +00:00
Richard Hughes
d29df0819f Allow specifying the reporting server in the remote key files 2018-01-11 20:20:00 +00:00
Richard Hughes
611f1a9cbf Set the remote-id on devices returned by GetHistory 2018-01-11 20:19:41 +00:00
Richard Hughes
3eb2a00d10 trivial: Fix up the version check for offline firmware reporting 2018-01-11 20:19:16 +00:00
Richard Hughes
ae142a411f trivial: Parse the os-release file in a more useful way
This allows us to use the other keys for future use.
2018-01-11 10:30:39 +00:00
Richard Hughes
6b22295cf0 Add a D-Bus method to modify a historical device
This allows us to set specific flags on the device stored in the database.
2018-01-11 10:20:48 +00:00
Richard Hughes
d0d2c8b84e trivial: Add FWUPD_DEVICE_FLAG_REPORTED
This flag is present in the history database when a report has been uploaded.
2018-01-11 10:18:37 +00:00
Richard Hughes
a2f8e45c0f trivial: Set the update state for any updates that need a reboot
This has to be done at each engine startup, as this will happen on the *next*
OS boot.
2018-01-11 10:11:17 +00:00
Richard Hughes
476363ac19 Add a D-Bus method to get the history information 2018-01-11 10:08:58 +00:00
Richard Hughes
af54a0778a trivial: Add a 'clear-history' command to fwupdmgr
This needs to be run as the root user to work.
2018-01-11 10:04:50 +00:00
Richard Hughes
bc3a4e1f57 Store firmware update success and failure to a local database
Rename FuPending to FuHistory to better represent what the object is now doing.
Also, while we're here, switch to using SQLite prepared statements to avoid a
possible invalid read on i386 hardware.
2018-01-11 09:59:34 +00:00
Richard Hughes
b73e70b205 trivial: Use the shared fu_test_compare_lines() in the dfu plugin 2018-01-11 09:59:34 +00:00
Richard Hughes
9c808e838e trivial: Add fu_test_compare_lines()
This is for future use.
2018-01-11 08:17:02 +00:00
Richard Hughes
f1ed711c7e trivial: Add fwupd_build_machine_id()
This allows us to identify a specific machine using the machine-id.
2018-01-11 08:16:55 +00:00
Richard Hughes
3e90a58096 trivial: Do not hardcode the update state in fu_pending_add_device() 2018-01-11 08:16:33 +00:00
Richard Hughes
696e6fdcf3 trivial: Don't allow deleting the pending database
If we're going to use this for history we have to be a little more subtle.
2018-01-11 08:16:25 +00:00
Richard Hughes
718be2de6b trivial: Prefer https_proxy for metadata downloads 2018-01-11 08:16:18 +00:00
Richard Hughes
74fa2ca635 Fix firmware downloading using gnome-software compiled against fwupd 1.0.x
Always set the AppStream app properties on the FwupdRelease. In some cases we
were returning FwupdRelease objects with no name or summary which gnome-software
was ignoring.
2018-01-10 21:37:43 +00:00
Richard Hughes
1c4c3b5249 trivial: post release version bump 2018-01-09 16:01:21 +00:00
Richard Hughes
849ed6403c Release fwupd 1.0.3 2018-01-09 15:49:50 +00:00
Richard Hughes
eafba48905 trivial: Namespace the ignored cleanup error better 2018-01-08 21:59:08 +00:00
Richard Hughes
d980ccb757 trivial: Do the fwupdmgr network setup in a new function
This is for future use by other commands.
2018-01-08 16:57:01 +00:00
Richard Hughes
054b68457d trivial: Use the shared FwupdClient when monitoring 2018-01-08 16:56:56 +00:00
Richard Hughes
9939f1c85c trivial: Fix tiny memory leak when getting GUIDs from an invalid archive 2018-01-08 16:56:19 +00:00
Richard Hughes
e5711c762b trivial: Fix NULL handling in FuPending
We never want to store '(NULL)' as a string in the database.
2018-01-08 16:45:56 +00:00
Yehezkel Bernat
9157104100 thunderbolt: handle "native" mode
Kernel v4.15 added support for native enumeration of Thunderbolt
topology. The enumeration mode affects both the BIOS and TBT FW
operation so they must agree on it. Platforms may support both modes,
native and "legacy" (or "BIOS-assist").

This change makes sure the new image is compatible with the current
controller mode (otherwise the BIOS and TBT FW will not be alligned on
it at least until next boot) and also adds a new GUID generation logic
for a controller in "native" mode so LVFS could contain 2 images, one for
the "legacy" mode and one for "native".

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2018-01-08 16:28:23 +00:00
Mario Limonciello
3955e6e97d 8bitdo: Add initial SF30/SN30 Pro support (#350)
The SF30/SN30 pro support 4 different modes:
* Switch mode (START + Y)
This looks like a nintendo switch pro controller
* Xinput mode (START + X)
This looks like an XBOX 360 controller
* Dinput mode (START + B)
This looks like a more generic gamepad
* macOS mode (START + A)
This looks like a Sony DS4 controller

3 modes have had a difficult time enumerating in fwupd.
Switch mode:
* failed to add USB device: unexpected device response
Xinput mode:
* failed to add USB device: USB error on device 045e:028e : Pipe error [-9]
macOS mode:
* failed to add USB device: failed to send to device on ep 0x01: USB error on device 054c:05c4 : Input/output error [-1]

The only mode I've gotten a nearly full update flow working is Dinput
so far. After updating the controller comes back in switch mode.
2018-01-08 10:45:55 -05:00
Richard Hughes
5bed9341b4 trivial: Fix self test failure with newer versions of GCab 2018-01-06 22:46:35 +00:00
Richard Hughes
639da4776b trivial: Allow calling all FuPlugin runners from the self tests 2018-01-06 22:44:24 +00:00
Bernhard M. Wiedemann
1fa6407c85 Use gzip -n
to prevent it from adding timestamps to .gz headers
to make package builds reproducible

See https://reproducible-builds.org/ for why this is good.
2018-01-05 07:39:21 +00:00
Mario Limonciello
110accb395 debian: if OS environment variable isn't set, try to guess it 2018-01-04 00:02:52 -06:00
Richard Hughes
c7bbbc246b Allow specifying the maximum archive size in the daemon config 2018-01-03 07:38:27 +00:00
Richard Hughes
4f50e6268a Do not try to parse huge compressed archive files
We don't want to allow DoS-ing the daemon by trying to decompress a huge sparse
cabinet archive.
2018-01-03 07:38:27 +00:00
Richard Hughes
516e7741e0 unifying: Fix a compile warning with the latest GLib 2018-01-02 20:37:41 +00:00
Richard Hughes
eec8a3c068 trivial: Fix a compile warning with the latest GLib 2018-01-02 20:37:31 +00:00
Richard Hughes
8a91f4ac1d trivial: Fix a flase-positive-ish harmless warning from Coverity 2017-12-22 14:24:28 +00:00
Richard Hughes
78ee1d0aaa trivial: Fix a with fu-csr-tool bug spotted by Coverity 2017-12-22 14:24:28 +00:00
Elton (Eddie) Hartman
ae538b829a Update README.md
Small typo
2017-12-22 09:04:09 +00:00
Richard Hughes
deea2da041 Use the new functionality in libgcab >= 1.0 to avoid writing temp files
Using old versions of gcab we could only do one thing: extract the files in the
cabinet archive to a new directory in /tmp, and then fwupd would have to read
them back in to memory to parse them. This was both inelegant and wasteful, and
probably not an awesome idea from a security or privacy point of view.

Using libgcab >= 1.0 we can decompress to a GBytes blob, and then verify the
firmware and metainfo file without anything being written to disk.

As this is a security sensitive operation, move the fwupd-specific helper code
out of libappstream-glib and also add a lot of internal self tests.

The gcab code will have to remain in libappstream-glib for a long time, but we
don't have to use it. Handling the cab file here also allows us to fix two
long-standing bugs:

 * MetaInfo or firmware files in a subdirectory are handled correctly

 * The archive can also be self-signed using PKCS7 instead of using GPG
2017-12-21 08:54:00 +00:00
Richard Hughes
8f89cf04fb Add more metadata to the user-agent string 2017-12-21 08:25:29 +00:00
Zander
e56b036e33 Remove www. from links to fwupd.org 2017-12-17 10:39:34 +00:00