Skip to content

Add NuGet license information to .nuspec#310

Merged
gluck merged 1 commit into
gluck:masterfrom
jonpryor:jonp-use-nuget-license-expr
Apr 14, 2022
Merged

Add NuGet license information to .nuspec#310
gluck merged 1 commit into
gluck:masterfrom
jonpryor:jonp-use-nuget-license-expr

Conversation

@jonpryor

Copy link
Copy Markdown
Contributor

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.

The ILRepack and ILRepack.Lib NuGet packages do no specify any
license information within their .nuspec files.

Update build.groovy so that the generated .nuspec files contain
the ` element:

<license type="expression">Apache-2.0</license>

The value of the <license/> element must be an SPDX license
identifier.

This is slightly complicated by the fact that I can't find an easy
way to get com.ullink.nuget to emit XML attributes.
Fortunately, if it processes a closure, we can get access to the
underlying MarkupBuilder instance, which allows us to create an
XML element that contains both attributes and content.

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.

The `ILRepack` and `ILRepack.Lib` NuGet packages do no specify *any*
license information within their `.nuspec` files.

Update `build.groovy` so that the generated `.nuspec` files contain
the [`<license/>][1] element:

	<license type="expression">Apache-2.0</license>

The value of the `<license/>` element must be an [SPDX license][2]
identifier.

This is slightly complicated by the fact that I can't find an easy
way to get [`com.ullink.nuget` to emit XML attributes][2].
Fortunately, if it processes a closure, we can get access to the
underlying `MarkupBuilder` instance, which allows us to create an
XML element that contains both attributes and content.

[0]: https://github.com/clearlydefined/curated-data/
[1]: https://docs.microsoft.com/en-us/nuget/reference/nuspec#license
[2]: https://spdx.org/licenses/
[3]: https://github.com/Itiviti/gradle-nuget-plugin/blob/045fc691a704cda3fd6afcc43acc7e820a868926/src/main/groovy/com/ullink/NuGetSpec.groovy#L43-L63
@gluck gluck merged commit 033e89a into gluck:master Apr 14, 2022
@gluck

gluck commented Apr 14, 2022

Copy link
Copy Markdown
Owner

Thanks for the clean PR.
Unfortunately I have moved on from .Net and can no longer build/release this project (not even sure the release script still works).

LMK if you feel like releasing a patch (don't know how much you need it), and I can DM you a temporary API key for it.

@KirillOsenkov

Copy link
Copy Markdown
Collaborator

Hi @gluck thank you so much for everything you've done for .NET. This project is amazing and is still being super useful for the whole ecosystem.

Would you be interested in adding me as an owner to this project so I could continue maintaining it, merging PRs, making releases? Ideally also I'd need to be an owner on https://www.nuget.org/packages/ILRepack to be able to publish new versions.

If not, no problem, my current plan is to merge PRs into my fork and publish a NuGet with a different ID.

Thanks again!

@gluck

gluck commented Dec 21, 2023

Copy link
Copy Markdown
Owner

Hi @KirillOsenkov ,

happy to do so, I've moved on from .Net, doesn't mean everybody should !
I've invited you to the GitHub repo, will do on nuget next.

@timotei is that alright with you being both collaborators on this repo ?

@timotei

timotei commented Dec 21, 2023

Copy link
Copy Markdown
Collaborator

@gluck Sure 👍 I wasn't able to be properly involved in the past year(s) :(, so having another collaborator is great

Welcome @KirillOsenkov 👋

@KirillOsenkov

Copy link
Copy Markdown
Collaborator

Amazing! my nuget.org account is https://www.nuget.org/profiles/kirillosenkov

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.

4 participants