Skip to content
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

[nuget] use $(PackageLicenseExpression), not $(PackageLicenseUrl) #35

Merged
merged 1 commit into from Mar 31, 2022

Conversation

jonpryor
Copy link
Member

Context: https://docs.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
Context: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license
Context: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/nuget#important-nuget-package-metadata
Context: https://docs.clearlydefined.io/curation-guidelines

Certain internal Microsoft tools check NuGet license information by
using ClearlyDefined curated data to determine verified license
information for packages which don't "clearly define" their license.

Unfortunately, a license URL is not considered "clearly defined",
likely because it isn't really machine readable. (Just because the
URL contains "MIT" doesn't mean it's actually MIT.)

As part of this effort, NuGet deprecated the <licenseUrl/>
element, and MSBuild deprecated the $(PackageLicenseUrl)
MSBuild property. The NuGet <license/> element or
$(PackageLicenseExpression) MSBuild property should be used.

Replace $(PackageLicenseUrl) with $(PackageLicenseExpression),
with a value of MIT AND BSD-3-Clause. The value needs to be an
SPDX identifier, and as OpenTK contains both MIT and 3-clause
BSD license text within Documentation/Licennse.txt, using the
AND expression feels appropriate.

This change should satisfy ClearlyDefined.

@dellis1972
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@dellis1972 dellis1972 left a comment

Choose a reason for hiding this comment

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

Can we bump the version number in this commit too? We can then start a publish

Context: https://docs.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
Context: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license
Context: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/nuget#important-nuget-package-metadata
Context: https://docs.clearlydefined.io/curation-guidelines

Certain internal Microsoft tools check NuGet license information by
using [ClearlyDefined curated data][0] to determine verified license
information for packages which don't "clearly define" their license.

Unfortunately, a license URL is *not* considered "clearly defined",
likely because it isn't *really* machine readable.  (Just because the
URL contains "MIT" doesn't mean it's *actually* MIT.)

As part of this effort, [NuGet deprecated][1] the [`<licenseUrl/>`][2]
element, and MSBuild deprecated the [`$(PackageLicenseUrl)`][3]
MSBuild property.  The NuGet [`<license/>`][4] element or
[`$(PackageLicenseExpression)` MSBuild property][5] should be used.

Replace `$(PackageLicenseUrl)` with `$(PackageLicenseExpression)`,
with a value of `MIT AND BSD-3-Clause`.  The value needs to be an
[SPDX identifier][6], and as OpenTK contains both MIT and 3-clause
BSD license text within `Documentation/Licennse.txt`, using the
`AND` expression feels appropriate.

This change should satisfy ClearlyDefined.

Update `$(_OpenTKNugetVersion)` to 1.0.2.

[0]: https://github.com/clearlydefined/curated-data/
[1]: NuGet/Home#7509
[2]: https://docs.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
[3]: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target
[4]: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license
[5]: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-a-license-expression-or-a-license-file
[6]: https://spdx.org/licenses/
@jonpryor jonpryor force-pushed the jonp-add-license-expression branch from 51794dc to 2ae1a5d Compare March 31, 2022 12:42
@jonpryor
Copy link
Member Author

@dellis1972: version number bumped.

@dellis1972 dellis1972 merged commit daa9b2d into main Mar 31, 2022
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.

None yet

2 participants