There are a number of things to consider when it comes to licensing an open source project. Who can distribute it? Where can it be stored? Who owns the copyright? In this article, we'll take a look at the various types of licenses available for open source projects and how to choose one for a project.
As I mentioned in the first part of the series, one of the main reasons developers want to publish their work as an open source project is for other developers to be able to work on their projects, suggest and make changes, and help improve the project.
The only way that this is possible from a legal perspective is through the open source licensing system. In this article, we'll take a look at some popular open source licenses and what they entail.
1. GNU General Public License
The GNU license is the most popular open source license. The GNU (GPL) license is very clear about what is permitted and what's not.
- The software can be copied onto your own servers, your client's server, or basically anywhere you want to place it. There are absolutely no limits on how many copies you can make, which allows for fast editing no matter where you are.
- The software can be distributed however you want, through a download link on your website or on physical media like a flash drive. It can literally be distributed anywhere and any way you want.
- The software can be modified by anybody without restrictions in terms of the changes they make. This also means that you can use the source code or part of it in another project as long as that project is also licensed under the GPL license.
- The software can be distributed for a fee, however, the receiver must get a copy of the GPL license as well as the software, so that they too understand what they can and cannot do with the software.
2. MIT License
The MIT license is one of the shortest and most flexible licenses available for open source projects. The MIT license was created with flexibility in mind. In fact, the MIT license is only a handful of paragraphs long. The most important part of the MIT license is:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
In layman's terms, you can do absolutely anything you want with the software, as long as the MIT license is included.
3. Apache License
Like the other licenses we've covered so far, the Apache license, version 2.0, grants a number of rights to its users. The key elements to remember are:
- rights apply worldwide
- rights are everlasting, in other words, there's no expiration date
- rights are irrevocable, nobody can revoke them once they've been granted
- rights are free, you won't ever be charged any kind of fee or royalty to use the license
- rights are non-exclusive, you can use the licensed software, but so can anybody else
The BSD licenses are a small group of permissive, free software licenses. In comparison to many of the other free licenses we've discussed so far, the BSD licenses have very few restrictions on how the source code can be distributed.
Out of all the BSD licenses, there are two that stand out, the New BSD License/Modified BSD License and the Simplified BSD License/FreeBSD License. The Open Source Initiative has approved these licenses and both have been verified as being GPL-compatible free software licenses.
Below is the main content of the New BSD License, also known as the BSD 3-Clause License.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. 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.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
This means that as long as you include a copy of the license with any distributed forms of the source code and you don't use the copyright owner's name to show off your newer version of the project, you're good to go.
Creative Commons License
I feel that whilst the Creative Commons (CC) licenses aren't really open source licenses, they should be mentioned to explain one other licensing option that is commonly used for design projects.
There are four basic parts to a Creative Commons license. The license can be used in any combination you wish, including being used individually.
- Attribution: The attribution clause says that the original author must be credited and attributed as the creator of the work, though the work can be modified, distributed, copied, and otherwise used.
- Share Alike: This clause allows the work to be modified, distributed, and copied, providing it's done under the same Creative Commons license.
- Non-Commercial: The work can be modified and distributed, but not for commercial use.
- No Derivative Works: You distribute, copy, and use the work as is, but can't make any changes to it at all.
You should now have a better understanding of open source licenses and how you can decide which license to use for a particular project. If you have any questions, I'd be happy to answer them in the comments below.
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post