Commit Graph

167 Commits

Author SHA1 Message Date
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