post-photo

A simple description of open source licences so you’ll know how to use them

The Open Source Community and Licenses

The open source community creates and uses free software. A copyright ensures that the author possesses exclusive rights to their product. With a licence the copyright holder provides the rights to study, change, and distribute the software to anyone and for any purpose as long as they follow the terms of the licence it was distributed under. Here at Wanari, we often come across libraries that fall under different kinds of regulations. If you come cross this topic for the first time it’s not necessarily the easiest to wrap your head around. There are several articles and websites concerning the topic of open source licences – some of which will be linked at the end of the post.

The main purpose of this article is to make it easier for open source developers to choose a licence for their software and to provide basic knowledge about the topic. However this post may not be considered as legal advice – it is only a guide to the world of open source licences.

Currently there are tons of open source licences being used all over the world but the majority of them fall under only a couple of types. This post will be focusing on those most popular, most widely used licences.

Note: If you don’t provide any licence to your software, it will be copyrighted automatically. People may read your code and learn from it but any other use of it is illegal without permission. To utilize any part of the product people need to contact you personally. When you try to invest into the open source community, you may want to choose one of the licences below to avoid the inconvenience of not having any.

The following paragraphs will be describing these three main types of open source licences:

text

Public Domain

If you want your software to be freely available to anyone with no strings attached, you may put your product into the public domain. To do so, you only have to make a statement that you release all rights to the work. You can accomplish this by using the Public Domain Mark or publishing your work under the Creative Commons 0 licence (CC0). Once this is done the product is owned by the public as a whole. Take into consideration that this process is irrevocable. (You can’t take it back! :D)

Permissive software licence

Permissive software licences are otherwise called BSD-like, BSD-style (for Berkeley Software Distribution – more on this later) or “non-copyleft” licences and they basically let you do anything with the licensed software as long as you give the proper recognition to the original owner and you don’t hold them liable for any problems that might be caused by the software. As its name predicts these type of licences typically give the developers more freedom when it comes to the terms of using the licensed product.

Apache 2.0

The Apache 2.0 licence, along with being permissive, creates a strong legal ground for projects. In case you are planning on expressing grant of patent rights but you want to use a permissive licence, the Apache licence is probably a good option for you.

Summary:

The copyright notice should be included in the source files. The licence also recommends that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.

**Some notable projects distributed under Apache 2.0: **

As of now Apache 2.0 is the third most commonly used licence in the open source community.

BSD

BSD licence was first used for the Berkeley Source Distribution (a version of UNIX) and was developed at the University of California at Berkeley (UCB). BSD basically says “here’s the source code, do whatever you want with it, but if you have problems, it’s your problem”. Most variants of BSD include a section that prohibits the use of the name of the organization or the contributors to promote products. BSD evolved throughout the years and has 3 major subtypes as detailed below.

4-clause BSD

Also known as: Original BSD

Mainly because of the advertisement clause this version of BSD is not really used anymore but it is useful to learn about as it is the original version.

Summary:

Copyright (c) <year>, <copyright holder>
All rights reserved.

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. All advertising materials mentioning features or use of this software
   must display the following acknowledgement:
   This product includes software developed by the <organization>.
4. Neither the name of the <organization> nor the
   names of its contributors may be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3-clause BSD

Also known as: BSD 2.0, Revised BSD, New BSD, Modified BSD

The 3rd clause of the original BSD was removed as with time it grew complicated. As you can see above it required authors of all derivative works to acknowledge the original source in all advertising materials. This means that with every generation of derivative work the acknowledgement segment had to be extended which is not a particularly handy situation.

Summary:

Copyright (c) <year>, <copyright holder>
All rights reserved.

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 <organization> nor the
   names of its contributors may be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Simplified (2-clause) BSD

Also known as: Simplified BSD, FreeBSD

The simplified BSD loses the last clause of the prior two versions that prohibits any endorsement or promotion of the product using the contributors name or organization without a written permission.

Summary:

Copyright (c) <year>, <copyright holder>
All rights reserved.

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.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

**Some notable projects distributed under BSD: **

MIT

The MIT licence was originally developed by the Massachusetts Institute of Technology. This licence puts only a very small amount of restrictions on the reuse of the software distributed under its terms. It’s the simplest, shortest, and it’s the easiest to understand. MIT license does not include an express patent license as both the BSD and the MIT licenses were drafted before the patentability of software was generally recognized under US law. The MIT licence basically says that anyone can use and modify the software as long as they provide the proper acknowledgement and that they can’t hold you responsible for the quality of the software.

The name “MIT licence” is ambiguous as it can refer to the “Expat” or the “X11” version. Expat differs sightly from X11: X11 contains the following condition which is similar to the endorsement clause of the BSD licences: “Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.”

Summary:

Expat form of the MIT copyright licence:

Copyright (c) <year> <copyright holders>

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.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR

X11 form of the MIT copyright licence:

Copyright (C) <year> <copyright holders>
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.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of the <organization> shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.

<product> is a trademark of <organization>

Some notable projects distributed under MIT:

MIT licence is the number one, most widespread open-source software license nowadays.

Open Source: WTFPL

Do What the F*ck You Want To Public License is a little detour from all the seriousness and it is probably not a good idea to use it for proper projects. Naturally this is not a widely used licence but it takes the expression open source quite literally, so it sure deserves a mention in this article. This licence is a permissive one that essentially equals the act of providing your code to the public domain. The difference between public domain and WTFPL is that the latter one of course is an actual licence and that WTFPL can be used even when locally distributing to the public domain is not feasible due to local laws.

Protective software licence

Often called copyleft, this sort of licensing offers people the right to freely use the licensed product as long as they keep its constraints. The catch of copyleft licences is that the derivative work may only be published under the same license terms. Derivative work considering software basically means the product includes source code from the original program – even if it has been modified. Hence copyleft licences are often referred to as viral licences as they spread quickly with the usage of software distributed under the original licence terms.

GPL

The GPL (= GNU General Public Licence (originally this license was derived from the GNU OS, if you’re interested, check out more on this story here, though it’s not necessary for the use of this license)) is a copyleft license which means that any software that uses parts of any source licensed under GPL has to be published under GPL. This section describes v.3 of GPL.

Summary:

If you choose to provide source through a written offer, then anybody who requests the source from you is entitled to receive it. If you commercially distribute binaries not accompanied with source code, the GPL says you must provide a written offer to distribute the source code later. When users non-commercially redistribute the binaries they received from you, they must pass along a copy of this written offer. This means that people who did not get the binaries directly from you can still receive copies of it, along with the written offer. The reason they require the offer to be valid for any third party is so that people who receive the binaries indirectly can too order the source code from you.

The licence states that you should attach the following notice to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

Note: this is the original version of the copyright that can be modified to suit your needs (for instance placing a warranty).

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year>  <name of author>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.

As of today GPL is the second most commonly used licence in the open source community. Some notable projects distributed under GPL:

LGPL

LGPL (= GNU Lesser General Public Licence) is a less restrictive version of GPL. It is most commonly used on libraries. This section covers LGPL v3.

The main difference between GPL and LGPL is that while the GPL license requires you to share the code of all ‘derivative work’ under GPL, the LGPL requires you to share only the source code of the work ‘based’ on the LGPL-licenced components and not of the work which ‘uses’ it, meaning you are not obligated to share the code that is designed to work with the library by being complied or dinamically linked with it. Consequently the entire product doesn’t necessarily have to be distributed under the same licence. So derivative works including modifications or work statically linked to the library must still be distributed under LGPL, but works that only use it don’t need to be.

Summary:

Conclusion: Open Source Licenses

Permissive licences are awesome because the author isn’t limited in chosing a derivative work’s licence, so the possible circumstances are much wider. On the other hand copyleft licences ensure that any derivative work will be redistributed under the same terms which means that any descending software generation will also be available to use for the community under the given terms. When speaking of open source licences there is no right or wrong. The trick is to find the one that suits your wants and needs the most.

Tons more information could be written on this topic of open source licences. My goal was to provide a processable overview and I hope I managed to succeed.

For further information and orientation:

If you have any questions on this or being a junior at Wanari, go ahead and leave a comment!

PS.: If you just want to stay up-to-date, follow us on Facebook.

member photo

Don't be fooled by her quietness. She is smart and always chooses her words very carefully. Her impeccable English skills also make her posts a pleasure to read!

Latest post by Fanni Medvey

Adventures of a First Time Junior Dev