Richard Hughes
5c35abb1a5
Remove fwsignd, we have the LVFS now
2015-08-27 14:45:42 +01:00
Richard Hughes
98dd640f41
Don't apply firmware if something else is processing the offline update
...
This also stops us rebooting the computer a few seconds into a PackageKit
offline update...
2015-08-25 14:07:48 +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
ba14582ef4
Use the AppStream 0.9 firmware specification by default
2015-08-11 14:34:08 +01:00
Richard Hughes
76d14e1a03
trivial: Use the new libappstream-glib API where available
2015-08-10 09:29:18 +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
e00d70dabe
trivial: Fix compile with AppStreamGlib git master
2015-08-04 14:44:37 +01:00
Richard Hughes
c6ff8fa574
Move the verification and metadata matching phase to the daemon
...
This allows us to use the functionality in gnome-software or cockpit without
loading the system AppStream store.
2015-08-03 18:00:54 +01:00
Richard Hughes
9985a24a29
Fix validation of written firmware
...
It turns out comparing sha1{firmware.cab} and sha1{firmware.bin} doesn't match.
Require appstream-glib 0.5.x for the new API required to fix this.
2015-08-03 13:22:34 +01:00
Richard Hughes
d51173d448
Allow no arguments to 'fwupdmgr verify-update' and use sane defaults
...
Reading firmware from devices and writing to the default path will typically
require authentication.
2015-07-30 19:56:04 +01:00
Richard Hughes
40b6b3f597
Prefer the GUID from the firmware than the device
...
The firmware may be more generic, and it also allows us to match the GUID then
doing 'verify' on a device with a different device PID than the firmware
actually declares.
2015-07-30 18:41:39 +01:00
Richard Hughes
a7c99b54ea
Devices with option ROM are always internal
2015-07-29 15:55:48 +01:00
Richard Hughes
441785d215
trivial: Fix up some harmless lint, no code changes
2015-07-28 14:56:19 +01:00
Richard Hughes
eaa09993b0
trivial: Remove some unused code found by clang
2015-07-28 14:05:26 +01:00
Richard Hughes
fe8b96e74e
Do not pre-convert the update description from AppStream XML
...
This allows the text clients like fwupdmgr to convert to UTF-8 text, and
graphical clients can use the markdown target to ensure the links are made
clickable and paragraphs are presented in the right way.
2015-07-28 13:13:41 +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
Thomas Hindoe Paaboel Andersen
1058ce8155
trivial: remove unused variables
2015-07-27 00:24:01 +02:00
Richard Hughes
31477cf4e7
trivial: Fix make distcheck
2015-07-25 14:51:36 +01:00
Mario Limonciello
3ed5447c92
Reload appstream data after refreshing.
2015-07-23 19:01:15 -05:00
Mario Limonciello
a570bb5195
Fallback to offline install when calling the update argument.
...
The fallback support is currently only present in the regular
install argument.
Signed-off-by: Richard Hughes <richard@hughsie.com>
2015-07-23 20:40:52 +01:00
Richard Hughes
0950db9340
Only sign files when the entire file has been copied
...
For large files, EVENT_CREATED gets emitted when the first chunk hits the disk,
not when the file has finished copying. To fix, just wait for the file monitor
to hint that all the changes in the operation have happened and then process
the firmware files.
2015-07-23 09:15:28 +01:00
Richard Hughes
e70f12af9e
trivial: Allow parsing unsigned firmware
2015-07-22 17:42:41 +01:00
Richard Hughes
e97261ab3d
trivial: rename 'update-metadata' to 'refresh' now we have an 'update' command
2015-07-22 10:36:00 +01:00
Richard Hughes
777917ef21
Add a 'fwupdmgr update' command to update all devices to latest versions
...
This downloads the latest version of the firmware and applies it to any
matching hardware. e.g.
$ fwupdmgr update
Downloading 1.2.3 for ColorHug...
Updating 1.2.3 on ColorHug...
* Loading firmware
* Decompressing firmware
* Restarting device
* Writing firmware to device
* Verifying firmware from device
* Restarting device
Done!
2015-07-22 10:36:00 +01:00
Richard Hughes
ade063b0df
Allow installing an offline UEFI update without --offline
...
The way this works is we try with the user settings, and if this fails with
NotSupported and the offline flag is unset then we retry the action with a
warning and the flag manually set.
I chose to do this in the client rather than the daemon as I don't want to
encode too many magic rules when we don't know the kind of devices that will
appear in the future.
Fixes the other half of https://github.com/hughsie/fwupd/pull/23
2015-07-22 10:36:00 +01:00
Richard Hughes
63a407ab34
Change the DBus method for installing firmware to 'Install'
...
It seems a little odd to call it 'Update' when it's being used for downgrading
and reinstalling as well.
As we're making things simpler, just use a single 'install' action in fwupdmgr
rather than 'install', 'update-online', 'update-offline'. We can use the flags
and fallbacks to do the right thing in all cases, and make the typical case
(installing a local file to any matching hardware) simple.
Fixes half of https://github.com/hughsie/fwupd/pull/23
2015-07-22 10:36:00 +01:00
Richard Hughes
7708a0f3fd
Move GetUpdates to the daemon
...
This only returns the latest version, if you actually need to know details
about all versions including downgrades then you still need to load the
AppStream metadata and match devices manually.
2015-07-22 10:35:05 +01:00
Richard Hughes
2b60a33c8f
Do not merge existing LVFS metadata
...
If we change the filenames or hash values we don't want duplicate locations.
2015-07-21 17:19:54 +01:00
Richard Hughes
0b8d461099
trivial: Use the correct error codes when failing to download metadata
2015-07-21 13:27:10 +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
Mario Limonciello
28b8151ca0
Don't call efibootmgr after fwupdate.
...
fwupdate will handle creating the appropriate BootNext entry.
No other changes are needed from fwupd.
Signed-off-by: Richard Hughes <richard@hughsie.com>
2015-07-20 16:21:24 +01:00
Richard Hughes
c7cf166a2f
Automatically download metadata using fwupdmgr if required
...
Using no arguments to 'fwupdmgr update-metadata' means we use the network.
2015-07-20 16:19:20 +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
1a886b1b76
Allow cab files to be saved
...
This means reworking the way we load the file as we have to keep the full
filelist in case we have to re-extract and save each and every file.
2015-07-20 15:31:05 +01:00
Richard Hughes
eec19e760d
Add the ability to create detached signatures
2015-07-20 15:30:48 +01:00
Richard Hughes
8ffbd403cb
Fix ROM PPID searching to work for all ROMs
2015-07-08 14:28:53 +01:00
Richard Hughes
f720e9fe92
trivial: Do not add an extra ROM section for a NUL padded ROM
2015-07-05 21:13:43 +01:00
Richard Hughes
fe68ff584f
Make the version parsing more resilient to corrupt firmware
2015-07-03 12:37:56 +01:00
Richard Hughes
53fc7961dc
trivial: Remove a magic number introduced with the last patch
2015-07-01 14:12:15 +01:00
Richard Hughes
885128a7c8
Keep hitting the hardware until it gives us enough ROM
2015-07-01 14:06:28 +01:00
Richard Hughes
5e330b0f0c
Fix trivial bug when parsing firmware versions
2015-07-01 13:30:23 +01:00
Richard Hughes
46535115ee
trivial: Remove debug info that snuck in
2015-07-01 13:05:01 +01:00
Richard Hughes
5dc6f5ccfc
Add a 'verify-update' command to fwupdmgr
...
This allows us to do something like:
$ fwupdmgr verify
e9b8eebd-b5f8-18d4-9fbd-d7da7711985c f21e1d2c969dedbefcf5acfdab4fa0c5ff111a57 No metadata
$ find /sys/devices -name rom -exec sudo fwupdmgr verify-update /var/cache/app-info/xmls/fwupd-verify.xml {} \;
$ fwupdmgr verify
e9b8eebd-b5f8-18d4-9fbd-d7da7711985c f21e1d2c969dedbefcf5acfdab4fa0c5ff111a57 OK
$ # flash the firmware
$ fwupdmgr verify
e9b8eebd-b5f8-18d4-9fbd-d7da7711985c 5c946b3950deaf7b102e75be488052afd4dcf16 Failed: for v013.012.000.019.000000 expected f21e1d2c969dedbefcf5acfdab4fa0c5ff111a57
2015-07-01 12:16:09 +01:00
Richard Hughes
826a5698e3
trivial: Always return the verification hash for the first verify run
...
The property is being cached, so re-request the list of devices.
2015-07-01 12:07:07 +01:00
Richard Hughes
5e33bccd54
Accept multiple files at one time when using fwupdmgr dump-rom
2015-07-01 11:53:33 +01:00
Richard Hughes
c14aa63c25
Actually parse the PCI option ROM
...
This allows us to get more details about the firmware.
2015-07-01 11:52:02 +01:00
Richard Hughes
84e1efa65e
trivial: Split out the GUID functionality to a new file
2015-07-01 11:50:38 +01:00
Richard Hughes
7d7a2d3227
trivial: Fix a crash with corrupt firmware files
2015-07-01 11:46:23 +01:00
Richard Hughes
c15cd320b6
Fix Intel VBIOS detection on Dell hardware
...
Many thanks to Gerben Welter for reporting the problem.
2015-06-30 20:54:05 +01:00
Thomas Hindoe Paaboel Andersen
7fca610d67
Do not return NULL as a gboolean
2015-06-30 21:00:56 +02:00
Thomas Hindoe Paaboel Andersen
80b85676bb
remove unused variables
2015-06-30 20:47:15 +02:00
Jussi Kukkonen
ebfbad71e3
build: gusb is required even without colorhug
...
Fix build failure when building with --disable-colorhug.
2015-06-30 19:45:31 +03:00
Richard Hughes
174211b979
Provide a way to dump the option ROM using the command line
...
This allows someone to do:
$ find /sys/devices -name rom -exec sudo fwupdmgr dump-rom {} \;
...and get a nice summary of the option roms installed.
2015-06-30 15:40:46 +01:00
Richard Hughes
ac32a2a232
trivial: Fix a crash if the rom filename is invalid
2015-06-30 15:36:36 +01:00
Richard Hughes
ffd5fdf7f2
Get the version number out from Intel VBIOS too
2015-06-30 15:12:28 +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
a043c2e376
Add a 'verify' command that verifies the cryptographic hash of device firmware
...
Goes some way towards fixing https://github.com/hughsie/fwupd/issues/15
2015-06-29 12:53:01 +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
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
f0d6c86df2
trivial: Print the command message even for internal error
2015-05-21 13:42:10 +01:00
Richard Hughes
d7dba98e68
Move boolean properties on the device to a set of flags
...
This is much less boilerplate and allows us to expand in the future.
2015-05-05 16:02:20 +01:00
Richard Hughes
c89c1b0e9b
Support OpenHardware devices using the fwupd vendor extensions
...
We won't be able to update these devices ourself, but we can detect if there
are updates available.
2015-05-05 15:22:00 +01:00
Richard Hughes
3b0be1b8bb
Get the firmware version from the device descriptors
...
Not claiming the interface means we can avoid blocking other applications just
to get the current firmware version.
See https://blogs.gnome.org/hughsie/2015/04/29/updating-openhardware-firmware-2/
for more details about what is required from firmware.
2015-04-29 16:37:49 +01:00
Richard Hughes
d8a02bfeeb
Run the offline actions using systemd when required
2015-04-25 17:14:20 +01:00
Richard Hughes
fd4688408d
Coldplug the devices before acquiring the well known name
...
This prevents getting no added devices when 'fwupdmgr get-devices' autostarts
the fwupd process.
2015-04-22 16:44:10 +01:00
Richard Hughes
adb7a5e29b
Extract the .cat file alongside the firmware
2015-04-16 12:02:37 +01:00
Richard Hughes
63bbbf544f
Only allow signed firmware to be upgraded without a password
...
This does not affect UEFI capsule updates as the signing is checked by the
machine itself. We don't know anything about the trust level at all because
NIST SP800-147 pretty much says we're not allowed to.
For BIOS or ColorHug updates however we really do need to request authentication
before downgrading or installing non-signed code.
At the moment only the Hughski Limited key is trusted for firmware, although I
hope in the future we can also include Red Hat, Microsoft, Intel, AMD and other
hardware vendors in that list too.
Fixes: https://github.com/hughsie/fwupd/issues/5
2015-04-14 16:19:39 +01:00
Richard Hughes
d8fa049693
Show the firmware trust status when doing GetDetails()
2015-04-14 15:57:08 +01:00
Richard Hughes
8a08f9d8f3
Verify firmware if a detached signature is present
2015-04-14 15:41:44 +01:00
Richard Hughes
683b0e0def
Decompress any firmware signatures in the .cab file
2015-04-14 15:08:24 +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
d34d7d9643
trivial: Fix a tiny compile warning
2015-04-08 19:47:41 +01:00
Richard Hughes
8818151196
Export the status as an enumerated value rather than a string
2015-03-19 10:57:44 +00:00
Richard Hughes
f910ac9541
trivial: Also export the status enum codes
2015-03-19 10:54:06 +00:00
Richard Hughes
8645ec9ad5
Create a libfwupd shared library
2015-03-19 10:54:05 +00:00
Richard Hughes
d3c0a70b37
Create runtime directories if they do not exist
2015-03-19 10:31:23 +00:00
Richard Hughes
0e883ee815
Add and document the offline-update lifecycle
...
Also allow providers to override getting and clearing the last update status.
2015-03-19 10:31:23 +00:00
Richard Hughes
871e017bdb
Add a 'get-updates' command to fwupdmgr
...
This matches the devices from the AppStream metadata and displays new releases.
2015-03-17 21:00:21 +00:00
Richard Hughes
9a38c03fe2
Do not crash when there are no devices to return
2015-03-17 20:58:46 +00:00
Richard Hughes
7c3485bc1b
trivial: Make a translated string a little clearer
2015-03-17 07:56:31 +00:00
Richard Hughes
8ded6ca0f1
trivial: Mark some more strings as translatable
...
Also fix up some translator comments.
2015-03-16 12:51:43 +00:00
Richard Hughes
310419856b
trivial: Add some files ready for a first release
2015-03-16 12:51:04 +00:00
Richard Hughes
31ddb97066
trivial: Relax the BRs so we can build in Fedora 22
2015-03-16 11:38:03 +00:00
Richard Hughes
bbac6d7932
Return some more fields when returning data about firmware files
2015-03-12 11:41:20 +00:00
Richard Hughes
8152e208d5
Use the metainfo.xml in the .cab file when it's available
2015-03-11 22:01:47 +00:00
Richard Hughes
45255952b7
Use efibootmgr to automatically boot the UEFI firmware update process
2015-03-11 21:34:40 +00:00
Richard Hughes
28cf0a8d1b
trivial: Fix crash when installing UEFI firmware
2015-03-11 20:33:11 +00:00
Richard Hughes
d7022b50e6
Emit ::Changed() when devices are added or removed
...
This allows clients to reget any available updates.
2015-03-11 19:47:08 +00:00
Richard Hughes
1e59872733
Port to the new fwupdate API
2015-03-10 17:32:20 +00:00
Richard Hughes
3bf9480d34
Parse the firmware name when exploding the cab file
2015-03-10 15:57:30 +00:00
Richard Hughes
dd2c776c0a
trivial: Fix the ColorHug display names
2015-03-10 09:48:00 +00:00
Richard Hughes
773ce988e8
Add a 'Status' property which is updated when the daemon is active
2015-03-09 22:43:25 +00:00
Richard Hughes
a8e8394b70
Do not require the root password to update removable devices
2015-03-09 22:43:25 +00:00
Richard Hughes
184232918d
Do not require authentication to update devices when the root user
2015-03-09 22:43:25 +00:00
Richard Hughes
cccc775b60
Add a method to get details about a firmware file
2015-03-09 11:04:32 +00:00
Richard Hughes
d079b1a6ca
Allow installing firmware without a specified device ID
2015-03-06 10:09:55 +00:00
Richard Hughes
18e7591104
Use fwup.h to actually implement the UEFI update
2015-03-05 13:56:56 +00:00
Richard Hughes
6af9e50c7d
Delete the pending firmware file after it has been used
2015-03-05 13:56:56 +00:00
Richard Hughes
003e4bf9b7
Check the firmware is valid for the device before applying
2015-03-05 13:38:39 +00:00
Richard Hughes
3c99ba4d3c
Make both the ColorHug and UEFI support optional
2015-03-05 12:17:48 +00:00
Richard Hughes
412034adaa
Add actual error codes for failure
2015-03-05 11:30:58 +00:00
Richard Hughes
d1e823ccbf
Allow scheduling updates for later
...
Also add a update-prepared command to fwupdmgr to process the defered updates.
In the future we'll hook into the systemd early-boot code for this.
2015-03-05 11:15:36 +00:00
Richard Hughes
9849d2bb61
Register the local error codes with D-Bus to return a nice error message
2015-03-04 22:30:12 +00:00
Richard Hughes
d3d0165259
trivial: Strip the D-Bus error before showing to the user
2015-03-04 22:30:12 +00:00
Richard Hughes
1b5ea3517d
Add an OnlyOffline property for devices that cannot do online updates
2015-03-04 22:30:12 +00:00
Richard Hughes
e7c1264f3b
Add a --force option to fwupdmgr to allow installing old firmware
2015-03-04 22:30:12 +00:00
Richard Hughes
def3175655
Compare the specified and installed firmare versions
2015-03-04 19:26:54 +00:00
Richard Hughes
a2288a3fce
trivial: Fix build after the ColorHug rename
2015-03-04 18:45:15 +00:00
Richard Hughes
72dff812c0
Add initial ColorHug support
...
This may be useful; more people have ColorHug devices than UEFI firmware that
supports system capsule updates.
2015-03-03 15:13:27 +00:00
Richard Hughes
81e8d799f7
trivial: Pad out the properties when doing GetDevices
2015-03-03 15:11:22 +00:00
Richard Hughes
67ec898265
Extract the .cab file and parse the .inf file
2015-03-03 11:41:01 +00:00
Richard Hughes
1ffde6cd72
Return the device properties when calling GetDevices()
...
This allows us to discover a version number, and other things.
2015-03-02 22:44:58 +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
f508e76a7a
Use PolicyKit to check the authorisation of the firmware update
2015-02-27 12:49:36 +00:00
Richard Hughes
8bbfdf49a8
Flesh out the provider interface and allow offline updates
2015-02-27 08:29:13 +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