libgit2 / libgit2/libgit2sharp
Replace <PackageLicenseFile> with <PackageLicenseExpression>
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi there!
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 cannot be used.
Although your package seems to be under MIT license, it's hard to auto-approve this package, because it uses 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 and cannot be automatically processed.
Reproduction steps
Compare e.g. the "About" page of https://www.nuget.org/packages/LibGit2Sharp with https://www.nuget.org/packages/Microsoft.Data.SqlClient, where the latter clearly states the package's license, while your package does not.
Expected behavior
I would expect the package's license to be clearly shown in its metadata.
Actual behavior
This package's metadata refers to an embedded license file instead.
Version of LibGit2Sharp (release number or SHA1)
All versions up to 0.30.0
Operating system(s) tested; .NET runtime tested
Not specific to OS or .NET runtime
Solution
Would you consider using an SPDX license expression? Basically, all that is needed is replacing the line
<PackageLicenseFile>App_Readme/LICENSE.md</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">App_Readme/LICENSE.md</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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在仓库的 *.csproj 和 *.props 文件中搜索 PackageLicenseFile,并检查生成相应 .nuspec 元数据的机制。将嵌入文件元数据替换为所要求的 MIT SPDX 表达式,按描述保留 LICENSE 文件,并验证生成的 NuGet 包元数据是否与预期的表达式形式一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- build-system, release
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100