views:

474

answers:

6

I would like to embed JQuery into an embedded device running a web server. Being an embedded device, storage is at a premium. Here is the comment header of JQuery:

/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */

What is the proper way to include JQuery and other MIT-licensed code?

Can I just copy the Minified version to my file system and be done?

Do I need to have a copy of the MIT License somewhere in my embedded device?

What have you done?

EDIT:

A few people have chimed in. One posted the MIT License. The part that causes me to hesitate is:

"and this permission notice shall be included in all copies or substantial portions of the Software"

Does that mean I need to include the MIT License text?

A: 

No, you don't need to embed the licence.

Sneakyness
I'm interested to hear the rationale behind the statement.
Craig McQueen
If it's part of the comments, they should be getting stripped out along with everything else.
Sneakyness
A: 

The MIT License:

The MIT License

Copyright (c)

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 AUTHORS OR COPYRIGHT HOLDERS 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.

The GPL: http://www.gnu.org/licenses/gpl.html

I'm not a lawyer but I don't see any restriction on the type of device to which software under these licenses may be installed. You could probably contact the folks at jQuery for a definitive answer.

Dave Swersky
I understand that the license permits me to do what I want. It's the part about "and this permission notice shall be included in all copies or substantial portions of the Software" that makes me hesitate.
Robert
I'm pretty sure it means that if you provide source, you have to keep this license in it so that people know the license for this part of the source. If you don't provide source, then it doesn't matter -- but I am not a lawyer.
Lou Franco
Note that "Software" is defined as "a copy of this software and associated documentation files". Do you have documentation that ships with your device? I am not a lawyer either, but I imagine that if you put the notice re: jQuery in your device's documentation, you should be fine.
mipadi
+1  A: 

I found a message thread on JQuery's site here. One person answering stated, "if you leave the comment on top of your js file intact, you'll be fine. " Since the thread went on without this statement being corrected, I'm going to accept it as correct.

So the short answer is: As long as you leave the file exactly as you found it, you are in compliance.

Robert
Yes, of course that's a sufficient condition. The question is, is it necessary? There doesn't seem to be strong evidence for that.
Brooks Moses
+2  A: 

I would say talk to a lawyer if your really concerned, but the way I understand the MIT and BSD licenses is this:

You can do whatever you want with the code but you must tell people that you used MIT or BSD licensed code and where to get it and what not. I would say that including a license notice when people buy the software/device or a license notice in the documentation would more than suffice. Embedding it in your application should not be necessary

Earlz
+5  A: 

If this is a significant concern, one option -- which is a lot cheaper than a lawyer -- is to send John Resig an email that says something like, "Thanks for jQuery, here's a $20 donation. I'd like to put this on my embedded webserver, but I don't want to put the license file itself in the webserver for space reasons. Would that be okay with you? Is there some text I should put in the documentation?"

In cases like this where you're dealing with a person rather than a corporation, the text of the license only really matters if you get into a disagreement. Of course the text is also useful in avoiding disagreements, but when something isn't clear (and the evidence indicates that this isn't since reasonable people are disagreeing in their answers), or seems to require something absurd (like putting a multi-kb license file on an embedded webserver where nobody can read it), then the best thing to do is simply have a conversation, and then you'll know you both agree about what's okay.

Brooks Moses
A: 

If you're not modifying the MIT-licensed code, your main responsibilities are to admit that you are using someone else's code, give credit for it to whomever created it, and inform the end-user of the borrowed code's license terms.

If the user has no way of accessing the software inside the device, then there is no point in including the license text. The purpose of distributing the license info is to educate the user regarding their rights, and if including the license in the embedded code doesn't achieve this purpose then there is no point in doing so.

I have seen some devices add a note in the manual that says "This product contains portions of the following technologies:" and lists the different open-source projects and includes a link to their website. I have even seen some manuals include a section in the back that says "Some portions of this software are subject to the GPL licence. {{insert text of GPL}}".

Whether you distribute the source code or not, your source files that include MIT-licensed code should at least contain a header comment that says something on the order of "This file contains code obtained under the MIT license" and a link to the website where you found the code. For best results, separate the MIT-licensed code from your own code as much as possible (link it in as a library instead of mixing the source) and include the license terms in a 'license.txt' file in the library's directory.

bta