Putting license in each code file? [closed] - licensing

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I find it unnecessarily duplicated to have it in each code file, but I see it on most open source projects. Should I do that same, or just include a single license outside the code?

A single one outside the code, please! I don't know about the others, but I hate seeing the same thing on top of every file.
I think I've read it a few times, just by page_down-ing through it.

EULA is the wrong term here, as the people looking at source code usually are not end users.
Legally, it makes no difference either; copyright does not need to be declared explicitly.
Basically, all you achieve is a lower risk of people accidentally violating your license terms. You'll have to decide how important that is to you.
I'd say the best compromise is to put a very short header containing a link (absolute URL as well as relative within the project) to the full license text into each source code file. That way, anyone who cares about the license knows where to find it (ideally, people who're willing to pay massive license fees; you certainly want those people to be able to contact you!)

It might depend on the license. The GPL distinguishes between preamble and license. It clearly states, that the (annoying) preamble must be part of the code:
Can I omit the preamble of the GPL, or the instructions for how to use
it on your own programs, to save space?
The preamble and instructions are integral parts of the GNU GPL and may not be omitted. In fact, the GPL is copyrighted, and its
license permits only verbatim copying of the entire GPL. (You can use
the legal terms to make another license but it won't be the GNU GPL.) (1)
Source:
1) http://www.gnu.org/licenses/gpl-faq.html#GPLOmitPreamble
See also http://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
A free ebook from ifrOSS explains and comments the GPL 2 in german language. There is another one for GPL 3
For a well founded answer you should ask for a legal advice which is not available on sx. If you can not find a lawyer for your (open source) project, have a look at the FSFE legal network.

No, you don't have to put the license in each source code file.
If you look closer, most FOSS applications don't do that either. They put a copyright statement at the top of each file and a short sentence telling you what license the file is under and where you can find the full text of the license. They usually point you to the COPYING or LICENSE file containing the full text of the license and/or to a website that contains the full text (in case the COPYING file isn't there anymore).
Like Michael Borgwardt said in his answers, legally you don't have to do this. But it is advisable for source code that you intend to distribute since people can immediately see who has the copyright and what the license is.

I think the reasoning behind putting it in each file is a legal one. If the agreement is in each file, there is no chance of someone stumbling across a piece of code without being exposed to the license.
It may not be a good one, but all the big boys use it so if it's just visual pain, I would look for a better reason not to do the same.
If you're using GPL this is more of an issue, but if you're using public domain licenses like BSD or MIT, I don't think you really care what people do with the code anyway. I suppose it depends on how strict your license is.

IANAL,
Assuming you are talking about licensing, not a EULA, you can put the license outside. This is almost always done with really long licenses such as the GPL. It would be silly to put the entire GPL license in every file. Usually you would just have some type of notice saying where you can find the actual license. This is perfectly legal. However, with really short licenses such as BSD/Apache/MIT/whatever, it is simpler to just include to license in every file, since the notice saying where to find the license would be almost as long as the license itself.

If your code is going to be compiled so you are just distributing a binary then it really does not matter. Because when you create a binary, the comments are removed before the compilation process takes place. It only matters if you will be distributing the actual source code either open source or closed source. This typical matters if you will be distributing a application in a scripting language that doesn't compile.

It depends on what the license dictates. The GPL, for example, instructs you to put a short notice in every source file, include the entire license somewhere in your source distribution, and make your source distribution available to anyone who get a copy of the binary distribution.
If you disagree with this, and it is YOUR code, you're free to choose a more agreeable license, or create your own.

You dont need it for the license, a single external file will do as long as its clear what files it covers.
However for Copyright you should have the copyright notice on every piece of text.

What I do is to put a two-line comment at the top of the file, stating my company's name, last revision date and the name of the license the source file has, then at the very bottom of the file a short version of the license.
Of course, the full license (all of them in case of multiple licenses) is always enclosed on source file and release directories.

Related

Ms-RL License - clarification? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
We have an asp.net website project that we are distributing to subsidiary companies.
We are also referencing a ms-RL's licensed module( dll , which we didn't built , it's on the web.) .
The MS-RL information states :
Reciprocal Grants- For any file you distribute that contains code from
the software (in source code or binary format), you must provide
recipients the source code to that file along with a copy of this
license, which license will govern that file. You may license other
files that are entirely your own work and do not contain code from the
software under any terms you choose.
Question
I find it not crystal clear :
If we have MyPage.aspx that reference JSON_MS_RL.DLL :
According to Ms-RL - Which source code we would have to supply ?
Mypage.aspx ?
JSON_MS_RL.DLL ? ( it's binary , but I assume the source code is needed)
This indeed seems to be a quite obscure passage. The problem is that the word ‘file’ is not defined, while its meaning is not obvious at all. As far as I understand you, the only ‘file’ where the library and the your own code combine together is a distribution / installation package. Does that count as single ‘file’ under Ms-RL? If does, does it counts if I would archive Ms-RL-covered software along with something else into mere *.tar.gz. If that does, it goes beyond all reasons.
I am not a lawyer to interpret it, so the only thing I can do is to refer to some explanation, that can be found over the Web.
The Code Project (that is Microsoft-oriented network for programmers) summarizes the terms of Ms-RL in that way (enumeration mine):
A Microsoft open license and a free software license. Allows for distribution of derived code so long as the modified source files are included and retain the Ms-RL.
Provides copyright protection: True
Can be used in commercial applications: True
Bug fixes / extensions must be released to the public domain: False
Provides an explicit patent license: True
Can be used in proprietary (closed source) applications: True
Is a viral licence: False
You are interested in ⑤, which is clear, and ⑥, which might require further explanation: ‘viral’ is a derogatory term for such a license that allows derivative works but forces to release them under terms of the same license.
So, according to The Code Project, you have to provide sources of Ms-RL-covered library only (either modified or not), not of your whole project. Trust that opinion on your own risk, of course.

Forking proprietary code to BSD [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Let's say I have obtained permission from an employer to release a snapshot of a proprietary application to the public under a BSD license.
Is it possible to have a separate, independently developed fork of the code at this point in time released under a BSD license (or GPL I guess, not sure which yet), while the existing code will continue to be developed internally by the original company and will continue to be proprietary?
Are there any things to watch out for?
Talk to a lawyer.
My understanding is that you retain your own copyright to do whatever you want with your copy. The license you release under is for other people, not you -- you don't lose your rights by offering an open-source variant.
There is a huge difference between BSD and GPL. BSD lets others do basically whatever they want with it. GPL is much more restrictive for the programmer, and more open to the end-user. Any project with GPL code, must itself be released under GPL. BSD lets programmers incorporate the code into proprietary closed-source projects.
But, don't listen to me on this -- check for yourself, and get the opinion of a lawyer.
I agree on the "ask a lawyer" bit.
In general, releasing code both under a free software licence and a proprietary licence is fine, as the legally relevant bit is not what kind of licence sticker is attached to the code, but rather what was agreed on in the contract.
Releasing code under a BSD licence is actually offering a contract to whomever happens to stumble over the code that they may use the code under the terms of the BSD licence. Once people have accepted this offer (by downloading the code), the contract is sealed -- i.e. you cannot revoke the rights of someone who has already entered into that contract, however there is no obligation beyond the contract (i.e. they will not get access to newer versions, and you do not have an obligation to offer the same conditions in eternity).
The only place where the two licences can really conflict is when, by entering into a contract with these terms, one of the parties would have to violate another contract; the most obvious example would be if one of the licences grants exclusivity to the customer.
For the full details, I repeat that asking a lawyer is your only option; the most interesting question is usually whether the permission to use any patented technology is also transferred with the licence.
The owner of the code can redistribute it under any license he pleases. So yes, you can distribute it under BSD and GPL and propietary at the same time.
You should be careful with contributions though. If a third party contributes a patch or something, then you're not the owner of THAT derivate code. If it's BSD, you can add it to your propietary branch (with the appropiate copyright notice). If it's GPL you can't.

GNU Lesser GPL, application sell? [duplicate]

This question already has answers here:
Closed 13 years ago.
Possible Duplicate:
Using LGPL library in a commercial Java application
Hello guys!
There is a project under the GNU Lesser GPL license. I want to use this project in my application. Can I sell my application using this license?
In a nutshell, the idea of LGPL'd projects (usually libraries) is that you are free to use them as you wish in your own application, be it open or closed source, free or proprietary - as long as you publish the source code of the LGPL'd part (if you modify the LGPL'd part, you must publish the modified sources, under LGPL).
Additionally, the libraries must be linked dynamically so that they could be replaced to another version by the user if he so wishes. For libraries (.dll, .so, .jar...), this is usually self-evident. Side note: this is inherently pointless requirement, because nothing requires that your application works with any other library version than the one that you originally provided. You could even actively prevent your application from working with other versions.
You can use LPGLed libs with your proprietary software, but there are some restrictions you must observe. Better read the LGPL carefully and contact a lawyer.
General notes, You can use a LGPL library if
You link with it dynamically only allowing user to replace specific library (for example replace dll to newer compatible version).
If you make changes in LGPL code, you release the changed library sources as well.
Generally many closed source projects use LGPL code, it is common practice, but
read license carefully, especially this GPL-FAQ.
If you have doubts, contact lawyer.
If you are using the GNU app as part of the development process, then the resulting code is saleable.
If you are calling or otherwise using the public APIs of the GNU app then your app is saleable provided you package and distribute the GNU app as a separate component complete with the original app -- and make it clear in your documentation that you are using the GNU library and it still belongs to its original authors under the GNU license terms.
If on the otherhand you have modified the package, cut and pasted code from the package, inserted your code into thier programs or otherwise changed thier code to get yours to work you can only further distribute with the same gnu license. This does not actually preclude selling the software, but, there are all sorts of complications so its best not to go there.
If in doubt contact the original authors, tell them what you have done/intend and ask them what they think - it is afterall thier software your messing with.
Short answer is yes, you can sell your application under any license you like. The only thing you need to do is:
Mention somewhere that your product uses that library, anywhere, in the about box, in the splash screen, in the manual...
If your customers ever ask for the source code of that library (not necessarily your application), then you must give it to them or tell them how to obtain it. But note that only your customers/users actually have this right (and most customers don't bother right?).
That is basically it in a nutshell though I would still recommend you read the GPL FAQ posted by Artyom.

Do you have to pay for GNU GPL software that is "for sale"? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I've seen some software (a Joomla component, to be exact) for sale on a web site. The web site says it is licensed under the GNU GPL2. However it also says you need to pay for every site you use the software on (with bulk discounts).
I know it's perfectly acceptable to sell software under the GPL, however the license implies that the source code must be distributed at no cost.
So is this a legitimate use of the GPL, or is it violating the license? Is it legal to download the software for free (say, from Bittorrent) and use it as I wish?
Here is a FAQ from the GNU site. I think it answers your question:
Does the GPL allow me to sell copies
of the program for money?
Yes, the GPL allows everyone to do this. The right to sell copies is part
of the definition of free software.
Except in one special situation, there
is no limit on what price you can
charge. (The one exception is the
required written offer to provide
source code that must accompany
binary-only release.)
http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLAllowMoney
Further more:
If I distribute GPL'd software for a fee, am I required to also make it
available to the public without a
charge?
No. However, if someone pays your fee
and gets a copy, the GPL gives them
the freedom to release it to the
public, with or without a fee. For
example, someone could pay your fee,
and then put her copy on a web site
for the general public.
For GPL software, the source code must be distributed with the binary version or upon request to anyone who legally obtains the binary version.
Ergo, if you didn't buy the product from them, they are under no obligation to give you the source code.
The obvious flip side to this is that anyone who DOES legitimately get the source code is free to redistribute it as they please.
From my understanding distributing it on bittorrent would be redistribution which is permitted under the GPL without limitation (however Trademarks etc could still be violated!) This is how projects like CentOS work - they remove the trademarks, rebuild and then redistribute - and this is perfectly legal.
The company themselves are under no obligation to release source code unless they distribute the software to you.
So your options are:
Get it from someone else (who redistributes it under the GPL)
Purchase the product from the company - they'll give you the source code
I would personally suggest the latter option because it supports companies that support the GPL!
One question is whether the author wrote all the software or used any pre-existing GPLed software. If the person on the web site owns the copyright completely, then the web site may impose any conditions, including those incompatible with the GPL. Of course, releasing it under the GPL gives you some rights by itself. In particular, you can't redistribute without the source code, but you can make copies and use them.
The above practice is generally considered unfriendly by Free and Open Source Software advocates. Since it's not really honest to advertise GPLv2 and not deliver everything necessary, I'd advise being careful about the product. People who deliberately misrepresent things in advertising are likely to be selling shoddy software.
If the software contains pre-existing GPLed components, and the author didn't come to other terms with the copyright holders, then the GPL applies in full. The distributor has to provide source code (either with the executable or on request at nominal cost) and may not impose restrictions not allowed by the GPL.
There's also the possibility that the author released under GPLv2 without actually understanding the license. This happens from time to time, and frequently the FSF will quietly work with companies on getting into compliance.
In either case, it's perfectly fine to sell the software. If somebody else has the software including the source, they can redistribute freely, and it's perfectly legal for you to get it from them.
This is obviously a very simple business trick that relies on the naivity of the purchaser. It is obvious that, if the component is GPL, you can get it from any other user (bittorrent, file sharing), redistribute it and even resell it (but keep it GPL).
It is also very obvious that, if there's no other source to find/get it from, if you purchase, there is absolutely no need to pay multiple times for it. You just need to buy it once, and re-use it on all of the websites that you wish.
Even if it has some source of protection, the source code is open, so you can easily remove that protection.
Just out of curiousity, can you please give the name/website of the Joomla! component?

What are the extents of the meaning of "distributing" under the LGPL license? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
This question is a follow up on one of my other questions, Can I legally Incorporating GPL & LGPL, open-sourced software in a proprietary, closed-source project?
Many of the conditions of the LGPL license are based on the notion of distribution. My company does business as a consultant. We are contracted to create software, which we deliver to our clients. Does this constitute distribution under the LGPL license?
We have also made available the software, to our clients, for download through a password-protected file server. Does this constitute distribution?
Yes it does. One of the reasons the GPL came into being in the first place was to prevent the situation where somebody had a binary, but no source to go with it.
IANAL, so I can't speak to whether the consultancy-client relationship would constitute a loophole which you could use to avoid passing on source code, but it is certainly against the license's intent to do what you're suggesting.
I think that what you do is "distribution". At any rate, the support of a lawyer is important in this case.
Your first question really depends on the contract you develop software under. Do you deliver a complete product or work on a hour-by-hour basis? Who retains copyright over the software?
I'd say that in general if you work as a contractor, its your client that has to deal with these issues.
Yes, download via password protection constitutes distribution in my opinion, and you would have to distribute source code in the same manner.
Yes, both those cases constitute distribution. If it's leaving the hands of the developer, it's being distributed. That is of course, assuming that your company is the license holder, not your client.
Any time you give someone else a copy of some software you have distributed that software. It does not have to be to the public at large to qualify as distribution.
First off, I am not a lawyer. You should probably consult one.
When your client receives your program or libraries, you are distributing to that client. This means that you must offer to supply your client with the source code, as per the GPL. HOWEVER, if the distribution goes no farther than that, you are NOT required to distribute your code to the public at large.
If, however, the client distributes the code, they become a distributor under the terms of the GPL, and are then required to offer the code to their customers/clients/whatever.
Note that the GPL does not require that source code is given to the client at the same time that they receive the binary. You must, however, give the client a written offer to give them the source code at their request, for no further cost to them.

Resources