Skip to content

Refactor LICENSE.md to make it scanner friendly #41095

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

Merged
merged 5 commits into from
Jun 29, 2021

Conversation

SamuraiAku
Copy link
Contributor

Most corporate environments will not approve the use of open-source software until all of the licensing terms have been reviewed and approved. Given the huge amounts of open source in use these days, companies rely on automated scanning to make a first pass at evaluation. If the scanning software is able to comprehend the license files, then approval could be granted in just a day or two. If the scanners cannot comprehend the license file then it goes into a queue for review by a human which takes a good deal longer. Commonly this review is required for every new point release that someone at the company wants to use. Given the rapid rate of Julia development, having to go into manual review will impede adoption of the latest and greatest versions of Julia in the corporate world.

Currently Julia's LICENSE.md file cannot be comprehended by the scanners. A good and easy way to tell if the license is scanner friendly is by checking if Github's own automated scanners can detect the license. For further information on Github's automated scanning see:
https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/licensing-a-repository#detecting-a-license

This pull request modifies LICENSE.md to make it scanner friendly. To do that, only the top-level MIT license is listed in the file. Changes to the formatting of license text have been to make it comprehensible to the scanners but the text of the license has not been altered. The licensing for other components have been moved to a new file name named THIRDPARTY.md.

To demonstrate that the reformatted LICENSE.md can be read by license scanners, I have created a new repository that contains only this PR as it's master branch.
https://github.com/SamuraiAku/license_refactor

You can see that under "About" the page says this repository uses the MIT license. That information was automatically filled in by Github's license scanner

Please note that this PR is only one step towards making the code base full scanner friendly. Future PRs can begin to tackle the remaining issues piece by piece.

@ViralBShah
Copy link
Member

The code in this repository is all MIT licensed (maybe there are some exceptions that I am forgetting), and the third party licenses probably only matter for the binaries. On the downloads page, we can link both the Julia and the third party licenses prominently.

Curious to see what others have to say.

@SamuraiAku
Copy link
Contributor Author

Following the text in license.md, the following source files are covered by a different license than MIT

  • src/crc32.c : zlib license; credit (although not the license) is given in the source file
  • src/ccall.cpp starting at line 288 : bsd-3 license
  • some portion of src/jitlayers.cpp : uiuc
  • src/disarm.cpp: uiuc license
  • src/getopt.c: MIT license from another project (so I guess it doesn’t have to be listed in the license file?)
  • some code from MINGW project for dirname on windows ; multiple licenses listed on homepage; Julia lists MIT
  • Some other functions from netbsd; bsd-3 license
  • Some functions from python; Python license
  • Some code from google for cyclecount; Apache license
  • everything in base/ryu; Boost license
  • Everything in base/grisu; except that folder doesn’t exist? Should that line be removed?
  • base/src/{exp, rem_pio2, hyperbolic}.jl; exp.jl is missing a copyright notice in the file. Portions of the other two files are covered by FDLIBM license

@oscardssmith
Copy link
Member

exp and all the variants are mit from 1.6 on. I rewrote the entire file from scratch using a different algorithm.

@SamuraiAku
Copy link
Contributor Author

exp and all the variants are mit from 1.6 on. I rewrote the entire file from scratch using a different algorithm.

Good to know. That’s something to be removed from the license files in another PR.

@vtjnash
Copy link
Member

vtjnash commented Jun 7, 2021

Yeah, seems to need cleanup. I don't think cyclecount should have ever been listed and grisu is deleted.

@SamuraiAku
Copy link
Contributor Author

I can open another PR for thirdparty cleanup after this one is dispositioned.

@ViralBShah
Copy link
Member

@StefanKarpinski Any thoughts here? We should probably keep this open a bit longer to give time to folks to comment.

@oscardssmith
Copy link
Member

Perhaps we should just add it to triage?

@StefanKarpinski
Copy link
Member

I think it's fairly important to leave some kind of breadcrumb for someone who is looking at the license file indicating that there may be other licensing considerations when using the result of compiling this code. If an extra line at the bottom could link to the THIRDPARTY.md file that would be fine.

@ViralBShah ViralBShah added the triage This should be discussed on a triage call label Jun 9, 2021
@SamuraiAku
Copy link
Contributor Author

I think that will do it. At first adding the pointer to THIRDPARTY.md broke the license scanner until I found a way to make it ignore everything after the license.

licensee/licensee#498

Copy link
Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good to me. With cross references between the two files this seems clear and it's good that it helps automatic license detection do its thing.

@ViralBShah
Copy link
Member

Did triage discuss this?

@oscardssmith
Copy link
Member

We didn't have triage last week. (So no)

@JeffBezanson
Copy link
Member

Triage says yes.

@JeffBezanson JeffBezanson removed the triage This should be discussed on a triage call label Jun 17, 2021
@mbauman
Copy link
Member

mbauman commented Jun 17, 2021

There doesn't seem to be a definitive idiom for this, but this SoftwareEngineering.SE question its answers suggest some similar ideas — it seems as long as whatever we do here is obvious we're in good stead. IMO most options suggested there are less obvious than this.

@SamuraiAku
Copy link
Contributor Author

@ViralBShah Does this PR need your approval before it can move forward?

@ViralBShah
Copy link
Member

What's going on in the CI that is preventing the merging? I think this is good to go.


On some platforms, distributions of Julia contain SSL certificate authority certificates,
released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License).
Please see THIRDPARTY.md for license information for other software used in this project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to link the URL of THIRDPARTY.md in here (either now or after merging).

@SamuraiAku
Copy link
Contributor Author

It looks like maybe the version that I made these changes to had other issues. Should I rebase?

@ViralBShah
Copy link
Member

Sure no harm rebasing

…ered by the main MIT license. This format allows for automated scanning and categorization of Julia's license. The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).
… doesn't break the Github scanner (and hopefully others)
SamuraiAku and others added 2 commits June 29, 2021 08:26
Co-authored-by: Stefan Karpinski <[email protected]>
Co-authored-by: Jeff Bezanson <[email protected]>
@SamuraiAku
Copy link
Contributor Author

@ViralBShah I’ve rebased and now CI is passing. This should be enough to move forward right?

@JeffBezanson JeffBezanson merged commit 161e384 into JuliaLang:master Jun 29, 2021
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).
SamuraiAku added a commit to SamuraiAku/julia that referenced this pull request Jul 22, 2021
…s third party code. Remove reference from THIRDPARTY.md and add standard Julia header to exp.jl. See comments in JuliaLang#41095
ViralBShah pushed a commit that referenced this pull request Aug 11, 2021
* Add LLVM project license text to src/disasm.cpp

* Remove mention of third party code from header in src/jitlayers.cpp, since there are no markings of third party code in the actual source code. Update THIRDPARTY.md as well

* More precise reference to source files using MUSL code in THIRDPARTY.md

* Remove reference to joinpath in Python section of THIRDPARTY.md. The function does not appear to exist

* Removed reference to cyclecount from THIRDPARTY.md since it does not apear to exist in the codebase

* Remove reference to grisu from THIRDPARTY.md. This code was deleted a while ago

* base/special/exp.jl was previously rewritten so that it no longer uses third party code. Remove reference from THIRDPARTY.md and add standard Julia header to exp.jl.  See comments in #41095

* Add BSD-3 license to src/flisp

* In THIRDPARTY.md, move FEMTOLISP reference to the third party code in src section.  This is the proper location for the reference since the code is part of the Julia repository and not an external dependency

* In THIRDPARTY.md, change the LIBUNWIND license link to the repository Julia actually pulls the dependency from

* In THIRDPARTY.md, change the LIBUV license link to the repository Julia actually pulls the dependency from

* Clearly mark references to LLVM open source license as UIUC not BSD-3. They are very similar but are recognized as different licenses.

* In THIRDPARTY.md, change the DSFMT license link to the respository Julia actually pulls the code from.

* In THIRDPARTY.md, change the MBEDTLS license link to the repository Julia actually pulls from. The license in that repo is Apache 2.0 only, which is the default for the project anyhow, so I removed mention of the alternate GPL licensing option

* In THIRDPARTY.md, change the SUITESPARSE license link to the repository Julia pulls the dependency from.

* Add missing reference to LIBBLASTRAMPOLINE in THIRDPARTY.md

* Add missing reference to LIBWHICH in THIRDPARTY.md

* Add missing reference to NGHTTP2 in THIRDPARTY.md

* Add hyperlinks between LICENSE.md and THIRDPARTY.md

* In THIRDPARTY.md, move LIBWHICH from stdlib dependencies to build tools
@SamuraiAku
Copy link
Contributor Author

@ViralBShah, Should this PR be back ported to 1.6 and 1.7?

@ViralBShah
Copy link
Member

Yes, let's do that.

@SamuraiAku
Copy link
Contributor Author

@ViralBShah can you add the back port labels then? Thanks.

@ViralBShah ViralBShah added backport 1.6 Change should be backported to release-1.6 backport 1.7 labels Sep 1, 2021
KristofferC pushed a commit that referenced this pull request Sep 2, 2021
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit 161e384)
KristofferC pushed a commit that referenced this pull request Sep 3, 2021
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit 161e384)
KristofferC pushed a commit that referenced this pull request Sep 6, 2021
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit 161e384)
@KristofferC KristofferC removed backport 1.6 Change should be backported to release-1.6 backport 1.7 labels Sep 7, 2021
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit 161e384)
vchuravy pushed a commit to JuliaLang/LazyArtifacts.jl that referenced this pull request Oct 2, 2023
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit 8978269)
vchuravy pushed a commit to JuliaPackaging/LazyArtifacts.jl that referenced this pull request Oct 2, 2023
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).
vchuravy pushed a commit to JuliaPackaging/LazyArtifacts.jl that referenced this pull request Oct 2, 2023
* Add LLVM project license text to src/disasm.cpp

* Remove mention of third party code from header in src/jitlayers.cpp, since there are no markings of third party code in the actual source code. Update THIRDPARTY.md as well

* More precise reference to source files using MUSL code in THIRDPARTY.md

* Remove reference to joinpath in Python section of THIRDPARTY.md. The function does not appear to exist

* Removed reference to cyclecount from THIRDPARTY.md since it does not apear to exist in the codebase

* Remove reference to grisu from THIRDPARTY.md. This code was deleted a while ago

* base/special/exp.jl was previously rewritten so that it no longer uses third party code. Remove reference from THIRDPARTY.md and add standard Julia header to exp.jl.  See comments in JuliaLang/julia#41095

* Add BSD-3 license to src/flisp

* In THIRDPARTY.md, move FEMTOLISP reference to the third party code in src section.  This is the proper location for the reference since the code is part of the Julia repository and not an external dependency

* In THIRDPARTY.md, change the LIBUNWIND license link to the repository Julia actually pulls the dependency from

* In THIRDPARTY.md, change the LIBUV license link to the repository Julia actually pulls the dependency from

* Clearly mark references to LLVM open source license as UIUC not BSD-3. They are very similar but are recognized as different licenses.

* In THIRDPARTY.md, change the DSFMT license link to the respository Julia actually pulls the code from.

* In THIRDPARTY.md, change the MBEDTLS license link to the repository Julia actually pulls from. The license in that repo is Apache 2.0 only, which is the default for the project anyhow, so I removed mention of the alternate GPL licensing option

* In THIRDPARTY.md, change the SUITESPARSE license link to the repository Julia pulls the dependency from.

* Add missing reference to LIBBLASTRAMPOLINE in THIRDPARTY.md

* Add missing reference to LIBWHICH in THIRDPARTY.md

* Add missing reference to NGHTTP2 in THIRDPARTY.md

* Add hyperlinks between LICENSE.md and THIRDPARTY.md

* In THIRDPARTY.md, move LIBWHICH from stdlib dependencies to build tools
vchuravy pushed a commit to JuliaLang/Distributed.jl that referenced this pull request Oct 6, 2023
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit 8bc9409)
vchuravy pushed a commit to JuliaLang/Test.jl that referenced this pull request Oct 7, 2023
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).

(cherry picked from commit c312422)
Keno pushed a commit that referenced this pull request Jun 5, 2024
Create THIRDPARTY.md to hold license information for all code not covered by the main MIT license. This format allows for automated scanning and categorization of Julia's license.  The licenses were broken up this way because this is the format that many automated license scanners (including GitHub).
Keno pushed a commit that referenced this pull request Jun 5, 2024
* Add LLVM project license text to src/disasm.cpp

* Remove mention of third party code from header in src/jitlayers.cpp, since there are no markings of third party code in the actual source code. Update THIRDPARTY.md as well

* More precise reference to source files using MUSL code in THIRDPARTY.md

* Remove reference to joinpath in Python section of THIRDPARTY.md. The function does not appear to exist

* Removed reference to cyclecount from THIRDPARTY.md since it does not apear to exist in the codebase

* Remove reference to grisu from THIRDPARTY.md. This code was deleted a while ago

* base/special/exp.jl was previously rewritten so that it no longer uses third party code. Remove reference from THIRDPARTY.md and add standard Julia header to exp.jl.  See comments in #41095

* Add BSD-3 license to src/flisp

* In THIRDPARTY.md, move FEMTOLISP reference to the third party code in src section.  This is the proper location for the reference since the code is part of the Julia repository and not an external dependency

* In THIRDPARTY.md, change the LIBUNWIND license link to the repository Julia actually pulls the dependency from

* In THIRDPARTY.md, change the LIBUV license link to the repository Julia actually pulls the dependency from

* Clearly mark references to LLVM open source license as UIUC not BSD-3. They are very similar but are recognized as different licenses.

* In THIRDPARTY.md, change the DSFMT license link to the respository Julia actually pulls the code from.

* In THIRDPARTY.md, change the MBEDTLS license link to the repository Julia actually pulls from. The license in that repo is Apache 2.0 only, which is the default for the project anyhow, so I removed mention of the alternate GPL licensing option

* In THIRDPARTY.md, change the SUITESPARSE license link to the repository Julia pulls the dependency from.

* Add missing reference to LIBBLASTRAMPOLINE in THIRDPARTY.md

* Add missing reference to LIBWHICH in THIRDPARTY.md

* Add missing reference to NGHTTP2 in THIRDPARTY.md

* Add hyperlinks between LICENSE.md and THIRDPARTY.md

* In THIRDPARTY.md, move LIBWHICH from stdlib dependencies to build tools
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.

8 participants