New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
00328: Restore pyc to TIMESTAMP invalidation mode as default in rpmbuild #3
Conversation
|
Prior to this change: Scratchbuild: https://koji.fedoraproject.org/koji/taskinfo?taskID=36183131 |
|
With the change (file from the aarch64 package): |
|
Running python3 build in https://copr.fedorainfracloud.org/coprs/churchyard/dirty-tests/builds/ so I can test Python 3 package rebuilds against it. |
Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest %changelog date. This makes Python default to the CHECKED_HASH pyc invalidation mode, bringing more reproducible builds traded for an import performance decrease. To avoid that, we don't default to CHECKED_HASH when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages). See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
|
Prior to the build: |
|
After the build: This indeed fixes the problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, as does your test. (I didn't test myself.)
…python#91466) Fix an uninitialized bool in exception print context. `struct exception_print_context.need_close` was uninitialized. Found by oss-fuzz in a test case running under the undefined behavior sanitizer. https://oss-fuzz.com/testcase-detail/6217746058182656 ``` Python/pythonrun.c:1241:28: runtime error: load of value 253, which is not a valid value for type 'bool' #0 0xbf2203 in print_chained cpython3/Python/pythonrun.c:1241:28 #1 0xbea4bb in print_exception_cause_and_context cpython3/Python/pythonrun.c:1320:19 #2 0xbea4bb in print_exception_recursive cpython3/Python/pythonrun.c:1470:13 #3 0xbe9e39 in _PyErr_Display cpython3/Python/pythonrun.c:1517:9 ``` Pretty obvious what the ommission was upon code inspection.
Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest
%changelog date. This makes Python default to the CHECKED_HASH pyc
invalidation mode, bringing more reproducible builds traded for an import
performance decrease. To avoid that, we don't default to CHECKED_HASH
when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages).
See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
Untested yet. Will run a scratchbuild.