• Bug#1064891: pytest-repeat: please make the build reproducible

    From Chris Lamb@21:1/5 to All on Tue Feb 27 11:50:01 2024
    --e79c0c0a89024e048775675e83f7bc3e
    Content-Type: text/plain;charset=utf-8
    Content-Transfer-Encoding: quoted-printable

    Source: pytest-repeat
    Version: 0.9.3-1
    Severity: wishlist
    Tags: patch
    User: reproducible-builds@lists.alioth.debian.org
    Usertags: shell
    X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

    Hi,

    Whilst working on the Reproducible Builds effort [0], we noticed that pytest-repeat could not be built reproducibly.

    This was because of the use of echo "... \n ..." in debian/rules,
    which emits a literal "\n" on shells other than Bash such as dash:

    │ │ │ ├── ./usr/lib/python3/dist-packages/pytest_repeat.egg-info/entry_points.txt
    │ │ │ │ @@ -1,2 +1 @@
    │ │ │ │ -[pytest11]
    │ │ │ │ -repeat = pytest_repeat
    │ │ │ │ +[pytest11]\nrepeat = pytest_repeat

    A patch is attached that uses printf instead.

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


    Regards,

    --
    ,''`.
    : :' : Chris Lamb
    `. `'` lamby@debian.org / chris-lamb.co.uk
    `-

    --e79c0c0a89024e048775675e83f7bc3e
    Content-Disposition: attachment; filename="pytest-repeat.diff.txt" Content-Type: text/plain; name="pytest-repeat.diff.txt" Content-Transfer-Encoding: BASE64

    LS0tIGEvZGViaWFuL3J1bGVzCTIwMjQtMDItMjcgMTA6NDA6MDMuMTE1NzMxMTg3ICswMDAw Ci0tLSBiL2RlYmlhbi9ydWxlcwkyMDI0LTAyLTI3IDEwOjQyOjEzLjc1OTY4ODYyMyArMDAw MApAQCAtMSw3ICsxLDcgQEAKICMhL3Vzci9iaW4vbWFrZSAtZgogCiBleHBvcnQgUFlCVUlM RF9CRUZPUkVfVEVTVD1ta2RpciB7YnVpbGRfZGlyfS9weXRlc3RfcmVwZWF0LmVnZy1pbmZv ICYmIFwKLQkJICAgIGVjaG8gIltweXRlc3QxMV1cbnJlcGVhdCA9IHB5dGVzdF9yZXBlYXQi ID4ge2J1aWxkX2Rpcn0vcHl0ZXN0X3JlcGVhdC5lZ2ctaW5mby9lbnRyeV9wb2ludHMudHh0 CisJCSAgICBwcmludGYgIltweXRlc3QxMV1cbnJlcGVhdCA9IHB5dGVzdF9yZXBlYXRcbiIg PiB7YnVpbGRfZGlyfS9weXRlc3RfcmVwZWF0LmVnZy1pbmZvL2VudHJ5X3BvaW50cy50eHQK IAogJToKIAlkaCAkQCAtLWJ1aWxkc3lzdGVtPXB5YnVpbGQK

    --e79c0c0a89024e048775675e83f7bc3e--

    --- SoupGate-Win32 v1.05
    *
  • From James Addison@21:1/5 to All on Tue Feb 27 12:20:01 2024
    Source: pytest-repeat
    Followup-For: Bug #1064891
    X-Debbugs-Cc: lamby@debian.org

    Hi Chris,

    I'd neglected to file a bugreport for this, so my mistake here: I'd provided
    a merge request[1] to fix this same reproducibility issue.

    The approach I took was slightly different, removing the PYBUILD_BEFORE_TEST export entirely. Yours is more cautious, and I have to admit that after inspection, my change does also introduce a small change in the package content (the resulting package has no egg-info/entry_points.txt file, although it does have a dist-info/entry_points.txt).

    I'm OK with either approach. In future I'll try to make sure to file bugreports ahead-of-time to reduce patch-provision race conditions :)

    Regards,
    James

    [1] - https://salsa.debian.org/python-team/packages/pytest-repeat/-/merge_requests/1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Lamb@21:1/5 to James Addison on Tue Feb 27 14:50:01 2024
    James Addison wrote:

    I'd neglected to file a bugreport for this, so my mistake here: I'd provided a merge request[1] to fix this same reproducibility issue.

    No worries about not filing a bug report. Ironically, I don't think it
    would have helped in this instance: I don't recall checking whether
    there was a bug report before filing this one anyway — whoops...

    Re. the next steps, though, I am not convinced about the utility of
    shipping entry_points.txt etc. in Debian packages, so I would be more
    than happy if that bit of code would just be removed.


    Best wishes,

    --
    o
    ⬋ ⬊ Chris Lamb
    o o reproducible-builds.org 💠
    ⬊ ⬋
    o

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Addison@21:1/5 to All on Sat Mar 2 13:10:01 2024
    Source: pytest-repeat
    Followup-For: Bug #1064891
    Control: forwarded -1 https://salsa.debian.org/python-team/packages/pytest-repeat/-/commit/3ef7a0e17d6691fd2afbd845ee28d814e3bd0bcf
    Control: tags -1 - patch
    Control: tags -1 pending

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)