[PATCH] doc: ensure sphinx output is reproducible
Luca Boccassi
bluca at debian.org
Fri May 17 13:29:41 CEST 2024
On Mon, 27 Nov 2023 at 17:04, Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> On Mon, Nov 27, 2023 at 05:45:52PM +0100, Thomas Monjalon wrote:
> > 06/07/2023 14:49, Christian Ehrhardt:
> > > On Mon, Jul 3, 2023 at 5:29 PM Thomas Monjalon <thomas at monjalon.net> wrote:
> > > >
> > > > 29/06/2023 14:58, christian.ehrhardt at canonical.com:
> > > > > From: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> > > > >
> > > > > By adding -j we build in parallel, to make building on multiprocessor
> > > > > machines more effective. While that works it does also break
> > > > > reproducible builds as the order of the sphinx generated searchindex.js
> > > > > is depending on execution speed of the individual processes.
> > > > [...]
> > > > > -if Version(ver) >= Version('1.7'):
> > > > > - sphinx_cmd += ['-j', 'auto']
> > > >
> > > > What is the impact on build speed on an average machine?
> > >
> > > Hi,
> > > I haven't tested this in isolation as it was just a mandatory change
> > > on the Debian/Ubuntu side.
> > > And the time for exactly and only the doc build is hidden inside the
> > > concurrency of meson.
> > > But I can compare a full build [1] and a full build with the change [2].
> > >
> > > That is an average build machine and it is 35 seconds slower with the
> > > change to no more do doc builds in parallel.
> >
> > I would prefer adding an option for reproducible build
> > (which is not a common requirement).
> >
> Taking a slightly different tack, is it possible to sort the searchindex.js
> file post-build, so that even reproducible builds get the benefits of
> parallelism?
Given the recent attacks with malicious sources being injected in open
source projects, reproducible builds are more important than ever and
should just be the default. Could we please take this patch as-is?
If someone wants to try and fix this searchindex.js in a different way
separately it can then be done later and on top of this.
More information about the dev
mailing list