Commit Graph

328 Commits

Author SHA1 Message Date
Richard Hughes
3d60762bed Add a D-Bus method to generate a signature using the self-signed client certificate 2019-03-11 13:57:39 +00: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
ad73719fa4 Do not reboot when failing to start fwupd during offline updates
If another offline update task is run at the same time, e.g. pk-offline-update
from PackageKit then we might corrupt the package database when the client
D-Bus request times out.

Copy the fixes from PackageKit so that the offline updates work together.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1685471
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
Richard Hughes
8dd4c1c4dd Allow restricting firmware updates for enterprise use 2019-03-05 19:05:07 +00:00
Mario Limonciello
3143bad0f5 fu-tool: Save device state to @LOCALSTATEDIR@/lib/fwupd/state.json on actions
This feature is turned on with the new fwupdtool option `--enable-json-state`

The intended use case is for ChromeOS to be able to save information about
devices on the system when `fwupdtool update` was run to display in the UX at
a later time.
2019-02-28 10:32:45 -06:00
Mario Limonciello
2b020efa5e trivial: modify appstream metadata for some warnings
The following warnings were displayed by Debian appstream metadata
validation.

```
metainfo-validation-issue
Validation of the metainfo file found a problem: Found empty 'url' tag.
metainfo-validation-issue
Validation of the metainfo file found a problem: Type 'console-application' component, but no information about binaries in $PATH was provided via a provides/binary tag.
metainfo-validation-issue
Validation of the metainfo file found a problem: Found empty 'url' tag.
```
2019-02-28 09:38:12 -06: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
Marcin Sucharski
de2b70bc7d Add elogind support 2019-02-25 10:05:17 +00:00
Richard Hughes
c2b626dc2d Release fwupd 1.2.5 2019-02-25 09:42:18 +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
80b671633c trivial: Correct the license for some metadata files
These warnings were coming up in the Debian build:
```
W: fwupd source: inconsistent-appstream-metadata-license data/remotes.d/lvfs-testing.metainfo.xml (cc0 != cc0-1.0)
W: fwupd source: inconsistent-appstream-metadata-license data/remotes.d/lvfs.metainfo.xml (cc0 != cc0-1.0)
```
2019-02-07 08:03:33 +00:00
Mario Limonciello
53ce25d985 Add support to call composite prepare and cleanup using fwupdtool
Two new arguments added to fwupdtool: `--prepare` and `--cleanup`

They are used only with the `install-blob` command

This makes sure that devices can get rebooted in dell-dock even if using
fwupdtool to install a single blob.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2019-02-01 16:39:08 +00:00
Richard Hughes
8ece8874b5 Release fwupd 1.2.4 2019-02-01 14:28:36 +00:00
Mario Limonciello
1e35e4c22d fu-tool: Port the get-updates command over
Now that there is actually support to load non-static information
(at least from fwupd perspective) it makes sense to support this
command in both tools.
2019-01-29 09:21:54 -06: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
Mario Limonciello
4c0df63db1 trivial: meson.build: Fix builds with -Ddaemon=false but no other changes
Without this fix build will fail like below:
```
$ meson build -Ddaemon=false
.
.
.

src/meson.build:21:4: ERROR:  Unknown variable "colorhug_pkcs7_signature".
```
2019-01-15 16:24:38 -06:00
Mario Limonciello
46aaee8cec fu-tool: Add support for an 'update' command to fwupdtool
This will perform updates with all currently present metadata.

It is "intended" for usage with local metadata repositories referring
to local files.

fwupdtool however does also support fetching a file from the web
and if the metadata refers to the file on the web it should also work
for that.
2019-01-11 12:59:00 +00:00
Richard Hughes
36a5b8f7a2 Release fwupd 1.2.3 2019-01-04 11:08:49 +00:00
Richard Hughes
c2b4b56bd3 Release fwupd 1.2.2 2018-12-30 15:19:01 +00: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
43fb4a7110 trivial: Update two release note typos 2018-11-28 14:18:36 +00:00
Richard Hughes
c0b20b119b Release fwupd 1.2.1 2018-11-27 14:51:56 +00:00
Richard Hughes
75b965d01d Shut down the daemon after 2h of inactivity
Plugins are allowed to 'opt-out' of this behaviour using _RULE_INHIBITS_IDLE.
This should be used where waking up the hardware to coldplug is expensive,
either from a power consumption point of view, or if other artifacts are going
to be seem -- for instance if the screen flickers when probing display devices.

This functionality is also inhibited when the actual upgrade is happening,
for obvious reasons.

Admins can turn off this auto-sleep behaviour by editing the daemon.conf file.

Fixes https://github.com/hughsie/fwupd/issues/417
2018-11-21 18:54:44 +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
62f8486ffe fwupdmgr/fwupdtool: Move monitor command to fwupdtool
This command is used for monitoring events from the daemon and normally
used only by power users or developers.
2018-10-18 19:36:59 +01:00
Mario Limonciello
f6d01b16de fwupdmgr/fwupdtool: Move firmware builder from fwupdmgr to fwupdtool
This command is really a power user command and should live in
fwupdtool with similar debugging and development features.
2018-10-18 19:36:59 +01:00
Mario Limonciello
7e5c6eebfe meson: Bump dependency to 0.44 and adjust sysconfdir handling
Some code was put in place to workaround sysconfdir behavior of meson
0.43 and less.  This is no longer needed.
2018-10-16 08:21:24 +01:00
Richard Hughes
214906817e trivial: Use less offensive wording when talking about private LVFS instances
Various guidelines we care about tell us not to use this word unless specified
in documentation, e.g. i2c.
2018-09-05 15:16:42 +01:00
Richard Hughes
1d894f13cc trivial: Move the hwids debug functionality to fwupdtool 2018-08-31 16:39:09 +01:00
Richard Hughes
c0dd011eaf trivial: Fix the DFU A3BU self test failure
The .cab file was re-uploaded with the same version to the LVFS to test the
LVFS::InhibitDownload functionality, but of course the SHA1 hash changed.
2018-08-31 09:58:40 +01:00
Richard Hughes
bda4d81d3d trivial: Allow plugins to add virtual children from quirk files
The example here would be adding virtual i2c devices attached to an existing
USB hub device.
2018-08-28 18:30:00 +01:00
Richard Hughes
6dec401a67 Store the DeviceInstanceId as a GUID in the quirk database
This allows us to match non-DeviceID GUIDs, and also GUIDs we don't know how to
generate.

To make this fully useful, search for device quirks when GUIDs are added.
2018-08-28 18:30:00 +01:00
Richard Hughes
cdb01590e0 nvme: Add a new plugin to update NVMe hardware 2018-08-26 19:42:28 +01:00
Mario Limonciello
df60f69814 uefi: Add special handling for /efi (Closes #680)
This is a similar problem to #627 (which was fixed by 9bdbbc5ca).
Add special handling to allow writing to /efi/EFI
2018-08-22 16:43:20 -05:00
Richard Hughes
7132122387 Implement the systemd recommendations for offline updates
See https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html
for details.

Reported by Hans de Goede <hdegoede@redhat.com>, many thanks.
2018-08-20 09:58:28 +01:00
Mario Limonciello
9bdbbc5ca8 uefi: Handle /boot properly (Closes: #627)
/boot is a special cased directory when using ProtectSystem=full

Due to this, it's marked read only even if it's listed in ReadWritePaths.

Allow folks to use this for their ESP, but they need to create /boot/EFI
in advance of starting fwupd.
2018-08-09 09:28:50 -05:00
Mario Limonciello
10a4824cb0 trivial: Allow running on an older systemd
Build the path list dynamically based on enabled plugins and use options
that are compatible with older systemd when appropriate
2018-07-10 11:05:10 -05:00
Richard Hughes
f307775675 Add release information for locked devices 2018-06-28 15:51:11 +01:00
Mario Limonciello
cfc22a8b90 uefi: Detect the EFI system partition location at runtime
Check across a list of common EFI system partition locations for a mounted
location before starting fwupd.

This also will cause the plugin to not initialize if the EFI system partition
is not mounted.
2018-06-28 15:51:11 +01:00
Mario Limonciello
4eff978638 trivial: make gcab a build dependency
Fixes #574
2018-06-28 08:54:22 -05:00
Richard Hughes
87fb9ff447 Change the quirk file structure to be more efficient
This pivots the data storage so that the group is used as the preconditon
and the key name is used as the parameter to change. This allows a more natural
data flow, where a new device needs one new group and a few few keys, rather
than multiple groups, each with one key.

This also allows us to remove the key globbing when matching the version format
which is often a source of confusion.

Whilst changing all the quirk files, change the key prefixes to be more familiar
to Windows users (e.g. Hwid -> Smbios, and FuUsbDevice -> DeviceInstanceId)
who have to use the same IDs in Windows Update.

This also allows us to pre-match the desired plugin, rather than calling the
probe() function on each plugin.
2018-06-28 13:32:30 +01:00
Richard Hughes
411fcbde43 trivial: Add a hardware test for the AIAIAI H05 2018-06-28 13:29:37 +01:00
Richard Hughes
e4ad057553 trivial: Add a hardware test for the 8Bitdo SF30 Pro hamepad 2018-06-28 13:29:37 +01:00
Richard Hughes
7e43ed191d trivial: Use the correct metainfo ID in the static metadata
This isn't important, but it makes it easier to understand in gnome-software.
2018-06-27 14:07:27 +01:00
Richard Hughes
0b522aef96 colorhug: Do not require libcolorhug to build
Requiring colord to be built before fwupd makes it hard to build packages.

The HID-based flashing protocol is stable and documented, so there's no need
to use an external library for this now.
2018-06-02 21:43:20 +01:00
Richard Hughes
4be17d1364 Add support for relocating various runtime paths
This allows a snap package to be easily built.

With much help from Mario Limonciello <mario.limonciello@dell.com>, many thanks.
2018-05-31 16:25:22 +01:00
Mario Limonciello
1e0d7d95d9 trivial: don't install installed tests in no daemon mode
Even if running the local tests when we build, we still don't want
to install tests into flatpak/snap.
2018-05-30 13:44:17 -05:00
Mario Limonciello
02c738830d trivial: Don't install bash-completion for fwupdmgr in no daemon build 2018-05-30 13:44:17 -05:00
Richard Hughes
e43f832c5d trivial: Make the daemon functionality optional
This is useful when building just fwupdtool in a flatpak.
2018-05-30 14:45:16 +01:00
Richard Hughes
f6dee8d8d5 trivial: Add a OARS content rating
This is required for flathub as fwupd can send the optional firmware report to
the LVFS web service.
2018-05-30 13:18:07 +01:00
Richard Hughes
3848f29e11 trivial: Make the AppStream information reflect the new reality 2018-05-30 11:22:02 +01:00
Mario Limonciello
716ab27c17 Add get-details command to fwupdtool 2018-05-29 13:35:44 -05:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Mario Limonciello
b900c09ced trivial: add bash completion for get-plugins 2018-05-22 16:03:14 -05:00
Richard Hughes
c02ee4da46 Allow whitelisting plugins in fwupdtool
When developing code it's really convenient to only run the new plugin. This
means you don't have to wait for the other hardware to initialize and there
are no side-effects from other plugins when installing firmware.

You can specify multiple plugins as globs, for instance:

    fwupdtool get-devices \
        --plugin-whitelist wacom \
        --plugin-whitelist "thunderbolt*"
2018-05-22 16:03:14 -05:00
Mario Limonciello
e0294c77d6 trivial: Drop removed smbios-dump command for fwupdmgr bash completion 2018-05-22 05:44:52 +01:00
Mario Limonciello
e7d6cdc843 trivial: Add bash completion for fwupdtool 2018-05-22 05:44:52 +01:00
Richard Hughes
8b04e4d16d Add the Linux Foundation public GPG keys for firmware and metadata
In the future the Linux Foundation will be running the LVFS server.

To make this possible, include the Linux Foundation public keys by default as
we already trust them. Obviously the keys need to be available long before
vendors move, so nobody should get too worried at this point.
2018-05-21 20:23:00 +01:00
Richard Hughes
9b7ad9ad62 Do not use the system metainfo location
This means we can avoid loading a ton of non-fwupd files, and reduces our
running RSS from 5.4Mb to 2.8Mb. Old versions of appstream-glib caches a lot of
the localization string data which we just don't care about for firmware files.
2018-05-16 22:38:00 +01:00
Richard Hughes
76e0f94c86 Allow the client tools to avoid writing the history database 2018-05-14 18:54:15 +01:00
Mario Limonciello
78956cc9ff fwupdmgr: Hide devices that aren't updatable by default
They are hidden from get-devices, get-updates, and get-topology
They can be viewed by adding '--show-all-devices' to command line
2018-05-07 14:08:39 -05:00
Richard Hughes
42728c4d5e Add 'fwupdmgr get-topology' to show logical device tree 2018-05-03 08:07:04 +01:00
Mario Limonciello
f6949b4911 Look up bash-completion paths using pkg-config 2018-05-01 16:21:31 -05:00
Mario Limonciello
e00d05d033 Only run certtool if a new enough gnutls was on system and pkcs7 enabled 2018-04-18 10:25:22 -05:00
Richard Hughes
972f6eaba5 Allow customising the warning shown when enabling the remote 2018-04-12 08:17:08 +01:00
Richard Hughes
9e7d69ccb1 Show a warning with interactive prompt when enabling a remote 2018-04-12 08:17:08 +01:00
Richard Hughes
dfd228a132 Add enable-remote and disable-remote commands to fwupdmgr
This makes it easier to enable the LVFS on distributions where it is disabled
by default.
2018-04-12 08:17:08 +01:00
Richard Hughes
612a9c1684 trivial: Use the SSL www-less homepage URL everywhere
Fixes https://github.com/hughsie/fwupd/issues/440
2018-03-14 18:15:17 +00:00
Mario Limonciello
c8d15f924c Show device description when bash completing an argument 2018-03-01 09:27:29 -06:00
Mario Limonciello
ce5ed9ce58 Add bash completion for fwupdmgr 2018-02-28 06:40:59 -06:00
Richard Hughes
4ee0836ff3 Use a CNAME to redirect to the correct CDN for metadata
The current CDN (~$100/month) is kindly sponsored by Amazon, but that won't
last forever. In the future we can switch to a 'dumb' provider like BunnyCDN
for 1/10th of the cost.

Use a CNAME we control to make switching CDN providers easy in the future.
2018-02-22 06:21:17 +00:00
Richard Hughes
321f77a07f Use the default value if ArchiveSizeMax is unspecified in daemon.conf
Fixes: https://github.com/hughsie/fwupd/issues/405
2018-02-14 12:55:45 +00:00
Richard Hughes
c0cd023d31 Be more careful deleting and modifying device history
If this happens:

1.2.3 -> 1.2.4 = failure
1.2.3 -> 1.2.5 = success

...we want to preserve both in the history database so they can both be shared
with the LVFS. Use the device ID and the new and old firmware versions when
modifying and deleting entries.

This fix is made slightly more tricky as we have to drop the PRIMARY KEY
attribute on the device_id, and due to a limitation in SQLite, it means copying
the old history into a new table.
2018-02-07 10:20:19 +00:00
Richard Hughes
50a6f7095c Offer to reboot when processing an offline update
In real user tests this was a pain point where we had to manually explain that
they needed to reboot.
2018-02-03 12:12:15 +00:00
Mario Limonciello
7873532368 Redirect all stderr from installed tests to stdout
The previous fix (db6ed9ede3) didn't
do a good enough job and autopkgtest was still failing on another
individual test.

This makes sure that stderr will never conflict with autopkgtest
in the future.
2018-01-29 14:35:11 -06:00
Mario Limonciello
951f2b548a Revert "data/installed_tests: Redirect stderr to stdout for one of the tests"
This reverts commit db6ed9ede3.
2018-01-29 14:34:57 -06:00
Mario Limonciello
db6ed9ede3 data/installed_tests: Redirect stderr to stdout for one of the tests
The autopkgtest test cases in Debian and Ubuntu are failing due to
output present in stderr.

fwupdmgr behavior however is that it's expected that this test should
show output on stderr for this item.
2018-01-26 10:35:06 -06:00
Richard Hughes
f06ba475b1 Ask the user to refresh metadata when it is very old
Also allow skipping the questions for non-interactive scripts.
2018-01-17 20:22:18 +00:00
Richard Hughes
d29df0819f Allow specifying the reporting server in the remote key files 2018-01-11 20:20:00 +00:00
Richard Hughes
bc3a4e1f57 Store firmware update success and failure to a local database
Rename FuPending to FuHistory to better represent what the object is now doing.
Also, while we're here, switch to using SQLite prepared statements to avoid a
possible invalid read on i386 hardware.
2018-01-11 09:59:34 +00:00
Richard Hughes
5bed9341b4 trivial: Fix self test failure with newer versions of GCab 2018-01-06 22:46:35 +00:00
Richard Hughes
c7bbbc246b Allow specifying the maximum archive size in the daemon config 2018-01-03 07:38:27 +00:00
Richard Hughes
ec2df91c15 Support AppStream metadata with relative <location> URLs
If a remote like LVFS outputs <location>foo.cab</location> without a prepended
hostname and path then we should use the metadata URI hostname and path instead.

This allows us to trivially mirror a firmware repository, although clients using
older versions of libfwupd will not work without this patch. We should encourage
people to use `FirmwareBaseURI` for a long time yet.
2017-12-04 15:46:54 +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
4713f23f7f dfu: Fix attaching AVR32 devices like the XMEGA
Also, add a self test that uses the XMEGA A3BU XPLAINED board, see
https://github.com/hughsie/fwupd-test-firmware/tree/master/AVR/XMEGA-A3BU-XPLAINED-1.23
for more details about how to build the bootloader and firmware.
2017-11-23 18:48:03 +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
5b02c70d93 Move the PIC18 firmware to the fwupd-test-firmware project 2017-11-16 17:49:30 +00:00
Richard Hughes
c0d09c2576 Move the AT90USBKEY firmware to the fwupd-test-firmware project 2017-11-16 17:34:33 +00:00
Richard Hughes
352ba1b833 dfu: Add support for the original AVR DFU protocol
This allows us to flash hardware like the Retrode and other devices using chips
like the AT90USB1287.

The test files can be re-generated using the sample code found here:
https://github.com/hughsie/fwupd-test-firmware and are designed
to be used on the AT90USBKEY2 development board.
2017-11-16 15:30:30 +00:00
Richard Hughes
bf186f26c2 trivial: Use the runtime GUID for the SFC30 gamepad in the hardware tests
To verify, this matches the <firmware> provide in the upstream metainfo file.
2017-11-14 16:01:12 +00:00
Richard Hughes
06a4fe4d9a trivial: Add a hardware tests for two 8Bitdo devices
This only installs one version on to the hardware as a manual step is required.
2017-11-08 11:02:38 +00:00
Richard Hughes
82a025c865 trivial: Add a hardware test for the ColorHug device 2017-11-07 20:09:41 +00:00
Richard Hughes
2ec78d68db Add support for HWID requirements
In the latest version of the LVFS you can restrict the firmware to a specific
machine type, for instance a specific baseboard vendor. This is the same as
done in Microsoft Update using the CHID mechanism.

This commit adds support for the <hardware> requires type, although it needs to
be built against appstream-glib 0.7.4 to be supported and/or tested.
2017-11-03 23:42:57 +00:00
Richard Hughes
9c028f06b5 Move the database of supported devices out into runtime loaded files
When fwupd is installed in long-term support distros it's very hard to backport
new versions as new hardware is released.

There are several reasons why we can't just include the mapping and quirk
information in the AppStream metadata:

 * The extra data is hugely specific to the installed fwupd plugin versions
 * The device-id is per-device, and the mapping is usually per-plugin
 * Often the information is needed before the FuDevice is created
 * There are security implications in allowing plugins to handle new devices

The idea with quirks is that the end user can drop an additional (or replace
an existing) file in a .d director with a simple format and the hardware will
magically start working. This assumes no new quirks are required, as this would
obviously need code changes, but allows us to get most existing devices working
in an easy way without the user compiling anything.

This allows us to fix issues like https://github.com/hughsie/fwupd/issues/265
2017-11-02 19:08:51 +00:00
Richard Hughes
9c0405576b trivial: Add installed tests for the Jabra Speak devices
This makes sure the tests are run on the release-time CI server and prevents
regressions between versions.
2017-10-30 13:37:11 +00:00
Richard Hughes
e56a687d4b trivial: Use the new location for firmware 2017-10-12 09:17:14 +01:00
Richard Hughes
76843bc836 trivial: Fix the hardware self tests to work with the new API 2017-10-12 09:15:53 +01:00
Manuel Rüger
5445dd3b29 trivial: Use absolute-names in tar command for creating test data file
Fixes:
[1/182] /bin/tar --xform 's,.*/,,' --create --file data/tests/builder/firmware.tar ../fwupd-1.0.0/data/tests/builder/source.bin ../fwupd-1.0.0/data/tests/builder/startup.sh
FAILED: data/tests/builder/firmware.tar
/bin/tar --xform 's,.*/,,' --create --file data/tests/builder/firmware.tar ../fwupd-1.0.0/data/tests/builder/source.bin ../fwupd-1.0.0/data/tests/builder/startup.sh
/bin/tar: ../fwupd-1.0.0/data/tests/builder/source.bin: Member name contains '..'
/bin/tar: ../fwupd-1.0.0/data/tests/builder/startup.sh: Member name contains '..'
/bin/tar: Exiting with failure status due to previous errors
2017-10-10 14:15:25 +01:00
Richard Hughes
ba0ec85a44 trivial: Fix $fwupdmgr modify-remote lvfs-testing Enabled true
Failed to create file “/etc/fwupd/remotes.d/lvfs-testing.conf.Q7K76Y”: Read-only file system
2017-09-29 11:34:10 +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
53e04cf508 Prevent fwupd from mounting filesystems
Fixes: https://github.com/hughsie/fwupd/issues/270
2017-09-27 12:41:23 +01:00
Richard Hughes
d3e4e7dcec Revert "Drop CAP_SYS_ADMIN"
This reverts commit 297ea34f1b.
2017-09-27 12:40:28 +01:00
Richard Hughes
7ada7a8678 Add support for SMBIOSv3
Fixes https://github.com/hughsie/fwupd/issues/262
2017-09-20 22:08:21 +01:00
Richard Hughes
34e25a0cc5 trivial: Remove EnableTestSuite from daemon.conf
The same thing can be done using BlacklistPlugins=test
2017-09-19 20:06:44 +01:00
Richard Hughes
10bd8ecfb8 trivial: Remove EnableOptionROM from daemon.conf
The exact same thing can be done using BlacklistPlugins=udev
2017-09-19 20:06:44 +01:00
Richard Hughes
c2af1964b9 trivial: Move /etc/fwupd.conf to /etc/fwupd/daemon.conf 2017-09-19 20:06:44 +01:00
Richard Hughes
297ea34f1b Drop CAP_SYS_ADMIN
Fixes: https://github.com/hughsie/fwupd/issues/98
2017-09-19 12:01:45 +01:00
Richard Hughes
a0de807a61 trivial: Remove the long deprecated DownloadURI config key 2017-09-19 09:54:45 +01:00
Richard Hughes
7769fb8da7 trivial: Add some more FuEngine self tests 2017-09-18 11:12:52 +01:00
Richard Hughes
4f98fe89ba trivial: Use a different SYSCONFDIR for self tests 2017-09-17 08:38:43 +01:00
Richard Hughes
882ab6b4d0 trivial: Add a self tests for the broken metadata bug 2017-09-16 17:53:16 +01:00
Richard Hughes
48ad97fd61 Add a human-readable title for each remote
This allows us to show something useful in a GUI.
2017-09-10 09:08:32 +01:00
Mario Limonciello
c15b126b00 trivial: Don't enable tests in data/tests unless -Denable-tests is set 2017-09-08 09:24:54 +01:00
Richard Hughes
49e5e05aa8 Parse the SMBIOS DMI table directly
The Linux DMI class still does not provide the information we need, and parsing
the blob directly also allows the Dell and Redfish plugins to get the raw data.
2017-09-05 18:10:36 +01:00
Yehezkel Bernat
e6c00362ad thunderbolt: image validation implemented
Fixes: https://github.com/hughsie/fwupd/issues/189

Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
2017-08-30 12:37:34 +01:00
Richard Hughes
07a91a4366 trivial: Use the new LVFS CA certificate
According to the crypto experts, path_len=1 makes things more secure for a CA
to prevent the Sub-CAs from issuing further Sub-Sub-CAs. I'll stick to code.
2017-08-23 15:36:22 +01:00
Richard Hughes
c6afb51e32 Add a FirmwareBaseURI parameter to the remote configs
This allows somebody to mirror the CDN without resigning the metadata files.

Fixes: https://github.com/hughsie/fwupd/issues/186
2017-08-23 14:22:12 +01:00
Richard Hughes
0dea1efb92 Use MetadataURI for both kinds of remote
I think this is clearer having one key for both types of remote.
2017-08-23 14:22:08 +01:00
Richard Hughes
d067ed675e Add a configure switch for the LVFS remotes
On embedded devices these are not required.
2017-08-22 10:37:26 +01:00
Richard Hughes
38c1685c92 Do not install the PKCS7 certificate if installed with -Denable-pkcs7=false 2017-08-21 14:48:58 +01:00
Richard Hughes
f03f386c68 trivial: Add a test for firmware signed with a derivative of the LVFS key
This also switches around the test for the self signed key to now fail, as the
generated certificate is no longer loaded into the trust list. This is a more
useful test as it more accurately represents what the fwupd daemon is doing.

As a side-note the detached signature from the derivate cannot be generated
using `--no-p7-include-cert` as only the main LVFS-CA certificate is shipped
with fwupd.
2017-08-18 12:11:59 +01:00
Richard Hughes
7ce6c93bf5 Install the LVFS PKCS7 certificate
This allows LVFS instances signed by the master key to distribute metadata and
firmware without using GPG and instead using PKCS7 certificates.
2017-08-18 11:10:15 +01:00
Richard Hughes
14047d7d24 trivial: Split up the keyring setup and public key adding 2017-08-18 11:10:03 +01:00
Richard Hughes
f69a4810fa Return the authority and timestamp as part of the signing validation
This means we return an error when encountering a rollback attack. This can
currently be performed by providing the old metadata and old signature when
calling into UpdateMetadata.
2017-08-17 16:15:47 +01:00
Mario Limonciello
38d7f13976 Allow configuring systemd and udev directories (Fixes: #176) 2017-08-16 17:02:32 -05: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
049ccc8f6c Add a helper function to spawn a subprocess
This allows us to watch the output of a flashing tool and screen-scrape the
progress completion.
2017-08-09 15:35:58 +01:00
Richard Hughes
41cbe2aab3 Add a firmware builder
This runs a script inside the firmware archive to generate firmware specific to
the machine. This uses bubblewrap to protect the local machine.
2017-08-09 10:33:39 +01:00
Richard Hughes
2d95a71a0c Support embedded devices with local firmware metadata
In this mode, both the metadata and firmware is stored on the local filesystem
and distributed using a distribution system like OSTree.

Fixes https://github.com/hughsie/fwupd/issues/162
2017-07-28 17:41:24 +01:00
Richard Hughes
3745e8e481 trivial: Fix spelling of delimiter 2017-07-18 10:20:59 +01:00
Mario Limonciello
ef2079b20a trivial: clarify delimitter in use for fwupd.conf is a semicolon 2017-07-17 14:50:17 -05:00
Mario Limonciello
5033d9c92e Add capability to enable test suite via /etc/fwupd.conf 2017-07-17 14:45:51 -05:00
Richard Hughes
55e0207b96 trivial: Add installed firmware tests for the K780 2017-07-03 20:17:43 +01:00
Richard Hughes
c4195b075d trivial: Add an installed test for the K780 2017-06-28 12:05:32 +01:00
Richard Hughes
433fbb4574 trivial: Do not cache junk if the LVFS returns 404 2017-06-28 12:05:32 +01:00
Mario Limonciello
cca4297153 trivial: Switch installedtests from python2 to python3 2017-06-22 13:42:59 -05:00
Richard Hughes
25f6a42f26 trivial: Fix the location of the hardware installed test cache 2017-06-22 19:03:52 +01:00
Richard Hughes
62e7393edf Add some installed tests which require specific hardware 2017-06-22 09:36:32 +01:00
Richard Hughes
71e73ca048 trivial: Fix the installed tests
We ony want to replace the fake LVFS metadata with the real data after we've
downgraded the dummy device.
2017-06-16 17:21:17 +01:00
Richard Hughes
0a87f6fb03 Store the metadata files rather than merging to one store
Now we have multiple remotes that can be enabled or changed at runtime we need
to do several things better:

* Only load components from remotes that are enabled

* Only load a component if a higher priority remote has not already added it

Rather than just appending all recieved metadata into one big XML file, save
the original metadata .xml.gz files in /var/lib/fwupd/remotes.d and only load
them in the correct priority order if the remote is known and enabled.

Remove the old /var/cache/app-info/xmls/fwupd.xml file, also noting it wasn't
really a cache file at all but actually something quite important.
2017-06-16 16:43:13 +01:00
Richard Hughes
f0bde3e4af Add a get-remotes command to fwupdmgr
This allows the user to show the configured remotes.
2017-06-16 14:31:20 +01:00
Richard Hughes
a71e0a71f6 Allow ordering the metadata remotes
This allows us to load one metadata source file before or after another.
2017-06-16 12:40:24 +01:00
Richard Hughes
bbde1df44f Fix downgrades when version_lowest is set
Also, add some tests to test this with the dummy device.
2017-06-16 12:40:15 +01:00
Richard Hughes
8a870d0399 trivial: Ensure there are no updates after the update is applied 2017-06-16 12:40:10 +01:00
Richard Hughes
b7bf715435 Add an installed test for device update
This also moves the tests into one file as gnome-desktop-testing-runner
intentionally randomizes the order and runs them in parallel where allowed.
Since tests like get-updates have to be run after the metadata injection simply
put these into one test that calls a simple script.
2017-06-15 20:19:03 +01:00
Richard Hughes
ae7e0d21b2 Add an installed test for verification 2017-06-15 16:23:52 +01:00
Richard Hughes
038ab7dcb2 Add an AppStream metainfo file
This seems like the right thing to do, and also means we *could* move the NEWS
data in the future.
2017-06-15 12:53:33 +01:00
Richard Hughes
bacbac1245 Add some installed tests that use the daemon
Functionality like this would have prevented the "(shh)" bug being included in
the last release.
2017-06-14 15:36:08 +01:00
Richard Hughes
ad9b22480a trivial: Fix missing test files
Resolves: https://github.com/hughsie/fwupd/issues/129
2017-06-07 17:08:49 +01:00