Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have seen some source code containing Copyright notice in the beginning of the file. Most of them are either GNU General Public License or Apache License. If I want to develop any open source software what are the steps should I follow? Do I need licensing my software by registering somewhere, or I just add the text like described in Apache License 2.0.

If I modify source code of another open source software then what should I do? Should I seek permission from them?

share|improve this question

migrated from stackoverflow.com May 8 '11 at 8:15

This question came from our site for professional and enthusiast programmers.

    
"GNU" is not a license. –  Ignacio Vazquez-Abrams May 8 '11 at 7:20
    
@Ignacio Vazquez-Abrams edited. Thanks. –  Tapas Bose May 8 '11 at 7:22
add comment

3 Answers 3

up vote 2 down vote accepted

If I modify source code of another open source software then what should I do? Should I seek permission from them?

For the licenses you named (GNU GPL, Apache 2.0) you do not need to explicitly ask for permissions to modify the code. Those are free software licenses which give you the right to modify the source code. So you already have a written statement that you're allowed to do so.

This is why it is important that those files have a licensing header on top which normally contains a copyright notice (basically who wrote this file, when was it written and to which work belongs it) and the packages contain the license text in full, so you can actually read the license text. Some authors only place a link to some third party website, so you actually would not have anything written but only something linked which could have been changed or could go offline.

So if you find a copyright statement and the licensing terms bundled with the code, that's a safe spot.

The right to modify/adapt

Because the right to actually modify source-code is an important one, all free software licenses grant that to you. What's a free software license? In short, check if it is compatible with the GNU GPL. If it is, you can be pretty sure that it is one. Additionally learn about it here: The Free Software Definition.

You can differ between two types/classes of free software licenses: One of the sort like the GNU GPL. Those do not only grant that right to you personally to modify the software, they also grant that right to everybody else whom you pass your (modified) software to as well. For example the users of your software.

That's done to preserve the freedom of software. The idea behind it is basically: What is software w/o it's users? Whom is software written for? What is free software that is not free for its users?

The other type are free software licenses that grant that right to modify to you personally but don't need you to grant the same right(s) on your modifications to the users of your software. IIRC that's like the Apache license, but the type is best known for the BSD-like licenses which probably are a better wording for that type.

This might sound like a slight difference only but it is actually a real(tm) difference. For example if you want your modifications to be let's say GNU GPL'ed so they remain free for all of your code's (potential) users, you need to put it under something like the GNU GPL. But if you don't want that you can not make use of GNU GPL'ed code at all (most code under a free software license is available under GPL).

Some developers consider the GNU GPL as "not free" because they think they're limited by it. In fact they just do not want to conform with a software license that is reciprocal (some name this viral but the adjective is not precise). Instead these developers prefer code under a license that does not requires that (their) modifications are made available upon distribution. In short: they want the benefit of a software only for themselves but not for their users (that's really short and it has some taste. but it's also valid to write so).

I make this bold a bit to better show the difference. In fact every developer always - regardless of free or proprietary software - needs to decide on her/his work which licensing terms to choose at some point. Today as developers we most often do not write software from scratch so we actually create a so called derivate: we modify something existing. So we are already bound to the licenses of some existing software. If we don't like that licensing terms we need to write it from scratch (and we can even do so, because it's totally valid to learn from everything publicly available - imagine if not!).

Distribution is a key point here. Basically it only means that you pass on software to somebody else. And vice-versa: You get software from somebody else.

Without distribution you can actually do everything with source-code you were able to get incl. "illegal" stuff because nobody would ever notice. That's like you've written it on your own but you didn't need to type it into the computer. I love to copy stuff even I can type quite fast.

You do this on your own. This even includes the modification you ask for: As long you do modifications for your own only, you can even ignore any licensing at all (disclaimer: not a legal advice ;) ). Nobody would ever hinder you. Practically nor legally. Because you do that in private and nobody will ever notice. Okay, there is some risk in case somebody will notice for whatever reason but most legal systems do not allow to even use that information against you then. That aspect is probably out of the boundary of your question but it shows that distribution is what matters.

If you modify some software because you play around with that I don't think that practically there is much in the existing law that would hinder you. You might actually need to label your playing as science, but science always was playing so no need to censor yourself.


So just to make the point: For the licenses you named, you can do the modifications on your own w/o asking for an additional consent by the copyright owner (you can always do however in case you are uncertain. but take care: some software developers do not answer if you ask a licensing question about their code they released about five years ago or so, so asking questions to the original author might not actually help you.).

To review: The copyright owner preferred to give you the licensing terms and marked the code on top of the files to be under certain terms and you're free to do the modifications by those terms already (it's always more safe to have the copyright statement and the license with the package).

However read the terms carefully. Some terms say that if you don't conform with something, you will have your rights to modify the software terminated. That might sound dangerous and harsh, but on the other hand keep in mind that most free software licenses contain such termination clauses to ensure that the software stays free. The GNU GPL does this but other licenses well. Just look out for something like termination. The termination clauses always show the expressed wish of a copyright owner how to deal with his software explicitly. It means that a grant is given for something. And that something most often is more than money. Or to say it differently: Money can't buy it.

How to deal with your own modifications?

You asked as well:

Do I need licensing my software by registering somewhere, or I just add the text like described in Apache License 2.0.

Next to registering (which is not necessary nowadays, just publish so you have set a proof-able fact in case you need it) there are as well terms you should consider when you do modifications. Most software licenses - regardless whether begin reciprocal or not - require you to mark your changes next to the existing code. That sort of mark / make visible basically has the meaning that if someone get's your code that it's visible which part of the code has been written by you and which part not. As written above with the different types of the license, there can be a difference which license applies to your modifications.

For that to work you need to make visible where you changed something. So what does this mean in practice? For files which contain a copyright notice on top and you do not make any modifications to it, you do not need to change the copyright notice at all as well because you have not changed anything.

But for files where you actually made some changes (let's not count if you changed a single byte, let's say you've added two more functions with some lines of code and modified some lines of code in an existing function), you should add your copyright on top. I mean really on top, above the original copyright statement. But next to that, you should write after your statement that this file as well is under copyright by someone else followed by their original copyright statement and their licensing description or even terms if the terms were in the original file.

A description how that can be done can be found here: Maintaining Permissive-Licensed Files in a GPL-Licensed Project: Guidelines for Developers. That article might look like being from a GNU GPL viewpoint, but it's written with the best intentions to prevent infringement of copyrights which actually does apply if you license your modifications under your own (place in the name) license as well. So to say: "prevent infringement of copyright" has the purpose to not trigger any termination in the various licenses available so you can license your modifications (the modification you're allowed to if you don't terminate them) under any of your (compatible to the original) terms as well.

Phew what a sentence. Anyway that document explains in detail the what and why and you can easily adopt it to your own licensing as well, I think it's very valuable.

So to resume: If you make modifications to an existing work under copyright, make visible that you changed the file(s) but adding your own(tm) copyright statement and licensing terms and make visible that the files still contain some code under their own copyright and terms.

So next to the code changes you've done you've explained the copyright changes. I think then you're pretty fine to publish things.

This is all personal opinion. I might be wrong with some points, so no warranty of whatsoever. Probably it helps you that you can go on with your question, but it has not been written in any intention of whats-o-ever nor fitting for a particular purpose.

share|improve this answer
1  
thank you very much for such a nice and valuable explanation. –  Tapas Bose May 9 '11 at 16:31
add comment

As the author of code you can set whatever distribution and use license you wich. Normal practice is to have small notice (and a link to full license) at the beginning of every source code file telling developers what license this code is under.

If you use, modify or distribute other people's code, there is no need to seek their permission, you just need to comply with their license. The license is already a permission what you can/cannot do with the code.

share|improve this answer
    
@Peter Knego thanks. Just for confirmation 1) I don't need any registration from Apache or something like that. I just have to add their license in my code. 2) I don't need permission from those developers whose sources I am modifying, just including their license along with my copyright notice will do the job. Isn't it? –  Tapas Bose May 8 '11 at 7:27
1  
1 - Yes, 2 - No, you have to actually comply with their license. Read it an understand what it says. If you have problem understanding consult a lawyer. If this is for business use you definitely should consult a lawyer. –  Peter Knego May 8 '11 at 7:31
1  
IMHO, the best you can do, especially with the Apache project, is to submit a patch with your modifications and having them merged into the main project. If I remember well there was some problem patching Apache and redistributing the whole source + modifications and calling it Apache, but maybe I can't remember well the terms... –  Federico Culloca May 8 '11 at 9:25
    
@FedericoCulloca, the OP mentioned the Apache LICENSE (2.0), not any Apache software. This license can be applied to any non-Apache software also. Anyway, if the purpose of modification is to fix or improve existing project, then what you suggest is the best practice –  Ivaylo Slavov Oct 10 '13 at 6:42
add comment

That can be a very complicated question depending on what you are going do develop.

For Example within Eclipse projects you have the copyright headers, the epl-v10.html within the root and possibliy several about.html within subfolder where other licenses are used.

But for a simple project you created, just get the license text and add it to your source root folder and add copyrights to your source file headers using the templates you mentioned already.

For any additional library you link/use in your project check if this is legal at all! See http://www.opensource.org/ for more on this. And in that cases you have probably to mention other licenses, too.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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