Commit Graph

328 Commits

Author SHA1 Message Date
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
Richard Hughes
dfed515573 Allow downloading metadata from more than just the LVFS
Add the concept of 'remotes' that can dropped into /etc and used as firmware
metadata sources. This may be desirable when firmware is only accessable with
a valid support contract or from behind a VPN.
2017-06-02 13:19:05 +01:00
Eric Koegel
23603f0452 Add support for ConsoleKit2
Make systemd and ConsoleKit support an optional compile time flag
with both enabled by default. If both are used, the ifdef/elif will
ensure only the systemd calls are used so there's no conflict.
2017-06-01 09:00:16 +01:00
Richard Hughes
2d8a7958b2 trivial: Get the pkg-config variables rather than hardcoding 2017-04-19 14:51:59 +01:00
Richard Hughes
a9a99bdb48 Actually use /usr/libexec/fwupd/fwupd
It appears the enormity of replacing a directory with a file is just too much
for package managers in 2017.

I guess we might ship other things in /usr/libexec/fwupd/ in the future.
2017-04-19 08:50:52 +01:00
Mario Limonciello
ff8a02f9f9 trivial: Do not use the prefix for localstatedir
Signed-off-by: Richard Hughes <richard@hughsie.com>
2017-04-19 08:41:09 +01:00
Richard Hughes
05ede65e24 Add a config option to allow runtime disabling plugins by name
See https://github.com/hughsie/fwupd/issues/110
2017-04-16 09:11:39 +01:00
Richard Hughes
1fdb335025 Remove the automake build system 2017-04-13 18:42:08 +01:00
Richard Hughes
c388002b72 trivial: Fix under-dep issue with 'ninja test' 2017-04-12 18:08:49 +01:00
Richard Hughes
57746cb839 Add the Meson build system as an alternate to autotools
Automake and autoconf are impossible to fully understand and Meson now provides
everything we need for a much smaller, faster, and more understandable build.

See http://mesonbuild.com/ for more information.
2017-04-12 16:35:18 +01:00
Richard Hughes
f41d3956a8 trivial: Fix the ExecStart path
This fixes a regression from a1585c6b7f.
2017-04-12 16:34:45 +01:00
Richard Hughes
a1585c6b7f Install the daemon in libexecdir
I know Debian doesn't use libexecdir, but most other distros do. On Fedora it's
really strange to see a binary in /usr/libexec/fwupd/fwupd and supporting this
not-quite-servicedir is causing confusion in the Makefiles and also problems in
other external tools.

Simply redefine libexecdir if you need the daemon binary to be installed
somewhere different.
2017-04-12 14:38:34 +01:00
Mario Limonciello
332415d378 trivial: make /boot/efi an optional ReadWritePath (#97) 2017-02-28 08:24:40 -06:00
Shea Levy
345a7b7f3d Only try to mkdir the localstatedir if we have the right permissions (#96) 2017-02-27 20:41:58 -06:00
Mario Limonciello
5b6103ce97 trivial: allow configuring ESP location (#94) 2017-02-27 10:39:50 -06:00
Mario Limonciello
ec7f3ab02e trivial: install /var/lib/fwupd in make install (#94) 2017-02-27 10:36:50 -06:00
Richard Hughes
6c898739c9 Really remove the NoNewPrivileges systemd confinement
Even with the other changes this is still required for me on Fedora 25.
2017-02-24 10:56:39 +00:00
Mario Limonciello
20c112a891 Adjust systemd confinement restrictions
commit 99b317d4f7 introduced much
more strict confinement. This actually caused some regressions
though.

commit 3c54edb15e tried to fix
one of the problems, but didn't cover the rest.

The actual changes:
- Drop PrivateUsers=yes
  This is causing crashes when initializing libsmbios
  Presumably it's related to accessing memory.
- Add back in NoNewPrivileges
  This hasn't caused any crashes for libsmbios for me.
- Remove ProtectKernelTunables
  This is needed to access /sys for the dcdbas kernel
  module used by libsmbios.  Calls fail without it
- Add ReadWritePaths=/var/lib/fwupd /boot/efi
  The refresh function was failing the first time due to
  ProtectSystem=full being in effect and /var/lib/fwupd
  being read only
  Flashing UEFI capsules was failing due to being unable
  to write to /boot/efi/EFI/$(EFIDIR)/fw/
2017-02-23 15:13:24 -06:00
Richard Hughes
3c54edb15e Do not fail to start on Dell hardware
For some reason NoNewPrivileges=yes causes the process to be killed when run on
hardware specifically from Dell. I can reliably reproduce this on my XPS 13 and
I assume it's something to do with libsmbios.
2017-02-21 09:36:49 +00:00
Richard Hughes
2b27893e66 trivial: Move the ConditionPathExists to the right file
*This* is why we were getting confused.
2017-02-13 12:50:01 +00:00
Richard Hughes
9d4c3e6cb7 Fix fwupdmgr timeout with missing pending database
It seems systemd now requires the database to exist before allowing the service
to be D-Bus activated.

Fixes: https://github.com/hughsie/fwupd/issues/92
2017-02-13 09:52:38 +00:00
Richard Hughes
74702297b2 Move the Option ROM parsing to the Udev plugin 2016-12-15 17:09:38 +00:00
Richard Hughes
99b317d4f7 Use more restrictive settings when running under systemd 2016-12-14 13:05:03 +00:00
Mario Limonciello
803e4808af Disable PrivateNetwork on systemd service
commit e34654e1 caused a regression that hotplugging devices no
longer worked.

Disabling systemd PrivateNetwork confinement resolves this.
2016-12-13 15:28:02 -06:00
Richard Hughes
cff38bcb3a Convert the providers to plugins to simplify code and for future features
This is a large commit that removes all the providers and turns them into
plugins. I think having both providers _and_ plugins was super confusing.

Plugins are loaded at runtime so you could in theory develop a new plugin
without putting it in the fwupd source tree, although there are no installed
headers or PC files as I'm not sure it's a good idea at this stage.

This commit moves all the per-provider docs, tests, notes, debug dumps and test
data to plugin-specific directories -- these also allows the plugin author to
"own" more of the source tree so we don't enforce fu- prefixes and the style
guide everywhere.

This allows us to run the same action on all the plugins in the future, so we
could have a prepare(FuPlugin, FuDevice) and cleanup(FuPlugin, FuDevice) run
on *all* plugins, so doing an update using one plugin would allow us to work
around hardware quirks in other plugins.

If I've broken your out-of-tree provider it's trivial to port to the new API
with sed and a fixed up build file. If you need help please let me know.
2016-12-12 12:31:23 +00:00
Richard Hughes
d8e8134bdf trivial: Move the libdfu test files to under libdfu 2016-12-12 11:17:11 +00:00
Richard Hughes
28bbab532a Unexport libebitdo
Nothing is ever going to use this except fwupd, so it makes no sense adding the
extra overhead.
2016-12-09 09:56:31 +00:00
Paul Wise
e34654e17f Uncomment SystemdService parameter in the dbus service file. (#74)
Without this the fwupd process will leak into the dbus cgroup.
2016-11-23 08:04:28 +00:00
Richard Hughes
5c628e2955 trivial: Make the AppStream file validate 2016-10-03 15:21:38 +01:00
Richard Hughes
bf59e265bc Write the ELF files with the correct section type
This should fix a compile failure on s390x.

Resolves: https://github.com/hughsie/fwupd/issues/63
2016-08-31 10:30:48 +01:00
Richard Hughes
3667ee7b22 libdfu: Add initial ELF reading and writing support 2016-08-26 18:44:00 +01:00
Richard Hughes
14d176499d Handle the 8Bitdo bootloader in a better way 2016-08-17 17:46:15 +01:00
Richard Hughes
0abde9c39a Fix writing 8Bitdo device firmware 2016-08-16 16:40:58 +01:00
Richard Hughes
96e1ea6b26 Switch to the Amazon S3 CDN for firmware metadata
This is much more scalable than millions of clients hitting a single
OpenShift instance.
2016-08-11 18:25:46 +01:00
Richard Hughes
535a5b9746 Get the firmware version correctly from 0Bitdo gamepads 2016-08-11 15:36:44 +01:00
Richard Hughes
6923396e68 trivial: Fix the component merge type on the steelseries plugin 2016-08-11 15:36:05 +01:00
Richard Hughes
9a52c5ed2c Allow blacklisting devices by their GUID
Fixes: https://github.com/hughsie/fwupd/issues/10#issuecomment-233207616
2016-07-18 09:17:02 +01:00
Mario Limonciello
867b68894a trivial: Add a Documentation key to systemd units 2016-07-01 15:46:29 -05:00
Richard Hughes
c1a08c75d8 Support returning multiple GUIDs from GetDetails 2016-05-25 09:47:40 +01:00
Richard Hughes
b08fcebab4 trivial: Remove the now-unused .inf from the example cab file 2016-05-25 09:34:38 +01:00
Mario Limonciello
f4e0e88f7c Add summary and name field for Rival SteelSeries
Fixes: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1575248
2016-04-28 09:00:28 -05:00
Richard Hughes
5883ccae57 Add a plugin for SteelSeries hardware 2016-03-14 14:56:11 +00:00
Richard Hughes
9a410ce459 Add an unlock method for devices
This is based on an idea from Mario Limonciello which can be used to enable a
PCI OptionROM read, or possibly enable ESRT functionality.
2016-03-02 10:17:02 +00:00
Richard Hughes
bdb62db907 Install the hardcoded firmware AppStream file
This currently contains a few USB 3.0 chips which we know about, but can't
actually update ourselves.
2016-02-29 11:20:26 +00:00
Richard Hughes
032596e800 libdfu: Fix several reported crashes in the inhex32 import code
This also adds the ability to write simple Intel HEX files too.
2015-12-06 16:27:16 +00:00
Richard Hughes
7c37e55459 libdfu: Add support for the draft 'DFU Metadata Table Specification' 2015-12-04 16:01:40 +00:00
Richard Hughes
4545dd70af libdfu: Add DfuCipher which is a property on a target and a firmware file
At the moment we're not doing anything smart other than looking at the
firmware filename, but in the future we might do something better.
2015-12-04 12:58:05 +00:00
Richard Hughes
a3acd7f711 Add support for updating USB devices with DFU
This adds a private libdfu library and also a small utility program called
dfu-tool.
2015-11-12 17:32:48 +00:00
Richard Hughes
46b329d58c trivial: Use the new AppStream format for the VIA firmware 2015-09-10 14:45:36 +01:00
Richard Hughes
5c35abb1a5 Remove fwsignd, we have the LVFS now 2015-08-27 14:45:42 +01:00
Richard Hughes
a80f1db36e trivial: Add a note about testing firmware 2015-08-25 13:45:10 +01:00
Kalev Lember
8209c1158a Update the offline update service to invoke right command
Commit e97261ab3d renamed fwupdmgr
'update-prepared' command to 'install-prepared'; this commit updates
fwupd-offline-update.service for the rename.
2015-08-21 11:48:09 +02:00
Richard Hughes
b990ceefee Use the new secure metadata URI
We're out of beta testing stage now...
2015-08-20 08:09:00 +01:00
Mario Limonciello
001558db63 Install fwupd and fwsignd into /usr/lib/$(triplet)/fwupd instead.
Fixes https://github.com/hughsie/fwupd/issues/29
2015-08-14 18:58:33 -05:00
Richard Hughes
ff7e6ceb98 Generate the ColorHug test files at runtime
Also, fix the firmware.inf to have the correct ClassGuid.
2015-08-12 09:09:28 +01:00
Richard Hughes
25cf6ab53e Add a Raspberry Pi firmware provider
This queries the current firmware version and also allows online or offline
updating.
2015-08-05 12:14:56 +01:00
Richard Hughes
804c075fee Make parsing the option ROM runtime optional
On devices with a lot of PCI devices this can take a couple of seconds per
device, and if this feature is not desired then disabling it saves system
resources.
2015-08-04 14:56:39 +01:00
Richard Hughes
ac8b192033 Add a simple config file to store the correct LVFS download URI 2015-08-04 14:56:39 +01:00
Richard Hughes
a245841335 trivial: Always enable fwsignd when doing 'make distcheck' 2015-07-29 15:30:57 +01:00
Richard Hughes
04ee5856d0 Sign the test binary with the correct key
Use the LVFS key rather than my own GPG key, and load that in the self tests.

Fixes https://github.com/hughsie/fwupd/issues/14
2015-07-28 09:47:03 +01:00
Richard Hughes
23b500a3af Allow fwupd to be autostarted by systemd 2015-07-27 15:49:48 +01:00
Richard Hughes
ecbc06ff3d trivial: Add fwsignd systemd service file which was not added 2015-07-22 10:03:36 +01:00
Richard Hughes
ebaf7ba035 Allow running fwsignd as the non-root user
...however, most users will still want to use the root user so that the owner
and group are set correctly on the destination files.
2015-07-21 13:24:26 +01:00
Richard Hughes
0bdd5cbcb8 Use the actual LVFS GPG key 2015-07-21 13:24:26 +01:00
Richard Hughes
691e02d652 Add a simple signing server that operates on .cab files 2015-07-20 15:31:10 +01:00
Richard Hughes
861d0984d5 Do not use the subsystem information when constructing the fake GUID
This allows us to match the device with the standalone firmware.
2015-07-01 11:45:25 +01:00
Richard Hughes
4b41e737b1 Make the ROM parsing more robust and add self tests
This code can now parse 99.6% of all the user-submitted firmwares from the
http://www.techpowerup.com/vgabios/ database.
2015-06-30 14:00:31 +01:00
Richard Hughes
a1e5d86d20 Extract the version string from the ROM in PCI devices 2015-06-29 12:53:01 +01:00
Richard Hughes
ebb58a3495 Add a Udev firmware provider
This allows us to support showing firmware updates for VIA USB hubs
2015-06-29 12:53:01 +01:00
Yanko Kaneti
afa912bf67 Fix fwupd-offline-update.service
data/fwupd-offiline-update.service is not in AC_CONFIG_FILES so make sure to substitute bindir
2015-06-29 13:47:49 +03:00
Richard Hughes
ae0efdc5a7 Provide a way for clients to add new firmware metadata to the system cache
This is only possible if the metadata has been signed by a key that we trust.
2015-06-25 09:59:53 +01:00
Richard Hughes
274818a11e trivial: Actually install the systemd service files 2015-04-27 11:10:03 +01:00
Richard Hughes
d8a02bfeeb Run the offline actions using systemd when required 2015-04-25 17:14:20 +01:00
Richard Hughes
36a889034c Add helper code to validate public key signatures
We'll use this in the future for checking device firmware.
2015-04-14 13:53:19 +01:00
Richard Hughes
8ccb1af4fe trivial: Use the ALS firmware with signed payload 2015-04-14 13:44:35 +01:00
Richard Hughes
ac9721399a Add a systemd service file 2015-03-16 13:07:31 +00:00
Richard Hughes
310419856b trivial: Add some files ready for a first release 2015-03-16 12:51:04 +00:00
Richard Hughes
74cc217f9d Support online updates
This doesn't make sense for UEFI firmware, but allows us to support other
future usecases.
2015-03-01 20:33:54 +00:00
Richard Hughes
8dbfb1c478 Add initial build files and enough code to launch a simple D-Bus daemon 2015-02-26 18:16:40 +00:00