I'm trying to understand the way that GPLv2 works, and have a couple of questions. I'm going to describe a couple of scenarios, and want to know how GPL applies there.

  1. I make a web application that uses a GPLv2 library. I put this project in a public repository (github). The project calls functions from the library, but does not actually include its source - it just pulls it from the developers repository via a package manager during deployment. Do I still need to license the project as GPLv2?
  2. The same scenario, but I do NOT put the project in a public repository. As far as I understand this would not count as "distribution", so I don't have to bother with GPLv2 at all?
  3. I make a project that is built on top of a BSD-3 licensed framework and also use a GPLv2 library. Parts of the framework are included in the project, but the GPLv2 library is only downloaded during deployment. Which license has higher precedence then? Do I license my project under BSD-3 or GPLv2?

1 Answer 1


When you use a GNU GPL library then the whole software needs to be licensed under the GNU GPL. There is a variant of the GPL, the LGPL (Lesser GPL or Library GPL), which allows to call the library from a non-GPL software. But the authors of the library seem to have intentionally picked the GPL insted of the LGPL, so their intention seems to be to not allow it to be used for non-GPL software. Your build process is irrelevant. What matters is if the software is usable without the GPL component. When it is not, you need to license it under GPL.

The BSD-License, on the other hand, is a so-called "permissive" license. You can use BSD-code in a project and still license it under a different license as long as you follow the requirements of the BSD regarding attributing the original authors and the license conditions of their code (which only applies to their code, not what you built around it).

tl;dr: your whole project needs to be licensed under GPLv2

Rearding not putting the sourcecode on a public repository: When it is a web application, does it include Javascript code which is executed in the client browser? When that is the case, that Javascript code is distributed to your visitors and needs to be licensed to them under GNU GPL. But any code you only use server-sided is not distributed to the users, which means that you don't have to publish the sourcecode (there is another variant of the GPL, the AGPL, which also requires to license the software to anyone who uses it via a network, but the normal GPL does not have this clause).

  • 1
    Good note about JS. Since that's involved I suppose there's no options other than using GPL for the project. As a follow-up: As far as I understand GPL does not force you to make the source public, but it must be shared if anyone requests it. If so, if I do not make a public repo and just host the project somewhere, how would anyone know that it is GPL licensed? Commented Sep 8, 2015 at 9:40
  • @pie_is_nice See terms and conditions chapter 1 of the GPL.
    – Philipp
    Commented Sep 8, 2015 at 10:53
  • 1
    @pie_is_nice You could include a "copyright" page or "GPL notice" link somewhere on your page and then state what GPL software you've used. If you don't host the required source code, you can also make a "written offer" to supply the source code upon request. For GPL JavaScript libraries, this would include the actual JavaScript libraries you've used, and any JavaScript code you've written which depends upon them. "How would anyone know that it is GPL licensed?" - Well, you could always use the GPL software without fulfilling your obligations. But arguably that's a license infringement.
    – Brandin
    Commented Sep 8, 2015 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.