Skip to content

Commit

Permalink
Merge branch 'spdx:master' into update-dataset-ex1-to-301
Browse files Browse the repository at this point in the history
  • Loading branch information
bact authored Oct 2, 2024
2 parents ac59aaa + 6f8f8bf commit 78e30fa
Show file tree
Hide file tree
Showing 7 changed files with 708 additions and 18 deletions.
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,37 @@ scenarios and use cases.

The repository is organized by profiles which represents a set of scenarios and
use cases for a particular domain (e.g. security, license compliance).
Each directory contains a README.md file describing the profile and the
examples contained within that directory.

The [`presentations`](./presentations/) directory contains examples included in
various SPDX presentations.

Please note that this repository does not contain all of the supported fields
nor all of the supported serialization formats in the latest version of the
specification.

Additional version-specific examples can be found in the `examples` directory
of each specification version:
- [AI](./ai/)
- [Dataset](./dataset/)
- [Software](./software/)

- [v3.0.1](https://github.com/spdx/spdx-spec/tree/development/v3.0.1/examples)
- [v2.3.1](https://github.com/spdx/spdx-spec/tree/development/v2.3.1/examples)

More guidance on using SPDX, including how to use SPDX license list short
identifiers in source files and leverage SPDX for compliance with standards and
regulations, is available in the [`spdx/using`](https://github.com/spdx/using/)
repository.
Each directory contains a README.md file describing the profile and the
examples contained within that directory.
Please note that they do not contain all supported fields or serialization
formats specified in the latest version of the specification.

## More examples

- The [`presentations`](./presentations/) directory in this repository
contains examples included in various SPDX presentations.
- Moreover, in a page for each field in
[SPDX Specification](https://spdx.github.io/spdx-spec/), there can also
be a code snippet demonstrating how to use that particular field.
- Additional version-specific examples can be found in the `examples` directory
of each specification version in [`spdx-spec`](https://github.com/spdx/spdx-spec/) repository.
For example:
- [`v3.0.1`](https://github.com/spdx/spdx-spec/tree/development/v3.0.1/examples)
- [`v2.3.1`](https://github.com/spdx/spdx-spec/tree/development/v2.3.1/examples)
- JSON-LD serialization examples can be found in
[`spdx/spdx-3-model`](https://github.com/spdx/spdx-3-model/blob/main/serialization/jsonld/examples.md)
repository.
- More guidance on using SPDX, including how to use SPDX License List short
identifiers in source files and leverage SPDX for compliance with standards
and regulations, is available in the [`spdx/using`](https://github.com/spdx/using/)
repository.
- The Playground repository at [`spdx-3-serialization-prototype-playground`](https://github.com/spdx/spdx-3-serialization-prototype-playground)
contains some examples that may not pass validation.

## Licenses

Expand Down
2 changes: 2 additions & 0 deletions software/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Directories of the form `example#` are structured as follows:
- `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
- `spdx2.3/`: contains one or more SPDX 2.3 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
Expand Down
238 changes: 238 additions & 0 deletions software/example1/spdx3.0/example1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
{
"@context" : "https://spdx.org/rdf/3.0.1/spdx-context.jsonld",
"@graph" : [ {
"@id" : "_:creationInfo_0",
"type" : "CreationInfo",
"specVersion" : "3.0.1",
"createdBy" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd0" ],
"createdUsing" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/additionalToolSPDXRef-gnrtd2", "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/additionalToolSPDXRef-gnrtd1" ],
"created" : "2021-08-26T01:46:00Z"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd3",
"type" : "Relationship",
"relationshipType" : "describes",
"completeness" : "noAssertion",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/document0",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd5",
"type" : "Relationship",
"relationshipType" : "contains",
"completeness" : "noAssertion",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd6" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd7",
"type" : "Relationship",
"relationshipType" : "hasConcludedLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd6",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd9",
"type" : "Relationship",
"relationshipType" : "hasDeclaredLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd6",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd10",
"type" : "Relationship",
"relationshipType" : "contains",
"completeness" : "noAssertion",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd11" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd12",
"type" : "Relationship",
"relationshipType" : "generates",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd11" ],
"completeness" : "noAssertion",
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd13",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd15",
"type" : "Relationship",
"relationshipType" : "hasConcludedLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd13",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd16",
"type" : "Relationship",
"relationshipType" : "hasDeclaredLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd13",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd17",
"type" : "Relationship",
"relationshipType" : "generates",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd11" ],
"completeness" : "noAssertion",
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd6",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd18",
"type" : "Relationship",
"relationshipType" : "hasConcludedLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd11",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd19",
"type" : "Relationship",
"relationshipType" : "hasDeclaredLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd20" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd11",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd21",
"type" : "Relationship",
"relationshipType" : "contains",
"completeness" : "noAssertion",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd13" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd22",
"type" : "Relationship",
"relationshipType" : "hasConcludedLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd23",
"type" : "Relationship",
"relationshipType" : "hasDeclaredLicense",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8" ],
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/document0",
"type" : "SpdxDocument",
"dataLicense" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd24",
"rootElement" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4" ],
"name" : "hello",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/additionalToolSPDXRef-gnrtd1",
"type" : "Tool",
"name" : "github.com/spdx/tools-golang/builder",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/additionalToolSPDXRef-gnrtd2",
"type" : "Tool",
"name" : "github.com/spdx/tools-golang/idsearcher",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd8",
"type" : "simplelicensing_LicenseExpression",
"simplelicensing_licenseExpression" : "GPL-3.0-or-later",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd20",
"type" : "simplelicensing_LicenseExpression",
"simplelicensing_licenseExpression" : "NOASSERTION",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd24",
"type" : "simplelicensing_LicenseExpression",
"simplelicensing_licenseExpression" : "CC0-1.0",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd14",
"type" : "LifecycleScopedRelationship",
"relationshipType" : "usesTool",
"scope" : "build",
"to" : [ "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd13" ],
"completeness" : "noAssertion",
"from" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd0",
"type" : "Person",
"externalIdentifier" : [ {
"type" : "ExternalIdentifier",
"identifier" : "[email protected]",
"externalIdentifierType" : "email"
} ],
"name" : "Steve Winslow",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd6",
"type" : "software_File",
"software_copyrightText" : "Copyright Contributors to the spdx-examples project.",
"verifiedUsing" : [ {
"type" : "Hash",
"algorithm" : "md5",
"hashValue" : "935054fe899ca782e11003bbae5e166c"
}, {
"type" : "Hash",
"algorithm" : "sha1",
"hashValue" : "20862a6d08391d07d09344029533ec644fac6b21"
}, {
"type" : "Hash",
"algorithm" : "sha256",
"hashValue" : "b4e5ca56d1f9110ca94ed0bf4e6d9ac11c2186eb7cd95159c6fdb50e8db5a823"
} ],
"name" : "./src/hello.c",
"software_primaryPurpose" : "source",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd11",
"type" : "software_File",
"software_copyrightText" : "NOASSERTION",
"verifiedUsing" : [ {
"type" : "Hash",
"algorithm" : "sha1",
"hashValue" : "20291a81ef065ff891b537b64d4fdccaf6f5ac02"
}, {
"type" : "Hash",
"algorithm" : "sha256",
"hashValue" : "83a33ff09648bb5fc5272baca88cf2b59fd81ac4cc6817b86998136af368708e"
}, {
"type" : "Hash",
"algorithm" : "md5",
"hashValue" : "08a12c966d776864cc1eb41fd03c3c3d"
} ],
"name" : "./build/hello",
"contentType" : "application/octet-stream",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd13",
"type" : "software_File",
"software_copyrightText" : "NOASSERTION",
"verifiedUsing" : [ {
"type" : "Hash",
"algorithm" : "sha1",
"hashValue" : "69a2e85696fff1865c3f0686d6c3824b59915c80"
}, {
"type" : "Hash",
"algorithm" : "sha256",
"hashValue" : "5da19033ba058e322e21c90e6d6d859c90b1b544e7840859c12cae5da005e79c"
}, {
"type" : "Hash",
"algorithm" : "md5",
"hashValue" : "559424589a4f3f75fd542810473d8bc1"
} ],
"name" : "./src/Makefile",
"software_primaryPurpose" : "source",
"creationInfo" : "_:creationInfo_0"
}, {
"spdxId" : "https://swinslow.net/spdx-examples/example1/hello-v3-specv3/SPDXRef-gnrtd4",
"type" : "software_Package",
"software_copyrightText" : "NOASSERTION",
"software_downloadLocation" : "git+https://github.com/swinslow/spdx-examples.git#example1/content",
"verifiedUsing" : [ {
"type" : "PackageVerificationCode",
"algorithm" : "sha1",
"hashValue" : "9d20237bb72087e87069f96afb41c6ca2fa2a342"
} ],
"name" : "hello",
"creationInfo" : "_:creationInfo_0"
} ]
}
Loading

0 comments on commit 78e30fa

Please sign in to comment.