From 0e0d035e006ebda1650efaa953c49f8e75a60161 Mon Sep 17 00:00:00 2001 From: Steve Winslow Date: Wed, 30 Mar 2022 21:39:08 -0400 Subject: [PATCH 1/2] examples: Add modified hello sample for licensediff example Signed-off-by: Steve Winslow --- examples/sample-docs/tv/hello-modified.spdx | 57 +++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 examples/sample-docs/tv/hello-modified.spdx diff --git a/examples/sample-docs/tv/hello-modified.spdx b/examples/sample-docs/tv/hello-modified.spdx new file mode 100644 index 00000000..b5203753 --- /dev/null +++ b/examples/sample-docs/tv/hello-modified.spdx @@ -0,0 +1,57 @@ +SPDXVersion: SPDX-2.2 +DataLicense: CC0-1.0 +SPDXID: SPDXRef-DOCUMENT +DocumentName: hello-modified +DocumentNamespace: https://swinslow.net/sampledocs/hello-modified +Creator: Person: Steve Winslow (steve@swinslow.net) +Creator: Tool: github.com/spdx/tools-golang/builder +Creator: Tool: github.com/spdx/tools-golang/idsearcher +Created: 2022-03-30T21:23:00Z + +##### Package: hello + +PackageName: hello +SPDXID: SPDXRef-Package-hello +PackageDownloadLocation: git+https://github.com/swinslow/spdx-examples.git#example1/content +FilesAnalyzed: true +PackageVerificationCode: 9d20237bb72087e87069f96afb41c6ca2fa2a342 +PackageLicenseConcluded: GPL-3.0-or-later AND MIT +PackageLicenseInfoFromFiles: GPL-3.0-or-later +PackageLicenseDeclared: GPL-3.0-or-later +PackageCopyrightText: NOASSERTION + +Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-hello + +FileName: /build/hello +SPDXID: SPDXRef-hello-binary +FileType: BINARY +FileChecksum: SHA1: 20291a81ef065ff891b537b64d4fdccaf6f5ac02 +FileChecksum: SHA256: 83a33ff09648bb5fc5272baca88cf2b59fd81ac4cc6817b86998136af368708e +FileChecksum: MD5: 08a12c966d776864cc1eb41fd03c3c3d +LicenseConcluded: GPL-3.0-or-later AND MIT +LicenseInfoInFile: NOASSERTION +FileCopyrightText: NOASSERTION + +FileName: /src/Makefile +SPDXID: SPDXRef-Makefile +FileType: SOURCE +FileChecksum: SHA1: 69a2e85696fff1865c3f0686d6c3824b59915c80 +FileChecksum: SHA256: 5da19033ba058e322e21c90e6d6d859c90b1b544e7840859c12cae5da005e79c +FileChecksum: MD5: 559424589a4f3f75fd542810473d8bc1 +LicenseConcluded: GPL-3.0-or-later +LicenseInfoInFile: GPL-3.0-or-later +FileCopyrightText: NOASSERTION + +FileName: /src/hello.c +SPDXID: SPDXRef-hello-src +FileType: SOURCE +FileChecksum: SHA1: 20862a6d08391d07d09344029533ec644fac6b21 +FileChecksum: SHA256: b4e5ca56d1f9110ca94ed0bf4e6d9ac11c2186eb7cd95159c6fdb50e8db5a823 +FileChecksum: MD5: 935054fe899ca782e11003bbae5e166c +LicenseConcluded: GPL-3.0-or-later AND MIT +LicenseInfoInFile: GPL-3.0-or-later +FileCopyrightText: Copyright Contributors to the spdx-examples project. + +Relationship: SPDXRef-hello-binary GENERATED_FROM SPDXRef-hello-src +Relationship: SPDXRef-hello-binary GENERATED_FROM SPDXRef-Makefile +Relationship: SPDXRef-Makefile BUILD_TOOL_OF SPDXRef-Package-hello From 2b87a5d11d05bfb43238565fa136a05084383a91 Mon Sep 17 00:00:00 2001 From: Steve Winslow Date: Wed, 30 Mar 2022 21:40:32 -0400 Subject: [PATCH 2/2] examples: Fix commands for example 6 Signed-off-by: Steve Winslow --- examples/6-licensediff/example_licensediff.go | 2 +- examples/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/6-licensediff/example_licensediff.go b/examples/6-licensediff/example_licensediff.go index f625c97e..5205efa5 100644 --- a/examples/6-licensediff/example_licensediff.go +++ b/examples/6-licensediff/example_licensediff.go @@ -8,7 +8,7 @@ // This is generally only useful when run with two SPDX documents that // describe licenses for subsequent versions of the same set of files, AND if // they have the same identifier in both documents. -// Run project: go run example_licensediff.go ../sample-docs/tv/hello.spdx ../sample-docs/tv/SPDXTagExample-v2.2.spdx +// Run project: go run example_licensediff.go ../sample-docs/tv/hello.spdx ../sample-docs/tv/hello-modified.spdx package main import ( diff --git a/examples/README.md b/examples/README.md index 707b08d5..3697e368 100644 --- a/examples/README.md +++ b/examples/README.md @@ -61,7 +61,7 @@ with matching IDs in each document. This is generally only useful when run with two SPDX documents that describe licenses for subsequent versions of the same set of files, AND if they have the same identifier in both documents. -#### Run project: *go run example_licensediff.go ../sample-docs/tv/hello.spdx ../sample-docs/tv/SPDXTagExample2-v2.2.spdx* +#### Run project: *go run example_licensediff.go ../sample-docs/tv/hello.spdx ../sample-docs/tv/hello-modified.spdx* ## 7-rdfloader