Commit Graph

328 Commits

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