Debian Bug report logs -
#1004558
python3.10: reproducible pyc files -- please consider applying this backported patch
Reported by: Johannes Schauer Marin Rodrigues <josch@debian.org>
Date: Sun, 30 Jan 2022 13:39:01 UTC
Severity: normal
Tags: patch
Found in version python3.10/3.10.2-1
Fixed in version python3.10/3.10.2-2
Done: Matthias Klose <doko@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, josch@debian.org, reproducible-bugs@lists.alioth.debian.org, Matthias Klose <doko@debian.org>:
Bug#1004558; Package src:python3.10.
(Sun, 30 Jan 2022 13:39:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Johannes Schauer Marin Rodrigues <josch@debian.org>:
New Bug report received and forwarded. Copy sent to josch@debian.org, reproducible-bugs@lists.alioth.debian.org, Matthias Klose <doko@debian.org>.
(Sun, 30 Jan 2022 13:39:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Source: python3.10
Version: 3.10.2-1
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: josch@debian.org, reproducible-bugs@lists.alioth.debian.org
Hi,
currently, pyc files generated after installation are not reproducible.
Namely, the elements in frozen sets are not ordered reproducibly. This
means that to create a bit-by-bit reproducible Debian chroot including
Python one has to remove all *.pyc files:
https://gitlab.tails.boum.org/tails/tails/-/blob/stable/config/chroot_local-hooks/99-remove_pyc
https://salsa.debian.org/live-team/live-build/-/blob/master/share/hooks/normal/0170-remove-python-py.hook.chroot
Fortunately, there is a patch that is already accepted upstream that
fixes this problem:
https://github.com/python/cpython/pull/27926
https://bugs.python.org/issue37596
That patch also cleanly applies to Python 3.10 as well as to 3.9. I
tested it for both versions. Please consider carrying the attached patch
for 3.9 and 3.10 so that we can have reproducible Debian chroots before
the Python 3.11 release.
Thanks!
cheers, josch
[reproducible-pyc.diff (text/plain, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#1004558; Package src:python3.10.
(Tue, 01 Feb 2022 17:33:02 GMT) (full text, mbox, link).
Message #8 received at 1004558@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Quoting Johannes Schauer Marin Rodrigues (2022-01-30 14:35:29)
> currently, pyc files generated after installation are not reproducible.
> Namely, the elements in frozen sets are not ordered reproducibly. This
> means that to create a bit-by-bit reproducible Debian chroot including
> Python one has to remove all *.pyc files:
>
> https://gitlab.tails.boum.org/tails/tails/-/blob/stable/config/chroot_local-hooks/99-remove_pyc
> https://salsa.debian.org/live-team/live-build/-/blob/master/share/hooks/normal/0170-remove-python-py.hook.chroot
>
> Fortunately, there is a patch that is already accepted upstream that
> fixes this problem:
>
> https://github.com/python/cpython/pull/27926
> https://bugs.python.org/issue37596
>
> That patch also cleanly applies to Python 3.10 as well as to 3.9. I
> tested it for both versions. Please consider carrying the attached patch
> for 3.9 and 3.10 so that we can have reproducible Debian chroots before
> the Python 3.11 release.
for your convenience, I filed a MR on salsa:
https://salsa.debian.org/cpython-team/python3/-/merge_requests/15
[signature.asc (application/pgp-signature, inline)]
Reply sent
to Matthias Klose <doko@debian.org>:
You have taken responsibility.
(Tue, 22 Feb 2022 14:45:03 GMT) (full text, mbox, link).
Notification sent
to Johannes Schauer Marin Rodrigues <josch@debian.org>:
Bug acknowledged by developer.
(Tue, 22 Feb 2022 14:45:03 GMT) (full text, mbox, link).
Message #13 received at 1004558-close@bugs.debian.org (full text, mbox, reply):
Source: python3.10
Source-Version: 3.10.2-2
Done: Matthias Klose <doko@debian.org>
We believe that the bug you reported is fixed in the latest version of
python3.10, 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 1004558@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated python3.10 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)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 22 Feb 2022 14:57:42 +0100
Source: python3.10
Architecture: source
Version: 3.10.2-2
Distribution: unstable
Urgency: medium
Maintainer: Matthias Klose <doko@debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 1004558 1005761 1006219
Changes:
python3.10 (3.10.2-2) unstable; urgency=medium
.
* Make test suite support Expat >=2.4.5. Closes: #1006219.
* Build again using readline instead of libedit. Closes: #1005761.
* Serialize frozenset elements deterministically, taken from the trunk.
Closes: #1004558.
Checksums-Sha1:
16965d4aecc7b3b3996fb2e4516f534212847772 3500 python3.10_3.10.2-2.dsc
f314fdac6d5d1973bc262d04adddcb05e9fba695 213904 python3.10_3.10.2-2.debian.tar.xz
ea1f7154367be0608a0c9f6467c2b239c66c9b1b 9694 python3.10_3.10.2-2_source.buildinfo
Checksums-Sha256:
c73c292188e620a18666019b764076c8303190be0ca4721530fa0167eb66e696 3500 python3.10_3.10.2-2.dsc
2a57f709175ee19e31ed26ab1bef4ff213320e8654f4e7129588524d43bf6a62 213904 python3.10_3.10.2-2.debian.tar.xz
49ec4aebab69cac5c0fd4ab64e0b6b8327ab28b1895ea037d9700ea2cd2ef2b7 9694 python3.10_3.10.2-2_source.buildinfo
Files:
5fb2ac914f24149c34804c9366a6e122 3500 python optional python3.10_3.10.2-2.dsc
e2863f1cb9f1485ca17b584b66deb166 213904 python optional python3.10_3.10.2-2.debian.tar.xz
e5bb4d2e03457bbea69c304e22e5d8cf 9694 python optional python3.10_3.10.2-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAmIU7sYQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9bYVEACRwaLV+6dkBXtZMDmRxsW861N2Oo7Fzu9X
Ne5IPdCafWVstZuM5NRreV3eiLjaIjS0JBJjpG7/u+bpEKABl9qUjANjcTMIYkJ+
a6lPtmTc3OKKthxatOVVVtnu70qB75Hg5h4J5j5gQWHdYkkDtSQ62v/jOk/76EaQ
x7bRW+3GjajM8Lhu4tpikSlVMC13F6d4E5wbF+3paSpvGxKpO+0GmEb2DRr+nMC1
lznqA18hiHaFhPBQg2m0FJJUTpx+m3j1GXYmtWopOG8yYv1sLRCorSohrHxMm/vB
yXKlzEH6ppboL3iajoCcPFe36r7S9P4GLRJrtLE10QPFM9bIxIn/rmRnGUARxO8t
o7vFf0v97D41a1qfjBXFYQu+4fcKHGaET8CSJoBDbZ6Ux4GhoTFAQH9hR0J40oKZ
iOHuR5CZo8BDNVFI7t6ggRXqPIsclE2jcOLWEZ2eB095BAmSwdSznnRoawLGvV+I
HdCbcNWmRSImO/YlPlUtgL7y98u78NeUGT2XO0DJNRX0Jnp7uOmKnYJXAaB2lKG2
98yyj2DCZKIGqSvnWMHqej9MsLNA14LTruzVwqc5Ak0IQsKxm6bhz4E8zMtBuP5b
Lr5BBGDDyS0PTXFpSmg10l9i/1v/6xzpZOkY+YmHw7mAz7oPmqJcqNvZVDAvEXLs
vyhKpWwuTA==
=GCVU
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 23 Mar 2022 07:26:30 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 10:19:33 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.