Commit Graph

2018 Commits

Author SHA1 Message Date
Mario Limonciello
05c5b8de20 trivial: debian: Adjust to use https in debian/copyright 2018-04-16 10:54:44 -05:00
Mario Limonciello
6babe0fb40 trivial: debian: Bump debian/compat to 10 2018-04-16 10:54:44 -05:00
Mario Limonciello
f94b2f8c17 trivial: debian: Update control version 2018-04-16 10:54:44 -05:00
Richard Hughes
747b9eeef2 trivial: Fix a small memory leak if parsing the .xml file fails 2018-04-16 16:47:07 +01:00
Richard Hughes
1fd3ecf7a3 Export fwupd_remote_get_agreement()
We need to show this agreement text in every fwupd frontend and exporting a
helper function allows us to do two things:

 * Share the semi-complicated code (and fallback) to avoid copy and pasting

 * Easily change the code in the future, for instance allowing merging Metainfo
   and AppStream metadata without updating all the front ends with new logic.
2018-04-16 16:44:27 +01:00
Sjoerd Simons
8d38e0eae2 synapticsmst: Fix self test
A test run should really fail if it cannot find the test data, rather
then reporting success (thus masking that it never ran). Fix the test to
find it data (probably broken with the port to meson) and make it fail
if it cannot find its data.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-12 20:31:30 -05:00
Sjoerd Simons
2bc6d0a38a synapticsmst: Improve error reporting
Rather then always assuming open() fails because of permission denied,
generate the GError code from the errno and add the related strerror to
the message. And ofcourse output the error message in debugging rather
then just ignoring it.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-12 20:31:30 -05:00
Sjoerd Simons
0a4409f231 contrib/ci: Fix synapticmst test under arch ci build
The synaptic mst test wants to open its test files as r/w, however as the
arch build runs as user nobody that won't work unless the test files are
also owned by user nobody. To make that happen, copy the source tree
rather then symlinking it

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-12 20:31:30 -05:00
Mario Limonciello
c82666d8f4 gitignore .vscode
The C/C++ extension for vscode stores its settings in this this
directory but they're highly developer environment specific
(for example include paths)
2018-04-12 10:09:22 -05:00
Richard Hughes
64da68a33b trivial: Use the same get-remotes output as the daemon expects for modify-repo 2018-04-12 08:17:08 +01:00
Richard Hughes
972f6eaba5 Allow customising the warning shown when enabling the remote 2018-04-12 08:17:08 +01: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
bf998580b8 thunderbolt-power: don't recoldplug (#457)
If recoldplug is called in the middle of a Thunderbolt firmware update it will
cause the Thunderbolt controller to be in the wrong state and make it appear
that the controller update failed.
2018-04-11 15:44:25 +01:00
Richard Hughes
d17dc0616f trivial: Export fwupd_get_os_release()
We need this for future client functionality and it seems a sane thing to
share.
2018-04-11 09:48:02 +01:00
Sjoerd Simons
9b0d1d4ca4 synapticsmst: Only enumerate Dell Docks if the type is known
The type of Dell dock gets used in the device GUID, so make that
mandatory for device enumeration to succeed. Only relying on the
synapticsmst plugin to be cold plugged after the dell plugin isn't
enough to ensure this.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-10 15:57:59 -05:00
Sjoerd Simons
6761896b33 synapticsmst: Disable remote control on failure
When hitting a failure during enumerating make sure remote control mode
is disabled again.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-10 15:57:59 -05:00
Sjoerd Simons
9f10cbacaf Set Dell dock metadata
On Dell dock devices set the FU_DEVICE_METADATA_DELL_DOCK_TYPE metadata
field which gets used by the synapticsmst plugin for recognizing dell
dock types.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2018-04-10 15:57:59 -05:00
Mario Limonciello
336158a355 If no remotes are enabled try to enable the LVFS
Signed-off-by: Richard Hughes <richard@hughsie.com>
2018-04-10 20:28:36 +01:00
Mario Limonciello
1f10dc2ba7 thunderbolt-power: Prevent a theoretical critical warning on shutdown 2018-04-10 13:50:39 -05:00
Mario Limonciello
0bd8c74cc0 thunderbolt-power: If a timer is still running from coldplug, stop it (#457)
A race condition is hypothesized in the following scenario:

1. User starts up the system and fwupd doesn't start automatically.
2. User manually calls fwupdmgr install blah.cab (or fwupdmgr update really) which uses dbus activation to start fwupd systemd unit.
3. This runs coldplug on thunderbolt plugin, no devices found. Thunderbolt power runs coldplug routine.
  a. This sets forcepower with a timeout to turn off after 20 seconds.
  b. Coldplug exits.
4. update routine starts
  a. Thunderbolt plugin starts flash routine.
  b. Thunderbolt power plugin turns off force power in middle of flash routine.
  c. Issue described happens.
2018-04-10 13:50:39 -05:00
Richard Hughes
86fdd975ad Prevent a client crash if the daemon somehow sends invalid data
Fixes: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1762617
2018-04-10 11:59:36 +01:00
Richard Hughes
1901093431 Reboot using logind, not directly using systemd
This allows us to use PolicyKit, which means we will get prompted for
authorization if logged in as a user without permissions.

Fixes https://github.com/hughsie/fwupd/issues/455
2018-04-09 15:01:34 -05:00
Niels Ole Salscheider
0d178e28c5 Use the right encoding for the label in make-images
This prevents the following error:
UnicodeEncodeError: 'utf-8' codec can't encode characters in
position 26-28: surrogates not allowed
2018-03-25 21:11:53 +01:00
Richard Hughes
d913ac5c20 trivial: Turn off a new GCC8 warning that just triggers false positives 2018-03-22 10:51:12 +00:00
Richard Hughes
f96694004f Fix SQL error when trying to run 'fwupdmgr clear-offline'
Fixes https://github.com/hughsie/fwupd/issues/445
2018-03-22 07:50:15 +00:00
Richard Hughes
612a9c1684 trivial: Use the SSL www-less homepage URL everywhere
Fixes https://github.com/hughsie/fwupd/issues/440
2018-03-14 18:15:17 +00:00
Mario Limonciello
937299d72b uefi: Check that EFI system partition is mounted (Fixes: #436)
If the ESP isn't mounted it's possible that the update may look
succesful on the Linux side, but certain to fail later.
2018-03-14 09:54:04 +00:00
Richard Hughes
e30c6e14cd trivial: post release version bump 2018-03-12 10:44:57 +00:00
Richard Hughes
d1b23e3c5a Release fwupd 1.0.6 2018-03-12 10:41:58 +00:00
Richard Hughes
009079fe5a trivial: Fix gitignore for the new meson-only world 2018-03-12 10:34:47 +00:00
Richard Hughes
d3cc2255e9 Delete any old fwupdate capsules and efivars when launching fwupd
Fixes https://github.com/hughsie/fwupd/issues/431
2018-03-09 13:44:45 +00:00
Richard Hughes
3b6397e08a trivial: Check for the ESRT supported status in setup() 2018-03-09 13:44:45 +00:00
Richard Hughes
54dcd29b3c trivial: Use the new fwup_get_esp_mountpoint() call to log the defined ESP 2018-03-09 13:44:45 +00:00
Richard Hughes
d421da0597 trivial: Set the fwupdate esp mountpoint in setup() 2018-03-09 13:44:45 +00:00
Richard Hughes
afd05b88bd trivial: Load the custom ESP mountpoint from _setup() 2018-03-09 13:44:45 +00:00
Richard Hughes
89e968b79b trivial: Add a common function to get a recursive file list 2018-03-09 13:44:45 +00:00
Yehezkel Bernat
1ccd5d0bbd thunderbolt: correct handling of unknown devices
For unknown device only vendor and model IDs should be checked

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2018-03-09 13:08:56 +00:00
Andrei Emeltchenko
2872867110 firmware-packager: Allow to create package out of provided binary
In a case we have firmware binary instead of exe archive allow to
create package.
2018-03-09 18:53:45 +08:00
Andrei Emeltchenko
1e1789c7e6 plugins: thunderbolt: Add support for newest chips
Add support for the latest TR Thunderbolt controllers.
2018-03-09 18:53:45 +08:00
Robert Ancell
911e40f1aa Fix Vala bindings:
- Name the bindings the same as the pkgconfig file
 - Update the GIR bindings to include the appropriate header file which updates
   the Vala bindings
2018-03-07 09:21:31 +00:00
Richard Hughes
e7b902eb7b Correctly detect new remotes that are manually copied
Create an inotify watch on the parent remotes.d directory to be notified of new
files being created. This allows us to load the new remote without restarting
the daemon.

Fixes https://github.com/hughsie/fwupd/issues/428
2018-03-05 16:53:01 +00:00
Richard Hughes
00a5f2cb30 trivial: Code style fixup 2018-03-02 14:52:42 +00:00
Richard Hughes
ab4c2d13a6 Remove support for RaspberryPi
This was never used, and the foundation want to stick to the existing 'just
download a new file' distribution method.
2018-03-01 18:45:47 +00:00
Mario Limonciello
5dbdd0b243 Allow exiting device prompt with a "0" device too
This makes it more obvious for people that don't know about ctrl-d
2018-03-01 10:28:48 -06:00
Mario Limonciello
80d1a294d1 Allow ctrl-d out of the prompt for devices
Currently this will segfault fwupdmgr

Choose a device:
1.	8a21cacfb0a8d2b30c5ee9290eb71db021619f8b (XPS 13 9370 System Firmware)
2.	cb52b4cd86255a70d1d9e6b09c6bf00b9f876b61 (XPS 9370 Thunderbolt Controller)
<ctrl-d>

Thread 1 "fwupdmgr" received signal SIGSEGV, Segmentation fault.
fu_util_prompt_for_device (priv=<optimized out>, error=<optimized out>) at ../src/fu-util.c:315
315		return g_object_ref (dev);
2018-03-01 09:27:29 -06:00
Mario Limonciello
2d8f2455c9 trivial: amt: Adjust to use [] instead of () in device name
This makes it more friendly to bash completion
2018-03-01 09:27:29 -06:00
Mario Limonciello
c8d15f924c Show device description when bash completing an argument 2018-03-01 09:27:29 -06:00
Mario Limonciello
9e965ada49 Allow all functions that take device arguments to be prompted
As part of this ignore extra string arguments other than the device
ID for these methods.

This has two benefits:
1) No more copying and pasting device ID's for any of these methods
2) Bash completion can now show nicer output for these methods
2018-03-01 09:27:29 -06:00
Mario Limonciello
a667bfb76e Fix a crash related to when passing device to downgrade in command line
(fwupdmgr:15071): Fwupd-CRITICAL **: 09:08:55.248: fwupd_client_get_device_by_id: assertion 'device_id != NULL' failed

Thread 1 "fwupdmgr" received signal SIGSEGV, Segmentation fault.
0x000055555555c5b1 in main (argc=<optimized out>, argv=<optimized out>) at ../src/fu-util.c:2401
2401				g_print ("%s\n", error->message);
2018-03-01 09:27:29 -06:00