Skip to content

fwupd modules#145

Merged
nickanderson merged 7 commits into
cfengine:masterfrom
nickanderson:fwupd-inventory/master
May 26, 2026
Merged

fwupd modules#145
nickanderson merged 7 commits into
cfengine:masterfrom
nickanderson:fwupd-inventory/master

Conversation

@nickanderson
Copy link
Copy Markdown
Member

No description provided.

@nickanderson nickanderson marked this pull request as draft May 23, 2026 20:03
@nickanderson
Copy link
Copy Markdown
Member Author

Ive got a little cleanup to do yet busted screenshot etc ..., but gotta jet to a wedding and i just wanted to get it iup and get some feedback

@nickanderson nickanderson force-pushed the fwupd-inventory/master branch 2 times, most recently from 7ac3fcf to aa4a6ed Compare May 24, 2026 20:46
@nickanderson nickanderson marked this pull request as ready for review May 24, 2026 20:47
@nickanderson nickanderson force-pushed the fwupd-inventory/master branch 2 times, most recently from b8fefc5 to be41bfc Compare May 25, 2026 20:59
@nickanderson nickanderson force-pushed the fwupd-inventory/master branch from be41bfc to 1287241 Compare May 25, 2026 23:03
Copy link
Copy Markdown
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got as far as my comment about "what is HSI". Will take some more looks later.

Comment thread inventory/inventory-fwupd/policy.cf
Comment on lines +36 to +40
"_devices_src" string => "/var/cache/fwupd/devices.json";
"_updates_src" string => "$(sys.statedir)/fwupd_inventory_updates.json";
"_security_src" string => "$(sys.statedir)/fwupd_inventory_security.json";
"_cache" string => "$(sys.statedir)/fwupd_inventory_cache";
"_template" string => "$(this.promise_dirname)/fwupd-inventory.mustache";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"_devices_src" string => "/var/cache/fwupd/devices.json";
"_updates_src" string => "$(sys.statedir)/fwupd_inventory_updates.json";
"_security_src" string => "$(sys.statedir)/fwupd_inventory_security.json";
"_cache" string => "$(sys.statedir)/fwupd_inventory_cache";
"_template" string => "$(this.promise_dirname)/fwupd-inventory.mustache";
"_devices_src" string => "/var/cache/fwupd/devices.json";
"_updates_src" string => "$(sys.statedir)/fwupd_inventory_updates.json";
"_security_src" string => "$(sys.statedir)/fwupd_inventory_security.json";
"_cache" string => "$(sys.statedir)/fwupd_inventory_cache";
"_template" string => "$(this.promise_dirname)/fwupd-inventory.mustache";

Last file uses hyphen compared while the other use underscore. Maybe this was intentional?

Would it me nice to keep them all under a $(sys.statedir)/fwupd/. directory instead of the name prefix?

Comment thread inventory/inventory-fwupd/policy.cf Outdated
Comment on lines +182 to +183
# Per-device pending firmware update inventory, emitted natively
# from the updates JSON cache. Mirrors the HSI bundle idiom.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Per-device pending firmware update inventory, emitted natively
# from the updates JSON cache. Mirrors the HSI bundle idiom.
# Per-device pending firmware update inventory, emitted natively
# from the updates JSON cache. Mirrors the HSI bundle idiom.

Comment thread inventory/inventory-fwupd/policy.cf Outdated
# The rollup mirrors fwupd's own algorithm: walk levels 1-4 sequentially;
# at each level, if any non-obsoleted attribute fails, stop — the result
# is the highest level that had at least one success before the walk
# stopped. Empty levels (no attributes) are skipped without advancing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# stopped. Empty levels (no attributes) are skipped without advancing
# stopped. Empty levels (no attributes) are skipped without advancing

Comment thread inventory/inventory-fwupd/policy.cf Outdated
Comment on lines +371 to +372
# at or below it has a failure. Checks highest first so the
# first match wins. Mirrors fwupd's fu_security_attrs_calculate_hsi().
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# at or below it has a failure. Checks highest first so the
# first match wins. Mirrors fwupd's fu_security_attrs_calculate_hsi().
# at or below it has a failure. Checks highest first so the
# first match wins. Mirrors fwupd's fu_security_attrs_calculate_hsi().

Comment thread inventory/inventory-fwupd/policy.cf Outdated
# @brief Surface per-device pending firmware update inventory.
#
# Reads the updates JSON cache and emits one inventory entry per device
# that has a pending update. Format:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# that has a pending update. Format:
# that has a pending update. Format:

Comment thread management/manage-fwupd/main.cf Outdated
# is deleted so the update can re-evaluate after reboot.
#
# When reboot_after_update resolves true the marker is removed and
# a deferred reboot is scheduled. On systemd systems a transient
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# a deferred reboot is scheduled. On systemd systems a transient
# a deferred reboot is scheduled. On systemd systems a transient

Comment thread management/manage-fwupd/main.cf Outdated
# non-systemd systems the legacy shutdown -r +1 fallback is used.
#
# --no-reboot-check suppresses the interactive "reboot now?" prompt
# that fwupdmgr emits after certain updates. It does not skip or
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# that fwupdmgr emits after certain updates. It does not skip or
# that fwupdmgr emits after certain updates. It does not skip or


** Allowed devices

A list of device name patterns (regular expressions) controlling which
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could mention whether the regular expressions are anchored or not

Comment thread management/manage-fwupd/README.org Outdated
Linux only. The =fwupd= package must be available in the system's
package repositories.

* Warnings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this section should be earlier 😉

Comment on lines +28 to +33
| Attribute | Values |
|----------------------------+-----------------------------------------------------------------|
| *Firmware update status* | =OK= -- no pending updates |
| | =UPDATES_AVAILABLE= -- one or more devices have pending updates |
| | =NO_DEVICES= -- fwupd present but no updatable devices |
| | =FWUPD_MISSING= -- fwupd is not installed |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Attribute | Values |
|----------------------------+-----------------------------------------------------------------|
| *Firmware update status* | =OK= -- no pending updates |
| | =UPDATES_AVAILABLE= -- one or more devices have pending updates |
| | =NO_DEVICES= -- fwupd present but no updatable devices |
| | =FWUPD_MISSING= -- fwupd is not installed |
| Attribute | Values |
|----------------------------+-----------------------------------------------------------------|
| *Firmware update status* | =OK= -- no pending updates |
| | =UPDATES_AVAILABLE= -- one or more devices have pending updates |
| | =NO_DEVICES= -- fwupd present but no updatable devices |
| | =FWUPD_MISSING= -- fwupd is not installed |

These tables can probably be quickly aligned with some formatter

@nickanderson nickanderson merged commit c879e82 into cfengine:master May 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants