Commit Graph

238 Commits

Author SHA1 Message Date
Richard Hughes
c00eaf9435 trivial: post release version bump 2018-01-25 13:47:29 +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
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
Mario Limonciello
7dabe954e2 trivial: set FWUPD_GIT_DESCRIBE even if git isn't installed 2017-07-06 09:26:54 -05:00
Mario Limonciello
b04c13e1cf Include optional git checkout information in --version
When users are running from git this should aide in
debugging if they have a fix included.
2017-07-05 17:49:50 -05:00
Richard Hughes
e5f83588d1 trivial: post release version bump 2017-07-04 13:32:06 +01:00
Mario Limonciello
1499892173 Test for python dependencies before building (#147) 2017-06-20 14:17:49 -05:00
Richard Hughes
9bb940d40d trivial: Try to enable the valgrind support with newer meson versions 2017-06-20 09:25:25 +01:00
Richard Hughes
9b59676a24 Add a plugin to get the version of the AMT ME interface 2017-06-19 14:01:47 +01:00
Richard Hughes
b75549287c trivial: Drop deps when compiling with enable-uefi-labels=false 2017-06-15 12:05:11 +01:00
Richard Hughes
925b13cc37 trivial: Do not use -Winline -- too many false positives 2017-06-15 11:03:39 +01:00
Richard Hughes
a7fc23f657 trivial: post release version bump 2017-06-15 09:17:30 +01:00
Mario Limonciello
daac6a68fe Fix version comparison for meson 0.41 2017-06-13 15:35:45 -05:00
Richard Hughes
e691d30187 Allow compiling with newer versions of meson
In 0.41.0 meson introduced it's own 'dist' target and so we don't need to
define this ourselves anymore. Use a version compare to avoid depending on a
very new meson.
2017-06-13 16:46:05 +01:00
Peter Jones
2297c09f81 Generate a pile of images for status messages during system firmware update. (#133)
This generates a pile of .bmp files to use as our status messages.

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-06-12 13:11:22 -05:00
Richard Hughes
7420573412 trivial: post release version bump 2017-06-07 15:44:49 +01:00
Richard Hughes
605791d19e trivial: Remove the libgcab1-dev dep, nothing actually requires it 2017-06-06 14:51:25 +01:00
Richard Hughes
dfed515573 Allow downloading metadata from more than just the LVFS
Add the concept of 'remotes' that can dropped into /etc and used as firmware
metadata sources. This may be desirable when firmware is only accessable with
a valid support contract or from behind a VPN.
2017-06-02 13:19:05 +01:00
Eric Koegel
23603f0452 Add support for ConsoleKit2
Make systemd and ConsoleKit support an optional compile time flag
with both enabled by default. If both are used, the ifdef/elif will
ensure only the systemd calls are used so there's no conflict.
2017-06-01 09:00:16 +01:00
Timo Gurr
555c634a92 Allow to specify bindir 2017-05-29 16:54:30 +01:00
Mirco Tischler
63687ad124 Remove 'lib' prefix when looking for libraries
ld will prepend the lib prefix itself and will actually look for
liblibgpg-error and liblibm if called with -llibgpg-error and -llibm. Let's
get rid of the prefix.
2017-05-26 12:09:19 +01:00
Mario Limonciello
966b083e22 Make systemd dependency at least version 231
systemd 231 renamed ReadWriteDirectories to ReadWritePaths.
FW updates will fail for difficult to debug reasons if using an older
and the current unit.
2017-05-25 09:50:48 -05:00
Chris Mayo
584921f16c Increase minimum required AppStream-Glib version to 0.6.13
Adds regex command used for comparing firmware versions.
2017-05-24 20:13:00 +01:00
Richard Hughes
bf5180ae81 trivial: post release version bump 2017-05-22 19:39:19 +01:00
Moritz Kiefer
eaa0713df4 Set HAVE_POLKIT_0_114 when polkit is newer than 0.114 2017-05-16 10:32:18 +01:00
JulianLiu
1d577d6572 enable-dell requires libfwup-dev (#113)
* enable-dell requires libfwup-dev

Add dependency in enable-dell and shared_module('fu_plugin_uefi')
2017-05-02 19:38:15 +01:00
Richard Hughes
ad28e34f08 trivial: post release version bump 2017-04-28 16:11:32 +01:00
Mario Limonciello
47a0ed78c6 Create /var/lib/fwupd by meson post install 2017-04-21 08:07:58 -05:00
Mario Limonciello
5c1df14d05 fix test suite localstate directory to be a temporary directory 2017-04-20 13:53:19 -05:00
Mario Limonciello
6a185bc8c0 fix system-update.target.wants symlink too (#109) 2017-04-19 10:10:59 -05:00
Richard Hughes
2d8a7958b2 trivial: Get the pkg-config variables rather than hardcoding 2017-04-19 14:51:59 +01:00
Richard Hughes
e1c9a5c476 trivial: Fix substitution of FWUPD_x_VERSION in fwupd-version.h 2017-04-19 10:15:16 +01:00
Mario Limonciello
e07a6ddf6e trivial: Do not use the prefix for sysconfdir
Signed-off-by: Richard Hughes <richard@hughsie.com>
2017-04-19 08:41:19 +01:00
Richard Hughes
52981a67a1 trivial: Fix using old versions of meson by disabling the valgrind support
We can revert this when we depend on a newer meson.
2017-04-19 08:37:19 +01:00
Richard Hughes
34a4724b13 trivial: Post branch version bump 2017-04-13 18:39:27 +01:00
Richard Hughes
f6ee41edf2 trivial: Make libtbtfwu optional when compiling with thunderbolt support 2017-04-13 17:44:08 +01:00
Richard Hughes
87e82a716d trivial: Add the optional valgrind functionality back 2017-04-12 18:21:08 +01:00
Richard Hughes
63ef90f197 trivial: Always include the prefix for sysconfdir 2017-04-12 17:54:46 +01:00
Richard Hughes
463f80566c trivial: Fix linking in the thunderbolt plugin 2017-04-12 17:54:46 +01:00
Richard Hughes
57746cb839 Add the Meson build system as an alternate to autotools
Automake and autoconf are impossible to fully understand and Meson now provides
everything we need for a much smaller, faster, and more understandable build.

See http://mesonbuild.com/ for more information.
2017-04-12 16:35:18 +01:00