From 2d82f193037001c0959aa3b78e2b0127958c227c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 1 Sep 2026 09:22:38 -0400 Subject: [PATCH 1/2] Add optional, recursive check-supply-chain recipe No effects were observed on Make-managed files. References: * https://github.com/Cyber-Domain-Ontology/CDO-Shapes-Example/pull/7 Signed-off-by: Alex Nelson --- CONTRIBUTE.md | 4 ++-- Makefile | 15 +++++++++++++++ dependencies/CDO-Shapes-Example | 2 +- dependencies/Makefile | 19 +++++++++++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index c8c0e4a..648b3c4 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -16,8 +16,8 @@ To create a new profile repository for the ontology with short name `Foo`, we su 1. Clone the upstream example repository: `git clone https://github.com/ucoProject/UCO-Profile-Example.git UCO-Profile-Foo`. 1. Substitute all references to the "example" ontology with the desired ontology. Generally, this is handled by: - 1. Update the [README](README.md) to change the name of the repository. (Minimally, the title line should be revised.) - 1. Addressing the "TODOs" in [`dependencies/Makefile`](dependencies/Makefile) + 1. Updating the [README](README.md) to change the name of the repository. (Minimally, the title line should be revised.) + 1. Addressing the "TODOs" in [`dependencies/Makefile`](dependencies/Makefile). Note the `check-supply-chain` recipes will typically apply to repositories that have a similarly named recipe and are linked as submodules. 1. Updating the TSV files under [`etc/`](etc/). This is to support local-file editing with some ontology tooling (developed for [UCO Issue 449](https://github.com/ucoProject/UCO/issues/449)). [These lines](https://github.com/ucoProject/UCO/blob/1.2.0/src/create-catalog-v001.xml.py#L68-L77) describe the file formats. 1. Renaming the [ontology file under `/ontology`](ontology/uco-example.ttl), and updating its contents. 1. Renaming the [shapes file under `/shapes`](shapes/sh-uco-example.ttl), and updating its contents. If the profile does not require shapes, the directory `shapes` can be removed. diff --git a/Makefile b/Makefile index c7b5363..c1d6a7d 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ all: \ check-shapes \ check-supply-chain \ check-supply-chain-cdo-profile \ + check-supply-chain-dependencies \ check-supply-chain-pre-commit \ check-supply-chain-submodules \ check-tests \ @@ -157,6 +158,8 @@ check-shapes: \ # This target's dependencies potentially modify the working directory's # Git state, so it is intentionally not a dependency of check. +# To recurse this recipe, include check-supply-chain-dependencies as a +# target in the Make call. check-supply-chain: \ check-supply-chain-cdo-profile \ check-mypy \ @@ -180,6 +183,18 @@ check-supply-chain-cdo-profile: "x$$(git rev-parse _CHECK_SUPPLY_CHAIN_upstream/base)" \ || (echo "ERROR:Makefile:The current branch is behind the upstream 'base' branch. Please merge the upstream 'base' commit into the current branch." >&2 ; exit 1) +# This recursive Make recipe intentionally deactivates parallel job +# execution due to interactions with $(top_srcdir)/.git/ while reviewing +# submodules. +# This target is intentionally not a dependency of check-supply-chain, +# considering recursive review an opt-in action. +check-supply-chain-dependencies: \ + check-supply-chain-submodules + $(MAKE) \ + --directory dependencies \ + --jobs 1 \ + check-supply-chain + # Update pre-commit configuration and use the updated config file to # review code. Only have Make exit if 'pre-commit run' modifies files. check-supply-chain-pre-commit: \ diff --git a/dependencies/CDO-Shapes-Example b/dependencies/CDO-Shapes-Example index 0c517fe..0fb6ef7 160000 --- a/dependencies/CDO-Shapes-Example +++ b/dependencies/CDO-Shapes-Example @@ -1 +1 @@ -Subproject commit 0c517fecf03e3696d82e5c3ad308182a475377e3 +Subproject commit 0fb6ef7926dedf9f5dd7d43b0c0eac4cbf677399 diff --git a/dependencies/Makefile b/dependencies/Makefile index 089251a..9459d27 100644 --- a/dependencies/Makefile +++ b/dependencies/Makefile @@ -23,6 +23,14 @@ uco_srcdir := UCO all: \ $(uco_srcdir)/tests/uco_monolithic.ttl +# TODO: The check-supply-chain recipes should be written to descend into +# each submodule tracking a CDO (/UCO, etc.) repository and run its +# supply chain rule. This recursive check is expected to be called most +# typically by the top_srcdir recipe check-supply-chain-dependencies. +.PHONY: \ + check-supply-chain \ + check-supply-chain-CDO-Shapes-Example + $(uco_srcdir)/.venv.done.log: $(MAKE) \ PYTHON3=$(PYTHON3) \ @@ -39,4 +47,15 @@ $(uco_srcdir)/tests/uco_monolithic.ttl: \ check: \ all +check-supply-chain: \ + check-supply-chain-CDO-Shapes-Example + +check-supply-chain-CDO-Shapes-Example: + $(MAKE) \ + --directory CDO-Shapes-Example \ + check-supply-chain-dependencies + $(MAKE) \ + --directory CDO-Shapes-Example \ + check-supply-chain + clean: From 2bc372dab5340d0a2f314ba64a316ae966ab1b89 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 14 Sep 2026 15:26:48 -0400 Subject: [PATCH 2/2] Shift TODO in dependencies Makefile No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- dependencies/CDO-Shapes-Example | 2 +- dependencies/Makefile | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dependencies/CDO-Shapes-Example b/dependencies/CDO-Shapes-Example index 0fb6ef7..85744c3 160000 --- a/dependencies/CDO-Shapes-Example +++ b/dependencies/CDO-Shapes-Example @@ -1 +1 @@ -Subproject commit 0fb6ef7926dedf9f5dd7d43b0c0eac4cbf677399 +Subproject commit 85744c3fb9883860fd030881cb1cbe70b3d7a11e diff --git a/dependencies/Makefile b/dependencies/Makefile index 9459d27..1178d0b 100644 --- a/dependencies/Makefile +++ b/dependencies/Makefile @@ -23,10 +23,6 @@ uco_srcdir := UCO all: \ $(uco_srcdir)/tests/uco_monolithic.ttl -# TODO: The check-supply-chain recipes should be written to descend into -# each submodule tracking a CDO (/UCO, etc.) repository and run its -# supply chain rule. This recursive check is expected to be called most -# typically by the top_srcdir recipe check-supply-chain-dependencies. .PHONY: \ check-supply-chain \ check-supply-chain-CDO-Shapes-Example @@ -47,6 +43,10 @@ $(uco_srcdir)/tests/uco_monolithic.ttl: \ check: \ all +# TODO: The check-supply-chain recipes should be written to descend into +# each submodule tracking a CDO (/UCO, etc.) repository and run its +# supply chain rule. This recursive check is expected to be called most +# typically by the top_srcdir recipe check-supply-chain-dependencies. check-supply-chain: \ check-supply-chain-CDO-Shapes-Example