Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-07-13 Thread Alexis Murzeau
Hi,

On Tue, 30 Jun 2020 13:45:07 +0200 Holger Levsen  wrote:
> [...]
> 
> Out of these, three of them come from Sphinx:
> - doctools.js
> - language_data.js
> - searchtools.js
> 
> Please make lintian complain about embedding those. It seems the problem could
> be quite widespread:
> [...]

I'm getting this new lintian warning for language_data.js,
but I can't find which binary package I should depend on.

"sphinx" (as suggested by lintian) is a virtual package provided by 
python3-sphinx
which doesn't contain "language_data.js" [0] and libjs-sphinxdoc (which seems 
more
appropriate) does not contain "language_data.js" either [1].

Is it an oversight, or is "language_data.js" somewhere else ?

Also according to other embedded js warnings from lintian, the package name
should be a binary package name (mostly libjs-something), maybe "sphinx"
should be changed to the actual binary package to depend on ? (maybe 
libjs-sphinxdoc)

This will help maintainers find the correct package to use.

Thanks for your help :)


[0] https://packages.debian.org/sid/all/python3-sphinx/filelist
[1] https://packages.debian.org/sid/all/libjs-sphinxdoc/filelist

-- 
Alexis Murzeau
PGP: B7E6 0EBB 9293 7B06 BDBC  2787 E7BD 1904 F480 937F



signature.asc
Description: OpenPGP digital signature


Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-07-13 Thread Holger Levsen
Hi,

On Mon, Jul 13, 2020 at 12:24:53PM +0200, Alexis Murzeau wrote:
> I'm getting this new lintian warning for language_data.js,
> but I can't find which binary package I should depend on.
> 
> "sphinx" (as suggested by lintian) is a virtual package provided by 
> python3-sphinx
> which doesn't contain "language_data.js" [0] and libjs-sphinxdoc (which seems 
> more
> appropriate) does not contain "language_data.js" either [1].
[...]
> This will help maintainers find the correct package to use.
 
https://salsa.debian.org/debian/developers-reference/-/commit/29014c3d02b1a44aa983557b4887f4302c2136c5
shows how to use dh_sphinxdoc (instead of dh_linktree which also does
and did the right thing here), which then in turn adds the right
depends/recommends to the binary packages.

(The dh_linktree solution used a hack/workaround in d/rules to turn
the depends into recommends, but I recommend the dh_spinxdoc solution
anyway.)


-- 
cheers,
Holger

---
   holger@(debian|reproducible-builds|layer-acht).org
   PGP fingerprint: B8BF 5413 7B09 D35C F026 FE9D 091A B856 069A AA1C


signature.asc
Description: PGP signature


Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-07-13 Thread Alexis Murzeau
Le 13/07/2020 à 12:43, Holger Levsen a écrit :
>  
> https://salsa.debian.org/debian/developers-reference/-/commit/29014c3d02b1a44aa983557b4887f4302c2136c5
> shows how to use dh_sphinxdoc (instead of dh_linktree which also does
> and did the right thing here), which then in turn adds the right
> depends/recommends to the binary packages.
> 
> (The dh_linktree solution used a hack/workaround in d/rules to turn
> the depends into recommends, but I recommend the dh_spinxdoc solution
> anyway.)
> 

Thanks for your reply.

I'm already using "dh $@ --with python3,sphinxdoc --buildsystem=pybuild" [0]
and ${sphinxdoc:Depends} [1] but still get the warning.

So I've lintian-checked developers-reference binary package and found it also 
has
the lintian warning (see [3] below).

language_data.js is missing from libjs-sphinxdoc, maybe that's the reason for 
this.
Also dh_sphinxdoc doesn't seem to handle it like the other [2].


[0] https://salsa.debian.org/amurzeau/streamlink/-/blob/master/debian/rules#L14
[1] 
https://salsa.debian.org/amurzeau/streamlink/-/blob/master/debian/control#L52
[2] 
https://salsa.debian.org/python-team/modules/sphinx/-/blob/debian/master/debian/dh-sphinxdoc/dh_sphinxdoc#L326

[3]:
$ wget 
http://ftp.de.debian.org/debian/pool/main/d/developers-reference/developers-reference_11.0.15_all.deb
$ lintian -EviIL +pedantic developers-reference_11.0.15_all.deb
N: Using profile debian/main.
N: Starting on group developers-reference/11.0.15
N: Unpacking packages in group developers-reference/11.0.15
N: Finished processing group developers-reference/11.0.15
N: 
N: Processing binary package developers-reference
N: (version 11.0.15, arch all) ...
W: developers-reference: embedded-javascript-library 
usr/share/developers-reference/_static/language_data.js please use sphinx
N:
N:This package contains an embedded copy of JavaScript libraries that are
N:now available in their own packages (for example, JQuery, Prototype,
N:Mochikit or "Cropper"). Please depend on the appropriate package and
N:symlink the library into the appropriate location.
N:
N:Refer to Debian Policy Manual section 4.13 (Convenience copies of code)
N:for details.
N:
N:Severity: warning
N:
N:Check: languages/javascript/embedded
N:
$ lintian --version
Lintian v2.83.0


-- 
Alexis Murzeau
PGP: B7E6 0EBB 9293 7B06 BDBC  2787 E7BD 1904 F480 937F



signature.asc
Description: OpenPGP digital signature


Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-07-19 Thread Maxime Werlen
Hi,

It seems that language_data.js comes from a template from sphinx-common,
see https://packages.debian.org/sid/all/sphinx-common/filelist

We cannot symlink to this file as it contains templating markups. I've
found no package usable to symlink this file.

Regards,

Maxime


Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-07-28 Thread Andreas Beckmann
Followup-For: Bug #964013
Control: reopen -1

Hi,

I stumbled upon this while trying to fix

W: pocl-doc: embedded-javascript-library 
usr/share/doc/pocl-doc/html/_static/language_data.js please use sphinx 

language_data.js seems to be a false positive as long as
sphinx^Wthe-correct-sphinx-js-package (libjs-sphinxdoc?) does not provide
a linkable "master" copy. (And then it should be handled by dh_sphinxdoc.)


Andreas

PS: doctools.js and searchtools.js are correctly identified :-)



Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-08-04 Thread Dmitry Shachnev
Hi Andreas and all!

On Tue, Jul 28, 2020 at 06:55:08PM +0200, Andreas Beckmann wrote:
> Hi,
>
> I stumbled upon this while trying to fix
>
> W: pocl-doc: embedded-javascript-library 
> usr/share/doc/pocl-doc/html/_static/language_data.js please use sphinx 
>
> language_data.js seems to be a false positive as long as
> sphinx^Wthe-correct-sphinx-js-package (libjs-sphinxdoc?) does not provide
> a linkable "master" copy. (And then it should be handled by dh_sphinxdoc.)

I have just uploaded sphinx 2.4.3-5 where this is fixed: libjs-sphinxdoc
ships language_data.js and dh_sphinxdoc gained the ability to symlink it.

However, this is only for English language projects. For example,
developers-reference package (mentioned in the original bug report)
builds versions for 6 languages. For the English version, dh_sphinxdoc
will symlink that file, but for the other 5 packages it will leave that
file intact (and Lintian will false positively complain about it).

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Bug#964013: lintian: embedded-javascript-library should flag sphinx files too

2020-06-30 Thread Holger Levsen
Package: lintian
Version: 2.82.0
Severity: wishlist

Dear Maintainer,

running lintian on developers-reference 11.0.12 from bullseye results in two
warnings:

W: developers-reference-ru: embedded-javascript-library 
usr/share/developers-reference/ru/_static/jquery.js please use libjs-jquery
W: developers-reference-ru: embedded-javascript-library 
usr/share/developers-reference/ru/_static/underscore.js please use 
libjs-underscore

I fixed those two in 11.0.13 in sid, but there are still embedded javascript
libraries included, which lintian does not detect:

$ dpkg -L developers-reference|grep js
/usr/share/developers-reference/_static/doctools.js
/usr/share/developers-reference/_static/documentation_options.js
/usr/share/developers-reference/_static/language_data.js
/usr/share/developers-reference/_static/searchtools.js
/usr/share/developers-reference/_static/switchers.js
/usr/share/developers-reference/searchindex.js
/usr/share/developers-reference/_static/jquery.js
/usr/share/developers-reference/_static/underscore.js

Out of these, three of them come from Sphinx:
- doctools.js
- language_data.js
- searchtools.js

Please make lintian complain about embedding those. It seems the problem could
be quite widespread:

$ for i in doctools.js language_data.js searchtools.js ; do apt-file search 
"_static/$i" | wc -l ; done
1046
977
1046


-- 
cheers,
Holger

---
   holger@(debian|reproducible-builds|layer-acht).org
   PGP fingerprint: B8BF 5413 7B09 D35C F026 FE9D 091A B856 069A AA1C


signature.asc
Description: PGP signature