Skip to content

fix(sbom): take wolfSSL version from WOLFSSL_DIR, not pkg-config - #11292

Open
MarkAtwood wants to merge 2 commits into
wolfSSL:masterfrom
MarkAtwood:fix/sbom-version-from-tree
Open

fix(sbom): take wolfSSL version from WOLFSSL_DIR, not pkg-config#11292
MarkAtwood wants to merge 2 commits into
wolfSSL:masterfrom
MarkAtwood:fix/sbom-version-from-tree

Conversation

@MarkAtwood

Copy link
Copy Markdown
Contributor

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#26

Same five paths verified here against this copy: version.h present, distclean-ed tree (configure.ac fallback), neither source (fails instead of guessing), no WOLFSSL_DIR (unchanged, pkg-config remains the intended source), and explicit SBOM_WOLFSSL_VERSION.

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.
Copilot AI lite review requested due to automatic review settings August 26, 2026 19:48
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.

Copilot AI left a comment

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.

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_VERSION behavior and documents the new precedence/failure behavior when WOLFSSL_DIR is set.
  • Updates the sbom rule 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 thread scripts/sbom.am
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; \
@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants