-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model: Introduce a new declared copyrights field to data model
In German law, the author and the copyright holder can be two separate legal entities and therefore also need to be tracked separately. Introduce a new field for declared copyrights that is now the primary source for copyright holder information. Authors are still only used as copyright holders if the `addAuthorsToCopyrights` option is enabled. For now, all package manager implementations set empty declared copyrights. Filling the declared copyrights is left as a future exercise (also see [1]). Currently, the only way to add declared copyrights is via curations. This change resolves #4519. [1]: #5504 (comment) Signed-off-by: Rainer Bieniek <[email protected]> Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information
1 parent
62a4fcc
commit f2fd86d
Showing
11 changed files
with
89 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ class PackageCurationTest : WordSpec({ | |
purl = "pkg:maven/org.hamcrest/[email protected]#subpath=src/main/java/org/hamcrest/core", | ||
cpe = "cpe:2.3:a:apache:commons_io:2.8.0:rc2:*:*:*:*:*:*", | ||
authors = sortedSetOf("author 1", "author 2"), | ||
declaredLicenseMapping = mapOf("license a" to "Apache-2.0".toSpdx()), | ||
concludedCopyrights = sortedSetOf("copyright 1", "copyright 2"), | ||
concludedLicense = "license1 OR license2".toSpdx(), | ||
description = "description", | ||
homepageUrl = "http://home.page", | ||
|
@@ -75,7 +75,8 @@ class PackageCurationTest : WordSpec({ | |
path = "path" | ||
), | ||
isMetaDataOnly = true, | ||
isModified = true | ||
isModified = true, | ||
declaredLicenseMapping = mapOf("license a" to "Apache-2.0".toSpdx()) | ||
) | ||
) | ||
|
||
|
@@ -86,6 +87,7 @@ class PackageCurationTest : WordSpec({ | |
purl shouldBe curation.data.purl | ||
cpe shouldBe curation.data.cpe | ||
authors shouldBe curation.data.authors | ||
concludedCopyrights shouldBe curation.data.concludedCopyrights | ||
declaredLicenses shouldBe pkg.declaredLicenses | ||
declaredLicensesProcessed.spdxExpression shouldBe "Apache-2.0".toSpdx() | ||
declaredLicensesProcessed.unmapped should containExactlyInAnyOrder("license b") | ||
|
@@ -147,6 +149,7 @@ class PackageCurationTest : WordSpec({ | |
purl shouldBe pkg.purl | ||
cpe shouldBe pkg.cpe | ||
authors shouldBe pkg.authors | ||
concludedCopyrights shouldBe pkg.concludedCopyrights | ||
declaredLicenses shouldBe pkg.declaredLicenses | ||
concludedLicense shouldBe pkg.concludedLicense | ||
description shouldBe pkg.description | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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