Created attachment 1198412 [details] Actual results Description of problem: When rpmlint is run on python3-libs, you get a lot of python-bytecode-inconsistent-mtime See explanation: $ rpmlint -I python-bytecode-inconsistent-mtime python-bytecode-inconsistent-mtime: The timestamp embedded in this python bytecode file isn't equal to the mtime of the original source file, which will force the interpreter to recompile the .py source every time, ignoring the saved bytecode. Version-Release number of selected component (if applicable): python3-libs-3.5.2-1.fc25 How reproducible: Easy Steps to Reproduce: 1. rpmlint python3-libs | grep python-bytecode-inconsistent-mtime Actual results: Attached Expected results: Nothing Additional info: Happens since 3.5.0-1 Does not happen on 3.4 Does not happen on 2.7 With my python35 builds, it happens as well, also with python26, but not with python34, python33.
Also happens with 3.6 from https://copr.fedorainfracloud.org/coprs/cstratak/python-3.6/
It's not exclusive on python3-libs rpm. Every other subpackage that includes py and pyc files has the same warnings. Either something is fundamentally wrong with the SPEC file (or maybe on how RPM handles some things) or it is a false positive. Either way it needs investigation. No idea why this happens on python26, however for Python 3.5 I guess it relates to this [PEP] somehow. [PEP]: https://www.python.org/dev/peps/pep-0488/ So far I haven't been able to debug the exact phase of where the timestamps change, during the creation of the rpm.
Proposed as a Blocker for 25-beta by Fedora user churchyard using the blocker tracking app because: Upgrade form F23 to F25 is not working with default Workstation install. "For each one of the release-blocking package sets, it must be possible to successfully complete a direct upgrade from fully updated installations of the last two stable Fedora releases with that package set installed. The release-blocking package sets are the minimal set, and the sets for each one of the release-blocking desktops, on all primary Architectures except i686."
That was a mistake, I had bad bug number in clipboard, sorry about that.
I have found out what's causing it, it's 3 different commands in the %install section that modify the files: 1. # Fix end-of-line encodings: 2. # Switch all shebangs to refer to the specific Python version. 3. # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: I'm getting close to a fix.
# Do bytecompilation with the newly installed interpreter happens after all of those.
Please report any findings here. If someone figures it out I would like the fix to be ideally pushed together with rhbz#1374357
(In reply to Miro Hrončok from comment #6) > # Do bytecompilation with the newly installed interpreter > > happens after all of those. Thank you, Miro, for that suggestion, it saved me a lot of time. So, here's what was wrong: The aforementioned 3 commands in the %install section were modifying the .py files, thus the .pyc files need to be rebuilt. Indeed the "# Do bytecompilation with the newly installed interpreter" part comes after and should rebuild all the .pyc files, however, it only rebuilds .pyc files with "optimize=0". It leaves out .pyc files with optimization level 1 and 2, which didn't used to exist, but now they do: https://www.python.org/dev/peps/pep-0488/ I modified the script to rebuild .pyc files of all optimization levels and the problem is solved.
In python26 the steps (fix shebangs, bytecompile) wre in bad order, trying to rebuild using the correct order.
(In reply to Miro Hrončok from comment #9) > In python26 the steps (fix shebangs, bytecompile) wre in bad order, trying > to rebuild using the correct order. Didn't help.
Fix is verified to work and pushed to git for F24, F25 and rawhide. cstratak will make builds later after he finishes his issue.
python3-3.5.2-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e495d8af9a
python3-3.5.1-15.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-80846dd659
python3-3.5.1-15.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-80846dd659
python3-3.5.2-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e495d8af9a
python3-3.5.2-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d49f8ec161
python3-3.5.1-15.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
python3-3.5.2-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d49f8ec161
python3-3.5.2-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.