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

Replace <PackageLicenseFile> with <PackageLicenseExpression> #6645

Open
szimmer-dap opened this issue May 3, 2023 · 2 comments
Open

Replace <PackageLicenseFile> with <PackageLicenseExpression> #6645

szimmer-dap opened this issue May 3, 2023 · 2 comments
Labels
Build Build related issue enhancement New feature or request
Milestone

Comments

@szimmer-dap
Copy link

Hi there!

Is your feature request related to a problem? Please describe.
We are currently adapting a package approval workflow, where packages are approved or blocked based on certain criteria. One very important criterion is the package's license. There is a list of approved licenses (like MIT, Apache, BSD, ...) and a list of licenses that can not be used (like GPL).

Although the Microsoft.ML Nuget packages are under MIT license, it's hard to auto-approve them, because they use an embedded license file instead of an SPDX tag (https://spdx.github.io/spdx-spec/v2-draft/SPDX-license-list/). As a result, the license does not show up in the package's metadata (compare e.g. the "About" page of https://www.nuget.org/packages/Microsoft.ML with https://www.nuget.org/packages/Microsoft.Data.SqlClient, where the latter clearly states the package's license, while Microsoft.ML does not).

Describe the solution you'd like
Would you consider using an SPDX license expression? Basically, all that is needed is replacing the line
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
with
<PackageLicenseExpression>MIT</PackageLicenseExpression>
in all *.csproj or *.props files (or whatever mechanism generates the corresponding *.nuspec file). The LICENSE file can still remain in the package, just the metadata would change. The corresponding .nuspec file should then change the line
<license type="file">LICENSE.txt</license>
to
<license type="expression">MIT</license>

This would be a huge help for us, because with embedded license files we have to manually check and approve every single version of every package.

Describe alternatives you've considered
The alternative would be for us to download every package, manually check the context of each embedded LICENSE file, make sure that it is in fact an approved license, and then manually allow the package. This would have to be done for every release of every package without an SPDX license tags.

Additional context
The dotnet / runtime repo seems to use already use license expressions (and apparently use a an additional <LicenseFile>).
The microsoft / MSBuildSdks repo switched to license expressions about two years ago, following the recommendations provided in Microsoft's .nuspec reference.

@szimmer-dap szimmer-dap added the enhancement New feature or request label May 3, 2023
@ghost ghost added the untriaged New issue has not been triaged label May 3, 2023
@michaelgsharp michaelgsharp added this to the ML.NET 3.0 milestone May 3, 2023
@ghost ghost removed the untriaged New issue has not been triaged label May 3, 2023
@michaelgsharp
Copy link
Member

@szimmer-dap Thanks for pointing this out. We will make sure to get this fixed by the next full release.

@michaelgsharp michaelgsharp added the Build Build related issue label May 3, 2023
@szimmer-dap
Copy link
Author

Looks like this was resolved with PR #6674.
NuGet.org now correctly shows MIT as license for Microsoft.ML starting with 3.0.0-preview.23266.6.

I think this issue can be closed. Thanks for resolving this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Build related issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants