Repository navigation
fix(sbom): one timestamp for all routes, one gen-sbom --help, DESTDIR drive letter - #58
Merged
Merged
Conversation
… drive letter From the wolfSSL/wolfBoot#964 review. - sbom-driver.py: when SOURCE_DATE_EPOCH is not set, use the last commit time of the checkout that tracks --root, with the rule of sbom-with-sde.cmake and sbom.am. Before, make sbom used the current time and the CMake target the commit time, so one checkout got two timestamps and could get two copyright years. - sbom-driver.py: read gen-sbom --help once per run. Before, each supported-flag check started a new interpreter, up to nine per run. - install-sbom.cmake, uninstall-sbom.cmake: on Windows, file(INSTALL) drops a drive letter before it adds DESTDIR. Both scripts now use the same path, so uninstall removes what install wrote. Remove the file(MAKE_DIRECTORY) call: file(INSTALL) creates the directory.
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The drive-letter DESTDIR install/uninstall changes still require native Windows validation, which this review could not perform because the regression test is Windows-only and CI has no Windows runner.
No open issues 🎉
What changed in this PR
This PR makes the shared SBOM tooling more consistent across build systems and fixes Windows staging paths for vendored consumers.
Changes:
- Use the tracked checkout’s latest commit time when
SOURCE_DATE_EPOCHis unset, with regression tests and documentation. - Cache
gen-sbom --helpso capability checks invoke it once per run. - Align Windows DESTDIR paths between install and uninstall, with Windows-only test coverage.
| File | Description |
|---|---|
tests/test_sbom_cmake_install.py |
Adds Windows drive-letter staging and uninstall coverage. |
tests/test_low_findings.py |
Tests help caching and timestamp selection. |
share/sbom-driver.py |
Caches generator help and supplies a Git-derived timestamp fallback. |
share/README.md |
Documents timestamp selection across build systems. |
share/build/uninstall-sbom.cmake |
Removes the Windows drive prefix before prepending DESTDIR. |
share/build/install-sbom.cmake |
Corrects the staged-path message and removes redundant directory creation. |
Review effort: Balanced
Frauschi
reviewed
Nov 19, 2026
Frauschi
left a comment
Member
There was a problem hiding this comment.
Mostly small things; the Windows drive-letter test needs a fix before it can pass.
- Read the commit time only when --root is passed, so a front end run from inside another checkout does not take that checkout's time. - Discard the ls-files output. Only its status is used, and decoding every tracked path fails on a file name the locale cannot decode. - Normalize DESTDIR with file(TO_CMAKE_PATH) in the install and uninstall scripts, so the status line uses the forward-slash path file(INSTALL) writes on Windows. - Skip the git driver tests when git is not installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three fixes from the review of wolfSSL/wolfBoot#964. These files are vendored, so the fixes belong here.
SOURCE_DATE_EPOCHis not set,sbom-driver.pyuses the last commit time of the checkout that tracks--root. The rule is the same as insbom-with-sde.cmakeandsbom.am: a tarball unpacked inside another checkout gets no value. Before,make sbomused the current time and the CMake target used the commit time, so one checkout got two timestamps and could get two copyright years.gen-sbom --helpper run. The help text is cached, so the up to nine supported-flag checks start one interpreter, not nine.file(INSTALL)drops the drive letter before it adds DESTDIR.install-sbom.cmakeanduninstall-sbom.cmakenow use the same rule, so uninstall removes what install wrote. Thefile(MAKE_DIRECTORY)call is removed, becausefile(INSTALL)creates the directory.Tests:
tests/test_low_findings.py: help read once; driver run with an unset, a set, and an untracked-rootSOURCE_DATE_EPOCH.tests/test_sbom_cmake_install.py: drive-letter install and uninstall. It runs only on Windows, and this CI has no Windows runner.