• Bug#1063542: python-parsl-doc: please make the build reproducible

    From James Addison@21:1/5 to All on Fri Feb 9 15:20:01 2024
    Package: python-parsl-doc
    Severity: wishlist
    Tags: patch
    User: reproducible-builds@lists.alioth.debian.org
    Usertags: hostname
    X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

    Dear Maintainer,

    I'm an occasional volunteer with the Reproducible Builds[1] project, and recently noticed that the python-parsl-doc package failed to build from source reproducibly.

    The cause is that the hostname of the build host appears in some of the documentation built by Sphinx and the autodoc extension. The hostname
    is evaluated from a class attribute that calls the Python socket.gethostname method.

    I'll attach a patch momentarily that resolves the problem by enabling the Sphinx autodoc extension 'autodoc_preserve_defaults' configuration setting[2]. Please note that this does affect other output in the documentation.


    In more detail:

    The TaskVineManagerConfig dataclass includes an 'address' attribute[3] that
    is set to the value of socket.gethostname() when the class is loaded.

    Meanwhile, the TaskVineExecutor.__init__ method 'manager_config' argument[4] has a default value of a no-args constructed TaskVineManagerConfig instance.

    When Sphinx builds documentation, by default it will emit a Python repr() of the manager_config argument, causing the hostname of the build host to be included.

    We can solve that by instructing the Sphinx autodoc extension to retain the textual representation of argument lists as they are found in the source
    code, instead of evaluated and repr'd equivalents.

    Regards,
    James

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

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

    [3] - https://sources.debian.org/src/python-parsl/2023.11.13%2Bds-1/parsl/executors/taskvine/manager_config.py/#L151

    [4] - https://sources.debian.org/src/python-parsl/2023.11.13%2Bds-1/parsl/executors/taskvine/executor.py/#L106

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Addison@21:1/5 to All on Fri Feb 9 15:30:01 2024
    This is a multi-part MIME message sent by reportbug.


    Followup-For: Bug #1063542

    Description: improve Sphinx documentation reproducibility by preserving argument defaults
    The TaskVineManagerConfig dataclass includes an 'address' attribute that
    is set to the value of socket.gethostname() when the class is loaded.
    .
    Meanwhile, the TaskVineExecutor.__init__ method 'manager_config' argument
    has a default value of a no-args constructed TaskVineManagerConfig instance.
    .
    When Sphinx builds documentation, by default it will emit a Python repr() of
    the manager_config argument, causing the hostname of the build host to be
    included.
    .
    We can solve that by instructing the Sphinx autodoc extension to retain the
    textual representation of argument lists as they are found in the source
    code, instead of evaluated and repr'd equivalents.
    Author: James Addison <jay@jp-hosting.net>

    ---
    Bug-Debian: https://bugs.debian.org/1063542

    --- python-parsl-2023.11.13+ds.orig/docs/conf.py
    +++ python-parsl-2023.11.13+ds/docs/conf.py
    @@ -363,3 +363,4 @@ autodoc_default_options = {
    'members': True,
    'undoc-members': True
    }
    +autodoc_preserve_defaults = True

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?=C3=89tienne?= Mollier@21:1/5 to All on Fri Feb 9 22:00:01 2024
    Hi James,

    James Addison, on 2024-02-09:
    When Sphinx builds documentation, by default it will emit a Python repr() of the manager_config argument, causing the hostname of the build host to be included.

    We can solve that by instructing the Sphinx autodoc extension to retain the textual representation of argument lists as they are found in the source code, instead of evaluated and repr'd equivalents.

    Thank you thank you thank you! This reproducibility issue has
    been nagging me from day zero. Despite trying to filter out the
    host name, it ended up in the search indexer, sliced by dashes
    when the name contained some, preventing sed passes to resolve
    the issue. I see to include your patch in the next python-parsl
    upload; this will also allow some cleanup in the d/rules.

    Have a nice day, :)
    --
    .''`. Étienne Mollier <emollier@debian.org>
    : :' : pgp: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da
    `. `' sent from /dev/pts/5, please excuse my verbosity
    `- on air: AndersonPonty Band - Time and a Word

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEj5GyJ8fW8rGUjII2eTz2fo8NEdoFAmXGkQsACgkQeTz2fo8N EdrMoA/+Ofg27nwpRHaXAXx77IwAmE+f8xkQUw/pl3L0S+zLxti9E4G/mbeNoqnc KU+Tg1mpzGecz+uI3yrvMkEIfNAY+JVtouIjX1xjolkPo+e/JkxnTRz/lev+ym88 owAeP6wo4T59MxjPqLH//sGzB8wLqaXDJs84qamVMXPYMHBGiG90y13V7uD2SXMz ZqslI/f7dfMpphWjiOX0wmjX3U2IHAruYAddmgtt/ohlw9J0BBrcb2yk7WRv0KGc 6dZ32z02w8hboJcNEt3vHXAtlNlzUhoXKbJy1MjD2ML39z1gfnN0oOLk4F/E4ZpZ e/v6SyXK3sBUV2QCVrOEVF6sMpp7Qh+BKkh2jGEg4RV+GKxs+BHpa9P3YIbvNQx/ iZjzETYyCf6rS3UG8whEf4DbOea9myRKgbcp+yzR9Zpz/I/cQXp3UK+4PceHjqLs Pywn6LLl2FyZkMoFAPAc6ilpt2iNLeBHiC7KZCyR4aGY2zayjuesudZ5SzyCfOwB H7AwmJOzbU6o1lfRVMBHIoD1Gijh37DU0r/TxzVTFoRn4GCq6W4gRIC+jkAQtgfn xFwUNuUiyqQRndydNjoEvrbAIZpzgf42nOaxn5Nx0hP2Znfdkqw8AdR3323fdRaI fSRyDE0xhupHwYXVe8jNJZo5ufp0W
  • From James Addison@21:1/5 to emollier@debian.org on Sat Feb 10 13:40:02 2024
    Hi Étienne,

    On Fri, 9 Feb 2024 at 20:54, Étienne Mollier <emollier@debian.org> wrote:
    James Addison, on 2024-02-09:
    When Sphinx builds documentation, by default it will emit a Python repr() of
    the manager_config argument, causing the hostname of the build host to be included.

    We can solve that by instructing the Sphinx autodoc extension to retain the textual representation of argument lists as they are found in the source code, instead of evaluated and repr'd equivalents.

    Thank you thank you thank you! This reproducibility issue has
    been nagging me from day zero. Despite trying to filter out the
    host name, it ended up in the search indexer, sliced by dashes
    when the name contained some, preventing sed passes to resolve
    the issue. I see to include your patch in the next python-parsl
    upload; this will also allow some cleanup in the d/rules.

    You're welcome - thanks for the upload!

    I'll also forward the same change to upstream, in the hope that we may
    be able to drop the patch from the packaging in future.

    Regards,
    James

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?=C3=89tienne?= Mollier@21:1/5 to All on Sun Feb 11 21:50:01 2024
    James Addison, on 2024-02-10:
    I'll also forward the same change to upstream, in the hope that we may
    be able to drop the patch from the packaging in future.

    That would be useful. Patch rebase tends to cause quite some
    friction on the long run with newer upstream versions. It
    shouldn't hurt informing upstream of the availability of the
    change, in case they are sensible to build reproducibility
    issue.

    Have a nice day, :)
    --
    .''`. Étienne Mollier <emollier@debian.org>
    : :' : pgp: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da
    `. `' sent from /dev/pts/1, please excuse my verbosity
    `-

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEj5GyJ8fW8rGUjII2eTz2fo8NEdoFAmXJMWQACgkQeTz2fo8N EdpT4A//WMXtOWUnxfsKW+bHXovj4MtPEbkzRx17Awc+cXlcyFoDoePxs1gZVFKx qJtixR0cg/eyiTSPPpO9y69IgzhIBP31/IYwJ/djZasIpgT6RNzc9DQLWotxswEI VcuBhQ5GzmgUFjbB6Z9Wowg++iU8IhY3W5dMrI2kTco549E/na9Nju1y/GpUeR5l AFjWsW5aGdxEoNQ58AbpSpvGS3aKyDaW+MA01l70EyRbhLTniK+/jZA5PsVR/sdu GaXMnU7bXVyLPA+2jqh3cS/SSbD3toXcxl5vbi3WpfU5shE61rf2TjaYwdKNfHKh xT2k+He3X14LbHRkH5YJfrch1NZpOAbB2PB6TGZZXIeNqseVGzMBqCXtTd8jaidW 5wzz+iVODDFPHwJme8RptVTixpDXBHjgxyJ3p2fq/bZ7RnrG/tXME0uFt8YCbmrJ MgArrng2p1wGkOwtPMyNnf4qhMGQrnfYKyJnd8Qva31CWDF+b4HbmVNopzQF6AuS ip+LpzhJ2et7u72muYeiKDjSg8ITBc8EAmJH543dP900Wd81AE6qHQyAfP9EQza/ FbgHIOOlACsL6tKIVtLtzB9LUaR3YcAFJAQ93YvuYdUR/5KPlDCCzKwgNu3+4j77 /Zv/2JfiaY/uyct51tdDDq/6uiycs1uK/HMx0lVO3M5UN6/oAoI=
    =dzu+
    -----END PGP SIG