-
Notifications
You must be signed in to change notification settings - Fork 375
NuGet package licenses #2003
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 package licenses #2003
Conversation
6a65471
to
82414a0
Compare
@tmat - is it known which repos this will "break"? |
@markwilkie All repos. They will need to specify |
ok - given the impact, I'll need to be sure and communicate this well before it's merged. |
Indeed. We need the DL for communicating breaking changes. This would be a good opportunity to set it up (I don't mind waiting a bit longer with merging this PR). |
@markwilkie I figured out how to make this change in a non-breaking way. |
src/Microsoft.DotNet.Arcade.Sdk.Tests/GetLicenseFIlePathTests.cs
Outdated
Show resolved
Hide resolved
8c5df69
to
60a047a
Compare
Now that P3 is behind us, is this ready to go in @tmat ? |
Yes. I'll merge. |
Add predefined licenses and copyrights Replace PackageLicenseUrl with PackageLicenseExpression(Internal)
* Update dependencies from https://github.com/dotnet/arcade build 20190317.10 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19167.10 * License change demanded by Arcade See dotnet/arcade#2003. * [Arcade] Update .NET SDK, NuGet version This is required by new enforcement of LicenseExpression, which isn't supported by versions of NuGet before 4.9, included with MSBuilds before 15.9. * Convert Localization package to license expression
This change must be merged after Preview 3, since it depends on changes to repos consuming Acade that were made to their master branches.
Updates the dotnet cli used for build to 2.1.503, which brings in new NuGet license features.
Removes the need for suppressing NU5125.
Since they are no longer passing
PackageLicenseUrl
this is a breaking change for projects that depend on Arcade targets when generating packages from .nuspec files.NuGet supports
PackageLicenseExpression
orPackageLicenseFile
(see docs). The former is essentially a well-known identifier for a license, such asMIT
orApache-2.0
for our repos. The later means including the license file in the package. The expression is preferable, since one doesn't need to check that the license file is exactly what it's supposed to be.How do we make sure that the license file in the repo root matches the license specified by
PackageLicenseExpression
in Directory.Build.props file? This PR implements a simple content check for the licenses we need - it includes the expected license text files in Arcade SDK and then we compare the content and it must match modulo line breaks, whitespace. We require the license file in the root to be namedlicense(.txt|.md|)
, ignoring case.Each repository must specify either
PackageLicenseExpression
orPackageLicenseExpressionInternal
. The former when an OSS license is used the later when closed source license is used.The PR updates helpers for building packages from .nuspec. Instead of passing each msbuild property thru as a nuspec property and then listing all the metadata elements manually in the nuspec like so Arcade now defines a single property
CommonMetadataElements
that includes all the common nuspec metadata and can be used in the nuspec simply like so:Fixes #1955.
Fixes #1373.
Fixes #16.