Understanding free & open source

Free and opensource
What it really means to be free and open? What happens when you develop a piece of code? What does these alien keywords like GPL, Apache, MIT, etc. mean? Should you use third-party open source library? The article explores the world of open source licenses.

I was trying to figure out why it takes time for the Android updates to be pushed to existing devices even though Google releases newer version of Android every few months. This led me to the interesting issue of software licenses. Finally I understood that writing software is just one part and selling software with legal complications is entirely different part. So in this post we will see how software is really sold and what open source and licenses associated with it really means.

Why software is really different

Imagine that you buy a brand new car Tata Indica. This car is sold to you by company called Tata Inc. Tata has designed and built this car and hence has rightful control over it. No one can copy the same concept or design even by means of reverse engineering and create their own car, sell it and earn profit. In short, Tata Inc. is the copyright holder of Indica car. Copyright gives Tata Inc. total control over who can do what with their product. If anyone tries to do so then he will have to face the jurisdiction with hefty fine.

Now, after three year of use, you decide to sell your car. You can definitely sell it with any price you want. This price will be negotiated between you and the potential buyer. The main point here is that though Tata Inc. is the copyright holder of your car and they have not given you any exclusive right to sell their patented car, you can still sell it. In short, even if Tata is actual copyright holder of the car (meaning Tata is the owner of the product), it is you who actually owns that car (meaning you are owner of the copy) and hence can legally do anything with it including modifying, destroying or selling it. But you cannot copy and make another car out of it. This right/concept is called as the First-Sale Doctrine.

Moving on, try to imagine the same scenario with software. You buy Microsoft Office from Microsoft Inc. for $500. You use it for one year on your PC and then sell it to your friend for $300. Can you really do that? Of course you cannot. Microsoft Office is copyrighted product. You are not actually reproducing or copying the same product but simply selling the product that you own. And as consumer right of First-Sale Doctrine you should be able to sell it. If you try to do that then you are likely to end up in Jail with some hefty fine.

So where is the catch? If we go little time back in the era of mid-80, then it was beginning of dirty software licensing war. People started considering software as a product just like a car and hence software was subject to same copyright laws. But there were loopholes in copyright laws such as First-Sale Doctrine rule. So, copyright owners invented the concept of software license to by-pass limitations of copyright laws. These software licenses are called as SLA (Software License Agreement) or EULA (End-User License Agreement).

The immediate consequence of this license is that software vendor such as Microsoft says their products are licensed, not sold. The product is licensed for some limited time or infinite time for one user or number of users depending upon the contract specified in the license. What this means is that the product is given to you for use and hence you are not actual owner of that product thus bypassing the First-Sale Doctrine. Obviously, you cannot sell a product that you do not own. This analogy is similar to that of renting a house. You can use it for some limited time but cannot sell or rent it to another person.

These licenses are shown to user in electronic form when user tries to install the software. The user must agree to install. He cannot disagree with the license.

Invention of Linux

Copyright laws were existed long before the birth of Linux. In short, copyright laws give creator of the product exclusive rights to that product for some limited time. The opposite of it is public domain. If you release your code/product in public then, you relinquish total control over your work. At no point later in time, you can claim back rights over it. The work released under public domain can be used for any purpose like creating new free or commercial derivative out of it and earn profit.

We will not dwell into Linux history. But in short, in 1991, famous hacker Linus Torvalds created first Linux Kernel on MINIX using GNU C compiler. He then uploaded code on his friend, Ari Lemmke's FTP server. People downloaded the code, used it and started giving the suggestions. Linus wanted to keep the code free from any kind of commercial interest and thus put his code under GPL (General Public License). GPL was created by Richard Stallman in 1983 under the GNU project whose aim was to create free Unix-like OS but it failed to attract developers. Linux innovation put new life into GNU and thus in GPL.

The important here is not the history but the term called GPL. This GPL license was neither Copyright nor public domain. It was somewhere in the mid of that. As per GPL terms, you can copy, distribute or modify however you want but source code should always be distributed as part of work release along with binary and documentation. This makes it similar to releasing your work in public domain. But there is additional condition that separates it from public domain. GPL implies that if you use some code previously published under GPL then, any fork or derivative of that work should be released under GPL. Further, GPL code cannot be linked to code published under a different license. So it is like viral phenomenon. GPL is like Philosophers stones where anything turns into gold if touched. So GPL turn any code into GPL if even for single line.

The important consequence of GPL is that the code under GPL can never come under any kind of commercial interest like copyright or patent. However, people can charge for distributing or servicing and maintaining the GPL code (for example, Red Hat charges customers for maintaining their server OS).

The GPL is based on the concept of Copy left laws which are anti-copyright laws. In short, under copy left, a creator may give every person who receives a copy of a work permission to reproduce, adapt or distribute it and require that any resulting copies or adaptations are also bound by the same licensing agreement.

When you create some piece of code

When you write some piece of code, then there are three ways you can go viz. Copyright licenses, free software licenses or public domain. GPL is one type of free software license with copy left philosophy. And complications come when you choose free software license path. There is one major cliché in copy left GPL that you cannot link to another code released under some other license. So from an enterprise perspective this kind of license is not too useful. So a new license was introduced called as LGPL (Lesser General Public License). This license allows anyone to use code under LGPL to be linked to code released under another license. This kind of license comes somewhere between the copy left license like GPL and permissive free software licenses like BSD, Apache 2.0, Mozilla, etc. LGPL solve the linking problem but the problem still remains for enterprises who want to use free code and use for their branding, patenting and IP rights. So these permissive free software licenses mentioned above allows the enterprises to do such things. Main thing about permissive licenses is that they allow modified version of original code to be distributed under different licenses which is not the case with GPL or LGPL.

Permissive free software licenses

The very first license that comes under this category is BSD (Berkeley Source Distribution). If one use existing BSD licensed code, modify it and redistribute it, one should not claim that they wrote the software if they did not write original piece (i.e. include original copyright notice) and secondly, one should not sue the developer if the software does not function as expected or as desired (i.e. include disclaimer of liability). There are many categories of BSD licenses. Some BSD licenses additionally include a clause that restricts the use of the name of the project (or the names of its contributors/original copyright holder) for endorsing or promoting derivative works.

Apache is another popular license which is slightly modified version of BSD. In addition to BSD requirements given in above paragraph, apache specifies that along with original copyright notice, modifiers should clearly mark all modifications. Also all notices of copyright, trademark and patent rights should be reproduced accurately in distributed copies. The licensee should not use any trademarks that belong to the licensor.

The least restrictive of all is the MIT license. You can literally do anything from patent to copyrights to IP, distributing free or selling at cost, etc. The only restriction is that it must be accompanied by the license agreement. The license is very short consisting of only two paragraphs. Interestingly, this license was developed by university students at MIT and not by some incorporation.

Note that there are many more licenses which are worth considering but each of them deserves a separate post and would be better explained by lawyer. And of course, there are many sub-versions to each of these licenses which are again a new story in themselves.

When you decide to go with Free Software License

The following algorithm should help you in determining which license you should use when you want to go by free software license way.

Free and opensource