Skip to content

SpdxDocumentModelMapper: Make SPDX "idstring" generation predictable#5225

Merged
sschuberth merged 1 commit into
mainfrom
predictable-spdx-ids
Apr 7, 2022
Merged

SpdxDocumentModelMapper: Make SPDX "idstring" generation predictable#5225
sschuberth merged 1 commit into
mainfrom
predictable-spdx-ids

Conversation

@sschuberth

Copy link
Copy Markdown
Member

Being able to predict the SPDX "idstring" for a given package is a
prerequisite for upcoming changes that will maintain the transitive
package relationships.

The SPDX ID is now derived from the coordinate representation of a
project's / package's Identifier. As the Identifier is unique within
an OrtResult, the derived SPDX ID is very likely unique, too, except
for cases where coordinate representations differ only in special
characters that get mapped to the same valid character for an SPDX ID.

Signed-off-by: Sebastian Schuberth sebastian.schuberth@bosch.io

Being able to predict the SPDX "idstring" for a given package is a
prerequisite for upcoming changes that will maintain the transitive
package relationships.

The SPDX ID is now derived from the coordinate representation of a
project's / package's `Identifier`. As the `Identifier` is unique within
an `OrtResult`, the derived SPDX ID is very likely unique, too, except
for cases where coordinate representations differ only in special
characters that get mapped to the same valid character for an SPDX ID.

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
@sschuberth sschuberth requested a review from a team as a code owner April 5, 2022 16:46
@sschuberth

Copy link
Copy Markdown
Member Author

@fviernau I hope this aligns with what we discussed.

Comment thread reporter/src/main/kotlin/reporters/spdx/SpdxDocumentModelMapper.kt
@tsteenbe

tsteenbe commented Apr 7, 2022

Copy link
Copy Markdown
Member

Am I correct that we now write use "first" instead of "1"

@sschuberth

Copy link
Copy Markdown
Member Author

Am I correct that we now write use "first" instead of "1"

This has been clarified in today's ORT developer meeting. The short answer is "no" 😀

@sschuberth sschuberth merged commit c2f685d into main Apr 7, 2022
@sschuberth sschuberth deleted the predictable-spdx-ids branch April 7, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants