[Pkg-rust-maintainers] Not embedding jquery
Ximin Luo
infinity0 at debian.org
Mon Aug 15 20:13:00 UTC 2016
Angus Lees:
> I think your patch also needs a rustdoc run-time dependency on libjs-jquery.
> If we're going to remove it from the repacked upstream source, then we can
> also remove the un-minified source in debian/missing-sources/
>
I've removed the minified source too. Apparently rust-doc already has a dependency on libjs-jquery.
> For comparison (slightly different situation), in cargo packaging we just
> replaced the symlink after building the docs:
> https://anonscm.debian.org/cgit/pkg-rust/cargo.git/tree/debian/rules#n62
>
> ---
>
> Hrm. I feel like this is a user-visible change, and therefore something we
> might not want to do without a good reason. On the other hand, anyone who
> publishes HTML docs to another host *should* be resolving out-of-sub-tree
> symlinks anyway. So I'm still on the fence :/
>
> A possible alternative might be to read the source file from
> /usr/share/javascript at generation time (rather than embed it), but still
> generate a regular jquery.js output file (ie: copy, not symlink). Less
> space-efficient in output, but makes it look closer to what upstream
> generates.
>
> I definitely agree that we should at least build-depend on libjs-jquery and
> replace the embedded copy with the libjs-jquery version. I have a very
> vague memory that someone tried this and it wasn't as easy as just dropping
> in a (possibly different) version of jquery however - which invalidates all
> of the above alternatives. Anyone remember the details?
>
For binary:rustc it's fine to have bin/rustdoc copy from /usr/share/javascript/jquery/jquery.min.js. But this copy will live on in binary:rust-doc, which is not fine. That's why I chose the symlink option instead.
However, we could alternatively just have debian/rules (for rust-doc) delete this copy and replace it with the symlink, instead of having bin/rustdoc do that work.
I've been building a symlinked rust-doc in my rust-nightly packages already:
https://launchpad.net/~infinity0/+archive/ubuntu/rust-nightly
and they seem to work OK. But I only tried the search box at the top and the [-][+] buttons, I don't know if there's anything else:
file:///usr/share/doc/rust-doc/html/std/index.html
X
--
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git
More information about the Pkg-rust-maintainers
mailing list