Commit Graph

392 Commits

Author SHA1 Message Date
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
Mario Limonciello
7cff2dcb25 trivial: Bump meson dependency to 0.47.0
The current libxmlb dependency requires this and when run in subproject
mode will cause failures otherwise.

Also bump the snap to use meson 0.47.2 to fix snap build due to this
failure.
2018-11-07 11:40:26 -06:00
Mario Limonciello
d22f215a70 contrib: Adjust flatpak build for moving to flathub
Pull the based json file from
https://github.com/flathub/org.freedesktop.fwupd

And modify it as necessary (for changes in master)
2018-11-01 06:51:23 -05:00
Mario Limonciello
355f5c12d6 firmware-packager: Make it clearer to use
1) Remove the confusing --firmware-id and build this field dynamically based on GUID and Developer name
2) Make developer name mandatory
3) Rename device-unique-id to device-guid to more closely reflect how fwupdmgr shows it
4) Allow running on Windows
2018-10-24 06:12:31 -05:00
Richard Hughes
e4ad25044a Sort the firmware sack by component priority
This allows composite firmware to be ordered in an explicit way.
2018-10-23 09:20:02 +01:00
Richard Hughes
72b7eab693 flatpak: Update gnu-efi to latest version 2018-10-23 09:20:02 +01:00
Mario Limonciello
2aaa38d77d trivial: debian: Make control file statement more generic (Closes: #911505) 2018-10-22 07:50:26 -05:00
Mario Limonciello
a8240caf2e trivial: snap: Use libxmlb subproject instead
This avoids having to bump the snap on libxmlb releases.
2018-10-18 21:25:56 +01:00
Richard Hughes
481aa2a923 Port from libappstream-glib to libxmlb
The libxmlb library is much faster to query, and does not require the daemon
to parse the XML metadata at startup. It's a zero-copy mmap design that is more
modern and less clunky.

RSS has reduced from 3Mb (peak 3.61Mb) to 1Mb (peak 1.07Mb) and the startup
time has gone from 280ms to 250ms.
2018-10-17 14:41:13 +01:00
Mario Limonciello
802a279bd2 trivial: snap: drop the stable symlink
Leading to this problem:

Building fwupd-wrappers
Failed to copy '/build/fwupd/parts/fwupd-wrappers/build/snapcraft-stable.yaml': it's a symlink pointing outside the snap.
Fix it to be valid when snapped and try again.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 229, in run
    self.build()
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 218, in build
    env=env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 75, in run_build_command
    return self.backend.run(args, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 460, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)

Scanning for processes to kill in build SNAPBUILD-351860
2018-10-12 11:59:04 -05:00
Mario Limonciello
3e54789ee3 trivial: snap: Swap the type of snap/snapcraft.yaml to be a real file
Workaround for https://bugs.launchpad.net/launchpad/+bug/1797366

It was previously a symlink to contrib/snap/snapcraft-stable.yaml
however infrastructure changes in launchpad have caused this to break
automatic snap builds.
2018-10-12 08:41:41 -05:00
Mario Limonciello
558055c9b7 Add a plugin for an upcoming Dell USB-C dock
This plugin requires infrastructure introduced in fwupd 1.1.3
and can not be backported to earlier versions of fwupd.

It works together with the Synaptics and Thunderbolt plugins to
coordinate the proper flashing procedure for devices in this dock.
2018-10-12 07:58:29 +01:00
Mario Limonciello
2ea87013cd contrib: Add information on how to use debugging scripts
At least for me it was a challenge to get the debugger properly
configured to allow debugging fwupd when built in tree.

This should allow very simple debugging.
2018-10-11 07:43:56 -05:00
Richard Hughes
e3a2e95628 trivial: Sync the flatpak manifest with the one from flathub 2018-10-05 07:59:59 +01:00
Richard Hughes
9a9cb9e179 trivial: Be more explicit when building the snap packages 2018-10-04 18:38:12 +01:00
Richard Hughes
3c186ce3cf trivial: Include libuuid specifically on Centos
This is seemingly not in the default buildroot.
2018-10-04 18:38:12 +01:00
Richard Hughes
19c56436b1 trivial: Be more explicit when building on Centos
Newer versions of appstream-glib do not depend on libgcab and so it has to be
installed manually to ensure the CI still passes.
2018-10-04 18:38:12 +01:00
Richard Hughes
70df6d1144 trivial: Be more explicit when building the Arch package 2018-10-04 18:38:12 +01:00
Mario Limonciello
7cc7b04d67 ci: Run clang static analysis for Ubuntu build rather than just clang compiler 2018-09-21 07:35:08 +01:00