Project

General

Profile

LibreJS compliance

Added by bill auger about 7 years ago

while evaluating the WT framework this week i have had some preliminary success making the demo examples LibreJS compliant - i would like to ask if the upstream developers would be interested merging this feature


Replies (4)

RE: LibreJS compliance - Added by Roel Standaert about 7 years ago

If I read the description of LibreJS correctly, the JavaScript used by Wt is nontrivial by definition. That would mean indicating a license and source code location, but that's really up to the developer using Wt, so are you proposing that Wt be optionally configured for this?

Regards,

Roel

RE: LibreJS compliance - Added by bill auger about 7 years ago

hello roel - thanks for responding

if you visit any WT website with libreJS enabled it will block the javascript from running as "non-trivial" and shows only the "Load basic HTML" link

i am suggesting a patch to WT which will allow this to work out of the box for any developer - my solution requires the developer only to copy an example file to their app root which specifies the URLs where the WT sources and any additional javascript sources can be downloaded - this file is detected at runtime and the necessary headers are injected into the output stream - if the developer does not do this then nothing special happens and the framework behaves as it does now

i have this working so far only for some of the examples in the source tree - i expect more work may need to be done because i see also other third-party scripts mentioned such as jquery - all scripts that end-users download need to be accounted for and their respective licenses noted and linked to along with the sources in the header file mentioned above - for now i mostly wanted to see if this project is actively maintained and if it's developers would be interested in this feature as it is an absolute requirement for us and we would need to maintain this patch ourselves

you may note that the current wording of the license is incorrect - i need to speak with someone from libreJS to sort that out - but you can review the initial patch at the following URL

https://notabug.org/bill-auger/wt/pulls/1/files

RE: LibreJS compliance - Added by Roel Standaert about 7 years ago

Wt heavily uses generated JavaScript, which the LibreJS project seems to make no mention of. Is there a way you think this could be addressed?

A note about your implementation: you're relying on a file named a certain way in the working directory. I think it would be much cleaner and more in line with how Wt works to either

configure it in the application's source code, or in the Wt configuration file.

Regards,

Roel

RE: LibreJS compliance - Added by bill auger about 7 years ago

indeed the WT framework (along with a few others such as seaside smalltalk) is a special case as most of the javascript does not exist analogously in static flat files (not even in templated form) as they would in a typical php, ruby, or python website - the section of the libreJS documentation that addresses inline scripts is at this following anchor:

https://www.gnu.org/software/librejs/manual/librejs.html#Adding-a-stylized-comment-in-your-JavaScript-files-and-on-your-page

the implementation i have now follows that recommendation - it may be that this form requires all scripts on any given page to be covered by the same license but i am not certain - perhaps scripts that are clearly separate inclusions (with

) can have separate licenses if need be - this would be an edge-case question to pose to the libreJS project maintainers but can be easily tested by simply running libreJS on such a page

your request for the license filename to be customizable is reasonable - i gave it a canonical name only for simplicity - the actual file name is arbitrary - the fact is that most likely in the end you would need to re-implement or incorporate my patch yourself under your authorship due to these licensing issues - only the copyright holders can make licensing decisions - so you are o/c free to re-implement however you see fit - i intend only to suggest to you the form which such an implementation may take

as an unrelated note: i looked a bit more into this today and it seems that jquery is a curious case in this context - the jquery in the WT source tree at src/web/skeleton/jquery.js notes the license as: "Dual licensed under the MIT or GPL Version 2 licenses" and for sizzle.js "Released under the MIT, BSD, and GPL Licenses" - however this link indicates that current versions of jquery (since 2012) no longer offer the explicit GPL option https://blog.jquery.com/2012/09/10/jquery-licensing-changes/ and the current download page indicates the same http://jquery.com/download/ - this is not much of a problem because the WT version is frozen and anyways, all of those licenses are compatible for distribution in a GPL project - but again, i am unfamiliar with the framework so i dont know what other scripts it may include nor their current licenses - i should point out though, that the link in the WT jquery file http://docs.jquery.com/License redirects to https://js.foundation/pdf/ip-policy.pdf which seems to be saying that current versions of jquery are now apache2 licensed - i do not think that is the case so im not sure what that is implying exactly, but it is at least confusing to anyone reading the WT jquery file - whatever the implications there, it does not pertain to that older version of jquery but it is essentially a dead link to the original license for the file WT is distributing so some action is likely required on your part to remedy the fact that the original license text is now missing

    (1-4/4)