Merged javascript files: preserve licence and copyright in merged file #1640

robocoder opened this Issue Aug 25, 2010 · 8 comments

4 participants


It's debateable whether or not this is necessary when minifying on-the-fly...

Keywords: interesting



Stallman suggests the following notice where JavaScript is embedded in a page:

   Copyright (C) YYYY  Developer

    The JavaScript code in this page is free software: you can
    redistribute it and/or modify it under the terms of the GNU
    General Public License (GNU GPL) as published by the Free Software
    Foundation, either version 3 of the License, or (at your option)
    any later version.  The code is distributed WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

    As additional permission under GNU GPL version 3 section 7, you
    may distribute non-source (e.g., minimized or compacted) forms of
    that code without the copy of the GNU GPL normally required by
    section 4, provided you include this license notice and a URL
    through which recipients can access the Corresponding Source.
Piwik Open Source Analytics member

The merged javascript file contains third party javascript libraries.

From a license compatibility point of view, would it be ok to add this notice at the beginning of the merged file ?


I would leave the license headers at the beginning of each minified file because that's how it appears now with pre-minified files that are simply included (e.g., jquery.js and jquery-ui.js).

It should be as simple as updating JSMin.php and making sure the comment headers in each JavaScript file consistently uses /*! ... */ so that it is preserved in the minified output.

p.s. ignore comment:2.

Piwik Open Source Analytics member

I am not confident with 'updating JSMin.php' and vote for a wontfix. The important thing is that we take licenses seriously and any Piwik user is able to find out the licenses of the libraries we use by looking at the well maintained file:

Most Open Source projects don't have such a file, so this is already a great effort to make visible the libraries we use and their licenses.

won't fix


A couple of points:

  • This isn't aimed at users who install Piwik for their own use. It's intended for users of a hosted Piwik service where this interaction may be (or rather, "is" interpreted by Stallman) to be a form of "conveying" the software.
  • If we don't update jsmin.php to the newer version, we have to backport some fixes (eg mb.func_overload).
Piwik Open Source Analytics member

jsmin is deprecated, cf : :

This project is unmaintained. I stopped using it years ago. You shouldn't use it. You shouldn't use any version of JSMin.

I found as a replacement and will remove jsmin while fixing #4373.

JShrink preserves licenses.

Piwik Open Source Analytics member

In fbd4675: Refs #1640 Adding jshrink to LEGALNOTICE + update help text

@robocoder robocoder added this to the Future releases milestone Jul 8, 2014
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@julienmoumne julienmoumne fixes #4373, #1640 6624e27
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@mattab mattab Refs #1640 Adding jshrink to LEGALNOTICE + update help text fbd4675
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment