Skip to content

Is default package license URL correct? #1955

Closed

Description

@ericstj

Looks like the license points to http://go.microsoft.com/fwlink/?LinkId=529443.

<PackageLicenseUrl>http://go.microsoft.com/fwlink/?LinkId=529443</PackageLicenseUrl>

This is the old library license.

MICROSOFT SOFTWARE LICENSE TERMS

MICROSOFT .NET LIBRARY

Shouldn't we be defaulting to MIT? See https://github.com/dotnet/corefx/issues/12190

Activity

  1. changed the title [-]Is default package license URL[/-] [+]Is default package license URL correct?[/+] on Feb 1, 2019
  2. ericstj commented on Feb 1, 2019

    @ericstj
    MemberAuthor
  3. tmat commented on Feb 4, 2019

    @tmat
    Member

    Seems like we have two sets of repos - some on MIT, others on Apache :(. This property will need to change anyways since NuGet now requires including the license file in the package and not setting the URL.

  4. tmat commented on Feb 4, 2019

    @tmat
    Member

    Related: #1373

  5. tmat commented on Feb 4, 2019

    @tmat
    Member

    Since license file is required to be in the repository (usually in the root) we can define a convention that the file is /License.txt in all our repos, include that file in the package automatically and report an error if it is not present.

    @natemcmaster Would that work for ASP.NET repos?

  6. ericstj commented on Feb 4, 2019

    @ericstj
    MemberAuthor

    Allow for it to to be defined as a different path (for example /LICENSE) but it seems reasonable.

  7. natemcmaster commented on Feb 4, 2019

    @natemcmaster
    Contributor

    @Eilon would be able to answer better on our requirements for license urls in aspnet packages. I haven't yet looked into embedded license files instead of using a stable license urls. We keep a license.txt file in the root in all aspnet repos

  8. tmat commented on Feb 4, 2019

    @tmat
    Member

    @ericstj

    Allow for it to to be defined as a different path (for example /LICENSE) but it seems reasonable.

    Why?

  9. ericstj commented on Feb 4, 2019

    @ericstj
    MemberAuthor

    Because not all repositories use .txt extension. We do but that's not a requirement. EG: https://github.com/dotnet/machinelearning/blob/master/LICENSE

  10. tmat commented on Feb 4, 2019

    @tmat
    Member

    Yeah, then we rename those that do not. Some repos use lower case, some upper case, some extension some not. I don't think we should do all permutations.

  11. tmat commented on Feb 4, 2019

    @tmat
    Member

    Perhaps we can allow two variants: LICENSE and License.txt.

  12. ericstj commented on Feb 4, 2019

    @ericstj
    MemberAuthor

    I'm not suggesting you support everything. Just think about how folks would set it themselves in their own repo before you hardcode it. I've noticed a lot of properties in Arcade don't take into account that they are providing a default that folks can override.

  13. tmat commented on Feb 4, 2019

    @tmat
    Member

    That's intentional. There is no point in being different here.

  14. ericstj commented on Feb 5, 2019

    @ericstj
    MemberAuthor

    Suppose someone has one project in the repo with a different license. Just allow for a project to overwrite $(PackageLicenseFile): don't set it in targets unconditionally. If you have a target that does anything (add it to package, check for existence) make sure it honors the value of the property and not a hardcoded path.

    I think it would naturally work this way by replacing PackageLicenseUrl with PackageLicenseFile in the props, but I just wanted to point it out with your suggestion around the default convention.

  15. tmat commented on Feb 5, 2019

    @tmat
    Member

    Yes, it will probably be just naturally overridable. But my point is that allowing customization just for the sake of customization adds negative value.

  16. tmat commented on Feb 5, 2019

    @tmat
    Member

    We should just decide on one name and use it everywhere, so that no one will ever need to think about it again.

  17. Eilon commented on Feb 5, 2019

    @Eilon
    Contributor

    Renaming license files that are checked in is not without its own peril - it is sometimes (arguably incorrectly) linked via a branch name in the URL, so if you rename it (even just changing case), old links will break. Ideally URLs would refer to specific tags/commits, but that is probably not always the case.

    But, as to the other things mentioned in the thread:

    • For ASP.NET/EF Core yeah we use Apache for legacy reasons, so we need to stick to that
    • Using the new NuGet format for license sounds good (and valuable) to me
  18. tmat commented on Feb 5, 2019

    @tmat
    Member

    it is sometimes (arguably incorrectly) linked via a branch name in the URL, so if you rename it (even just changing case), old links will break.

    @Eilon Good point. Do we want to correct such links, if there are any? I noticed in a few repos where license headers in source files mention "See {file} in the repository root" but {file} does not match the name of the actual license file. One reason why having different names in different repos is not desirable. At some point I hope we'll have an analyzer that checks for a predefined license header in source files, so perhaps the analyzer can also be checking for the existence of the file name, but still it is just simpler if they are all the same ...

    • For ASP.NET/EF Core yeah we use Apache for legacy reasons, so we need to stick to that

    Sure, I'm not suggesting changing the content of the file.

  19. markwilkie commented on Feb 5, 2019

    @markwilkie
    Contributor

    Re: defaults - it's still on my plate to get official guidance out there that we can agree on. But what seems to be emerging is that a) Arcade should provide "defaults" which teams are strongly recommended to use because that's where the most value and support is found, and b) "defaults" can (almost) always be overwritten - with the team knowing that they are thus trading short term cost for (perhaps) more long term support cost.

    Regardless - more soon on this....

  20. Eilon commented on Feb 5, 2019

    @Eilon
    Contributor

    Re: The filename mentioned in the file headers

    That's for humans, not machines. I agree it would be nice if it was correct, but I don't think any "errors" there are worth fixing.

  21. tmat commented on Feb 5, 2019

    @tmat
    Member

    @Eilon It's similar to enforcing code formatting. That's for humans too, the compiler doesn't care about whitespace. We provide an analyzer to enforce code formatting rules. Customers actually also ask about enforcing license header. It's likely we'll provide analyzer for that as well.

  22. tmat commented on Feb 7, 2019

    @tmat
    Member

    Some data:

    dotnet/toolset                    LICENSE                 MIT License
    dotnet/core-sdk                   LICENSE                 MIT License
    dotnet/cli                        LICENSE                 MIT License
    dotnet/arcade-validation          LICENSE.TXT             MIT License
    dotnet/performance                LICENSE.TXT             MIT License
    dotnet/wcf                        LICENSE.TXT             MIT License
    dotnet/arcade                     LICENSE.TXT             MIT License
    dotnet/CliCommandLineParser       LICENSE.TXT             MIT License
    dotnet/arcade-services            LICENSE.TXT             MIT License
    dotnet/wpf                        LICENSE.TXT             MIT License
    dotnet/standard                   LICENSE.TXT             MIT License
    dotnet/core-setup                 LICENSE.TXT             MIT License
    dotnet/diagnostics                LICENSE.TXT             MIT License
    dotnet/corefx                     LICENSE.TXT             Other
    dotnet/coreclr                    LICENSE.TXT             Other
    aspnet/websdk                     LICENSE.txt             Other
    dotnet/source-build               LICENSE.txt             MIT License
    aspnet/AspNetCore                 LICENSE.txt             Apache License 2.0
    aspnet/EntityFrameworkCore        LICENSE.txt             Apache License 2.0
    aspnet/AspNetCore-Tooling         LICENSE.txt             Apache License 2.0
    dotnet/symreader                  License.txt             Apache License 2.0
    dotnet/sourcelink                 License.txt             Apache License 2.0
    dotnet/metadata-tools             License.txt             Apache License 2.0
    dotnet/symreader-portable         License.txt             Apache License 2.0
    dotnet/roslyn                     License.txt             Apache License 2.0
    dotnet/interactive-window         License.txt             Apache License 2.0
    dotnet/roslyn-tools               LICENSE.md              Apache License 2.0
    
  23. ericstj commented on Feb 7, 2019

    @ericstj
    MemberAuthor

    Curious why you think corefx and coreclr aren't identified as MIT. I did a quick diff with core-setup and they are showing up as identical 😕 ironically it looks like golang has the same issue.

  24. ericstj commented on Feb 8, 2019

    @ericstj
    MemberAuthor

    Looks like we need to email GitHub support: licensee/licensee#147 (comment)

    I reached out to GH support.

  25. tmat commented on Feb 8, 2019

    @tmat
    Member

    It's odd, I didn't dig into it. Just used github license API to query.

  26. tmat commented on Feb 8, 2019

    @tmat
    Member

    So, NuGet supports PackageLicenseExpression or PackageLicenseFile. The former is essentially a well-known identifier for a license, such as MIT or Apache-2.0 for our repos. The later means including the license file in the package. I believe 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 root matches the license specified by PackageLicenseExpression in Directory.Build.props file? We can implement a simple content check for the licenses we need - we include the text file in Arcade SDK and then we compare the content and it must match exactly.

    If repo does not specify PackageLicenseExpression that means their license is non-standard and we can set PackageLicenseFile to the license file in the root of the repo and include it in the packages built from the repo automatically.

    We would require the license file in the root to be named license.(txt|md|), ignoring case.

  27. tmat commented on Feb 8, 2019

    @tmat
    Member

    Work in progress: #2003

  28. danmoseley commented on Mar 5, 2019

    @danmoseley

    @ericstj See https://github.com/dotnet/corefx/issues/35159 my tentative conclusion from messing with it is it's the PATENTS.TXT, which it's mis-recognizing (with low confidence) as containing the MS-PL, and Github puts all this together and decides it's not clearly MIT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions