From 362291f8aebe40c1c60383239a76bf6d01eb64d1 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 15 2024 16:18:59 +0000 Subject: Python: conditionalize note about marshalparser Marshalparser's job is now done automatically by add-determinism: https://fedoraproject.org/wiki/Changes/ReproduciblePackageBuilds. So this section doesn't contain any actionable advice and can be dropped. (In principle, there might be other cases of irreproducibility in .pyc files, e.g. see https://pagure.io/fedora-reproducible-builds/project/issue/17. But marshalparser can't help here, and such issues fall under the general category of irreproducibility bugs that can apply to any file that is part of a noarch package and there is no need to discuss this specifically in the context of Python or Python pyc files.) --- diff --git a/guidelines/modules/ROOT/pages/Python_Appendix.adoc b/guidelines/modules/ROOT/pages/Python_Appendix.adoc index c2a5895..73ed4ba 100644 --- a/guidelines/modules/ROOT/pages/Python_Appendix.adoc +++ b/guidelines/modules/ROOT/pages/Python_Appendix.adoc @@ -424,6 +424,9 @@ Note that this *does disable* the compilation of files in `+/usr/lib(64)?/python == Byte compilation reproducibility +This subsection only applies to Fedora <= 40, ELN, and EPEL. +In later Fedora releases, this is implemented automatically. + For two Python files with the exact same content and metadata, byte compilation might produce different results. The resulting `.pyc` files are functionally identical but are not bit-by-bit identical. @@ -434,7 +437,7 @@ take a look at https://bugzilla.redhat.com/show_bug.cgi?id=1686078#c2[this Bugzi This inconvenience might cause a problem in Koji where noarch packages built as a part of an arch build might be rejected because they have different content. -To workaround this issue, +To work around this issue, BuildRequire marshalparser `BuildRequires: /usr/bin/marshalparser` (a tool that makes `.pyc` files more reproducible) and instruct it to process the `.pyc` files in certain paths by setting the `+%py_reproducible_pyc_path+` macro: