views:

126

answers:

5

Assume I own some open source project with no license information. Furthermore, assume nobody has contributed publicly yet and so I own the project's source code and copyright.

  1. Say the source code is already hosted online. If I decide to give it an open source license by uploading the associated COPYING document to the repository and adjusting the source files accordingly, will the previous versions of the project become licensed as well? Or will the current and future versions be protected while previous versions fall under public domain?

  2. Alternatively, say I start a new project using a DVCS (e.g. Mercurial) on my local machine. I commit all my changes (locally) and then add license information in a later changeset. If I were to host the project/repository, will the entire history be licensed or only the versions following that changeset?

In (2), the project is initially not hosted so this does not seem like a problem. But once it's uploaded, some of the project's history will not include the license information, making the result look almost exactly like (1).

I ask because Google Code allows you to select a license on a new project, even if you intend to import the repository afterward, making licensing seem somewhat external to the actual source code, whereas bitbucket.org does not.

+2  A: 

I'm not a lawyer but as far as I know code or any form of content being plainly on the web doesn't really make it public domain.

Regarding the timing of your license: If you attach a license to your code in revision 100, this should only affect revision 100 and future changesets until you change that license again. Otherwise you could, for example, revert code from being opensource afterwards.

From my understanding the license that you get when checking out some code (with a given revision) is the license applicable to that revision of the project. IMO this is also what makes forks from projects possible that went from some OSI-license to a closed one using the opensource code.

Consequently, you should probably create a new repo with the license information in place before putting it online.

Horst Gutmann
+1 "...should[sic] create a new repo with the license information in place before putting it online."
Russell
I agree with you, since forking/cloning on a revision will carry over the license and future versions under a different license should not affect this.And I agree with "...before putting it online." But when you own a project locally and wish to publish it (including its history, e.g. Mercurial+bitbucket) with a license, there should be a straightforward way to declare that "all of my work [so far] falls under this license."
Arc
+3  A: 

As long as you're not using any GPL libraries then what you do with your code is up to you. You can say that you code is retroactively GPL or you can say what version is GPL and what version is BSD and what version is Apache license. You can even offer dual license: use GPL or pay me $100 to use BSD (kind of like what the Qt guys did before they decided to offer LGPL).

Now, if you are using a GPL licensed library then your code is already GPL.

slebetman
Good point about using GPL licensed libraries.
Russell
My understanding is that if you own the copyright to the source, then you can license it to others for their own use however you wish, in respect of the license conditions, etc. You are right, GPL as a copyleft license has the condition that if you use a GPL library, you must also use GPL. I'm more curiouis as to what the law says about project rtepository histories, Mercurial-style in particular.
Arc
btw, +1 (when I can =)
Arc
A: 

Why do you want to expose the source history? The easiest solution to your scenario is to simply copy your code and create a brand new repository, then post this new repository somewhere, along with an open source license. Pull the source that is currently hanging out online without a license, and you're golden. The old source and the new source are completely separate and there shouldn't be any problems. If someone has a copy of the old source, you probably can't do anything to stop them from doing whatever they want with it, but you've got a clean slate for everything going forward. Anything pulled from your new repo (the one with the license) will be covered by that license.

I'm assuming that you are the author of the source that is currently hosted online. If you're not, then you've got other issues to contend with, namely, whether or not you have the right to specify a license for someone else's source code - probably not.

Tim Hardy
The problem is that it is tedious to re-create an entire repository to simply add a file (the COPYING document) at the "first revision." You will need to revert to every revision, copy to the new repository, put in your new file, and commit with the same messages/tags/branches/etc to do this. There are probably tools for something like this. But in cases like a local repository not yet published and you own the code, it would be nicer to just declare a license on that whole repository state instead. The question is hypothetical and the code is mine, within a local Mercurial repository.
Arc
A: 

If you use LGPL (or Apache or Berkeley-Licensed) code you're better off then using GPL code which requires that all code which is written based on this code has to be published as open source. See http://www.google.com/help/faq_codesearch.html#license, but you may get better information regarding Google code from this source.

stacker
Hi, thanks for the answer. Though in this question, I'm more curious about how to publish a project declaring that it and every revision of its source code has a certain license, not so much which license I should use.
Arc
+2  A: 

If you want the license to apply to the whole history, just say so in the license file, something like 'This file was added at revision x, but you may consider that the license applies to all revisions prior to x as well'.

You can view it as the license declaring what it covers... legalbol is code, scoping can be made explicit if you want.

Andrew McGregor
That makes sense. But that raises another question: what happens when an earlier revision that doesn't include that file is forked/cloned, does that fork still fall under the scope of the license? Perhaps by requiring that the developer copy the license from the later revision..?
Arc
I think you'd have to ask a lawyer that question. Given what I know about copyright law, I'd expect that it would fall under that scope, but you never know with legal issues.
Andrew McGregor