Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
robocoder opened this issue Aug 25, 2010 · 8 comments
Closed
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@robocoder
Copy link
Contributor

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

reference: http://code.google.com/p/minify/source/browse/branches/2.1.4/min/lib/JSMin.php
Keywords: interesting

@robocoder
Copy link
Contributor Author

Reference: http://www.gnu.org/philosophy/javascript-trap.html

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.

@julienmoumne
Copy link
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 ?

@robocoder
Copy link
Contributor Author

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.

@mattab
Copy link
Member

mattab commented Nov 16, 2010

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: https://github.com/piwik/piwik/blob/master/LEGALNOTICE

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

@robocoder
Copy link
Contributor Author

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).

@julienmoumne
Copy link
Member

jsmin is deprecated, cf : https://github.com/rgrove/jsmin-php/ :

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 https://github.com/tedivm/JShrink as a replacement and will remove jsmin while fixing #4373.

JShrink preserves licenses.

@anonymous-matomo-user
Copy link

In 6624e27: fixes #4373, #1640

@mattab
Copy link
Member

mattab commented Dec 19, 2013

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

4 participants