Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename dir: spdx-3.0/ -> spdx3.0/ for consistency #89

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Look for files that are not checked
- name: Look for files with the wrong location
run: |
find . \( -name '*.spdx' -o -name '*.json' \) \
-not -path './presentations/*' \
-not -path './tools-java/*' \
-not -path '*/spdx2.2/*' \
-not -path '*/spdx2.3/*' \
-not -path '*/spdx-3.0/*' > flist.txt
-not -path '*/spdx3.0/*' > flist.txt

if [ "$(cat flist.txt | wc -l)" != "0" ]; then
echo "The following files are in the wrong location and will not be checked:"
cat flist.txt
echo "Expected locations:"
echo "./presentations/"
echo "./tools-java/
echo "*/spdx2.2/"
echo "*/spdx2.3/"
echo "*/spdx3.0/"
exit 1
fi

Expand All @@ -31,6 +37,9 @@ jobs:
if [ "$(cat flist.txt | wc -l)" != "0" ]; then
echo "The following files have the wrong extension and will not be checked:"
cat flist.txt
echo "Expected extensions:"
echo "*.spdx"
echo "*.json"
exit 1
fi

Expand Down Expand Up @@ -63,7 +72,7 @@ jobs:
SPDX30_SCHEMA_URL="https://spdx.org/schema/3.0.0/spdx-json-schema.json"
SPDX30_SHACL_URL="https://spdx.org/rdf/3.0.0/spdx-model.ttl"

for f in $(find . -type f -path '*/spdx-3.0/*.json'); do
for f in $(find . -type f -path '*/spdx3.0/*.json'); do
echo "Checking $f..."
check-jsonschema -v --schemafile $SPDX30_SCHEMA_URL $f
pyshacl -s $SPDX30_SHACL_URL -e $SPDX30_SHACL_URL $f
Expand Down
8 changes: 5 additions & 3 deletions software/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ The examples include source code and built / packaged binaries for a variety of

Directories of the form `example#` are structured as follows:

- `content/src/`: contains the example's source code
- `content/build/`: contains the example's built artifacts
- `spdx/`: contains one or more SPDX documents (in tag-value or JSON format) for the sources and the build artifacts
- `content/src/`: contains the example's source code
- `spdx2.2/`: contains one or more SPDX 2.2 documents (in tag-value or JSON
format) for the sources and the build artifacts
- `spdx3.0/`: contains one or more SPDX 3.0 documents for the sources and the
build artifacts
- `README.md`: more details about the particular example

Each directory contains build metadata which is used to create the build artifacts. It assumes that the necessary tools (make, gcc, etc.) are present on your system, and doesn't do any autoconfiguration or the like.
Expand All @@ -32,4 +35,3 @@ Each directory contains build metadata which is used to create the build artifac
| 11 | 1 Rust file | compiled with Cargo | 1 document | SBOM describing both source and artifact, related with GENERATED_FROM |
| 12 | 1 Ruby library | built using `bundle` | 1 document | SBOM describing Ruby library packaged in a gem |
| 13 | Bundled app with a package and container | No compiling - hypothetical example | Documents in progress | SBOM describing a hypothetical "Acme Aplication" |

6 changes: 4 additions & 2 deletions software/example13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Description

This is a hypothetical example of a "simple" piece of software, Acme Application version 1.3. This example shows what an SPDX-3.0 document looks like for said Acme Application. The idea for this example is that other profiles will be able to build on top of this and demonstrate how all the profiles can work in harmony.
This is a hypothetical example of a "simple" piece of software, Acme Application version 1.3. This example shows what an SPDX 3.0 document looks like for said Acme Application. The idea for this example is that other profiles will be able to build on top of this and demonstrate how all the profiles can work in harmony.

In this specific example, Acme Application is a bundled and distributed piece of software. When Acme Application is run, it pulls in the `alpine:latest` container image which runs in parallel to the `npm-elliptic` library that is packaged and distributed within the Acme Application binary. Among others not depicted for the sake of simplicity, `openssl` is a package included in the `alpine:latest` container image. The example-13 SBOM describes the Acme Application top level piece of software.
In this specific example, Acme Application is a bundled and distributed piece of software. When Acme Application is run, it pulls in the `alpine:latest` container image which runs in parallel to the `npm-elliptic` library that is packaged and distributed within the Acme Application binary. Among others not depicted for the sake of simplicity, `openssl` is a package included in the `alpine:latest` container image. The example13 SBOM describes the Acme Application top level piece of software.

![A diagram of Acme Application](./example13.png "A diagram of Acme Application")
File renamed without changes