Commit Graph

206 Commits

Author SHA1 Message Date
Richard Hughes
fe4b3eadaa trivial: Use the same source version string between daemon and client
This fixes the common problem encountered when developing plugins:

    ./src/fwupdmgr get-devices
    Unsupported daemon version 1.4.0, client version is 1.4.0-179-gcf8095d5
2020-03-30 13:58:25 +01:00
Richard Hughes
cf8095d5af Use a static version number
Getting the version string from git means the commit version changes each time
we commit any patch, which means we need to use --force to install firmware
when building fwupd against a version that should be compatible.

It is also very inconvenient not bumping the release version for git snapshots
as firmware can no longer depend on the "planned" release triplet.

tl;dr: A good idea for Flashrom, not so awesome for me.
2020-03-29 12:17:52 +01:00
Richard Hughes
d5aab65f30 Use Jcat files in firmware archives and for metadata
A Jcat file can be used to store GPG, PKCS-7 and SHA-256 checksums for multiple
files. This allows us to sign a firmware or metadata multiple times (perhaps
by the OEM and also then the LVFS) which further decentralizes the trust model
of the LVFS.

The Jcat format was chosen as the Microsoft catalog format is nonfree and not
documented. We also don't want to modify an existing .cat file created from WU
as this may make it unsuitable to use on Windows.

More information can be found here: https://github.com/hughsie/libjcat
2020-03-23 19:55:12 +00:00
Richard Hughes
8d919b3acb Remove support for GCab less than v1.0
We can fall back to the subproject version if required for CI targets.
2020-02-24 12:33:44 +00:00
Richard Hughes
83425f99af Generate a win32 setup binary
Fixes https://github.com/fwupd/fwupd/issues/1704
2020-01-16 12:23:08 -06:00
Mario Limonciello
d81ea2e3fc Move MOTD population into the daemon
This allows it to be refreshed anytime the daemon updates rather
than once a day by a systemd job.

As part of this change, remove the logging from `fwupdmgr` which
was only used for motd purposes.
2020-01-16 10:33:43 -06:00
Richard Hughes
fbb677bee2 Add a new plugin that exposes the system TPM device firmware version
This plugin does not yet allow the device to be upgraded, and is provided for
information only.
2019-12-05 21:05:17 +00:00
Richard Hughes
45a00738d8 Allow building on Windows with MinGW
Add various fixes to enable us to build a selection of useful USB plugins.
Also, skip tests that don't make sense on WIN32 or that will not work.

With much help from Mario Limonciello <mario.limonciello@dell.com> -- Thanks!
2019-12-03 16:33:43 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00
Richard Hughes
ec73f86a79 trivial: Allow building GCab from a subpackage 2019-11-26 17:32:27 +00:00
Richard Hughes
9e5675e1b4 trivial: Allow compiling without <glib-unix.h> 2019-11-26 17:15:45 +00:00
Richard Hughes
5c508de173 trivial: Allow compiling without <fnmatch.h>
This also allows us to add a Win32 implementation if required in the future.
2019-11-26 13:13:31 +00:00
Richard Hughes
1665837e78 Make gudev a compile-time option
This should make it nearly possible to build fwupd on FreeBSD.
2019-11-25 09:29:46 +00:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Richard Hughes
40bef88ce1 Allow compiling GUsb as a subproject
This allows us to get closer to compiling on FreeBSD.
2019-11-24 16:59:48 +00:00
Richard Hughes
1f68b021d1 trivial: Allow compiling without pwrite() 2019-11-23 17:07:53 +00:00
Richard Hughes
633445dc10 trivial: Allow compiling without <errno.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
8694dee4e7 trivial: Allow compiling without realpath() 2019-11-23 17:07:53 +00:00
Richard Hughes
b026e456f3 trivial: Allow compiling without HAVE_LC_MESSAGES 2019-11-23 17:07:53 +00:00
Richard Hughes
01c0badd38 trivial: Allow compiling without getuid() 2019-11-23 17:07:53 +00:00
Richard Hughes
4f642400f8 trivial: Allow compiling without <sys/ioctl.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
e7fbb248f9 trivial: Allow compiling without <poll.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
fc1e267d33 trivial: Allow compiling without <sys/utsname.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
08a125637c trivial: Don't force specific linker flash when cross building 2019-11-22 14:23:55 +00:00
Mario Limonciello
429a5128d3 Dynamically determine release version
This is inspired by a change in flashrom to read the version string for meson
dynamically.

No need for "post release version bump", this happens automatically from git
now by there being a dirty commit.
2019-11-08 09:52:02 -06:00
Richard Hughes
340f2d4cd7 Bump the required gudev version
Flatpak shared-modules now ships gudev over 232.
2019-11-04 07:54:08 -06:00
Richard Hughes
8025333671 trivial: post release version bump 2019-11-01 15:08:26 +00:00
Richard Hughes
51a869a01d Use XMLb to query quirks
During startup we do 1898 persistent allocations to load the quirk files, which
equates to ~90kb of RSS. Use libxmlb to create a mmap'able store we can query
with XPath queries at runtime.
2019-10-30 08:29:58 -05:00
Mario Limonciello
e7b2ea02b9 uefi: use genpeimg to mark ASLR and DP/NX on EFI binary
If the tool is available at build time use it to this.
2019-10-26 12:59:11 -05:00
Mario Limonciello
0b9bfec150 Add a systemd preset file for fwupd-refresh.service
Makes `fwupd-refresh.service` strictly opt-in.

Some distros are defaulting to all systemd services on and causing
more refreshes than desirable by default, especially when using
both `gnome-software` and `fwupd-refresh.service`
2019-10-20 14:31:13 -05:00
Richard Hughes
7b257d9692 trivial: post release version bump 2019-09-26 11:06:19 +01:00
Richard Hughes
ff1d7efb9e trivial: post release version bump 2019-09-13 11:00:01 +01:00
Richard Hughes
fbff921b35 Allow disabling all plugins
This allows us to easily build just libfwupd in a flatpak manifest without
installing dozens of deps to build things we're just going to delete anyway.
2019-09-13 10:27:57 +01:00
Richard Hughes
0f431da26f trivial: Post branch version bump
We've added enough new code to justify a minor bump.
2019-08-28 17:08:21 +01:00
Richard Hughes
2b2605fb58 trivial: Do not warn about deprecated declarations
We need to silence the warning about GTimeVal, as the type is part of the ABI
of libgcab for better or worse.
2019-08-27 15:00:36 +01:00
Jonas Witschel
1b5f1da202 uefi: use tpm2-tss library to read PCR values
Using the library instead of the command line tools provides a more
stable interface. This implementation only fetches PCR 0 for all
available hash algorithms since this is the only PCR that is actually
used in fwupd.
2019-08-27 06:23:42 -05:00
Richard Hughes
7b32e5f01f trivial: post release version bump 2019-07-15 19:28:15 +01:00
Artur Raglis
13fd21d806 flashrom: Use libflashrom
This also means we now include a flashrom subproject as no distro currently has
a flashrom new enough to build the plugin.

Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com>
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2019-06-28 08:28:51 +01:00
Mario Limonciello
057c67a830 trivial: fu-main: clarify missing PK file error
Point people to a wiki page to explain what is happening and how to fix it.
2019-05-23 11:11:04 -05:00
Richard Hughes
22fea218f9 trivial: post release version bump 2019-05-20 11:20:49 +01:00
Richard Hughes
59ea33de80 trivial: post release version bump 2019-04-23 10:31:07 +01:00
Richard Hughes
622e054d20 trivial: post release version bump 2019-04-12 10:40:55 +01:00
Richard Hughes
dce91204c9 Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
Mario Limonciello
f981036e33 trivial: meson.build: bump libxmlb dep to 0.1.7
Shutdown activation for ATA disks doesn't work with older versions, and it's
not obvious how to debug or fix the problem.
2019-04-04 06:33:43 -05:00
Richard Hughes
a7deedea45 trivial: post release version bump 2019-03-26 10:55:44 +00:00
Richard Hughes
f28abe7fda Allow signing and verifying data using a PKCS-7 self-signed client certificate
This is a per-client certificate and private key that can be used to sign
metadata sent to remote servers, for instance success/failure reports.
2019-03-11 13:57:39 +00:00
Mario Limonciello
6db69de725 trivial: meson.build: bump libqmi runtime dep to 1.23.1
This is the minimum version needed for DW5821e, which is one of the
important devices that prompted MM support in the first place.
2019-02-27 16:09:13 +00:00
Mario Limonciello
386f05bea5 trivial: meson.build: bump modem manager dependencies
These match the absolute minimums needed to use MM support.
2019-02-27 16:09:13 +00:00
Aleksander Morgado
fc8093626c modem-manager: implement support for qmi-pdc
If a device reports that qmi-pdc is supported (e.g. DW5821e that
supports both fastboot and qmi-pdc), we'll end up first running the
fastboot installation before doing the qmi-pdc installation procedure.

These changes also make sure that the MM device inhibition is kept for
as long as the whole process is ongoing. Only after the last method is
run, the inhibition will be removed.

In order to handle devices being exposed in the system while the MM
inhibition is in place, e.g. to be able to run qmi-pdc after fastboot,
a simple udev based watcher is included, which will take care of
creating the FuMmDevice that is not associated to any modem currently
exposed by MM, but that shares all the details of the original device.

This new logic assumes that the devices don't change their USB layout
during a firmware upgrade, which is not a very good assumption, but it
works for the case at hand. If this is not the case, we may need to
end up doing some custom AT port probing instead of relying on the
original one reported by MM being still valid (note that we don't rely
on the device name, as that may change if some other device is plugged
in the system while we're doing the update, we rely on the USB
interface number).
2019-02-27 16:09:13 +00:00
Richard Hughes
ffa3b84706 Add a plugin to support ModemManager hardware 2019-02-27 16:09:13 +00:00