#1066015 patroni-doc: please make the build reproducible.

Package:
patroni-doc
Source:
patroni-doc
Submitter:
James Addison
Date:
2025-01-26 18:15:03 UTC
Severity:
normal
Tags:
#1066015#5
Date:
2024-03-10 23:38:14 UTC
From:
To:
Dear Maintainer,

I'm an occasional volunteer contributor with the Reproducible Builds[1]
project, and noticed recently that the patroni-doc package failed[2] an
automated reproducibility test on Debian.

From investigation, it seems that most if not all of the cause of
non-reproducibility during the test was due to the Sphinx autodoc extension
evaluating some of the default Python method values (like wal_log_hints[3])
at build-time and including the evaluated value, which varied, in the
documentation.

As a workaround, we can enable the 'autodoc_preserve_defaults'[4] configuration
setting, meaning that Sphinx will render the method signature defaults using the
original source code as-written, instead of evaluating the corresponding
values.

Thanks,
James

[1] - https://reproducible-builds.org/

[2] - https://tests.reproducible-builds.org/debian/rb-pkg/trixie/amd64/diffoscope-results/patroni.html

[3] - https://sources.debian.org/src/patroni/3.2.2-2/patroni/postgresql/config.py/#L303

[4] - https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_preserve_defaults

#1066015#10
Date:
2024-03-10 23:46:25 UTC
From:
To:
(clearing unintentionally-included patch tag)
#1066015#15
Date:
2025-01-13 14:58:41 UTC
From:
To:
Hello,

Bug #1066015 in patroni reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/postgresql/patroni/-/commit/a4f266bfd3a35d959389ccac3e6fd2168dcbda63
------------------------------------------------------------------------
* debian/patches/reproducible_docs.patch: New patch, adds the
    autodoc_preserve_defaults sphinx autodoc configuration parameter in order
    to make the documentation build (more) reproducible, thanks to James
    Addison (Closes: #1066015).
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1066015

#1066015#22
Date:
2025-01-13 15:38:36 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
patroni, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1066015@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Banck <mbanck@debian.org> (supplier of updated patroni package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 13 Jan 2025 15:58:00 +0100
Source: patroni
Architecture: source
Version: 4.0.4-3
Distribution: experimental
Urgency: medium
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Changed-By: Michael Banck <mbanck@debian.org>
Closes: 1066015
Changes:
 patroni (4.0.4-3) experimental; urgency=medium
 .
   * debian/patches/reproducible_docs.patch: New patch, adds the
     autodoc_preserve_defaults sphinx autodoc configuration parameter in order
     to make the documentation build (more) reproducible, thanks to James
     Addison (Closes: #1066015).
Checksums-Sha1:
 72c502dbdb2e95610bfbcdcff8171510ea01b9a1 2870 patroni_4.0.4-3.dsc
 561adf0b0c18cad48fc329ee2db64a80102e66cb 1204507 patroni_4.0.4.orig.tar.gz
 f1e99a328e1f64a6e951e060a2a2d364f546cf98 24960 patroni_4.0.4-3.debian.tar.xz
 96116d694ce1511eb3123eeaf1f77888ce3aae3a 10511 patroni_4.0.4-3_source.buildinfo
Checksums-Sha256:
 6b6e1e360a813855ec556fc1db3589ef042d25505b2f9187355237dd8139077b 2870 patroni_4.0.4-3.dsc
 4f0326f7f3628f8f46b53807ee9291f14a152d424afc33852a7602168d832dd6 1204507 patroni_4.0.4.orig.tar.gz
 32645392e8af63d76584b70b9929de318a73ec37b205e8a5ed6a6dbc3f3f3273 24960 patroni_4.0.4-3.debian.tar.xz
 7edcfc0ae739f1370f4fb51f8a83c59f6816d783d442d90411e4621170a997ea 10511 patroni_4.0.4-3_source.buildinfo
Files:
 d0862bbb366c9a641ad0264a8332d0a0 2870 database optional patroni_4.0.4-3.dsc
 7146e9450cd1a735b533c7639be05e47 1204507 database optional patroni_4.0.4.orig.tar.gz
 916f7249d3211b46928b4fd0607e049d 24960 database optional patroni_4.0.4-3.debian.tar.xz
 e46e5ee2ceaf5d363d4843d8e149789b 10511 database optional patroni_4.0.4-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEnKh3dJ+rLk+paGLs3GhqJ7Q0gbAFAmeFKgsACgkQ3GhqJ7Q0
gbBwiBAAhqzCk7CBJdEB40/VP9NWcvGvrtHtR7N3PsHG1SRc8s4CVqTi0YP7kuv8
dfNNGiCHvqpKgprpewXI+ergVDp5nXBDaB4cZjT5ERPZsqTZcXmyz6wGckhe+V82
NIxIxA77ETtGsO7wWZ5IU6od0RoJ6wFbt6pC15veNRl6FfD3MSeU3bGXlQOWyIfA
0FxzEoa2ZbwsPNBcgMEHsfb7MhKaj8CRY6rfcWwT+JX5q9TpIjd5BXDK5nfw8szB
8wAdsvsZ9vjuOrbFlj1JoQk5ZeIw0S1aLlFZtBHv87n0iIyDwXeQAowPwt3Z1CJ/
bgFT1j9vmsO5T8bNCMwNZE8UIWTLmCmo2PdptHGzoE96guRHS6fZ8QQNtrT4pHpl
Dr9KIaUnCufs0mGK96/t3x4wVVt70Cm1Lc+oR157LaEXVsvkCCs7vD/rmXbGJehr
6zUDKRuyKc6IFCVuUmYoUtch5NkJSkjd5NMO4rRqvoVRyLQMDJv7Gsb4nd9unPXZ
c/RaeiEshjlmWZReVYzJByun6jmGpuLq7IOC5hf3q2IASCn8otEWDigPRUJwioqX
hZrrIwkrOva3FMzBF+CpnTHqDzgqqFUwriAKVVlvaOId3BrzyIuZHsSlvexVFKzm
JgjsUF6lhNJ+Ffpr+qe1hKgbOZnhPVE8bDgmIyE9gi6fRzRn9Io=
=lWUl
-----END PGP SIGNATURE-----

#1066015#27
Date:
2025-01-14 21:13:09 UTC
From:
To:
Thank you, Michael.  Unfortunately I didn't test this patch
adequately; the documentation package continues to exhibit[1] some
nondeterministic builds from the experimental upload.

(in fact, this is part of a category of mistakes I've made - #1066016
and #1066017 also confirm that autodoc_preserve_defaults is not the
panacea I hoped it was at the time)

Sorry about that - I'll try to re-investigate this (perhaps there is
an upstream feature/fix for Sphinx involved), but I'm not sure when.

Regards,
James

[1] - https://tests.reproducible-builds.org/debian/rb-pkg/experimental/amd64/diffoscope-results/patroni.html

#1066015#32
Date:
2025-01-26 18:14:08 UTC
From:
To:
Reopening this bug because my patch was incomplete (more details in my previous
message[1])

[1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066015;msg=27