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