Non-standard LICENSE generated by stack new

An issue was recently raised against the LICENSE file in a project I created using stack new (stack version 2.13.1).

Essentially the raiser was querying why the LICENSE differed from the BSD-3-Clause license. It does seem strange, especially the use of the verbiage “All rights reserved.” which does not appear in the BSD-3-Clause license. Does anyone know why the generated LICENSE file is the way it is?

Also, I couldn’t see where the file is generated, presumably, from the project GitHub - commercialhaskell/stack: The Haskell Tool Stack. Please could someone point me at the source file(s) for the generated LICENSE.

3 Likes

From Wikipedia:

“All rights reserved” is a phrase that originated in copyright law as part of copyright notices. It indicates that the copyright holder reserves, or holds for their own use, all the rights provided by copyright law, such as distribution, performance, and creation of derivative works; that is, they have not waived any such right. Copyright law in most countries no longer requires such notices, but the phrase persists.

So it doesn’t really mean anything other than “the creator of the project/package/library can do whatever they want with the thing, because they made it”. And I guess, given it’s on a very permissive license, the addition doesn’t do much, because everyone can do pretty much whatever they want with the project/package/library. :man_shrugging:

1 Like

That’s true, but these (pointless?) modifications mean that the LICENSE isn’t auto-detected e.g. by github.com. See the auto-detection result below for the project in question after switching to the BSD-3-Clause license.
license

Looking though the Stack sources revealed nothing pertinent. But stack relies on Cabal-the-library, and a quick search through the Cabal sources lists:

https://github.com/haskell/cabal/blob/master/cabal-install/src/Distribution/Client/Init/Licenses.hs

(see the bsd3 definition) as a possible match: it contains the All rights reserved sentence…

1 Like

Nice find. Based on the git blame of that file, the copyright text in that file has been unchanged for 15 years. There may have been updates to the license in that time. The commit references http://www.opensource.org/licenses/bsd-license.php as its inspiration, which now redirects to the BSD-2-Clause license anyway. @Underlap, you could consider opening a PR against Cabal with updated text!

3 Likes

Also, sending that opensource.org URL through the Wayback Machine confirms the license text used to be, at the time of the commit, the one in Cabal, including the “All rights reserved”: Open Source Initiative OSI - The BSD License:Licensing | Open Source Initiative

3 Likes

This is definitely not ok. I took the liberty of filing a ticket.

1 Like

Note that the content for stack new comes from here:

It’s been a while since I’ve messed with Stack templates, but you may want to open an issue or PR against that repository.

1 Like

A patch to fix this will land in master in two days.

3 Likes

That part of the new-template.hsfiles dates from 2015. If it has not kept pace with the current preferred form, I’m happy to update it.

EDIT: I’ve created an issue at the repository: Ensure BSD-3-Clause text follows closely the current preferred form · Issue #162 · commercialhaskell/stack-templates · GitHub and will clear it soon.

EDIT2: The templates are updated.

4 Likes

Thanks for the work spawned by this thread. Unfortunately, discourse didn’t send me a single notification otherwise I would have lent a hand…

3 Likes

stack 2.15.5 appears to generate the correct BSD license. Thanks everyone!

4 Likes