doxygen/debian
su-fang a1117bac36 Update the debian directory. 2023-04-25 15:54:41 +08:00
..
dh-doxygen Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
patches Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
source changed debian/source/format to native 2022-10-26 16:06:44 +08:00
tests Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
upstream Update the debian directory. 2023-04-25 15:54:41 +08:00
README.jquery Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
TODO Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
changelog Update the debian directory. 2023-04-25 15:54:41 +08:00
control Update the debian directory. 2023-04-25 15:54:41 +08:00
copyright Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen-doc.doc-base Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen-doc.files Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen-doc.lintian-overrides Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen-doxyparse.docs Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen-doxyparse.manpages Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen.NEWS Update the debian directory. 2023-04-25 15:54:41 +08:00
doxygen.docs Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
doxygen.install Update the debian directory. 2023-04-25 15:54:41 +08:00
doxygen.manpages Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
qmake Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
rules Update the debian directory. 2023-04-25 15:54:41 +08:00
tmake Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00
watch Import Debian changes 1.9.1-ok1 2022-10-26 16:06:26 +08:00

README.jquery

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