license cabal field for language bindings?

Hello Cabal Devs, Since the recurring topic of software licenses is being discussed on haskell-cafe again, I was wondering what the .cabal license-field should be for packages linking _directly_ to C-libraries, such as Haskell language bindings to C-libraries. To be more specific: As a side-effect of the ongoing discussion, Michael Snoyman implemented a web-based tool for computing the transitive license multiset[1] which made me wonder whether the .cabal license field should describe only the license of the source code proper distributed with the package or whether it should also take into account the licenses of the wrapped/linked libraries? E.g. * http://hackage.haskell.org/package/hfann is advertised as BSD3, but the FANN library[2] is actually LGPL. * http://hackage.haskell.org/package/igraph is advertised as BSD3 but the underlying igraph library is GPL2+ [3]. In these cases Michael's license-tool has no chance to report reliable information about the involved licenses, as the LGPL/GPL license is not mentioned in the cabal meta-data. In order to help describe cabal package's licenses more accurate, would it be conceivable to have either a) the license field take a list of licenses, b) in case of FFI bindings, set the license field to the more restricting license type, or c) introduce an additional field 'x-license' for specifying the external non-Haskell library's license? PS: A separate but related issue was raised in the haskell-cafe discussion: Many packages depend on the cpphs library as a hack, although they only need the cpphs executable (and therefore don't link against the cpphs package). This also skews the result that tools like [1] report, as the cpphs library is LGPLed which doesn't matter if only the cpphs executable was actually used for building the package. [1]: http://packdeps.haskellers.com/licenses [2]: http://leenissen.dk/fann/wp/ [3]: http://igraph.sourceforge.net/license.html Cheers, hvr

On Sun, 2012-12-16 at 20:14 +0100, Herbert Valerio Riedel wrote:
Hello Cabal Devs,
Since the recurring topic of software licenses is being discussed on haskell-cafe again, I was wondering what the .cabal license-field should be for packages linking _directly_ to C-libraries, such as Haskell language bindings to C-libraries.
To be more specific: As a side-effect of the ongoing discussion, Michael Snoyman implemented a web-based tool for computing the transitive license multiset[1] which made me wonder whether the .cabal license field should describe only the license of the source code proper distributed with the package or whether it should also take into account the licenses of the wrapped/linked libraries?
It should be the license of that package's source code only. The full bag of licenses can indeed be calculated. So bindings are not special (unless they actually ship the C source code as part of the package). Calculating the licenses when C libs are involved as dependencies is more tricky because the license info isn't quite so easily available in a machine readable form. You'd probably want to combine info from say the debian package db, find out which debian packages provide which C libs, and we know which C libs are needed by each cabal package. Join those two together and look up the license of the debian packages providing the C libs.
PS: A separate but related issue was raised in the haskell-cafe discussion: Many packages depend on the cpphs library as a hack, although they only need the cpphs executable (and therefore don't link against the cpphs package). This also skews the result that tools like [1] report, as the cpphs library is LGPLed which doesn't matter if only the cpphs executable was actually used for building the package.
That'd be solved if we did dependencies on programs properly. Duncan
participants (2)
-
Duncan Coutts
-
Herbert Valerio Riedel