Skip to content

feat: support multi license mix #582

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

Open
wants to merge 4 commits into
base: 1.7-dev
Choose a base branch
from

Conversation

jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Jan 20, 2025

As discussed in ticket #454, this PR adds the following abilities:

  • have multiple license expressions
  • have a mix of license expressions, SPDX license IDs, and named licenses

Please read the original ticket and see the provided example data for use-cases.

fixes #454


TODO/DONE

  • showcase that this feature was not possible in 1.6
  • migrated now-passing tests from 1.6
  • add examples for XML
  • add examples for JSON
  • add examples for ProtoBuf
  • implement for XML
  • implement for JSON
  • implement for ProtoBuf

@jkowalleck jkowalleck requested a review from a team as a code owner January 20, 2025 15:41
@jkowalleck jkowalleck changed the base branch from master to 1.7-dev January 20, 2025 15:41
@jkowalleck jkowalleck marked this pull request as draft January 20, 2025 15:41
@jkowalleck jkowalleck changed the title draft: Feat/licenses multi mix all feat: multi license mix Jan 20, 2025
@jkowalleck jkowalleck marked this pull request as ready for review January 20, 2025 16:02
@jkowalleck jkowalleck added this to the 1.7 milestone Jan 20, 2025
@jkowalleck jkowalleck force-pushed the feat/licenses-multi-mix-all branch 2 times, most recently from fb297fa to 9374fbe Compare January 22, 2025 08:38
Copy link
Member Author

@jkowalleck jkowalleck Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example is new

the examples are taken from the use-cases of #454

All licence posture in here is for show-case ony.
This is not a real law-case!

Copy link
Member Author

@jkowalleck jkowalleck Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example is new.

the examples are taken from the use-cases of #454

All licence posture in here is for show-case ony.
This is not a real law-case!

Copy link
Member Author

@jkowalleck jkowalleck Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example is new

the examples are taken from the use-cases of #454

All licence posture in here is for show-case ony.
This is not a real law-case!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a backport of a newly added valid example for CDX 1.7.
in CDX 1.6, it is invalid.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a backport of a newly added valid example for CDX 1.7.
in CDX 1.6, it is invalid.

@jkowalleck jkowalleck force-pushed the feat/licenses-multi-mix-all branch from 9374fbe to 9f5b308 Compare January 22, 2025 09:07
@jkowalleck jkowalleck marked this pull request as draft January 22, 2025 09:09
Signed-off-by: Jan Kowalleck <[email protected]>
@jkowalleck jkowalleck force-pushed the feat/licenses-multi-mix-all branch from c2dcce9 to 4abbe2f Compare January 22, 2025 09:40
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this case is now passing - as expected

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this case is now passing - as expected

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this case is now passing - as expected

@jkowalleck jkowalleck marked this pull request as ready for review January 22, 2025 09:55
@jkowalleck
Copy link
Member Author

@stevespringett this one is ready for review

@stevespringett stevespringett added the RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration label Feb 6, 2025
@stevespringett
Copy link
Member

stevespringett commented Feb 6, 2025

RFC notice sent.
https://groups.io/g/CycloneDX/message/304
https://cyclonedx.slack.com/archives/CVA0G10FN/p1738861352347449

Public RFC period ends March 6, 2025

@jkowalleck jkowalleck changed the title feat: multi license mix feat: support multi license mix Feb 8, 2025
@jkowalleck
Copy link
Member Author

jkowalleck commented Mar 6, 2025

RFC notice sent. https://groups.io/g/CycloneDX/message/304 https://cyclonedx.slack.com/archives/CVA0G10FN/p1738861352347449

Public RFC period ends March 6, 2025

Period ended today, change was promoted to TC54.

In today's TC54 meeting, some members rejected the feature as it is today, and rejected the original promoted feature. Reason: they expressed, that allowing multiple licenses was a bad idea.

The discussion about that shall be continued in the original ticket: #454

@jkowalleck jkowalleck removed the RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration label Mar 6, 2025
@jkowalleck jkowalleck added request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration promote to tc54 Promote to Ecma Technical Committee 54 labels Mar 18, 2025
@@ -1454,32 +1454,22 @@
},
"licenseChoice": {
"title": "License Choice",
"description": "EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression)",
"description": "A list of SPDX licenses and/or named licenses and/or SPDX License Expression.",
Copy link
Member Author

@jkowalleck jkowalleck Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pombredanne proposed to go with

EITHER (list of SPDX licenses and/or named licenses) OR (list of SPDX License Expressions)
but with the addons from #619

Copy link
Member Author

@jkowalleck jkowalleck Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont see how this proposal is a user-friendly solution.
if my intake is a list of declared SPDX licenses, and i am planning to add a single SPDX Expression for the concluded license, then I would have to migrate all the existing structures from SPDX licenses to SPDX license expressions.

INTAKE

<licenses>
  <license acknowledgement="declared"><id>Apache-2.0<id><license>
  <license acknowledgement="declared"><id>MIT<id><license>
  <license acknowledgement="declared"><name>My Custom Foo<name><license>
<licenses>

OUTPUT as proposed - causing migration

<licenses>
  <expression acknowledgement="declared">Apache-2.0</expression>
  <expression acknowledgement="declared">MIT</expression>
  <expression acknowledgement="declared">LicenseRef-My-Custom-Foo</expression>
  <expression acknowledgement="concluded">Apache-2.0 and MIT and LicenseRef-My-Custom-Foo</expression>
<licenses>

instead, i would prefer to not migrate any structures and still be able to add new data.

this is especially important when evidence collection happens - i want to be free with the types i record, i dont want ot be forces to use only one or the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft promote to tc54 Promote to Ecma Technical Committee 54 proposed core enhancement ready for review request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration RFC vote accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

licenses: allow mix of multiple SPDX expressions AND/OR multiple named/spdx licenses
2 participants