Commit Graph

610 Commits

Author SHA1 Message Date
Javier Martinez Canillas
2f636bf53d trivial: provide a fwupdate transition for RHEL 8
This is similar to commit 1ff1164630 ("trivial: debian/control*: Update
for fwupdate transition") but to provide a fwupdate transition in RHEL 8
where the fwupdate{,efi} packages are still present.

There is no need to do this for Fedora, since the fwupdate packages have
already been retired.
2020-02-04 10:22:56 +00:00
Tomas Winkler
2a026147ce ci: allow working with podman w/o aliases
Fedora doesn't distribute docker anymore, instead
it uses podman for the containers.
It is possible to alias podman to docker, but
it's less hassle if it will work just out of the box.

The fix here is simple the podman is a fallback if
docker is not found.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
2020-01-29 08:43:31 +00:00
Tomas Winkler
8a00dc898f ci: fedora: force correct rpm package version
RPM doesn't allow '-' in the version number,
so this must be fixed if also when building from
an untagged git tree.

sanitize_for_ci() from get-version.py
fixes it only when build is CI environment.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
2020-01-29 08:22:41 +00:00
dann frazier
b25be977a9 trivial: debian: Don't use --parents when rmdir'ing /var/*/fwupdate
Calling 'rmdir --parents /var/cache/fwupdate' will cause it to attempt
to rmdir /var/cache and /var. Those directories are very unlikely to be
empty, so it should always quietly fail. However, there's not benefit
in attempting those removals, so let's quit doing it.
2020-01-21 17:52:28 -06: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
31c08120b9 trivial: debian: Add explicit cleanup for fwupdate->fwupd transition
It's possible that someone has removed fwupdate package prior to the
fwupd transition meaning that they might have some artifacts left
behind from fwupdate packaging.  Clean up these artifacts.

This commit can be reverted after both Debian bullseye and Ubuntu
focal have been released.
2020-01-09 09:01:15 -06:00
Mario Limonciello
b78b4fb1bf Revert "trivial: Attempt to fix Debian CI"
This reverts commit 9e8037483a.
2020-01-08 21:08:59 +00:00
Richard Hughes
603e4f6956 Shut down automatically when there is system memory pressure
We can just rescan hardware if required; near OOM it's just more important to
free what we can and get out of the way.
2020-01-07 12:29:07 +00:00
Richard Hughes
d7197d5319 trivial: Move the Fedora CI image to F31 2020-01-07 12:29:07 +00:00
Richard Hughes
a432bdabe3 trivial: Sync the example spec file with downstream 2020-01-06 15:16:48 +00:00
Richard Hughes
f169186700 vli: Rename the vli_usbhub plugin to vli
In the future we'll be doing PD updates without any USB hub at all.
2020-01-02 13:24:13 +00:00
Richard Hughes
eb9522f4d6 trivial: Don't build the Ubuntu CI with Werror 2020-01-02 12:52:51 +00:00
Richard Hughes
9e8037483a trivial: Attempt to fix Debian CI 2020-01-02 12:52:51 +00:00
Mario Limonciello
fd6ffd6dac trivial: rename synapticsmst to synaptics-mst
This brings the naming nomenclature inline with the other plugins
2019-12-12 13:59:41 -06:00
Richard Hughes
f5c6e1d276 Add a new plugin that can parse the TPM event log
Some devices do not have a stable PCR0 for the same firmware version, and I'd
like to collect the TPM event log for affected machines to debug why.
2019-12-06 15:05:16 +00: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
Richard Hughes
297d1598ef trivial: Only dlopen the test plugin once
This causes problems in the self tests when not lazy-loading symbols.

Also use g_build_filename() for the paths to be more portable and readable.
2019-12-01 20:59:19 +00:00
Mario Limonciello
f12e471414 trivial: ci: debian: enable verbose daemon logging for failure analysis 2019-12-01 06:23:27 -06:00
Mario Limonciello
f35a3dec93 trivial: debian: remove obj-* built files to fix back to back builds 2019-11-30 18:56:09 -06:00
Mario Limonciello
728f0f06c6 trivial: ci: don't let bad symlinks cause debian build failures 2019-11-30 18:43:24 -06:00
Mario Limonciello
0f67b79cc5 trivial: debian: correct a dependency for libfwupdplugin-dev 2019-11-30 18:34:56 -06:00
Richard Hughes
83613aa932 trivial: Add a BR for Fedora 2019-11-27 16:10:17 +00:00
Richard Hughes
6a710c3c23 trivial: Never add duplicate symbols to the map file 2019-11-27 12:45:35 +00:00
Mario Limonciello
11503c23ee Install development files for libfwupdplugin
This splits out all development files, including headers into their
own packages where relevant.

Notably absent is `fu-hash.h` which is used for determining taint.
Out of tree developed plugins should still taint the daemon.
2019-11-27 11:32:43 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00
Mario Limonciello
f1a4d87063 Add missing documentation from the plugin interface
Also update the structure as the documentation doesn't only describe
libfwupd.
2019-11-26 06:31:57 +00:00
Mario Limonciello
9b36a370ae trivial: ci: pull lintian from unstable for now.
Fixes E: fwupd: library-not-linked-against-libc usr/lib/x86_64-linux-gnu/fwupd-plugins-3/libfu_plugin_upower.so

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945276
2019-11-25 09:29:46 +00:00
Mario Limonciello
4fcf48606f trivial: debian: ci: ignore library-not-linked-against-libc for more 2019-11-23 20:18:36 +00:00
Mario Limonciello
4c39d7f35f trivial: contrib/get-version.py: require git less hard 2019-11-11 11:05:54 -06:00
Richard Hughes
ab902c0dd9 trivial: Fix Fedora CI build 2019-11-08 17:51:18 +00:00
Richard Hughes
56510ad0c6 trivial: Fix the autobuilt spec file with the new tarball version 2019-11-08 16:36:07 +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
Mario Limonciello
d044dd3d71 trivial: contrib: don't require TSS for debian archs without EFI 2019-11-06 11:14:34 -06:00
Mario Limonciello
85fb312563 flashrom: switch to upstream source
Once upstream flashrom tags a release (>1.1) this should be updated
and as it starts to flow into distros turned on by default.
2019-11-06 08:06:52 -06:00
Mario Limonciello
e6170ca6dd trivial: debian: only use mingw-w64-tools in archs with UEFI plugin 2019-11-05 11:46:15 -06:00
Mario Limonciello
5123d4333e Rename unifying plugin to logitech-hidpp (Fixes: #1329) 2019-11-04 13:35:36 -06:00
Mario Limonciello
6b0e4ba021 Add a new contrib script for installing a Dell BIOS from an EXE file
This script re-uses code from existing firmware-packager related items
to:
* Find the matching device on the system
* Append an ESRT header
* Build a CAB file
* Pass the CAB file into fwupd daemon
2019-11-04 10:30:38 -06:00
Mario Limonciello
d8da3cc504 trivial: add-capsule-header: rename to make it easier to import 2019-11-04 10:30:38 -06:00
Mario Limonciello
69559f0619 trivial: simple_client: make it easier to reuse code 2019-11-04 10:30:38 -06:00
Mario Limonciello
22379ab16c trivial: firmware-packager: make it easier to reuse code 2019-11-04 10:30:38 -06:00
Mario Limonciello
f603e2df88 trivial: add-capsule-header: make it actually work
The result that was being spit out didn't actually work on any of
my test systems.
2019-11-04 10:30:38 -06:00
Richard Hughes
894ebf6ac7 trivial: Add all the _LAST enums that shouldn't be checked for ABI 2019-11-01 08:16:18 -05:00
Richard Hughes
6bbc4c787b jabra: Move the Jabra-specific detach out into its own plugin
This also lets us remove the call to dfu_device_wait_for_replug() which was
causing a deadlock due to unsafe main context usage. Splitting the code allows
us to use the device list to watch for replug, without adding even more Jabra-
specific plugin code to the DFU plugin.

Looking at this with a 40,000ft view, the Jabra runtime really doesn't have
much in common with DFU and the reason it was originally all lumped together
was that the daemon couldn't "change" plugins between detach and update.

It's unfortunate that we have to include a sleep() in the DFU code after the
DFU probe, but this is specified by Jabra themselves. Attempting to open the
device without waiting reboots the hub back into runtime firmware mode, so we
can't even retry the failing setup action.
2019-10-30 15:09:49 +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
fe8888cc6f trivial: ci: disable pulling libxmlb from unstable 2019-10-30 08:29:58 -05:00
Mario Limonciello
e62db1bc57 trivial: debian: remove some unneeded lintian 2019-10-28 10:43:43 -05:00
Mario Limonciello
ea10d7b14e trivial: debian: bump compat version 2019-10-28 10:43:43 -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
Richard Hughes
679d1c0f9a Add a plugin to update VIA USB hub hardware
Only protocol V1 hardware (VL810~VL813) is currently supported.
2019-10-24 12:52:18 +01: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
Mario Limonciello
eb5d7a4659 Add a new plugin for working with eMMC devices (Fixes: #1455) 2019-10-18 14:18:09 -05:00
Patrick Rudolph
0b7143da66 plugins: Add coreboot plugin
Detect and parse current coreboot version.
There's no need to depend on libflashrom for now.

An update mechanism isn't implemented as the kernel interface isn't
stable yet and will be implemented in a separate commit.

Tested on coreboot enabled machine.
Example output:
coreboot System Firmware
  DeviceId:             81104bde9db7cb037936659ea727c739f47a5029
  Guid:                 230c8b18-8d9b-53ec-838b-6cfc0383493a <- main-system-firmware
  Guid:                 de6fd40f-4ec9-5c0b-95e1-8fb13d1b030c <- LENOVO&ThinkPad T410&2537VG5
  Guid:                 978b0d18-bfe9-5279-9a9f-68dc247a705f <- LENOVO&ThinkPad T410&LENOVO&2537VG5
  Summary:              Open Source system boot firmware
  Plugin:               coreboot
  Flags:                internal|registered
  Vendor:               LENOVO
  Version:              4.10.991
  VersionFormat:        triplet
  Icon:                 computer
  Created:              2019-10-14

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2019-10-17 18:31:01 +02:00
Mario Limonciello
0147583208 trivial: arch: ci: Wait some time for tpm_server to start up
Works around transient race conditions.
2019-10-15 09:10:15 -05:00
Mario Limonciello
ac97eca09e trivial: fix TPM2 simulator tests for arch
The simulator has PCR values that are not yet initialized.  So use the
Intel TPM tools to extend the PCR0 value before running test suite
2019-10-14 10:59:08 -05:00
Richard Hughes
c15c7835be Rename and modernize the udev plugin
The new plugin is called `optionrom` as this is the only type of image that it
parses for verification only. FuUdevDevice is also the generic parent already.
2019-10-09 14:59:54 +01:00
Mario Limonciello
71d4b08445 trivial: debian: remove more conffiles from transitions (Closes: #932617) 2019-10-06 21:05:02 -05:00
Mario Limonciello
1ff1164630 trivial: debian/control*: Update for fwupdate transition
Per Steve's recommendation:
 1. In fwupd, add Provides/Replaces, plus Conflicts: against the older
    versions of fwupdate-*-signed. That will tell apt to upgrade
    cleanly and thereby switch to fwupd instead. See
    https://www.debian.org/doc/manuals/developers-reference/ch05.html#s5.9.3
2019-10-06 21:00:24 -05:00
Richard Hughes
e9232c4fc0 Use parallel fuzzing for the SMBIOS checks too 2019-10-02 16:28:28 +01:00
Richard Hughes
63aa6759f0 Add a plugin to update Synaptics RMI4 devices 2019-10-02 10:45:13 +01:00
Richard Hughes
201d5ac138 trivial: Add a parallel fuzzing script
This approximately doubles performace of fuzzing for every two cores you have.
2019-10-02 09:37:43 +01:00
Mario Limonciello
dc7e7c3808 trivial: fwupd-refresh: fix a clash with fwupd.service (Closes: #941360)
`fwupd-refresh.service` uses `DynamicUser=true` which causes systemd
to make `/var/cache/fwupd` a symlink to `/var/cache/private/fwupd`.

Individual units aren't allowed to access this directory, only the ones
with the directive.  This means that `fwupd.service` stops working as
soon as a user tries to start `fwupd-refresh.service`.

The bug details are present in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941360
2019-09-30 14:09:18 -05:00
Richard Hughes
3d6ff6e27e trivial: Fix Fedora CI 2019-09-30 17:13:07 +01:00
Richard Hughes
59593b0c50 thelio-io: Add a plugin to detach the Thelio IO board
This does not use the DFU runtime to detach.
2019-09-25 16:05:32 +01:00
Richard Hughes
bb59837ae0 Add a new plugin to update Conexant audio devices 2019-09-24 12:26:47 +01:00
worldofpeace
180111c495 trivial: Update DBus conf path for example Fedora package 2019-09-16 16:37:06 +01:00
Richard Hughes
6f82b989e8 trivial: Specify the tpm2-tss-devel version in the example spec file
Lower versions than this fail to link the uefi self test binary.
2019-09-12 18:05:20 +01:00
Richard Hughes
03ce21c61f Move to CI Fedora 30
Fedora 29 is EOL in just a few weeks.
2019-09-12 18:05:20 +01:00
Richard Hughes
04cb360847 uefi-recovery: Add a plugin to add a fake ESRT entry for device recovery
The factory-shipped MinnowBoardMAX board has firmware that does not include
the ESRT table. Create a 'fake' UEFI device with the lowest possible version
so that it can be updated to any version firmware.

All the HwId GUIDs are used for the fake UEFI device, and so should be used in
the firmware metadata for releases that should recover the system.
2019-09-11 12:47:31 +01:00
Richard Hughes
83e2ca2129 trivial: Make it easy to disable or enable libflashrom for distros 2019-09-10 14:17:34 +01:00
Richard Hughes
f5e68d4e89 trivial: Don't use Recommends for RHEL 7 2019-09-10 14:17:34 +01:00
Filipe Laíns
ccda6790f5 ci: arch: minor improvements
- Moved version discovery routine to PKGBUILD
- Set PKGEXT to .pkg.tar to avoid the package being compressed
- Added --needed to pacman arguments when installing the dependencies to
avoid reinstalling packages

Signed-off-by: Filipe Laíns <lains@archlinux.org>
2019-09-06 16:37:38 +02:00
Mario Limonciello
37a3ecf0ef trivial: add libtss2-dev into debian/control (Closes: #1324) 2019-08-29 10:27:41 -05:00
Mario Limonciello
6865dd3bac thunderbolt: Add support for kernel safety checks (Fixes: #1312)
There are commits to the Thunderbolt kernel driver that make sure
that the upgrade process goes smoothly.  If these commits aren't
present then it will look like a fwupd problem, when it's actually
a kernel problem.

When this issue was reported it appeared that commit
e4be8c9b6a
was missing from the locally tested kernel, but it's impossible
to determine that from userspace.

Prevent running the thunderbolt plugin on older kernels than that
set in `$sysconfdir/fwupd/thunderbolt.conf`.

By default that is set to 4.13.0, but if a distribution vendor has
backported all the necessary support it can be decreased to a lower
version for distro packages.
2019-08-28 11:06:18 -05:00
Richard Hughes
7fac3788bf trivial: Update BRs for the example Fedora package 2019-08-27 12:52:46 +01:00
Jonas Witschel
5a7575d947 uefi: add test for TPM 2.0 PCR read function
The test is run if a physical TPM is available or if the environment
variable "TPM_SERVER_RUNNING" is set. In the latter case, the user is
expected to start a TPM simulator on their own, like we do in the Arch
Linux CI script here.
2019-08-27 06:23:42 -05: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
Mario Limonciello
805f7990f3 trivial: disable gtkdoc by default
Since https://fwupd.github.io is now a thing, people can be directed there
rather than relying upon locally built documentation by default.

Also this will mean one less dependency to install for people who build
from source.

Lastly this finally means that I can do this set of actions without failure:
```
meson build
ninja -C build
ninja -C build install (PK prompts for password)
rm -rf build
```

Previously gtkdoc stuff was built as root due to the PK prompt and removing
it would lead to stuff like this:
```
rm: cannot remove 'build/docs/libfwupd/html/libfwupd-FwupdClient.html': Permission denied
```
2019-08-23 10:54:54 -05:00
Mario Limonciello
71d2f62dc2 trivial: update references of hughsie/fwupd to fwupd/fwupd 2019-08-22 09:47:52 -05:00
Mario Limonciello
d3122a53ff Publish docs to fwupd.github.io using CircelCI
For now this is happening on every master build, but in the future
after it's working reliably it should be restricted to only tagged
builds.

To accomplish this, swap a build from circlei and travisci that
will save docs to publish.
2019-08-22 09:15:29 -05:00
Mario Limonciello
b390b14f8f Add support to integrate into the motd (Fixes: #1270)
Fixes Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921820

Introduce a new --log option to fwupdmgr that will log stdout to an argument.
If run under systemd, prefix that argument with $RUNTIME_DIRECTORY.

Add a new systemd unit and associated timer to regularly refresh metadata.
After the metadata refresh is complete, save the output to the motd location.

The timer and service are disabled by default and can be enabled by an admin.
2019-08-22 06:39:02 +01:00
Mario Limonciello
dc6577c8b8 trivial: fixup standalone installer
There were some logic failures in the handling of pre-installed version
that were reported on the mailing list.
2019-08-06 09:58:26 +01:00
Richard Hughes
4836cb360e Verify we don't break the ABI
This adds a script which can check for ABI breaks between two Git
revisions:

    $ ./contrib/ci/check-abi.sh

The CI is set up to run it automatically between the tip of the branch
being tested and the last release tag.

Based on the work by Mathieu Bridon <bochecha@daitauha.fr>, many thanks.
2019-08-01 10:47:49 -05:00
Richard Hughes
d8f78d0b93 Add support for the SoloKey Secure 2019-07-30 16:16:14 +01:00
Mario Limonciello
09700bbce8 trivial: debian: For signed package fill out Built-Using (Closes: #932757) 2019-07-22 15:23:56 -05:00
Richard Hughes
762a36a515 Disable the flashrom plugin by default
When upstream libflashrom contains all the required API upstream we can build
this by default.
2019-07-15 10:37:34 -07:00
Jan Kratochvil
e7726453ba Fix Fedora docker build missing directory: dist
On Fedora 30 x86_64 I got:
docker run --privileged -t -v `pwd`:/build fwupd-fedora
...
Complete!
+ cp /root/rpmbuild/RPMS/noarch/fwupd-tests-1.2.10-0.1alpha.fc29.noarch.rpm /root/rpmbuild/RPMS/x86_64/fwupd-1.2.10-0.1alpha.fc29.x86_64.rpm /root/rpmbuild/RPMS/x86_64/fwupd-debuginfo-1.2.10-0.1alpha.fc29.x86_64.rpm /root/rpmbuild/RPMS/x86_64/fwupd-debugsource-1.2.10-0.1alpha.fc29.x86_64.rpm /root/rpmbuild/RPMS/x86_64/fwupd-devel-1.2.10-0.1alpha.fc29.x86_64.rpm dist
cp: target 'dist' is not a directory
2019-07-11 08:53:13 +01:00
Mario Limonciello
8837da60fa trivial: ci: debian: Only turn on flashrom when running CI
This will prevent normal debian builds from turning it on until it
has been packaged.
2019-07-07 14:29:48 -05: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
Richard Hughes
150c201f5d trivial: Sync example spec file with downstream 2019-05-20 11:28:19 +01:00
Mario Limonciello
12d25460b2 standalone-installer: Be smarter about existing installed fwupd
Allow setting a minimum fwupd version requirement using `--minimum`.

If running on a distro with apt, try to use this to detect an already
installed version and compare what was passed in to `--minimum`.
* If new enough version, use the built in version
* If too old of a version or not specified, require package removal.
2019-05-14 14:14:52 -05:00
Richard Hughes
c7bdded2c6 Add a plugin to update Synaptics Prometheus fingerprint readers 2019-05-14 17:18:55 +01:00
Mario Limonciello
0156b8fa78 trivial: standalone-installer: rename uninstall argument to cleanup 2019-05-08 10:05:31 -05:00
Richard Hughes
dce91204c9 Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
Mario Limonciello
a3069f57b0 trivial: snap: set return code 2 on fwupd-activate.service as success
Otherwise the common case (nothing to do) will return 2 and show the systemd
unit as failed every time.
2019-04-04 22:30:25 +01:00
Mario Limonciello
14891c7934 trivial: ci: pull libxmlb from debian unstablef
Use apt pinning to not pull in the rest of debian unstable
2019-04-04 06:33:43 -05:00
Mario Limonciello
2df922c23d Move the core built-in 'fwupd' remote over to the dell-esrt plugin
This metadata is useless to other systems, so if compiling a custom
fwupd without -Dplugin_dell=true it shouldn't be included.
2019-04-02 07:18:29 -05:00
Mario Limonciello
a29ca19793 snap: Add a custom systemd unit to call activation on shutdown (Fixes: #1125)
The systemd shutdown script gets called after /snap/fwupd/* gets
unmounted meaning it can't be used to do the activation.

Explicitly check that the symlink for /snap/fwupd/current is mounted
when calling the script.
2019-04-02 07:10:56 -05:00
Richard Hughes
224a9036ae trivial: Build the ModemManager plugin on F30+ 2019-03-27 09:54:06 -04:00
Richard Hughes
363aa54605 trivial: Update the capsule header helper to work without flags set 2019-03-13 11:15:49 +00:00
Richard Hughes
b008bcab50 Add a simple script to add a capsule header
This may be helpful for OEMs and ODMs shipping 'bare' firmware.
2019-03-12 13:54:29 -05:00
connor nolan
03fbe471e8 fix makecab directive options 2019-03-12 06:28:12 -05:00
Steve McIntyre
c8de6b6398 trivial: debian: Update the format of the json metadata to match new requirements
* Move all the data under a new top-level "packages" key
* Add an empty "trusted_certs" key - our binaries do not do any
  further verification with an embedded key.
2019-03-11 17:06:21 -05:00
Richard Hughes
4499d19ba3 Move out the offline update functionality to a new binary
The offline updates environment is special, and we have to be careful to delete
the trigger before doing anything that can fail to avoid boot loops.

For this reason, split it out to a simple self-contained binary that is easy to
understand.
2019-03-08 09:45:30 -06:00
Richard Hughes
5806867ebe Add the fwupdagent binary for use in shell scripts
This currently just outputs the current list of devices with releases and makes
it possible to integrate firmware version reporting with other tools like mgmt.
2019-03-06 13:15:55 +00:00
Aleksander Morgado
a374f4c0b5 standalone-installer: new --allow-older and --allow-reinstall options 2019-03-04 09:29:44 -06:00
Mario Limonciello
6884795033 trivial: snap: fix install location for shutdown script (Fixes: #1064) 2019-03-03 19:48:27 -06: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
Mario Limonciello
96a0dd5606 Add a support for delayed activation
This is intended for devices that it is not safe to immediately activate
the firmware.  It may be called at a more convenient time instead.

Both fwupdmgr and fwupdtool support the feature.

- if called at runtime with fwupdmgr it uses the daemon
- during shutdown fwupdtool uses the pending.db to perform this feature.
2019-02-27 09:04:54 +00:00
Mario Limonciello
56b8aa5b8c trivial: ci: Don't use strict when parsing json
This breaks some strings with newline character used for postinstall
that are harmless.
2019-02-25 21:27:18 -06:00
Mario Limonciello
6121eb26df trivial: snap: pull from edge channel to build
Due to bug https://bugs.launchpad.net/snapcraft/+bug/1817300 snaps
using classic confinement began failing to build recently when
using docker.

This is also discussed in
https://forum.snapcraft.io/t/snap-build-started-failing-with-pip-not-working/10142/3

This commit can be reverted when snapcraft migrates to the stable
channel.

Fixes: #1041
2019-02-25 21:27:18 -06:00
Mario Limonciello
dc845bec2b trivial: debian: override newer lintian for missing ASLR on PE executable 2019-02-25 16:59:29 -06:00
Mario Limonciello
36ed8a0646 Revert "contrib/debian: Switch to debian unstable"
This reverts commit e7ee719843.
2019-02-25 10:59:13 -06:00
Richard Hughes
1a74b22eb0 trivial: Remove unused downstream postinst commands 2019-02-25 10:04:16 +00:00
Richard Hughes
97293c4560 Show in Flathub correctly
For this we need to register as a console application (which fwupdtool is, I
suppose) and also supply a usable icon.

I've used the new GNOME icon theme guidelines so please add a drop shadow
before using: https://gitlab.gnome.org/GNOME/Initiatives/issues/2
2019-02-15 12:32:46 +00:00
Mario Limonciello
9772f8aca6 debian: explicitly depend on shared-mime-info
This helps autopkgtest issue:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922331
2019-02-14 21:34:43 -06:00
Mario Limonciello
5e5267d12c trivial: snap: Restore uuid-dev dependency
The snap build uses xmlb as a subproject.  libxmlb actually does
need the uuid-dev dependency.

Resolves this failure:
```
Couldn't use fallback subproject in subprojects/libxmlb for the dependency xmlb
Reason: subprojects/libxmlb/meson.build:107: Native dependency 'uuid' not found

meson.build:158:0: ERROR:  Native dependency 'xmlb' not found
```
2019-02-12 08:26:05 -06:00
Richard Hughes
43f390a336 standalone-installer: Fix issue found by LGTM
See https://lgtm.com/rules/6780080/ for details.
2019-02-10 13:37:06 +00:00
Richard Hughes
d3fcc39a0a trivial: Fix linting issue spotted by LGTM 2019-02-08 19:14:51 +00:00
Daniel Campello
f92e1f20e0 fwupd: Hide firmware-packager behind meson option
fwupd installs by default firmware-packager (a python3 script) into
the CrOS image. CrOS does not support python3 interpreter and fails
passing the TestValidInterpreter. Removing this script from the default
installation fixes the issue.

TEST=emerge-sarien fwupd
BUG=chromium:857263,b/121131967

Change-Id: I855c7994fd15faa0ce3d520734537674d7538b4e
2019-02-08 18:36:38 +00:00
Mario Limonciello
e8bb4e0e34 trivial: debian: bump to debhelper 11 2019-02-07 07:33:33 -06:00
Mario Limonciello
377918d422 trivial: debian: bump to newer standards version 2019-02-07 07:33:33 -06:00
Mario Limonciello
3a7899eb3f trivial: contrib/debian: remove custom compression 2019-02-07 07:33:33 -06:00
Mario Limonciello
83241fd25c trivial: contrib/debian: Add a lintian override for EFI applications 2019-02-07 07:33:33 -06:00
Mario Limonciello
e7ee719843 contrib/debian: Switch to debian unstable
Once libxmlb promotes to testing, this commit can be reverted.
2019-02-07 07:33:33 -06:00
Mario Limonciello
b3e5091349 trivial: contrib/ubuntu: set architectures for libsmbios 2019-02-07 07:33:33 -06:00
Mario Limonciello
a1e5fa6594 trivial: contrib/debian: use libxmlb from Debian archives 2019-02-07 07:33:33 -06:00
Richard Hughes
6b78d64987 Add fwupd_guid_from_string() to drop dep on uuid
This also allows us to write mixed-endian structures and adds tests. As part of
this commit we've also changed the API of something that's not yet been in any
tarball release, so no pitchforks please.
2019-02-06 14:48:04 +00:00
Richard Hughes
b8c30b8732 Do not use efivar just to print a mixed endian GUID 2019-02-04 15:19:57 +00:00
Mario Limonciello
dc73a47563 trivial: read and use all build flags used by Debian and Ubuntu builds
Filter out -Wl,-Bsymbolic-functions and run the test suite to make
sure any future build flags introduced will cause errors.
2019-02-04 08:56:43 -06:00
Mario Limonciello
39ddd968b8 trivial: contrib: debian: Don't allow -Wl,-Bsymbolic-functions
This linker flag is used by Ubuntu by default for packages.
It however doesn't work when compiled with `-Wl,-z,defs` which is
the default behavior since 0e17e6d030.

Recommended-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
2019-02-04 08:56:43 -06:00
Mario Limonciello
b503aa8650 ata: Add support for detecting Dell GUIDs
Similar to NVME, ATA drives distributed by Dell have special values
that should be used to designate fwupd GUIDs and only run correct
firmware.

When detecting Dell GUIDs remove the standard fwupd GUIDs.  "Generic"
firmware targeted to those GUIDs will fail to install.
2019-02-04 10:39:20 +00:00
Richard Hughes
7ccba7afba Remove the autogenerated headers in the gettext files
These change every release as we're importing from Transifex. They're not
required, so strip them out using a small python script.
2019-02-01 14:25:26 +00:00
Richard Hughes
0bf8ee810b ata: Add a new plugin to upgrade firmware on ATA/ATAPI hardware
Some of the ATA12 fixup code is by Mark Lord, taken from the hdparm project.

Fixes: https://github.com/hughsie/fwupd/issues/946
2019-01-29 22:28:09 +00:00
Richard Hughes
a08891b6cb trivial: Do not use the testing remote for the Fedora CI 2019-01-29 22:28:09 +00:00
Mario Limonciello
4f24d0bae3 When using directory remote type automatically generate metadata
The CAB files will be parsed upon `fwupd`/`fwupdtool` startup and
loaded into the daemon.
2019-01-29 09:21:54 -06:00
Richard Hughes
09cbacd771 trivial: Move Fedora CI to f29
We'll need this for some updated deps soon.
2019-01-28 15:42:30 +00:00
Richard Hughes
367f4590d6 wacom-raw: Add a plugin to update Wacom embedded EMR and AES panels 2019-01-24 10:18:40 +00:00
Richard Hughes
45bbfc9cae Check the device checksum as well as the content checksum during verify
Some firmware has a different on-device checksum to the hash of the firmware
file itself. This may be because:

 * The content is not a binary file, e.g. Intel HEX or SREC
 * Only part of the firmware is flashed, e.g. ignoring the bootloader section
 * The device checksum is calculated using another method entirely, e.g. PCR0

It's also made complicated as there may be more than one 'correct' device
checksum in some cases, but nothing that a union query can't solve.
2018-12-14 19:23:04 +00:00
Richard Hughes
b56015ed3f uefi: Add the PCR0 value as the device checksum for system firmware
We can't actually access the UEFI ROM from userspace, but the PCR0 is a hash
built from the ROM itself. We could use this value to ensure the firmware has
been written correctly, and that the PCR0 matches the expected value specified
in the metadata.
2018-12-14 19:23:04 +00:00
Richard Hughes
b4fd12a4c6 Add a plugin to update hardware that supports fastboot 2018-12-03 15:50:38 +00:00
Mario Limonciello
91a3eac28d contrib: Add a simple python3 client
The client uses GObject introspection to use the libfwupd2 library.

The client offers a reduced set of commands, but may be useful in some
environments.
2018-11-30 08:39:50 -06:00
Mario Limonciello
15e4b0caaf installed-tests: Adjust to actually use a remote for installed tests
By using a remote, this should allow using gnome-software to do the
installed tests without hacking around much.

Fixes: https://github.com/hughsie/fwupd/issues/862
Fixes: https://github.com/hughsie/fwupd/issues/809
2018-11-29 09:40:06 -06:00
Richard Hughes
57908bebc1 wacomhid: Rename to wacom-usb
We're adding another Wacom plugin soon, this one also using hidraw -- but the
new protocol uses a different 'raw' protocol and does not use USB.
2018-11-29 13:26:29 +00:00
Richard Hughes
634da03730 Create a silo index to speed up GUID queries
This speeds up matching for GUIDs by about 90%, taking the query from 3.17ms to
about 0.33ms on my Thinkpad. This is more important for slow ARM hardware,
where strcmp() is more expensive than on x64.
2018-11-21 18:51:07 +00:00
Richard Hughes
8a2eaa5514 trivial: Move the release descriptions to the metainfo.xml file
This matches what a lot of other projects do, and means we can easily format
the release notes back into NEWS format, but also into HTML and Markdown.

This also means we can show the correct update description in gnome-software
when building a flatpak, rather than falling back to the generic project
description.
2018-11-16 21:52:41 -06:00
Mario Limonciello
4039001d25 trivial: ci: fix flatpak build
The submodules need to checkout the latest remote commit, not the latest
one that was recorded by git metadata.
2018-11-09 15:12:06 +00:00
Richard Hughes
9636f28095 trivial: Drop the libxmlb insertion into the flathub manifest
The 1.2.0 release is being built in Flathub now.
2018-11-09 15:12:06 +00:00
Richard Hughes
53a049fce8 trivial: Sync example spec file with downstream 2018-11-08 20:39:46 +00:00