JuliaAstro / FITSIO.jl

Flexible Image Transport System (FITS) file support for Julia
http://juliaastro.org/FITSIO.jl/
MIT License
55 stars 29 forks source link

License clash? (MIT/GPL) #5

Closed ziotom78 closed 10 years ago

ziotom78 commented 10 years ago

I see that FITSIO.jl has been released under the MIT license. However, the purpose of the code is to provide a link to the CFITSIO library, which is covered by the GPL (see http://heasarc.nasa.gov/docs/software/fitsio/c/f_user/node9.html).

Given the viral nature of the GPL, wouldn't this require that FITSIO.jl be released under the GPL too? The CFITSIO license states that "…any software that uses the CFITSIO library (which in turn uses the gzip code) must conform to the provisions in the GNU General Public License".

I know that different opinions exist on this topic (see http://en.wikipedia.org/wiki/GNU_General_Public_License#Linking_and_derived_works), but I wanted to know the author's position regarding this delicate issue.

(By the way: I am not a fan of the GPL, as I hate its viral nature. As a matter of fact, http://heasarc.nasa.gov/docs/software/fitsio/c/f_user/node9.html states that CFITSIO has been released under the GPL because it links to some GPL'ed code from zlib and AIPS. But I think it is important to fix this kind of issues.)

StefanKarpinski commented 10 years ago

As far as I understand, that is not quite how it works. This package is, by itself, not a derived work. The combination of this with the GPL library, however, is a derived work. Therefore, this code can be MIT, but the combination of this with the library is GPL. So, if we were to distribute that combination, it would be GPL.

ziotom78 commented 10 years ago

Thanks for the answer, Stefan. Let me see if I understand correctly what you said.

Imagine that somebody takes FITSIO.jl and bundles it with the source tree of CFITSIO, in order to make the installation of FITSIO.jl easier. If I understand well what you said, then they should update the LICENSE file from the MIT license to the GPL. Is this correct? Does this apply to CFITSIO and zlib as well?

StefanKarpinski commented 10 years ago

The code of FITSIO.jl can retain the MIT license but the resulting combined product should have a copy of the GPL included and is legally GPL. You can still copy and distribute the FITSIO.jl code under the terms of MIT (or GPL).

kbarbary commented 10 years ago

Here's a relevant FAQ item regarding wrappers: http://www.gnu.org/licenses/gpl-faq.html#GPLWrapper

It sounds like any code that actually uses cfitsio, through a wrapper, or otherwise, has to be GPL, even though the wrapper itself does not have to be GPL. So if we didn't include the cfitsio source code, the entire repository could remain MIT, but any end-user application that uses the wrapper to access cfitsio would have to be GPL, regardless. Did I get that right?

I find it a bit confusing that the wrapper doesn't have to be GPL, since it is directly calling the GPL code. I guess they consider the wrapper a "submodule" of the GPL program rather than the other way around, and this makes it OK.

StefanKarpinski commented 10 years ago

Yes – the wrapper is not derived from the GPL code, whereas the combined program is derived.

kbarbary commented 10 years ago

I think we can close this issue @ziotom78.

Moving forward, we should have a build script using BinDeps that calls apt-get or downloads the source if necessary. I can take a stab at that, if no one more experienced with BinDeps has time.

I think the only reason to actually bundle cfitsio would be if we wanted to use a patched version. (This is what the Python fitsio does; see https://github.com/esheldon/fitsio#notes-on-cfitsio-bundling).

ziotom78 commented 10 years ago

@kbarbary, I agree: let's close this discussion, I think the matter has been clarified. Thanks a lot!

kbarbary commented 9 years ago

For the record and for anyone finding this issue via searches, I recently discovered that the entirety of CFITSIO has in fact been liberally licensed since v3.26, released 2010 December 30. From the release notes, under that version:

   - replaced all the source code in CFITSIO that was distributed under the
     GNU General Public License with freely available code.  In particular,
     the  gzip file compression and uncompression code was replaced by the
     zlib compression library.  Thus, beginning with this version 3.26 of CFITSIO,
     other software applications may freely use CFITSIO without necessarily
     incurring any GNU licensing requirement.  See the License.txt file for
     the CFITSIO licensing requirements.

So now there's really no problem: FITSIO.jl is entirely MIT-licensed, even in combination with CFITSIO.