canonical / firmware-updater

An experimental firmware updater UI based on fwupd
GNU General Public License v3.0
107 stars 15 forks source link

Provide option to show details from metainfo.xml #295

Open tysonclugg opened 3 weeks ago

tysonclugg commented 3 weeks ago

Sometimes it is useful to expose metadata such artifact filenames within firmware archives, or even just the artifact filename itself. This would have helped with #294 where it would now appear that the correct version was actually published (1.17.01 at https://support.hp.com/au-en/drivers/swdetails/hp-elitebook-x360-830-g8-notebook-pc/model/38460789/swItemId/ob-329465-1), but the description refers to an older number that was never published by HP (1.11.04).

It is possible to see the metadata manually by searching the fwupd.org website, downloading the archive, unpacking the .cab and inspecting the XML file: https://fwupd.org/lvfs/devices/com.hp.laptop.system.T77.firmware https://r2.fwupd.org/lvfs-prod/52b379010e4162c1ca4287a3586504a4e78da63335d9f800f5a7d625a7cb99dc-T77_01170100.cab

<component type="firmware">
<id>com.hp.laptop.system.T77.firmware</id>
<name>EliteBook x360 830 G8 Notebook PC T77</name>
<summary>System Firmware for HP Laptop, family T77</summary>
<description>
<p>System firmware upgrade on on your HP Laptop system to improves performance, adds new features, and fixes issues.</p>
</description>
<provides>
<firmware type="flashed">3a548e4f-6514-40d9-87ea-dc85ee037bf7</firmware>
</provides>
<url type="homepage">http://www.hp.com</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary</project_license>
<developer_name>HP</developer_name>
<categories>
<category>X-System</category>
</categories>
<custom>
<value key="LVFS::UpdateRequestId">org.freedesktop.fwupd.request.do-not-power-off</value>
<value key="LVFS::UpdateMessage">Do not turn off your computer or remove the AC adapter while the update is in progress.</value>
<value key="LVFS::VersionFormat">plain</value>
<value key="LVFS::VersionFormat">hex</value>
<value key="LVFS::UpdateProtocol">org.uefi.capsule</value>
</custom>
<releases>
<release version="0x1110100" date="2024-05-03" urgency="high">
<checksum type="sha1" filename="T77_01170100.bin" target="content">c8d33cb98b6c264d2ef1bd3ce5ec355061846073</checksum>
<checksum type="sha256" filename="T77_01170100.bin" target="content">b4f98a15f79b241235eda494a72518cebcc5ad6e47a09767a643e8d8faa5c93d</checksum>
<description>
<p>Fixes and enhancements in System firmware 1.11.04: Please visit hp.com to see more detail.</p>
</description>
<artifacts>
<artifact type="source">
<filename>T77_01170100.bin</filename>
<checksum type="sha1">c8d33cb98b6c264d2ef1bd3ce5ec355061846073</checksum>
<checksum type="sha256">b4f98a15f79b241235eda494a72518cebcc5ad6e47a09767a643e8d8faa5c93d</checksum>
</artifact>
</artifacts>
</release>
</releases>
<requires>
<id compare="ge" version="1.0.8">org.freedesktop.fwupd</id>
<hardware>48ca5121-fbf9-52ae-9c0d-507ec193751d</hardware>
</requires>
</component>

The important detail from the XML is <filename>T77_01170100.bin</filename>, which strongly suggests that the correct version (1.17.01) has been included in the archive, despite the erroneous description.