File: README.jquery

package info (click to toggle)
doxygen 1.8.8-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 21,696 kB
  • ctags: 31,305
  • sloc: cpp: 234,417; lex: 34,822; xml: 8,057; python: 2,566; perl: 1,592; ansic: 913; sh: 868; tcl: 594; makefile: 584; php: 445; yacc: 235; objc: 14; java: 1
file content (82 lines) | stat: -rw-r--r-- 3,669 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Doxygen embeds jquery
=====================

This document describes how and why Doxygen embeds jquery. It serves as an
explanation of what problems need to be addressed before removing these
embeddings. If you are not interested in the reasons, skip to consequences.

Where?
======

 1. The Doxygen source contains jquery library sources in the `jquery/` folder.
 2. These are minified at release time by the Doxygen upstream and stored as
    `src/*.js`. See `jquery/Makefile`.
 3. They are then converted to C header files and stored as
    `generated_src/doxygen/*_js.h`.  See `src/libdoxygen.t`.
 4. At build-time these headers are compiled into the `doxygen` binary and
    installed as `usr/bin/doxygen` into the `doxygen` binary package.
 5. When running Doxygen the jquery libraries are embedded into the generated
    documentation.
 6. Packages using Doxygen as a build-dependency for creating their
    documentation therefore also embed these jquery libraries.

Why?
====

While it would be nice to remove the need for any of these embedding, it is
practically difficult to do so.

 6. It was considered to introduce a `doxygen-common` package that pulls in the
    relevant jquery libraries and provides them at a canonical location for
    usage with symbolic links. When doing this the question of how to handle
    upgrades of Doxygen arises. [Upstream indicated] that the documentation
    generated with one version of Doxygen will not necessarily work with the
    jquery libraries from a different version of Doxygen. This leaves two
    options:

    * Ship all previous versions of jquery libraries in the `doxygen-common`
      package.
    * Rebuild all reverse build dependencies of Doxygen whenever uploading a
      new version of Doxygen.

    Both options were deemed infeasible. The first option simply is
    unmaintainable. The second option requires architecture independent
    binNMUs. Since the archive does not do any architecture independent
    auto-building this is not available either. (This was discussed with the
    buildd maintainers during DebConf13.)

 5. This is simply how Doxygen is designed to operate. The generated
    documentation should be usable as is without dependencies on external
    files.

 4. To facilitate embedding 5 the `doxygen` binary needs some kind of access
    to the jquery libraries. Changing this aspect would require significant
    modification of the Doxygen source.

 3. These files are regenerated during a regular build.

 2. The Debian package recreates these artifacts from step 1 by running `make
    -C jquery install` before the build.

 1. This is an aspect of the upstream source and build system. Each doxygen
    release ships a tightly coupled conglomerate of various javascript
    libraries. Replacing them with system copies is simply unmaintainable,
    because it is not mechanically testable.

One of the major reasons behind removing embedded copies of code is to be able
to do security updates. Arguably there are little options to exploit a
vulnerable jquery library as embedded by Doxygen, because from a user point of
view it is static data. Thus one of the primary motivations to remove embedded
copies does not apply in this case.

[Upstream indicated]: http://doxygen.10944.n7.nabble.com/release-tarballs-td5837.html

Consequences
============

It is not considered a problem for Doxygen or packages using Doxygen to embed
jquery. In fact replacing the `jquery.js` file created by Doxygen likely
results in broken documentation. Packages doing that are buggy. Lintian will
have to learn that a `jquery.js` embedded by Doxygen is a normal thing.

Helmut Grohne