fix(sbom): take wolfSSL version from WOLFSSL_DIR, not pkg-config - #11292
Open
MarkAtwood wants to merge 2 commits into
Open
fix(sbom): take wolfSSL version from WOLFSSL_DIR, not pkg-config#11292MarkAtwood wants to merge 2 commits into
MarkAtwood wants to merge 2 commits into
Conversation
wolfssl/version.h is generated by configure as well as tracked, so `make distclean` removes it. With it gone the --dep-version override was never passed and gen-sbom fell back to pkg-config, recording the installed wolfSSL's version rather than the tree at WOLFSSL_DIR. Fall back to AC_INIT in WOLFSSL_DIR/configure.ac, and fail when a named tree yields neither source. With no WOLFSSL_DIR the pkg-config lookup remains the intended source.
The NOTE told users to point WOLFSSL_DIR at wolfSSL#10343's branch until it merged. It merged 2026-07-27. Converge on the wording already in the canonical wolfGlass copy, which drops the reference.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the shared Automake SBOM generation recipe to prefer deriving the wolfSSL dependency version from the source tree referenced by WOLFSSL_DIR, rather than allowing gen-sbom to fall back to pkg-config (which can report an installed, unrelated wolfSSL).
Changes:
- Clarifies
SBOM_WOLFSSL_VERSIONbehavior and documents the new precedence/failure behavior whenWOLFSSL_DIRis set. - Updates the
sbomrule to extract wolfSSL version from$(WOLFSSL_DIR)/wolfssl/version.h, else from$(WOLFSSL_DIR)/configure.ac, and to fail explicitly if neither yields a version.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+182
to
+185
| if test -z "$$wv" && test -f "$(WOLFSSL_DIR)/configure.ac"; then \ | ||
| wv=`sed -n 's/^AC_INIT(\[[^]]*\],\[\([^]]*\)\].*/\1/p' \ | ||
| "$(WOLFSSL_DIR)/configure.ac" | sed -n 1p`; \ | ||
| fi; \ |
|
Can one of the admins verify this patch? |
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.
Ports the fix from wolfSSL/wolfGlass#26 into this repo's vendored
scripts/sbom.am. Rationale, reproduction and verification are all in that PR: wolfSSL/wolfGlass#26Same five paths verified here against this copy:
version.hpresent, distclean-ed tree (configure.acfallback), neither source (fails instead of guessing), noWOLFSSL_DIR(unchanged, pkg-config remains the intended source), and explicitSBOM_WOLFSSL_VERSION.