[Debichem-devel] JSmol in Debian

Ximin Luo infinity0 at debian.org
Tue Feb 8 15:34:08 GMT 2022


Hi Andrius,

No I've not had any significant private correspondence relating to JSMol beyond what I already wrote on public lists.

I can't remember the exact details now, but my impression is that the file [4] you linked is just some wrapper functionality that loads external scripts or requires additional scripts to function, and therefore is not suitable for Debian, see my notes at the bottom of this email.

Unless they have completely rearchitected JSmol I highly doubt it is suitable for Debian. It is written in an academic setting where nobody cares about code maintainability standards, because that's not how the funding structure nor other incentives works. This is not something any of us can change.

In Debian's SageMath we just patch away any functionality requiring JSMol with a placeholder notice saying "This functionality is not available in Debian because it depends on JSmol". I suggest you do the same.

Alternatively, just don't package it for Debian, and use it in whatever way the upstream suggests, as something completely separated from the Debian OS.

Best,
Ximin

For example lines 118-134:

// required/optional libraries (preferably in the following order):

//    jquery/jquery.js     -- at least jQuery.1.9
//    js/JSmoljQueryext.js -- required for binary file transfer; otherwise standard jQuery should be OK
//    js/JSmolCore.js      -- required
//    js/j2sjmol.js        -- required
//    js/JSmol.js          -- required
//    js/JSmolApplet.js    -- required; internal functions for _Applet and _Image; must be after JSmolCore
//    js/JSmolControls.js  -- optional; internal functions for buttons, links, menus, etc.; must be after JSmolCore
//    js/JSmolConsole.js   -- optional; for the pop-up console
//    js/JSmolApi.js       -- required; all user functions; must be after JSmolCore
//    js/JSmolTHREE.js     -- optional; WebGL library required for JSmolGLmol.js
//    js/JSmolGLmol.js     -- optional; WebGL version of JSmol.
//    js/JSmolJME.js       -- optional; JSME (2D editor)
//    jsme/jsme/jsme.nocache.js   --  required for JSME
//    js/JSmolMenu.js      -- optional; required for menuing in JSV
//    js/JSmolJSV.js       -- optional; for creating and interacting with a JSpecView applet

line 239:
            _serverUrl: "https://your.server.here/jsmol.php",


Andrius Merkys:
> Hi Ximin,
> 
> I recall your efforts to bring JSmol to Debian. Your discussions with
> Bob Hanson document the process and its troubles quite well [1][2], but
> the exchange seemingly broke off in late 2016. Are there any news since
> then?
> 
> I am working to package FinalCif (ITP here [3]) which embeds JSmol JS
> module [4]. While the file itself is not minified and contains proper
> comments, lintian throws source-is-missing error, most likely due to
> overlong lines. Personally I think this file is suitable to be
> distributed in Debian (given the license which I believe is F/LOSS), but
> I would be glad to hear more opinions.
> 
> [1] https://sourceforge.net/p/jmol/bugs/587/
> [2] https://sourceforge.net/p/jmol/bugs/589/
> [3] https://bugs.debian.org/999508
> [4]
> https://github.com/dkratzert/FinalCif/blob/c4ba3635eef56ec47992af5ba1cb2a0e12528659/finalcif/displaymol/JSmol_dk.nojq.lite.js
> 
> Best,
> Andrius


-- 
GPG: ed25519/56034877E1F87C35
https://github.com/infinity0/pubkeys.git



More information about the Debichem-devel mailing list