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

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

robocoder opened this issue Aug 25, 2010 · 8 comments
Assignees
Labels

Comments

@robocoder
Copy link
Contributor

@robocoder robocoder commented Aug 25, 2010

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

This comment has been minimized.

Copy link
Contributor Author

@robocoder robocoder commented Oct 14, 2010

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

This comment has been minimized.

Copy link
Member

@julienmoumne julienmoumne commented Oct 15, 2010

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

This comment has been minimized.

Copy link
Contributor Author

@robocoder robocoder commented Oct 15, 2010

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

This comment has been minimized.

Copy link
Member

@mattab 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

This comment has been minimized.

Copy link
Contributor Author

@robocoder robocoder commented Nov 17, 2010

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

This comment has been minimized.

Copy link
Member

@julienmoumne julienmoumne commented Dec 15, 2013

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-piwik-user

This comment has been minimized.

Copy link

@anonymous-piwik-user anonymous-piwik-user commented Dec 17, 2013

In 6624e27: fixes #4373, #1640

@mattab

This comment has been minimized.

Copy link
Member

@mattab 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
Projects
None yet
4 participants
You can’t perform that action at this time.