Closed MeFisto94 closed 1 year ago
Github can recognize BSD3 licenses. For instance, see
Editing the LICENSE file now might not help. I suspect that license recognition occurs when a repo is created. As evidence of this, note that my fork of JMonkeyEngine has a recognized license:
I think it just needs the: BSD 3-Clause License ...line at the top.
I tried that in one of my projects and it worked.
I think GitHub supports detection of SPDX License Identifiers: https://spdx.org/licenses/
Apparently I can confirm what paul said, the licenses that my projects have, that have been automatically inited by Github contain BSD 3-Clause License
, one blank line and then start with the Copyright.
Currently the license is detected as "other"
I edited the LICENSE file at 8017f3bc but so far I haven't seen evidence that Github recognizes the license.
Maybe the .md extension should be added to the LICENSE file for Github to recognize it. "LICENSE.md" or "license.md"
Renaming didn't seem to help. Now it's also in a weird state where I've edited the bullets to be 1., 2., etc. but if you view the raw file it still shows *. Maybe something is cached now.
Edit: if anyone wants to compare, this is my own file that I changed some time back and it worked: https://github.com/Simsilica/SimMath/blob/master/license.md ...you can see the edit in the commits.
The third bullet in jme's license had been customized compared to the standard bsd3. Also, bullet points do not have justified paragraphs against the bullet.
A correct version of the license is as such:
BSD 3-Clause License
Copyright (c) 2009-2021 jMonkeyEngine
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Renaming might break web links. Also, it was unnecessary. I have several projects where the license file has no extension (or .txt) and those licenses are detected just fine. See the list above.
The .md file extension causes Github to apply "markdown" formatting, which explains why the raw file doesn't match what's displayed.
Real raw file had 1., 2., 3. The raw file when I viewed it had *'s. Github was messing up somehow.
Versus on my own project where the exact same formatting was sensible.
Easy enough to name it back, I was just trying to see what it would take to match. Once github stopped seeing my updates, I quit.
It seems like we're all guessing here, and so far none of our guesses has paid off. I'll put the license files back the way they were.
@stephengold see my comment above. The jme license has custom verbiage in the third bullet that needs to be normalized for the github detection to work.
custom verbiage in the third bullet that needs to be normalized for the github detection to work
Do you have access to Github's algorithm, or are you guessing?
Either way, it's not worth altering our license just to get it recognized by Github. As the OP said, it's a very minor issue.
That is the only difference (other than the copyright name at the top) when performing a diff on a working license file that github detected with the exact same name (when it was names license.txt, it has had several names over the last couple days 😄 )
Perhaps Github only performs license detection when a repo is created...
But earlier in this thread I fixed one of my repositories by simply changing the license. So if it's in the right format then it will find the type. (My own more closely matches the BSD template since it doesn't have the extraneous stuff that JME adds to its license.)
I fixed one of my repositories by simply changing the license
I didn't realize that.
So suppose we get the LICENSE file just the way Github wants it. Are we also going change the 7,300 copies of that license that are embedded in Java source files?
Do you have access to Github's algorithm, or are you guessing?
According to https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/licensing-a-repository, GitHub uses https://github.com/licensee/licensee to detect the license.
It only detects the license if the Sørensen–Dice coefficient is greater than 95%.
I just tested it in a fork. If you
then the license is correctly detected.
There is two things throwing GitHub off: the custom verbiage in the 3rd bullet point, and the license.txt file.
This is what my fork shows after the changes:
Can I take this issue for Hacktoberfest?
I don't see why not
I fixed the license in my fork of this repository:
https://github.com/b0n541/jmonkeyengine/blob/master/LICENSE.md
Do you want me to also change the license block on top of all of the source files?
I also found out that GitHub only seems to re-detect a license if the LICENSE.md file is re-created in a repository and the source file header template file doesn't contain the string "license".
Pull request: https://github.com/jMonkeyEngine/jmonkeyengine/pull/1855
This issue seems to have been resolved when #1855 was merged. Ping to close?
@Sailsman63 thanks for reminding
A very minor issue, but when accessing https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/LICENSE, github does not recognize the license type automatically.
If someone is bored to debug that, potentially we may need to change the wording by a small bit to make it fit the official regex. A quick search made me wonder if BSD-3 is even detected by github at all, but to show what I mean, have a look at this, being licensed under MIT: https://github.com/mit-license/mit-license.github.io/blob/master/LICENSE
https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/licensing-a-repository#detecting-a-license on the other hand claims that BSD3 is supported. Maybe someone can experiment with the ruby gem