Open ajrouvoet opened 3 years ago
I don't think there will be any technical problems with this. As I mentioned on Zulip, one needs to check if conditions listed in the license of every package Agda uses are met before releasing an official binary. Perhaps this is not an issue, but I hope someone can clarify this.
As for Windows, I don't know how to build a .msi
but just ordinary executable files. Will it be enough?
As I mentioned on Zulip, one needs to check if conditions listed in the license of every package Agda uses are met before releasing an official binary.
The cabal-plan tool can help with that, but this tool only handles Cabal packages (and the rts package seems to be excluded from the generated listing). I'm not sure exactly which other libraries Agda depends on, but the list includes zlib and ICU.
The cabal-plan tool can help with that, but this tool only handles Cabal packages (and the rts package seems to be excluded from the generated listing).
See #5134 for more context on this.
The following is the list of all licenses used by dependencies reported by cabal-plan
:
indexed-traversable
, text
)base-compat
, base-compat-batteries
, base-orphans
, integer-logarithms
)th-abstraction
)The clause from BSD-2/3 in which we are interested is the following part
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
- 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. ...
MIT license is similar
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
so is ISC
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appears in all copies.
In short, for the binary redistribution, we just need to provide the copyright notice of every (direct or indirect) dependency used by Agda. So, the question is how. Is it sufficient to list all the dependencies used by Agda with the link to their Hackage page in the documentation?
Thank you for looking into this! Do you mean the online docs or something like a man page or --help? I think the notices should be accessible from the distributed package, so the online docs won't do afaict.
Aha, you're right. It should be the documentation bundled with the distribution according to the clause.
I am now baffled after checking how other software is doing it. For example, pandoc
does not mention dependencies at all, and the macOS binary provided on the official website shows its own GNU license only. Is it enough to just include the license report as part of the distribution?
I am now baffled after checking how other software is doing it.
Just like protecting your software against malicious updates of dependencies, licensing of dependencies is also largely ignored in much software development...
Does the report include the copyright notices? The literal text should be in there.
Here is the report generated by cabal-plan
. It lists Haskell dependencies (but external libraries) and licenses with a link to the license declaration on Hackage. Perhaps a little script is needed to download all copyright notices following the link and put all of them as part of distribution?
Note that, as I wrote above, cabal-plan
does not list all relevant dependencies.
Is it enough to check if the description file .cabal
contains a nonempty field extra-libraries
?
Perhaps it is possible to "smuggle in" a dependency using Setup.hs
.
@L-TChen
- 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.
I took that seriously in BNFC/bnfc#308. BNFC has an option --license
which prints the license text, see https://github.com/BNFC/bnfc/blob/master/source/src/BNFC/License.hs.
https://github.com/BNFC/bnfc/blob/3bb050a426c6fbdc9d89b4c8217a648701681b6e/source/main/Main.hs#L60
While implementing this, I wondered why cabal does not have a standard solution for this, like it has for the version number (module Paths_XXX (version)
).
I opened a ticket at https://github.com/haskell/cabal/issues/7173
But I also wonder how "reproduce" is to be implemented, officially.
Right, it makes sense to solve this issue upstream. I will see if I can make a PR to improve the situation.
@L-TChen pointed out that the nightly release comes with binaries for multiple platforms. In teaching Agda I've seen many students struggle to get Agda on Windows. A zip with executables would save them many hours and frustration to get started (with PLFA).
Is it possible to still release in backwards fashion the binaries for the different platforms for e.g. 2.6.1.1?