Subject: bug#66351: Python build is not reproducible

From: wolf <[email-masked]>
Date: Wed, 4 Oct 2023 23:48:30 +0200

Hi,

python package currently does not build in a reproducible way:

    /gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7 contents differ:
      local hash: 0iw988a0573bc7ag1c3da23cvcl0xp166l1zazi31i9cf1faprmh
      https://ci.guix.gnu.org/nar/lzip/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7: 0iw988a0573bc7ag1c3da23cvcl0xp166l1zazi31i9cf1faprmh
      https://bordeaux.guix.gnu.org/nar/lzip/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7: 08g7gnv6852xwjw21w2nkd662xh2h8pvcryczsxcppdqaskmxy43
      differing files:
        /lib/python3.10/multiprocessing/__pycache__/connection.cpython-310.opt-1.pyc
        /lib/python3.10/multiprocessing/__pycache__/connection.cpython-310.opt-2.pyc
        /lib/python3.10/multiprocessing/__pycache__/connection.cpython-310.pyc
        /lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-310.opt-1.pyc
        /lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-310.opt-2.pyc
        /lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-310.pyc
        /lib/python3.10/test/support/__pycache__/os_helper.cpython-310.opt-1.pyc
        /lib/python3.10/test/support/__pycache__/os_helper.cpython-310.opt-2.pyc
        /lib/python3.10/test/support/__pycache__/os_helper.cpython-310.pyc
    
    1 store items were analyzed:
      - 0 (0.0%) were identical
      - 1 (100.0%) differed
      - 0 (0.0%) were inconclusive

It however *is* reproducible on a single machine, --rounds=30 finished
successfully.  Possible cause seems to be described in this opensuse issue:

    https://bugzilla.opensuse.org/show_bug.cgi?id=1049186

The patch linked seems fairly simple:

    https://build.opensuse.org/request/show/687278#revision_details_6

As far as I can tell, we currently do not carry patch like this and in 3.10.7 it
is not present upstream.

Have a nice day,
W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.