Commit Graph

87 Commits

Author SHA1 Message Date
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
b58104895d trivial: Add fwupd_build_history_report_json() for future use 2018-01-11 21:28:22 +00:00
Richard Hughes
1c4c3b5249 trivial: post release version bump 2018-01-09 16:01:21 +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
Mario Limonciello
eb737f15f5 fix CI builds with -Werror
Switching to build in -werror in 4016c839a8
was not working properly.  Adjust the CI builds to use --werror instead.

Also while doing this, enable -werror in clang builds.
2017-11-30 16:42:26 -06:00
Mario Limonciello
ba46ee5d61 meson.build: Add -Wincompatible-pointer-types-discards-qualifiers warnings 2017-11-30 16:42:26 -06:00
Richard Hughes
f983b1089f trivial: post release version bump 2017-11-28 14:59:03 +00:00
Richard Hughes
d0cff7caec Remove autoconf-isms from the meson configure options
See https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
2017-11-27 18:07:53 +00:00
Richard Hughes
4016c839a8 trivial: Use the built-in -werror from Meson 2017-11-27 18:07:53 +00:00
Mario Limonciello
59cfba617c Test version of gcab to determine which tests to run (Closes: #318)
Adjust the disabling of the s390x CI test to only run when on newer
gcab.
2017-11-17 18:48:40 +00:00
Jan Tojnar
cc9f934787 build: Refactor directory selection
Previously, the various install paths were obtained using get_option
as needed.

This patch unifies the directory selection inside the top-level meson
file as requested in https://github.com/hughsie/colord/pull/62.
2017-11-17 17:11:51 +00:00
Richard Hughes
7bcba92f75 trivial: post release version bump 2017-11-09 15:23:12 +00:00
Mario Limonciello
7af941fee4 synaptics: drop hard dependency on dell plugin and libsmbios
Rather than have a hard dependency use metadata and internal DMI
to communicate the relevant details
2017-10-18 08:27:38 -05:00
Richard Hughes
0f97379bcc trivial: post release version bump 2017-10-09 13:39:24 +01:00
Richard Hughes
df613a15bb trivial: Add some more lesser-known GCC warning flags 2017-10-05 21:19:00 +01:00
Richard Hughes
94110f5983 Remove some deprecated #define names and bump the soname
Also, bump soname as we're going to clean up a lot of things now.

Many thanks to Mario Limonciello for all the Debian-specific changes.
2017-09-28 09:23:52 +01:00
Richard Hughes
9b4a66c8f8 uefi: Support uploading the firmware splash image 2017-09-26 19:50:37 +01:00
Richard Hughes
b0aa379300 Use a fallback SYSCONFDIR if the default is not set 2017-09-19 20:06:44 +01:00
Richard Hughes
e8c3ce249c trivial: Bump the plugin location after the FwupdResult change 2017-09-19 09:55:28 +01:00
Richard Hughes
c80d5c10e0 trivial: post branch version bump 2017-09-18 11:47:55 +01:00
Richard Hughes
4f98fe89ba trivial: Use a different SYSCONFDIR for self tests 2017-09-17 08:38:43 +01:00
Richard Hughes
e7c6bcab3a trivial: Use a different PLUGINDIR for self tests 2017-09-16 17:44:38 +01:00
Richard Hughes
b4fd0dfd7d Move deprecated symbols to a new header
This does two things:

 * Allows new users of the library to see only the supported symbols
 * Allows us to ensure we're not using deprecated API internally

I can also use this in gnome-software in CI to make sure we're not using
deprecated API too. I don't think we're ready for a soname bump so we have to
hang on to the deprecated code for now.
2017-09-08 13:31:01 +01:00
Mario Limonciello
abdd612722 Add a test target for Debian build, but compiled under clang 2017-09-07 19:18:04 -05:00
Richard Hughes
f4cc7cc1ac trivial: Use -Wunused-variable by default 2017-09-07 21:58:04 +01:00
Richard Hughes
68480a2069 trivial: Move the libdfu sources to the dfu plugin 2017-09-07 18:39:23 +01:00
Richard Hughes
53237d26a1 Remove the ELF support from libdfu and move the code to the altos plugin
This was a mistake originally for two reasons:

 * The only device to use ELF as a deliverable is the altos devices
 * ELF has nothing to do with the DFU specification

This moves the code to where it belongs.
2017-09-07 18:39:23 +01:00
Richard Hughes
2a533b8de2 Use -Werror when building in Travis CI
Do NOT do this for normal package builds.

With much help from Mario Limonciello, many thanks.
2017-09-07 18:25:48 +01:00
Richard Hughes
7ac92109eb trivial: Remove useless config.h defines
The HAVE_UEFI_UNLOCK and HAVE_UEFI_GUID defines are always present for the
libfwup version we require.
2017-09-06 23:07:50 +01:00
Richard Hughes
57bddd2cd4 trivial: post release version bump 2017-09-01 15:29:13 +01:00
Richard Hughes
4f0c828ca6 Fix build with newer versions of libgudev
Newer versions include the g_autoptr() macros in the installed headers.
2017-09-01 14:53:14 +01:00
Mario Limonciello
31f12579ff Add back options for HAVE_SYNAPTICS and HAVE_THUNDERBOLT
These were casualties in the move to meson that caused dell coldplug
prepare to fail.
2017-08-23 13:26:42 -05:00
Philip Withnall
883de6abd2 build: Fix use of undefined var in meson.build when systemd disabled
Fixes the meson error:
Meson encountered an error in file meson.build, line 207, column 2:
Unknown variable "systemd".

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-22 10:15:02 +01:00
Christian Kellner
81dd85f6d1 tbtfwu: remove legacy thunderbolt plugin
Replaced by the "thunderbolt" plugin.
2017-08-21 12:12:55 -05:00
Christian Kellner
73ba7ee82c thunderbolt: plugin for new tbt kernel interface
Thunderbolt has a new kernel interface starting from version 4.13,
which simplifies updating the host controller and devices: the
kernel now exposes a sysfs interface for the non-volatile memory
as a device node. This can be used to write the new firmware blob.
Updates are then triggered also via a simple write to a sysfs
file (nvm_authenticate), which in turn is also used for error
reporting.
The plugin should be functionally, but a few items are missing:
 - image verification
 - safe mode handling
2017-08-21 17:05:44 +01:00
Max Ehrlich
6d0fc42685 Add a python script to create fwupd compatible cab files from Microsoft .exe files 2017-08-17 17:10:23 -05:00
Mario Limonciello
7cc2679f09 trivial: look for an empty string for systemd and udev directories 2017-08-17 09:22:39 -05:00
Mario Limonciello
38d7f13976 Allow configuring systemd and udev directories (Fixes: #176) 2017-08-16 17:02:32 -05:00
Philip Withnall
957fd6521b build: Define _DEFAULT_SOURCE in order to expose realpath()
We need realpath(), syscall(), cfmakeraw() and a few other functions,
which need the _DEFAULT_SOURCE feature test macro to be defined. Define
it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-15 18:53:34 +01:00
Philip Withnall
6c3bb0bd09 build: Enable C99 support in meson.build
We use C99 features (fu-plugin-raspberrypi.c), so need to explicitly
enable them in meson.build, as some compilers will not enable them
automatically, and will instead error when they encounter usage of C99.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-15 18:53:34 +01:00
Richard Hughes
7403dc505f Optionally use GnuTLS to verify PKCS7 certificates
We can use this as an alternative for GPG. No PKCS7 certificates are currently
installed by fwupd and it's expected that the LVFS will still only provide GPG
detached signatures.

If an OEM distributor wants to sign firmware with a PKCS7 and the corresponding
certificate is provided then the firmware will be marked as valid.

Only firmware shipping with a .p7b file will use the PKCS7 functionality,
similarly remote metadata validation will default to GPG unless Keyring=pkcs7
is specified in the config file.
2017-08-14 09:42:48 +01:00
Richard Hughes
0724d8bde0 trivial: Bump the appstream-glib requirement to 0.6.13 2017-08-09 17:21:48 +01:00
Richard Hughes
94f939aa4d trivial: Move the archive decompression to common code 2017-08-09 10:23:23 +01:00
Richard Hughes
e7472a22cc Use a static library to avoid symlinking files for the tests 2017-08-09 10:19:13 +01:00
Richard Hughes
8e07099265 trivial: post release version bump 2017-08-03 10:46:22 +01:00
Richard Hughes
3c3f608781 trivial: Use warning_level in the top level meson file 2017-07-31 11:58:18 +01:00
Richard Hughes
260e970297 Rename the thunderbolt plugin to tbtfwu 2017-07-30 17:39:25 +01:00
Mario Limonciello
f0bb65efa8 trivial: correct version comparison for polkit 0.114 in meson.build 2017-07-10 16:30:24 -05:00
Mario Limonciello
dc8c985159 trivial: back the requirement on appstream-glib to 0.6.9
The items that 0.6.13 requires are now guarded by a version test.
This should allow running fwupd master on more distros that haven't
yet picked up appstream-glib 0.6.13.
2017-07-10 14:32:42 -05:00
Richard Hughes
b3dca14e90 trivial: Never compare a string against zero to avoid warnings 2017-07-06 18:28:01 +01:00