Commit Graph

2033 Commits

Author SHA1 Message Date
Mario Limonciello
693497b961 Update Fedora dockerfile to pull from Fedora 27 2018-04-20 09:05:17 -05:00
Richard Hughes
e598fc3447 trivial: Show the VID and PID when failing to add a USB device
Fixes https://github.com/hughsie/fwupd/issues/476
2018-04-19 20:15:09 +01:00
Mario Limonciello
6b0eb07886 trivial: Compile upower and test plugins with -O0 (Closes: #472)
This is a workaround for what looks like a compiler bug introduced
in Debian and Ubuntu gcc-7.

After the compiler bug is sorted in Debian testing it should be
reverted.
2018-04-18 20:11:43 +01:00
Mario Limonciello
ed1ac2a74b Enable CentOS 7 for CI
There are a lot of hacks here;
 * Pulling newer libappstream-glib from Fedora
 * Pulling a systemd backport
 * Manually installing pillow and pygobject
 * PKCS7 is turned off (gnutls is too old)
2018-04-18 10:25:22 -05:00
Mario Limonciello
de47f6ca1d trivial: CI: run debian-s390x first
It finishes the quickest of the builds so it will speed up CI
2018-04-18 10:25:22 -05:00
Mario Limonciello
3a00164d9a trivial: Support setting a proxy while building docker container 2018-04-18 10:25:22 -05:00
Mario Limonciello
e00d05d033 Only run certtool if a new enough gnutls was on system and pkcs7 enabled 2018-04-18 10:25:22 -05:00
Mario Limonciello
6b9f07cbf7 trivial: fix a null pointer dereference
../src/fu-main.c: In function ‘fu_main_daemon_method_call’:
../src/fu-main.c:667:47: error: null pointer dereference [-Werror=null-dereference]
   polkit_authority_check_authorization (helper->priv->authority, subject,
                                         ~~~~~~^~~~~~
../src/fu-main.c:698:47: error: null pointer dereference [-Werror=null-dereference]
   polkit_authority_check_authorization (helper->priv->authority, subject,
                                         ~~~~~~^~~~~~
2018-04-17 10:10:43 +01:00
Mario Limonciello
a6f44e11ff trivial: Remove invalid -Wno-cast-function-type
Was causing this error on some configurations:
unrecognized command line option ‘-Wno-cast-function-type
2018-04-17 10:10:43 +01:00
Mario Limonciello
a98df55d82 Disable -Wunused-function on clang builds (Closes #467)
GLib creates two static inline functions for paramaters that may
not be used that set off warnings in clang but not gcc.

Ignore these on clang builds everywhere that
G_DEFINE_AUTOPTR_CLEANUP_FUNC is used.
2018-04-17 10:10:43 +01:00
Mario Limonciello
5e13aecef8 trivial: fu-util fix mismanaged memory
Caught by clang:

../src/fu-util.c:473:17: warning: assigning to 'gchar *' (aka 'char *') from 'const gchar *' (aka 'const char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
	warning_markup = fwupd_remote_get_agreement (remote);
2018-04-17 10:10:43 +01:00
Mario Limonciello
7877769cad trivial: uefi: Remove an unused variable
Caught by clang:

../plugins/uefi/fu-plugin-uefi.c:311:32:  warning: unused variable 'iter' [-Wunused-variable]
	g_autoptr(fwup_resource_iter) iter = NULL;
2018-04-17 10:10:43 +01:00
Mario Limonciello
6a650193b0 trivial: debian: Reset clang to run in Ubuntu
This was accidentally dropped in a previous CI rework.
2018-04-16 10:54:44 -05:00
Mario Limonciello
59e6440dd5 trivial: debian: Remove unused override in debian/lintian/fwupd 2018-04-16 10:54:44 -05:00
Mario Limonciello
0a94c6d34a trivial: debian: rename tag for debian/source/lintian-overrides 2018-04-16 10:54:44 -05:00
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