0

I want to reuse some LGPL'ed code in a commercial piece of software. Said code is here if you're particularly interested.

However, the library itself (written in JavaScript / CSS) has been split over many files. For practical purposes, I'd like to concatenate those in to a single file. The software itself is web-based, so will never be 'owned' by the user in the traditional software sense.

My questions are:

Can I do this ...

  1. Just concatenate the files and send them as they are, since the user will get a copy of the source code anyway (it being client-side JavaScript / CSS)
  2. Or, do I need to publish this concatenated code, under the LGPL, on (say) GitHub?
  3. Only if the rest of the code is LGPL'ed

And also, on a similar note, are those three possible if I later minify the code?

Personally, I feel that concatenating files doesn't really involve altering them as of such, so is probably within the spirit of the license. Minifying them is altering the source code, and in practical terms makes it harder to understand, so is against the spirit of the license. So, ethically, I wouldn't be happy with the latter even if it was OK in a legal sense. However, I want to go off facts, not feelings!

Addendum

I suppose this leads to a further question about LGPL'ed JavaScript. If it's client side, is it always fine to use in any project (since the end user will always have a copy of the original source code)?

1 Answer 1

4

In general, the LGPL requires you to offer human-readable source code. You could perform that offer of source code using the exact same HTTP endpoint that serves the code used by your website in production. However, consider two important points:

  • You must include the required attribution and licensing header information in your source code as required by LGPL 2.1 section 1:

    conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty

  • You must distribute a copy of the LGPL license text (also required by section 1). You could concatenate the full license text to the code file as a massive comment, but that would add needless overhead to the file transfer in production use. You could instead also serve the LGPL license text on a separate HTTP endpoint and refer to that URL in the production code. I'm reasonably sure that this would satisfy the LGPL's requirement to "distribute a copy of this License along with the Library."

As for minification, the LGPL requires that you make available "source code" whenever you offer a modified version of the library. The LGPL defines it as:

"Source code" for a work means the preferred form of the work for making modifications to it.

Minified code certainly does not meet this definition. If you serve minified code, you must make available the corresponding unminified source to anyone who receives a copy of the minified code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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