-
Notifications
You must be signed in to change notification settings - Fork 149
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
Populate the LicenseConcluded
field in the SPDX report
#623
Conversation
66f3534
to
3d4f3f5
Compare
Will it work also when there are exceptions like in
|
3d4f3f5
to
569a7e5
Compare
Yes, this also works when there are exceptions! To be extra sure, I added an exception to the new test I added 🙂 |
569a7e5
to
0a0459f
Compare
Added |
0a0459f
to
6353b3d
Compare
hi @pietroalbini we at Oniro Project just realized that we would really need this functionality, it's great that you are already developing it, thanks! :) FYI I'm proposing to add another spdx-related feature (support for comments, conversion of comments from dep5 to spdx, and possibly other comment-related features), see #625 . If you have any idea or feedback on that, feel free to comment there |
Great work, thanks for implementing all of @silverhook's suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 small suggestions but overall great work! I can see this coming in handy in many cases, thanks for contributing it.
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
This reverts commit 826952f.
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
|
6353b3d
to
854b5f3
Compare
@nicorikken added @carmenbianca's commits to this PR. Sorry about not being able to push directly to the PR, that's a limitation of my employer's GitHub organization. |
Is there any chance these arguments will get into a release anytime soon? |
Yes, we're planning a release in the next two weeks. |
Thank you for the answer! :) |
This PR fixes #586 by adding the
--add-license-concluded
flag to thereuse spdx
command.When that flag is provided, REUSE will now calculate the
LicenseConcluded
field in the SPDX report rather than setting it toNOASSERT
, byAND
ing all the expressions related to the file. This will allow tools consuming the SPDX report to know the actual licensing of each file, rather than having to rely on the lossy/incorrectLicenseInfoInFile
fields.Passing the flag will result in a slightly noticeable slowdown in large repositories: on
rust-lang/rust
, without the flagreuse spdx
takes 4.13s, while with the flag it takes 4.72s.To ensure compliance with the SPDX spec, this also adds the
--creator-person
and--creator-organization
flags toreuse spdx
. Optional by default, at least one of the flags will be required when passing--add-license-concluded
, as requested in the issue.Since there is no consensus yet in #586 whether to make this the default behavior or not, populating the field and gating that behind a CLI flag are in two different commits, so if you all decide to populateLicenseConcluded
by default we can simply drop the last commit. This PR does not changeLicenseInfoInFile
in any way.Also, the first commit makes running tests bearable on my machine, since I configured git to require signing all commits with my gpg key, which requires a physical touch on my YubiKey every time a commit is created 😅