Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

populate SMBIOS system version with Git metadata #702

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 7, 2024

  1. populate SMBIOS system version with Git metadata

    Currently, the SMBIOS system (type 1) table has a hard-coded version
    field. It would be nice if this was instead populated with details about
    the Propolis version, as described in issue #701.
    
    This branch adds a `build.rs`` script that uses [the `vergen` crate][1]
    to emit information about the Git revision that Propolis was build from.
    Now, we can generate a version string that describes the git branch,
    commit hash, and commit depth, as described in [this comment][2]. This
    is generated in a `propolis::version()` function, which also includes
    the Bhyve API version (detected at runtime). This results in version
    strings like:
    
    ```
    Propolis v0.1.0-658 (0d8efa1) eliza/somebios-version, <unknown Bhyve API version>
    ```
    (on a Linux machine; the Bhyve version would be present on illumos)
    
    In addition to populating the SMBIOS system version, this commit also
    sets the Clap version for CLI commands, so that the `--version` flag
    will print out the same value that's set in SMBIOS.
    
    [1]: https://docs.rs/vergen
    [2]: #701 (comment)
    hawkw committed May 7, 2024
    Configuration menu
    Copy the full SHA
    3ad03a5 View commit details
    Browse the repository at this point in the history
  2. remove prefix

    hawkw committed May 7, 2024
    Configuration menu
    Copy the full SHA
    934eb94 View commit details
    Browse the repository at this point in the history