Drupal Licensing FAQ published
For the past year or so, there have been periodic questions raised about Drupal's licensing status. Is it GPL version 2? Are we moving to GPL version 3? Could we even if we wanted to? Is it OK to write a module that does [something weird]? As a member of the Drupal Association Board of Directors, I made it my task to sort out the answers to those questions.
Understanding licensing, and the differences between licenses, is more important than some realize. Open source is not the same as public domain. Open source and Free Software requires that source code be made available and that others are allowed to make use and share of the source code, but there are rules attached to how they can do so just as there is with proprietary software. For example, not all open source software can be combined, and there are requirements for how you distribute the source code of a program. Knowing which of those rules apply to Drupal, and to Drupal modules and themes, is important not only for the health of the code base (so we know what we can and can't do with the work of over a thousand people) but also to the health of the growing commercial Drupal economy.
I am pleased to announce that we now do have firm answers to these questions, and have a new and shiny FAQ up to answer them. There is nothing new in the FAQ; it is just a clarification of some edge cases that didn't used to exist.
We'd like to thank James Vasile of the Software Freedom Law Center for his help in working out the details. We also wanted to take a few moments to go into some of the reasoning behind how we reached a few of these conclusions.
What license does Drupal use?
Drupal is licensed under the GNU General Public License, version 2 or later.
Like most projects that are released under the GNU General Public License, Drupal has traditionally operated by just referring to "the GPL". For most of the last 15 years, that has been effectively synonymous with GPL version 2, since there was no GPL version 3 and no one actually used GPL version 1 anymore. With the release of GPL version 3, however, that has raised the question of whether such projects are actually under the GPL version 2 and 2 only, under version 2 or 3, or under "any GPL version". That has been the main question of late.
Drupal core and all contributed modules and themes also have a LICENSE.txt added to them automatically by the packaging script. That LICENSE.txt file is a copy of the GPL, version 2. That does not mean that Drupal is under GPL version 2 only, however, for two reasons outlined below.
Firstly, while the LICENSE.txt file does say at the top that it is GPL version 2 specifically, that is descriptive, not normative. That is, it merely identifies the text in that file as being GPL version 2 instead of something else. If the simple presence of that 2 at the top implied that it was version 2-only, then no code under GPL version 2 could ever move to GPL version 3. Clearly that is not what anyone wanted or intended.
Secondly, section 9 of GPL version 2 reads:
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
Because Drupal has not specified a version of the GPL (the header of the file not withstanding, as mentioned), that means Drupal and all contributed code is distributed under the GPL, "any version ever published by the Free Software Foundation". Since no one has actually used version 1 of the GPL in years, that is effectively the same thing as GPL version 2 or later. We have therefore clarified that to actually read GPL version 2 or later on the Licensing page. Unless you are using the GPL version 1, that changes nothing.
What license can I use for my code?
Anything that is contributed to Drupal, either as a patch or checked into CVS, must be under the same license as Drupal itself, GPL version 2 or later. While it is permitted to mix Drupal and code under, say, a BSD license, it can be confusing if you don't know which code can or cannot then be redistributed under some other license. Therefore, Drupal's CVS policy is "if it comes out of CVS, it's GPL version 2 or later. If you are not OK with that, don't commit it to CVS."
For code that is not in Drupal's CVS repository, however, the GPL still applies. Drupal modules and themes are a derivative work of Drupal itself. That means any code in them that "links" with Drupal code is covered by the GPL and if distributed must be distributed under the GPL as well. For PHP code, that effectively means that it is called from Drupal or it calls Drupal, so any module or theme is included, including template files.
There is no requirement that you distribute a theme you develop; however, if you do so, even if you are selling it commercially, then the PHP and Javascript portions of it must be distributed under the GPL. Images and CSS files are data, not code, so the requirements of the GPL on Drupal do not apply to them.
If you have any questions, please post them in the Legal Group over on Groups.Drupal.org. If you believe that Drupal, a Drupal module, or a 3rd party is in violation of the GPL for some reason, please contact the Drupal Association directly.