Re: Embedding javascript in binary

2016-01-23 Thread Sander Hoentjen


On 01/23/2016 08:29 AM, Roman Tsisyk wrote:
>> Wednesday, January 20, 2016 6:33 PM +01:00 from Sander Hoentjen < 
>> san...@hoentjen.eu >:
>>
>> On 01/20/2016 05:44 PM, Stephen Gallagher wrote:
>>> On 01/20/2016 10:18 AM, Sander Hoentjen wrote:
 Hi,
 I am currently packaging dnsdist[1][2]. 
> I'm reviewing this package (#1297215).
>
>> dnsdist-1.0.0-alpha1/html/js/jquery-1.8.3.min.js
>> dnsdist-1.0.0-alpha1/html/js/jsrender.js
>> dnsdist-1.0.0-alpha1/html/js/moment.min.js
>> dnsdist-1.0.0-alpha1/html/js/purl.js
>> dnsdist-1.0.0-alpha1/html/js/rickshaw.min.js
>> dnsdist-1.0.0-alpha1/html/js/underscore-min.js
> Javascript files are only used by html documentation which isn't included to 
> resulting package.
> It is not clear for me if we can keep these compiled files in the source 
> tarballs and srpms.
> What is the best practices for this case?  I had similar experience in Debian 
> and I was asked to remove all minimized js files even from source tarballs.
>
Well actually the javascript (and html) is not for documentation, it
ends up embedded inside the dnsdist binary.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re[2]: Embedding javascript in binary

2016-01-23 Thread Roman Tsisyk
> Saturday, January 23, 2016 9:59 AM +01:00 from Sander Hoentjen 
> :
> Well actually the javascript (and html) is not for documentation, it
> ends up embedded inside the dnsdist binary.

It is definitely the problem in this case...

-- 
WBR,
   Roman Tsisyk 
   http://tarantool.org/ - an efficient in-memory data store and a Lua 
application server
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re[2]: Embedding javascript in binary

2016-01-22 Thread Roman Tsisyk

> Wednesday, January 20, 2016 6:33 PM +01:00 from Sander Hoentjen < 
> san...@hoentjen.eu >:
> 
> On 01/20/2016 05:44 PM, Stephen Gallagher wrote:
> > On 01/20/2016 10:18 AM, Sander Hoentjen wrote:
> > > Hi,
> >
> > > I am currently packaging dnsdist[1][2]. 

I'm reviewing this package (#1297215).

>dnsdist-1.0.0-alpha1/html/js/jquery-1.8.3.min.js
>dnsdist-1.0.0-alpha1/html/js/jsrender.js
>dnsdist-1.0.0-alpha1/html/js/moment.min.js
>dnsdist-1.0.0-alpha1/html/js/purl.js
>dnsdist-1.0.0-alpha1/html/js/rickshaw.min.js
>dnsdist-1.0.0-alpha1/html/js/underscore-min.js

Javascript files are only used by html documentation which isn't included to 
resulting package.
It is not clear for me if we can keep these compiled files in the source 
tarballs and srpms.
What is the best practices for this case?  I had similar experience in Debian 
and I was asked to remove all minimized js files even from source tarballs.

Please help guys. 

-- 
WBR,
   Roman Tsisyk < ro...@tarantool.org >
    http://tarantool.org/ - an efficient in-memory data store and a Lua 
application server
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Embedding javascript in binary

2016-01-21 Thread Christopher
On Thu, Jan 21, 2016 at 2:03 PM Sander Hoentjen  wrote:

> On 01/21/2016 12:29 AM, Christopher wrote:
> > On Wed, Jan 20, 2016 at 12:34 PM Sander Hoentjen  > > wrote:
> > [snip]
> >
> > > https://fedoraproject.org/wiki/Packaging:JavaScript
> > Yeah I read that, but is says "Please note that this section
> > really only
> > applies to JavaScript libraries intended for use on the web." so I am
> > not sure that applies to my case.
> >
> >
> > It also doesn't thoroughly cover these use cases:
> >
> > 1. how to handle customized embedded forks of a JavaScript library in
> > upstream,
> >
> > 2. how to deal with JavaScript resources which upstream Java packages
> > embed in their WARs (should the maintainer have to rewrite significant
> > portions of upstream code to make these resources available from
> > another location in the filesystem?),
> >
> > 3. applications which require the same shared JavaScript resources but
> > with slightly different flags set in the source (to control style, or
> > behavior),
> >
> > 4. how to package a single upstream project which many projects use
> > which contains a combination of images, styles, JavaScript, and other
> > resources, in a well-known hierarchical structure (like Bootstrap)
> So do you have any ideas regarding these issues?
> Would it be ok for my case if upstream provides both minified and src js?
> How could I check if the minified one is indeed gotten from the src js?
> Or do I always have to re-minify js?
> Is included jquery okay or do I have to use the jquery that is already
> packaged?
>
>
Unfortunately, no. I don't have answers for how to deal with these cases.
However, I do think that minification should always be done as part of the
build, and any upstream minified source should not be used at all, as it's
not free and open source software.

As for jQuery, js-jquery and the older js-jquery1 are already packaged in
Fedora. Hopefully you can figure out how to make your package use those
instead of embed its own.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Embedding javascript in binary

2016-01-21 Thread Sander Hoentjen
On 01/21/2016 12:29 AM, Christopher wrote:
> On Wed, Jan 20, 2016 at 12:34 PM Sander Hoentjen  > wrote:
> [snip]
>
> > https://fedoraproject.org/wiki/Packaging:JavaScript
> Yeah I read that, but is says "Please note that this section
> really only
> applies to JavaScript libraries intended for use on the web." so I am
> not sure that applies to my case.
>
>
> It also doesn't thoroughly cover these use cases:
>
> 1. how to handle customized embedded forks of a JavaScript library in
> upstream,
>
> 2. how to deal with JavaScript resources which upstream Java packages
> embed in their WARs (should the maintainer have to rewrite significant
> portions of upstream code to make these resources available from
> another location in the filesystem?),
>
> 3. applications which require the same shared JavaScript resources but
> with slightly different flags set in the source (to control style, or
> behavior),
>
> 4. how to package a single upstream project which many projects use
> which contains a combination of images, styles, JavaScript, and other
> resources, in a well-known hierarchical structure (like Bootstrap)
So do you have any ideas regarding these issues?
Would it be ok for my case if upstream provides both minified and src js?
How could I check if the minified one is indeed gotten from the src js?
Or do I always have to re-minify js?
Is included jquery okay or do I have to use the jquery that is already
packaged?

-- 
Sander
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Embedding javascript in binary

2016-01-20 Thread Sander Hoentjen
On 01/20/2016 05:44 PM, Stephen Gallagher wrote:
> On 01/20/2016 10:18 AM, Sander Hoentjen wrote:
> > Hi,
>
> > I am currently packaging dnsdist[1][2]. This is a binary that has a
> > httpserver built-in, and the html, css and js files embedded in the
> > binary. The javascript files are jquery and a few other known
> > scripts[3], and there is one javascript specific to dnsdist
> > itself[4]. What are the guidelines on javascript embedded this way?
> > Do I need to miniify them myself, or are pre-minified files ok?
> > Also, is it ok to use the jquery shipped in the source tarball of
> > dnsdist?
>
>
>
> > [1]  [2]
> >  [3]
> > 
>
>
> [4]
> >
> 
>
>
> https://fedoraproject.org/wiki/Packaging:JavaScript
Yeah I read that, but is says "Please note that this section really only
applies to JavaScript libraries intended for use on the web." so I am
not sure that applies to my case.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Embedding javascript in binary

2016-01-20 Thread Sander Hoentjen
Hi,

I am currently packaging dnsdist[1][2].
This is a binary that has a httpserver built-in, and the html, css and
js files embedded in the binary.
The javascript files are jquery and a few other known scripts[3], and
there is one javascript specific to dnsdist itself[4].
What are the guidelines on javascript embedded this way? Do I need to
miniify them myself, or are pre-minified files ok?
Also, is it ok to use the jquery shipped in the source tarball of dnsdist?



[1] 
[2] 
[3] 
[4]


Regards,
Sander
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Embedding javascript in binary

2016-01-20 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/20/2016 10:18 AM, Sander Hoentjen wrote:
> Hi,
> 
> I am currently packaging dnsdist[1][2]. This is a binary that has a
> httpserver built-in, and the html, css and js files embedded in the
> binary. The javascript files are jquery and a few other known
> scripts[3], and there is one javascript specific to dnsdist
> itself[4]. What are the guidelines on javascript embedded this way?
> Do I need to miniify them myself, or are pre-minified files ok? 
> Also, is it ok to use the jquery shipped in the source tarball of
> dnsdist?
> 
> 
> 
> [1]  [2]
>  [3]
> 
>
> 
[4]
> 


https://fedoraproject.org/wiki/Packaging:JavaScript
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlafuW4ACgkQeiVVYja6o6OyIwCdEiujsl8k2vJCycspoRF3svs5
rI0An0bIPdQM7kRE1i8ZeOjPKa0OzVz8
=NerB
-END PGP SIGNATURE-
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Re: Embedding javascript in binary

2016-01-20 Thread Christopher
On Wed, Jan 20, 2016 at 12:34 PM Sander Hoentjen  wrote:
[snip]

> > https://fedoraproject.org/wiki/Packaging:JavaScript
> Yeah I read that, but is says "Please note that this section really only
> applies to JavaScript libraries intended for use on the web." so I am
> not sure that applies to my case.
>

It also doesn't thoroughly cover these use cases:

1. how to handle customized embedded forks of a JavaScript library in
upstream,

2. how to deal with JavaScript resources which upstream Java packages embed
in their WARs (should the maintainer have to rewrite significant portions
of upstream code to make these resources available from another location in
the filesystem?),

3. applications which require the same shared JavaScript resources but with
slightly different flags set in the source (to control style, or behavior),

4. how to package a single upstream project which many projects use which
contains a combination of images, styles, JavaScript, and other resources,
in a well-known hierarchical structure (like Bootstrap)
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org