You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a programmatic way to determine if a system has a TPM installed to avoid having to reboot into the Setup utility and hunt through those menus for clues. I found this in providers/base/units/tpm/tpm.pxu:
unit: job
id: query/tpm_version
category_id: tpm
_summary: Collect the output of tpm_version
_description:
This job collects the output of "tpm_version" for inspection by a
Certification engineer.
plugin: shell
requires: snap.name == 'tpm'
command: tpm.version 2>&1
estimated_duration: 1s
flags: preserve-locale preserve-cwd
And thought if that returned something it would be enough indication that a TPM is present, even if not active. But when I looked it seems that snap does not exist?
bladernr@galactica:~/development/checkbox/providers/base/units/tpm$ snap info tpm
error: no snap found for "tpm"
bladernr@galactica:~/development/checkbox/providers/base/units/tpm$ snap search tpm
Name Version Publisher Notes Summary
tpm2-tools-alexmurray 5.3 alexmurray✪ - TPM 2.0 utilities
tpm2-toolbox 1.0-tpm2-tools+git-857e6fc7 timchen119 - TPM 2.0 utilities
tpm2-simulator-chrisccoulson 0.1.0 chrisccoulson - TPM 2.0 Reference Simulator
fwupd 1.9.16 richard-hughes - Firmware updates for Linux
theengs-gateway 1.4.0 koen-vervloesem - Multi-platform BLE to MQTT gateway leveraging Theengs Decoder
httpmock-netlogger 0.1.2 manu-gautier1394 - A simple HTTP Server mock which log every network connections events
test-snapd-swtpm 0.1.0 test-snaps-canonical -
It seems that every job in tpm.pxu contains the constraint snap.name == 'tpm' which, it seems, means none of those jobs will ever run. Unless that tpm snap does exist but is either hidden, or side loaded somehow?
Bug Description
I was looking for a programmatic way to determine if a system has a TPM installed to avoid having to reboot into the Setup utility and hunt through those menus for clues. I found this in providers/base/units/tpm/tpm.pxu:
And thought if that returned something it would be enough indication that a TPM is present, even if not active. But when I looked it seems that snap does not exist?
It seems that every job in tpm.pxu contains the constraint
snap.name == 'tpm'
which, it seems, means none of those jobs will ever run. Unless that tpm snap does exist but is either hidden, or side loaded somehow?To Reproduce
Review tpm.pxu and note the snap.name constraint
Search for the tpm snap and note it does not exist
Environment
Ubuntu
Relevant log output
See above in the description
Additional context
No response
The text was updated successfully, but these errors were encountered: