feat: add make sbom / install-sbom / uninstall-sbom targets#410
Open
MarkAtwood wants to merge 2 commits into
Open
feat: add make sbom / install-sbom / uninstall-sbom targets#410MarkAtwood wants to merge 2 commits into
MarkAtwood wants to merge 2 commits into
Conversation
Adds CycloneDX + SPDX SBOM generation via wolfssl's gen-sbom script. Usage: make sbom WOLFSSL_DIR=/path/to/wolfssl wolfProvider has no generated options.h; uses installed wolfssl's options.h. WOLFSSL_DIR defaults to WOLFSSL_INSTALL_DIR. SONAME is libwolfprov.so.0.0.0 (libtool default, no version-info set).
There was a problem hiding this comment.
Pull request overview
Adds SBOM generation and install/uninstall targets to the autotools build so wolfProvider can emit CycloneDX 1.6 and SPDX 2.3 artifacts (via wolfSSL’s gen-sbom script), plus configure-time discovery of required tooling.
Changes:
- Add
make sbom,make install-sbom, andmake uninstall-sbomtargets that stage-install the built artifacts and generate CycloneDX/SPDX outputs. - Add
AC_CHECK_PROGchecks forpython3andpyspdxtoolsinconfigure.ac.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Makefile.am | Adds SBOM generation and install/uninstall targets and related variables. |
| configure.ac | Adds checks for python3 and pyspdxtools availability. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # --------------------------------------------------------------------------- | ||
| # SBOM generation (CycloneDX + SPDX) via wolfssl's gen-sbom script | ||
| # --------------------------------------------------------------------------- | ||
| WOLFSSL_DIR ?= $(WOLFSSL_INSTALL_DIR) |
| WOLFSSL_DIR ?= $(WOLFSSL_INSTALL_DIR) | ||
| WOLFSSL_INCLUDEDIR ?= $(WOLFSSL_DIR)/include | ||
| PRODUCT = wolfprov | ||
| VERSION = $(shell grep LIBWOLFPROV_VERSION_STRING $(srcdir)/include/wolfprovider/version.h 2>/dev/null | sed 's/.*"\(.*\)".*/\1/') |
Comment on lines
+76
to
+80
| @if test -z "$(PYTHON3)"; then \ | ||
| echo "ERROR: python3 not found in PATH."; exit 1; fi | ||
| $(MAKE) install DESTDIR=$(builddir)/_sbom_stage | ||
| $(PYTHON3) $(GEN_SBOM) $(SBOM_OPTS) | ||
| rm -rf $(builddir)/_sbom_stage |
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.
Summary
make sbom,make install-sbom, andmake uninstall-sbomtargets to wolfProvider's autotools build for EU CRA compliance evidence (CycloneDX 1.6 + SPDX 2.3 output)AC_CHECK_PROGchecks forpython3andpyspdxtoolsinconfigure.acUsage
WOLFSSL_DIRmust point to a wolfssl checkout containingscripts/gen-sbom(branchfeat/sbom-embedded, ormasteronce wolfSSL/wolfssl#10343 merges).Notes
wolfprovthroughout (matchesAC_INITandlib_LTLIBRARIES), notwolfprovideroptions.h; uses installed wolfssl'soptions.hvia$(WOLFSSL_INCLUDEDIR)/wolfssl/options.h.WOLFSSL_DIRdefaults to$(WOLFSSL_INSTALL_DIR)(set by--with-wolfssl=at configure time)libwolfprov.so.0.0.0(no-version-infoset) —--libpath uses this literal, not the package version1.1.1--with-wolfssl,WOLFSSL_INSTALL_DIRmay be malformed; passWOLFSSL_DIR=explicitly in that case