Commit Graph

570 Commits

Author SHA1 Message Date
Mario Limonciello
bf6d455687 Move fwupdtool and fwupdagent into bindir
These are intended to be executed by users (albeit for debugging and
advanced users) and shouldn't be left as an internal implementation
per FHS 3.0.
2020-02-20 09:02:11 -06:00
Richard Hughes
aac406270c Use the system provided flashrom on Fedora 2020-02-20 12:57:21 +00:00
Tomas Winkler
457a7c37ec ci: use standalone script to generate build dependencies
Sometimes it is desirable to create a build environment
outside of docker.
Move dependencies parser to a standalone python script
and call it from generate_docker.py

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
2020-02-18 17:40:39 -06:00
Mario Limonciello
af774426c7 trivial: add libglib2.0-doc to debian/ubuntu build dependencies 2020-02-18 11:22:58 -06:00
Laurent Bigonville
81e359199b Move the daemons from /usr/lib/fwupd to /usr/libexec/fwupd
This is supported since debian policy version 4.1.5 (FHS 3.0)
2020-02-18 11:22:58 -06:00
Laurent Bigonville
022d4fa708 debian/control.in: Add libglib2.0-doc to Build-Depends-Indep
This allows the links between the documentations files to be properly
generated
2020-02-18 11:22:58 -06:00
Mario Limonciello
026f0e0d28 trivial: contrib/debian: Add a diff ignore for vscode in debian packages 2020-02-14 10:31:47 -06:00
Mario Limonciello
df6a9464d5 trivial: contrib/debian: refresh standards version 2020-02-14 10:31:45 -06:00
Mario Limonciello
7a3985f2de upower: Move battery threshold declaration into a configuration file 2020-02-13 09:52:20 -08:00
Richard Hughes
1910e84c72 Add a plugin to update PD controllers by Fresco Logic 2020-02-07 11:46:25 +00:00
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