Re: Minimized Javascript
On Thu, Nov 06, 2014 at 07:10:26PM +0800, Paul Wise wrote:
> The ideal solution would be for the respective upstreams to remove
> these embedded code copies from their tarballs or provide a second
> tarball with these code copies removed. Then you would package all
> three libraries in separate source+binary packages.
>
> https://wiki.debian.org/EmbeddedCodeCopies
>
> If the upstreams refuse to do that then none of the options are good
> but I would include multiple orig.tar.gz files, the documentation and
> one for each of the source of the minified libraries. In addition,
> package the libraries in separate binary packages generated from
> separate source packages.
>
> Please include details about which package and which libraries you are
> concerned about.
The documentation package I'm packaging is (for jessie+1):
http://pocoproject.org/releases/poco-1.4.7/poco-1.4.7-all-doc.tar.gz
the minimized libraries are:
$ tar --wildcards -tvf poco-doc_1.4.7.orig.tar.gz poco-1.4.7-all-doc/js/\*.js
-rw-rw-rw- guenter/staff 2171 2014-10-22 18:19 poco-1.4.7-all-doc/js/CollapsibleLists.compressed.js
-rwxrw-rw- guenter/staff 6636 2014-10-22 18:19 poco-1.4.7-all-doc/js/iframeResizer.contentWindow.min.js
-rwxrw-rw- guenter/staff 5571 2014-10-22 18:19 poco-1.4.7-all-doc/js/iframeResizer.min.js
-rw-rw-rw- guenter/staff 44790 2014-10-22 18:19 poco-1.4.7-all-doc/js/prettify.js
prettify.js is not minimized but following the Policy 4.13, it is also a
embedded code copie.
Upstream sources for libraries:
* http://code.stephenmorley.org/javascript/collapsible-lists/
No tarball, license CC0, non minimized version available.
* https://github.com/davidjbradshaw/iframe-resizer
Tarball available, license MIT, gruntfile.js file to build minimized
version.
Gruntjs (similar to ruby-rake) is not in Debian. Two options: use
node-uglify in debian/rules, or package Gruntjs in another package
again. It's probably better to make a package for Gruntjs.
* https://code.google.com/p/google-code-prettify/
Tarball available, license Apache 2.0, Makefile to build minimized
version, uses yui-compressor to minimize. In fact,
poco-1.4.7-all-doc.tar.gz uses only a part of prettify.js (a file from
an old 2007 version, revision 20, I don't know why).
Well, if I understand, the best way is:
* Three packages for the three libraries.
* One package for Gruntjs.
* Request to POCO authors to provide a tarball without minimized libraries OR remove it myself, making a dfsg package.
I'm right ?
Regards,
--
Maxime Chatelle (xakz)
gpg: 5111 3F15 362E 13C6 CCDE 03BE BFBA B6E3 24AE 0C5B
Reply to: